﻿/* Modern Tech App Styles */

/* Global scrollbar hiding */
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
  width: 0;
  height: 0;
}

/* Root variables for theming */
:root {
  /* Dark theme (default) - Black gradient palette with network grid */
  --bg-primary: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
  --bg-secondary: rgba(26, 26, 26, 0.4);
  --bg-card: rgba(40, 40, 40, 0.4);
  --border-primary: rgba(60, 60, 60, 0.4);
  --border-hover: rgba(80, 80, 80, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #b0b0b0;
  --button-bg: rgba(40, 40, 40, 0.5);
  --button-hover: rgba(60, 60, 60, 0.5);
  --topbar-bg: rgba(8,14,28,0.85);
  --sidebar-bg: rgba(8,14,28,0.85);
  --bottombar-bg: rgba(8,14,28,0.85);
  
  /* Contact card hover colors */
  --contact-hover-border: #ffffff;
  --contact-hover-shadow: rgba(255, 255, 255, 0.5);
  
  /* Layout dimensions */
  --top-bar-height: 120px;
  --bottom-bar-height: 50px;
  --bottom-spacing: 0px;
  --dashboard-container-padding: 32px;
  --classification-box-height: 60px; /* Approximate height with margins */
  --card-header-height: 60px;
  --section-box-margin-bottom: 25px; /* Negative margin to pull section boxes closer to bottom */
  
  /* Dynamic section box height calculation:
     100vh - top bar - bottom bar - bottom spacing - (container padding top + bottom) - classification box - card header
     This ensures the bottom of the section box is exactly 1px from the bottom bar */
  --section-box-height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height) - var(--bottom-spacing) - (var(--dashboard-container-padding) * 2) - var(--classification-box-height) - var(--card-header-height));
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: linear-gradient(135deg, #fefefe 0%, #f1f5f9 50%, #fefefe 100%);
  --bg-secondary: rgba(248, 250, 252, 0.9);
  --bg-card: rgba(248, 250, 252, 0.9);
  --border-primary: rgba(203, 213, 225, 0.4);
  --border-hover: rgba(148, 163, 184, 0.5);
  --text-primary: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --button-bg: rgba(241, 245, 249, 0.7);
  --button-hover: rgba(226, 232, 240, 0.8);
  --topbar-bg: rgba(248, 250, 252, 0.9);
  --sidebar-bg: rgba(248, 250, 252, 0.9);
  --bottombar-bg: rgba(248, 250, 252, 0.9);
}



/* Global styles */
* {
  box-sizing: border-box;
}

body.modern-tech-app {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Clean Background */
.background-elements {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 288px;
  right: 0;
  z-index: 50;
  background: rgba(8,14,28,0.85) !important;
  backdrop-filter: blur(30px);
  border-bottom: none !important;
  box-shadow: none;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 50px;
  margin-top: -2px;
  position: relative;
  min-height: 80px;
  height: 40%;
  line-height: 0;
}

.title-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 4%, rgba(255, 255, 255, 0.2) 96%, transparent 100%);
}

.title-logos-left {
  display: flex;
  align-items: center;
  gap: 0px;
  position: absolute;
  padding-left: 3px;
}

.logo-globe-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 130px;
  flex-shrink: 0;
  z-index: 10;
  position: relative;
  left: 0;
  padding-bottom: 0px;
  margin-bottom: -10px;
  margin-top: -10px;
  padding-top: 15px;
}

#logo-globe-canvas {
  width: 260px;
  height: 150px;
  display: block;
}

.title-logos-right {
  display: flex;
  align-items: center;
  gap: 0px;
  position: absolute;
  padding-right: 934px;
}

.title-logo {
  height: auto;
  object-fit: contain;
}

.title-logo-center {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 0;
  height: auto;
}

.title-logo-img {
  height: 74px;
  width: auto;
  max-width: 800px;
  object-fit: contain;
  image-rendering: auto;
  image-rendering: high-quality;
  transform: translateZ(0);
  filter: contrast(1.05) brightness(1.02);
  margin: 0;
  padding: 0;
  display: block;
  line-height: 0;
}

.title-logos {
  position: absolute;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.title-logos-left {
  position: absolute;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.title-logos-right {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.title-logo {
  height: 85px;
  width: auto;
  object-fit: contain;
  image-rendering: auto;
  image-rendering: high-quality;
  transform: translateZ(0);
  filter: contrast(1.05) brightness(1.02);
  transition: height 0.2s ease, transform 0.2s ease;
}

/* Individual logo size adjustments */
.logo-sco {
  height: 69px;
}

.logo-sco:hover {
  height: 110px;
  transform: translateY(20.5px);
  z-index: 100;
}

.logo-trmc {
  height: 69px;
}

.logo-trmc:hover {
  height: 110px;
  transform: translateY(20.5px);
  z-index: 100;
}

.logo-fe {
  height: 69px;
}

.logo-fe:hover {
  height: 110px;
  transform: translateY(20.5px);
  z-index: 100;
}

.logo-providence {
  height: 77px;
}

.logo-providence:hover {
  height: 110px;
  transform: translateY(16.5px);
  z-index: 100;
}

.main-title {
  font-size: 3.5rem;
  font-weight: bold;
  position: relative;
  display: inline-block;
  /* Dark mode default: white text with thin gray outline */
  color: #ffffff;
  -webkit-text-stroke: 0.5px #000000; /* thin black outline */
  margin: 0;
}

/* Overlay: sweeping darker band clipped to text */
.main-title::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  white-space: nowrap;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 42%,
    rgba(0,0,0,0.6) 50%,
    rgba(0,0,0,0) 58%,
    rgba(0,0,0,0) 100%
  );
  background-size: 300% 100%;
  animation: titleSweep 8s linear infinite;
  will-change: background-position;
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  mix-blend-mode: multiply;
}

/* Light mode title */
[data-theme="light"] .main-title {
  color: #000000; /* pure black text on light */
  -webkit-text-stroke: 0; /* remove outline in light */
}

[data-theme="light"] .main-title::after {
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 42%,
    rgba(0,0,0,0.7) 50%,
    rgba(0,0,0,0) 58%,
    rgba(0,0,0,0) 100%
  );
}

/* Title gradient sweep animation */
@keyframes titleSweep {
  0% {
    background-position: 84% 70%;
  }
  100% {
    background-position: 5% 50%;
  }
}

/* Respect user reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .main-title::after {
    animation: none;
  }
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 32px 5px 34px;
  height: 60px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  height: 44px;
  border-radius: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
}

/* Add vertical line divider between nav items */
.nav-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
}

/* Remove the divider on the right side of Web Links dropdown */
#external-links-btn::after {
  display: none;
}

/* Add vertical line divider on the right side of Web Links dropdown wrapper */
.nav-dropdown::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
}

/* Add vertical line divider on the left side of Dashboard tab */
.nav-item[data-page="dashboard"]::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
}

/* Make regular nav buttons same size as External Links, but don't change External Links itself */
.nav-item:not(#external-links-btn) {
  width: 160px;
  justify-content: center;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--button-hover);
  transform: scale(1.05);
}

@keyframes pulse-outline {
  0%, 100% {
    outline-color: rgba(192, 192, 192, 0.85);
  }
  50% {
    outline-color: silver;
  }
}

.nav-item.active {
  color: var(--text-primary);
  background: var(--button-bg);
  outline: 2px solid rgba(192, 192, 192, 0.8);
  outline-offset: 2px;
  animation: pulse-outline 2s ease-in-out infinite;
}

.nav-item i {
  width: 18px;
  height: 18px;
  color: #666666;
  opacity: 0.85;
}

/* Dropdown styles */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 5px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 5px;
  min-width: 165px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Specific alignment for external links dropdown */
#external-links-dropdown {
  left: -5px;
  right: 25px;
  opacity: 1.0;
  background-color: rgba(0, 0, 0, 0.9);
  border: 2px solid #c0c0c0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.dropdown-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.dropdown-item:hover {
  color: var(--text-primary);
  background: var(--button-hover);
}

/* Dropdown icon images for custom logos */
.dropdown-icon-img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex-shrink: 0;
}

.dropdown-section {
  padding: 8px;
}

.dropdown-section h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-option {
  padding: 6px 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-option:hover {
  color: var(--text-primary);
  background: var(--button-hover);
}

.theme-option.active {
  color: var(--text-primary);
  background: var(--button-bg);
}

/* Settings Title */
.settings-title {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
}

/* Settings Divider */
.settings-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 212, 255, 0.6) 15%, 
    rgba(0, 212, 255, 0.8) 30%, 
    rgba(255, 255, 255, 0.9) 50%, 
    rgba(0, 212, 255, 0.8) 70%, 
    rgba(0, 212, 255, 0.6) 85%, 
    transparent 100%);
  margin: 15px 0;
}

/* Light mode divider */
[data-theme="light"] .settings-divider {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 150, 200, 0.6) 15%, 
    rgba(0, 150, 200, 0.8) 30%, 
    rgba(0, 100, 150, 0.9) 50%, 
    rgba(0, 150, 200, 0.8) 70%, 
    rgba(0, 150, 200, 0.6) 85%, 
    transparent 100%);
}

/* Health Timer Chevron Buttons */
.health-timer-chevron {
  outline: none !important;
  box-shadow: none !important;
}

.health-timer-chevron:focus {
  outline: none !important;
  box-shadow: none !important;
}

.health-timer-chevron:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="light"] .health-timer-chevron:hover {
  background: rgba(0, 0, 0, 0.1) !important;
}

/* Settings Header Container */
.settings-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  height: auto;
}

.settings-header-container .settings-title {
  margin: 0;
  line-height: 36px; /* Match the height of the toggle button */
}

/* Settings Toggle Styles */
.settings-toggle {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid white;
  border-radius: 20px;
  padding: 2px;
  width: 80px;
  height: 36px;
}

.settings-toggle-btn {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  outline: none;
  font-size: 12px;
  color: white !important;
}

.settings-toggle-btn:focus {
  outline: none;
}

.settings-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px 0 0 16px; /* Rounded left, square right */
  transition: all 0.3s ease;
  z-index: 1;
}

.settings-toggle[data-active="off"] .settings-toggle-slider {
  transform: translateX(100%);
  border-radius: 0 16px 16px 0; /* Square left, rounded right */
}

/* Light mode settings toggle */
[data-theme="light"] .settings-toggle {
  border: 1px solid black;
}

[data-theme="light"] .settings-toggle-btn {
  color: black !important;
}

[data-theme="light"] .settings-toggle-slider {
  background: rgba(0, 0, 0, 0.15);
}

/* Email List Toggle Styles */
.email-list-toggle {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid white;
  border-radius: 20px;
  padding: 2px;
  width: 100%;
  height: 36px;
}

.email-list-toggle-btn {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  outline: none;
  font-size: 12px;
  font-weight: 600;
  color: white !important;
  white-space: nowrap;
  text-align: center;
}

.email-list-toggle-btn:focus {
  outline: none;
}

.email-list-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px 0 0 16px;
  transition: all 0.3s ease;
  z-index: 1;
}

.email-list-toggle[data-active="test"] .email-list-toggle-slider {
  transform: translateX(100%);
  border-radius: 0 16px 16px 0;
}

[data-theme="light"] .email-list-toggle {
  border: 1px solid black;
}

[data-theme="light"] .email-list-toggle-btn {
  color: black !important;
}

[data-theme="light"] .email-list-toggle-slider {
  background: rgba(0, 0, 0, 0.15);
}

/* Signal List Toggle Styles (3-button) */
.signal-distribution-section {
  padding: 12px 0;
}

.signal-list-toggle {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid white;
  border-radius: 20px;
  padding: 2px;
  width: 100%;
  height: 36px;
}

.signal-list-toggle-btn {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  outline: none;
  font-size: 12px;
  font-weight: 600;
  color: white !important;
  white-space: nowrap;
  text-align: center;
}

.signal-list-toggle-btn:focus {
  outline: none;
}

.signal-list-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(33.333% - 1.333px);
  height: calc(100% - 4px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  transition: all 0.3s ease;
  z-index: 1;
}

.signal-list-toggle[data-active="test"] .signal-list-toggle-slider {
  transform: translateX(100%);
}

.signal-list-toggle[data-active="control"] .signal-list-toggle-slider {
  transform: translateX(200%);
}

[data-theme="light"] .signal-list-toggle {
  border: 1px solid black;
}

[data-theme="light"] .signal-list-toggle-btn {
  color: black !important;
}

[data-theme="light"] .signal-list-toggle-slider {
  background: rgba(0, 0, 0, 0.15);
}

/* Signal list dropdown styling */
.signal-list-dropdown {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 12px;
}

.signal-list-dropdown:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Signal table styling */
.signal-table-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.signal-table {
  width: 100%;
  border-collapse: collapse;
}

.signal-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.signal-table tr:last-child td {
  border-bottom: none;
}

/* Notification section styling */
.notification-section {
  margin-bottom: 0;
}

.notification-section .settings-title {
  margin: 0 0 10px 0;
  line-height: normal;
}

/* Classification section styling */
.classification-section {
  margin-bottom: 0;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.classification-section .settings-title {
  margin: 0 !important;
  line-height: normal;
}

.classification-dropdown {
  position: relative;
}

.classification-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ffffff;
  background: var(--button-bg);
  color: var(--text-secondary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.classification-dropdown-btn:hover {
  color: var(--text-primary);
  background: var(--button-hover);
}

/* Classification button background colors */
.classification-dropdown-btn.classification-btn-viewall {
  background: #000000;
  color: #ffffff;
}

.classification-dropdown-btn.classification-btn-unclassified {
  background: #00AA00;
  color: #ffffff;
}

.classification-dropdown-btn.classification-btn-secret {
  background: #FF0000;
  color: #ffffff;
}

.classification-dropdown-btn.classification-btn-viewall:hover {
  background: #222222;
}

.classification-dropdown-btn.classification-btn-unclassified:hover {
  background: #008800;
}

.classification-dropdown-btn.classification-btn-secret:hover {
  background: #CC0000;
}

.classification-selected {
  color: inherit;
  font-weight: 500;
}

.classification-dropdown-btn.open .dropdown-chevron {
  transform: rotate(180deg);
}

.classification-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #000000;
  backdrop-filter: blur(12px);
  border: 2px solid #ffffff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
  opacity: 0.69;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.1s ease;
  z-index: 100;
  margin-top: 4px;
}

.classification-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.classification-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  margin-bottom: 2px;
  position: relative;
}

.classification-dropdown-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.classification-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--button-hover);
}

.classification-dropdown-item.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.notification-section .settings-title {
  margin: 0 0 10px 0;
  line-height: normal;
}

.notification-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

/* Edit notification button styling */
.edit-notification-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 80px;
  height: 36px;
  background: var(--bg-secondary);
  color: white;
  border: 1px solid white;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  padding: 6px;
}

.edit-notification-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.edit-notification-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(40, 167, 69, 0.2);
}

/* Test notification button styling */
.test-notification-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 80px;
  height: 36px;
  background: var(--bg-secondary);
  color: white;
  border: 1px solid white;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  padding: 2px;
}

.test-notification-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.test-notification-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 123, 255, 0.2);
}

.edit-notification-btn i {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  margin-left: 2px;
}

.test-notification-btn i {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.edit-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  font-size: 5px !important;
  font-weight: 500;
}

.edit-btn-text div {
  line-height: 1;
  white-space: nowrap;
}

.test-notification-btn span {
  font-weight: 500;
  font-size: 11px;
  white-space: nowrap;
  overflow: auto;
  text-overflow: ellipsis;
}

/* Light theme button styling */
[data-theme="light"] .edit-notification-btn,
[data-theme="light"] .test-notification-btn {
  border: 1px solid black;
  color: black;
}

/* New Theme Toggle Styles */
.theme-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  height: auto;
}

.theme-header-container h4 {
  margin: 0 !important;
  color: var(--text-primary) !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  line-height: 32px !important; /* Match the height of the toggle button */
}

.theme-toggle {
  margin: 0; /* Remove any default margins */
}

.theme-toggle {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid white;
  border-radius: 20px;
  padding: 2px;
  width: 80px;
  height: 36px;
}

.theme-toggle-btn {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  outline: none; /* Remove focus outline */
}

.theme-toggle-btn:first-child {
  border-radius: 18px 0 0 18px;
}

.theme-toggle-btn:last-child {
  border-radius: 0 18px 18px 0;
}

.theme-toggle-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.theme-toggle-btn:first-child.active {
  border-radius: 16px 0 0 16px;
}

.theme-toggle-btn:last-child.active {
  border-radius: 0 16px 16px 0;
}

[data-theme="light"] .theme-toggle-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.theme-toggle-btn:focus {
  outline: none; /* Remove focus outline */
}

.theme-toggle-btn i {
  width: 16px;
  height: 16px;
  color: white !important;
  fill: none !important;
  stroke: white !important;
  transition: all 0.3s ease;
}

.theme-toggle-btn.active i {
  color: white !important;
  fill: none !important;
  stroke: white !important;
}

/* Target SVG elements directly */
.theme-toggle-btn svg {
  color: white !important;
  fill: none !important;
  stroke: white !important;
}

/* Light mode - black outlines */
[data-theme="light"] .theme-toggle-btn i {
  color: black !important;
  fill: none !important;
  stroke: black !important;
}

[data-theme="light"] .theme-toggle-btn.active i {
  color: black !important;
  fill: none !important;
  stroke: black !important;
}

[data-theme="light"] .theme-toggle-btn svg {
  color: black !important;
  fill: none !important;
  stroke: black !important;
}

/* Light mode - black outer toggle outline */
[data-theme="light"] .theme-toggle {
  border: 1px solid black;
}

/* Add line divider between toggle buttons */
.theme-toggle-btn:first-child::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background-color: var(--border-primary);
  z-index: 3;
}

.theme-toggle-slider {
  display: none;
}

/* Contact filter styles */
.contact-filter-container {
  background: rgba(40, 40, 40, 0.2);
  border-radius: 8px 8px 0 0;
}

.contact-filter-toggle {
  display: flex;
  gap: 8px;
}

.contact-filter-btn {
  padding: 8px 16px;
  background: var(--button-bg);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-filter-btn:hover {
  color: var(--text-primary);
  background: var(--button-hover);
  border-color: var(--border-hover);
}

.contact-filter-btn.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.dropdown-toggle.active .dropdown-icon {
  transform: rotate(180deg);
}

/* Action buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--button-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

#user-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  z-index: 99999 !important;
  will-change: transform;
}

#user-btn i {
  width: 28px;
  height: 28px;
}

.user-type-indicator {
  position: absolute;
  right: 57px;
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 57px 10px 7px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  z-index: 1000 !important;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.user-type-indicator.show {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#user-type-text {
  font-size: 14px;
  font-weight: 600;
}

.user-type-logout-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -5px;
}

.user-type-logout-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4));
  border-color: rgba(255, 255, 255, 0.6);
}

#notification-btn {
  width: auto;
  padding: 0;
  gap: 0;
}

#notification-btn:hover {
  transform: none;
  background: var(--button-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bell-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 100%;
  border-radius: 12px 0 0 12px;
  transition: all 0.2s ease;
}

/* Red background for new alerts */
.bell-icon-wrapper.has-new-alerts {
  background: rgba(220, 38, 38, 0.8);
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% {
    background: rgba(220, 38, 38, 0.8);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  50% {
    background: rgba(220, 38, 38, 1);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
  }
}

.bell-icon-wrapper:hover {
  background: var(--button-hover);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Override hover when there are new alerts */
.bell-icon-wrapper.has-new-alerts:hover {
  background: rgba(220, 38, 38, 0.9);
  animation: none;
}

.bell-icon-wrapper i {
  width: 20px;
  height: 20px;
}

.bell-icon-wrapper:hover i {
  color: var(--text-primary);
  transform: scale(1.1);
}

.action-btn:focus {
  outline: none;
}

.action-btn:hover {
  color: var(--text-primary);
  background: var(--button-hover);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.action-btn i {
  width: 20px;
  height: 20px;
  color: black;
  opacity: 1;
}

/* Bell icon specific tooltip */
#notification-btn::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 10px);
  right: calc(100% - 20px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1001;
}

#notification-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Hide default browser tooltip for notification button */
#notification-btn {
  position: relative;
}

#notification-btn[title]:hover::before {
  content: none;
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
  z-index: 1000;
  opacity: 1;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  min-width: 1100px;
  max-width: 1200px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
}

.notification-dropdown::-webkit-scrollbar {
  width: 8px;
}

.notification-dropdown::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.5);
  border-radius: 4px;
}

.notification-dropdown::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 100, 0.7);
  border-radius: 4px;
}

.notification-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(130, 130, 130, 0.9);
}

.notification-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hold countdown styling in notification table */
.hold-countdown {
  color: var(--text-secondary);
  font-size: 0.85em;
  font-weight: normal;
}

/* Send Alert Settings info icons - force ghost white */
.send-alert-info-icon svg {
  stroke: ghostwhite !important;
  color: ghostwhite !important;
}

/* Comic book style speech bubble tooltip - handled by JavaScript now */
.send-alert-info-icon {
  position: relative;
  overflow: visible !important;
}

.send-alert-info-icon::before,
.send-alert-info-icon::after {
  display: none !important;
}

/* Timeout List Table scrollbar styling - external scrollbar */
.timeout-list-table-container {
  scrollbar-width: none; /* Firefox - hide native scrollbar */
  -ms-overflow-style: none; /* IE/Edge - hide native scrollbar */
}

.timeout-list-table-container::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari - hide native scrollbar */
}

/* External scrollbar track - always visible */
.timeout-list-scrollbar-track {
  position: relative;
  background: transparent;
  border-radius: 4px;
}

.timeout-list-scrollbar-track::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: var(--thumb-height, 100%);
  top: var(--thumb-top, 0);
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.timeout-list-table-container:hover ~ .timeout-list-scrollbar-track::after {
  background: ghostwhite;
}

.timeout-list-scrollbar-track:hover::after {
  background: #ffffff !important;
}

/* Disabled Alert List Table scrollbar styling - external scrollbar */
.disabled-alert-list-table-container {
  scrollbar-width: none; /* Firefox - hide native scrollbar */
  -ms-overflow-style: none; /* IE/Edge - hide native scrollbar */
}

.disabled-alert-list-table-container::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari - hide native scrollbar */
}

/* External scrollbar track - always visible */
.disabled-alert-list-scrollbar-track {
  position: relative;
  background: transparent;
  border-radius: 4px;
}

.disabled-alert-list-scrollbar-track::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: var(--thumb-height, 100%);
  top: var(--thumb-top, 0);
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.disabled-alert-list-table-container:hover ~ .disabled-alert-list-scrollbar-track::after {
  background: ghostwhite;
}

.disabled-alert-list-scrollbar-track:hover::after {
  background: #ffffff !important;
}

/* Notification divider inside button */
.notification-divider {
  width: 3px;
  height: 100%;
  background: var(--border-primary);
  margin: 0 8px 0 0;
}

/* Stacked mini status icons */
.notification-status-icons {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 0 0;
}

.mini-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.mini-status-icon i {
  width: 12px;
  height: 12px;
}

.notification-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
  border: 2px solid silver;
  table-layout: fixed;
}

.notification-table-header {
  border-bottom: none; /* Remove bottom border since data table is below */
}

.notification-table-body-wrapper {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  border-bottom: 2px solid silver;
  scrollbar-width: none; /* Firefox - hide scrollbar */
  -ms-overflow-style: none; /* IE and Edge - hide scrollbar */
  border: 2px solid white;
  border-top: none; /* Remove top border so it connects with header */
}

/* Webkit browsers (Chrome, Safari, Edge) - hide scrollbar but keep functionality */
.notification-table-body-wrapper::-webkit-scrollbar {
  width: 0px;
  display: none;
}

.notification-table-body {
  border: none;
  border-bottom: none;
  width: 100%;
  table-layout: fixed;
}

.notification-header {
  background: var(--accent-blue);
  color: white;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 1.9rem;
  border-bottom: 1px solid var(--border-primary);
}

.notification-columns th {
  background: rgba(60, 60, 60, 0.6);
  color: var(--text-primary);
  padding: 18px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-primary);
}

.notification-columns th:first-child {
  text-align: left;
  padding-left: 16px;
}

.notification-columns th:last-child {
  text-align: right;
  padding-right: 16px;
}

.notification-table tbody tr {
  border-bottom: 1px solid var(--border-primary);
  height: 72px;
}

.notification-table tbody tr:last-child {
  border-bottom: 2px solid silver;
}

.notification-table tbody td {
  padding: 12px 16px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.85rem;
  vertical-align: middle;
  line-height: 1.4;
  max-height: 72px;
  overflow: hidden;
  white-space: nowrap;
}

.notification-table tbody td:first-child {
  text-align: left;
  padding-left: 16px;
}

.notification-table tbody td:last-child {
  text-align: right;
  padding-right: 16px;
}

.notification-status-dot {
  width: 12px;
  height: 12px;
  background: rgba(150, 150, 150, 0.5);
  border-radius: 50%;
  margin: 0 auto;
}

.notification-status-dot.status-sent {
  background: rgba(0, 255, 0, 0.7);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.notification-status-dot.status-pending {
  background: rgba(255, 165, 0, 0.7);
  box-shadow: 0 0 8px rgba(255, 165, 0, 0.5);
}

.notification-table tbody tr:hover {
  background: rgba(60, 60, 60, 0.9);
}

/* Highlight new alerts that haven't been seen */
.notification-table tbody tr.new-alert-row {
  background: rgba(255, 200, 0, 0.15);
  border-left: 4px solid rgba(255, 200, 0, 0.8);
}

.notification-table tbody tr.new-alert-row:hover {
  background: rgba(255, 200, 0, 0.25);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 288px;
  height: 100vh;
  background: transparent;
  z-index: 100;
  overflow-y: auto;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar:hover {
  scrollbar-color: ghostwhite transparent;
}

/* Webkit scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background: ghostwhite !important;
}

.sidebar:hover::-webkit-scrollbar-thumb:hover {
  background: #e0e0e0 !important;
}

.sidebar-content {
  height: 100%;
  background: var(--sidebar-bg);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(228, 221, 221, 0.3);
  padding: 8px 0 50px 20px; /* No right padding - scrollbar touches edge */
  overflow-y: auto;
  overflow-x: visible;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar-content:hover {
  scrollbar-color: ghostwhite transparent;
}

/* Webkit scrollbar for sidebar-content */
.sidebar-content::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}

.sidebar-content:hover::-webkit-scrollbar-thumb {
  background: ghostwhite !important;
}

.sidebar-content:hover::-webkit-scrollbar-thumb:hover {
  background: #e0e0e0 !important;
}

/* Classification badge container in sidebar */
.classification-badge-container {
  padding: 15px 20px 10px 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%) 1;
  margin-top: 20px;
  /* Position so top border aligns with bottom of nav-bar */
  position: relative;
  top: 0;
}

.classification-badge-container .classification-badge {
  width: 100%;
}

.location-section h3 {
  margin: 2px 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.location-dropdown {
  position: relative;
  margin-bottom: 5px;
  margin-right: 20px;
}

.location-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  margin: 10px 20px -2px 5px;
}

.location-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 13px 7px 9px;
  border: none;
  background: var(--button-bg);
  color: var(--text-secondary);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  outline: 1px solid #333;
}

.location-selected-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.location-selected {
  flex: 1;
}

.location-dropdown-btn:hover {
  color: var(--text-primary);
  background: var(--button-hover);
  outline: 1px solid silver;
  outline-offset: -1px;
}

.location-selected {
  color: var(--text-primary);
  font-weight: 500;
}

.dropdown-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.location-dropdown-btn.open .dropdown-chevron {
  transform: rotate(180deg);
}

.location-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #000000;
  backdrop-filter: blur(12px);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
  margin-top: 4px;
}

.location-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  border-color: silver;
}

.location-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  margin-bottom: 2px;
  border-bottom: 1px solid #333;
}

.location-dropdown-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.location-dropdown-item:last-child {
  border-bottom: none;
}

.location-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--button-hover);
}

.location-dropdown-item.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Device Locations Section */
.device-locations-section {
  margin-top: 8px;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.device-locations-list {
  background: transparent;
  padding: 0 10px 0 0; /* Right padding between boxes and scrollbar to align with dropdown */
  flex: 1;
  overflow-y: scroll; /* Always show scrollbar to reserve space for consistent width */
  overflow-x: visible;
  /* Firefox scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.device-locations-list:hover {
  scrollbar-color: ghostwhite transparent;
}

/* Webkit (Chrome/Safari) scrollbar styling for sidebar */
.device-locations-list::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}

.device-locations-list::-webkit-scrollbar-track {
  background: transparent;
}

.device-locations-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}

.device-locations-list:hover::-webkit-scrollbar-thumb {
  background: ghostwhite !important;
}

.device-locations-list:hover::-webkit-scrollbar-thumb:hover {
  background: #e0e0e0 !important;
}

/* Crestview-specific alignment - align with dropdown menu */
.device-locations-list[data-location="crestview"] {
  padding: 0 10px 0 0;
}

/* QRI Logo at bottom of sidebar */
.sidebar-qri-logo {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 24px;
  z-index: 1;
}

.qri-logo-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  margin: 0 5px 10px 5px;
}

.qri-logo-img {
  max-width: 80%;
  max-height: 40px;
  height: auto;
  opacity: 0.6;
}

.device-location-wrapper {
  margin-bottom: 2px;
}

.device-location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  outline: none;
}

.device-location-item:focus {
  outline: none;
  box-shadow: none;
}

.device-location-item:hover {
  background: rgba(255, 255, 255, 0.05);
  outline: 1px solid silver;
  outline-offset: -1px;
}

.device-location-item.active {
  background: transparent;
}

.device-location-item.active:hover {
  background: rgba(255, 255, 255, 0.05);
}

.device-location-item .location-name {
  flex: 1;
  text-align: left;
  padding-left: 0;
}

.device-location-item .toggle-icon {
  margin-left: auto;
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.device-location-item.active .toggle-icon {
  opacity: 0;
}

.device-location-item.active:hover .toggle-icon {
  opacity: 1;
}

.device-location-content {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 0;
  margin-top: 4px;
  margin-bottom: 0;
  display: none;
  transition: all 0.3s ease;
  overflow: visible;
}

.device-location-item:hover + .device-location-content {
  border-color: silver;
}

.device-location-content .content-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
}

.device-location-content .device-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  margin: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0;
  border-left: 3px solid var(--accent-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
}

.device-location-content .device-item:last-child {
  border-bottom: none;
}

.device-location-content .device-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-cyan);
  outline: 1px solid white;
  outline-offset: -1px;
}

.device-location-content .device-item.device-item-selected {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border-left-color: var(--accent-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
  font-weight: 600;
}

.device-location-content .device-item.device-item-selected:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4));
}

.device-location-content .device-item:first-child:hover {
  border-radius: 8px 8px 0 0;
}

.device-location-content .device-item:last-child:hover {
  border-radius: 0 0 8px 8px;
}

.device-location-content .device-item:only-child:hover {
  border-radius: 8px;
}

.device-location-content .device-item .device-type-icon-wrapper {
  display: inline-flex;
  cursor: pointer;
}

.device-location-content .device-item .device-type-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  margin-right: 8px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.device-location-content .device-item:hover .device-type-icon {
  color: var(--accent-cyan);
}

.device-location-content .device-item .device-name {
  flex: 1;
  margin-right: 8px;
}

.device-location-content .device-item .device-power-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: -2.5px;
}

.device-location-content .device-item .device-bell-off-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
}

.device-location-content .device-item .device-bell-off-icon {
  width: 14px;
  height: 14px;
  color: #000000;
  flex-shrink: 0;
  stroke-width: 2.5px;
  fill: none;
}

.device-location-content .device-item:hover .device-bell-off-icon {
  color: #000000;
}

/* Telemetry table label cells with bell icons - align bell to right */
.telemetry-label-with-bell {
  position: relative;
  padding-right: 28px !important;
  cursor: context-menu;
}

.telemetry-label-with-bell .telemetry-bell-icon {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity 0.2s ease;
  color: #FFFFFF !important;
  width: 16px !important;
  height: 16px !important;
  padding: 4px;
  box-sizing: content-box;
}

.telemetry-label-with-bell .telemetry-bell-icon:hover {
  opacity: 0.7;
  color: #FFFFFF !important;
}

.device-location-content .device-item .device-power-icon {
  width: 22px;
  height: 22px;
  color: rgba(255, 0, 0, 0.6);
  transition: all 0.2s ease;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 4px 1px 1px 1px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  stroke-width: 5px;
}

.device-location-content .device-item:hover .device-power-icon {
  color: var(--accent-cyan);
  transform: scale(1.1);
}

/* Status-based background colors for power icons */
.device-location-content .device-item .device-power-icon.status-off {
  background-color: rgba(255, 0, 0, 0.9);
  color: rgba(255, 255, 255, 0.9);
  animation: powerGlow 10s ease-in-out infinite;
}

@keyframes powerGlow {
  50%, 8% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
  }
  40% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.5);
  }
}

.device-location-content .device-item .device-power-icon.status-warning {
  background-color: rgba(255, 255, 0, 0.75);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.device-location-content .device-item .device-power-icon.status-warning::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(
    from -90deg at 50% 50%,
    rgba(255, 0, 0, 0.75) 0deg,
    rgba(255, 0, 0, 0.75) 0deg,
    transparent 0deg,
    transparent 360deg
  );
  border-radius: 50%;
  animation: timerPieSweep 120s linear infinite;
}

@keyframes timerPieSweep {
  0% {
    background: conic-gradient(
      from -90deg at 50% 50%,
      rgba(255, 0, 0, 0.75) 0deg,
      transparent 0deg
    );
  }
  100% {
    background: conic-gradient(
      from -90deg at 50% 50%,
      rgba(255, 0, 0, 0.75) 360deg,
      transparent 360deg
    );
  }
}

.device-location-content .device-item .device-power-icon.status-on {
  background-color: rgba(0, 180, 0, 0.9);
  color: rgba(255, 255, 255, 0.9);
}

.device-location-content .device-item .device-power-icon.status-timewarning {
  background-color: lightblue;
  color: rgba(255, 255, 255, 0.9);
}

.device-location-content .device-item .device-power-icon.status-timeerror {
  background-color: rgba(0, 100, 255, 1);
  color: rgba(255, 255, 255, 0.9);
}

.device-location-content .device-item .device-power-icon.status-unknown {
  background-color: rgba(128, 128, 128, 0.7);
  color: rgba(255, 255, 255, 0.85);
}

.device-location-content .device-item:hover .device-power-icon.status-off {
  background-color: rgba(255, 0, 0, 1);
}

.device-location-content .device-item:hover .device-power-icon.status-warning {
  background-color: rgba(255, 255, 0, 0.75);
}

.device-location-content .device-item:hover .device-power-icon.status-on {
  background-color: rgba(0, 180, 0, 0.9);
}

/* Bell-off icon inside colored circle - black stroke */
.device-location-content .device-item .device-power-icon.bell-off-inside {
  color: #000000 !important;
}

.device-location-content .device-item:hover .device-power-icon.bell-off-inside {
  color: #000000 !important;
}

/* Device Context Menu */
.device-context-menu {
  position: fixed;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 4px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 150px;
}

.device-context-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.device-context-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.device-context-menu-item i {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--text-secondary);
}

.device-context-menu-item:hover i {
  color: var(--accent-cyan);
}

.device-location-content .device-item:hover .device-power-icon.status-error {
  background-color: rgba(66, 165, 245, 0.8);
}

.device-location-content .device-item:hover .device-power-icon.status-unknown {
  background-color: rgba(128, 128, 128, 0.9);
}

/* Guest user disabled device items */
.device-location-content .device-item.guest-disabled {
  cursor: default;
}

/* Guest user icon cursor overrides */
.device-location-content .device-item.guest-disabled .device-type-icon-wrapper {
  cursor: default;
}

.device-location-content .device-item.guest-disabled .device-power-icon-wrapper {
  cursor: default;
}

/* Allow hover effects for guest users - maintain visual feedback */
.device-location-content .device-item.guest-disabled:hover {
  background-color: rgba(40, 50, 60, 0.6);
  border-radius: 4px;
}

.device-location-content .device-item.guest-disabled:hover .device-type-icon {
  color: var(--accent-cyan);
}

.device-location-content .device-item.guest-disabled:hover .device-power-icon {
  color: var(--accent-cyan);
}

.device-location-content .no-devices {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 10px;
}

.device-location-wrapper:last-child {
  margin-bottom: 0;
}

.device-location-item:last-child {
  margin-bottom: 0;
}

.device-locations-list .loading-message,
.device-locations-list .no-data-message,
.device-locations-list .error-message {
  padding: 10px 0;
  text-align: left;
  color: var(--text-secondary);
  font-size: 12px;
  font-style: italic;
}

.device-locations-list .error-message {
  color: #ef4444;
}


/* Scrollbar always visible but transparent when not scrollable/hovered */
.device-locations-list::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}
.device-locations-list::-webkit-scrollbar-track {
  background: transparent;
}
.device-locations-list::-webkit-scrollbar-thumb {
  background: transparent; /* Transparent by default */
  border-radius: 3px;
  transition: background 0.2s ease;
}
.device-locations-list::-webkit-scrollbar-button {
  display: none;
}
/* Show scrollbar thumb on hover - ghost white */
.sidebar:hover .device-locations-list::-webkit-scrollbar-thumb,
.sidebar-content:hover .device-locations-list::-webkit-scrollbar-thumb,
.device-locations-list:hover::-webkit-scrollbar-thumb {
  background: ghostwhite !important;
}
.sidebar:hover .device-locations-list::-webkit-scrollbar-thumb:hover,
.sidebar-content:hover .device-locations-list::-webkit-scrollbar-thumb:hover,
.device-locations-list:hover::-webkit-scrollbar-thumb:hover {
  background: #e0e0e0 !important;
}
/* Firefox - always show scrollbar track, thumb only when scrollable */
.device-locations-list {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent; /* Hidden by default */
}
.sidebar:hover .device-locations-list.has-overflow,
.device-locations-list.has-overflow:hover {
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}


/* Bottom Bar */
.bottom-bar {
  position: fixed;
  bottom: 0 !important;
  left: 288px;
  right: 0;
  top: auto !important;
  z-index: 50;
  background: var(--bottombar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(228, 221, 221, 0.3);
  padding: 0px 25px 0 10px;
  height: 63px;
  display: flex;
  align-items: center;
}

/* Forecast Popup */
.forecast-popup {
  position: fixed;
  bottom: 63px;
  left: 288px;
  right: 0;
  height: 120px;
  background: #000000;
  backdrop-filter: blur(12px);
  border-top: 4px solid rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border-primary);
  padding: 0 32px;
  z-index: 49;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: all 0.4s ease;
  box-shadow: 0 -4px 8px rgba(255, 255, 255, 0.1);
}

.forecast-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.forecast-popup-content {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  height: 100%;
}

.forecast-city-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  padding-right: 24px;
  position: relative;
  height: 100%;
}

.forecast-city-info::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.2) 80%, transparent 100%);
}

.forecast-city-flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.forecast-city-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.forecast-days-container {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 20px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 200px;
  height: 100%;
  gap: 0;
  padding: 8px 0;
}

/* Forecast line base styles - monospace for alignment */
.forecast-line {
  font-family: 'Courier New', 'Monaco', 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.4;
}

/* Date line: Day of week, yyyy-mm-dd */
.forecast-line-date {
  font-weight: 500;
}

/* Condition line: icon + condition text */
.forecast-line-condition {
  display: flex;
  align-items: center;
  gap: 0;
}

.forecast-condition-icon {
  width: 13px;
  height: 13px;
  color: var(--text-primary);
  flex-shrink: 0;
  margin-right: 6px;
}

.forecast-condition-text {
  font-weight: 400;
}

/* Temperature lines: H: and L: */
.forecast-line-temp {
  font-weight: 400;
}

/* Legacy styles - keep for compatibility */
.forecast-day-header {
  display: flex;
  align-items: center;
  gap: 0;
}

.forecast-day-icon {
  width: 1.2em;
  height: 1.2em;
  color: var(--text-primary);
  flex-shrink: 0;
}

.forecast-day-date {
  font-size: 11px;
  color: var(--text-primary);
  white-space: nowrap;
  margin-left: 0.5em;
}

.forecast-day-temps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  font-size: 11px;
}

.forecast-temp-high,
.forecast-temp-low {
  color: var(--text-primary);
  font-weight: normal;
  font-family: 'Courier New', 'Monaco', 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  letter-spacing: 0;
  white-space: pre;
}

.bottom-bar .navbar {
  background: none !important;
  border: none;
  padding: 0;
  margin: 0;
}

.time-weather-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 100%;
  padding-left: 0;
  padding-right: 20px;
  flex: 1;
  max-width: calc(100% - 100px);
}

.time-zone {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  height: 100%;
}

.timezone-flag-container {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timezone-flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  filter: brightness(1);
  opacity: 1;
}

/* 3D Earth Canvas */
#earth-canvas {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  background: transparent;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.timezone-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  justify-content: center;
  height: 100%;
}

.timezone-weather {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  justify-content: center;
}

.weather-icon {
  display: flex;
  align-items: center;
  color: var(--text-primary);
}

/* Data Transfer Dataset Buttons */
.dataset-btn {
  width: 100%;
  padding: 12px 16px 12px 12px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dataset-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 0;
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.dataset-btn:hover {
  background: rgba(90, 90, 90, 0.25);
}

.dataset-btn:hover::after {
  border-color: #666;
}

.dataset-btn.active::after {
  border-color: #c0c0c0;
}

.dataset-btn:focus,
.dataset-btn:focus-visible {
  outline: none;
}

.dataset-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dataset-type-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(200, 200, 200, 0.85);
}

.dataset-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dataset-btn:hover .dataset-icon-container,
.dataset-btn.active .dataset-icon-container {
  opacity: 1;
}

.dataset-icon {
  width: 18px;
  height: 18px;
}

/* Data Logs Folder Button Styles */
.datalogs-folder-btn {
  width: 100%;
  padding: 12px 16px 12px 12px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.datalogs-folder-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 0;
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.datalogs-folder-btn:hover {
  background: rgba(90, 90, 90, 0.25);
}

.datalogs-folder-btn:hover::after {
  border-color: #666;
}

.datalogs-folder-btn.active::after {
  border-color: #c0c0c0;
}

.datalogs-folder-btn:focus,
.datalogs-folder-btn:focus-visible {
  outline: none;
}

.folder-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-label::before {
  content: 'ðŸ“';
  font-size: 0.9em;
  vertical-align: middle;
}

.folder-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.datalogs-folder-btn:hover .folder-icon-container,
.datalogs-folder-btn.active .folder-icon-container {
  opacity: 1;
}

.folder-icon {
  width: 18px;
  height: 18px;
}

.dataquery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  width: 100%;
}

.dataquery-placeholder-text {
  margin: 0;
  color: var(--text-secondary);
  text-align: center;
}

.dataquery-charts-root {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  width: 100%;
  height: calc(100vh - 550px);
  min-height: 280px;
  max-height: 450px;
  padding: 12px 6px 0px 6px;
  box-sizing: border-box;
  overflow: hidden;
}

.dataquery-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(100px, 1fr));
  gap: 6px;
  width: 100%;
  height: 100%;
  flex: 1;
}

.dataquery-chart-card {
  background: rgba(10, 12, 20, 0.75);
  border: 1px solid rgba(90, 90, 90, 0.6);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 100px;
  height: 100%;
  max-height: 170px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.dataquery-chart-header {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.02em;
}

.dataquery-chart-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  position: relative;
  min-height: 80px;
  overflow: hidden;
}

.dataquery-chart-body img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: none;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dataquery-chart-loader {
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.dataquery-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px dashed rgba(120, 120, 120, 0.4);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.6);
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

/* Responsive adjustments for Data Query charts */
@media (max-width: 1200px) {
  .dataquery-charts-root {
    height: calc(100vh - 300px);
    min-height: 450px;
  }
  .dataquery-charts-grid {
    gap: 6px;
  }
  .dataquery-chart-card {
    min-height: 180px;
    max-height: 250px;
  }
}

@media (max-width: 768px) {
  .dataquery-charts-root {
    height: calc(100vh - 250px);
    min-height: 400px;
    padding: 10px 4px 0px 4px;
  }
  .dataquery-charts-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(150px, 1fr));
    gap: 4px;
  }
  .dataquery-chart-card {
    min-height: 150px;
    max-height: 200px;
  }
  .dataquery-chart-body {
    padding: 6px;
    min-height: 120px;
  }
}



.weather-temps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.temp-high,
.temp-low {
  font-size: 8px;
  color: var(--text-secondary);
  line-height: 1.1;
  white-space: nowrap;
}

/* Row 1: Location - Make it larger and standalone column */
.timezone-row1 {
  display: flex;
  align-items: center;
}

.timezone-label {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.timezone-temp {
  font-size: 8px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.1;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0;
}

.timezone-icon {
  position: absolute;
  top: -5px;
  right: -4px;
  font-size: 8px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Row 2: Date and Time Stacked */
.timezone-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.timezone-date {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
}

.timezone-time {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.bottom-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding-right: 7px;
  padding-left: 20px;
  border-left: none;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Gradient border on left side */
.bottom-controls::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
}

.temp-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.toggle-buttons {
  display: flex;
  gap: 3px;
}

.temp-btn {
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--button-bg);
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 42px;
}

.temp-btn:hover {
  background: var(--button-hover);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.temp-btn.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.temp-btn:focus {
  outline: none;
  box-shadow: none;
}

.temp-btn:active {
  outline: none;
  box-shadow: none;
}

/* Main Content - OLD LAYOUT RULES DISABLED (conflict with new fixed layout)
.main-content,
.main-content.single-tab-page {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: hidden !important;
}
.main-content {
  position: relative;
  z-index: 10;
  margin-left: 288px;
  padding-top: var(--top-bar-height);
  padding-bottom: var(--bottom-spacing);
  height: calc(100vh - var(--top-bar-height) - 65px - var(--bottom-spacing));
  max-height: calc(100vh - var(--top-bar-height) - 65px - var(--bottom-spacing));
  overflow-y: hidden;
  scrollbar-width: none;
}
*/

/* Hide all scrollbars in main content */
.main-content::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

/* Contact Content - hide scrollbar too */
#main-dashboard-content::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

/* Dashboard container - fixed padding */
.dashboard-container {
  padding: var(--dashboard-container-padding);
  height: 100%;
}

.content-area {
  height: 100%;
}

#page-content {
  height: 100%;
}

/* Keep Dashboard main card content consistent across tab switches */
#main-dashboard-card .card-content {
  position: relative;
  height: var(--section-box-height) !important;
  min-height: var(--section-box-height) !important;
  max-height: var(--section-box-height) !important;
  overflow-y: hidden;
  padding: 22px 32px 0px 32px !important; /* Small top padding for spacing */
}

/* Telemetry Data view - proper flex layout to prevent bottom cutoff */
#main-dashboard-content:has(.telemetry-layout) {
  display: flex !important;
  flex-direction: column !important;
}

#telemetry-dots-container {
  flex-shrink: 0 !important;
}

.telemetry-layout {
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
}

/* Device image container - prevent height changes from images */
#device-image-container {
  overflow: hidden !important;
  min-height: 0 !important;
  max-height: 100% !important;
}

#device-image-container img {
  object-fit: contain !important;
}

  /* New styles for dashboard placeholders */
  .dashboard-placeholder {
    position: relative;
    /* Fill the parent section box exactly */
    height: 100%;
    min-height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.5));
    border-radius: 16px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  /* Full height placeholder */
  .dashboard-full-height-placeholder {
    position: relative;
    height: 100%;
    min-height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.5));
    border-radius: 16px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

/* Make ALL section boxes on ANY tab the same fixed height */
.content-card .card-content,
.dashboard-card .card-content,
.contact-section,
#crestview-telemetry-card .card-content,
#fiber-loop-card .card-content {
  height: var(--section-box-height);
  min-height: var(--section-box-height);
  max-height: var(--section-box-height);
  overflow-y: hidden;
  margin-bottom: 0px;
}

/* OLD LAYOUT RULES DISABLED
.main-content.dashboard-no-scroll {
  overflow-y: hidden !important;
}

.main-content.dashboard-no-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}
*/

#main-dashboard-content.dashboard-no-scroll {
  overflow-y: hidden !important;
}

#main-dashboard-content.dashboard-no-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

/* Make the tab content tables fill the panel and scroll internally */
#fenetworkroomtable,
#crestviewlabtable,
#fiberloopmaptable,
#telemetryTable {
  height: 100% !important;
  width: 100%;
}

/* Contact scroll area should size to content */
.contact-scroll-area {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 0;
}

.contact-scroll-area::-webkit-scrollbar {
  width: 8px;
}

.contact-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.dashboard-container {
  padding: 32px 32px 0px 32px;
  margin-bottom: var(--section-box-margin-bottom);
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Tab Slide Animations */
.content-card {
  transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.4s ease;
}

.content-card.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.content-card.slide-out-right {
  transform: translateX(100%);
  opacity: 0;
}

.content-card.slide-in-left {
  transform: translateX(-100%);
  opacity: 0;
  animation: slideInLeft 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.content-card.slide-in-right {
  transform: translateX(100%);
  opacity: 0;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

/* Vertical slide variants for location changes */
.content-card.slide-out-up {
  transform: translateY(-100%);
  opacity: 0;
}

.content-card.slide-out-down {
  transform: translateY(100%);
  opacity: 0;
}

.content-card.slide-in-up {
  transform: translateY(-100%);
  opacity: 0;
  animation: slideInUp 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.content-card.slide-in-down {
  transform: translateY(100%);
  opacity: 0;
  animation: slideInDown 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Slide out animations for telemetry section */
@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Telemetry slide animation classes */
.slide-in-from-left {
  animation: slideInLeft 0.3s ease-out forwards;
}

.slide-in-from-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.slide-out-to-left {
  animation: slideOutToLeft 0.3s ease-in forwards;
}

.slide-out-to-right {
  animation: slideOutToRight 0.3s ease-in forwards;
}

/* Content Cards */
.content-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
  transition: all 0.3s ease;
  margin-bottom: 0px;
}

.content-card.minimized {
  margin-bottom: 16px;
}

.content-card.minimized .card-content {
  display: none !important;
}

.content-card.maximized {
  position: relative;
  z-index: 10;
}

/* Specific spacing for dashboard sections */
/* Classification box - reduce bottom margin to bring it closer to main dashboard */
#top-info-card {
  margin-bottom: 8px;
  margin-top: -32px;
}

/* Reduce height of classification box header and content */
#top-info-card .card-header {
  height: 23px;
  padding: 8px 23px;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#top-info-card .card-header h4 {
  margin: 0;
  text-align: center;
}

#top-info-card .card-content {
  height: auto;
  min-height: 20px;
  max-height: 50px;
}

/* Classification mode color themes */
#top-info-card.classification-view-all .card-header {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-radius: 12px;
}

#top-info-card.classification-unclassified .card-header {
  background-color: green !important;
  color: #000000 !important;
  border-radius: 12px;
}

#top-info-card.classification-secret .card-header {
  background-color: #ff0000 !important;
  color: #000000 !important;
  border-radius: 12px;
}

/* Header left section with title and classification badge */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Classification badge in header */
.classification-badge {
  display: inline-block;
  min-width: 130px;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  transition: all 0.3s ease;
}

/* Classification badge color themes */
.classification-badge.classification-view-all {
  background-color: #000000;
  color: #ffffff;
}

.classification-badge.classification-unclassified {
  background-color: green;
  color: #ffffff;
}

.classification-badge.classification-secret {
  background-color: #ff0000;
  color: #ffffff;
}

/* 2D/3D Toggle Button */
.view-2d3d-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(40, 40, 40, 0.6);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  z-index: 10;
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin-left: auto;
  height: 56px;
}

.view-2d3d-btn {
  position: relative;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
  border-radius: 6px;
  outline: none;
}

.view-2d3d-btn:focus {
  outline: none;
}

.view-2d3d-btn:hover {
  color: var(--text-primary);
}

.view-2d3d-btn.active {
  color: var(--text-primary);
}

.view-2d3d-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: rgba(80, 80, 80, 0.8);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.view-2d3d-toggle[data-active="3D"] .view-2d3d-slider {
  transform: translateX(100%);
}

/* Fiber Toggle Button (Diagram/3D Map) */
.view-fiber-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(40, 40, 40, 0.6);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  z-index: 10;
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin-left: auto;
  height: 56px;
}

.view-fiber-btn {
  position: relative;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
  border-radius: 6px;
  outline: none;
  display: flex;
  align-items: center;
}

.view-fiber-btn:focus {
  outline: none;
}

.view-fiber-btn:hover {
  color: var(--text-primary);
}

.view-fiber-btn.active {
  color: var(--text-primary);
}

.view-fiber-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: rgba(80, 80, 80, 0.8);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.view-fiber-toggle[data-active="3D Map"] .view-fiber-slider {
  transform: translateX(100%);
}

/* Header Analytics Button */
#header-analytics-btn {
  align-items: center;
  justify-content: center;
}

#header-analytics-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3)) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-50%) scale(1.05);
}

#header-analytics-btn:active {
  transform: translateY(-50%) scale(0.98);
}

#main-dashboard-card {
  margin-bottom: 32px;
}

#fiber-loop-card {
  margin-bottom: 32px;
}

#telemetry-card,
#crestview-telemetry-card {
  margin-bottom: var(--section-box-margin-bottom);
}

/* Additional cards container spacing */
#additional-cards {
  margin-top: 0;
}

#additional-cards .content-card:not(:last-child) {
  margin-bottom: 32px;
}

.content-card:hover {
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 32px;
  border-bottom: 1px solid var(--border-primary);
  position: relative;
  min-height: 96px;
  max-height: 96px;
  height: 96px;
}

/* View Toggle Button */
.view-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.view-toggle-button {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 4px;
  min-width: 400px;
  width: fit-content;
}

/* Two-option layout for Crestview */
.view-toggle-button.two-options {
  min-width: 400px;
}

.view-toggle-button.two-options .toggle-slider {
  width: calc(50% - 4px);
}

.view-toggle-button.two-options[data-active="crestview-telemetry"] .toggle-slider {
  transform: translateX(100%);
}

/* Three-option layout for Forward Edge */
.view-toggle-button.three-options {
  min-width: 600px;
}

/* Four-option layout for Data Logs */
.view-toggle-button.four-options {
  min-width: 720px;
}

.view-toggle-button.four-options .toggle-slider {
  width: calc(25% - 4px);
}

.view-toggle-button.four-options[data-active="data-transfer-logs"] .toggle-slider {
  transform: translateX(0%);
}

.view-toggle-button.four-options[data-active="app-logs"] .toggle-slider {
  transform: translateX(100%);
}

.view-toggle-button.four-options[data-active="gateway-logs"] .toggle-slider {
  transform: translateX(200%);
}

.view-toggle-button.four-options[data-active="telemetry-logs"] .toggle-slider {
  transform: translateX(300%);
}

/* Five-option layout for Data Logs */
.view-toggle-button.five-options {
  min-width: 850px;
}

.view-toggle-button.five-options .toggle-slider {
  width: calc(20% - 4px);
}

.view-toggle-button.five-options[data-active="event-logs"] .toggle-slider {
  transform: translateX(0%);
}

.view-toggle-button.five-options[data-active="data-transfer-logs"] .toggle-slider {
  transform: translateX(100%);
}

.view-toggle-button.five-options[data-active="app-logs"] .toggle-slider {
  transform: translateX(200%);
}

.view-toggle-button.five-options[data-active="gateway-logs"] .toggle-slider {
  transform: translateX(300%);
}

.view-toggle-button.five-options[data-active="telemetry-logs"] .toggle-slider {
  transform: translateX(400%);
}

.view-toggle-button.six-options {
  min-width: 1020px;
}

.view-toggle-button.six-options .toggle-slider {
  width: calc(16.666% - 4px);
}

.view-toggle-button.six-options[data-active="event-logs"] .toggle-slider {
  transform: translateX(0%);
}

.view-toggle-button.six-options[data-active="data-transfer-logs"] .toggle-slider {
  transform: translateX(100%);
}

.view-toggle-button.six-options[data-active="app-logs"] .toggle-slider {
  transform: translateX(200%);
}

.view-toggle-button.six-options[data-active="gateway-logs"] .toggle-slider {
  transform: translateX(300%);
}

.view-toggle-button.six-options[data-active="telemetry-logs"] .toggle-slider {
  transform: translateX(400%);
}

.view-toggle-button.six-options[data-active="weather-logs"] .toggle-slider {
  transform: translateX(500%);
}

.toggle-option {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  min-width: 160px;
}

.toggle-option:not(.active):hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Line separators - only between visible options, not after the last one */
.toggle-option:not([style*="display: none"]):not(:last-of-type)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background-color: var(--border-primary);
  z-index: 3;
}

/* Specific rules to ensure no separator after last visible option */
.fe-options:nth-child(3)::after,
.crestview-options:nth-child(6)::after,
.last-option::after,
#data-logs-toggle-button .toggle-option:nth-child(7)::after,
.about-toggle-button .toggle-option:nth-child(4)::after {
  display: none !important;
}

.toggle-option.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(33.333% - 4px);
  height: calc(100% - 8px);
  background: var(--button-primary);
  border-radius: 6px;
  transition: transform 0.3s ease;
  z-index: 1;
}

.view-toggle-button[data-active="telemetry"] .toggle-slider {
  transform: translateX(100%);
}

.view-toggle-button[data-active="fiber"] .toggle-slider {
  transform: translateX(200%);
}

/* Contact toggle slider positioning */
#contact-toggle-button[data-active="all"] .toggle-slider {
  transform: translateX(0%);
}

#contact-toggle-button[data-active="crestview"] .toggle-slider {
  transform: translateX(100%);
}

#contact-toggle-button[data-active="forward-edge"] .toggle-slider {
  transform: translateX(200%);
}

/* About Toggle Button */
.about-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.about-toggle-button {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  padding: 4px;
  min-width: 700px;
  width: fit-content;
}

.about-toggle-button .toggle-slider {
  width: calc(25% - 4px);
}

.about-toggle-button[data-active="version"] .toggle-slider {
  transform: translateX(0%);
}

.about-toggle-button[data-active="update"] .toggle-slider {
  transform: translateX(100%);
}

.about-toggle-button[data-active="webapp"] .toggle-slider {
  transform: translateX(200%);
}

.about-toggle-button[data-active="documents"] .toggle-slider {
  transform: translateX(300%);
}

.card-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-control-btn:hover {
  background: var(--button-hover);
  color: var(--text-primary);
}

.card-control-btn:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.card-control-btn:active {
  outline: none;
  box-shadow: none;
}

.card-content {
  padding: 32px 32px 32px 32px;
}

/* Reduce bottom spacing for entire Telemetry Data section box */
#telemetry-card {
  margin-bottom: 40px;
  margin-top: -48px;
}

/* Placeholder content */
.dashboard-placeholder {
  position: relative;
  /* Fill the parent section box exactly */
  height: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.5));
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.dashboard-placeholder:hover {
  border-color: transparent;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.dashboard-placeholder:hover::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.8), 
    rgba(147, 51, 234, 0.8), 
    rgba(236, 72, 153, 0.8), 
    rgba(59, 130, 246, 0.8)
  );
  background-size: 200% 200%;
  animation: borderTrace 2s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  z-index: -1;
}

.full-height-placeholder {
  position: relative;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.5));
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.full-height-placeholder:hover {
  border-color: transparent;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.full-height-placeholder:hover::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.8), 
    rgba(147, 51, 234, 0.8), 
    rgba(236, 72, 153, 0.8), 
    rgba(59, 130, 246, 0.8)
  );
  background-size: 200% 200%;
  animation: borderTrace 2s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  z-index: -1;
}

/* OLD LAYOUT RULES DISABLED
.main-content.single-tab-page {
  height: calc(100vh - var(--top-bar-height) - 65px - var(--bottom-spacing));
  overflow: hidden;
}
*/



/* Dashboard placeholder with consistent padding */
.dashboard-full-height-placeholder {
  position: relative;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.5));
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.dashboard-full-height-placeholder:hover {
  border-color: transparent;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.dashboard-full-height-placeholder:hover::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.8), 
    rgba(147, 51, 234, 0.8), 
    rgba(236, 72, 153, 0.8), 
    rgba(59, 130, 246, 0.8)
  );
  background-size: 200% 200%;
  animation: borderTrace 2s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  z-index: -1;
}



.dashboard-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.05));
}

.placeholder-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 5px 40px 40px 40px;
}

/* Border tracing animation */
@keyframes borderTrace {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.placeholder-icon {
  width: 64px;
  height: 64px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.placeholder-content h4 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: var(--text-primary);
}

.placeholder-content p {
  margin: 0;
  color: var(--text-secondary);
}

/* Telemetry Dots Container */
.telemetry-dots {
  border: none;
  border-radius: 12px;
  margin-top: -25PX;
  margin-bottom: -25px;
  z-index: 9999;
}

/* Telemetry card content - no top padding */
#telemetry-card .card-content {
  padding-top: 0;
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.telemetry-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  position: relative;
}

.telemetry-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.telemetry-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.telemetry-status {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-good {
  background: #10b981;
}

.status-warning {
  background: #f59e0b;
}

.status-error {
  background: #ef4444;
}

/* Lab Telemetry */
.lab-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.lab-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 20px;
}

.lab-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-primary);
  padding-bottom: 8px;
}

.lab-section .telemetry-item {
  background: transparent;
  border: none;
  padding: 8px 0;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-section .telemetry-item span {
  font-size: 14px;
  color: var(--text-secondary);
}

.lab-section .telemetry-status {
  position: static;
  margin-left: 8px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
}

.stat-icon i {
  width: 24px;
  height: 24px;
  color: #60a5fa;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
}

.stat-change.positive {
  color: #10b981;
}

.stat-change.negative {
  color: #ef4444;
}

/* Activity Feed */
.activity-feed {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 32px;
}

.activity-feed h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  color: var(--text-primary);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: var(--border-hover);
}

.activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.activity-icon.status-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.activity-icon.status-info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.activity-icon i {
  width: 16px;
  height: 16px;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Custom scrollbar */
.sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Solid background for management key login */
.modal-overlay.solid-bg {
  background: #0a0a0f;
  backdrop-filter: none;
}

/* Secrets timer reset button */
#secrets-timer-reset:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: #FFD700;
}

.modal-content {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.9) translateY(-20px);
  transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-primary);
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--button-bg);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--button-hover);
  color: var(--text-primary);
}

.modal-close-btn i {
  width: 16px;
  height: 16px;
}

/* Edit modal same size as settings modal */
.settings-modal-size {
  width: 650px;
  max-width: 90vw;
  height: 600px;
  max-height: 85vh;
}

/* Edit modal header layout */
.edit-modal-header {
  justify-content: space-between;
  padding-left: 16px;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: -8px;
}

.modal-header-left h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-back-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.modal-back-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-back-btn i {
  width: 36px;
  height: 36px;
}

.modal-body {
  padding: 32px;
  overflow: hidden; /* Prevent modal body from scrolling */
}

/* Specific styling for email edit modal body */
.edit-modal-content .modal-body {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px); /* Adjust based on header height */
  max-height: 500px;
}

/* Email Distribution Section */
.email-distribution-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow flexbox child to shrink */
}

.section-title {
  font-weight: bold;
  font-size: 16px;
  color: var(--text-primary);
  margin: 0 0 15px 0;
  text-align: left;
}

.email-list-dropdown {
  width: 100%;
  padding: 12px 16px;
  background: var(--button-bg);
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.email-list-dropdown:disabled {
  background: rgba(40, 40, 40, 0.3);
  color: var(--text-muted);
  border-color: rgba(60, 60, 60, 0.3);
  cursor: not-allowed;
  opacity: 0.6;
}

.email-list-dropdown:hover {
  border-color: var(--border-hover);
  background: var(--button-hover);
}

.email-list-dropdown:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.email-table-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  min-height: 200px;
}

.email-table {
  width: 100%;
  border-collapse: collapse;
}

.email-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-primary);
  vertical-align: middle;
}

.email-table td:first-child {
  width: 5%;
  text-align: center;
}

.email-table td:last-child {
  width: 95%;
  color: var(--text-primary);
  font-size: 14px;
}

.email-table tbody tr:last-child td {
  border-bottom: 1px solid var(--border-primary);
}

.email-remove-icon {
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.email-remove-icon:hover:not(.disabled) {
  background-color: #dc3545;
  color: white;
}

.email-remove-icon.disabled {
  cursor: not-allowed;
  opacity: 0.4;
  color: var(--text-muted);
}

.email-remove-icon.disabled:hover {
  background-color: transparent;
  color: var(--text-muted);
}

.email-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--button-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--button-hover);
}

.email-input:hover {
  border-color: var(--border-hover);
}

.add-email-btn {
  padding: 8px 20px;
  background: var(--accent-primary);
  color: white;
  border: 2px solid var(--border-primary);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-email-btn:hover {
  background: rgba(79, 172, 254, 0.8);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.add-email-btn:active {
  transform: translateY(0);
}

/* Modal Action Buttons */
.modal-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 16px -32px 16px -32px; /* Extend to full modal width */
}

.modal-button-group {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 0;
  margin-bottom: -24px; /* Pull buttons closer to bottom */
}

.modal-action-btn {
  flex: 1;
  padding: 12px 20px;
  background: var(--button-bg);
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.modal-action-btn:hover {
  background: var(--button-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.modal-action-btn:active {
  transform: translateY(0);
}

.modal-action-btn:disabled {
  background: rgba(40, 40, 40, 0.3);
  color: var(--text-muted);
  border-color: rgba(60, 60, 60, 0.3);
  cursor: not-allowed;
  opacity: 0.6;
}

.modal-action-btn:disabled:hover {
  background: rgba(40, 40, 40, 0.3);
  border-color: rgba(60, 60, 60, 0.3);
  transform: none;
}

/* Custom Alerts Section */
.custom-alerts-section {
  margin-bottom: 20px;
}

/* Custom Dropdown Styles */
.custom-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.custom-dropdown-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: var(--button-bg);
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-dropdown-selected:hover {
  border-color: var(--border-hover);
  background: var(--button-hover);
}

.custom-dropdown-wrapper.open .custom-dropdown-selected {
  border-color: var(--accent-primary);
}

.custom-dropdown-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.custom-dropdown-wrapper.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #2a2a2a;
  border: 2px solid var(--border-primary);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
}

.custom-dropdown-wrapper.open .custom-dropdown-menu {
  display: block;
}

.custom-dropdown-item {
  padding: 10px 16px;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid #ffffff;
  transition: background 0.2s ease;
}

.custom-dropdown-item:last-child {
  border-bottom: none;
}

.custom-dropdown-item:hover {
  background: #3a3a3a;
}

.custom-dropdown-item.selected {
  background: var(--accent-primary);
  color: white;
}

.custom-alerts-dropdown {
  width: 100%;
  padding: 12px 16px;
  background: var(--button-bg);
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-alerts-dropdown option {
  background: #2a2a2a;
  color: var(--text-primary);
  padding: 10px;
  border-bottom: 1px solid #ffffff;
}

.custom-alerts-dropdown option:last-child {
  border-bottom: none;
}

.custom-alerts-dropdown option:hover {
  background: #3a3a3a;
}

.custom-alerts-dropdown:hover {
  border-color: var(--border-hover);
  background: var(--button-hover);
}

.custom-alerts-dropdown:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.custom-alerts-toggles-container {
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 16px 4px 16px 16px;
  background: rgba(30, 30, 30, 0.5);
}

.alert-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.alert-toggles-list:hover {
  scrollbar-color: #f8f8ff transparent;
}

.alert-toggles-list::-webkit-scrollbar {
  width: 12px !important;
  display: block !important;
}

.alert-toggles-list::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 6px;
}

.alert-toggles-list::-webkit-scrollbar-thumb {
  background: transparent !important;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.alert-toggles-list:hover::-webkit-scrollbar-thumb {
  background: #f8f8ff !important;
}

.alert-toggles-list::-webkit-scrollbar-thumb:hover {
  background: #ffffff !important;
}

.alert-toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.alert-toggle-item:last-child {
  margin-bottom: 0;
}

.alert-toggle-item:hover {
  border-color: var(--border-hover);
  background: rgba(60, 60, 60, 0.3);
}

.alert-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.alert-toggle-switch {
  display: flex;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border-primary);
}

.alert-toggle-btn {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--text-muted);
  border-right: none;
  border-left: none;
  outline: none;
}

.alert-toggle-btn:focus {
  outline: none;
  box-shadow: none;
}

.alert-toggle-btn.no-btn {
  border-radius: 18px 0 0 18px;
}

.alert-toggle-btn.yes-btn {
  border-radius: 0 18px 18px 0;
}

.alert-toggle-btn.active {
  color: white;
}

.alert-toggle-btn.no-btn.active {
  background: #ef4444;
}

.alert-toggle-btn.yes-btn.active {
  background: #22c55e;
}

.alert-toggle-btn:hover:not(.active) {
  background: rgba(100, 100, 100, 0.3);
  color: var(--text-primary);
}

/* Login Modal Styles */
.login-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--accent-primary);
  color: white;
  border: 2px solid rgba(79, 172, 254, 0.5);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-btn:hover {
  background: rgba(79, 172, 254, 0.8);
  border-color: rgba(79, 172, 254, 1);
  transform: translateY(-2px);
}

/* Management Key button - gold/yellow styling */
.login-btn.mgmt-btn {
  background: linear-gradient(135deg, #D4AF37, #B8860B);
  border-color: rgba(212, 175, 55, 0.5);
}

.login-btn.mgmt-btn:hover {
  background: linear-gradient(135deg, #FFD700, #D4AF37);
  border-color: rgba(255, 215, 0, 1);
  transform: translateY(-2px);
}

#dev-password-back:hover {
  background: rgba(79, 172, 254, 0.8) !important;
  border-color: rgba(79, 172, 254, 1);
  transform: translateY(-2px);
}

.login-btn i {
  width: 20px;
  height: 20px;
}

.password-input-container {
  position: relative;
  width: 100%;
}

.dev-password-input {
  width: 100%;
  padding: 12px 50px 12px 15px;
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: 'Courier New', monospace;
  box-sizing: border-box;
}

.dev-password-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.password-toggle-btn:hover {
  background: rgba(79, 172, 254, 0.1);
  color: var(--accent-primary);
}

.password-toggle-btn i {
  width: 20px;
  height: 20px;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
/* OLD responsive rule disabled
  .main-content {
    margin-left: 0;
  }
*/
  
  .nav-menu {
    gap: 12px;
  }
  
  .nav-item span {
    display: none;
  }
  
  .time-weather-container {
    margin-right: 16px;
  }
  
  .time-zone {
    min-width: 80px;
  }
  
  .timezone-time {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px;
  }
  
  .card-header {
    padding: 20px;
  }
  
  .card-content {
    padding: 20px;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-bar {
    padding: 0 16px;
  }
  
  .title-bar {
    padding: 0;
    margin: 0;
    min-height: 120px;
    height: auto;
    line-height: 0;
  }
  
  .title-logo-center {
    height: 60px;
    width: auto;
    /* margin: -60px 0 0 0; */
  }
  
  .title-logo-img {
    padding: 0;
    margin: 260px 0 2 0;
    line-height: 0;
  }
  
  .nav-menu {
    gap: 4px;
  }
  
  .bottom-bar {
    padding: 8px 16px;
  }
  
  .time-weather-container {
    margin-right: 8px;
  }
  
  .time-zone {
    min-width: 60px;
  }
  
  .timezone-time {
    font-size: 10px;
  }
  
  .timezone-label,
  .timezone-temp {
    font-size: 9px;
  }
  
  .timezone-date {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  
  .timezone-time {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .timezone-icon {
    font-size: 10px;
  }
  
  .bottom-bar {
    height: 65px;
    padding: 4px 16px;
  }

/* Contact Scroll Container - FORCE VISIBLE SCROLLBAR */
.contact-scroll-container {
  position: relative;
  height: calc(100vh - 250px);
  max-height: 600px;
  overflow-y: scroll !important;
  overflow-x: hidden;
  scrollbar-width: auto !important;
  scrollbar-color: #888 #333 !important;
}

/* FORCE webkit scrollbar to be visible */
.contact-scroll-container::-webkit-scrollbar {
  width: 16px !important;
  display: block !important;
}

.contact-scroll-container::-webkit-scrollbar-track {
  background: #333 !important;
  border-radius: 8px;
  border: 1px solid #555;
}

.contact-scroll-container::-webkit-scrollbar-thumb {
  background: #888 !important;
  border-radius: 8px;
  border: 2px solid #333;
  min-height: 30px;
}

.contact-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #aaa !important;
}

.contact-scroll-container::-webkit-scrollbar-thumb:active {
  background: #ccc !important;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0px;
  padding: 0px;
  padding-bottom: 0px; /* tighter fit for dashboard section box */
  /* Fill the section box instead of imposing its own height */
  height: 100%;
  padding-right: 0px;
}

/* Contact Grid Layout - 3 columns per row */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px;
  height: 100%;
}

/* Contact Card - Inner Section Box */
.contact-section-box {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.contact-section-box:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Contact Table - Transparent borders with vertical alignment */
.contact-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.contact-table td {
  border: none;
  background: transparent;
  padding: 8px 0;
  vertical-align: middle;
}

.contact-table .icon-cell {
  width: 24px;
  padding-right: 12px;
}

.contact-table .text-cell {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
}

.contact-table .name-row .text-cell {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.contact-table .title-row .text-cell {
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-table .location-row .text-cell {
  color: var(--text-muted);
}

.contact-table .email-row .text-cell {
  color: var(--text-secondary);
}

.contact-table .email-row .text-cell a {
  color: var(--text-secondary);
  text-decoration: none;
}

.contact-table .email-row .text-cell a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.contact-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Contact Tab - Reduce spacing between contact cards */
.dashboard-grid .dashboard-card {
  margin-bottom: 0px;
  padding-bottom: 0px;
}



.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-secondary);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.card-content {
  padding: 12px 16px;
}

/* Contact Page Styles */
.contact-container {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-primary);
}

.contact-icon {
  width: 32px;
  height: 32px;
  color: var(--text-primary);
}

.contact-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.contact-sections {
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.contact-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 0 !important;
  backdrop-filter: blur(12px);
}

.location-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-primary);
}

.location-icon {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
}

.location-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.contact-grid {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

.contact-scroll-area .dashboard-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  align-content: flex-start;
}

.contact-scroll-area .dashboard-card.contact-card {
  flex: 1 1 260px;
  min-width: 220px;
  height: auto;
}

#main-dashboard-card .card-content.contact-layout {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  margin-bottom: 0 !important;
}

.contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 0 !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  margin: 0 !important;
  width: auto;
  max-width: none;
  height: auto;
}

.contact-card .card-content {
  padding: 12px 16px !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-bottom: 0 !important;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: ghostwhite;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 !important;
  padding: 0 !important;
}

.contact-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4;
}

.contact-location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-location::before {
  content: "ðŸ“";
  font-size: 0.8rem;
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin: 0 !important;
  padding: 0 !important;
}

.email-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.contact-email a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-all;
}

.contact-email a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Contact Information in Dashboard Cards */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.contact-info:hover {
  border: 2px solid #ffffff !important;
  /* box-shadow: 0 0 15px rgba(255, 255, 255, 0.9) !important; */
  transform: translateY(-1px);
  outline: 3px solid #ffffff !important;
  outline-offset: -3px;
}

/* Additional specificity for contact info hover */
div.contact-info:hover,
.contact-info:hover {
  border: 3px solid white !important;
  /* box-shadow: 0 0 20px rgba(0, 255, 255, 1) !important; */
  /* outline: 3px solid white !important; */
  /* outline-offset: -3px; */
  /* background-color: #2a2a2a !important; */
}

.contact-info .contact-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.0;
  transform: translateY(0px);
}

.name-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transform: translateY(0px);
}

.contact-info .contact-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.0;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateY(0px);
}

.title-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transform: translateY(0px);
}

.contact-info .contact-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.0;
  transform: translateY(0px);
}

.contact-info .location-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transform: translateY(0px);
}

.contact-info .contact-email {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  line-height: 1.0;
  transform: translateY(0px);
}

.contact-info .email-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transform: translateY(0px);
}

.contact-info .contact-email a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-all;
}

.contact-info .contact-email a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Responsive contact card sizing - optimized to fit all cards in viewport */
.contact-info {
  width: 240px !important;
  height: 130px !important;
}

.contact-info .contact-name {
  font-size: 1.1rem !important;
}

.contact-info .contact-title {
  font-size: 0.9rem !important;
}

.contact-info .contact-location,
.contact-info .contact-email {
  font-size: 0.85rem !important;
}

/* Large screens (2560px and above) - Ultra-wide monitors */
@media (min-width: 2560px) {
  .contact-info {
    width: 320px !important;
    height: 150px !important;
  }
  
  .contact-info .contact-name {
    font-size: 1.3rem !important;
  }
  
  .contact-info .contact-title {
    font-size: 1.05rem !important;
  }
  
  .contact-info .contact-location,
  .contact-info .contact-email {
    font-size: 0.95rem !important;
  }
}

/* Large screens (1920px - 2559px) - Full HD and larger */
@media (min-width: 1920px) and (max-width: 2559px) {
  .contact-info {
    width: 280px !important;
    height: 140px !important;
  }
  
  .contact-info .contact-name {
    font-size: 1.2rem !important;
  }
  
  .contact-info .contact-title {
    font-size: 0.95rem !important;
  }
  
  .contact-info .contact-location,
  .contact-info .contact-email {
    font-size: 0.88rem !important;
  }
}

/* Medium-large screens (1600px - 1919px) */
@media (min-width: 1600px) and (max-width: 1919px) {
  .contact-info {
    width: 260px !important;
    height: 135px !important;
  }
  
  .contact-info .contact-name {
    font-size: 1.15rem !important;
  }
}

/* Standard screens (1366px - 1599px) - Most common laptop size */
@media (min-width: 1366px) and (max-width: 1599px) {
  .contact-info {
    width: 240px !important;
    height: 130px !important;
  }
  
  .contact-info .contact-name {
    font-size: 1.1rem !important;
  }
  
  .contact-info .contact-title {
    font-size: 0.9rem !important;
  }
}

/* Smaller screens (1024px - 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
  .contact-info {
    width: 220px !important;
    height: 125px !important;
  }
  
  .contact-info .contact-name {
    font-size: 1rem !important;
  }
  
  .contact-info .contact-title {
    font-size: 0.85rem !important;
  }
  
  .contact-info .contact-location,
  .contact-info .contact-email {
    font-size: 0.8rem !important;
  }
}

/* Tablet and small screens (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .contact-info {
    width: 200px !important;
    height: 120px !important;
  }
  
  .contact-info .contact-name {
    font-size: 0.95rem !important;
  }
  
  .contact-info .contact-title {
    font-size: 0.8rem !important;
  }
  
  .contact-info .contact-location,
  .contact-info .contact-email {
    font-size: 0.75rem !important;
  }
}

/* Responsive design for contact cards */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-container {
    padding: 0px;
  }
  
  .contact-header h2 {
    font-size: 1.5rem;
  }
  
  .location-header h3 {
    font-size: 1.25rem;
  }
  
  .contact-info {
    width: 100% !important;
    max-width: 280px !important;
    height: auto !important;
    min-height: 120px !important;
  }
}
  /* .main-content {
  } */
  
  .timezone-datetime {
    gap: 4px;
  }
}

/* Custom Tooltip */
.custom-tooltip {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.fe-network-root {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: 16px 10px 20px;
  box-sizing: border-box;
}

.fe-network-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: rgba(10, 10, 10, 0.65);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 16px 20px;
}

.fe-network-title h4 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
  color: var(--text-primary);
}

.fe-network-title p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 540px;
}

.fe-network-meta {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.fe-network-meta-item {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(20, 20, 20, 0.75);
}

.fe-network-meta-item .label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.fe-network-meta-item .value {
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.fe-network-meta-item .value.status-online {
  color: #6ddb6d;
}

.fe-network-visual {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.network-view[hidden] {
  display: none !important;
}

.network-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.network-device-card {
  background: rgba(12, 12, 12, 0.75);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border 0.2s ease, transform 0.2s ease;
}

.network-device-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.network-device-card img {
  width: 100%;
  max-width: 140px;
  height: auto;
  margin: 12px 0;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
}

.device-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.device-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.device-badge {
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-primary);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-secondary);
}

.badge-unclass {
  border-color: #4ea8ff;
  color: #4ea8ff;
}

.badge-secret {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.badge-core {
  border-color: #b084ff;
  color: #b084ff;
}

.badge-aux {
  border-color: #66d89b;
  color: #66d89b;
}

.network-device-card .device-summary {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 0 0 12px 0;
}

.network-device-card-highlight {
  background: linear-gradient(180deg, rgba(25, 25, 25, 0.85) 0%, rgba(10, 10, 10, 0.85) 100%);
  box-shadow: 0 18px 28px -18px rgba(0, 0, 0, 0.8);
}

.device-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.device-chip {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid var(--border-primary);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.device-chip.chip-online {
  color: #6ddb6d;
  border-color: rgba(109, 219, 109, 0.4);
}

.network-3d-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 1100px) {
  .network-3d-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
}

.rack3d-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rack3d-container {
  position: relative;
  width: 100%;
  min-height: 320px;
  height: clamp(340px, 58vh, 520px);
  background: radial-gradient(circle at top, rgba(40, 40, 40, 0.45), rgba(10, 10, 10, 0.85));
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  overflow: hidden;
}

.rack3d-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.rack3d-loading {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rack3d-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.6);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.rack3d-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

.rack3d-details {
  background: rgba(12, 12, 12, 0.8);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-secondary);
}

.rack3d-details h5 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.rack3d-details p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.rack3d-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
}

.rack3d-specs li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.rack3d-specs li span:first-child {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.rack3d-footnote {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Network 2D Layout */
.network-2d-container {
  display: flex;
  gap: 20px;
  width: 100%;
  height: calc(100vh - 380px);
  max-height: calc(100vh - 250px);
  min-height: 510px;
  overflow: hidden;
}

/* Left section: 3 square boxes in a row */
.network-left-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 25%;
  min-width: 200px;
}

/* Middle section: 3 long vertical rectangle boxes */
.network-middle-section {
  display: flex;
  gap: 15px;
  width: 50%;
  min-width: 400px;
}

/* Right section: 3 rows with even spacing */
.network-right-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 25%;
  min-width: 200px;
}

/* Square boxes (left and right sections) */
.network-square-box {
  background: transparent;
  border: 2px solid rgba(120, 120, 120, 0.8);
  border-radius: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.network-square-box:hover {
  border-color: rgba(150, 150, 150, 1.0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Vertical rectangle boxes (middle section) */
.network-vertical-box {
  background: transparent;
  border: 2px solid rgba(120, 120, 120, 0.8);
  border-radius: 8px;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.network-vertical-box:hover {
  border-color: rgba(150, 150, 150, 1.0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Title section for each box */
.network-box-title {
  background: #000000;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  text-align: left;
  border-bottom: 1px solid #333;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  height: 36px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

/* Content area for each box */
.network-box-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  gap: 15px;
}

.lab-device-overlay {
  position: absolute;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.2s ease;
}

/* Lab device items */
.lab-device-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  height: 100%;
  position: relative;
  min-height: 150px;
}

.lab-device-item:hovers {
  transform: translateX(-50%) scale(1.05);
}

.lab-device-hppc {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(70% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
}

/* QRM117 in Network Room */
.lab-device-qrm117 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(35% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
  cursor: pointer;
}

.lab-device-decp003-image-container {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

/* DECP-003 in Lab Table 2 */
.lab-device-decp003 {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 2;
}

.lab-device-decp003-box {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 999;
  clip-path: inset(25.7% 5% 54.1% 5%);
  /* filter: brightness(0.3) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.lab-device-decp003-box:hover {
  transform: translate(-50%, -49.5%) scale(1.05);
  cursor: pointer;
}

/* QRM118 in Lab Table 2 (same size as QRM117) */
.lab-device-qrm118 {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 70px);
  max-height: calc(100% - 70px);
  width: auto;
  height: auto;
  transition: all 0.2s ease;
  z-index: 1;
}

/* Smaller images for Lab Table 2 */
.lab-device-image-small {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 20px);
  max-height: calc(40% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
}

.lab-device-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  z-index: 2;
  width: 100%;
}

/* Label for QRM117 in Server Room */
.lab-device-label-qrm {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  z-index: 2;
  width: 100%;
}

/* Label for QRM118 in Lab Table 2 */
.lab-device-label-qrm118 {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  z-index: 2;
  width: 100%;
}

/* Placeholder text for all boxes */
.network-box-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .network-2d-container {
    height: calc(100vh - 350px);
    max-height: calc(100vh - 320px);
    min-height: 350px;
    gap: 15px;
  }
  
  .network-left-section,
  .network-middle-section,
  .network-right-section {
    gap: 12px;
  }
  
  .network-square-box {
    min-height: 120px;
  }
}

@media (max-width: 768px) {
  .network-2d-container {
    flex-direction: column;
    height: auto;
    gap: 20px;
  }
  
  .network-left-section,
  .network-middle-section,
  .network-right-section {
    width: 100%;
    flex-direction: row;
  }
  
  .network-square-box,
  .network-vertical-box {
    min-height: 100px;
  }
}

/* Workstation Images Styling */
.workstation-images {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  overflow: visible;
}

.workstation-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 100px;
}

.workstation-item:nth-child(1) {
  top: 40%;
  left: 17%;
  transform: translate(-50%, -50%);
}

.workstation-item:nth-child(2) {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.workstation-item:nth-child(3) {
  top: 40%;
  left: 83%;
  transform: translate(-50%, -50%);
}

.workstation-item:nth-child(4) {
  top: 90%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 150px;
}

.workstation-img {
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.workstation-img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.workstation-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  margin-top: 8px;
}

/* Workstation Monitor Overlay Boxes */
.workstation-monitor-overlay {
  position: absolute;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.2s ease;
}

.workstation-item:hover .workstation-monitor-overlay {
  transform: translateX(-50%) scale(1.05);
}

.workstation-monitor-overlay-uswitch {
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: 91%;
  height: 11%;
  border-radius: 0px;
  background: transparent;
}

.workstation-monitor-overlay-sswitch {
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: 91%;
  height: 11%;
  border-radius: 0px;
  background: transparent;
}

/* Rack Images Styling */
.rack-image-container {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.rack-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  z-index: 1;
}

.rack110-Switch1-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(3.5% 4.8% 93.5% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(90deg) saturate(5); */

  box-sizing: border-box;
}

.rack110-Switch1-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}


.rack110-Switch2-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(6.5% 4.8% 90.5% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.3) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.rack110-Switch2-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack110-Switch3-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(9.0% 4.8% 87.8% 4.8%); /* top, right, bottom, left */
  box-sizing: border-box
}

.rack110-Switch3-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack110-QSL101-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(11.5% 4.8% 83.1% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(330deg) saturate(5); */
  box-sizing: border-box
}

.rack110-QSL101-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack110-QSL102x-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(16.9% 4.8% 78% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.6) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.rack110-QSL102x-box:hover {
  transform: translate(-50%, -48.5%) scale(1.05);
  cursor: pointer;
}

.rack110-QSL104-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(22.1% 4.8% 72.9% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(1.4) sepia(1) hue-rotate(53deg) saturate(5); */
  box-sizing: border-box
}

.rack110-QSL104-box:hover {
  transform: translate(-50%, -49%) scale(1.05);
  cursor: pointer;
}

.rack110-QSL105-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(27.3% 4.8% 67.6% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.82) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.rack110-QSL105-box:hover {
  transform: translate(-50%, -49.5%) scale(1.05);
  cursor: pointer;
}

.rack110-QSL106x-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(32.4% 4.8% 62.1% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(330deg) saturate(5); */
  box-sizing: border-box
}

.rack110-QSL106x-box:hover {
  transform: translate(-50%, -49.5%) scale(1.05);
  cursor: pointer;
}

.rack110-QCC103-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(37.7% 4.8% 53.1% 4.8%);
  /* filter: brightness(0.6) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.rack110-QCC103-box:hover {
  transform: translate(-50%, -49.5%) scale(1.05);
  cursor: pointer;
}

.rack110-APC101-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(90.7% 4.8% 3.5% 4.8%);
  /* filter: brightness(0.6) sepia(1) hue-rotate(330deg) saturate(5); */
  box-sizing: border-box
}

.rack110-APC101-box:hover {
  transform: translate(-50%, -52%) scale(1.05);
  cursor: pointer;
}


.rack110-APC102-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(85.7% 4.8% 8.9% 4.8%);
  /* filter: brightness(0.6) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.rack110-APC102-box:hover {
  transform: translate(-50%, -52%) scale(1.05);
  cursor: pointer;
}

.rack210-Switch1-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(3.5% 4.8% 93.5% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.rack210-Switch1-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack210-QSL201x-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(6.3% 4.8% 88% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(330deg) saturate(5); */
  box-sizing: border-box
}

.rack210-QSL201x-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack210-QSL202-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(11.8% 4.8% 82.9% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.6) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.rack210-QSL202-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack210-QSL203-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(16.9% 4.8% 77.7% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.75) sepia(1) hue-rotate(50deg) saturate(5); */
  box-sizing: border-box
}

.rack210-QSL203-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack210-QSL204x-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(22% 4.8% 72.2% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.rack210-QSL204x-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack210-APC201-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(85.2% 4.8% 8.9% 4.8%);
  /* filter: brightness(1.3) sepia(1) hue-rotate(53deg) saturate(5); */
  box-sizing: border-box
}

.rack210-APC201-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}


.rack210-APC202-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(90.7% 4.8% 3.5% 4.8%);
  /* filter: brightness(0.6) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.rack210-APC202-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack310-Switch1-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(3.5% 4.8% 93.5% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.rack310-Switch1-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack310-QSL301-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(6.5% 4.8% 88.2% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.5) sepia(1) hue-rotate(330deg) saturate(5); */
  box-sizing: border-box
}

.rack310-QSL301-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack310-QSL302-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(11.7% 4.8% 81.9% 4.8%); /* top, right, bottom, left */
  /* filter: brightness(0.6) sepia(1) hue-rotate(210deg) saturate(5); */
  box-sizing: border-box
}

.rack310-QSL302-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

.rack310-APC301-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(85.2% 4.8% 8.9% 4.8%);
  /* filter: brightness(1.3) sepia(1) hue-rotate(53deg) saturate(5); */
  box-sizing: border-box
}

.rack310-APC301-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}


.rack310-APC302-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none;
  z-index: 999;
  clip-path: inset(90.7% 4.8% 3.5% 4.8%);
  /* filter: brightness(0.6) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.rack310-APC302-box:hover {
  transform: translate(-50%, -48%) scale(1.05);
  cursor: pointer;
}

/* .rack110-overlay-box {
   filter: sepia(1) saturate(5) hue-rotate(315deg) brightness(1.1) contrast(1.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  transition: all 0.2s ease;

  border: 1px solid yellow;
  background-color: red;
  z-index: 999;
} */

.laptop-rack110-overlay-img {
  position: absolute;
  top: 71%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: min(calc(100% - 110px), 130px);
  max-height: min(calc(100% - 110px), 90px);
  object-fit: contain;
  z-index: 10;
  transition: all 0.2s ease;
}

.laptop-rack110-label {
  position: absolute;
  top: 76.5%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  z-index: 11;
  margin-top: 8px;
}

.laptop-rack210-overlay-img {
  position: absolute;
  top: 71%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: min(calc(100% - 110px), 130px);
  max-height: min(calc(100% - 110px), 90px);
  object-fit: contain;
  z-index: 10;
  transition: all 0.2s ease;
}

.laptop-rack210-label {
  position: absolute;
  top: 76.5%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  z-index: 11;
  margin-top: 8px;
}

/* Network Room specific layout */
.network-room-container {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  overflow: visible;
}

.network-room-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 100px;
}

.network-room-item:nth-child(1) {
  top: 38%;
  left: 22%;
  transform: translate(-50%, -50%);
}

.network-room-item:nth-child(2) {
  top: 38%;
  left: 78%;
  transform: translate(-50%, -50%);
}

.network-room-thermostat {
  position: absolute;
  max-width: calc(100% - 30px);
  max-height: calc(100% - 30px);
  width: auto;
  height: auto;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 5px;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
}

.network-room-thermostat:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.network-room-temp-label {
  position: absolute;
  top: 17%;
  left: 65%;
  transform: translateX(-50%);
  color: black;
  text-align: center;
  font-weight: 700;
  font-size: 12px !important;
  font-family: 'Courier New', 'Monaco', 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  z-index: 11;
  margin-top: 0px;
}

.network-room-temp-number {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: black;
  text-align: center;
  font-weight: 700;
  font-family: 'Courier New', 'Monaco', 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  z-index: 13;
  margin-top: 8px;
}

.network-room-thermostat-label {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  z-index: 11;
  margin-top: 8px;
}

.network-room-camera {
  position: absolute;
  max-width: calc(100% - 5px);
  max-height: calc(100% - 5px);
  width: auto;
  height: auto;
  border-radius: 5.5px;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
}

@keyframes radioStatic {
  0% { 
    background-position: 0px 0px, 0px 0px, 0px 0px;
    opacity: 0.3;
  }
  20% { 
    background-position: 2px 1px, 1px 0px, 3px 2px;
    opacity: 0.45;
  }
  40% { 
    background-position: 1px 3px, 2px 1px, 1px 1px;
    opacity: 0.2;
  }
  60% { 
    background-position: 3px 0px, 0px 2px, 2px 3px;
    opacity: 0.4;
  }
  80% { 
    background-position: 0px 2px, 3px 1px, 0px 1px;
    opacity: 0.25;
  }
  100% { 
    background-position: 0px 0px, 0px 0px, 0px 0px;
    opacity: 0.3;
  }
}

.network-room-camera:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.network-room-camera-label {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  z-index: 11;
  margin-top: 8px;
  margin-bottom: -10px;
  white-space: nowrap;
}



/* Right section: Clean 3-row layout with even spacing */
.network-right-row {
  display: flex;
  gap: 15px;
  width: 100%;
  flex: 1;
}

/* Specific height adjustments for different rows */
.network-right-row:first-child {
  flex: 1.2; /* Much smaller height for laptop boxes */
}

.network-right-row:nth-child(2) {
  flex: 1.5; /* Maximum height for Network Room */
}

.network-right-row:last-child {
  flex: 1.7; /* Reduced height for DECP-002 and Admin Rack */
}

.network-section-box {
  flex: 1;
  background: transparent;
  border: 2px solid rgba(120, 120, 120, 0.8);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.network-section-box-full {
  width: 100%;
}

.network-section-box:hover {
  border-color: rgba(150, 150, 150, 1.0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Laptop container and responsive styling */
.laptop-container {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.01vw 0.2vw 0.01vw 0.2vw;
  box-sizing: border-box;
  margin-bottom: -20px;
}

.laptop-image {
  position: relative;
  width: min(90%, 100px);
  height: auto;
  object-fit: contain;
  margin-bottom: 0.08vh;
  margin-top: -23px;
  display: block;
  transition: transform 0.2s ease;
}

.laptop-image:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.laptop-image:hover + .laptop-overlay {
  transform: translateX(-50%) scale(1.05);
}

.laptop-label {
  font-size: clamp(10px, 1vw, 14px);
  font-weight: bold;
  color: #4ecdc4;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0px;
}

/* Individual overlay positions for each laptop */
.laptop-overlay {
  position: absolute;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 200;
  transition: transform 0.2s ease;
}

/* Individual overlay positions for each laptop */
.laptop-overlay-1 {
  position: absolute;
  top: 0%;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 72%;
  border-radius: 0px;
  background: transparent;
  pointer-events: none;
  z-index: 200;
  margin-top: -17px;
}

.laptop-overlay-2 {
  position: absolute;
  top: 0%;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 72%;
  border-radius: 0px;
  background: transparent;
  pointer-events: none;
  z-index: 200;
  margin-top: -17px;
}

/* Admin Rack container and responsive styling */
.adminrack-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.01vw 0.2vw 0.01vw 0.2vw;
  box-sizing: border-box;
  margin-top: -20px;
  margin-bottom: -20px;
}

.adminrack-image {
  width: min(100%, 250px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

/* DECP-002 container and responsive styling */
.decp002-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.01vw 0.2vw 0.01vw 0.2vw;
  box-sizing: border-box;
  margin-top: -20px;
  margin-bottom: -20px;
}

/* .decp002-container {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
} */

/* .decp002-image {
  width: min(100%, 250px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
} */

.decp002-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
}

.decp002-decp002switch-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 999;
  clip-path: inset(40.7% 4.8% 45.9% 4.8%);
  /* filter: brightness(0.3) sepia(1) hue-rotate(210deg) saturate(5);  */
  box-sizing: border-box
}

.decp002-decp002switch-box:hover {
  transform: translate(-50%, -49.5%) scale(1.05);
  cursor: pointer;
}

.decp002-decp002pc-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 999;
  clip-path: inset(52.7% 4.8% 28.5% 4.8%);
  /* filter: brightness(0.6) sepia(1) hue-rotate(90deg) saturate(5); */
  box-sizing: border-box
}

.decp002-decp002pc-box:hover {
  transform: translate(-50%, -49.5%) scale(1.05);
  cursor: pointer;
}

/* Network Room container and responsive styling */
/* .network-room-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  padding: 0.1vw 0.2vw 0.1vw 0.2vw;
  box-sizing: border-box;
  gap: 0.5vw;
}

.network-room-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
}

.network-room-image {
  width: min(75%, 90px);
  height: auto;
  max-height: 65%;
  object-fit: contain;
  margin-bottom: 0.2vh;
}

.network-room-label {
  font-size: clamp(9px, 0.9vw, 13px);
  font-weight: bold;
  color: #4ecdc4;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
} */

/* Responsive adjustments for different screen sizes */
@media (max-width: 1200px) {
  .laptop-image {
    width: min(65%, 85px);
  }
  .laptop-container {
    padding: 0.005vw 0.15vw 0.005vw 0.15vw;
  }
  .adminrack-image {
    width: min(90%, 170px);
  }
  .adminrack-container {
    padding: 0.008vw 0.15vw 0.008vw 0.15vw;
  }
  .decp002-image {
    width: min(90%, 170px);
  }
  .decp002-container {
    padding: 0.008vw 0.15vw 0.008vw 0.15vw;
  }
  /* .network-room-image {
    width: min(70%, 75px);
  }
  .network-room-container {
    padding: 0.08vw 0.15vw 0.08vw 0.15vw;
    gap: 0.4vw;
  } */
}

@media (max-width: 768px) {
  .laptop-image {
    width: min(60%, 70px);
  }
  .laptop-container {
    padding: 0.002vw 0.1vw 0.002vw 0.1vw;
  }
  .adminrack-image {
    width: min(85%, 140px);
  }
  .adminrack-container {
    padding: 0.005vw 0.1vw 0.005vw 0.1vw;
  }
  .decp002-image {
    width: min(85%, 140px);
  }
  .decp002-container {
    padding: 0.005vw 0.1vw 0.005vw 0.1vw;
  }
  /* .network-room-image {
    width: min(65%, 60px);
  }
  .network-room-container {
    padding: 0.05vw 0.1vw 0.05vw 0.1vw;
    gap: 0.3vw;
  } */
}

/* .adminrack-image-container {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.adminrack-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.2s ease;
  z-index: 1;
} */


/* === LAB 2D VIEW STYLING === */
/* Lab container layout */
.lab-2d-container {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 20px;
}

/* Lab middle section - 4 vertical boxes */
.lab-middle-section {
  display: flex;
  flex: 1;
  gap: 50px;
  height: 100%;
  justify-content: center;
}

/* Individual lab vertical boxes - uses network-box-title and network-box-content classes for consistency */
.lab-vertical-box {
  width: 300px;
  max-width: 300px;
  min-width: 280px;
  background: var(--card-bg);
  border: 2px solid rgba(120, 120, 120, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.lab-vertical-box:hover {
  transform: translateY(-2px);
  border-color: rgba(150, 150, 150, 1.0);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}

/* Lab title section within content */
.lab-title-section {
  width: 100%;
  margin-bottom: 15px;
  text-align: left;
}

.lab-title-section h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

/* Placeholder content styling */
.lab-content-placeholder {
  text-align: left;
  color: var(--text-secondary);
  font-style: italic;
  width: 100%;
}

/* === RIGHT SIDE PANEL STYLING === */
/* Right side panel container - wide panel from right edge to middle */
.right-side-panel {
  position: fixed;
  top: 135px; /* Kiss the bottom edge of the 2nd top nav bar (tabs) */
  right: -40%; /* Start hidden off-screen (40% of screen width) */
  width: 40%; /* Take up 40% of screen width - from right edge to middle */
  min-width: 300px; /* Minimum width for resizing */
  max-width: 80%; /* Maximum width for resizing */
  height: calc(100vh - 133px - 63px); /* Adjust to touch bottom nav bar */
  background: rgba(0, 0, 0, 0.85);
  box-shadow: none;
  z-index: 90; /* Match left sidebar z-index */
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  resize: none; /* Disable default resize */
}

/* Panel resizer handle */
.panel-resizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  border-left: 2px solid rgba(255, 255, 255, 0.8);
  cursor: col-resize;
  z-index: 1000;
}

.panel-resizer:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.5);
  border-left: 4px solid #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Panel open state - slide to right edge of screen */
.right-side-panel.open {
  right: 0; /* Flush against right edge, spanning 40% width */
}

/* Panel header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--accent-blue);
  color: white;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-header .title-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.panel-controls {
  display: flex;
  gap: 8px;
}

.panel-popout-btn,
.panel-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.panel-popout-btn:hover,
.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.panel-popout-btn i,
.panel-close-btn i {
  width: 18px;
  height: 18px;
}

/* Panel content */
.panel-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100% - 60px); /* Subtract header height */
  gap: 0;
  border-top: 1px solid #ffffff;
}

/* Chat Display Section (70%) */
.chat-display-section {
  flex: 0 0 70%;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.chat-display-area {
  width: 100%;
  height: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e0e0e0;
  resize: none;
  outline: none;
  overflow-y: auto;
  background-color: #2a2a2a;
}

.chat-display-area:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Chat Input Section (20%) */
.chat-input-section {
  flex: 0 0 20%;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.input-container {
  display: flex;
  height: 100%;
  gap: 0;
  align-items: center;
  position: relative;
}

.chat-input-field {
  flex: 1;
  height: 40px;
  background: #3a3a3a;
  border: 1px solid #555555;
  border-radius: 20px;
  padding: 0 50px 0 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input-field:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.chat-input-field::placeholder {
  color: #aaaaaa;
}

.send-btn {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.send-btn:active {
  transform: translateY(0);
}

.send-btn i {
  width: 16px;
  height: 16px;
}

/* Panel overlay - disabled (no darkening effect) */
.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* No darkening effect */
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none; /* Don't intercept clicks when not active */
}

.panel-overlay.active {
  opacity: 0; /* Keep transparent even when active */
  visibility: hidden; /* Keep hidden even when active */
  pointer-events: none; /* No click interception */
}

/* Scrollbar styling for panel */
.right-side-panel::-webkit-scrollbar {
  width: 6px;
}

.right-side-panel::-webkit-scrollbar-track {
  background: var(--sidebar-bg);
}

.right-side-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.right-side-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Light theme adjustments */
[data-theme="light"] .right-side-panel {
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .panel-overlay {
  background: transparent; /* No darkening in light theme either */
}

/* === DETACHED WINDOW STYLING === */
/* Detached draggable window */
.detached-window {
  position: fixed;
  top: 200px;
  right: 50px;
  width: 600px;
  height: 700px;
  min-width: 300px;
  min-height: 400px;
  max-width: 80vw;
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.85);
  border: 3px solid white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none; /* Hidden by default */
  overflow: hidden;
}

/* Window resize handles */
.window-resize-handle {
  position: absolute;
  z-index: 100;
}

.window-resize-top {
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
}

.window-resize-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
}

.window-resize-left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
}

.window-resize-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
}

.window-resize-top-left {
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  cursor: nw-resize;
  z-index: 101;
}

.window-resize-top-right {
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  cursor: ne-resize;
  z-index: 101;
}

.window-resize-bottom-left {
  bottom: 0;
  left: 0;
  width: 15px;
  height: 15px;
  cursor: sw-resize;
  z-index: 101;
}

.window-resize-bottom-right {
  bottom: 0;
  right: 0;
  width: 15px;
  height: 15px;
  cursor: se-resize;
  z-index: 101;
}

.detached-window.show {
  display: flex;
  flex-direction: column;
}

/* Window header (draggable) */
.window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--accent-blue);
  color: white;
  cursor: move;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  user-select: none;
  position: relative;
  z-index: 50;
}

.window-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-header h2 .title-icon {
  width: 20px;
  height: 20px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-attach-btn,
.window-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.window-attach-btn:hover,
.window-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.window-attach-btn i,
.window-close-btn i {
  width: 16px;
  height: 16px;
}

/* Window content */
.window-content {
  flex: 1;
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid white;
  min-height: 0;
}

.detached-window .chat-display-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.detached-window .chat-display {
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  resize: none;
}

.detached-window .chat-input-section {
  height: auto;
}

.detached-window .input-container {
  display: flex;
  height: 100%;
  gap: 0;
  align-items: center;
  position: relative;
}

.detached-window .chat-input {
  flex: 1;
  height: 40px;
  background: #3a3a3a;
  border: 1px solid #555555;
  border-radius: 20px;
  padding: 0 50px 0 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.detached-window .chat-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.detached-window .chat-input::placeholder {
  color: #aaaaaa;
}

.detached-window .send-btn {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.detached-window .send-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.detached-window .send-btn:active {
  transform: translateY(0);
}

.detached-window .send-btn i {
  width: 16px;
  height: 16px;
}

/* Light theme adjustments for window */
[data-theme="light"] .detached-window {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .right-side-panel {
    width: 50%; /* Take up 50% of screen width on medium screens */
    right: -50%;
  }
}

@media (max-width: 768px) {
  .right-side-panel {
    width: 80%; /* Take up 80% of screen width on mobile */
    right: -80%;
  }
  
  .right-side-panel.open {
    right: 0; /* Still flush against right edge */
  }
}

/* Data Logs - Custom Scrollbar Styles (Hover Only) */
/* EVENT-AUDIT LOGS section box */
.event-audit-logs-container {
  overflow-y: auto !important;
}

.event-audit-logs-container::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.event-audit-logs-container:hover::-webkit-scrollbar {
  width: 6px;
}

.event-audit-logs-container::-webkit-scrollbar-track {
  background: transparent;
}

.event-audit-logs-container::-webkit-scrollbar-thumb {
  background-color: #000000;
  border-radius: 3px;
}

.event-audit-logs-container::-webkit-scrollbar-thumb:hover {
  background-color: #333333;
}

/* FILES section box */
.files-list-container {
  overflow-y: auto !important;
}

.files-list-container::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.files-list-container:hover::-webkit-scrollbar {
  width: 6px;
}

.files-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.files-list-container::-webkit-scrollbar-thumb {
  background-color: #000000;
  border-radius: 3px;
}

.files-list-container::-webkit-scrollbar-thumb:hover {
  background-color: #333333;
}

/* Override default contact-scroll-area scrollbar for data logs page */
#main-dashboard-content .contact-scroll-area {
  overflow: visible !important;
  scrollbar-width: none !important;
}

#main-dashboard-content .contact-scroll-area::-webkit-scrollbar {
  display: none !important;
}


/* Telemetry Carousel Navigation Buttons */
.telemetry-nav-btn {
    outline: none;
    transition: all 0.3s ease;
}

.telemetry-nav-btn:hover {
    background: rgba(60, 60, 60, 0.9) !important;
    border-color: var(--text-primary) !important;
    transform: translateY(-50%) scale(1.1);
}

.telemetry-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Telemetry Pagination Dots */
.telemetry-dot {
    transition: all 0.3s ease;
}

.telemetry-dot:hover {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* Telemetry Device Buttons */
.telemetry-device-btn {
    outline: none;
}

.telemetry-device-btn:hover {
    background: rgba(60, 60, 60, 0.4) !important;
}

.telemetry-device-btn.active {
    background: rgba(60, 60, 60, 0.8) !important;
}

/* Red Connection Styles for Fiber Diagram */
.red-connection {
    stroke: url(#redConnectionGradient);
    stroke-width: 16;
    stroke-dasharray: 18 14;
    fill: none;
    cursor: pointer;
    transition: stroke-width 0.2s ease, filter 0.2s ease;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.3));
}

.red-connection:hover {
    stroke-width: 22;
    filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.6)) drop-shadow(0 0 25px rgba(239, 68, 68, 0.3)) brightness(1.2);
    animation: dashFlowReverse 1.2s linear infinite;
}

@keyframes dashFlowReverse {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 34; }
}

/* Guest Mode Cursor Override */
body.guest-mode .workstation-img:hover,
body.guest-mode [class*="-box"]:hover,
body.guest-mode .rack-img:hover {
    cursor: default !important;
}


/* ================================================= */
/* ===== BASE TEMPLATE INLINE STYLES (from base.html) ===== */
/* ================================================= */

        /* ===== QWC SPACE THEME ===== */
        :root {
            --bg-deep: #06080e;
            --bg-panel: rgba(8, 14, 28, 0.85);
            --bg-panel-solid: #080e1c;
            --border-glow: rgba(0, 180, 255, 0.15);
            --border-active: rgba(0, 200, 255, 0.4);
            --accent-cyan: #00c8ff;
            --accent-blue: #0066ff;
            --accent-purple: #6e3aff;
            --accent-teal: #00ffc8;
            --text-primary: #e0eaff;
            --text-secondary: rgba(180, 200, 230, 0.6);
            --text-dim: rgba(120, 150, 190, 0.4);
            --glow-cyan: 0 0 20px rgba(0, 200, 255, 0.15);
            --glow-strong: 0 0 40px rgba(0, 200, 255, 0.2);
            --sidebar-width: 260px;
            --sidebar-collapsed: 50px;
            --topbar-height: var(--sidebar-collapsed);
            --bottombar-height: var(--sidebar-collapsed);
            --radius: 12px;
        }

        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

        html, body {
            height: 100%;
            font-family: 'Rajdhani', sans-serif;
            background: var(--bg-deep);
            color: var(--text-primary);
            overflow: hidden;
        }

        /* ===== BACKGROUND ===== */
        .bg-space {
            position: fixed; inset: 0; z-index: -1; overflow: hidden;
            background: radial-gradient(ellipse at 50% 120%, rgba(0,30,80,0.4) 0%, transparent 60%),
                        radial-gradient(ellipse at 80% 20%, rgba(30,0,60,0.2) 0%, transparent 50%),
                        radial-gradient(ellipse at 15% 60%, rgba(0,40,80,0.15) 0%, transparent 40%),
                        var(--bg-deep);
        }
        .bg-space .stars {
            position: absolute; inset: 0;
            background-image:
                radial-gradient(1.5px 1.5px at 15% 15%, rgba(255,255,255,0.9), transparent),
                radial-gradient(1.2px 1.2px at 32% 68%, rgba(255,255,255,0.8), transparent),
                radial-gradient(2px 2px at 55% 22%, rgba(180,220,255,1), transparent),
                radial-gradient(1px 1px at 78% 45%, rgba(255,255,255,0.7), transparent),
                radial-gradient(1.5px 1.5px at 92% 72%, rgba(200,210,255,0.8), transparent),
                radial-gradient(1px 1px at 5% 82%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1.2px 1.2px at 42% 38%, rgba(255,255,255,0.7), transparent),
                radial-gradient(1.8px 1.8px at 68% 12%, rgba(160,200,255,0.9), transparent),
                radial-gradient(1px 1px at 85% 88%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1.5px 1.5px at 22% 52%, rgba(255,255,255,0.7), transparent),
                radial-gradient(1px 1px at 10% 40%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1.3px 1.3px at 45% 80%, rgba(200,220,255,0.7), transparent),
                radial-gradient(1px 1px at 60% 55%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1.5px 1.5px at 75% 25%, rgba(180,200,255,0.8), transparent),
                radial-gradient(1px 1px at 88% 60%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1.2px 1.2px at 25% 35%, rgba(200,220,255,0.6), transparent),
                radial-gradient(1px 1px at 50% 90%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1.3px 1.3px at 95% 15%, rgba(180,210,255,0.7), transparent),
                radial-gradient(1px 1px at 38% 65%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1.5px 1.5px at 70% 45%, rgba(200,230,255,0.7), transparent);
            animation: starDrift 180s linear infinite;
        }
        .bg-space .stars-2 {
            position: absolute; inset: 0;
            background-image:
                radial-gradient(0.8px 0.8px at 8% 30%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1px 1px at 18% 75%, rgba(255,255,255,0.4), transparent),
                radial-gradient(0.8px 0.8px at 35% 15%, rgba(200,220,255,0.5), transparent),
                radial-gradient(1px 1px at 52% 58%, rgba(255,255,255,0.4), transparent),
                radial-gradient(0.8px 0.8px at 65% 35%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1px 1px at 82% 62%, rgba(200,210,255,0.4), transparent),
                radial-gradient(0.8px 0.8px at 95% 20%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1px 1px at 28% 90%, rgba(255,255,255,0.4), transparent),
                radial-gradient(0.8px 0.8px at 48% 42%, rgba(255,255,255,0.35), transparent),
                radial-gradient(1px 1px at 72% 85%, rgba(200,220,255,0.4), transparent);
            animation: starDrift2 240s linear infinite;
        }
        @keyframes starDrift { 0% { transform: translateY(0) translateX(0); } 100% { transform: translateY(-20px) translateX(10px); } }
        @keyframes starDrift2 { 0% { transform: translateY(0) translateX(0); } 100% { transform: translateY(15px) translateX(-8px); } }

        .bg-space .grid-overlay {
            position: absolute; inset: 0;
            background-image: linear-gradient(rgba(0,150,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(0,150,255,0.02) 1px, transparent 1px);
            background-size: 60px 60px; animation: gridShift 30s linear infinite;
            mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 70%);
            -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 70%);
        }
        @keyframes gridShift { 0% { transform: perspective(500px) rotateX(2deg); } 50% { transform: perspective(500px) rotateX(-1deg); } 100% { transform: perspective(500px) rotateX(2deg); } }

        .bg-space .nebula-1 {
            position: absolute; top: 10%; right: 5%; width: 500px; height: 500px;
            background: radial-gradient(ellipse at center, rgba(110,58,255,0.08) 0%, rgba(110,58,255,0.04) 30%, transparent 70%);
            animation: nebulaFloat 20s ease-in-out infinite alternate; filter: blur(40px);
        }
        .bg-space .nebula-2 {
            position: absolute; bottom: 20%; left: 10%; width: 600px; height: 400px;
            background: radial-gradient(ellipse at center, rgba(0,100,200,0.08) 0%, rgba(0,80,160,0.04) 30%, transparent 70%);
            animation: nebulaFloat 25s ease-in-out infinite alternate-reverse; filter: blur(50px);
        }
        @keyframes nebulaFloat { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(30px,-20px) scale(1.1); } }

        .bg-space .earth-glow {
            position: absolute; bottom: -50%; left: 50%; transform: translateX(-50%); width: 180%; height: 80%;
            background: radial-gradient(ellipse at center, rgba(0,80,180,0.07) 0%, rgba(0,50,120,0.04) 25%, rgba(0,30,80,0.02) 40%, transparent 65%);
            animation: earthPulse 10s ease-in-out infinite alternate;
        }
        @keyframes earthPulse { 0% { opacity: 0.5; transform: translateX(-50%) scale(1); } 100% { opacity: 1; transform: translateX(-50%) scale(1.02); } }

        .bg-space .horizon { position: absolute; bottom: 0; left: 0; right: 0; height: 250px; background: linear-gradient(to top, rgba(0,60,120,0.08) 0%, rgba(0,40,100,0.04) 30%, transparent 100%); }
        .bg-space .horizon-line { position: absolute; bottom: 120px; left: -10%; right: -10%; height: 1px; background: linear-gradient(90deg, transparent 0%, rgba(0,150,255,0.04) 20%, rgba(0,200,255,0.06) 50%, rgba(0,150,255,0.04) 80%, transparent 100%); }
        .bg-space .scan-line { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,200,255,0.03), transparent); animation: scanMove 8s linear infinite; }
        @keyframes scanMove { 0% { top: -1px; } 100% { top: 100%; } }

        /* ===== TOP NAV ===== */
        .topbar {
            position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-height);
            background: rgba(8,14,28,0.85); border-bottom: none;
            display: flex; align-items: center; justify-content: space-between;
            z-index: 1000; padding: 0 20px 0 0;
        }
        .topbar::after {
            content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(0,180,255,0.25), rgba(120,60,220,0.4), rgba(0,200,255,0.55), rgba(120,60,220,0.4), rgba(0,180,255,0.25), transparent);
            background-size: 200% 100%; animation: borderShimmer 12s linear infinite;
        }
        .topbar-brand { display: flex; align-items: center; cursor: pointer; height: 100%; }
        .topbar-icon { width: var(--sidebar-collapsed); height: 100%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(0,200,255,0.35)); transition: filter 0.4s ease; }
        .topbar-icon svg { width: 34px; height: 34px; overflow: visible; }
        .topbar-icon .ring-outer { animation: iconSpin 12s linear infinite; transform-origin: 16px 16px; }
        .topbar-icon .ring-inner { animation: iconSpin 8s linear infinite reverse; transform-origin: 16px 16px; }
        .topbar-icon .core-pulse { animation: corePulse 2.5s ease-in-out infinite alternate; }
        @keyframes iconSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        @keyframes corePulse { 0% { opacity: 0.7; r: 3; } 100% { opacity: 1; r: 4; } }
        @keyframes borderShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        @keyframes borderShimmerV { 0% { background-position: 0 200%; } 100% { background-position: 0 -200%; } }
        .topbar-brand:hover .topbar-icon { filter: drop-shadow(0 0 12px rgba(0,200,255,0.7)) drop-shadow(0 0 4px rgba(0,200,255,0.4)); }
        .topbar-logo-text { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 30px; letter-spacing: 3px; white-space: nowrap; color: #f8f8ff; transition: letter-spacing 0.3s ease; margin-left: 12px; }
        .topbar-logo-text .logo-text { display: inline; }
        .topbar-search { position: absolute; left: 50%; transform: translateX(-50%); width: 420px; display: flex; align-items: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(0,200,255,0.2); border-radius: 8px; height: 34px; padding: 0 10px; }
        .topbar-search-icon { width: 18px; height: 18px; flex-shrink: 0; color: #f8f8ff; }
        .topbar-search-input { flex: 1; background: none; border: none; outline: none; color: #f8f8ff; font-family: 'Rajdhani', sans-serif; font-size: 14px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .topbar-search-input::placeholder { color: rgba(248,248,255,0.35); }
        .topbar-search-arrow { width: 18px; height: 18px; flex-shrink: 0; color: #f8f8ff; cursor: pointer; }
        .topbar-search:hover, .topbar-search:focus-within { background: rgba(8,14,28,1); border-color: rgba(0,200,255,0.35); }
        .topbar-actions { display: flex; align-items: center; gap: 8px; }
        .topbar-actions .icon-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 6px; transition: color 0.3s, filter 0.3s; position: relative; }
        .topbar-actions .icon-btn:hover { color: var(--accent-cyan); filter: drop-shadow(0 0 6px rgba(0,200,255,0.4)); }
        .topbar-actions .icon-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
        .topbar-actions .notif-dot { position: absolute; top: 4px; right: 2px; width: 6px; height: 6px; background: #ff3366; border-radius: 50%; border: 1.5px solid #080e1c; }

        /* ===== CUSTOM SCROLLBAR ===== */
        .scrollable-hover { scrollbar-width: thin; scrollbar-color: transparent transparent; }
        .scrollable-hover:hover { scrollbar-color: rgba(200,220,255,0.3) transparent; }
        .scrollable-hover::-webkit-scrollbar { width: 6px; height: 6px; }
        .scrollable-hover::-webkit-scrollbar-track { background: transparent; }
        .scrollable-hover::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
        .scrollable-hover:hover::-webkit-scrollbar-thumb { background: rgba(200,220,255,0.3); }
        .scrollable-hover:hover::-webkit-scrollbar-thumb:hover { background: rgba(200,220,255,0.5); }

        /* ===== LEFT SIDEBAR ===== */
        .sidebar {
            position: fixed; top: var(--topbar-height); left: 0; bottom: var(--bottombar-height);
            width: var(--sidebar-collapsed); background: rgba(8,14,28,0.85);
            border-right: none; z-index: 900;
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex; flex-direction: column; overflow: hidden;
        }
        .sidebar.expanded { width: var(--sidebar-width); }
        .sidebar::after {
            content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
            background: linear-gradient(180deg, transparent, rgba(0,180,255,0.25), rgba(120,60,220,0.45), rgba(0,200,255,0.55), rgba(120,60,220,0.45), rgba(0,180,255,0.25), transparent);
            background-size: 100% 200%; animation: borderShimmerV 12s linear infinite;
        }

        .hamburger { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; background: transparent; padding: 0; flex-shrink: 0; transition: background 0.2s; border-bottom: 1px solid rgba(200,220,255,0.1); color: var(--text-secondary); }
        .hamburger:hover { background: rgba(0,200,255,0.04); color: var(--accent-cyan); }
        .hamburger-lines { width: 22px; height: 16px; display: flex; flex-direction: column; justify-content: space-between; flex-shrink: 0; }
        .hamburger-lines span { display: block; height: 2px; width: 22px; border-radius: 2px; background: var(--text-secondary); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
        .hamburger-lines span:nth-child(2) { width: 16px; }
        .sidebar.expanded .hamburger-lines span:nth-child(1) { background: var(--accent-cyan); }
        .sidebar.expanded .hamburger-lines span:nth-child(2) { background: var(--accent-cyan); opacity: 0.7; }
        .sidebar.expanded .hamburger-lines span:nth-child(3) { background: var(--accent-cyan); }

        .sidebar-nav { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; flex: 1; overflow-y: auto; overflow-x: hidden; align-items: center; transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
        .sidebar.expanded .sidebar-nav { align-items: stretch; padding: 12px 10px; gap: 6px; }
        .sidebar-nav::-webkit-scrollbar { width: 3px; }
        .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
        .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,200,255,0.15); border-radius: 3px; }

        .nav-btn {
            display: flex; align-items: center; justify-content: center;
            width: 40px; height: 40px; padding: 0;
            border-radius: 50%; border: 1px solid rgba(0,180,255,0.08);
            background: rgba(0,200,255,0.03); color: var(--text-secondary);
            cursor: pointer; font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 500;
            letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden; flex-shrink: 0; position: relative;
        }
        .sidebar.expanded .nav-btn { width: 100%; height: 40px; border-radius: 28px; padding: 0 16px; justify-content: flex-start; gap: 14px; }
        .nav-btn svg { flex-shrink: 0; width: 18px; height: 18px; }
        .nav-btn span { opacity: 0; max-width: 0; transform: translateX(-8px); transition: opacity 0.2s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; overflow: hidden; }
        .sidebar.expanded .nav-btn span { opacity: 1; max-width: 160px; transform: translateX(0); pointer-events: all; transition: opacity 0.35s ease 0.1s, max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.05s; }
        .nav-btn:hover { background: rgba(0,200,255,0.08); border-color: var(--border-glow); color: var(--text-primary); }
        .nav-btn.active { background: linear-gradient(135deg, rgba(0,200,255,0.12), rgba(110,58,255,0.08)); border-color: var(--border-active); color: var(--accent-cyan); box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0,200,255,0.04); }

        /* ===== BOTTOM BAR ===== */
        .bottombar { position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottombar-height); background: rgba(8,14,28,0.85); border-top: none; display: flex; align-items: center; justify-content: space-evenly; z-index: 1000; padding: 0 20px; }
        .bottombar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,180,255,0.25), rgba(120,60,220,0.4), rgba(0,200,255,0.55), rgba(120,60,220,0.4), rgba(0,180,255,0.25), transparent); background-size: 200% 100%; animation: borderShimmer 12s linear infinite; }
        .bb-cell { display: flex; align-items: center; gap: 8px; height: 100%; }
        .bb-cell:first-child { margin-right: 60px; }
        .bb-cell + .bb-cell { }
        .bb-globe { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
        .bb-utc-label { font-family: 'Orbitron', sans-serif; font-size: 11px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; flex-shrink: 0; }
        .bb-datetime { display: flex; flex-direction: column; line-height: 1.3; width: 80px; flex-shrink: 0; }
        .bb-date { font-family: 'Roboto Mono', monospace; font-size: 9px; font-weight: 500; letter-spacing: 1px; color: ghostwhite; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .bb-time { font-family: 'Roboto Mono', monospace; font-size: 9px; font-weight: 500; color: ghostwhite; letter-spacing: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .bb-flag { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(200,220,255,0.15); flex-shrink: 0; }
        .bb-city { display: flex; flex-direction: column; line-height: 1.3; flex-shrink: 0; min-width: 60px; }
        .bb-city-name { font-family: 'Orbitron', sans-serif; font-size: 9px; font-weight: 600; color: ghostwhite; letter-spacing: 1.5px; text-transform: uppercase; }
        .bb-city-region { font-family: 'Exo 2', sans-serif; font-size: 8px; font-weight: 400; color: rgba(100,180,255,0.9); letter-spacing: 1px; text-transform: uppercase; }
        .bb-weather { display: flex; flex-direction: column; align-items: flex-start; gap: 0; flex-shrink: 0; line-height: 1; margin-left: 12px; }
        .bb-temps { display: grid; grid-template-columns: 16px auto; row-gap: 0; line-height: 1.15; font-family: 'Roboto Mono', monospace; font-size: 10px; white-space: nowrap; align-items: center; transform: scale(0.80); transform-origin: left center; }
        .bb-temps .bb-wx-icon { width: 14px; height: 14px; color: #ffffff; opacity: 0.9; }
        .bb-temps .bb-val { color: var(--text-primary); font-weight: 600; }
        .bb-temps .bb-lbl { color: #ffffff; font-weight: 400; }
        .bb-temps .bb-hi-val { color: rgba(255,160,80,0.9); font-weight: 600; }
        .bb-temps .bb-lo-val { color: rgba(100,180,255,0.9); font-weight: 600; }

        /* ===== PLEXUS GLOBE CANVAS ===== */
        .plexus-wrap {
            position: fixed; inset: 0;
            z-index: 0; pointer-events: none;
            overflow: hidden;
        }
        .plexus-wrap.shifted { left: var(--sidebar-width); }
        #plexusCanvas { display: block; width: 100%; height: 100%; }

        /* ===== MAIN CONTENT ===== */
        .main-content {
            position: fixed; top: var(--topbar-height); left: var(--sidebar-collapsed); right: 0; bottom: var(--bottombar-height);
            z-index: 1; transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; background: transparent;
        }
        .main-content.shifted { left: var(--sidebar-width); }

        .page { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: stretch; opacity: 0; transform: scale(0.96); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; padding: 20px; background: transparent; }
        .page.active { opacity: 1; transform: scale(1); pointer-events: all; }

        .page-title {
            font-family: 'Orbitron', sans-serif; font-size: 32px; font-weight: 700; letter-spacing: 4px; margin-bottom: 12px;
            background: linear-gradient(135deg, var(--accent-cyan), #fff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        .page-desc { font-family: 'Exo 2', sans-serif; font-size: 15px; font-weight: 300; color: var(--text-secondary); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 40px; }

        /* Dashboard cards */
        .dash-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); gap: 14px; width: 100%; height: 100%; }
        .dash-card {
            background: rgba(8,14,28,0.7); border: 1px solid var(--border-glow); border-radius: var(--radius);
            padding: 16px; backdrop-filter: blur(10px); transition: all 0.4s; position: relative; overflow: hidden;
            display: flex; flex-direction: column; align-items: center; cursor: pointer;
        }
        .dash-card::after {
            content: ''; position: absolute; inset: 0; border-radius: var(--radius);
            border: 1px solid transparent;
            background: linear-gradient(90deg, transparent, rgba(0,180,255,0.15), rgba(120,60,220,0.3), rgba(0,200,255,0.45), rgba(120,60,220,0.3), rgba(0,180,255,0.15), transparent) border-box;
            background-size: 200% 100%;
            -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor; mask-composite: exclude;
            opacity: 0; transition: opacity 0.4s ease;
            animation: borderShimmer 6s linear infinite;
            pointer-events: none;
        }
        .dash-card:hover::after { opacity: 1; }
        .dash-card:hover { background: rgba(8,14,28,1); border-color: rgba(200,220,255,0.15); box-shadow: 0 0 25px rgba(0,200,255,0.12), 0 0 50px rgba(0,200,255,0.06); transform: translateY(-2px); }
        .dash-card-title { font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: ghostwhite; margin-top: 12px; margin-bottom: auto; text-align: center; }
        .dash-card-icon { flex: 1; display: flex; align-items: center; justify-content: center; }
        .dash-card-icon svg { width: 72px; height: 72px; color: var(--accent-cyan); opacity: 0.5; transition: opacity 0.4s, filter 0.4s; }
        .dash-card-icon img { width: 72px; height: 72px; object-fit: contain; opacity: 1; transition: filter 0.4s; }
        .dash-card:hover .dash-card-icon svg, .dash-card:hover .dash-card-icon img { opacity: 1; filter: drop-shadow(0 0 8px rgba(0,200,255,0.4)); }
        .dash-card-maximize { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; opacity: 0; transition: opacity 0.3s ease; cursor: pointer; color: var(--text-secondary); }
        .dash-card-maximize svg { width: 100%; height: 100%; }
        .dash-card:hover .dash-card-maximize { opacity: 0.7; }
        .dash-card-maximize:hover { opacity: 1 !important; color: ghostwhite; }
        .dash-card-label { font-family: 'Exo 2', sans-serif; font-size: 10px; font-weight: 400; letter-spacing: 3px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
        .dash-card-value { font-family: 'Orbitron', sans-serif; font-size: 28px; font-weight: 700; color: var(--accent-cyan); }
        .dash-card-bar { margin-top: 16px; height: 3px; background: rgba(0,200,255,0.1); border-radius: 3px; overflow: hidden; }
        .dash-card-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-teal)); transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }

        /* QCTS page - split-panel layout */
        .qcts-container { position: relative; width: 100%; height: 100%; margin: 0; background: rgba(8,14,28,0.85); border: 1px solid rgba(200,220,255,0.08); border-radius: var(--radius); display: flex; gap: 12px; padding: 12px; box-sizing: border-box; }
        .qcts-maximize { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: transparent; color: rgba(200,220,255,0.6); opacity: 0.25; transition: opacity 0.3s, background 0.3s, color 0.3s; z-index: 10; }
        .qcts-maximize:hover { opacity: 1; background: white; color: #0a1224; }
        .qcts-maximize svg { width: 18px; height: 18px; }
        .qcts-maximize .icon-minimize { display: none; }
        .qcts-maximize.is-maximized .icon-maximize { display: none; }
        .qcts-maximize.is-maximized .icon-minimize { display: block; }
        .qcts-modal-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(4,8,16,0.95); box-sizing: border-box; }
        .qcts-modal-overlay.active { display: flex; }
        .qcts-modal-overlay .qcts-container { flex: 1; width: 100%; height: 100%; }
        .qcts-panel { background: rgba(10,18,36,0.7); border: 1px solid rgba(200,220,255,0.06); border-radius: calc(var(--radius) - 4px); overflow: hidden; }
        .qcts-panel-main { flex: 3; display: flex; flex-direction: column; gap: 12px; background: transparent; border: none; }
        .qcts-panel-main-top { flex: 0 0 auto; background: rgba(10,18,36,0.7); border: 1px solid rgba(200,220,255,0.06); border-radius: calc(var(--radius) - 4px); overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; height: 48px; position: relative; }
        .qcts-top-left { display: flex; align-items: center; gap: 10px; }
        .qcts-top-left img { width: 28px; height: 28px; object-fit: contain; }
        .qcts-top-left span { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; }
        .qcts-top-center { position: absolute; left: 50%; transform: translateX(-50%); font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; }
        .qcts-top-right { display: flex; align-items: center; gap: 10px; }
        .qcts-list-plus, .qcts-list-minus, .qcts-list-scan { width: 36px; height: 36px; cursor: pointer; color: rgba(200,220,255,0.4); transition: color 0.3s; }
        .qcts-list-plus:hover, .qcts-list-minus:hover, .qcts-list-scan:hover { color: ghostwhite; }
        .qcts-list-plus svg, .qcts-list-minus svg, .qcts-list-scan svg { width: 100%; height: 100%; }
        .qcts-panel-main-bottom { flex: 1; background: rgba(10,18,36,0.7); border: 1px solid rgba(200,220,255,0.06); border-radius: calc(var(--radius) - 4px); overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; align-content: start; }
        .qcts-panel-side { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .qcts-panel-side.has-stream { justify-content: stretch; }
        .qcts-side-header { display: flex; align-items: center; gap: 10px; }
        .qcts-side-header img { width: 28px; height: 28px; object-fit: contain; }
        .qcts-side-header span { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; }
        .qcts-side-subtitle { font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; margin-top: 8px; }
        .qcts-panel-side.has-stream .qcts-side-header,
        .qcts-panel-side.has-stream .qcts-side-subtitle { display: none; }
        .qcts-screen-wrap { flex: 1; display: none; flex-direction: column; width: 100%; min-height: 0; overflow: hidden; }
        .qcts-panel-side.has-stream .qcts-screen-wrap { display: flex; }
        .qcts-screen-wrap .qcts-stream-img { display: block; flex: 1; width: 100%; min-height: 0; object-fit: contain; cursor: crosshair; user-select: none; -webkit-user-select: none; }
        .qcts-connecting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(200,220,255,0.5); font-family: 'Exo 2', sans-serif; font-size: 14px; letter-spacing: 1.5px; gap: 18px; }
        .qcts-connecting.hidden { display: none; }
        .qcts-spinner { width: 40px; height: 40px; border: 3px solid rgba(200,220,255,0.1); border-top-color: var(--accent-cyan); border-radius: 50%; animation: qctsSpin 0.8s linear infinite; }
        @keyframes qctsSpin { to { transform: rotate(360deg); } }
        .qcts-nav-bar { display: none; align-items: center; justify-content: center; gap: 32px; padding: 6px 0; background: rgba(10,18,36,0.9); width: 100%; flex-shrink: 0; }
        .qcts-panel-side.has-stream .qcts-nav-bar { display: flex; }
        .qcts-nav-btn { width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(200,220,255,0.08); color: rgba(200,220,255,0.6); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; padding: 0; }
        .qcts-nav-btn:hover { background: rgba(200,220,255,0.18); color: ghostwhite; }
        .qcts-nav-btn svg { width: 22px; height: 22px; }
        /* Phone cards in grid */
        .qcts-phone-card { width: 100%; aspect-ratio: 9/16; background: rgba(10,18,36,0.9); border: 2px solid rgba(200,220,255,0.08); border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(200,220,255,0.5); transition: border-color 0.3s, background 0.3s, color 0.3s; position: relative; overflow: hidden; padding: 6px 4px; }
        .qcts-phone-card:hover { border-color: rgba(0,200,255,0.4); background: rgba(10,18,36,1); color: ghostwhite; }
        .qcts-phone-card.selected { border-color: var(--accent-cyan); background: rgba(0,200,255,0.08); color: ghostwhite; box-shadow: 0 0 12px rgba(0,200,255,0.15); }
        .qcts-phone-card.offline { opacity: 0.45; }
        /* Battery indicator - top right */
        .qcts-card-battery { position: absolute; top: 3px; right: 4px; font-family: 'Exo 2', sans-serif; font-size: 8px; font-weight: 600; color: rgba(200,220,255,0.6); letter-spacing: 0.3px; }
        .qcts-phone-card.selected .qcts-card-battery { color: rgba(200,220,255,0.9); }

        /* Device name */
        .qcts-phone-card-name { font-family: 'Exo 2', sans-serif; font-size: 10px; letter-spacing: 0.5px; text-align: center; padding: 0 4px; word-break: break-all; line-height: 1.2; }
        /* Connection status row - fixed width to prevent shifting */
        .qcts-phone-card-conn { display: flex; align-items: center; justify-content: center; gap: 3px; height: 18px; min-width: 60px; opacity: 0.6; }
        .qcts-phone-card.selected .qcts-phone-card-conn { opacity: 1; }
        .qcts-phone-card.offline .qcts-phone-card-conn { color: #ff4455; opacity: 1; }
        .qcts-phone-card.offline .qcts-phone-card-conn svg { stroke: #ff4455; }
        .qcts-conn-icon { width: 16px; height: 16px; flex-shrink: 0; }
        .qcts-conn-tech { font-family: 'Exo 2', sans-serif; font-size: 8px; font-weight: 600; letter-spacing: 0.5px; min-width: 30px; text-align: left; }
        /* QCTS Add Phone Modal */
        .qcts-add-modal-overlay { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(4,8,16,0.85); backdrop-filter: blur(6px); align-items: center; justify-content: center; }
        .qcts-add-modal-overlay.active { display: flex; }
        .qcts-add-modal { background: rgba(12,20,40,0.97); border: 1px solid rgba(200,220,255,0.12); border-radius: 14px; width: 440px; max-width: 90vw; box-shadow: 0 8px 40px rgba(0,0,0,0.6); overflow: hidden; }
        .qcts-add-modal-header { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; padding: 20px 28px; border-bottom: 1px solid rgba(200,220,255,0.08); }
        .qcts-add-modal-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
        .qcts-add-modal-row { display: flex; align-items: center; gap: 16px; }
        .qcts-add-modal-label { font-family: 'Exo 2', sans-serif; font-size: 13px; font-weight: 600; color: rgba(200,220,255,0.7); letter-spacing: 1px; width: 110px; flex-shrink: 0; text-align: right; }
        .qcts-add-modal-input { flex: 1; background: rgba(200,220,255,0.06); border: 1px solid rgba(200,220,255,0.12); border-radius: 6px; padding: 8px 12px; color: ghostwhite; font-family: 'Exo 2', sans-serif; font-size: 13px; outline: none; transition: border-color 0.2s; }
        .qcts-add-modal-input:focus { border-color: var(--accent-cyan); }
        .qcts-add-modal-input::placeholder { color: rgba(200,220,255,0.25); }
        .qcts-add-modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 28px; border-top: 1px solid rgba(200,220,255,0.08); }
        .qcts-add-modal-btn { font-family: 'Exo 2', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 1px; padding: 8px 24px; border: none; border-radius: 6px; cursor: pointer; transition: background 0.2s, color 0.2s; }
        .qcts-add-modal-btn-cancel { background: rgba(200,220,255,0.08); color: rgba(200,220,255,0.6); }
        .qcts-add-modal-btn-cancel:hover { background: rgba(200,220,255,0.15); color: ghostwhite; }
        .qcts-add-modal-btn-add { background: var(--accent-cyan); color: #0a1224; }
        .qcts-add-modal-btn-add:hover { background: #00d4ff; }

        /* PCAP Logger page */
        .pcap-maximize { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: transparent; color: rgba(200,220,255,0.6); opacity: 0.25; transition: opacity 0.3s, background 0.3s, color 0.3s; z-index: 10; }
        .pcap-maximize:hover { opacity: 1; background: white; color: #0a1224; }
        .pcap-maximize svg { width: 18px; height: 18px; }
        .pcap-maximize .icon-minimize { display: none; }
        .pcap-maximize.is-maximized .icon-maximize { display: none; }
        .pcap-maximize.is-maximized .icon-minimize { display: block; }
        .pcap-modal-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(4,8,16,0.95); box-sizing: border-box; }
        .pcap-modal-overlay.active { display: flex; }
        .pcap-modal-overlay .pcap-container { flex: 1; width: 100%; height: 100%; }
        .pcap-container { position: relative; width: 100%; height: 100%; margin: 0; background: rgba(8,14,28,0.85); border: 1px solid rgba(200,220,255,0.08); border-radius: var(--radius); display: flex; gap: 12px; padding: 12px; box-sizing: border-box; }
        .pcap-panel { background: rgba(10,18,36,0.7); border: 1px solid rgba(200,220,255,0.06); border-radius: calc(var(--radius) - 4px); overflow: hidden; }
        .pcap-panel-main { flex: 3; display: flex; flex-direction: column; gap: 12px; background: transparent; border: none; }
        .pcap-panel-main-top { flex: 1; background: rgba(10,18,36,0.7); border: 1px solid rgba(200,220,255,0.06); border-radius: calc(var(--radius) - 4px); overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; position: relative; }
        .pcap-top-left { display: flex; align-items: center; gap: 10px; }
        .pcap-top-left img { width: 28px; height: 28px; object-fit: contain; }
        .pcap-top-left span { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; }
        .pcap-top-center { position: absolute; left: 50%; transform: translateX(-50%); font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; }
        .pcap-top-right { display: flex; align-items: center; gap: 10px; }
        .pcap-list-plus, .pcap-list-minus, .pcap-list-checks { width: 36px; height: 36px; cursor: pointer; color: rgba(200,220,255,0.4); transition: color 0.3s; }
        .pcap-list-plus:hover, .pcap-list-minus:hover, .pcap-list-checks:hover { color: ghostwhite; }
        .pcap-list-plus svg, .pcap-list-minus svg, .pcap-list-checks svg { width: 100%; height: 100%; }
        .pcap-panel-main-bottom { flex: 9; background: rgba(10,18,36,0.7); border: 1px solid rgba(200,220,255,0.06); border-radius: calc(var(--radius) - 4px); overflow-y: scroll; padding: 10px 4px 10px 10px; }
        .pcap-panel-side { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .pcap-side-header { display: flex; align-items: center; gap: 10px; }
        .pcap-side-header img { width: 28px; height: 28px; object-fit: contain; }
        .pcap-side-header span { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; }
        .pcap-side-subtitle { font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 700; color: ghostwhite; letter-spacing: 2px; margin-top: 8px; }

        /* Globe */
        .globe-wrapper { width: 300px; height: 300px; position: relative; margin-bottom: 30px; }
        .globe {
            width: 100%; height: 100%; border-radius: 50%;
            background: radial-gradient(circle at 35% 35%, rgba(0,80,160,0.3), rgba(0,40,100,0.2) 50%, rgba(0,20,60,0.4) 100%);
            border: 1px solid rgba(0,200,255,0.1); position: relative; overflow: hidden;
            box-shadow: 0 0 60px rgba(0,100,200,0.1), inset 0 0 40px rgba(0,100,200,0.05);
        }
        .globe .grid-line { position: absolute; border: 1px solid rgba(0,200,255,0.05); border-radius: 50%; }
        .globe .grid-line:nth-child(1) { inset: 10%; }
        .globe .grid-line:nth-child(2) { inset: 25%; }
        .globe .grid-line:nth-child(3) { inset: 40%; }
        .globe .grid-line:nth-child(4) { top: 48%; left: 0; right: 0; height: 1px; border-radius: 0; border: none; background: rgba(0,200,255,0.06); }
        .globe .grid-line:nth-child(5) { left: 48%; top: 0; bottom: 0; width: 1px; border-radius: 0; border: none; background: rgba(0,200,255,0.06); }
        .globe-ring { position: absolute; inset: -20px; border: 1px solid rgba(0,200,255,0.08); border-radius: 50%; animation: ringRotate 30s linear infinite; }
        @keyframes ringRotate { 0% { transform: rotateX(60deg) rotateZ(0deg); } 100% { transform: rotateX(60deg) rotateZ(360deg); } }
        .globe-dot { position: absolute; width: 4px; height: 4px; background: var(--accent-cyan); border-radius: 50%; box-shadow: 0 0 8px var(--accent-cyan); animation: dotBlink 2s ease-in-out infinite; }
        @keyframes dotBlink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

        /* Analytics */
        .analytics-chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 20px; max-width: 600px; width: 100%; }
        .chart-bar { flex: 1; background: linear-gradient(to top, var(--accent-cyan), var(--accent-purple)); border-radius: 6px 6px 0 0; opacity: 0.7; transition: all 0.4s; min-width: 20px; }
        .chart-bar:hover { opacity: 1; box-shadow: 0 0 15px rgba(0,200,255,0.3); }

        /* Network */
        .network-viz { width: 400px; height: 300px; position: relative; }
        .net-node { position: absolute; width: 12px; height: 12px; background: var(--accent-cyan); border-radius: 50%; box-shadow: 0 0 12px rgba(0,200,255,0.4); animation: nodeFloat 3s ease-in-out infinite; }
        @keyframes nodeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

        /* Loading */
        .load-overlay { position: fixed; inset: 0; background: var(--bg-deep); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; transition: opacity 0.8s, visibility 0.8s; }
        .load-overlay.hidden { opacity: 0; visibility: hidden; }
        .load-logo { font-family: 'Orbitron', sans-serif; font-size: 52px; font-weight: 700; letter-spacing: 14px; color: #ffffff; text-shadow: 0 0 40px rgba(0,200,255,0.3), 0 0 80px rgba(0,200,255,0.1); position: relative; }
        .load-logo::after { content: 'QWC'; position: absolute; top: 0; left: 0; background: linear-gradient(90deg, transparent 30%, rgba(0,220,255,0.5) 50%, transparent 70%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: loadGlint 2s ease-in-out infinite; }
        @keyframes loadGlint { 0% { background-position: -100% 0; } 100% { background-position: 200% 0; } }
        .load-bar { width: 200px; height: 2px; background: rgba(0,200,255,0.1); border-radius: 2px; overflow: hidden; }
        .load-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-teal)); border-radius: 2px; animation: loadFill 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
        @keyframes loadFill { 0% { width: 0%; } 100% { width: 100%; } }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(0,200,255,0.15); border-radius: 6px; }

        @media (max-width: 768px) {
            .dash-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(5, 1fr); }
            .bottombar { padding: 0 10px; }
            .bb-cell { gap: 4px; }
            .bb-cell + .bb-cell { padding-left: 8px; }
        }
