/* MatrixISP Main Stylesheet - Modern Futuristic Dark & Light Theme */
:root {
  /* Dark Theme Variable Tokens - Calibrated Matte Dark Tech (Lower Brightness) */
  --bg-primary: #060a14;          /* Deep calm void canvas */
  --bg-secondary: #09101d;        /* Surface container */
  --bg-card: #0c1322;             /* Refined matte card surface */
  --bg-card-hover: #10192e;       /* Card hover */
  --bg-input: #070c17;            /* Form input bg */
  --bg-sidebar: #04070f;          /* Ultra-dark matte sidebar */
  --bg-sidebar-active: #0a1326;   /* Active sidebar item */
  --bg-active: #0c1830;
  --border-color: rgba(56, 189, 248, 0.08); /* Muted, non-intrusive border */
  --border-color-light: rgba(255, 255, 255, 0.04);
  --text-main: #e2e8f0;           /* Soft off-white (easy on the eyes) */
  --text-color: #e2e8f0;
  --text-muted: #8595a8;          /* Soft slate secondary */
  --text-dim: #556579;            /* Dim helper */
  
  /* Muted Matte Accent Palette (Calibrated, No Glare) */
  --color-primary: #0369a1;       /* Subdued corporate tech blue */
  --color-primary-hover: #075985;
  --color-primary-light: rgba(3, 105, 161, 0.12);
  --color-primary-glow: 0 1px 4px rgba(0, 0, 0, 0.3);
  
  --color-success: #059669;       /* Subdued emerald */
  --color-success-light: rgba(5, 150, 105, 0.1);
  --color-warning: #d97706;       /* Subdued amber */
  --color-warning-light: rgba(217, 119, 6, 0.1);
  --color-danger: #e11d48;        /* Subdued rose */
  --color-danger-light: rgba(225, 29, 72, 0.1);
  --color-info: #4f46e5;          /* Subdued indigo */
  --color-info-light: rgba(79, 70, 229, 0.1);
  --color-purple: #8b5cf6;        /* Subdued violet */
  --color-purple-light: rgba(139, 92, 246, 0.1);
  
  /* Layout and sizes */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 75px;
  --header-height: 70px;
  --border-radius: 12px;
  --transition-speed: 0.22s;
  
  /* Elevation & Shadows (Pure matte depth, zero glow) */
  --card-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.5);
  --sidebar-shadow: 4px 0 20px rgba(0, 0, 0, 0.6);
}

/* Light Theme Variables - Modern Clean Arctic Minimalist */
.light-theme {
  --bg-primary: #f1f5f9;          /* Gentle cool pearl slate */
  --bg-secondary: #ffffff;        /* Pure card white */
  --bg-card: #ffffff;             /* Surface white */
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;            /* Clean input */
  --bg-sidebar: #0b1120;          /* Deep navy-black sidebar for contrast */
  --bg-sidebar-active: #1e293b;
  --bg-active: #e2e8f0;
  --border-color: #cbd5e1;        /* Crisp slate border */
  --border-color-light: #e2e8f0;
  --text-main: #0f172a;
  --text-color: #0f172a;           /* Deep dark slate for maximum readability */
  --text-muted: #64748b;          /* Balanced mid-slate */
  --text-dim: #94a3b8;
  
  /* Refined High-Contrast Light Brand Palette */
  --color-primary: #0284c7;       /* Deep Sky Cyan/Blue */
  --color-primary-hover: #0369a1;
  --color-primary-light: rgba(2, 132, 199, 0.12);
  --color-primary-glow: 0 4px 14px rgba(2, 132, 199, 0.25);
  
  --color-success: #059669;       /* Deep Emerald */
  --color-success-light: rgba(5, 150, 105, 0.12);
  --color-warning: #d97706;       /* Warm Ochre Amber */
  --color-warning-light: rgba(217, 119, 6, 0.12);
  --color-danger: #e11d48;        /* Vivid Crimson */
  --color-danger-light: rgba(225, 29, 72, 0.12);
  --color-info: #4f46e5;          /* Vibrant Royal Indigo */
  --color-info-light: rgba(79, 70, 229, 0.12);
  --color-purple: #9333ea;
  --color-purple-light: rgba(147, 51, 234, 0.12);
  
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
}

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* 1. Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--sidebar-shadow);
  z-index: 100;
  transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow-x: hidden;
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* Branding */
.sidebar-brand {
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-primary), #009eb0);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 0 15px var(--color-primary-light);
  flex-shrink: 0;
}

.brand-text {
  transition: opacity 0.15s ease;
}

.sidebar.collapsed .brand-text {
  opacity: 0;
  pointer-events: none;
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
}

.brand-text h1 span {
  color: var(--color-primary);
}

.brand-text small {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
  display: block;
  margin-top: -2px;
}

/* Sidebar Menu Header Label (Matches screenshot 'Menú') */
.menu-header-label {
  padding: 18px 24px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.sidebar.collapsed .menu-header-label {
  opacity: 0;
  pointer-events: none;
}

/* Navigation Lists */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}

.nav-list {
  list-style: none;
}

.nav-item {
  position: relative;
  margin-bottom: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #8598a3; /* Muted inactive text */
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.02);
}

/* Active Menu styling matching the screenshot */
.nav-item.active-menu > .nav-link {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.15), rgba(13, 30, 56, 0.6));
  border-left-color: var(--color-primary);
  box-shadow: none;
}

.nav-item.active-menu > .nav-link .nav-icon {
  color: var(--color-primary);
  text-shadow: none;
}

.nav-item.active-menu > .nav-link .arrow-icon {
  color: var(--color-primary);
}

.nav-icon {
  width: 22px;
  margin-right: 14px;
  font-size: 1.15rem;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.15s;
}

.nav-label {
  flex: 1;
  transition: opacity 0.15s ease;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .arrow-icon {
  opacity: 0;
  pointer-events: none;
}

.arrow-icon {
  font-size: 0.75rem;
  transition: transform var(--transition-speed) ease, opacity 0.15s ease;
  color: #8598a3;
}

/* Submenu Style */
.submenu {
  list-style: none;
  background-color: rgba(0, 0, 0, 0.15);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.nav-item.open .submenu {
  max-height: 1200px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

/* Nested Submenu inside MatrixOLT */
.has-nested-submenu {
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
  padding-top: 4px;
}

.nested-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px 10px 48px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nested-nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.03);
}

.nested-arrow-icon {
  font-size: 0.75rem;
  color: #8598a3;
  transition: transform 0.2s ease;
}

.has-nested-submenu.open .nested-arrow-icon {
  transform: rotate(0deg);
}

.has-nested-submenu:not(.open) .nested-arrow-icon {
  transform: rotate(-90deg);
}

.nested-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.has-nested-submenu.open .nested-submenu {
  max-height: 500px;
  opacity: 1;
}

.has-nested-submenu:not(.open) .nested-submenu {
  max-height: 0;
  opacity: 0;
}

.submenu-link.nested-link {
  padding-left: 60px;
  font-size: 0.84rem;
}

.sidebar.collapsed .submenu {
  max-height: 0 !important; /* Hide submenus when collapsed */
}

.nav-item.open .arrow-icon {
  transform: rotate(90deg);
}

.submenu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px 10px 48px;
  color: #8598a3;
  font-size: 0.88rem;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.submenu-link:hover, .submenu-link.active {
  color: var(--color-primary);
  background-color: rgba(0, 189, 206, 0.05);
}

.submenu-mini-icon {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: #8598a3;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.submenu-link:hover .submenu-mini-icon,
.submenu-link.active .submenu-mini-icon {
  color: var(--color-primary);
}

/* Sidebar Footer Profile */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  transition: padding var(--transition-speed);
}

.sidebar.collapsed .sidebar-footer {
  padding: 16px 12px;
  justify-content: center;
}

.user-avatar {
  background-color: rgba(255, 255, 255, 0.03);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: opacity 0.15s ease;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .logout-btn {
  display: none;
}

.user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

.user-role {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
}

.logout-btn {
  background: none;
  border: none;
  color: #8598a3;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
  padding: 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.logout-btn:hover {
  color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

/* 2. Main Content & Top Navbar */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.top-navbar {
  height: var(--header-height);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  display: none; /* Shown on Mobile */
}

/* Breadcrumbs */
.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.breadcrumb-parent {
  color: var(--text-muted);
}

.separator {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.breadcrumb-active {
  color: var(--color-primary);
  font-weight: 600;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-action-btn {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.nav-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--color-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 6px;
  border: 2px solid var(--bg-secondary);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-primary);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 500;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.status-indicator.offline {
  background-color: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
}

.content-body {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#table-onu-aut {
  width: 100%;
}

.onu-row-clickable {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.onu-row-clickable:hover {
  background-color: rgba(0, 189, 206, 0.07) !important;
}

.light-theme .onu-row-clickable:hover {
  background-color: #f1f5f9 !important;
}

.onu-actions-subrow td {
  background: rgba(0, 189, 206, 0.04) !important;
}

.light-theme .onu-actions-subrow td {
  background: #f8fafc !important;
  border-bottom: 2px solid #0284c7 !important;
}

/* Loader Screen */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60%;
  gap: 16px;
}

.spinner {
  border: 4px solid rgba(16, 185, 129, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-left-color: var(--color-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Dashboard Metrics & Grid */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.view-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.view-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
}

.metric-details span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-details h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 4px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.metric-icon.success {
  background-color: rgba(19, 179, 127, 0.15);
  color: var(--color-success);
}
.metric-icon.danger {
  background-color: rgba(220, 57, 57, 0.15);
  color: var(--color-danger);
}
.metric-icon.warning {
  background-color: rgba(234, 145, 16, 0.15);
  color: var(--color-warning);
}
.metric-icon.info {
  background-color: rgba(90, 86, 224, 0.15);
  color: var(--color-info);
}

/* Charts & Logs section in Dashboard */
.dashboard-details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

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

.details-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.details-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.details-card-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.chart-container {
  height: 300px;
  position: relative;
}

/* Logs List */
.logs-list {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.log-item:last-child {
  border-bottom: none;
}

.log-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.log-badge.info { background-color: rgba(14, 165, 233, 0.1); color: var(--color-info); }
.log-badge.warning { background-color: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.log-badge.cmd { background-color: rgba(16, 185, 129, 0.1); color: var(--color-primary); }

.log-message {
  flex: 1;
  color: var(--text-main);
  word-break: break-all;
}

.log-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* 4. Buttons */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-success {
  background-color: var(--color-success);
  color: #fff;
}
.btn-success:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.btn-info {
  background-color: var(--color-info);
  color: #fff;
}
.btn-info:hover {
  background-color: #0284c7;
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--color-danger);
  color: #fff;
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-only:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-icon-only.danger:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Modern Pill Action Buttons for Tables */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  outline: none;
  text-decoration: none;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: #1e293b;
  color: #f8fafc;
  border-color: #475569;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn-icon:active {
  transform: translateY(0);
}

.btn-action-view,
.btn-icon.btn-action-view {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(14, 165, 233, 0.3) !important;
}
.btn-action-view:hover,
.btn-icon.btn-action-view:hover {
  background: rgba(14, 165, 233, 0.26) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4) !important;
  transform: translateY(-1.5px);
}

.btn-action-reboot,
.btn-icon.btn-action-reboot {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
.btn-action-reboot:hover,
.btn-icon.btn-action-reboot:hover {
  background: rgba(245, 158, 11, 0.26) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
  transform: translateY(-1.5px);
}

.btn-action-delete,
.btn-icon.btn-action-delete {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.btn-action-delete:hover,
.btn-icon.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.26) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4) !important;
  transform: translateY(-1.5px);
}

.btn-action-edit,
.btn-icon.btn-action-edit {
  background: rgba(168, 85, 247, 0.12) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}
.btn-action-edit:hover,
.btn-icon.btn-action-edit:hover {
  background: rgba(168, 85, 247, 0.26) !important;
  border-color: #a855f7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4) !important;
  transform: translateY(-1.5px);
}

.btn-action-success,
.btn-icon.btn-action-success {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}
.btn-action-success:hover,
.btn-icon.btn-action-success:hover {
  background: rgba(34, 197, 94, 0.26) !important;
  border-color: #22c55e !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4) !important;
  transform: translateY(-1.5px);
}

.btn-action-cyan,
.btn-icon.btn-action-cyan {
  background: rgba(6, 182, 212, 0.12) !important;
  color: #22d3ee !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}
.btn-action-cyan:hover,
.btn-icon.btn-action-cyan:hover {
  background: rgba(6, 182, 212, 0.26) !important;
  border-color: #06b6d4 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4) !important;
  transform: translateY(-1.5px);
}


/* 5. Custom Tables */
.table-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.table-controls {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 350px;
}

.search-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--color-primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.custom-table th {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

.custom-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge.active {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.badge.suspended {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.badge.connected {
  background-color: rgba(19, 179, 127, 0.2);
  color: #10b981;
  border: 1px solid rgba(19, 179, 127, 0.4);
}

.badge.disconnected {
  background-color: rgba(220, 57, 57, 0.2);
  color: #ef4444;
  border: 1px solid rgba(220, 57, 57, 0.4);
}

.badge.warning {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge.danger {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge.info {
  background-color: rgba(2, 132, 199, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

/* Actions cell */
.actions-cell {
  display: flex;
  gap: 8px;
}

/* Text status colors */
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }

/* 6. Modals (Glassmorphism & Overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-30px);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.light-theme .modal-card {
  background-color: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.15), 0 0 1px 1px rgba(0, 0, 0, 0.04);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-card.modal-lg {
  max-width: 820px;
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close,
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  padding: 0;
}

.modal-close:hover,
.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.modal-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.modal-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Forms styling inside modals */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--color-primary);
}

select option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

.form-row {
  display: flex;
  gap: 16px;
}

.col {
  flex: 1;
}

.col-8 { flex: 2; }
.col-4 { flex: 1; }

/* Terminal Logger inside Console Modal */
.terminal-log-box {
  background-color: #050811;
  border: 1px solid #111b33;
  border-radius: 8px;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: #10b981;
  height: 350px;
  overflow-y: auto;
  line-height: 1.5;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.terminal-line {
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.05);
  padding-bottom: 4px;
}

.terminal-time {
  color: #64748b;
  margin-right: 8px;
}

/* Empty State Styles */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Quick styles for OLTs/NAP/etc (Static visual mockups) */
.grid-cards-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.node-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.node-card-title h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.node-card-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.node-card-body strong {
  color: var(--text-main);
}

.node-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

/* Map Mock Container */
.map-mock-container {
  height: 450px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.map-background-mock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  background-image: radial-gradient(var(--text-main) 1px, transparent 0), radial-gradient(var(--text-main) 1px, transparent 0);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

.map-control-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--card-shadow);
  z-index: 10;
}

.map-control-btn {
  background: none;
  border: none;
  color: var(--text-main);
  padding: 8px;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.map-control-btn:hover {
  background-color: var(--bg-primary);
  color: var(--color-primary);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-toggle-btn {
    display: block;
  }
}

/* Sidebar Collapse Control styles */
.sidebar-collapse-container {
  padding: 16px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
  transition: justify-content var(--transition-speed);
}

.sidebar.collapsed .sidebar-collapse-container {
  justify-content: center;
}

.collapse-btn {
  background-color: rgba(255, 255, 255, 0.03);
  border: none;
  color: #8598a3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collapse-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: scale(1.05);
}

.direct-link {
  border-left: 3px solid transparent;
}

/* Three Columns Dashboard Layout matching screenshot */
.dashboard-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dashboard-columns-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.dashboard-col {
  display: flex;
  flex-direction: column;
}

.column-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.subcard {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--border-color);
}

.border-green {
  border-left-color: #13b37f !important;
}

.border-orange {
  border-left-color: #ea9110 !important;
}

.border-blue {
  border-left-color: #5a56e0 !important;
}

.border-red {
  border-left-color: #dc3939 !important;
}

.subcard-left {
  display: flex;
  flex-direction: column;
}

.subcard-left-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.subcard-icon-left {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subcard-content-right {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.subcard-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.subcard-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.subcard-right {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-right {
  text-align: right;
}

.text-green { color: #13b37f !important; }
.text-orange { color: #ea9110 !important; }
.text-blue { color: #5a56e0 !important; }
.text-red { color: #dc3939 !important; }

/* Traffic section style */
.dashboard-traffic-section {
  margin-top: 32px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.traffic-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .traffic-cards-grid {
    grid-template-columns: 1fr;
  }
}

.traffic-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 5px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.traffic-card-left {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.traffic-card-right {
  display: flex;
  flex-direction: column;
}

.traffic-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.traffic-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.submenu-mini-icon {
  margin-right: 10px;
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
  opacity: 0.8;
  transition: color 0.15s;
}

.badge-new-item {
  background-color: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
}


/* ========== PLAN DE INTERNET - Wispro Style ========== */

/* Tab bar */
.planes-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin: 18px 0 0 0;
  background: transparent;
}

.planes-tab {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-bottom: none;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 4px;
}

.planes-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.planes-tab.active {
  background: var(--bg-card);
  color: var(--color-primary);
  border-color: var(--border-color);
  border-bottom-color: var(--bg-card);
  margin-bottom: -2px;
  z-index: 1;
  position: relative;
}

/* Plan tab content */
.plan-tab-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 6px 6px 6px;
  padding: 16px;
}

/* Action bar above table */
.planes-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.planes-bulk-select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 0.85rem;
  min-width: 170px;
}

.planes-btn-ejecutar {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.planes-btn-ejecutar:hover { background: #16a34a; }

.planes-btn-nuevo {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s;
  white-space: nowrap;
}
.planes-btn-nuevo:hover { background: #16a34a; }

/* Table controls row */
.planes-table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.planes-per-page-select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.82rem;
}

.planes-ctrl-btn {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.planes-ctrl-btn:hover { background: var(--bg-hover); color: var(--text-main); }

.planes-search-global {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.85rem;
  width: 180px;
  outline: none;
}
.planes-search-global:focus { border-color: var(--color-primary); }

/* Data table */
.planes-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.planes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.planes-table .planes-thead-main th {
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.planes-table .planes-thead-filters th {
  background: var(--bg-secondary);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-color);
}

.col-filter {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.col-filter:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.col-filter::placeholder {
  color: var(--text-dim);
  opacity: 0.75;
}

.planes-table .planes-row td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.planes-table .planes-row:hover td {
  background: var(--bg-hover);
}

.planes-table .planes-row:last-child td {
  border-bottom: none;
}

.sort-icon {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Action buttons in table */
.planes-action-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.planes-action-btn:hover {
  transform: translateY(-1.5px);
}
.planes-action-btn.edit {
  background: rgba(14, 165, 233, 0.14);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.3);
}
.planes-action-btn.edit:hover {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}
.planes-action-btn.export {
  background: rgba(99, 102, 241, 0.14) !important;
  color: #6366f1 !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
}
.planes-action-btn.export:hover {
  background: #6366f1 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.planes-action-btn.config {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.3);
}
.planes-action-btn.config:hover {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.planes-action-btn.delete {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}
.planes-action-btn.delete:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

body:not(.light-theme) .planes-action-btn.edit {
  color: #38bdf8;
}
body:not(.light-theme) .planes-action-btn.export {
  color: #818cf8 !important;
}
body:not(.light-theme) .planes-action-btn.config {
  color: #fbbf24;
}
body:not(.light-theme) .planes-action-btn.delete {
  color: #f87171;
}

/* Pagination */
.planes-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 10px;
}

.planes-page-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.planes-page-btn {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.15s;
}
.planes-page-btn:hover:not(:disabled) { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.planes-page-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.planes-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Empty tab state */
.planes-empty-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

/* ========== ROUTER CONFIG - Wispro Style ========== */

/* ON/OFF Toggle button */
.wsp-toggle {
  position: relative;
  display: inline-block;
  width: 62px;
  height: 26px;
  border: 2px solid var(--border-color);
  border-radius: 100px;
  background-color: var(--bg-input);
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
  outline: none;
  font-size: 0;
  color: transparent;
  vertical-align: middle;
}

.wsp-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--text-muted);
  transition: transform 0.25s, background-color 0.25s;
  z-index: 2;
}

.wsp-toggle::before {
  content: 'OFF';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
  font-size: 0.65rem !important;
  font-weight: 800;
  color: var(--text-muted) !important;
  letter-spacing: 0.02em;
  transition: opacity 0.2s, color 0.2s;
  z-index: 1;
}

.wsp-toggle.on {
  background-color: var(--color-info);
  border-color: var(--color-info);
}

.wsp-toggle.on::after {
  transform: translateX(36px);
  background-color: #fff;
}

.wsp-toggle.on::before {
  content: 'ON';
  right: auto;
  left: 8px;
  color: #fff !important;
}

.wsp-toggle:hover {
  border-color: var(--text-muted);
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.wsp-toggle.on:hover {
  opacity: 0.9;
}

/* Router config modal tabs - Modern Cyber & Clean Light Theme Support */
.router-cfg-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 0 20px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.light-theme .router-cfg-tabs {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.dark-theme .router-cfg-tabs {
  background: #090d16;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.router-cfg-tab {
  padding: 9px 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.router-cfg-tab:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.dark-theme .router-cfg-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.router-cfg-tab.active {
  color: var(--color-primary);
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--color-primary);
  font-weight: 700;
}

.light-theme .router-cfg-tab.active {
  background: #ffffff;
  color: #0284c7;
  border-color: #e2e8f0 #e2e8f0 transparent #e2e8f0;
  border-bottom: 2px solid #0284c7;
  box-shadow: 0 -2px 6px rgba(15, 23, 42, 0.04);
}

.dark-theme .router-cfg-tab.active {
  background: #0e1526;
  color: #0284c7;
  border-color: rgba(56, 189, 248, 0.2) rgba(56, 189, 248, 0.2) transparent rgba(56, 189, 248, 0.2);
  border-bottom: 2px solid #0284c7;
  box-shadow: 0 -2px 10px rgba(0, 210, 255, 0.1);
}

/* Router config content area */
.router-cfg-content {
  max-height: 65vh;
  overflow-y: auto;
}

/* Field row: label + input side by side */
.rcfg-field-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.rcfg-label {
  min-width: 200px;
  max-width: 200px;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

.rcfg-input-wrap {
  flex: 1;
}

.rcfg-input {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.rcfg-input:focus {
  border-color: var(--color-primary);
}

.rcfg-select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.rcfg-icon-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 7px 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.rcfg-icon-btn:hover { background: var(--bg-hover); color: var(--text-main); }

/* Toggle switches grid */
.rcfg-toggles-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rcfg-toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}

.rcfg-toggle-row:last-child {
  border-bottom: none;
}

.rcfg-toggle-row label {
  min-width: 200px;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.rcfg-help-icon {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 3px;
  cursor: help;
}

/* ==========================================================================
   MATRIX CONTROL THEME EXTENSIONS (From Reference Palette)
   ========================================================================== */

/* Solid metric cards as seen in Matrix Control banner */
.metric-card-solid-blue {
  background: linear-gradient(135deg, #5b59e2, #4945c7) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(91, 89, 226, 0.35) !important;
}

.metric-card-solid-red {
  background: linear-gradient(135deg, #dd3c3c, #c52a2a) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(221, 60, 60, 0.35) !important;
}

.metric-card-solid-orange {
  background: linear-gradient(135deg, #ed9512, #d68007) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(237, 149, 18, 0.35) !important;
}

.metric-card-solid-green {
  background: linear-gradient(135deg, #15b37f, #0f966a) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(21, 179, 127, 0.35) !important;
}

/* Titles and labels inside solid cards */
.metric-card-solid-blue span,
.metric-card-solid-red span,
.metric-card-solid-orange span,
.metric-card-solid-green span {
  color: rgba(255, 255, 255, 0.82) !important;
}

.metric-card-solid-blue h3,
.metric-card-solid-red h3,
.metric-card-solid-orange h3,
.metric-card-solid-green h3 {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* Device pulse box styling */
.device-pulse-box {
  background: #030712 !important;
  border: 1px solid #162035 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
}

/* Light theme overrides for solid cards - softened pastel gradients, comfortable for eyes */
.light-theme .metric-card-solid-blue {
  background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2) !important;
}
.light-theme .metric-card-solid-red {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.2) !important;
}
.light-theme .metric-card-solid-orange {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2) !important;
}
.light-theme .metric-card-solid-green {
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.2) !important;
}
.light-theme .device-pulse-box {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

/* ==========================================================================
   LIGHT THEME OVERRIDES FOR DATA PANELS & ONUS AUTORIZADAS VIEW
   ========================================================================== */
.light-theme .view-header h2 {
  color: #1e293b !important;
}

/* Overriding dark inline panel backgrounds and borders */
.light-theme div[style*="background:#1e293b"],
.light-theme div[style*="background: #1e293b"],
.light-theme div[style*="background:#0f172a"],
.light-theme div[style*="background: #0f172a"],
.light-theme div[style*="background:#060913"],
.light-theme div[style*="background: #060913"],
.light-theme div[style*="background:#0d1322"],
.light-theme div[style*="background: #0d1322"] {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* Overriding inputs and selects inside panels */
.light-theme input[type="date"],
.light-theme input[type="text"],
.light-theme input[type="number"],
.light-theme select {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  color-scheme: light !important;
}

.light-theme input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none !important;
}

/* Table header in light theme */
.light-theme .custom-table thead tr,
.light-theme tr[style*="background:#0f172a"],
.light-theme tr[style*="background: #0f172a"] {
  background: #f1f5f9 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.light-theme .custom-table th,
.light-theme th[style*="color:#94a3b8"] {
  color: #475569 !important;
  background: #f1f5f9 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.light-theme .custom-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

.light-theme .custom-table tr:hover td {
  background-color: #f8fafc !important;
}

/* Action buttons in light theme tables */
.light-theme button[style*="background:#0f172a"],
.light-theme button[style*="background: #0f172a"] {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
.light-theme button[style*="background:#0f172a"]:hover,
.light-theme button[style*="background: #0f172a"]:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Popover column visibility in light theme */
.light-theme #onu-col-vis-popover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12) !important;
}
.light-theme #onu-col-vis-popover div[style*="color:#f8fafc"] {
  color: #0f172a !important;
}
.light-theme #onu-col-vis-popover label {
  color: #334155 !important;
}

/* Pagination info in light theme */
.light-theme #onu-aut-pagination-info,
.light-theme div[id*="pagination-info"] {
  color: #64748b !important;
}

/* Separator lines */
.light-theme div[style*="border-top:1px solid #334155"],
.light-theme div[style*="border-top: 1px solid #334155"] {
  border-top-color: #e2e8f0 !important;
}

.light-theme div[style*="border-top:1px dashed #334155"],
.light-theme div[style*="border-top: 1px dashed #334155"] {
  border-top-color: #cbd5e1 !important;
}

/* Light theme search wrapper inside table controls */
.light-theme input#search-onu-aut,
.light-theme input[id*="search-"] {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

/* OLT selector in light theme */
.light-theme select#sel-onu-aut-olt {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

/* Labels with muted color in dark mode */
.light-theme label[style*="color:#94a3b8"],
.light-theme label[style*="color: #94a3b8"] {
  color: #64748b !important;
}

/* ==========================================================================
   LIGHT THEME OVERRIDES FOR PLANES DE VELOCIDAD OLT
   ========================================================================== */
.light-theme div[style*="background:rgba(15,23,42"],
.light-theme div[style*="background: rgba(15,23,42"] {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
}

.light-theme thead[style*="background:rgba(255,255,255"],
.light-theme thead[style*="background: rgba(255,255,255"] {
  background: #f1f5f9 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.light-theme .table th,
.light-theme th[style*="color:#8598a3"] {
  color: #475569 !important;
  background: #f1f5f9 !important;
}

.light-theme tr[style*="border-bottom:1px solid rgba(255,255,255"],
.light-theme tr[style*="border-bottom: 1px solid rgba(255,255,255"] {
  border-bottom: 1px solid #e2e8f0 !important;
}

.light-theme #olt-plans-tbody td,
.light-theme #live-traffic-tbody td,
.light-theme #live-dba-tbody td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

.light-theme #olt-plans-tbody tr:hover,
.light-theme #live-traffic-tbody tr:hover,
.light-theme #live-dba-tbody tr:hover {
  background-color: #f8fafc !important;
}

.light-theme div[style*="color:#f8fafc"] {
  color: #1e293b !important;
}

.light-theme select#olt-plans-select {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

.light-theme div[style*="border-bottom:1px solid rgba(255,255,255"] {
  border-bottom-color: #e2e8f0 !important;
}

.light-theme button[style*="background:rgba(255,255,255,0.05)"] {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

/* ==========================================================================
   LIGHT THEME FOR ONU MODULES (AUTORIZADAS, SIN AUTORIZAR, PREAUTORIZAR)
   ========================================================================== */
.light-theme #table-onu-aut,
.light-theme #table-onu-unaut {
  background: #ffffff !important;
}

.light-theme #tbody-onu-aut tr,
.light-theme #tbody-onu-unaut tr {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.light-theme #tbody-onu-aut tr:hover,
.light-theme #tbody-onu-unaut tr:hover {
  background: #f8fafc !important;
}

.light-theme #tbody-onu-aut td,
.light-theme #tbody-onu-unaut td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

.light-theme .col-onu-client-name {
  color: #1e293b !important;
}

.col-onu-status {
  white-space: nowrap !important;
  text-align: center !important;
}

.col-onu-status span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}


.light-theme #form-preautorizar label {
  color: #1e293b !important;
}

.light-theme #form-preautorizar input,
.light-theme #form-preautorizar select {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

.light-theme .card[style*="background:var(--bg-card, #0f172a)"],
.light-theme .card[style*="background: var(--bg-card, #0f172a)"],
.light-theme div[style*="background:var(--bg-card, #0f172a)"],
.light-theme div[style*="background: var(--bg-card, #0f172a)"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}

/* ==========================================================================
   EXPANDABLE ONU SUB-ROW & ACTIONS ACCORDION
   ========================================================================== */
.onu-row-clickable {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.onu-row-clickable:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.onu-row-clickable.active-expanded {
  background: rgba(0, 189, 206, 0.09) !important;
  border-left: 3px solid #00bdce !important;
}

.onu-actions-subrow {
  background: #090f1d !important;
  border-bottom: 2px solid #00bdce !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4) !important;
}

.onu-actions-subrow td {
  padding: 10px 14px !important;
  border-top: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

.onu-subrow-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.onu-subrow-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.light-theme .onu-row-clickable:hover {
  background: #f1f5f9 !important;
}

.light-theme .onu-row-clickable.active-expanded {
  background: #e0f2fe !important;
  border-left: 3px solid #0284c7 !important;
}

.light-theme .onu-actions-subrow {
  background: #f8fafc !important;
  border-bottom: 2px solid #0284c7 !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.light-theme .onu-actions-subrow td {
  background: #f8fafc !important;
  border-top: 1px dashed #cbd5e1 !important;
  color: #1e293b !important;
}

.btn-expand-onu:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.light-theme .onu-actions-subrow .onu-subrow-info-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.light-theme .onu-actions-subrow .onu-subrow-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

.light-theme .onu-actions-subrow .onu-subrow-client-title {
  color: #0f172a !important;
}

/* Modern Pill Toggle Switch Styles */
.switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.switch-track:hover {
  filter: brightness(1.06);
}

.switch-track:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35);
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  pointer-events: none;
  display: block !important;
}

/* Bootstrap Switch Button Styles */
.bs-switch-btn {
  display: inline-flex;
  width: 56px;
  height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  font-family: sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  background: #ffffff;
  vertical-align: middle;
}

/* Digital Contracts & Signature Pad Styles */
.contract-wizard-progress {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}
.contract-step-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s ease;
}
.contract-step-dot.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}
.contract-step-dot.completed {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.signature-canvas-container {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background: #ffffff;
  padding: 8px;
  margin: 12px 0;
}
.signature-canvas-container canvas {
  width: 100%;
  height: 180px;
  background: #ffffff;
  border-radius: 8px;
  cursor: crosshair;
}
.contract-doc-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.02);
}
.contract-doc-dropzone:hover {
  border-color: var(--color-primary);
  background: rgba(56, 189, 248, 0.05);
}
.contract-doc-thumb {
  max-width: 100%;
  max-height: 140px;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid var(--border-color);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   GLOBAL FUTURISTIC & HIGH-TECH POLISH (DARK & LIGHT THEME UNIFIED)
   ========================================================================== */

/* Modern Cards & Containers */
.card, .table-card, .details-card, .metric-card {
  background: var(--bg-card, var(--bg-secondary)) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--card-shadow) !important;
  border-radius: 12px !important;
  backdrop-filter: blur(8px);
}

/* Futuristic Glow Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0369a1, #075985) !important;
  color: #e2e8f0 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(56, 189, 248, 0.18) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.18s ease !important;
}
.btn-primary:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(135deg, #075985, #0c4a6e) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45) !important;
  filter: none !important;
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.18s ease !important;
}
.btn-success:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(135deg, #047857, #065f46) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28) !important;
  filter: none !important;
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(225, 29, 72, 0.25) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.18s ease !important;
}
.btn-danger:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(135deg, #be123c, #9f1239) !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28) !important;
  filter: none !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
}

/* Form Controls & Inputs */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  padding: 9px 13px !important;
  transition: all 0.2s ease !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px var(--color-primary-light) !important;
  outline: none !important;
}

/* Unified Tables (No patch look) */
.custom-table, .table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.custom-table th, .table th {
  background: rgba(0, 0, 0, 0.2) !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.custom-table td, .table td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border-color-light) !important;
  color: var(--text-main) !important;
}

.custom-table tr:hover td, .table tbody tr:hover td {
  background: rgba(0, 210, 255, 0.03) !important;
}

/* Modals */
.modal-card {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
}

.modal-header {
  border-bottom: 1px solid var(--border-color) !important;
  padding: 18px 24px !important;
}

.modal-footer {
  border-top: 1px solid var(--border-color) !important;
  padding: 16px 24px !important;
}

/* Light Theme Perfection Overrides */
.light-theme .btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25) !important;
}
.light-theme .btn-secondary {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
.light-theme .btn-secondary:hover {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
}

.light-theme input[type="text"],
.light-theme input[type="password"],
.light-theme input[type="number"],
.light-theme input[type="email"],
.light-theme input[type="date"],
.light-theme select,
.light-theme textarea {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.light-theme .custom-table th,
.light-theme .table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.light-theme .custom-table td,
.light-theme .table td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

.light-theme .custom-table tr:hover td,
.light-theme .table tbody tr:hover td {
  background: #f8fafc !important;
}

.light-theme .modal-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

/* Light Theme Internet Plans (Planes de Internet) */
.light-theme .plan-tab-content {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}

.light-theme .planes-tab-bar {
  border-bottom: 2px solid #cbd5e1 !important;
}

.light-theme .planes-tab {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

.light-theme .planes-tab:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.light-theme .planes-tab.active {
  background: #ffffff !important;
  color: #0284c7 !important;
  border-color: #cbd5e1 !important;
  border-bottom-color: #ffffff !important;
}

.light-theme .planes-table-wrapper {
  border-color: #cbd5e1 !important;
}

.light-theme .planes-table .planes-thead-main th {
  background: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

.light-theme .planes-table .planes-thead-filters th {
  background: #ffffff !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

.light-theme .col-filter {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.light-theme .col-filter:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

.light-theme .planes-table .planes-row td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

.light-theme .planes-table .planes-row:hover td {
  background: #f1f5f9 !important;
}

.light-theme .planes-ctrl-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

.light-theme .planes-ctrl-btn:hover {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  border-color: #0284c7 !important;
}

.light-theme .planes-bulk-select,
.light-theme .planes-per-page-select,
.light-theme .planes-search-global {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.light-theme .planes-page-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

.light-theme .planes-page-btn:hover:not(:disabled) {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.light-theme .planes-page-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* ==========================================================================
   FIX ALL PATCHWORK IN DARK THEME (Overrides hardcoded white/light elements)
   ========================================================================== */
body:not(.light-theme) table.custom-table thead tr,
body:not(.light-theme) .table thead tr,
body:not(.light-theme) tr[style*="background:#f8fafc"],
body:not(.light-theme) tr[style*="background: #f8fafc"] {
  background: rgba(14, 21, 38, 0.95) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

body:not(.light-theme) table.custom-table th,
body:not(.light-theme) .table th,
body:not(.light-theme) th[style*="color:#64748b"] {
  background: transparent !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid var(--border-color) !important;
}

body:not(.light-theme) table.custom-table tbody tr,
body:not(.light-theme) .table tbody tr {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body:not(.light-theme) table.custom-table tbody tr:hover,
body:not(.light-theme) .table tbody tr:hover {
  background: rgba(0, 210, 255, 0.04) !important;
}

body:not(.light-theme) table.custom-table td,
body:not(.light-theme) .table td {
  color: #e2e8f0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Fix hardcoded light text / badges / buttons inside tables in dark mode */
body:not(.light-theme) td[style*="color:#334155"],
body:not(.light-theme) td[style*="color: #334155"],
body:not(.light-theme) div[style*="color:#1e293b"],
body:not(.light-theme) h4[style*="color:#1e293b"],
body:not(.light-theme) h4[style*="color: #1e293b"] {
  color: #f1f5f9 !important;
}

body:not(.light-theme) span[style*="background:#f1f5f9"],
body:not(.light-theme) span[style*="background: #f1f5f9"] {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body:not(.light-theme) span[style*="background:#e0f2fe"],
body:not(.light-theme) span[style*="background: #e0f2fe"] {
  background: rgba(0, 210, 255, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(0, 210, 255, 0.25) !important;
}

body:not(.light-theme) span[style*="background:#f3e8ff"],
body:not(.light-theme) span[style*="background: #f3e8ff"] {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
}

body:not(.light-theme) span[style*="background:#fef3c7"],
body:not(.light-theme) span[style*="background: #fef3c7"] {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

body:not(.light-theme) span[style*="background:#dcfce7"],
body:not(.light-theme) span[style*="background: #dcfce7"] {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

body:not(.light-theme) button[style*="background:#f8fafc"],
body:not(.light-theme) button[style*="background: #f8fafc"],
body:not(.light-theme) button[style*="background:#fff"],
body:not(.light-theme) button[style*="background: #fff"],
body:not(.light-theme) button[style*="background:#ffffff"],
body:not(.light-theme) button[style*="background: #ffffff"] {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body:not(.light-theme) div[style*="background:#f1f5f9"],
body:not(.light-theme) div[style*="background: #f1f5f9"] {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body:not(.light-theme) .table-controls {
  border-bottom: 1px solid var(--border-color) !important;
}

body:not(.light-theme) img[style*="background:#fff"],
body:not(.light-theme) img[style*="background: #fff"],
body:not(.light-theme) img[style*="background:#ffffff"],
body:not(.light-theme) img[style*="background: #ffffff"] {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body:not(.light-theme) .table-card {
  background: var(--bg-card, #0e1526) !important;
}

/* ==========================================================================
   HIGH-TECH SAAS DESIGN POLISH: TABS, INPUTS, SELECTS & MATRIXOLT
   ========================================================================== */

/* Modern Segmented Tabs Bar */
.tabs-container {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  background: rgba(10, 16, 32, 0.75) !important;
  border: 1px solid rgba(56, 189, 248, 0.15) !important;
  border-radius: 12px !important;
  margin-bottom: 24px !important;
  flex-wrap: wrap !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}
.light-theme .tabs-container {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Tab Action Buttons */
.olt-tab-btn, .tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 18px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--text-muted, #94a3b8) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
}
.olt-tab-btn:hover, .tab-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-1px);
}
.light-theme .olt-tab-btn:hover, .light-theme .tab-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
.olt-tab-btn.active, .tab-btn.active {
  color: #e2e8f0 !important;
  background: rgba(3, 105, 161, 0.16) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  box-shadow: none !important;
}
.light-theme .olt-tab-btn.active, .light-theme .tab-btn.active {
  color: #0284c7 !important;
  background: #ffffff !important;
  border: 1px solid #0284c7 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2) !important;
}

/* Stylized Select Controls (Eliminating ugly native Windows arrows) */
select, select.custom-input, .form-group select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: var(--bg-input, #0a1020) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300d2ff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 15px 15px !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}
.light-theme select, .light-theme select.custom-input, .light-theme .form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230284c7'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
}

/* Modern Form Labels */
.form-group label {
  font-size: 0.83rem !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  margin-bottom: 6px !important;
  text-transform: none !important;
  letter-spacing: 0.015em !important;
}
.light-theme .form-group label {
  color: #475569 !important;
}

/* Glassmorphic Enhanced Cards */
.card, .table-card, .details-card, .metric-card, .form-card {
  background: linear-gradient(145deg, rgba(17, 26, 48, 0.88), rgba(11, 17, 33, 0.96)) !important;
  border: 1px solid rgba(56, 189, 248, 0.15) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.55), 0 0 1px 1px rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(14px) !important;
}
.light-theme .card,
.light-theme .table-card,
.light-theme .details-card,
.light-theme .metric-card,
.light-theme .form-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(0, 0, 0, 0.04) !important;
}

/* MatrixOLT Subtabs Dark Integration (Chassis, Monitoring, Advanced) */
body:not(.light-theme) .olt-tab-content div[style*="background:#fff"],
body:not(.light-theme) .olt-tab-content div[style*="background: #fff"],
body:not(.light-theme) .olt-tab-content div[style*="background:#ffffff"],
body:not(.light-theme) .olt-tab-content div[style*="background: #ffffff"],
body:not(.light-theme) .olt-tab-content div[style*="background:#f8fafc"],
body:not(.light-theme) .olt-tab-content div[style*="background: #f8fafc"] {
  background: rgba(14, 21, 38, 0.95) !important;
  border-color: rgba(56, 189, 248, 0.15) !important;
  color: #f1f5f9 !important;
}

body:not(.light-theme) .olt-tab-content table th {
  background: rgba(8, 13, 25, 0.85) !important;
  color: var(--color-primary, #0284c7) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important;
}

body:not(.light-theme) .olt-tab-content table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #e2e8f0 !important;
}

body:not(.light-theme) .olt-tab-content label {
  color: #cbd5e1 !important;
}

/* Interactive Password Toggle Button */
.input-group-append .btn, div > button[title*="Contraseña"] {
  border-color: rgba(56, 189, 248, 0.18) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--color-primary, #0284c7) !important;
  transition: all 0.2s ease;
}
.input-group-append .btn:hover, div > button[title*="Contraseña"]:hover {
  background: rgba(0, 210, 255, 0.15) !important;
  color: #ffffff !important;
}

/* ============================================================
   ROUTER TOOLS MENU & TOOLBAR (MATRIXISP STYLE)
   ============================================================ */
.router-toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 16px;
}

.router-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.router-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #ffffff;
  user-select: none;
}

.router-tool-btn.btn-green { background: #10b981; }
.router-tool-btn.btn-green:hover { background: #059669; }

.router-tool-btn.btn-blue { background: #0284c7; }
.router-tool-btn.btn-blue:hover { background: #0369a1; }

.router-tool-btn.btn-cyan { background: #0891b2; }
.router-tool-btn.btn-cyan:hover { background: #0e7490; }

.router-tool-btn.btn-icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
}

/* Floating Tools Dropdown */
.router-tools-dropdown {
  position: fixed;
  z-index: 999999;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  min-width: 250px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-main);
  animation: fadeIn 0.12s ease;
}

.router-tools-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: background 0.12s;
  user-select: none;
}

.router-tools-item:hover {
  background: var(--bg-hover);
  color: var(--color-primary);
}

.router-tools-item i.menu-icon {
  width: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.router-tools-item:hover i.menu-icon {
  color: var(--color-primary);
}

.router-tools-item .arrow-right {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
}

/* Flyout Submenu */
.router-tools-has-sub:hover > .router-tools-sub {
  display: block;
}

.router-tools-sub {
  display: none;
  position: absolute;
  top: -4px;
  right: 100%;
  left: auto;
  margin-right: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  min-width: 230px;
  padding: 6px 0;
  z-index: 1000000;
  max-height: 80vh;
  overflow-y: auto;
}

.router-tools-dropdown.open-right .router-tools-sub {
  right: auto;
  left: 100%;
  margin-right: 0;
  margin-left: 4px;
}

.router-tools-dropdown.open-left .router-tools-sub {
  right: 100%;
  left: auto;
  margin-right: 4px;
  margin-left: 0;
}

/* ==========================================================================
   SAAS CLOUD SUBSCRIPTION & PLAN STYLING
   ========================================================================== */
.saas-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.saas-plan-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}
.saas-plan-badge.badge-full {
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #0284c7;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}
.saas-plan-badge.badge-ftth {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
.saas-plan-badge.badge-demo {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  animation: pulse-demo 2s infinite;
}
@keyframes pulse-demo {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Pantalla de Bloqueo por Vencimiento */
#saas-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.94);
  backdrop-filter: blur(10px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.saas-lock-card {
  background: #161f30;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(239, 68, 68, 0.15);
  animation: lock-slide 0.3s ease-out;
}
@keyframes lock-slide {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.saas-lock-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 30px;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}


/* Unified Project Cards & Surfaces (Executive Dark Tech) */
.card, .table-card, .details-card, .metric-card, .form-card, .subcard {
  background: linear-gradient(145deg, #0e172a, #0a1122) !important;
  border: 1px solid rgba(56, 189, 248, 0.11) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 0 1px 1px rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(10px) !important;
}

.subcard {
  padding: 16px 20px !important;
  margin-bottom: 12px !important;
  border-left-width: 4px !important;
}
.subcard.border-green, .border-green { border-left-color: #10b981 !important; }
.subcard.border-orange, .border-orange { border-left-color: #f59e0b !important; }
.subcard.border-blue, .border-blue { border-left-color: #0284c7 !important; }
.subcard.border-red, .border-red { border-left-color: #e11d48 !important; }

/* Refined Metric Icon Badges */
.metric-icon-badge, .badge-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.badge-icon-cyan {
  background: rgba(14, 165, 233, 0.12) !important;
  border: 1px solid rgba(14, 165, 233, 0.22) !important;
  color: #0ea5e9 !important;
}
.badge-icon-green {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.22) !important;
  color: #10b981 !important;
}
.badge-icon-orange {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.22) !important;
  color: #f59e0b !important;
}
.badge-icon-purple {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.22) !important;
  color: #a855f7 !important;
}

/* Global Tables Refinement */
.custom-table th, .table th {
  background: #080d1a !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 13px 18px !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.14) !important;
}
.custom-table td, .table td {
  padding: 13px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  color: #f1f5f9 !important;
  font-size: 0.88rem !important;
}
.custom-table tr:hover td, .table tbody tr:hover td {
  background: rgba(14, 165, 233, 0.035) !important;
}

/* Global Form Inputs Refinement */
input[type="text"], input[type="password"], input[type="number"], input[type="email"], select, textarea, .custom-input {
  background: #080d18 !important;
  border: 1px solid rgba(56, 189, 248, 0.14) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}
input:focus, select:focus, textarea:focus, .custom-input:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18) !important;
  outline: none !important;
  background: #0a1120 !important;
}


/* Subdued Matte Styling (Lower Brightness Calibration) */
.card, .table-card, .details-card, .metric-card, .form-card, .subcard {
  background: linear-gradient(145deg, #0c1322, #080e1a) !important;
  border: 1px solid rgba(56, 189, 248, 0.08) !important;
  box-shadow: 0 6px 20px -3px rgba(0, 0, 0, 0.55) !important;
}

.view-header h2 {
  color: #e2e8f0 !important;
  text-shadow: none !important;
}

.badge-icon-cyan {
  background: rgba(3, 105, 161, 0.12) !important;
  border: 1px solid rgba(3, 105, 161, 0.22) !important;
  color: #38bdf8 !important;
}

.badge-icon-green {
  background: rgba(5, 150, 105, 0.12) !important;
  border: 1px solid rgba(5, 150, 105, 0.22) !important;
  color: #10b981 !important;
}

.badge-icon-orange {
  background: rgba(217, 119, 6, 0.12) !important;
  border: 1px solid rgba(217, 119, 6, 0.22) !important;
  color: #f59e0b !important;
}

.badge-icon-purple {
  background: rgba(139, 92, 246, 0.12) !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
  color: #a78bfa !important;
}

/* Subdued Table Header */
.custom-table th, .table th {
  background: #060a14 !important;
  color: #7dd3fc !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1) !important;
}

.custom-table td, .table td {
  color: #cbd5e1 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}
