/* Modern Tech App Styles */

/* Global scrollbar hiding - exclude analytics modal body */
*:not(#analytics-modal-body) {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*:not(#analytics-modal-body)::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

/* Analytics modal scrollbar - ghostwhite thumb */
#analytics-modal-body {
  scrollbar-width: thin;
  scrollbar-color: ghostwhite transparent;
  overflow-y: scroll;
}
#analytics-modal-body::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
#analytics-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
#analytics-modal-body::-webkit-scrollbar-thumb {
  background: ghostwhite;
  border-radius: 4px;
}
#analytics-modal-body::-webkit-scrollbar-thumb:hover {
  background: white;
}

/* 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);
  --dashboard-panel-bg:
    radial-gradient(circle at 18% 12%, rgba(45, 108, 255, 0.2) 0%, transparent 30%),
    radial-gradient(circle at 58% 88%, rgba(14, 160, 202, 0.13) 0%, transparent 38%),
    linear-gradient(145deg, rgba(8, 22, 58, 0.98) 0%, rgba(5, 15, 42, 0.96) 54%, rgba(8, 28, 66, 0.96) 100%);
  --border-primary: rgba(60, 60, 60, 0.4);
  --border-hover: rgba(80, 80, 80, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #b0b0b0;
  --button-bg: rgba(40, 40, 40, 0.5);
  --button-hover: rgba(60, 60, 60, 0.5);
  --topbar-bg: var(--dashboard-panel-bg);
  --sidebar-bg: var(--dashboard-panel-bg);
  --bottombar-bg: var(--dashboard-panel-bg);
  
  /* Contact card hover colors */
  --contact-hover-border: #ffffff;
  --contact-hover-shadow: rgba(255, 255, 255, 0.5);
  
  --qrm-scale: 1;
  --qrm-vw: 100vw;
  --qrm-vh: 100vh;
  --sidebar-width: calc(288px * var(--qrm-scale));
  --shell-bar-height: calc(63px * var(--qrm-scale));
  --top-bar-height: var(--shell-bar-height);
  --bottom-bar-height: var(--shell-bar-height);
  --bottom-spacing: 0px;
  --main-content-gutter: calc(16px * var(--qrm-scale));
  --dashboard-container-padding: var(--main-content-gutter);
  --classification-box-height: calc(60px * var(--qrm-scale));
  --card-header-height: calc(60px * var(--qrm-scale));
  --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(var(--qrm-vh) - 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;
}

/* Lock the typographic base so fonts stay the same size regardless of the
   user's browser font-size preference, and scale them in lockstep with the
   1920x1080-anchored layout (--qrm-scale). On a 1920x1080 display scale = 1,
   so fonts render exactly as designed; on other resolutions they scale with
   the boxes so nothing clips or overflows. (Page zoom is left untouched.) */
html {
  font-size: calc(16px * var(--qrm-scale, 1));
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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: calc(var(--sidebar-width) + var(--dashboard-container-padding));
  right: var(--dashboard-container-padding);
  height: var(--top-bar-height);
  z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border-bottom: none;
  overflow: hidden;
}

.top-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  height: auto;
  padding: 1px;
  background: conic-gradient(from var(--qrm-ring-angle, 0deg), transparent 0deg, rgba(42, 168, 255, 0.14) 48deg, rgba(125, 218, 255, 0.74) 76deg, rgba(255, 255, 255, 0.68) 92deg, rgba(66, 201, 255, 0.34) 118deg, transparent 156deg, transparent 360deg);
  border-radius: inherit;
  overflow: visible;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  animation: qrmBorderRingSweep 7s linear infinite;
  pointer-events: none;
}

.top-bar::before {
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(92, 206, 255, 0.1);
  z-index: 100000;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--topbar-bg);
  pointer-events: none;
  z-index: 2;
}

.title-bar {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 50px;
  margin-top: -2px;
  position: relative;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
  min-height: 80px;
  height: 40%;
  line-height: 0;
}

.title-bar::after {
  content: '';
  display: none;
  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;
}

.qrm-brand-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px !important;
  min-height: 150px !important;
  max-height: 150px !important;
  flex-shrink: 0;
  z-index: 10;
  position: relative;
  padding: 0;
  margin: 0;
  overflow: visible;
}

.qrm-brand-mark {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  isolation: isolate;
  /* Keep the high-resolution login artwork on the physical pixel grid.
     Animating this parent caused the browser to repeatedly rasterize the
     logo at fractional positions, which made its fine lines look jagged. */
  animation: none;
}

@property --qrm-light-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 62%;
}

@property --qrm-light-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 18%;
}

.qrm-brand-art {
  width: 180px;
  height: 139px;
  max-width: calc(100% - 48px);
  position: relative;
  display: block;
  margin-bottom: 0;
  transform: none;
  overflow: visible;
}

.qrm-brand-art::before,
.qrm-brand-art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask-image: url('../images/Logos/QRMLogo_sidebar_mark.png');
  mask-image: url('../images/Logos/QRMLogo_sidebar_mark.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.qrm-brand-art::before {
  background:
    radial-gradient(circle at var(--qrm-light-x, 66%) var(--qrm-light-y, 28%), rgba(255, 255, 255, 1) 0 3%, rgba(99, 205, 255, 0.92) 6%, transparent 18%),
    radial-gradient(circle at calc(var(--qrm-light-x, 66%) - 15%) calc(var(--qrm-light-y, 28%) + 23%), rgba(41, 171, 255, 0.82) 0 3%, transparent 14%),
    linear-gradient(135deg, transparent 0 35%, rgba(79, 195, 255, 0.3) 48%, transparent 62%);
  opacity: 0.92;
  filter: blur(0.2px) drop-shadow(0 0 12px rgba(80, 190, 255, 1));
  display: none;
}

.qrm-brand-art::after {
  display: block;
  background: linear-gradient(112deg,
    transparent 0%,
    transparent 34%,
    rgba(42, 168, 255, 0.7) 43%,
    rgba(125, 218, 255, 0.95) 48%,
    rgba(255, 255, 255, 1) 52%,
    rgba(165, 135, 255, 0.72) 57%,
    transparent 66%,
    transparent 100%);
  background-size: 300% 100%;
  background-position: 120% 50%;
  opacity: 0;
  transform: none;
  filter: none;
  -webkit-mask-image: url('../images/Logos/RMSLogo_vector.svg');
  mask-image: url('../images/Logos/RMSLogo_vector.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  animation: qrmLogoColorSweep 4s ease-in-out infinite;
}

@keyframes qrmLogoColorSweep {
  0%, 16% {
    opacity: 0;
    background-position: 120% 50%;
  }
  30% {
    opacity: 0.9;
  }
  68% {
    opacity: 0.9;
  }
  84%, 100% {
    opacity: 0;
    background-position: -20% 50%;
  }
}

.qrm-brand-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: none;
  transform-origin: center;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
  backface-visibility: visible;
}

.qrm-brand-image-base {
  z-index: 2;
  /* Keep the source image in the normal paint layer for clean antialiasing.
     The separate masked overlay supplies the animated sweep. */
  animation: none;
  opacity: 1;
}

@keyframes qrmLogoCleanPulse {
  0%, 100% {
    opacity: 0.88;
    filter: none;
  }
  50% {
    opacity: 1;
    filter: none;
  }
}

.qrm-brand-image-glow {
  display: none !important;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  filter: brightness(1.55) saturate(1.22) blur(1.5px) drop-shadow(0 0 7px #2aa8ff);
  animation: qrmImagePulse 4s cubic-bezier(0.32, 0, 0.2, 1) infinite;
}

.qrm-brand-baseline {
  display: none !important;
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 21%;
  height: 4px;
  z-index: 4;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  background: radial-gradient(ellipse at center, rgba(120, 210, 255, 0.86) 0%, rgba(42, 168, 255, 0.32) 45%, transparent 75%);
  animation: qrmBaseGlow 4s cubic-bezier(0.32, 0, 0.2, 1) infinite;
}

.qrm-brand-container + .location-section {
  margin-top: 0;
}

@keyframes qrmBrandFloat {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(calc(-3px - 1.2%)); }
}

@keyframes qrmImagePulse {
  0%, 100% { opacity: 0.04; filter: brightness(1.35) saturate(1.14) blur(1.5px) drop-shadow(0 0 5px #2aa8ff); }
  32% { opacity: 0.42; filter: brightness(1.72) saturate(1.32) blur(2px) drop-shadow(0 0 12px #78caff); }
}

@keyframes qrmBaseGlow {
  0%, 100% { opacity: 0.38; transform: scaleX(0.85); }
  32% { opacity: 0.82; transform: scaleX(1.02); }
}

@property --qrm-ring-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes qrmBorderSweepHorizontal {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes qrmBorderSweepVertical {
  0% { background-position: 50% 0%; }
  100% { background-position: 50% 100%; }
}

@keyframes qrmBorderRingSweep {
  0% { --qrm-ring-angle: 0deg; }
  100% { --qrm-ring-angle: 360deg; }
}

body.qrm-gradients-sweep .location-section::before,
body.qrm-gradients-sweep .location-divider {
  background-image: linear-gradient(90deg, transparent 0%, rgba(42, 168, 255, 0.08) 5%, rgba(66, 201, 255, 0.32) 14%, rgba(125, 218, 255, 0.42) 25%, rgba(66, 201, 255, 0.32) 36%, rgba(42, 168, 255, 0.08) 45%, transparent 50%, transparent 50%, rgba(42, 168, 255, 0.08) 55%, rgba(66, 201, 255, 0.32) 64%, rgba(125, 218, 255, 0.42) 75%, rgba(66, 201, 255, 0.32) 86%, rgba(42, 168, 255, 0.08) 95%, transparent 100%);
  background-size: 200% 100%;
  animation: qrmBorderSweepHorizontal 7s linear infinite;
}

body.qrm-gradients-sweep .bottom-bar::before,
body.qrm-gradients-sweep .top-bar::after,
body.qrm-gradients-sweep #main-dashboard-card::before {
  opacity: 1;
  animation: qrmBorderRingSweep 7s linear infinite;
}

body.qrm-gradients-sweep .nav-item:not(:last-child)::after,
body.qrm-gradients-sweep .nav-dropdown::after,
body.qrm-gradients-sweep .nav-item[data-page="dashboard"]::before,
body.qrm-gradients-sweep .sidebar::after,
body.qrm-gradients-sweep .bottom-controls::before {
  background-image: linear-gradient(180deg, transparent 0%, rgba(42, 168, 255, 0.08) 7.5%, rgba(66, 201, 255, 0.28) 25%, rgba(42, 168, 255, 0.08) 42.5%, transparent 50%, transparent 50%, rgba(42, 168, 255, 0.08) 57.5%, rgba(66, 201, 255, 0.28) 75%, rgba(42, 168, 255, 0.08) 92.5%, transparent 100%);
  background-size: 100% 200%;
  animation: qrmBorderSweepVertical 7s linear infinite;
}

body.qrm-gradients-static .location-section::before,
body.qrm-gradients-static .location-divider,
body.qrm-gradients-static .bottom-bar::before,
body.qrm-gradients-static #main-dashboard-card::before,
body.qrm-gradients-static .nav-item:not(:last-child)::after,
body.qrm-gradients-static .nav-dropdown::after,
body.qrm-gradients-static .nav-item[data-page="dashboard"]::before,
body.qrm-gradients-static .sidebar::after,
body.qrm-gradients-static .bottom-controls::before {
  animation: none;
  background-position: 50% 50%;
}

body.qrm-gradients-static .bottom-bar::before,
body.qrm-gradients-static #main-dashboard-card::before {
  opacity: 0;
}

.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;
}

html.guest-mode #activity-btn,
html.guest-mode #settings-btn,
body.guest-mode #activity-btn,
body.guest-mode #settings-btn {
  display: none !important;
  pointer-events: none !important;
}

.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: calc(5px * var(--qrm-scale)) var(--main-content-gutter) calc(5px * var(--qrm-scale)) 0;
  height: var(--top-bar-height);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--qrm-scale));
  padding: calc(10px * var(--qrm-scale)) calc(16px * var(--qrm-scale));
  height: calc(53px * var(--qrm-scale));
  border-radius: 0;
  background: none;
  border: 0;
  color: var(--text-secondary);
  font-size: calc(14px * var(--qrm-scale));
  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: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(42, 168, 255, 0.08) 15%, rgba(66, 201, 255, 0.28) 50%, rgba(42, 168, 255, 0.08) 85%, transparent 100%);
  background-size: 100% 220%;
  background-position: 50% 50%;
}

/* 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: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(42, 168, 255, 0.08) 15%, rgba(66, 201, 255, 0.28) 50%, rgba(42, 168, 255, 0.08) 85%, transparent 100%);
  background-size: 100% 220%;
  background-position: 50% 50%;
}

/* Add vertical line divider on the left side of Dashboard tab */
.nav-item[data-page="dashboard"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(42, 168, 255, 0.08) 15%, rgba(66, 201, 255, 0.28) 50%, rgba(42, 168, 255, 0.08) 85%, transparent 100%);
  background-size: 100% 220%;
  background-position: 50% 50%;
}

/* Make regular nav buttons same size as External Links, but don't change External Links itself */
.nav-item:not(#external-links-btn) {
  width: 152px;
  flex: 0 0 152px;
  justify-content: center;
}

#external-links-btn {
  width: 152px;
  flex: 0 0 152px;
  justify-content: center;
}

.nav-dropdown {
  flex: 0 0 152px;
}

.nav-item span {
  min-width: 0;
  overflow: visible;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-primary);
  background: linear-gradient(180deg, transparent 0%, rgba(48, 78, 146, 0.34) 6%, rgba(35, 111, 151, 0.52) 50%, rgba(48, 78, 146, 0.34) 94%, transparent 100%);
  box-shadow: none;
  transform: none;
}

@keyframes pulse-outline {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(66, 201, 255, 0.32), 0 0 8px rgba(42, 168, 255, 0.08);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(125, 218, 255, 0.42), 0 0 10px rgba(42, 168, 255, 0.12);
  }
}

.nav-item.active {
  color: #f2fbff;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 49, 93, 0.82) 7%, rgba(10, 91, 136, 0.92) 50%, rgba(7, 49, 93, 0.82) 93%, transparent 100%);
  box-shadow: inset 0 0 22px rgba(47, 189, 255, 0.14), 0 0 14px rgba(20, 117, 180, 0.1);
  outline: none;
  animation: none;
}

.nav-item.active:hover {
  color: #f2fbff;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 49, 93, 0.82) 7%, rgba(10, 91, 136, 0.92) 50%, rgba(7, 49, 93, 0.82) 93%, transparent 100%);
  transform: none;
}

.nav-item.active span,
.nav-item.active i,
.nav-item.active svg {
  color: #f2fbff;
  stroke: #f2fbff;
  opacity: 1;
}

.nav-item:hover i {
  color: var(--text-primary);
  opacity: 1;
}

.nav-item i {
  width: calc(18px * var(--qrm-scale));
  height: calc(18px * var(--qrm-scale));
  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 {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  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 rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 12px;
}

[data-theme="light"] .signal-list-dropdown {
  border-color: rgba(0, 0, 0, 0.3);
}

.signal-list-dropdown:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Signal table styling */
.signal-table-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: var(--bg-secondary);
  min-height: 200px;
}

[data-theme="light"] .signal-table-container {
  border-color: rgba(0, 0, 0, 0.3);
}

.signal-member-row {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal-member-admin {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-left: auto;
  padding-left: 12px;
  white-space: nowrap;
}

[data-theme="light"] .signal-member-row {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

/* 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: rgba(7, 17, 28, 0.38);
  border: 1px solid rgba(66, 201, 255, 0.18);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.user-account-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.user-account-control #user-btn,
.user-account-control .user-type-indicator {
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

#user-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 44px;
  z-index: 4;
}

#user-btn i {
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
}

.user-type-indicator {
  position: absolute;
  right: 100%;
  top: 0;
  transform: translateX(10px);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px 4px 10px;
  width: max-content;
  min-width: 128px;
  max-width: min(200px, calc(100vw - 72px));
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(66, 201, 255, 0.18);
  border-right: none;
  border-radius: 8px 0 0 8px;
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.user-type-indicator.show + #user-btn {
  background: rgba(10, 10, 10, 0.88);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: none;
}

.user-account-control:hover .user-type-indicator.show {
  border-color: rgba(66, 201, 255, 0.3);
  border-right: none;
  box-shadow: -4px 0 8px rgba(42, 168, 255, 0.08);
}

.user-account-control:hover .user-type-indicator.show + #user-btn {
  color: var(--text-primary);
  background: rgba(10, 10, 10, 0.88);
  border-color: rgba(66, 201, 255, 0.3);
  border-left: none;
  box-shadow: 4px 0 8px rgba(42, 168, 255, 0.08);
}

.user-type-indicator.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#user-type-text {
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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: 2px 12px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.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: 44px;
  min-width: 44px;
  padding: 0;
  gap: 0;
}

#notification-btn:hover {
  transform: none;
  background: var(--button-bg);
  border: 1px solid rgba(66, 201, 255, 0.18);
}

.bell-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  height: 100%;
  border-radius: 12px;
  transition: all 0.2s ease;
}

/* Orange background for new alerts that have not been sent */
.bell-icon-wrapper.has-new-alerts {
  background: rgba(249, 115, 22, 0.8);
  animation: pulse-orange 2s ease-in-out infinite;
}

/* Red background when any unseen alert has been sent */
.bell-icon-wrapper.has-sent-alerts {
  background: rgba(220, 38, 38, 0.8);
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-orange {
  0%, 100% {
    background: rgba(249, 115, 22, 0.8);
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
  }
  50% {
    background: rgba(249, 115, 22, 1);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0);
  }
}

@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(249, 115, 22, 0.9);
  animation: none;
}

.bell-icon-wrapper.has-sent-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(66, 201, 255, 0.3);
  box-shadow: 0 0 8px rgba(42, 168, 255, 0.08);
}

.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: fixed;
  top: calc(var(--dashboard-container-padding) + var(--top-bar-height) + 8px);
  right: var(--dashboard-container-padding);
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(92, 206, 255, 0.1);
  border-radius: 16px;
  z-index: 1200;
  opacity: 1;
  visibility: hidden;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.26s ease, visibility 0s linear 0.26s;
  pointer-events: none;
  width: min(1200px, calc(100vw - (var(--dashboard-container-padding) * 2)));
  max-height: min(600px, calc(100vh - var(--top-bar-height) - (var(--dashboard-container-padding) * 2) - 8px));
  overflow-y: hidden;
  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: scaleY(1);
  transition: transform 0.26s ease, visibility 0s;
  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: 17.5px;
  height: 17.5px;
  color: var(--text-secondary);
  pointer-events: auto;
  position: relative;
  cursor: pointer;
}

/* Custom left-side tooltip for mini status icons */
.mini-status-tooltip {
  position: fixed;
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100000;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.15s;
}
.mini-status-tooltip.visible {
  opacity: 1;
}

/* Centered alert toggle popup modal */
.alert-toggle-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.alert-toggle-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.alert-toggle-modal {
  background: rgba(0, 0, 0, 0.9);
  border: none;
  border-radius: 8px;
  padding: 40px 60px;
  transform: scale(0.9) translateY(-20px);
  transition: all 0.3s ease;
  text-align: center;
  min-width: 300px;
}
.alert-toggle-modal-overlay.show .alert-toggle-modal {
  transform: scale(1) translateY(0);
}
.alert-toggle-modal-text {
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  white-space: nowrap;
}

.mini-status-icon i {
  width: 13.5px;
  height: 13.5px;
}

/* Hide the button ::after tooltip when hovering over mini icons */
#notification-btn.hide-tooltip::after {
  opacity: 0 !important;
  visibility: hidden !important;
}

.notification-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1100px;
  border: none;
  table-layout: fixed;
}

.notification-table-header {
  border-bottom: none; /* Remove bottom border since data table is below */
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}

.notification-table-body-wrapper {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none; /* Firefox - hide scrollbar */
  -ms-overflow-style: none; /* IE and Edge - hide scrollbar */
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0 0 14px 14px;
}

/* 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);
  position: relative;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.notification-clear-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 4px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s, border-color 0.2s;
}

.notification-clear-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.7);
}

.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-body tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}

.notification-table-body tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

.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: var(--sidebar-width);
  height: 100vh;
  background: transparent;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar::after {
  content: "";
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-width) - 1px);
  width: 1px;
  height: 100vh;
  background: linear-gradient(180deg, transparent 0%, rgba(42, 168, 255, 0.08) 15%, rgba(66, 201, 255, 0.28) 50%, rgba(42, 168, 255, 0.08) 85%, transparent 100%);
  pointer-events: none;
  z-index: 103;
}

.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-radius: 16px;
  border-right: 0;
  padding: 8px 0 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 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;
}

.location-section h3 {
  margin: 2px 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.location-section {
  --sidebar-location-control-height: calc(34px * var(--qrm-scale));
  --sidebar-location-section-padding: calc(12px * var(--qrm-scale));
  width: 100%;
  height: calc(var(--sidebar-location-control-height) + (var(--sidebar-location-section-padding) * 2));
  min-height: calc(var(--sidebar-location-control-height) + (var(--sidebar-location-section-padding) * 2));
  padding: var(--sidebar-location-section-padding) 0;
  box-sizing: border-box;
  border-top: none;
  position: relative;
}

.location-section::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(42, 168, 255, 0.08) 10%, rgba(66, 201, 255, 0.32) 28%, rgba(125, 218, 255, 0.42) 50%, rgba(66, 201, 255, 0.32) 72%, rgba(42, 168, 255, 0.08) 90%, transparent 100%);
  background-size: 220% 100%;
  background-position: 50% 50%;
  pointer-events: none;
}

.location-dropdown {
  position: relative;
  width: 100%;
  height: 100%;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
}

.location-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(42, 168, 255, 0.08) 10%, rgba(66, 201, 255, 0.32) 28%, rgba(125, 218, 255, 0.42) 50%, rgba(66, 201, 255, 0.32) 72%, rgba(42, 168, 255, 0.08) 90%, transparent 100%);
  background-size: 220% 100%;
  background-position: 50% 50%;
  margin: 0 0 -2px 0;
}

.location-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: var(--sidebar-location-control-height);
  min-height: var(--sidebar-location-control-height);
  max-height: var(--sidebar-location-control-height);
  padding: calc(7px * var(--qrm-scale)) calc(13px * var(--qrm-scale)) calc(7px * var(--qrm-scale)) calc(9px * var(--qrm-scale));
  box-sizing: border-box;
  border: none;
  background: rgba(7, 17, 28, 0.38);
  color: var(--text-secondary);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  outline: 1px solid rgba(66, 201, 255, 0.24);
  outline-offset: -1px;
  box-shadow: inset 0 0 0 1px rgba(244, 253, 255, 0.05), 0 0 8px rgba(42, 168, 255, 0.04);
}

.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 rgba(150, 228, 255, 0.48);
  outline-offset: -1px;
  box-shadow: inset 0 0 0 1px rgba(244, 253, 255, 0.1), 0 0 10px rgba(42, 168, 255, 0.1);
}

/* Keep the focus state matching the resting style so clicking does not leave a
   white/default focus ring behind. */
.location-dropdown-btn:focus,
.location-dropdown-btn:focus-visible {
  outline: 1px solid rgba(66, 201, 255, 0.24);
  outline-offset: -1px;
}

.location-selected {
  color: var(--text-primary);
  font-weight: 500;
}

.dropdown-chevron {
  width: calc(16px * var(--qrm-scale));
  height: calc(16px * var(--qrm-scale));
  transition: transform 0.2s ease;
}

.location-dropdown-btn.open .dropdown-chevron {
  transform: rotate(180deg);
}

/* When the popup is open, square off the button's bottom corners so it sits
   flush against the menu; corners return to rounded when closed. The hover and
   focus variants are listed explicitly so the corners stay pointy while the
   popup is open even when the mouse moves off the button. */
.location-dropdown-btn.open,
.location-dropdown-btn.open:hover,
.location-dropdown-btn.open:focus,
.location-dropdown-btn.open:focus-visible {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.location-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  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: 0;
}

.location-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  border-color: silver;
  border-top-color: transparent;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.location-dropdown-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.location-dropdown-row:last-child {
  margin-bottom: 0;
}

.location-dropdown-row:hover {
  background: var(--button-hover);
}

/* Selected row: highlight spans the full width including the delete button */
.location-dropdown-row:has(.location-dropdown-item.active) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(147, 51, 234, 0.22));
  border-color: rgba(59, 130, 246, 0.4);
}

.location-dropdown-item {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  padding: 8px 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  margin-bottom: 0;
}

.location-dropdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.location-dropdown-item-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-dropdown-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.location-dropdown-item:hover {
  color: var(--text-primary);
  background: transparent;
}

.location-dropdown-item.active {
  color: var(--text-primary);
  background: transparent;
  border: none;
}

.location-delete-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(229, 231, 235, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.location-delete-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.location-delete-btn:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.26);
  border-color: rgba(239, 68, 68, 0.6);
}

.location-delete-btn:focus {
  outline: none;
  border-color: rgba(66, 201, 255, 0.62);
}

.location-delete-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.52);
  z-index: 1800;
}

.location-delete-modal.show {
  display: flex;
}

.location-delete-modal-content {
  width: min(92vw, 380px);
  border: 1px solid rgba(66, 201, 255, 0.42);
  border-radius: 12px;
  background: #090909;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  padding: 16px;
}

.location-delete-modal-content h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 16px;
}

.location-delete-modal-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.location-delete-modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.location-delete-modal-actions button {
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.52);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.location-delete-modal-actions #location-delete-confirm-btn {
  border-color: rgba(239, 68, 68, 0.75);
  background: rgba(127, 29, 29, 0.6);
}

/* Device Locations Section */
.device-locations-section {
  width: 100%;
  margin-top: 8px;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.device-search-container {
  width: 100%;
  height: var(--bottom-bar-height);
  margin: 0;
  border-top: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.device-search-shell {
  display: flex;
  align-items: center;
  position: relative;
  width: calc(100% - 32px);
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(7, 17, 28, 0.38);
  outline: 1px solid rgba(66, 201, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(244, 253, 255, 0.05), 0 0 8px rgba(42, 168, 255, 0.04);
}

.device-search-logo-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: calc(100% - 56px);
  max-width: 158px;
  height: calc(100% - 10px);
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease;
}

.device-search-shell-logo-visible .device-search-logo-overlay {
  opacity: 1;
}

.device-search-shell:has(.device-search-input:placeholder-shown):not(:focus-within) .device-search-logo-overlay {
  opacity: 1;
}

.device-search-shell-logo-visible .device-search-input::placeholder {
  color: transparent;
}

.device-search-shell:focus-within .device-search-logo-overlay,
.device-search-shell-has-value .device-search-logo-overlay {
  opacity: 0;
}

.device-search-shell:focus-within {
  outline-color: rgba(150, 228, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(244, 253, 255, 0.12), 0 0 11px rgba(42, 168, 255, 0.14);
}

.device-search-icon {
  position: relative;
  z-index: 2;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
  color: rgba(211, 232, 239, 0.74);
}

.device-search-input {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.device-search-input::placeholder {
  color: rgba(203, 213, 225, 0.56);
}

.device-search-input::-webkit-search-decoration,
.device-search-input::-webkit-search-cancel-button {
  display: none;
}

.device-locations-list {
  width: calc(100% - 32px);
  background: transparent;
  padding: 0;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  overflow-y: scroll; /* Always show scrollbar to reserve space for consistent width */
  overflow-x: hidden;
  margin: 0 auto;
  /* Firefox scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.qrm-native-scroll-hidden {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.qrm-native-scroll-hidden::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.qrm-custom-scrollbar {
  position: absolute;
  top: 0;
  right: 2px;
  width: 6px;
  min-height: 0;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.qrm-custom-scrollbar.hidden {
  opacity: 0;
  pointer-events: none;
}

.qrm-custom-scrollbar-host:hover .qrm-custom-scrollbar:not(.hidden),
.device-locations-section:hover .qrm-custom-scrollbar:not(.hidden),
.qrm-custom-scrollbar:not(.hidden):hover,
.qrm-custom-scrollbar.dragging:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.qrm-custom-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  min-height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(125, 218, 255, 0.95), rgba(66, 201, 255, 0.86), rgba(42, 168, 255, 0.78));
  box-shadow: 0 0 8px rgba(66, 201, 255, 0.34), inset 0 0 0 1px rgba(244, 253, 255, 0.26);
  cursor: pointer;
}

.qrm-custom-scrollbar-thumb:hover,
.qrm-custom-scrollbar.dragging .qrm-custom-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(190, 240, 255, 0.98), rgba(92, 214, 255, 0.94), rgba(42, 168, 255, 0.88));
  box-shadow: 0 0 12px rgba(66, 201, 255, 0.46), inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.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;
  margin: 0;
}

.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;
}

/* Location-specific alignment - align with dropdown menu */
.device-locations-list[data-location="crestview"] {
  padding: 0;
}

.device-location-wrapper {
  margin-bottom: 2px;
}

.view-all-location-section {
  padding: 1px 0;
  margin-bottom: 20px;
}

.view-all-location-section:last-child {
  margin-bottom: 4px;
}

.view-all-location-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin: 0 0 8px 0;
  padding: 1px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--text-primary);
  text-transform: none;
  text-align: center;
  box-sizing: border-box;
}

.view-all-location-divider {
  display: none;
}

.device-location-wrapper[hidden],
.device-accordion-wrapper[hidden] {
  display: none !important;
}

.device-location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 10px;
  margin: 0 0 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.05;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  outline: none;
}

.device-location-item:focus {
  outline: none;
  box-shadow: none;
}

.device-location-item:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

.device-location-item.active {
  background: transparent;
  border-color: transparent;
}

.device-location-item.active:hover {
  background: transparent;
  border-color: transparent;
}

.device-location-item .location-name {
  flex: 1;
  text-align: left;
  padding-left: 0;
}

.device-location-item .toggle-icon {
  margin-left: auto;
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
  opacity: 0;
  transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
  display: inline-block;
  flex-shrink: 0;
}

.device-location-item:hover .toggle-icon,
.device-location-item:focus-visible .toggle-icon,
.device-location-item.active:hover .toggle-icon {
  opacity: 1;
  color: #8ef0ff;
}

.device-location-content {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid #333;
  position: relative;
  border-radius: 6px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 8px;
  display: none;
  transition: none;
  overflow: visible;
}


.device-location-item:hover + .device-location-content {
  border-color: rgba(142, 240, 255, 0.9);
}

.device-location-content .content-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.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 6px 2px;
  margin: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: none;
  cursor: pointer;
}

.device-location-content .device-item .device-ellipsis-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  opacity: 0.5;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* Empty groups (no devices) shown via "Show All Groups": dimmed + disabled. */
.device-location-item.device-location-empty,
.device-location-item.device-location-empty .toggle-icon {
  cursor: not-allowed;
}
.device-location-item.device-location-empty .location-name {
  opacity: 0.4;
  color: var(--text-secondary);
}
/* Inactive device cells cannot expand telemetry via the three-dot button. */
.device-location-content .device-item .device-ellipsis-icon.device-ellipsis-disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.device-location-content .device-item .device-ellipsis-icon svg {
  width: 16px;
  height: 16px;
}

.device-location-content .device-item .device-ellipsis-icon:hover {
  color: var(--accent-cyan);
  opacity: 0.8;
}

.device-location-content .device-accordion-wrapper:last-child > .device-item {
  border-bottom: none;
}

.location-layer[data-top-location="view-all"] .device-location-item {
  font-size: 14px;
}

.location-layer:not([data-top-location="view-all"]) .device-location-item {
  font-size: 14px;
}

.location-layer[data-top-location="view-all"] .device-location-item .location-name {
  font-weight: 700;
}

.location-layer .device-location-item,
.location-layer .device-location-item.active,
.location-layer .device-location-item:hover,
.location-layer .device-location-item.active:hover {
  position: relative;
  margin-bottom: 8px;
  border-color: transparent;
  box-shadow: none;
}

.location-layer .device-location-item::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(42, 168, 255, 0.08) 10%, rgba(66, 201, 255, 0.32) 28%, rgba(125, 218, 255, 0.42) 50%, rgba(66, 201, 255, 0.32) 72%, rgba(42, 168, 255, 0.08) 90%, transparent 100%);
  pointer-events: none;
}

.location-layer[data-top-location="view-all"] .device-location-content::after,
.location-layer:not([data-top-location="view-all"]) .device-location-content::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: calc(100% + 5px);
  height: 1px;
  background: linear-gradient(90deg, rgba(125, 218, 255, 0.08) 0%, rgba(125, 218, 255, 0.42) 18%, rgba(190, 240, 255, 0.68) 50%, rgba(125, 218, 255, 0.42) 82%, rgba(125, 218, 255, 0.08) 100%);
  pointer-events: none;
}

.location-layer[data-top-location="view-all"] .view-all-location-body::after {
  display: none;
}

.device-location-content .device-item:hover {
  background: rgba(255, 255, 255, 0.1);
  outline-color: rgba(160, 245, 255, 0.72);
}

.device-location-content .device-item.device-item-selected {
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.30), rgba(18, 214, 168, 0.18));
  outline-color: rgba(160, 245, 255, 0.72);
}

.device-location-content .device-item.device-item-selected:hover {
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.40), rgba(18, 214, 168, 0.26));
  outline-color: rgba(185, 252, 255, 0.86);
}

/* First device: rounded top corners on hover or selected */
.device-location-content .device-accordion-wrapper:first-child > .device-item:hover,
.device-location-content .device-accordion-wrapper:first-child > .device-item.device-item-selected {
  border-radius: 6px 6px 0 0;
}

/* Last device: rounded bottom corners on hover or selected */
.device-location-content .device-accordion-wrapper:last-child > .device-item:hover,
.device-location-content .device-accordion-wrapper:last-child > .device-item.device-item-selected {
  border-radius: 0 0 6px 6px;
}

/* Only device: all corners rounded on hover or selected */
.device-location-content .device-accordion-wrapper:only-child > .device-item:hover,
.device-location-content .device-accordion-wrapper:only-child > .device-item.device-item-selected {
  border-radius: 6px;
}

.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: 6px;
  flex-shrink: 0;
  transition: color 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.dash-gateway-device .device-name::after {
  content: ' (GW)';
  white-space: nowrap;
}
.device-location-content .device-item.dash-gateway-device .device-name {
  color: #8de7ff;
  text-shadow: 0 0 3px rgba(141, 231, 255, 0.48);
}

.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;
}

.device-location-content .device-item .device-power-icon {
  width: 22px;
  height: 22px;
  color: rgba(255, 0, 0, 0.6);
  transition: color 0.2s ease, background-color 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);
}

/* 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;
  gap: 10px;
  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-submenu-wrap {
  position: relative;
}

.device-context-menu-submenu-trigger {
  justify-content: flex-start;
}

.device-context-menu-arrow {
  margin-left: auto;
  opacity: 0.72;
}

.device-context-menu-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -4px;
  min-width: 128px;
  padding: 4px 0;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.device-context-menu-submenu-wrap:hover .device-context-menu-submenu {
  display: block;
}

.device-context-menu-check {
  width: 14px;
  flex: 0 0 14px;
  color: var(--accent-cyan);
  font-weight: 700;
}

.dash-dev-menu i,
.dash-dev-menu svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--text-secondary);
}

.dash-dev-menu button:hover i,
.dash-dev-menu button:hover svg {
  color: var(--accent-cyan);
}
.device-context-menu-item i,
.device-context-menu-item svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-right: 0;
  color: var(--text-secondary);
}

.device-context-menu-item:hover i,
.device-context-menu-item:hover svg {
  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 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  color: var(--text-secondary);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
  padding: 10px;
}

.device-location-content.device-view-slide .device-accordion-wrapper,
.device-location-content.device-view-slide .no-devices {
  animation: qrmDeviceViewSlideDown 0.26s ease-out both;
}

/* Device Accordion Wrapper — groups device-item + accordion panel */
.device-accordion-wrapper {
  position: relative;
}

.device-accordion-wrapper.accordion-open > .device-item {
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.24), rgba(18, 214, 168, 0.14));
  outline: none !important;
  border: 1px solid rgba(90, 220, 255, 0.38);
  border-bottom: none;
  border-radius: 0;
}

.device-accordion-wrapper.accordion-open:hover > .device-item,
.device-accordion-wrapper.accordion-open > .device-item.device-item-selected {
  border-color: rgba(160, 245, 255, 0.72);
  border-bottom: none;
}

/* Only the first item in the list gets rounded top corners */
.device-location-content .device-accordion-wrapper.accordion-open:first-child > .device-item {
  border-radius: 6px 6px 0 0;
}

/* When the accordion is open, keep the last cell's bottom corners square so it
   stays flush with the panel below — even while hovered or selected. This beats
   the last-child :hover / .device-item-selected rounded-bottom rules. */
.device-location-content .device-accordion-wrapper.accordion-open:last-child > .device-item,
.device-location-content .device-accordion-wrapper.accordion-open:last-child > .device-item:hover,
.device-location-content .device-accordion-wrapper.accordion-open:last-child > .device-item.device-item-selected {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.device-accordion-wrapper.accordion-open > .device-item:hover {
  outline: none !important;
}

.device-location-item.sidebar-context-target,
.device-location-item.sidebar-context-target:hover,
.device-location-item.sidebar-context-target.active,
.device-location-item.sidebar-context-target.active:hover,
.device-location-content .device-item.sidebar-context-target,
.device-location-content .device-item.sidebar-context-target:hover,
.device-location-content .device-item.sidebar-context-target.device-item-selected,
.device-location-content .device-item.sidebar-context-target.device-item-selected:hover,
.device-accordion-wrapper.accordion-open > .device-item.sidebar-context-target,
.device-accordion-wrapper.accordion-open > .device-item.sidebar-context-target:hover,
.device-accordion-wrapper.accordion-open > .device-item.sidebar-context-target.device-item-selected {
  outline: 2px solid rgba(255, 214, 48, 0.98) !important;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 160, 0.36), 0 0 10px rgba(255, 214, 48, 0.34);
}

.device-accordion-wrapper.accordion-open > .device-item .device-ellipsis-icon {
  color: var(--accent-cyan);
  opacity: 1;
}

.device-accordion-panel {
  display: none;
  --device-accordion-border-color: rgba(90, 220, 255, 0.38);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 10px 8px 22px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  border: 1px solid var(--device-accordion-border-color);
  border-top: none;
  border-radius: 0;
}

.device-accordion-wrapper.accordion-open:hover > .device-accordion-panel,
.device-accordion-wrapper.accordion-open > .device-item.device-item-selected + .device-accordion-panel {
  border-color: rgba(160, 245, 255, 0.72);
  border-top: none;
}

/* Only the last item in the list gets rounded bottom corners on its panel */
.device-location-content .device-accordion-wrapper.accordion-open:last-child > .device-accordion-panel {
  border-radius: 0 0 6px 6px;
}

.device-accordion-wrapper.accordion-open > .device-accordion-panel {
  display: block;
}

.device-accordion-panel .accordion-row {
  display: flex;
  gap: 6px;
  padding: 2px 0;
}

.device-accordion-panel .accordion-label {
  color: var(--text-secondary);
  opacity: 0.5;
  white-space: nowrap;
  min-width: 55px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.5px;
  padding-top: 1px;
}

.device-accordion-panel .accordion-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 11px;
  word-break: break-all;
}

/* ===== PC Telemetry Accordion Panel ===== */
.pc-telemetry-panel {
  padding: 0 6px 0 6px !important;
}

.pc-telemetry-panel:has(.pc-network-status-header) {
  padding-bottom: 0 !important;
}

.pc-section {
  position: relative;
  padding-bottom: 0;
  margin-bottom: 0;
}

.pc-section::before {
  content: '';
  position: absolute;
  left: -7px;
  right: -7px;
  top: 0;
  height: 1px;
  background: var(--device-accordion-border-color, rgba(90, 220, 255, 0.38));
  pointer-events: none;
}

.pc-section::after {
  content: '';
  position: absolute;
  left: -7px;
  right: -7px;
  bottom: 0;
  height: 1px;
  background: var(--device-accordion-border-color, rgba(90, 220, 255, 0.38));
  pointer-events: none;
}

.pc-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.pc-section:last-child::after {
  display: block;
}

.pc-section-header {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  box-sizing: border-box;
  overflow: visible;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-size: 9px;
  color: var(--accent-cyan);
  padding: 3px 5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin: 0 -7px;
  padding-left: 6px;
  background: transparent;
  border-radius: 0;
  opacity: 0.85;
}

.pc-section-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--device-accordion-border-color, rgba(90, 220, 255, 0.38));
  z-index: 1;
  pointer-events: none;
}

.pc-network-status-header {
  min-height: 24px;
  padding-right: 30px;
  margin-bottom: 0;
  box-shadow: none;
  cursor: default;
}

.pc-drive-load-header {
  min-height: 24px;
  padding-right: 30px;
  margin-bottom: 0;
}

.pc-drive-load-header .pc-section-title,
.pc-drive-header-value {
  position: relative;
  z-index: 2;
}

.pc-drive-header-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 0;
  opacity: 0.32;
  z-index: 0;
  pointer-events: none;
  transition: width 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: barGlow 4s ease-in-out infinite;
}

.pc-drive-header-value {
  position: absolute;
  right: 6px;
  top: 50%;
  min-width: 42px;
  transform: translateY(-50%);
  text-align: right;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.pc-drive-header-value.status-ok {
  color: rgba(76, 175, 80, 0.9);
}

.pc-drive-header-value.status-caution {
  color: rgba(255, 193, 7, 0.95);
}

.pc-drive-header-value.status-critical {
  color: rgba(244, 67, 54, 0.95);
}

.pc-network-status-header::after {
  display: block;
}

.pc-section:has(.pc-network-status-header)::after {
  display: block;
}

.pc-section:has(.pc-drive-load-header) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.pc-section:has(.pc-drive-load-header):not(:last-child)::after {
  display: block;
  left: -7px;
  right: -7px;
}

.pc-section:has(.pc-network-status-header) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.pc-section:has(.pc-network-status-header):not(:last-child) {
  box-shadow: none;
}

.pc-section:has(.pc-network-status-header):not(:last-child)::after {
  display: block;
  left: -7px;
  right: -7px;
  background: var(--device-accordion-border-color, rgba(90, 220, 255, 0.38));
  z-index: 3;
}

.pc-section-title {
  flex: 1 1 auto;
  min-width: 0;
  transform: translateY(-2px);
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pc-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: rgba(90, 220, 255, 0.9);
  opacity: 0.9;
  transform: translateY(-1px);
}

.pc-section-icon svg,
.pc-section-icon i {
  width: 14px;
  height: 14px;
  stroke-width: 2.2px;
}

.pc-drive-load-header .pc-section-title,
.pc-network-status-header .pc-section-title {
  transform: none;
}

.pc-section-title::-webkit-scrollbar {
  display: none;
}

.pc-network-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 7px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  flex: 0 0 auto;
  z-index: 2;
}

.pc-network-status-icon svg,
.pc-network-status-icon i {
  width: 22px;
  height: 22px;
  stroke-width: 2.5px;
}

.pc-section-header::-webkit-scrollbar {
  display: none;
}

.pc-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px 3px 13px;
  margin-left: -7px;
  margin-right: -7px;
  border: none;
  border-radius: 4px;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease;
}

.pc-metric-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pc-network-detail-row {
  display: grid;
  grid-template-columns: minmax(116px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  padding: 3px 7px 3px 13px;
  margin-left: -7px;
  margin-right: -7px;
  position: relative;
  cursor: default;
}

.pc-network-detail-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pc-network-detail-label {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 10px;
  opacity: 0.75;
  white-space: nowrap;
  overflow-x: hidden;
  overflow-y: hidden;
  text-overflow: clip;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pc-network-detail-label::-webkit-scrollbar {
  display: none;
}

.pc-network-detail-value {
  min-width: max-content;
  color: var(--text-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
  padding-right: 0;
  overflow: hidden;
  text-overflow: clip;
}

.pc-network-detail-value.status-ok {
  color: rgba(76, 175, 80, 0.9);
}

.pc-network-detail-value.status-caution {
  color: rgba(255, 193, 7, 0.95);
}

.pc-network-detail-value.status-critical {
  color: rgba(244, 67, 54, 0.95);
}

.pc-metric-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: calc(100% - 48px);
}

.pc-metric-dot {
  color: var(--text-secondary);
  font-size: 6px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 14px;
  text-align: center;
  opacity: 0.4;
}

.pc-metric-label {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  opacity: 0.75;
}

.pc-metric-value {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 8px;
  letter-spacing: 0.3px;
}

.pc-metric-value.status-ok {
  color: rgba(76, 175, 80, 0.9);
}

.pc-metric-value.status-caution {
  color: rgba(255, 193, 7, 0.95);
}

.pc-metric-value.status-critical {
  color: rgba(244, 67, 54, 0.95);
}

.pc-metric-row-has-bar .pc-metric-label,
.pc-metric-row-has-bar .pc-metric-value {
  font-size: 9px;
}

.pc-metric-row-has-bar .pc-metric-value {
  letter-spacing: 0.2px;
}

.pc-telemetry-panel .pc-metric-row-has-bar,
.ups-telemetry-panel .pc-metric-row-has-bar,
.sw-telemetry-panel .pc-metric-row-has-bar {
  padding-top: 1px;
  padding-bottom: 1px;
}

/* PC Metric Hover Tooltip */
.pc-metric-tooltip {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 100;
  background: rgba(15, 15, 25, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 188, 212, 0.3);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 9px;
  color: var(--text-primary);
  white-space: pre;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.pc-metric-row:hover .pc-metric-tooltip {
  display: block;
}

/* Suppress tooltips when a context menu is open */
body.context-menu-open .pc-metric-row:hover .pc-metric-tooltip {
  display: none !important;
}

.pc-telemetry-panel .pc-metric-row {
  border: none;
  margin-bottom: 1px;
  padding: 3px 6px 3px 13px;
}

.pc-telemetry-panel .pc-metric-row.pc-metric-row-has-bar,
.ups-telemetry-panel .pc-metric-row.pc-metric-row-has-bar,
.sw-telemetry-panel .pc-metric-row.pc-metric-row-has-bar {
  padding-top: 1px;
  padding-bottom: 1px;
}

.pc-telemetry-panel .pc-metric-row:last-child {
  margin-bottom: 0;
}

.pc-telemetry-panel .pc-metric-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pc-metric-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 0;
  opacity: 0.32;
  z-index: 0;
  pointer-events: none;
  transition: width 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: barGlow 4s ease-in-out infinite;
}

@keyframes barGlow {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.38; }
}

.pc-metric-left,
.pc-metric-value {
  position: relative;
  z-index: 1;
}

.pc-telemetry-panel .pc-metric-row .pc-metric-value,
.ups-telemetry-panel .pc-metric-row .pc-metric-value,
.sw-telemetry-panel .pc-metric-row .pc-metric-value {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== End PC Telemetry ===== */

/* ===== UPS Telemetry Accordion Panel ===== */
.ups-telemetry-panel {
  padding: 4px 6px 6px 6px !important;
}

.ups-telemetry-panel .pc-metric-row {
  border: none;
  margin-bottom: 1px;
  padding: 3px 6px;
  border-radius: 4px;
}

.ups-telemetry-panel .pc-metric-row:last-child {
  margin-bottom: 0;
}

.ups-telemetry-panel .pc-metric-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
/* ===== End UPS Telemetry ===== */

/* ===== Switch Telemetry Accordion Panel ===== */
.sw-telemetry-panel {
  padding: 4px 6px 6px 6px !important;
}

.sw-telemetry-panel .pc-metric-row {
  border: none;
  margin-bottom: 1px;
  padding: 3px 6px;
}

.sw-telemetry-panel .pc-metric-row:last-child {
  margin-bottom: 0;
}

.sw-telemetry-panel .pc-metric-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sw-port-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.sw-port-icon svg {
  width: 20px;
  height: 20px;
}

.sw-port-divider {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin: 4px 0;
}
/* ===== End Switch Telemetry ===== */

/* ===== Sidebar Metric Alert Context Menu ===== */
.sidebar-metric-context-menu {
  position: fixed;
  display: none;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 4px 0;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  font-size: 12px;
  color: var(--text-primary);
}

.sidebar-metric-context-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-primary);
}

.sidebar-metric-context-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-metric-context-menu-item i,
.sidebar-metric-context-menu-item svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.sidebar-metric-context-menu-item:hover i,
.sidebar-metric-context-menu-item:hover svg {
  color: var(--accent-cyan);
}

/* Bell-off icon on sidebar metric rows — replaces the dot on the left */
.sidebar-bell-off {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  line-height: 1;
}

.sidebar-bell-off svg {
  width: 14px;
  height: 14px;
  color: #f44336;
  stroke: #f44336;
  stroke-width: 2px;
  filter: drop-shadow(1px 0 0 white)
         drop-shadow(-1px 0 0 white)
         drop-shadow(0 1px 0 white)
         drop-shadow(0 -1px 0 white);
}
/* ===== End Sidebar Metric Alert Context Menu ===== */

.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;
  margin: 0;
}
.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;
  width: 0;
  height: 0;
}
/* 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: calc(var(--sidebar-width) + var(--dashboard-container-padding));
  right: var(--dashboard-container-padding);
  top: auto !important;
  z-index: 50;
  background: var(--bottombar-bg);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border-top: none;
  overflow: hidden;
  padding: 0 var(--main-content-gutter) 0 calc(10px * var(--qrm-scale));
  height: var(--bottom-bar-height);
  display: flex;
  align-items: center;
}

.bottom-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: conic-gradient(from var(--qrm-ring-angle, 0deg), transparent 0deg, rgba(42, 168, 255, 0.14) 48deg, rgba(125, 218, 255, 0.74) 76deg, rgba(255, 255, 255, 0.68) 92deg, rgba(66, 201, 255, 0.34) 118deg, transparent 156deg, transparent 360deg);
  border-radius: inherit;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
}

.bottom-bar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--bottombar-bg);
  pointer-events: none;
  z-index: 2;
}

body:has(.forecast-popup.show) .bottom-bar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Forecast Popup */
.forecast-popup {
  position: fixed;
  bottom: var(--bottom-bar-height);
  left: calc(var(--sidebar-width) + var(--dashboard-container-padding));
  right: var(--dashboard-container-padding);
  height: 120px;
  background: var(--bottombar-bg);
  backdrop-filter: blur(12px);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  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);
  overflow: hidden;
}

.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;
  margin-right: 52px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.time-zone {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  height: 100%;
}

.bottom-bar .time-zone {
  min-width: 0;
  grid-template-columns: calc(40px * var(--qrm-scale)) minmax(0, auto) calc(18px * var(--qrm-scale)) calc(55px * var(--qrm-scale)) !important;
  grid-template-rows: repeat(3, calc(16px * var(--qrm-scale))) !important;
  column-gap: calc(8px * var(--qrm-scale)) !important;
  font-size: calc(12px * var(--qrm-scale)) !important;
  line-height: 1 !important;
  padding-top: calc(10px * var(--qrm-scale)) !important;
}

.bottom-bar .time-zone:first-child {
  grid-template-columns: calc(40px * var(--qrm-scale)) minmax(0, auto) !important;
  column-gap: calc(12px * var(--qrm-scale)) !important;
}

.bottom-bar .timezone-label {
  min-width: 0;
  overflow: hidden;
  padding-right: calc(8px * var(--qrm-scale)) !important;
  font-size: calc(16px * var(--qrm-scale)) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-bar .time-zone span,
.bottom-bar .time-zone div {
  min-width: 0;
}

.bottom-bar .time-zone [id$="-date"],
.bottom-bar .time-zone [id$="-time"] {
  padding-right: calc(8px * var(--qrm-scale)) !important;
  font-size: calc(12px * var(--qrm-scale)) !important;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.bottom-bar .time-zone svg,
.bottom-bar .time-zone i {
  width: calc(16px * var(--qrm-scale)) !important;
  height: calc(16px * var(--qrm-scale)) !important;
}

.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;
}

.bottom-bar .timezone-flag-container,
.bottom-bar .timezone-flag,
.bottom-bar #earth-canvas {
  width: calc(40px * var(--qrm-scale)) !important;
  height: calc(40px * var(--qrm-scale)) !important;
}

/* 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;
}

.js-plotly-plot .hoverlayer,
.js-plotly-plot .hovertext,
.plot-container .hoverlayer,
.plot-container .hovertext {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body.qrm-telemetry-view-active .telemetry-layout .js-plotly-plot .hoverlayer,
body.qrm-telemetry-view-active .telemetry-layout .js-plotly-plot .hovertext,
body.qrm-telemetry-view-active #telemetry-card .js-plotly-plot .hoverlayer,
body.qrm-telemetry-view-active #telemetry-card .js-plotly-plot .hovertext,
body.qrm-telemetry-view-active #dash-telemetry-card .js-plotly-plot .hoverlayer,
body.qrm-telemetry-view-active #dash-telemetry-card .js-plotly-plot .hovertext {
  display: inline !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.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) and (min-width: 1920px) {
  .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) and (min-width: 1920px) {
  .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;
  overflow: hidden;
}

.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: center;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52px;
  height: auto;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
  min-width: 52px;
  border-left: none;
  flex-shrink: 0;
  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(66, 201, 255, 0.28) 50%, transparent 100%);
  background-size: 100% 220%;
  background-position: 50% 50%;
}

.temp-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 52px;
}

.temp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 52px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 52px;
  overflow: hidden;
  position: relative;
}

.temp-btn svg,
.temp-btn .temp-unit-icon {
  display: block;
}

.temp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--temp-next-bg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.temp-btn span {
  position: relative;
  z-index: 1;
  display: inline-block;
  line-height: 1;
  pointer-events: none;
}

.temp-unit-icon {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  pointer-events: none;
}

.temp-btn.temp-unit-c {
  --temp-current-bg: linear-gradient(135deg, rgba(42, 168, 255, 0.18), rgba(66, 201, 255, 0.24));
  --temp-hover-bg: linear-gradient(135deg, rgba(42, 168, 255, 0.24), rgba(66, 201, 255, 0.32));
  --temp-hover-shadow: 0 0 10px rgba(42, 168, 255, 0.12), inset 0 0 8px rgba(125, 218, 255, 0.05);
}

.temp-btn.temp-unit-f {
  --temp-current-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(245, 158, 11, 0.34));
  --temp-hover-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.52), rgba(245, 158, 11, 0.5));
  --temp-hover-shadow: 0 0 14px rgba(245, 158, 11, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.07);
}

.temp-btn:hover {
  background: linear-gradient(180deg, rgba(42, 168, 255, 0.08) 0%, rgba(66, 201, 255, 0.18) 50%, rgba(42, 168, 255, 0.08) 100%);
  border: 0;
  color: var(--text-primary);
  box-shadow: inset 0 0 18px rgba(66, 201, 255, 0.14), 0 0 10px rgba(42, 168, 255, 0.12);
  transform: none;
}

.temp-btn:hover .temp-unit-icon,
.temp-btn:hover svg,
.temp-btn:hover span {
  filter: drop-shadow(0 0 5px rgba(125, 218, 255, 0.45));
}

.temp-btn.active {
  color: var(--text-primary);
  background: transparent;
  border: 0;
}

.temp-btn.active:hover {
  background: linear-gradient(180deg, rgba(42, 168, 255, 0.08) 0%, rgba(66, 201, 255, 0.18) 50%, rgba(42, 168, 255, 0.08) 100%);
  box-shadow: inset 0 0 18px rgba(66, 201, 255, 0.14), 0 0 10px rgba(42, 168, 255, 0.12);
}

.temp-btn:focus {
  outline: none;
  box-shadow: none;
}

.temp-btn:active {
  outline: none;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.18), 0 0 8px rgba(42, 168, 255, 0.1);
  transform: translateY(0);
}

.temp-btn.temp-swipe-left span {
  animation: tempUnitSwipeLeft 0.24s ease both;
}

.temp-btn.temp-swipe-right span {
  animation: tempUnitSwipeRight 0.24s ease both;
}

.temp-btn.temp-color-swipe {
  background: var(--temp-prev-bg) !important;
}

.temp-btn.temp-color-swipe.temp-swipe-left::before {
  opacity: 1;
  animation: tempColorSwipeLeft 0.24s ease both;
}

.temp-btn.temp-color-swipe.temp-swipe-right::before {
  opacity: 1;
  animation: tempColorSwipeRight 0.24s ease both;
}

@keyframes tempUnitSwipeLeft {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  42% {
    opacity: 0;
    transform: translateX(-18px);
  }
  43% {
    opacity: 0;
    transform: translateX(18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes tempUnitSwipeRight {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  42% {
    opacity: 0;
    transform: translateX(18px);
  }
  43% {
    opacity: 0;
    transform: translateX(-18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes tempColorSwipeLeft {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes tempColorSwipeRight {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Main Content */
.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: var(--sidebar-width);
  padding-top: var(--top-bar-height);
  padding-bottom: var(--bottom-spacing);
  height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height) - var(--bottom-spacing));
  max-height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height) - 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: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height) - var(--bottom-spacing));
  box-sizing: border-box;
}

.content-area {
  height: 100%;
  min-height: 0;
}

#page-content {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Keep Dashboard main card content consistent across tab switches */
#main-dashboard-card .card-content {
  position: relative;
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !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,
#dash-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;
}

/* Hide scroll bars for dashboard tab - override the forced scroll bars */
.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;
}

/* Legacy Dashboard (templates/index.html) — fix the RIGHT section box height */
#RightColumnDashBoard .dashboard-panel {
  height: var(--section-box-height) !important;
  min-height: var(--section-box-height) !important;
  max-height: var(--section-box-height) !important;
  overflow: auto;
}

/* Make the tab content tables fill the panel and scroll internally */
#fenetworkroomtable,
#dashlabtable,
#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: var(--dashboard-container-padding);
  margin-bottom: 0;
}

.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: 0;
}

/* 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;
}

/* 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 {
  position: relative;
  background: var(--dashboard-panel-bg);
  border-color: rgba(66, 201, 255, 0.22);
  overflow: hidden;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#main-dashboard-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: conic-gradient(from var(--qrm-ring-angle, 0deg), transparent 0deg, rgba(42, 168, 255, 0.12) 48deg, rgba(125, 218, 255, 0.68) 78deg, rgba(255, 255, 255, 0.56) 94deg, rgba(66, 201, 255, 0.3) 124deg, transparent 164deg, transparent 360deg);
  border-radius: inherit;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

#main-dashboard-card:has(.network-2d-container) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
  transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.4s ease, border-color 0.2s ease;
}

#main-dashboard-card:has(.network-2d-container):hover {
  border-color: var(--border-primary);
}

#main-dashboard-card:has(.dash-visual-layout) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dash-map-active #main-dashboard-card {
  background: transparent;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

body.dash-map-active .dashboard-container {
  pointer-events: none;
}

body.dash-map-active .sidebar,
body.dash-map-active .top-bar,
body.dash-map-active .bottom-bar,
body.dash-map-active .dash-visual-header-panel,
body.dash-map-active .dash-visual-header-panel * {
  pointer-events: auto;
}

body.dash-map-active .content-area {
  pointer-events: none;
}

body.dash-map-active .main-content.dashboard-no-scroll {
  pointer-events: none;
}

body.dash-map-active #page-content {
  pointer-events: none;
}

body.dash-map-active #main-dashboard-content.dashboard-no-scroll {
  pointer-events: none;
}

#main-dashboard-card:has(.dash-visual-layout)::before {
  display: none;
}

#main-dashboard-card:has(.dash-visual-layout) .card-header {
  display: none;
}

#main-dashboard-content:has(.network-2d-container) {
  isolation: isolate;
  contain: paint;
}

#main-dashboard-content:has(.dash-visual-layout) {
  display: flex !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

body.dash-map-active #main-dashboard-card .card-content.dashboard-no-scroll,

.dash-visual-layout {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: var(--main-content-gutter);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Full-width bar under the RAM / Storage / Network boxes (same gap, height of the bottom bar). */
.telemetry-bottom-box {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16px * var(--qrm-scale));
  padding: 0 calc(20px * var(--qrm-scale));
  background: var(--dashboard-panel-bg);
  border: 1px solid rgba(66, 201, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(92, 206, 255, 0.1);
  overflow: hidden;
}

.telemetry-bottom-location {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: calc(18px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.02em;
}

.telemetry-bottom-right {
  display: flex;
  align-items: center;
  gap: calc(16px * var(--qrm-scale));
  flex: 0 0 auto;
}

.telemetry-bottom-datetime {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: calc(10px * var(--qrm-scale));
  line-height: 1.15;
  color: rgba(235, 245, 255, 0.92);
  font-size: calc(16px * var(--qrm-scale));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.telemetry-bottom-power {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(30px * var(--qrm-scale));
  height: calc(30px * var(--qrm-scale));
  flex: 0 0 auto;
}

.telemetry-bottom-power .dash-right-power-icon {
  width: calc(28px * var(--qrm-scale));
  height: calc(28px * var(--qrm-scale));
}

.dash-visual-layout.dash-visual-mode-map {
  overflow: visible;
  pointer-events: none;
}

/* Bottom bar shows only in the TELEMETRY section: hide it (and collapse its row)
   when LOCATION (map) mode is active or the DEVICES panel is open. */
.dash-visual-layout.dash-visual-mode-map .telemetry-bottom-box,
.dash-visual-layout.dash-visual-devices-open .telemetry-bottom-box {
  display: none;
}

.dash-visual-layout.dash-visual-mode-map,
.dash-visual-layout.dash-visual-devices-open {
  grid-template-rows: minmax(0, 1fr);
}

.dash-world-map {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #061118;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}


.dash-visual-layout.dash-visual-mode-map .dash-world-map {
  opacity: 1;
  pointer-events: auto;
}

body.dash-map-active > .dash-world-map {
  opacity: 1;
  pointer-events: auto;
}

.dash-world-map .leaflet-container,
.dash-world-map .leaflet-pane,
.dash-world-map .leaflet-tile-container {
  background: #dcecf5;
}

.dash-world-map.dash-world-map-theme-dark,
.dash-world-map.dash-world-map-theme-dark .leaflet-container,
.dash-world-map.dash-world-map-theme-dark .leaflet-pane,
.dash-world-map.dash-world-map-theme-dark .leaflet-tile-container {
  background: #07111f;
}

.dash-world-map.dash-world-map-theme-dark .leaflet-tile,
.dash-world-map .leaflet-tile.dash-map-dark-tiles {
  opacity: 1 !important;
  filter: sepia(0.72) hue-rotate(155deg) saturate(2) brightness(1.35) contrast(0.88) !important;
}

.sidebar-location-navigator {
  width: 100%;
  height: var(--sidebar-location-control-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: calc(16px * var(--qrm-scale)) minmax(0, 1fr) calc(16px * var(--qrm-scale));
  align-items: center;
  gap: 0;
}

.sidebar-location-control-slot {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--sidebar-location-control-height);
  min-height: var(--sidebar-location-control-height);
  max-height: var(--sidebar-location-control-height);
  position: relative;
}

.sidebar-location-cycle-btn {
  width: calc(16px * var(--qrm-scale));
  height: var(--sidebar-location-control-height);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(231, 236, 245, 0.86);
  cursor: pointer;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}

.sidebar-location-cycle-btn svg,
.sidebar-location-cycle-btn i {
  width: calc(18px * var(--qrm-scale));
  height: calc(18px * var(--qrm-scale));
}

.sidebar-location-cycle-btn:hover,
.sidebar-location-cycle-btn:focus-visible {
  color: #ffd83d;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.sidebar-location-cycle-btn:hover svg,
.sidebar-location-cycle-btn:focus-visible svg {
  filter: drop-shadow(0 0 2px rgba(255, 216, 61, 0.72));
}

/* A mouse click must not leave a glowing/focused box behind. */
.sidebar-location-cycle-btn:focus:not(:hover) {
  color: rgba(231, 236, 245, 0.86);
  background: transparent;
  box-shadow: none;
  outline: none;
}

.sidebar-add-location-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: calc(100% - 32px);
  min-height: 34px;
  margin: 0 auto;
  padding: 7px 13px;
  border: 0;
  border-radius: 5px;
  outline: 1px solid rgba(66, 201, 255, 0.24);
  outline-offset: -1px;
  background: rgba(7, 17, 28, 0.38);
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(244, 253, 255, 0.05), 0 0 8px rgba(42, 168, 255, 0.04);
}

.location-section.location-list-empty .location-dropdown {
  display: none;
}

.location-section.location-list-empty .sidebar-add-location-btn {
  display: flex;
}

.sidebar.sidebar-quick-overlay-open .sidebar-add-location-btn {
  display: none;
}

.sidebar-add-location-btn:hover,
.sidebar-add-location-btn:focus-visible {
  outline-color: rgba(150, 228, 255, 0.58);
  background: rgba(66, 201, 255, 0.14);
}

.sidebar-add-location-icon {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.sidebar-add-location-icon > svg:first-child,
.sidebar-add-location-icon > i:first-child {
  width: 20px;
  height: 20px;
}

.sidebar-add-location-icon > svg:last-child,
.sidebar-add-location-icon > i:last-child {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  padding: 1px;
  border-radius: 50%;
  background: #07152c;
  stroke-width: 3;
}

.sidebar-quick-location-controls {
  width: calc(100% - 32px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
  padding: 8px 0 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

.sidebar-quick-location-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 112px;
  min-width: 0;
  flex: 0 1 112px;
  height: 34px;
  padding: 6px 9px;
  box-sizing: border-box;
  border: 1px solid rgba(66, 201, 255, 0.38);
  border-radius: 999px;
  background: rgba(7, 17, 28, 0.52);
  color: rgba(231, 236, 245, 0.9);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(244, 253, 255, 0.04), 0 0 8px rgba(42, 168, 255, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.sidebar-quick-location-btn svg,
.sidebar-quick-location-btn i {
  width: 14px;
  height: 14px;
  margin-right: 0;
  flex: 0 0 14px;
  vertical-align: middle;
}

.sidebar-quick-location-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-quick-location-overlay-header {
  display: none;
  align-items: center;
  justify-content: center;
  gap: calc(9px * var(--qrm-scale));
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: var(--sidebar-location-control-height);
  min-height: var(--sidebar-location-control-height);
  max-height: var(--sidebar-location-control-height);
  flex: 0 0 var(--sidebar-location-control-height);
  border: 0;
  border-radius: 5px;
  outline: 1px solid rgba(66, 201, 255, 0.24);
  outline-offset: -1px;
  background: rgba(7, 17, 28, 0.38);
  color: #ffffff;
  font-family: 'Rajdhani', sans-serif;
  font-size: calc(15px * var(--qrm-scale));
  font-weight: 700;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar-quick-location-overlay-header span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-quick-location-overlay-header svg,
.sidebar-quick-location-overlay-header i {
  width: calc(18px * var(--qrm-scale));
  height: calc(18px * var(--qrm-scale));
}

.sidebar.sidebar-quick-overlay-open .location-dropdown {
  display: none;
}

.sidebar.sidebar-quick-overlay-open .location-section {
  padding-top: var(--sidebar-location-section-padding);
  padding-bottom: var(--sidebar-location-section-padding);
}

.sidebar.sidebar-quick-overlay-open .sidebar-quick-location-overlay-header {
  display: flex;
  height: var(--sidebar-location-control-height) !important;
  min-height: var(--sidebar-location-control-height) !important;
  max-height: var(--sidebar-location-control-height) !important;
}

.sidebar.sidebar-quick-overlay-open .device-locations-list {
  z-index: 8;
  animation: sidebarQuickAccordionRise 0.24s ease-out both;
}

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

.sidebar-quick-location-btn:hover,
.sidebar-quick-location-btn:focus-visible {
  border-color: rgba(125, 234, 255, 0.82);
  background: rgba(66, 201, 255, 0.2);
  color: #ffffff;
  box-shadow: inset 0 0 12px rgba(66, 201, 255, 0.13), 0 0 12px rgba(42, 168, 255, 0.2);
  outline: none;
}

.sidebar-quick-location-btn.active {
  border-color: rgba(125, 234, 255, 0.9);
  background: linear-gradient(90deg, rgba(34, 112, 213, 0.36), rgba(27, 190, 232, 0.2));
  color: #7deaff;
  box-shadow: inset 0 0 12px rgba(66, 201, 255, 0.14), 0 0 12px rgba(42, 168, 255, 0.16);
  text-shadow: 0 0 10px rgba(66, 201, 255, 0.46);
}

.sidebar.sidebar-quick-overlay-closing .device-locations-list {
  animation: sidebarQuickAccordionDrop 0.24s ease-in both;
}

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

#main-dashboard-card.contact-cards-only {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

#main-dashboard-card.contact-cards-only::before,
#main-dashboard-card.contact-cards-only > .card-header {
  display: none;
}

#main-dashboard-card.contact-cards-only > #main-dashboard-content {
  padding: 0 !important;
  overflow-y: auto !important;
}

#main-dashboard-card.contact-cards-only .contact-scroll-area {
  padding: clamp(8px, 1vw, 18px);
}

.dash-world-map .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.62);
  color: rgba(226, 245, 255, 0.68);
  font-size: 10px;
}

.dash-world-map .leaflet-control-attribution a {
  color: rgba(135, 218, 255, 0.82);
}

.dash-world-map.leaflet-grab,
.dash-world-map .leaflet-grab {
  cursor: default !important;
}

.dash-world-map.dash-world-map-dragging,
.dash-world-map.dash-world-map-dragging .leaflet-grab {
  cursor: default !important;
}

.dash-world-map.dash-map-hovering-location,
.dash-world-map.dash-map-hovering-location .leaflet-grab,
.dash-world-map.dash-map-hovering-location .leaflet-pane,
.dash-world-map.dash-map-hovering-location .leaflet-marker-pane,
.dash-world-map.dash-map-hovering-location .leaflet-marker-icon {
  cursor: pointer !important;
}

.dash-world-map .dash-map-location-label {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #42c9ff;
  font-size: calc(11px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(66, 201, 255, 0.75), 0 1px 2px rgba(0, 0, 0, 0.82);
}

.dash-world-map .dash-map-location-label::before {
  display: none;
}

.dash-visual-subpanel {
  min-width: 0;
  min-height: 0;
  background: var(--dashboard-panel-bg);
  border: 1px solid rgba(66, 201, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(92, 206, 255, 0.1);
  overflow: hidden;
}

.dash-visual-column,
.dash-visual-left-stack,
.dash-visual-middle-stack,
.dash-visual-right-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--main-content-gutter);
  min-width: 0;
  min-height: 0;
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-column {
  pointer-events: none;
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-header-panel {
  pointer-events: auto !important;
  box-shadow: none;
}

/* Single full-width box that slides in below the 3 top header boxes when DEVICES is clicked. */
.dash-visual-devices-panel {
  position: absolute;
  top: calc(var(--top-bar-height) + var(--main-content-gutter));
  left: 0;
  right: 0;
  z-index: 2;
  height: calc(100% - var(--top-bar-height) - var(--main-content-gutter));
  min-height: 0;
  background-color: #050f2a; /* opaque base so telemetry charts don't bleed through */
  background-image: var(--dashboard-panel-bg);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(92, 206, 255, 0.1);
  opacity: 0;
  transform: none;
  visibility: hidden;
  pointer-events: none;
}

.dash-visual-layout.dash-visual-devices-open .dash-visual-devices-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Directional horizontal slide transitions for the DEVICES box. */
.dash-visual-devices-panel.cv-dev-enter-left { animation: cvDevEnterLeft 0.48s cubic-bezier(0.22, 1, 0.36, 1) both; }
.dash-visual-devices-panel.cv-dev-enter-right { animation: cvDevEnterRight 0.48s cubic-bezier(0.22, 1, 0.36, 1) both; }
.dash-visual-devices-panel.cv-dev-exit-left { animation: cvDevExitLeft 0.48s cubic-bezier(0.55, 0, 0.2, 1) both; }
.dash-visual-devices-panel.cv-dev-exit-right { animation: cvDevExitRight 0.48s cubic-bezier(0.55, 0, 0.2, 1) both; }
@keyframes cvDevEnterLeft { from { opacity: 0; transform: translateX(-110%); } to { opacity: 1; transform: translateX(0); } }
@keyframes cvDevEnterRight { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: translateX(0); } }
@keyframes cvDevExitLeft { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-110%); } }
@keyframes cvDevExitRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(110%); } }

/* Telemetry boxes sliding to/from the right, paired with the DEVICES box. */
.dash-visual-layout.cv-boxes-out-right .dash-visual-body-panel,
.dash-visual-layout.cv-boxes-out-right .dash-visual-network-panel { animation: cvBoxesOutRight 0.48s cubic-bezier(0.55, 0, 0.2, 1) both; }
.dash-visual-layout.cv-boxes-in-right .dash-visual-body-panel,
.dash-visual-layout.cv-boxes-in-right .dash-visual-network-panel { animation: cvBoxesInRight 0.48s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cvBoxesOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(112%); } }
@keyframes cvBoxesInRight { from { opacity: 0; transform: translateX(112%); } to { opacity: 1; transform: translateX(0); } }

/* Map sliding left/in, paired with the DEVICES box. */
.dash-world-map.cv-map-out-left { animation: cvMapOutLeft 0.48s cubic-bezier(0.55, 0, 0.2, 1) both; }
.dash-world-map.cv-map-in-left { animation: cvMapInLeft 0.48s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cvMapOutLeft { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes cvMapInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }

/* DEVICES section owns the top-middle box: it shows the selected LOCATION name
   (or Unknown / View All) and the prev/next side buttons cycle locations. */
.dash-visual-layout.dash-visual-devices-open .dash-selected-device-title,
.dash-visual-layout.dash-visual-devices-open .dash-selected-device-title-center {
  visibility: visible !important;
}
.dash-visual-layout.dash-visual-devices-open .dash-device-nav-button {
  pointer-events: auto;
  opacity: 1;
  cursor: pointer;
}
.dash-visual-layout.dash-visual-devices-open .dash-device-nav-button.disabled,
.dash-visual-layout.dash-visual-devices-open .dash-device-nav-button:disabled {
  pointer-events: none;
  opacity: 0.32;
  cursor: default;
}
/* DEVICES section: right header box is empty for now. */
.dash-visual-layout.dash-visual-devices-open .dash-visual-right-header > * {
  display: none;
}
.dash-visual-layout.dash-visual-devices-open .dash-visual-right-header > .dash-section-button {
  display: flex;
  visibility: visible;
}
/* ...except the grid toggle button, which only appears in the DEVICES section. */
.dash-devices-grid-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(66, 201, 255, 0.32);
  border-radius: calc(8px * var(--qrm-scale));
  background: rgba(66, 201, 255, 0.08);
  color: rgba(226, 245, 255, 0.82);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.dash-devices-grid-toggle svg {
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
  stroke-width: 2;
}
.dash-devices-grid-toggle:hover {
  background: rgba(66, 201, 255, 0.16);
  color: #dff6ff;
  border-color: rgba(66, 201, 255, 0.55);
}
.dash-devices-grid-toggle.active {
  background: rgba(66, 201, 255, 0.24);
  border-color: rgba(92, 208, 255, 0.7);
  color: #eaffff;
  box-shadow: 0 0 10px rgba(66, 201, 255, 0.4);
}
.dash-visual-layout.dash-visual-devices-open .dash-visual-right-header > .dash-devices-grid-toggle {
  display: inline-flex;
  visibility: visible;
}
/* ---- DEVICES box chrome overlay: top page title, bottom pager, corner grid ---- */
.dash-devices-chrome {
  position: absolute;
  top: calc(var(--top-bar-height) + var(--main-content-gutter));
  left: 0;
  right: 0;
  height: calc(100% - var(--top-bar-height) - var(--main-content-gutter));
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.dash-visual-layout.dash-visual-devices-open .dash-devices-chrome {
  opacity: 1;
  visibility: visible;
}
.dash-devices-page-title {
  display: none;
  position: absolute;
  top: calc(14px * var(--qrm-scale));
  left: 50%;
  transform: translateX(-50%);
  color: #8ef0ff;
  font-size: calc(26px * var(--qrm-scale));
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 14px rgba(66, 201, 255, 0.55), 0 2px 10px rgba(0, 0, 0, 0.7);
}
.dash-devices-pager {
  display: none;
  position: absolute;
  bottom: calc(16px * var(--qrm-scale));
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: calc(16px * var(--qrm-scale));
  pointer-events: none;
}
.dash-devices-page-counter {
  color: #dff6ff;
  font-size: calc(14px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.12em;
  min-width: calc(52px * var(--qrm-scale));
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.dash-devices-page-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  padding: 0;
  border: 1px solid rgba(66, 201, 255, 0.32);
  border-radius: calc(8px * var(--qrm-scale));
  background: rgba(66, 201, 255, 0.08);
  color: rgba(226, 245, 255, 0.82);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.dash-devices-page-btn:hover {
  background: rgba(66, 201, 255, 0.16);
  color: #dff6ff;
  border-color: rgba(66, 201, 255, 0.55);
}
.dash-devices-page-btn svg {
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
  stroke-width: 2;
}
/* Grid toggle now lives in the DEVICES box bottom-right corner. */
.dash-devices-chrome .dash-devices-grid-toggle {
  display: inline-flex;
  visibility: visible;
  position: absolute;
  bottom: calc(16px * var(--qrm-scale));
  right: calc(16px * var(--qrm-scale));
  margin: 0;
  pointer-events: auto;
}
/* Left/right edge section chevrons (vertically centred), shown only on overflow. */
.dash-devices-section-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(40px * var(--qrm-scale));
  height: calc(56px * var(--qrm-scale));
  padding: 0;
  border: 1px solid rgba(66, 201, 255, 0.32);
  border-radius: calc(10px * var(--qrm-scale));
  background: rgba(8, 20, 34, 0.72);
  color: rgba(226, 245, 255, 0.85);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.dash-devices-section-btn.show {
  display: inline-flex;
}
.dash-devices-section-btn:hover {
  background: rgba(66, 201, 255, 0.2);
  color: #eaffff;
  border-color: rgba(66, 201, 255, 0.6);
}
.dash-devices-section-btn svg {
  width: calc(24px * var(--qrm-scale));
  height: calc(24px * var(--qrm-scale));
  stroke-width: 2.2;
}
.dash-devices-section-prev {
  left: calc(14px * var(--qrm-scale));
}
.dash-devices-section-next {
  right: calc(14px * var(--qrm-scale));
}
/* ASSIGN oval button drawn on top of each Unknown device iso. */
.dash-dev-assign-text {
  fill: #dff6ff;
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.dash-dev-assign:hover rect {
  fill: rgba(66, 201, 255, 0.22);
}
/* ---- ASSIGN modal (label + place an unassigned device) ---- */
.cv-assign-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.cv-assign-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.cv-assign-modal {
  position: relative;
  width: min(420px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, #0a1a30 0%, #050f22 100%);
  border: 1px solid rgba(92, 208, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(92, 208, 255, 0.08) inset;
  color: #dff2ff;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}
.cv-assign-modal-overlay.open .cv-assign-modal {
  transform: translateY(0) scale(1);
}
.cv-assign-modal-overlay.cv-add-device-modal-active .cv-assign-modal {
  display: flex;
  flex-direction: column;
  height: min(760px, 90vh);
  box-sizing: border-box;
}
.cv-assign-modal-overlay.cv-add-device-modal-active .cv-assign-form {
  flex: 1 1 auto;
  min-height: 0;
}
.cv-assign-modal-overlay.cv-add-device-modal-active #cv-unassigned-device-field {
  flex: 1 1 auto;
  min-height: 0;
}
.cv-assign-modal-overlay.cv-add-device-modal-active #cv-unassigned-device-field:not([hidden]) {
  display: flex;
}
.cv-assign-modal-overlay.cv-add-device-modal-active #cv-unassigned-device-field:not([hidden]) .cv-unassigned-device-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
.cv-assign-modal-overlay.cv-add-device-modal-active .cv-assign-actions {
  margin-top: auto;
}
.cv-assign-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7fb7d6;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.cv-assign-close:hover {
  background: rgba(92, 208, 255, 0.14);
  color: #eafaff;
}
.cv-assign-modal-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8ef0ff;
  text-shadow: 0 0 14px rgba(92, 208, 255, 0.35);
}
.cv-remove-group-confirm-text {
  color: #dff3ff;
  font-size: calc(18px * var(--qrm-scale));
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  padding: calc(14px * var(--qrm-scale)) calc(16px * var(--qrm-scale));
  margin: calc(8px * var(--qrm-scale)) 0 calc(16px * var(--qrm-scale));
  border: 1px solid rgba(92, 208, 255, 0.46);
  border-radius: 8px;
  background: rgba(4, 14, 28, 0.58);
  box-shadow: inset 0 0 0 1px rgba(223, 248, 255, 0.04);
}
.cv-remove-group-confirm-actions {
  display: grid;
  grid-template-columns: calc(112px * var(--qrm-scale)) calc(112px * var(--qrm-scale));
  justify-content: space-between;
  width: 100%;
  gap: 0;
  margin-top: 0;
}
.cv-remove-group-confirm-actions .cv-assign-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}
.cv-assign-preview {
  width: 100%;
  height: 150px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(66, 201, 255, 0.10) 0%, rgba(66, 201, 255, 0) 70%);
}
.cv-assign-preview svg {
  width: 100%;
  height: 100%;
}
.cv-assign-qrm-logo {
  width: 118px;
  height: 118px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(92, 208, 255, 0.34));
}
.cv-add-group-preview {
  height: 176px;
  background: radial-gradient(ellipse at center, rgba(86, 215, 255, 0.12) 0%, rgba(86, 215, 255, 0.02) 58%, rgba(86, 215, 255, 0) 78%);
}
.cv-add-group-preview svg {
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.34));
}
.cv-assign-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cv-assign-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(92, 208, 255, 0.42);
  border-radius: 9px;
  background: rgba(4, 12, 24, 0.72);
}
.cv-assign-mode-toggle[hidden] {
  display: none;
}
.cv-assign-mode-option {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #8fb9cf;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.cv-assign-mode-option + .cv-assign-mode-option {
  border-left: 1px solid rgba(92, 208, 255, 0.34);
}
.cv-assign-mode-option.active {
  background: rgba(66, 201, 255, 0.20);
  color: #eafaff;
  box-shadow: inset 0 0 18px rgba(66, 201, 255, 0.18);
}
.dash-group-tile-add-btn,
.dash-group-tile-add-btn * {
  cursor: pointer;
  user-select: none;
}
.dash-group-tile-grid-btn,
.dash-group-tile-grid-btn * {
  cursor: pointer;
  user-select: none;
}
/* ---- Group devices in-box grid (grid button replaces the group icon) ---- */
.cv-group-inbox-grid {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(var(--cv-group-cols, 2), var(--cv-inbox-cell-w, 110px));
  grid-auto-rows: var(--cv-inbox-cell-h, 84px);
  justify-items: start;
  align-items: start;
  justify-content: start;
  align-content: start;
  gap: var(--cv-inbox-gap, 6px);
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.cv-group-inbox-grid.qrm-native-scroll-hidden::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}
.cv-group-inbox-cell {
  --cv-device-health: #5cd0ff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  width: var(--cv-inbox-cell-w, 110px);
  min-width: var(--cv-inbox-cell-w, 110px);
  max-width: var(--cv-inbox-cell-w, 110px);
  height: var(--cv-inbox-cell-h, 84px);
  min-height: var(--cv-inbox-cell-h, 84px);
  max-height: var(--cv-inbox-cell-h, 84px);
  flex: 0 0 var(--cv-inbox-cell-h, 84px);
  padding: 3px 2px 1px;
  border: 1px solid rgba(92, 208, 255, 0.26);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.55);
  cursor: pointer;
}
.cv-group-inbox-cell * {
  cursor: pointer;
}
.cv-group-inbox-cell.cv-group-inbox-gateway {
  border-color: rgba(255, 255, 255, 0.58);
  animation: cvGatewayDeviceBorderPulse 1.8s ease-in-out infinite;
}
@keyframes cvGatewayDeviceBorderPulse {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.18);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.82);
    box-shadow:
      0 0 3px rgba(255, 255, 255, 0.55),
      0 0 7px rgba(255, 255, 255, 0.22);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cv-group-inbox-cell.cv-group-inbox-gateway {
    animation: none;
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.35);
  }
}
.cv-group-inbox-name {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  color: #eafaff;
  font-size: 6px;
  font-weight: 400;
  line-height: 1.05;
  padding-bottom: 2px;
  border-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-group-inbox-cell.cv-group-inbox-gateway .cv-group-inbox-name {
  color: #8de7ff;
  text-shadow: 0 0 3px rgba(141, 231, 255, 0.48);
}
.cv-group-inbox-name::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--cv-device-health) 20%, transparent) 10%,
    color-mix(in srgb, var(--cv-device-health) 72%, transparent) 26%,
    rgba(255, 255, 255, 0.62) 50%,
    color-mix(in srgb, var(--cv-device-health) 72%, transparent) 74%,
    color-mix(in srgb, var(--cv-device-health) 20%, transparent) 90%,
    transparent 100%);
  background-size: 220% 100%;
  box-shadow: 0 0 3px color-mix(in srgb, var(--cv-device-health) 38%, transparent);
  animation: cvHeaderHealthSweep 3.8s ease-in-out infinite;
}
.cv-group-inbox-cell.cv-group-inbox-gateway .cv-group-inbox-name::after {
  left: -2px;
  right: -2px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.72) 18%,
    #ffffff 50%,
    rgba(255, 255, 255, 0.72) 82%,
    rgba(255, 255, 255, 0.42) 100%);
  background-size: 100% 100%;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.48);
}
@keyframes cvHeaderHealthSweep {
  0%, 100% { background-position: 100% 0; opacity: 0.78; }
  50% { background-position: 0 0; opacity: 1; }
}
.cv-group-inbox-iconbox {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: visible;
}
.cv-group-inbox-icon {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}
.cv-group-inbox-icon-mp70 {
  width: 150%;
  height: 150%;
  max-width: none;
  flex: 0 0 auto;
  transform: translateY(-28%);
  transform-origin: center center;
  overflow: visible;
}
.cv-group-inbox-type-marker {
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 13px;
  height: 13px;
  color: rgba(223, 248, 255, 0.42);
  pointer-events: none;
}
.cv-group-inbox-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9fc6dd;
  font-size: 11px;
  font-weight: 700;
}

.cv-group-inbox-grid.cv-group-view-slide .cv-group-inbox-cell,
.cv-group-inbox-grid.cv-group-view-slide .cv-group-inbox-empty {
  animation: qrmDeviceViewSlideDown 0.26s ease-out both;
}

@keyframes qrmDeviceViewSlideDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cv-unassigned-device-list {
  position: relative;
  min-height: 318px;
  max-height: 318px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(92, 208, 255, 0.36);
  border-radius: 9px;
  background: rgba(4, 12, 24, 0.72);
}
.cv-unassigned-device-list.qrm-native-scroll-hidden::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}
.cv-unassigned-device-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}
.cv-unassigned-device-header span {
  min-width: 0;
  transform: translateY(7px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fb7d6;
}
.cv-unassigned-select-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(142, 240, 255, 0.48);
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}
.cv-unassigned-select-toggle svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.4;
}
.cv-unassigned-select-toggle:focus,
.cv-unassigned-select-toggle:focus-visible,
.cv-unassigned-select-toggle:active {
  outline: none;
  box-shadow: none;
}
.cv-unassigned-select-toggle[aria-pressed="true"] {
  color: rgba(234, 250, 255, 0.52);
  background: transparent;
}
.cv-unassigned-select-toggle:not(:disabled):hover,
.cv-unassigned-select-toggle:not(:disabled):focus-visible {
  color: #8ef0ff;
}
.cv-unassigned-select-toggle:not(:disabled)[aria-pressed="true"]:hover,
.cv-unassigned-select-toggle:not(:disabled)[aria-pressed="true"]:focus-visible {
  color: #eafaff;
}
.cv-unassigned-select-toggle:disabled,
.cv-unassigned-select-toggle[aria-disabled="true"] {
  color: rgba(143, 185, 207, 0.38);
  cursor: default;
  pointer-events: none;
}
.cv-unassigned-device-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  height: 54px;
  min-height: 54px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(92, 208, 255, 0.26);
  cursor: pointer;
}
.cv-unassigned-device-radio-cell {
  display: flex;
  justify-content: flex-end;
  padding-right: 8px;
}
.cv-unassigned-device-check {
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1px solid rgba(142, 240, 255, 0.72);
  border-radius: 50%;
  background: rgba(4, 12, 24, 0.92);
  cursor: pointer;
}
.cv-unassigned-device-check:checked {
  border-color: #8ef0ff;
  background: radial-gradient(circle at center, #8ef0ff 0 38%, rgba(4, 12, 24, 0.92) 42% 100%);
  box-shadow: 0 0 10px rgba(92, 208, 255, 0.36);
}
.cv-unassigned-device-name {
  min-width: 0;
  color: #eafaff;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-unassigned-device-empty {
  min-height: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #9fc6dd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.cv-assign-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv-assign-field > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fb7d6;
}
.cv-assign-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(92, 208, 255, 0.28);
  background: rgba(4, 12, 24, 0.85);
  color: #eafaff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cv-assign-input:focus {
  border-color: rgba(92, 208, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(66, 201, 255, 0.16);
}
.cv-assign-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  color: #a9cbdd;
  background: rgba(4, 12, 24, 0.55);
}
/* ---- custom combobox (Device Type / Location / Group Name) ---- */
.cv-select {
  position: relative;
}
.cv-select-disabled {
  opacity: 0.55;
}
.cv-select-disabled .cv-select-input,
.cv-select-disabled .cv-select-arrow {
  cursor: not-allowed;
  pointer-events: none;
}
.cv-select .cv-select-input {
  padding-right: 44px;
  width: 100%;
}
.cv-select.cv-select-plain-input .cv-select-input {
  padding-right: 12px;
}
.cv-select.cv-select-plain-input .cv-select-arrow {
  display: none;
}
.cv-select-input[readonly] {
  cursor: default;
}
.cv-select-arrow {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 40px;
  padding: 0;
  border: none;
  border-left: 1px solid rgba(92, 208, 255, 0.2);
  background: transparent;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv-select-arrow:focus,
.cv-select-arrow:focus-visible,
.cv-select-arrow:active {
  outline: none;
  box-shadow: none;
}
.cv-select-arrow::before {
  content: '';
  width: 9px;
  height: 9px;
  margin-top: -3px;
  border-right: 2px solid #7fb7d6;
  border-bottom: 2px solid #7fb7d6;
  transform: rotate(45deg);
  transition: transform 0.18s ease, border-color 0.15s ease;
}
.cv-select-arrow:hover::before {
  border-color: #bfe8ff;
}
.cv-select.open .cv-select-arrow::before {
  margin-top: 3px;
  transform: rotate(225deg);
}
/* Flush look: while the menu is open the input's bottom corners go square. */
.cv-select.open .cv-select-input {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: rgba(92, 208, 255, 0.7);
}
.cv-select-menu-host {
  position: fixed;
  z-index: 4100;
  display: none;
}
.cv-select-menu-host.open {
  display: block;
}
.cv-select-menu {
  position: relative;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 176px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: ghostwhite transparent;
  background: #0e2138;
  border: 1px solid rgba(92, 208, 255, 0.55);
  border-top: none;
  border-radius: 0 0 9px 9px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.6);
  width: 100%;
  display: none;
}
.cv-select-menu-host .qrm-custom-scrollbar:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.cv-select-menu::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}
.cv-select-menu::-webkit-scrollbar-track {
  background: transparent;
  margin: 0;
}
.cv-select-menu::-webkit-scrollbar-thumb {
  background: ghostwhite !important;
  border-radius: 3px;
}
.cv-select-menu::-webkit-scrollbar-thumb:hover {
  background: #e0e0e0 !important;
}
.cv-select-menu::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.cv-select-menu.open {
  display: block;
}
.cv-select-option {
  padding: 10px 14px;
  font-size: 14px;
  color: #dff2ff;
  cursor: pointer;
  transition: background 0.12s ease;
}
.cv-select-option:hover {
  background: rgba(66, 201, 255, 0.18);
  color: #eafaff;
}
.cv-assign-actions {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) minmax(132px, 1fr);
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}
.cv-assign-btn {
  width: 100%;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.cv-assign-btn:active {
  transform: translateY(1px);
}
.cv-assign-btn-cancel {
  background: transparent;
  border-color: rgba(127, 183, 214, 0.4);
  color: #9fc6dd;
}
.cv-assign-btn-cancel:hover {
  background: rgba(127, 183, 214, 0.12);
}
.cv-assign-btn-save {
  background: linear-gradient(180deg, #35b6ef 0%, #1d7fc0 100%);
  border-color: rgba(92, 208, 255, 0.6);
  color: #04121f;
}
.cv-assign-btn-save:hover {
  filter: brightness(1.08);
}
.cv-assign-btn:disabled,
.cv-assign-btn:disabled:hover,
.cv-assign-btn:disabled:active {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.45);
  transform: none;
}
/* 4 x 10 grid is drawn inside the scene SVG so it aligns exactly with the laptop
   drag-snap cells; it is only shown when the grid toggle is on. */
.dash-visual-devices-panel:not(.dash-devices-grid-on) .dash-dev-grid {
  display: none;
}
.dash-dev-drag {
  cursor: grab;
}
.dash-dev-drag:active {
  cursor: grabbing;
}
/* Keep the map (dark location background) hidden while DEVICES is open so it never shows
   through as the background of the devices section. The map element is reparented to
   <body>, so this must be scoped to body — not the visual layout. While the slide
   animation classes are present the map stays visible so it can animate; at rest
   (including on page load/refresh) it is fully hidden. */
body.dash-devices-active #dash-world-map:not(.cv-map-out-left):not(.cv-map-in-left) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-100%);
}

/* ---- Isometric device network scene inside the DEVICES box ---- */
.dash-visual-devices-panel {
  overflow: hidden;
}
.dash-devices-scene {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(66, 201, 255, 0.12), transparent 60%),
    radial-gradient(90% 120% at 50% 120%, rgba(41, 121, 175, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(6, 13, 22, 0.55), rgba(4, 9, 16, 0.85));
  border-radius: 16px;
}
.dash-devices-scene-head {
  display: none !important;
}
.dash-devices-scene-title {
  display: flex;
  align-items: center;
  gap: calc(9px * var(--qrm-scale));
  color: #dff6ff;
  font-size: calc(15px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.08em;
}
.dash-devices-scene-title svg {
  width: calc(18px * var(--qrm-scale));
  height: calc(18px * var(--qrm-scale));
  color: #5cd0ff;
}
.dash-devices-scene-title em {
  font-style: normal;
  font-size: calc(11px * var(--qrm-scale));
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #7fdcff;
  background: rgba(66, 201, 255, 0.14);
  border: 1px solid rgba(66, 201, 255, 0.32);
  padding: calc(2px * var(--qrm-scale)) calc(9px * var(--qrm-scale));
  border-radius: 999px;
}
.dash-devices-scene-legend {
  display: flex;
  align-items: center;
  gap: calc(14px * var(--qrm-scale));
}
.dash-devices-legend-item {
  display: inline-flex;
  align-items: center;
  gap: calc(6px * var(--qrm-scale));
  color: #b9d6e6;
  font-size: calc(11.5px * var(--qrm-scale));
  font-weight: 600;
  letter-spacing: 0.04em;
}
.dash-devices-legend-item i {
  width: calc(9px * var(--qrm-scale));
  height: calc(9px * var(--qrm-scale));
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.dash-devices-scene-stage {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}
.dash-devices-scene-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}
.dash-custom-group-tile,
.dash-custom-group-drag-hit {
  pointer-events: all;
  user-select: none;
  -webkit-user-select: none;
}
.dash-custom-group-tile-face {
  transform-box: fill-box;
  transform-origin: center;
  backface-visibility: hidden;
  transform: scaleX(1);
}
.dash-group-tile-flip-old {
  animation: dashGroupTileFlipOld 0.62s cubic-bezier(0.24, 0.86, 0.32, 1) both;
}
.dash-group-tile-flip-new {
  animation: dashGroupTileFlipNew 0.62s cubic-bezier(0.24, 0.86, 0.32, 1) both;
}
@keyframes dashGroupTileFlipOld {
  0% { transform: perspective(620px) rotateY(0deg) scaleX(1); opacity: 1; }
  44% { transform: perspective(620px) rotateY(86deg) scaleX(0.08); opacity: 0.5; }
  45%, 100% { transform: perspective(620px) rotateY(90deg) scaleX(0.02); opacity: 0; visibility: hidden; }
}
@keyframes dashGroupTileFlipNew {
  0%, 45% { transform: perspective(620px) rotateY(-90deg) scaleX(0.02); opacity: 0; visibility: hidden; }
  56% { transform: perspective(620px) rotateY(-86deg) scaleX(0.08); opacity: 0.5; visibility: visible; }
  100% { transform: perspective(620px) rotateY(0deg) scaleX(1); opacity: 1; visibility: visible; }
}
.dash-dev-hub-label {
  fill: #dff6ff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.dash-dev-node-name {
  fill: #e4f6ff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dash-group-header-scroll {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  color: #e4f6ff;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}
.dash-group-header-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.dash-group-header-scroll.is-scrollable {
  justify-content: flex-start;
}
.dash-group-header-scroll span {
  flex: 0 0 auto;
}
.dash-dev-node-type {
  display: none;
}
.dash-dev-wire-flow {
  stroke-dasharray: 8 40;
  animation: dash-dev-flow 1.05s linear infinite;
}
.dash-dev-wire-flow-rev {
  animation-direction: reverse;
}
/* ---------- circuit-style group connection traces with layered glow, pulse, labels ---------- */
.dash-group-connection-wire {
  stroke: var(--wire-color, rgba(92, 208, 255, 0.55));
  stroke-width: 3.1;
  stroke-linecap: square;
  stroke-linejoin: miter;
  filter: drop-shadow(0 0 5px var(--wire-color, rgba(92, 208, 255, 0.32)));
  animation: dash-wire-pulse 3.2s ease-in-out infinite;
}
.dash-group-connection-wire-flow {
  stroke: var(--flow-color, rgba(223, 248, 255, 0.88));
  stroke-width: 1.2;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-dasharray: 7 19;
  animation: dash-wire-flow 1.9s linear infinite;
  filter: drop-shadow(0 0 7px var(--flow-color, rgba(61, 246, 200, 0.38)));
}
.dash-group-connection-pad {
  fill: rgba(5, 20, 31, 0.94);
  stroke: var(--pad-color, rgba(92, 208, 255, 0.95));
  stroke-width: 2;
  filter: drop-shadow(0 0 8px var(--pad-color, rgba(92, 208, 255, 0.44)));
}
.dash-group-connection-pad-handle {
  cursor: grab;
  pointer-events: all;
  transition: fill 0.16s ease, stroke-width 0.16s ease, filter 0.16s ease;
}
.dash-group-connection-pad-handle:hover {
  fill: rgba(66, 201, 255, 0.36);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 12px var(--pad-color, rgba(92, 208, 255, 0.74)));
}
.dash-connection-dragging .dash-group-connection-pad-handle,
.dash-group-connection-pad-handle:active {
  cursor: grabbing;
}
.dash-group-connection-lane-hit {
  opacity: 0;
  transition: opacity 0.14s ease, stroke 0.14s ease;
}
.dash-group-connection-lane-hit:hover {
  opacity: 0;
}
.dash-group-connection-lane-hit[data-orientation="horizontal"] {
  cursor: ns-resize;
}
.dash-group-connection-lane-hit[data-orientation="vertical"] {
  cursor: ew-resize;
}
.dash-group-connection-dot {
  fill: var(--dot-color, #d9fbff);
  filter: drop-shadow(0 0 8px var(--dot-color, #d9fbff));
  pointer-events: none;
}
.dash-group-connection-label {
  pointer-events: none;
  user-select: none;
}
.dash-group-connection-label text {
  opacity: 1;
  transition: opacity 0.25s ease;
}
.dash-devices-scene:hover .dash-group-connection-label text {
  opacity: 1;
}
@keyframes dash-wire-pulse {
  0%   { opacity: 0.65; }
  50%  { opacity: 1; }
  100% { opacity: 0.65; }
}
@keyframes dash-wire-flow {
  to { stroke-dashoffset: -48; }
}
/* keep old keyframe for isometric hub wires (disabled but referenced) */
@keyframes dash-dev-flow {
  to { stroke-dashoffset: -48; }
}
.dash-devices-scene-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(12px * var(--qrm-scale));
  width: 100%;
  height: 100%;
  color: #9fc4d8;
  font-size: calc(13px * var(--qrm-scale));
  letter-spacing: 0.04em;
}
.dash-devices-scene-state svg,
.dash-devices-scene-state i {
  width: calc(30px * var(--qrm-scale));
  height: calc(30px * var(--qrm-scale));
  color: #5cd0ff;
}
.dash-devices-scene-spinner {
  width: calc(30px * var(--qrm-scale));
  height: calc(30px * var(--qrm-scale));
  border: 3px solid rgba(92, 208, 255, 0.22);
  border-top-color: #5cd0ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-body-panel,
.dash-visual-layout.dash-visual-mode-map .dash-visual-body-panel *,
.dash-visual-layout.dash-visual-mode-map .dash-visual-network-panel,
.dash-visual-layout.dash-visual-mode-map .dash-visual-network-panel * {
  pointer-events: none !important;
}

.dash-visual-layout.dash-visual-mode-map .dash-map-location-context-menu,
.dash-visual-layout.dash-visual-mode-map .dash-map-location-name-dialog-backdrop,
.dash-visual-layout.dash-visual-mode-map .dash-map-location-name-dialog {
  pointer-events: auto;
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-right-header {
  overflow: visible;
}

.dash-visual-body-panel {
  position: relative;
  flex: 1 1 0;
  cursor: default;
  --dash-box-divider-color: rgba(255, 255, 255, 0.46);
  will-change: transform, opacity;
}

.dash-visual-network-panel {
  cursor: default;
  --dash-box-divider-color: rgba(255, 255, 255, 0.46);
  will-change: transform, opacity;
}

/* Telemetry mode (not map, not devices): main content boxes match the bottom bar background. */
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-body-panel,
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-network-panel {
  background: var(--dashboard-panel-bg);
  box-shadow: none;
}
.dash-visual-layout.dash-visual-boxes-slide-left .dash-visual-body-panel,
.dash-visual-layout.dash-visual-boxes-slide-left .dash-visual-network-panel {
  animation: dashVisualBoxesSlideLeft 0.48s cubic-bezier(0.55, 0, 0.2, 1) forwards;
}

.dash-visual-layout.dash-visual-boxes-slide-right .dash-visual-body-panel,
.dash-visual-layout.dash-visual-boxes-slide-right .dash-visual-network-panel {
  animation: dashVisualBoxesSlideRight 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dash-visual-layout.dash-visual-boxes-slide-from-left .dash-visual-body-panel,
.dash-visual-layout.dash-visual-boxes-slide-from-left .dash-visual-network-panel {
  animation: dashVisualBoxesSlideFromLeft 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-body-panel,
.dash-visual-layout.dash-visual-mode-map .dash-visual-network-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-112%);
}

@keyframes dashVisualBoxesSlideLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-112%);
  }
}

@keyframes dashVisualBoxesSlideRight {
  from {
    opacity: 0;
    transform: translateX(112%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes dashVisualBoxesSlideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-112%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dash-visual-body-panel.dash-box-border-transparent,
.dash-visual-network-panel.dash-box-border-transparent {
  --dash-box-divider-color: transparent;
}

.dash-visual-body-panel::before,
.dash-visual-network-panel::before {
  content: none;
}

.dash-visual-body-panel::after,
.dash-visual-network-panel::after {
  content: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 6.25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 12.5% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 18.75% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 31.25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 37.5% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 43.75% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 56.25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 62.5% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 68.75% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 75% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 81.25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 87.5% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 93.75% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 6.25% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 12.5% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 18.75% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 25% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 31.25% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 37.5% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 43.75% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 50% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 56.25% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 62.5% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 68.75% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 75% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 81.25% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 87.5% / 100% 1px no-repeat,
    linear-gradient(var(--dash-box-divider-color), var(--dash-box-divider-color)) 0 93.75% / 100% 1px no-repeat;
  pointer-events: none;
  z-index: 8;
}

.dash-visual-header-panel {
  flex: 0 0 var(--top-bar-height);
}

.dash-visual-left-header {
  border-radius: 16px;
}

.dash-visual-right-header {
  border-radius: 16px;
}

.dash-visual-network-panel {
  position: relative;
  flex: 1 1 0;
  border-radius: 16px;
}

.dash-network-analytics-widget {
  position: absolute;
  inset: calc(24px * var(--qrm-scale)) calc(8px * var(--qrm-scale)) 0;
  z-index: 9;
  display: flex;
  min-width: 0;
  min-height: 0;
  color: rgba(241, 245, 249, 0.92);
}

.dash-network-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(226, 232, 240, 0.72);
  font-size: calc(12px * var(--qrm-scale));
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-telemetry-empty-state {
  position: absolute;
  inset: calc(var(--top-bar-height) / 2) 0 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(10px * var(--qrm-scale));
  color: rgba(226, 232, 240, 0.72);
  font-size: calc(12px * var(--qrm-scale));
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.dash-telemetry-empty-state-network {
  inset: 0;
}

.dash-telemetry-empty-state svg,
.dash-telemetry-empty-state i {
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  color: rgba(125, 218, 255, 0.82);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 10px rgba(66, 201, 255, 0.28));
}

.dash-network-page-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: calc(4px * var(--qrm-scale));
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0 calc(10px * var(--qrm-scale)) 0 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-width: none !important;
  scrollbar-color: transparent transparent !important;
}

.dash-network-page-grid::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

#dash-network-analytics-widget .qrm-custom-scrollbar {
  right: 2px !important;
}

#dash-network-analytics-widget .dash-network-widget-graph-button {
  top: calc(-34px * var(--qrm-scale));
  right: calc(10px * var(--qrm-scale));
}

.dash-network-row {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: calc(7px * var(--qrm-scale));
  align-items: stretch;
  min-width: 0;
  min-height: 156px;
  padding: calc(5px * var(--qrm-scale));
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.dash-network-row-empty {
  opacity: 0.46;
}

.dash-network-adapter-name {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  gap: calc(8px * var(--qrm-scale));
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(10px * var(--qrm-scale));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dash-network-adapter-name span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dash-network-adapter-name span::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.dash-network-status-icon {
  flex: 0 0 auto;
  width: calc(18px * var(--qrm-scale));
  height: calc(18px * var(--qrm-scale));
  color: rgba(148, 163, 184, 0.74);
  stroke-width: 2.4;
}

.dash-network-status-icon.status-up {
  color: #38d39f;
  filter: drop-shadow(0 0 5px rgba(56, 211, 159, 0.42));
}

.dash-network-status-icon.status-down {
  color: #ff3167;
  filter: drop-shadow(0 0 5px rgba(255, 49, 103, 0.46));
}

.dash-network-graphs {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(150px, 1.08fr);
  gap: calc(12px * var(--qrm-scale));
  min-width: 0;
  min-height: 0;
}

.dash-network-metric {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: calc(5px * var(--qrm-scale));
  border: none;
  background: transparent;
}

.dash-network-metric-label {
  min-width: 0;
  color: rgba(186, 230, 253, 0.86);
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.dash-network-data-track {
  position: relative;
  width: 100%;
  height: calc(12px * var(--qrm-scale));
  align-self: center;
  border: none;
  background: transparent;
  overflow: hidden;
}

.dash-network-data-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.dash-network-data-fill {
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--network-fill-color) 42%, transparent), var(--network-fill-color));
  box-shadow: 0 0 14px color-mix(in srgb, var(--network-fill-color) 52%, transparent);
}

.dash-network-traffic-metric {
  grid-template-rows: auto minmax(0, calc(84px * var(--qrm-scale)));
  align-content: start;
  row-gap: calc(31px * var(--qrm-scale));
}

.dash-network-flow-graph {
  display: grid;
  box-sizing: border-box;
  grid-template-rows: auto auto;
  align-content: space-between;
  gap: calc(12px * var(--qrm-scale));
  height: calc(84px * var(--qrm-scale));
  padding: 0;
  min-width: 0;
  min-height: 0;
}

.dash-network-flow-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.68fr) minmax(0, 1fr) minmax(55px, 0.7fr);
  gap: calc(6px * var(--qrm-scale));
  align-items: center;
  min-width: 0;
}

.dash-network-flow-name,
.dash-network-flow-value {
  min-width: 0;
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-network-flow-name {
  color: rgba(186, 230, 253, 0.8);
}

.dash-network-flow-value {
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
}

.dash-network-flow-lane {
  position: relative;
  height: calc(12px * var(--qrm-scale));
  min-width: 0;
}

.dash-network-flow-lane::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.58), transparent);
}

.dash-network-flow-fill {
  position: absolute;
  left: 0;
  top: calc(3px * var(--qrm-scale));
  width: var(--flow-percent);
  height: calc(6px * var(--qrm-scale));
  min-width: calc(4px * var(--qrm-scale));
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), #38bdf8, rgba(125, 211, 252, 0.88));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.38);
}

.dash-network-flow-fill span {
  position: absolute;
  top: 0;
  right: 0;
  width: calc(12px * var(--qrm-scale));
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86));
  filter: blur(1px);
}

.dash-network-flow-row-download .dash-network-flow-fill {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.14), #22c55e, rgba(134, 239, 172, 0.9));
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.36);
}

.dash-network-mirror-graph {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: calc(4px * var(--qrm-scale));
  min-width: 0;
  min-height: 0;
  align-items: center;
}

.dash-network-mirror-readout,
.dash-network-mirror-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  align-items: center;
}

.dash-network-mirror-label,
.dash-network-mirror-values strong {
  min-width: 0;
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-network-mirror-label-upload {
  color: rgba(125, 211, 252, 0.9);
  text-align: left;
}

.dash-network-mirror-label-download {
  color: rgba(134, 239, 172, 0.9);
  text-align: right;
}

.dash-network-mirror-values strong {
  color: rgba(255, 255, 255, 0.9);
}

.dash-network-mirror-values strong:first-child {
  text-align: left;
}

.dash-network-mirror-values strong:last-child {
  text-align: right;
}

.dash-network-mirror-row {
  display: grid;
  grid-template-columns: minmax(54px, 0.72fr) minmax(0, 1fr) minmax(44px, 0.68fr);
  gap: calc(5px * var(--qrm-scale));
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.dash-network-mirror-row span,
.dash-network-mirror-row strong {
  min-width: 0;
  font-size: calc(8px * var(--qrm-scale));
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-network-mirror-row span {
  color: rgba(186, 230, 253, 0.78);
  font-weight: 700;
}

.dash-network-mirror-row strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-align: right;
}

.dash-network-mirror-track {
  position: relative;
  height: calc(18px * var(--qrm-scale));
  border: none;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(186, 230, 253, 0.18) 12% 12.5%, transparent 12.5% 24.5%, rgba(186, 230, 253, 0.18) 24.5% 25%, transparent 25% 37%, rgba(186, 230, 253, 0.18) 37% 37.5%, transparent 37.5% 62.5%, rgba(186, 230, 253, 0.18) 62.5% 63%, transparent 63% 75%, rgba(186, 230, 253, 0.18) 75% 75.5%, transparent 75.5% 87.5%, rgba(186, 230, 253, 0.18) 87.5% 88%, transparent 88%),
    linear-gradient(90deg, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.12) 50%, rgba(34, 197, 94, 0.08));
  overflow: hidden;
}

.dash-network-mirror-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.dash-network-mirror-fill {
  position: absolute;
  top: calc(5px * var(--qrm-scale));
  bottom: calc(5px * var(--qrm-scale));
}

.dash-network-mirror-fill::after {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: calc(10px * var(--qrm-scale));
  filter: blur(1px);
  opacity: 0.9;
}

.dash-network-mirror-fill-upload {
  right: 50%;
  background: linear-gradient(270deg, #7dd3fc, #38bdf8 44%, rgba(56, 189, 248, 0.16));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.48);
}

.dash-network-mirror-fill-upload::after {
  left: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.88), transparent);
}

.dash-network-mirror-fill-download {
  left: 50%;
  background: linear-gradient(90deg, #86efac, #22c55e 44%, rgba(34, 197, 94, 0.16));
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.48);
}

.dash-network-mirror-fill-download::after {
  right: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88), transparent);
}

.dash-network-mirror-centerline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.72), transparent);
}

.dash-network-mirror-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.68);
  z-index: 2;
}

.dash-network-comparison-graph {
  display: grid;
  box-sizing: border-box;
  grid-template-rows: auto auto;
  align-content: space-between;
  gap: calc(12px * var(--qrm-scale));
  height: calc(84px * var(--qrm-scale));
  padding: 0;
  min-width: 0;
  min-height: 0;
}

.dash-network-comparison-row {
  display: grid;
  grid-template-rows: auto calc(10px * var(--qrm-scale));
  gap: calc(2px * var(--qrm-scale));
  min-width: 0;
}

.dash-network-comparison-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(48px, auto);
  gap: calc(6px * var(--qrm-scale));
  align-items: center;
  min-width: 0;
}

.dash-network-comparison-label,
.dash-network-comparison-head strong {
  min-width: 0;
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-network-comparison-label {
  color: rgba(186, 230, 253, 0.88);
}

.dash-network-comparison-head strong {
  color: rgba(255, 255, 255, 0.92);
  text-align: right;
}

.dash-network-comparison-track {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: rgba(186, 230, 253, 0.12);
}

.dash-network-comparison-row-download .dash-network-comparison-track {
  transform: translateY(calc(8px * var(--qrm-scale)));
}

.dash-network-comparison-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0 24%, rgba(255, 255, 255, 0.2) 24% 25%, transparent 25% 49%, rgba(255, 255, 255, 0.28) 49% 50%, transparent 50% 74%, rgba(255, 255, 255, 0.2) 74% 75%, transparent 75%);
  opacity: 0.8;
}

.dash-network-comparison-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--traffic-percent);
  min-width: calc(4px * var(--qrm-scale));
}

.dash-network-comparison-fill::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(10px * var(--qrm-scale));
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82));
  filter: blur(1px);
}

.dash-network-comparison-row-upload .dash-network-comparison-label {
  color: #7dd3fc;
}

.dash-network-comparison-row-upload .dash-network-comparison-fill {
  left: 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), #38bdf8, #7dd3fc);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.42);
}

.dash-network-comparison-row-upload .dash-network-comparison-fill::after {
  right: 0;
}

.dash-network-comparison-row-download .dash-network-comparison-label {
  color: #86efac;
}

.dash-network-comparison-row-download .dash-network-comparison-fill {
  left: 0;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), #22c55e, #86efac);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.dash-network-comparison-row-download .dash-network-comparison-fill::after {
  right: 0;
}


.dash-network-metric-value {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  color: rgba(245, 250, 255, 0.96);
  font-size: calc(9.5px * var(--qrm-scale));
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.28);
}

.dash-network-speed-metric {
  grid-template-rows: auto auto auto;
  align-content: start;
  row-gap: calc(2px * var(--qrm-scale));
  padding-top: calc(3px * var(--qrm-scale));
  padding-right: 0;
  padding-left: calc(2px * var(--qrm-scale));
  justify-items: end;
}

.dash-network-speed-metric .dash-network-metric-label {
  justify-self: end;
  width: 100%;
  text-align: center;
}

.dash-network-speed-graph {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: start;
  width: 100%;
}

.dash-network-speed-ring {
  position: relative;
  width: min(100%, calc(232px * var(--qrm-scale)));
  aspect-ratio: 1.565;
  display: grid;
  place-items: center;
}

.dash-network-speedometer {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.26));
}

.dash-network-speed-shell,
.dash-network-speed-track,
.dash-network-speed-fill {
  fill: none;
  stroke-linecap: round;
}

.dash-network-speed-shell {
  stroke: rgba(6, 24, 57, 0.94);
  stroke-width: 18;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.24));
}

.dash-network-speed-track {
  stroke: rgba(80, 124, 184, 0.36);
  stroke-width: 8.5;
}

.dash-network-speed-fill {
  stroke: url(#network-speed-gradient);
  stroke-width: 8.5;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 9px rgba(45, 212, 191, 0.58));
}

.dash-network-speed-end-dot {
  fill: rgba(148, 213, 255, 0.18);
  stroke: rgba(186, 230, 253, 0.18);
  stroke-width: 0.9;
}

.dash-network-speed-ring-value {
  position: absolute;
  left: 50%;
  top: 70%;
  width: 82%;
  transform: translate(-50%, -50%);
  color: #f8fbff;
  text-align: center;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.42);
}

.dash-network-speed-ring-value strong,
.dash-network-speed-ring-value span {
  display: block;
  line-height: 1;
}

.dash-network-speed-ring-value strong {
  font-size: calc(20px * var(--qrm-scale));
  font-weight: 900;
  letter-spacing: 0.01em;
}

.dash-network-speed-ring-value span {
  margin-top: calc(3px * var(--qrm-scale));
  color: rgba(186, 230, 253, 0.84);
  font-size: calc(7px * var(--qrm-scale));
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dash-network-empty-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: rgba(148, 163, 184, 0.62);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  font-size: calc(10px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.12em;
}

.dash-visual-ram-panel {
  border-radius: 16px;
}

.dash-visual-ram-panel .dash-ram-analytics-widget {
  border-radius: 15px;
}

.dash-visual-toggle-panel {
  align-items: center;
  padding: 0;
}

.dash-visual-left-header,
.dash-visual-toggle-panel {
  display: flex;
}

.dash-visual-toggle-panel {
  align-items: center;
  justify-content: center;
}

.dash-visual-left-header {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dash-visual-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.dash-selected-device-title {
  min-width: 0;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(226, 245, 255, 0.72);
  font-size: calc(14px * var(--qrm-scale));
  font-weight: 600;
  line-height: 32px;
  text-align: right;
  letter-spacing: 0.02em;
}

.dash-selected-device-title-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dash-selected-device-title-center {
  max-width: calc(100% - 112px);
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 0 10px;
  overflow: hidden;
  color: var(--text-primary);
  font-size: calc(24px * var(--qrm-scale)) !important;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1 !important;
  text-align: center;
}

.dash-selected-device-type-icon,
.dash-selected-device-title-center svg {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  color: var(--text-primary);
  stroke-width: 2;
}

.dash-visual-layout.dash-visual-mode-map .dash-selected-device-title-center {
  visibility: visible;
}

/* Keep the text centered within the box, with the icon sitting just to its left.
   The spacer equals the icon width so the icon+gap on the left is balanced on the right. */
.dash-visual-layout.dash-visual-mode-map .dash-selected-device-title-center::after {
  content: "";
  flex: 0 0 24px;
  width: 24px;
}

.dash-selected-device-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit !important;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.dash-telemetry-label-text.dash-gateway-device-name {
  color: #8de7ff;
  text-shadow: 0 0 3px rgba(141, 231, 255, 0.48);
}

.dash-visual-right-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px 0 24px;
  color: rgba(226, 245, 255, 0.78);
  font-size: calc(14px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.07em;
}

.dash-right-location-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: calc(14px * var(--qrm-scale)) !important;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.dash-right-datetime-labels {
  position: absolute;
  top: 50%;
  right: 42px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  font-size: 14px;
  line-height: 1.05;
  text-align: right;
  white-space: nowrap;
  transform: translateY(-50%);
}

.dash-right-power-icon-wrapper {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-right-header > * {
  visibility: hidden;
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-right-header > .dash-section-button {
  visibility: visible;
}

.dash-map-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.dash-visual-layout.dash-visual-mode-map .dash-map-toolbar {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.dash-map-zoom-control {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.dash-map-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: calc(38px * var(--qrm-scale));
  margin: auto 0 auto calc(10px * var(--qrm-scale));
  padding: 0 calc(42px * var(--qrm-scale)) 0 calc(42px * var(--qrm-scale));
  border: 1px solid rgba(66, 201, 255, 0.34);
  border-radius: 999px;
  background: rgba(7, 17, 28, 0.38);
  color: var(--text-primary);
}

.dash-map-search-logo-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: calc(100% - 74px * var(--qrm-scale));
  max-width: calc(132px * var(--qrm-scale));
  height: calc(100% - 10px * var(--qrm-scale));
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease;
}

.dash-map-search-logo-visible .dash-map-search-logo-overlay,
.dash-map-search:has(.dash-map-search-input:placeholder-shown):not(:focus-within) .dash-map-search-logo-overlay {
  opacity: 1;
}

.dash-map-search:focus-within .dash-map-search-logo-overlay,
.dash-map-search-active .dash-map-search-logo-overlay,
.dash-map-search-has-value .dash-map-search-logo-overlay {
  opacity: 0;
}

.dash-map-search-icon {
  position: absolute;
  left: calc(12px * var(--qrm-scale));
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.dash-map-search-icon svg,
.dash-map-search-icon i {
  position: absolute;
  width: calc(16px * var(--qrm-scale));
  height: calc(16px * var(--qrm-scale));
  stroke-width: 2;
}

.dash-map-search-icon svg:last-child,
.dash-map-search-icon i:last-child {
  width: calc(10px * var(--qrm-scale));
  height: calc(10px * var(--qrm-scale));
  right: calc(-1px * var(--qrm-scale));
  bottom: 0;
}

.dash-map-search-input {
  width: 100%;
  min-width: 0;
  height: calc(30px * var(--qrm-scale));
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: calc(13px * var(--qrm-scale));
  position: relative;
  z-index: 2;
}

.dash-map-search-input::-webkit-search-cancel-button {
  display: none;
}

.dash-map-search-enter-button {
  position: absolute;
  right: calc(7px * var(--qrm-scale));
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(24px * var(--qrm-scale));
  height: calc(24px * var(--qrm-scale));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(235, 249, 255, 0.88);
  cursor: pointer;
  outline: none;
  transform: translateY(-50%);
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.dash-map-search-enter-button:hover,
.dash-map-search-enter-button:focus-visible {
  background: rgba(66, 201, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(66, 201, 255, 0.16);
}

.dash-map-search-enter-button svg,
.dash-map-search-enter-button i {
  width: calc(16px * var(--qrm-scale));
  height: calc(16px * var(--qrm-scale));
  stroke-width: 2.2;
}

.dash-map-search-suggestions {
  position: absolute;
  top: calc(100% + 6px * var(--qrm-scale));
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(66, 201, 255, 0.32);
  border-radius: calc(8px * var(--qrm-scale));
  background: rgba(5, 17, 34, 0.96);
  box-shadow: 0 calc(18px * var(--qrm-scale)) calc(32px * var(--qrm-scale)) rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.dash-map-search-suggestions[hidden] {
  display: none;
}

.dash-map-search-suggestion {
  width: 100%;
  min-height: calc(32px * var(--qrm-scale));
  padding: calc(7px * var(--qrm-scale)) calc(12px * var(--qrm-scale));
  border: 0;
  border-bottom: 1px solid rgba(66, 201, 255, 0.13);
  background: transparent;
  color: rgba(235, 249, 255, 0.9);
  cursor: pointer;
  font-size: calc(11px * var(--qrm-scale));
  line-height: 1.25;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-map-search-suggestion:last-child {
  border-bottom: 0;
}

.dash-map-search-suggestion:hover,
.dash-map-search-suggestion:focus-visible {
  background: rgba(66, 201, 255, 0.16);
  color: #ffffff;
  outline: none;
}

.dash-map-search-building-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: default !important;
}

.leaflet-marker-icon.dash-map-search-building-marker {
  cursor: default !important;
}

.dash-visual-layout.dash-visual-mode-map .dash-world-map .leaflet-marker-icon.dash-map-search-building-marker,
.dash-visual-layout.dash-visual-mode-map .dash-world-map .leaflet-marker-icon.dash-map-search-building-marker .dash-map-search-building-marker-shell,
.dash-visual-layout.dash-visual-mode-map .dash-world-map .dash-map-location-label {
  cursor: pointer !important;
}

.dash-visual-layout.dash-visual-mode-map .dash-world-map .leaflet-marker-icon.dash-map-saved-location-marker,
.dash-visual-layout.dash-visual-mode-map .dash-world-map .leaflet-marker-icon.dash-map-saved-location-marker * {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.dash-map-search-building-marker-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  border: 1px solid rgba(89, 219, 255, 0.78);
  border-radius: 50%;
  background: rgba(4, 23, 45, 0.92);
  box-shadow: 0 0 0 2px rgba(3, 12, 26, 0.72), 0 0 18px rgba(66, 201, 255, 0.48);
  color: #5bdcff;
  cursor: default !important;
}

.dash-map-search-building-marker-shell,
.dash-map-search-building-marker-shell * {
  pointer-events: none;
}

.dash-visual-layout.dash-visual-mode-map .dash-world-map .leaflet-marker-icon.dash-map-search-building-marker .dash-map-search-building-marker-shell,
.dash-visual-layout.dash-visual-mode-map .dash-world-map .leaflet-marker-icon.dash-map-search-building-marker .dash-map-search-building-marker-shell * {
  pointer-events: auto;
  cursor: pointer !important;
}

.leaflet-marker-icon.dash-map-marker-move-enabled,
.leaflet-marker-icon.dash-map-marker-move-enabled .dash-map-search-building-marker-shell {
  cursor: grab !important;
}

.leaflet-marker-icon.dash-map-marker-dragging,
.leaflet-marker-icon.dash-map-marker-dragging .dash-map-search-building-marker-shell,
.leaflet-marker-icon.leaflet-drag-target,
.leaflet-marker-icon.leaflet-drag-target .dash-map-search-building-marker-shell {
  cursor: grabbing !important;
}

.dash-map-search-building-marker-shell svg,
.dash-map-search-building-marker-shell i {
  width: calc(18px * var(--qrm-scale));
  height: calc(18px * var(--qrm-scale));
  stroke-width: 2.15;
}

.dash-map-saved-location-label {
  padding: calc(3px * var(--qrm-scale)) calc(8px * var(--qrm-scale));
  border: 1px solid rgba(89, 219, 255, 0.78);
  border-radius: calc(6px * var(--qrm-scale));
  background: rgba(4, 23, 45, 0.92);
  box-shadow: 0 0 calc(14px * var(--qrm-scale)) rgba(66, 201, 255, 0.32);
  color: #5bdcff;
  font-size: calc(10px * var(--qrm-scale));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  pointer-events: auto;
  white-space: nowrap;
}

.leaflet-tooltip.dash-map-saved-location-label {
  border: 1px solid rgba(89, 219, 255, 0.78) !important;
  background: rgba(4, 23, 45, 0.92) !important;
  color: #5bdcff !important;
}

.dash-map-saved-location-label::before {
  display: none;
}

.dash-map-location-name-popup .leaflet-popup-content-wrapper {
  border: 1px solid rgba(89, 219, 255, 0.42);
  border-radius: calc(8px * var(--qrm-scale));
  background: rgba(5, 17, 34, 0.96);
  box-shadow: 0 calc(18px * var(--qrm-scale)) calc(30px * var(--qrm-scale)) rgba(0, 0, 0, 0.42);
  color: rgba(235, 249, 255, 0.94);
}

.dash-map-location-name-popup .leaflet-popup-content {
  width: calc(190px * var(--qrm-scale));
  margin: calc(10px * var(--qrm-scale));
}

.dash-map-location-name-popup .leaflet-popup-tip {
  background: rgba(5, 17, 34, 0.96);
}

.dash-map-location-name-form {
  display: flex;
  flex-direction: column;
  gap: calc(6px * var(--qrm-scale));
}

.dash-map-location-name-form label {
  color: rgba(235, 249, 255, 0.72);
  font-size: calc(9px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-map-location-name-input {
  width: 100%;
  height: calc(28px * var(--qrm-scale));
  padding: 0 calc(8px * var(--qrm-scale));
  border: 1px solid rgba(89, 219, 255, 0.36);
  border-radius: calc(6px * var(--qrm-scale));
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-size: calc(11px * var(--qrm-scale));
  outline: none;
}

.dash-map-location-name-input:focus {
  border-color: rgba(89, 219, 255, 0.78);
  box-shadow: 0 0 0 2px rgba(66, 201, 255, 0.14);
}

.dash-map-location-name-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 9, 18, 0.62);
}

.dash-map-location-name-dialog {
  width: min(calc(320px * var(--qrm-scale)), 90vw);
  border: 1px solid rgba(89, 219, 255, 0.42);
  border-radius: calc(10px * var(--qrm-scale));
  background: rgba(5, 17, 34, 0.98);
  box-shadow: 0 calc(18px * var(--qrm-scale)) calc(32px * var(--qrm-scale)) rgba(0, 0, 0, 0.5);
  padding: calc(12px * var(--qrm-scale));
}

.dash-map-location-name-actions {
  display: flex;
  justify-content: flex-end;
  gap: calc(8px * var(--qrm-scale));
  margin-top: calc(8px * var(--qrm-scale));
}

.dash-map-location-name-actions button {
  min-width: calc(74px * var(--qrm-scale));
  height: calc(30px * var(--qrm-scale));
  border: 1px solid rgba(89, 219, 255, 0.36);
  border-radius: calc(6px * var(--qrm-scale));
  background: rgba(255, 255, 255, 0.05);
  color: rgba(235, 249, 255, 0.94);
  font-size: calc(11px * var(--qrm-scale));
  cursor: pointer;
}

.dash-map-location-name-actions .dash-map-location-name-save {
  border-color: rgba(89, 219, 255, 0.64);
  background: rgba(66, 201, 255, 0.16);
}

.dash-map-location-context-menu {
  position: fixed;
  z-index: 10050;
  width: clamp(150px, calc(140px * var(--qrm-scale)), 200px);
  overflow: hidden;
  border: 1px solid rgba(89, 219, 255, 0.36);
  border-radius: calc(7px * var(--qrm-scale));
  background: rgba(5, 17, 34, 0.96);
  box-shadow: 0 calc(14px * var(--qrm-scale)) calc(28px * var(--qrm-scale)) rgba(0, 0, 0, 0.42);
}

.dash-map-location-context-menu button {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--qrm-scale));
  width: 100%;
  min-height: calc(32px * var(--qrm-scale));
  padding: 0 calc(12px * var(--qrm-scale));
  border: 0;
  background: transparent;
  color: rgba(235, 249, 255, 0.92);
  cursor: pointer;
  font-size: calc(11px * var(--qrm-scale));
  text-align: left;
  white-space: nowrap;
}

.dash-map-location-context-menu button span {
  flex: 1 1 auto;
  min-width: 0;
}

.dash-map-context-icon {
  flex: 0 0 auto;
  width: calc(15px * var(--qrm-scale));
  height: calc(15px * var(--qrm-scale));
  stroke-width: 2;
}

.dash-map-location-context-menu button:hover,
.dash-map-location-context-menu button:focus-visible {
  background: rgba(66, 201, 255, 0.16);
  color: #ffffff;
  outline: none;
}

.dash-map-location-context-menu .dash-map-location-context-delete {
  color: rgba(255, 150, 150, 0.95);
}

.dash-map-location-context-menu .dash-map-location-context-delete:hover,
.dash-map-location-context-menu .dash-map-location-context-delete:focus-visible {
  background: rgba(255, 86, 86, 0.14);
  color: #ffffff;
}

.dash-map-icon-button,
.dash-map-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(64px * var(--qrm-scale));
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.dash-map-theme-toggle {
  position: relative;
  border-left: 1px solid rgba(66, 201, 255, 0.34);
}

.dash-map-timeline-toggle {
  border-left: 0;
}

.dash-map-zoom-toggle {
  border-left: 1px solid rgba(66, 201, 255, 0.34);
}

.dash-map-icon-button:hover,
.dash-map-icon-button:focus-visible,
.dash-map-theme-toggle:hover,
.dash-map-theme-toggle:focus-visible {
  background: rgba(35, 111, 151, 0.52);
  text-shadow: 0 0 16px rgba(125, 218, 255, 0.42);
}

.dash-map-theme-option {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dash-map-theme-option svg,
.dash-map-theme-option i,
.dash-map-icon-button svg,
.dash-map-icon-button i,
.dash-map-zoom-end-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  stroke-width: 2;
}

.dash-map-theme-toggle:not(.dark) .dash-map-theme-option-light,
.dash-map-theme-toggle.dark .dash-map-theme-option-dark {
  opacity: 1;
}

.dash-map-zoom-popover {
  position: absolute;
  top: 100%;
  right: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  justify-content: center;
  grid-template-rows: calc(32px * var(--qrm-scale)) 1fr calc(32px * var(--qrm-scale));
  row-gap: calc(4px * var(--qrm-scale));
  width: calc(64px * var(--qrm-scale));
  height: calc(245px * var(--qrm-scale));
  padding: calc(8px * var(--qrm-scale)) 0;
  border: 1px solid rgba(66, 201, 255, 0.34);
  border-top: 0;
  background: rgba(7, 17, 28, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.58), 0 0 18px rgba(66, 201, 255, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 20;
}

.dash-map-zoom-end-icon {
  color: var(--text-primary);
  opacity: 0.9;
}

.dash-map-zoom-popover.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Map search history dropdown */
.dash-map-history-control {
  position: relative;
  display: inline-flex;
  height: 100%;
}

.dash-map-history-popover {
  position: absolute;
  top: 100%;
  right: 0;
  width: calc(240px * var(--qrm-scale));
  max-height: calc(360px * var(--qrm-scale));
  overflow-y: auto;
  padding: calc(4px * var(--qrm-scale)) 0;
  border: 1px solid rgba(66, 201, 255, 0.34);
  border-top: 0;
  background: rgba(7, 17, 28, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.58), 0 0 18px rgba(66, 201, 255, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 30;
}

.dash-map-history-popover.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dash-map-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(8px * var(--qrm-scale)) calc(12px * var(--qrm-scale));
  color: var(--text-primary);
  font-size: calc(14px * var(--qrm-scale));
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dash-map-history-item:hover {
  background: rgba(35, 111, 151, 0.42);
}

.dash-map-history-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.dash-map-history-remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(24px * var(--qrm-scale));
  height: calc(24px * var(--qrm-scale));
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(220, 236, 245, 0.75);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-map-history-remove:hover {
  background: rgba(255, 80, 80, 0.24);
  color: #ff6b6b;
}

.dash-map-history-remove svg,
.dash-map-history-remove i {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 2;
}

.dash-map-history-empty {
  padding: calc(12px * var(--qrm-scale));
  color: rgba(220, 236, 245, 0.6);
  font-size: calc(13px * var(--qrm-scale));
  text-align: center;
}

.dash-map-zoom-slider {
  width: calc(140px * var(--qrm-scale));
  height: calc(22px * var(--qrm-scale));
  margin: 0;
  accent-color: rgba(125, 218, 255, 0.94);
  cursor: pointer;
  transform: rotate(-90deg);
}

.dash-map-zoom-slider:focus {
  outline: none;
}

.dash-right-power-icon {
  width: 22px;
  height: 22px;
  color: rgba(255, 0, 0, 0.6);
  transition: color 0.2s ease, background-color 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;
}

.dash-right-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;
}

.dash-right-power-icon.status-warning {
  background-color: rgba(255, 255, 0, 0.75);
  color: rgba(255, 255, 255, 0.9);
}

.dash-right-power-icon.status-on {
  background-color: rgba(0, 180, 0, 0.9);
  color: rgba(255, 255, 255, 0.9);
}

.dash-right-power-icon.status-timewarning {
  background-color: lightblue;
  color: rgba(255, 255, 255, 0.9);
}

.dash-right-power-icon.status-timeerror {
  background-color: rgba(0, 100, 255, 1);
  color: rgba(255, 255, 255, 0.9);
}

.dash-right-power-icon.status-unknown {
  background-color: rgba(128, 128, 128, 0.7);
  color: rgba(255, 255, 255, 0.85);
}

.dash-header-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  height: 100%;
}

/* Each column header is now a single full-box section button (LOCATION / DEVICES / TELEMETRY). */
.dash-visual-header-panel:has(> .dash-section-button) {
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
}

.dash-section-button {
  flex: 1 1 100% !important;
  width: 100% !important;
  height: 100% !important;
  border-right: 0 !important;
  border-radius: inherit;
  cursor: pointer !important;
}

/* Location prev/next chevrons on the LOCATION box edges (only in LOCATION/map mode). */
.dash-location-cycle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(42px * var(--qrm-scale));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  transition: color 0.2s ease, background 0.2s ease;
}

.dash-location-cycle-prev { left: 0; }
.dash-location-cycle-next { right: 0; }

.dash-location-cycle svg {
  width: calc(22px * var(--qrm-scale));
  height: calc(22px * var(--qrm-scale));
  stroke-width: 2.5;
}

.dash-location-cycle:hover {
  color: #ffffff;
  background: linear-gradient(180deg, transparent 0%, rgba(66, 201, 255, 0.18) 50%, transparent 100%);
}

.dash-visual-layout.dash-visual-mode-map .dash-visual-left-header .dash-location-cycle {
  display: flex;
}

.dash-visual-layout.dash-visual-devices-open .dash-visual-left-header .dash-location-cycle {
  display: none;
}

.dash-devices-cycle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(42px * var(--qrm-scale));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  transition: color 0.2s ease, background 0.2s ease;
}

.dash-devices-cycle-prev { left: 0; }
.dash-devices-cycle-next { right: 0; }

.dash-devices-cycle svg {
  width: calc(22px * var(--qrm-scale));
  height: calc(22px * var(--qrm-scale));
  stroke-width: 2.5;
}

.dash-devices-cycle:hover {
  color: #ffffff;
  background: linear-gradient(180deg, transparent 0%, rgba(66, 201, 255, 0.18) 50%, transparent 100%);
}

.dash-visual-layout.dash-visual-devices-open.dash-devices-unknown .dash-visual-toggle-panel .dash-devices-cycle {
  display: flex;
}

.dash-devices-add-group {
  position: absolute;
  left: calc(18px * var(--qrm-scale));
  top: calc(18px * var(--qrm-scale));
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  padding: 0;
  border: 1px solid rgba(92, 208, 255, 0.58);
  border-radius: 999px;
  background: linear-gradient(180deg, #0c374f, #071d31);
  color: #dff8ff;
  font-size: calc(11px * var(--qrm-scale));
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 8px rgba(142, 240, 255, 0.65);
  box-shadow: 0 0 0 rgba(66, 201, 255, 0), inset 0 0 12px rgba(66, 201, 255, 0.13);
  cursor: pointer;
  overflow: hidden;
  pointer-events: auto;
  transform: translateY(0);
  transition: width 0.26s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
  animation: dashAddGroupPulse 4.2s ease-in-out infinite;
}

.dash-devices-add-group svg {
  position: absolute;
  left: calc(7px * var(--qrm-scale));
  top: 50%;
  width: calc(17px * var(--qrm-scale));
  height: calc(17px * var(--qrm-scale));
  transform: translateY(-50%);
  stroke-width: 2.8;
}

.dash-devices-add-group span {
  display: inline-block;
  margin-left: calc(34px * var(--qrm-scale));
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transform: translateX(calc(-6px * var(--qrm-scale)));
  transition: max-width 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-devices-add-group:hover {
  width: calc(142px * var(--qrm-scale));
  background: linear-gradient(180deg, #0f4561, #08263c);
  border-color: rgba(142, 240, 255, 0.9);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(66, 201, 255, 0.45), inset 0 0 16px rgba(66, 201, 255, 0.22);
  transform: translateY(-1px) scale(1.035);
}

.dash-devices-add-group:hover span {
  max-width: calc(104px * var(--qrm-scale));
  opacity: 1;
  transform: translateX(0);
}

.dash-group-tile-grid-btn,
.dash-group-tile-view-btn,
.dash-group-tile-add-btn {
  pointer-events: auto;
}

.dash-group-tile-grid-icon {
  fill: rgba(223, 248, 255, 0.18);
  stroke: rgba(223, 248, 255, 0.58);
  stroke-width: 1.1;
  opacity: 0.62;
  transition: fill 0.18s ease, stroke 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.dash-group-tile-grid-bg {
  fill: rgba(32, 174, 226, 0.24);
  stroke: rgba(92, 208, 255, 0.58);
  stroke-width: 1;
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.dash-group-tile-grid-btn:hover .dash-group-tile-grid-bg {
  fill: rgba(66, 201, 255, 0.36);
  stroke: rgba(142, 240, 255, 0.9);
  filter: drop-shadow(0 0 11px rgba(66, 201, 255, 0.55));
}

.dash-group-tile-grid-btn:hover .dash-group-tile-grid-icon {
  fill: rgba(223, 248, 255, 0.42);
  stroke: rgba(223, 248, 255, 0.98);
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(92, 208, 255, 0.55));
}

.dash-group-tile-grid-btn.is-disabled,
.dash-group-tile-grid-btn.is-disabled * {
  cursor: not-allowed;
}

.dash-group-tile-grid-btn.is-disabled .dash-group-tile-grid-icon,
.dash-group-tile-grid-btn.is-disabled:hover .dash-group-tile-grid-icon {
  fill: rgba(120, 140, 150, 0.08);
  stroke: rgba(150, 170, 180, 0.28);
  opacity: 0.32;
  filter: none;
}

.dash-group-tile-grid-btn.is-disabled .dash-group-tile-grid-bg,
.dash-group-tile-grid-btn.is-disabled:hover .dash-group-tile-grid-bg {
  fill: rgba(80, 100, 110, 0.08);
  stroke: rgba(150, 170, 180, 0.24);
  filter: none;
}

.dash-group-tile-view-btn,
.dash-group-tile-view-btn * {
  cursor: pointer;
  user-select: none;
}

.dash-group-tile-view-bg {
  fill: rgba(6, 22, 36, 0.84);
  stroke: rgba(92, 208, 255, 0.28);
  stroke-width: 1;
  transition: fill 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}

.dash-group-tile-view-text {
  fill: #dff8ff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
}

.dash-group-tile-view-btn:hover .dash-group-tile-view-bg {
  fill: rgba(66, 201, 255, 0.22);
  stroke: rgba(142, 240, 255, 0.92);
  filter: drop-shadow(0 0 10px rgba(66, 201, 255, 0.52));
}

.dash-group-tile-add-bg {
  fill: rgba(32, 174, 226, 0.24);
  stroke: rgba(92, 208, 255, 0.58);
  stroke-width: 1;
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.dash-group-tile-add-plus {
  fill: none;
  stroke: #dff8ff;
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(142, 240, 255, 0.5));
  transition: stroke 0.2s ease, filter 0.2s ease;
}

.dash-group-tile-add-btn:hover .dash-group-tile-add-bg {
  fill: rgba(66, 201, 255, 0.36);
  stroke: rgba(142, 240, 255, 0.9);
  filter: drop-shadow(0 0 11px rgba(66, 201, 255, 0.55));
}

.dash-group-tile-add-btn:hover .dash-group-tile-add-plus {
  stroke: #ffffff;
  filter: drop-shadow(0 0 8px rgba(142, 240, 255, 0.8));
}

.dash-scene-icon-type-marker {
  stroke: rgba(223, 248, 255, 0.42);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.dash-visual-layout.dash-visual-devices-open:not(.dash-devices-unknown):not(.dash-devices-view-all) .dash-devices-chrome .dash-devices-add-group {
  display: inline-flex;
}

@keyframes dashAddGroupPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(66, 201, 255, 0), inset 0 0 12px rgba(66, 201, 255, 0.13); }
  50% { box-shadow: 0 0 16px rgba(66, 201, 255, 0.34), inset 0 0 18px rgba(66, 201, 255, 0.22); }
}

.dash-telemetry-cycle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(42px * var(--qrm-scale));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  transition: color 0.2s ease, background 0.2s ease;
}

.dash-telemetry-cycle-prev { left: 0; }
.dash-telemetry-cycle-next { right: 0; }

.dash-telemetry-cycle svg {
  width: calc(22px * var(--qrm-scale));
  height: calc(22px * var(--qrm-scale));
  stroke-width: 2.5;
}

.dash-telemetry-cycle:hover {
  color: #ffffff;
  background: linear-gradient(180deg, transparent 0%, rgba(66, 201, 255, 0.18) 50%, transparent 100%);
}

.dash-telemetry-cycle:disabled,
.dash-telemetry-cycle[aria-disabled="true"] {
  color: rgba(226, 232, 240, 0.28);
  cursor: not-allowed;
  pointer-events: none;
}

.dash-telemetry-cycle:disabled:hover,
.dash-telemetry-cycle[aria-disabled="true"]:hover {
  background: transparent;
}

.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-right-header .dash-telemetry-cycle {
  display: flex;
}

.dash-header-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(66, 201, 255, 0.22);
  background: transparent;
  color: var(--text-primary);
  font-size: calc(14px * var(--qrm-scale));
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  outline: none;
  box-shadow: none;
  transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
}

.dash-header-button-icon,
.dash-header-button svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  stroke-width: 2;
}

.dash-header-button:last-child {
  border-right: 0;
}

.dash-control-devices:hover {
  cursor: pointer;
}

.dash-header-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dash-header-button-disabled:hover,
.dash-header-button-disabled.active {
  background: transparent;
  text-shadow: none;
}

.dash-control-devices.dash-header-button-disabled,
.dash-control-devices.dash-header-button-disabled:hover,
.dash-control-telemetry.dash-header-button-disabled,
.dash-control-telemetry.dash-header-button-disabled:hover {
  cursor: not-allowed;
}

.dash-header-button:hover,
.dash-header-button.active {
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(48, 78, 146, 0.34) 0%, rgba(35, 111, 151, 0.52) 50%, rgba(48, 78, 146, 0.34) 100%);
  text-shadow: 0 0 16px rgba(125, 218, 255, 0.42);
}

.dash-header-button:focus,
.dash-header-button:focus-visible,
.dash-header-button:active {
  outline: none;
  box-shadow: none;
}

.dash-control-telemetry,
.dash-map-button {
  cursor: pointer;
}

.dash-control-telemetry .dash-telemetry-button-datetime {
  position: absolute;
  top: calc(4px * var(--qrm-scale));
  right: calc(40px * var(--qrm-scale));
  bottom: auto;
  left: auto;
  transform: none;
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: calc(8px * var(--qrm-scale));
  max-width: calc(100% - 12px);
  color: rgba(235, 245, 255, 0.9);
  font-family: 'Rajdhani', sans-serif;
  font-size: calc(11px * var(--qrm-scale));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
}

.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open)
  .dash-control-telemetry.active .dash-telemetry-button-datetime {
  display: flex;
}

.dash-map-location,
.dash-map-hover-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.62s ease;
}

.dash-map-hover-label {
  transform: translateX(-100%);
  opacity: 0;
}

.dash-map-hover-label svg,
.dash-map-hover-label i {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.dash-map-button:hover .dash-map-location {
  transform: translateX(100%);
  opacity: 0;
}

.dash-map-button:hover .dash-map-hover-label {
  transform: translateX(0);
  opacity: 1;
}

.dash-map-static-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dash-map-static-label svg,
.dash-map-static-label i {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

/* Map tool circle buttons: hidden unless LOCATION (map) mode is active.
   Rendered as a column that cascades straight down under the LOCATION button. */
.map-tool-circles {
  position: absolute;
  top: calc(var(--top-bar-height) + 6px);
  left: 0;
  width: calc(100% / 3);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(8px * var(--qrm-scale));
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dash-visual-layout.dash-visual-mode-map:not(.dash-visual-devices-open) .map-tool-circles {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.map-tool-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(66, 201, 255, 0.4);
  border-radius: 50%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(48, 78, 146, 0.34) 6%, rgba(35, 111, 151, 0.52) 50%, rgba(48, 78, 146, 0.34) 94%, transparent 100%),
    var(--dashboard-panel-bg);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.dash-visual-layout.dash-visual-mode-map:not(.dash-visual-devices-open) .map-tool-circle {
  animation: mapToolCascade 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--cascade-index, 0) * 60ms);
}

.map-tool-circle svg,
.map-tool-circle i {
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
  flex: 0 0 auto;
}

/* First circle button: layered map-pin + search icon, matching the map search bar. */
.map-tool-search-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
}

.map-tool-search-icon svg,
.map-tool-search-icon i {
  position: absolute;
  width: calc(15px * var(--qrm-scale)) !important;
  height: calc(15px * var(--qrm-scale)) !important;
  stroke-width: 2;
}

.map-tool-search-icon svg:last-child,
.map-tool-search-icon i:last-child {
  width: calc(9px * var(--qrm-scale)) !important;
  height: calc(9px * var(--qrm-scale)) !important;
  right: calc(-1px * var(--qrm-scale));
  bottom: 0;
}

/* Sun/moon day-night circle button. */
.map-tool-daynight {
  position: relative;
}

.map-tool-daynight-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.map-tool-daynight-icon svg,
.map-tool-daynight-icon i {
  width: calc(18px * var(--qrm-scale)) !important;
  height: calc(18px * var(--qrm-scale)) !important;
  flex: 0 0 auto;
}

.map-tool-daynight:not(.dark) .map-tool-daynight-sun,
.map-tool-daynight.dark .map-tool-daynight-moon {
  opacity: 1;
}

.map-tool-circle:hover {
  background: linear-gradient(180deg, rgba(66, 201, 255, 0.4), rgba(35, 111, 151, 0.5));
  border-color: rgba(125, 218, 255, 0.7);
  box-shadow: 0 0 10px rgba(125, 218, 255, 0.4);
}

.map-tool-circle:focus,
.map-tool-circle:focus-visible,
.map-tool-circle:active {
  outline: none;
  box-shadow: none;
}

@keyframes mapToolCascade {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Unassigned category cascade buttons (top-left of the DEVICES box, shown only
   for the "Unknown" selection). Reuses the map-tool circle look + cascade. */
.dash-unassigned-cats {
  position: absolute;
  top: calc(var(--top-bar-height) + 46px);
  left: calc(14px * var(--qrm-scale));
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(8px * var(--qrm-scale));
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.dash-unassigned-cats.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dash-unassigned-cat {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(34px * var(--qrm-scale));
  height: calc(34px * var(--qrm-scale));
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(66, 201, 255, 0.4);
  border-radius: 50%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(48, 78, 146, 0.34) 6%, rgba(35, 111, 151, 0.52) 50%, rgba(48, 78, 146, 0.34) 94%, transparent 100%),
    var(--dashboard-panel-bg);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.dash-unassigned-cats.show .dash-unassigned-cat {
  animation: mapToolCascade 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--cascade-index, 0) * 60ms);
}
.dash-unassigned-cat svg,
.dash-unassigned-cat i {
  width: calc(20px * var(--qrm-scale));
  height: calc(20px * var(--qrm-scale));
  flex: 0 0 auto;
}
.dash-unassigned-cat:hover {
  background: linear-gradient(180deg, rgba(66, 201, 255, 0.4), rgba(35, 111, 151, 0.5));
  border-color: rgba(125, 218, 255, 0.7);
  box-shadow: 0 0 10px rgba(125, 218, 255, 0.4);
}
.dash-unassigned-cat.active {
  border-color: rgba(125, 218, 255, 0.9);
  box-shadow: 0 0 12px rgba(125, 218, 255, 0.55);
  background: linear-gradient(180deg, rgba(66, 201, 255, 0.5), rgba(35, 111, 151, 0.6));
}
.dash-unassigned-cat:focus,
.dash-unassigned-cat:focus-visible,
.dash-unassigned-cat:active {
  outline: none;
  box-shadow: none;
}

/* Unassigned highlight boxes drawn on the device grid. One box = 1x1 + 1x0.5. */
.dash-unassigned-box-line {
  fill: none;
  stroke: #4fc3f7;
  stroke-width: 3;
}
.dash-unassigned-box:hover .dash-unassigned-box-hit {
  fill: rgba(255, 106, 0, 0.45);
}
/* ASSIGN button in the 1x0.5 area under each unassigned device box. */
.dash-unassigned-assign-btn {
  width: auto;
  max-width: 100%;
  height: auto;
  padding: 6px 22px;
  max-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(66, 201, 255, 0.6);
  background: rgba(8, 18, 28, 0.72);
  color: #dff3ff;
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.dash-unassigned-assign-btn:hover {
  background: rgba(66, 201, 255, 0.28);
  border-color: rgba(125, 218, 255, 0.85);
  box-shadow: 0 0 10px rgba(125, 218, 255, 0.4);
}

/* ===== Isometric telemetry panel (CPU/GPU/RAM/Storage), from QRM design ===== */
.qrm-iso-panel {
  --panel: #0b0f18;
  --panel-edge: #161d2b;
  --text-dim: #5b6577;
  --text-bright: #e7ecf5;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  font-family: 'Rajdhani', sans-serif;
  color: var(--text-bright);
}

/* Directional device-to-device transition inside Dashboard TELEMETRY mode. */
.dash-visual-layout.dash-telemetry-device-exit-left .dash-visual-body-panel,
.dash-visual-layout.dash-telemetry-device-exit-left .dash-visual-network-panel,
.dash-visual-layout.dash-telemetry-device-exit-left .telemetry-bottom-box {
  animation: dashTelemetryDeviceExitLeft 0.24s cubic-bezier(0.55, 0, 0.2, 1) both;
}

.dash-visual-layout.dash-telemetry-device-exit-right .dash-visual-body-panel,
.dash-visual-layout.dash-telemetry-device-exit-right .dash-visual-network-panel,
.dash-visual-layout.dash-telemetry-device-exit-right .telemetry-bottom-box {
  animation: dashTelemetryDeviceExitRight 0.24s cubic-bezier(0.55, 0, 0.2, 1) both;
}

.dash-visual-layout.dash-telemetry-device-enter-left .dash-visual-body-panel,
.dash-visual-layout.dash-telemetry-device-enter-left .dash-visual-network-panel,
.dash-visual-layout.dash-telemetry-device-enter-left .telemetry-bottom-box {
  animation: dashTelemetryDeviceEnterLeft 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-visual-layout.dash-telemetry-device-enter-right .dash-visual-body-panel,
.dash-visual-layout.dash-telemetry-device-enter-right .dash-visual-network-panel,
.dash-visual-layout.dash-telemetry-device-enter-right .telemetry-bottom-box {
  animation: dashTelemetryDeviceEnterRight 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dashTelemetryDeviceExitLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-14%); }
}

@keyframes dashTelemetryDeviceExitRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(14%); }
}

@keyframes dashTelemetryDeviceEnterLeft {
  from { opacity: 0; transform: translateX(-14%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes dashTelemetryDeviceEnterRight {
  from { opacity: 0; transform: translateX(14%); }
  to { opacity: 1; transform: translateX(0); }
}

.qrm-iso-panel .panel {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 4px 4px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.qrm-iso-panel .panel::before { display: none; }

.qrm-iso-panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
  flex: 0 0 auto;
}

.qrm-iso-panel .panel-title {
  font-family: 'Michroma', sans-serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--text-bright);
  margin-top: 2px;
  margin-left: 10px;
}

.qrm-iso-panel .panel-sub {
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: #69d7ff;
  text-shadow: 0 0 8px rgba(44, 190, 255, 0.32);
  margin-top: 3px;
  margin-right: 10px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.qrm-iso-panel .panel-foot-left,
.qrm-iso-panel .panel-foot-right {
  position: absolute;
  bottom: 8px;
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  pointer-events: none;
}

.qrm-iso-panel .panel-foot-left { left: 12px; text-align: left; }
.qrm-iso-panel .panel-foot-right { right: 12px; text-align: right; }
.qrm-iso-panel .panel-foot-name {
  display: block;
  color: inherit;
  margin-bottom: 2px;
}

.qrm-iso-panel .panel-body {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.qrm-iso-panel .panel-left,
.qrm-iso-panel .panel-right {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrm-iso-panel .panel-left { padding-right: 0; }
.qrm-iso-panel .panel-right { padding-left: 0; }

/* Keep hardware graph walls from touching the outside card edges. Network has
   its own full-width composition and is intentionally excluded. */
.qrm-iso-panel .panel:not(:has(.net-iso-card)) .panel-left,
.qrm-iso-panel .panel:not(:has(.net-iso-card)) .panel-right {
  box-sizing: border-box;
}

.qrm-iso-panel .panel:not(:has(.net-iso-card)) .panel-left {
  padding-left: calc(10px * var(--qrm-scale));
}

.qrm-iso-panel .panel:not(:has(.net-iso-card)) .panel-right {
  padding-right: calc(10px * var(--qrm-scale));
}
.qrm-iso-panel .panel svg {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

@keyframes qrmIsoSlide {
  from { transform: translate(28.87px, -16.67px); }
  to { transform: translate(0, 0); }
}

.qrm-iso-panel .qrm-iso-slidegroup {
  animation: qrmIsoSlide 1.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@keyframes qrmIsoArcSweep {
  from { transform: rotate(-16deg); opacity: 0.45; }
  to { transform: rotate(0); opacity: 1; }
}

@keyframes qrmIsoRiseY {
  from { transform: scaleY(0.02); }
  to { transform: scaleY(1); }
}

@keyframes qrmIsoGrowX {
  from { transform: scaleX(0.02); }
  to { transform: scaleX(1); }
}

.qrm-iso-panel .qrm-iso-arc {
  animation: qrmIsoArcSweep 1.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.qrm-iso-panel .qrm-iso-thermo-fill {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: qrmIsoRiseY 1.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.qrm-iso-panel .qrm-iso-cap-fill,
.qrm-iso-panel .qrm-iso-net-fill {
  transform-box: fill-box;
  transform-origin: left;
  animation: qrmIsoGrowX 1.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@keyframes qrmIsoArcDraw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

.qrm-iso-panel .qrm-iso-arc-fill {
  stroke-dasharray: 100;
  animation: qrmIsoArcDraw 1.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .qrm-iso-panel .qrm-iso-slidegroup,
  .qrm-iso-panel .qrm-iso-arc,
  .qrm-iso-panel .qrm-iso-arc-fill,
  .qrm-iso-panel .qrm-iso-thermo-fill,
  .qrm-iso-panel .qrm-iso-cap-fill,
  .qrm-iso-panel .qrm-iso-net-fill { animation: none; }
}

/* One full telemetry panel per device, except NETWORK where three are visible. */
.qrm-iso-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.qrm-iso-scroll.is-programmatic-swiping {
  scroll-snap-type: none !important;
}

.qrm-iso-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.qrm-iso-slide {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.qrm-iso-slide > .qrm-iso-panel {
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  will-change: transform, opacity;
}

.qrm-iso-slide.is-before > .qrm-iso-panel {
  opacity: 1;
  transform: translateY(0);
}

.qrm-iso-slide.is-after > .qrm-iso-panel {
  opacity: 1;
  transform: translateY(0);
}

.qrm-iso-slide.is-visible > .qrm-iso-panel {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .qrm-iso-slide > .qrm-iso-panel {
    transition: none;
  }
}

.qrm-iso-scroll--network-two .qrm-iso-slide { height: 50%; }

.qrm-iso-scroll--network-two .net-iso-stage,
.qrm-iso-scroll--network-two .net-iso-meters,
.qrm-iso-scroll--network-two .net-iso-meter,
.qrm-iso-scroll--network-two .qrm-iso-arcgauge {
  overflow: visible !important;
  clip-path: none !important;
  contain: none !important;
}

.qrm-iso-scroll--network-two .qrm-iso-slide {
  overflow: hidden !important;
  clip-path: inset(0);
}

/* NETWORK uses the full card footprint; do not inherit the hardware-panel
   padding or clipping that trims its header and edge-aligned graph. */
.qrm-iso-scroll--network-two {
  overflow-x: hidden;
}

.qrm-iso-panel:has(.net-iso-card),
.qrm-iso-panel .panel:has(.net-iso-card),
.qrm-iso-panel .net-iso-card {
  overflow: visible;
}

.qrm-iso-panel .panel:has(.net-iso-card) {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.qrm-iso-dots {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 4;
  pointer-events: auto;
}

.qrm-iso-dot {
  appearance: none;
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  box-shadow: none !important;
  filter: none !important;
}

.qrm-iso-dot:focus,
.qrm-iso-dot:active {
  box-shadow: none !important;
  filter: none !important;
}

.qrm-iso-dot::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(120, 140, 170, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.qrm-iso-dot.is-active::before {
  background: var(--text-bright, #e7ecf5);
  transform: none;
}

.qrm-iso-dot:hover::before,
.qrm-iso-dot:focus-visible::before {
  transform: scale(1.35);
}

.qrm-iso-dot:focus-visible {
  outline: 1px solid rgba(125, 211, 252, 0.8);
  outline-offset: 1px;
}

/* Telemetry charts are scrollable, not draggable. Keep a canceled sidebar or
   Network Diagram drag from leaking its grab cursor into these graph boxes. */
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .qrm-iso-scroll,
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .qrm-iso-panel,
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .qrm-iso-panel * {
  cursor: default !important;
}

.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .qrm-iso-dot {
  cursor: pointer !important;
}

/* NETWORK card: dual line graph plus the paired elbow-to-elbow speedometers. */
.qrm-iso-panel .net-iso-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.qrm-iso-panel .net-iso-card::after {
  content: none;
}

.qrm-iso-panel .net-iso-interface {
  position: absolute;
  top: calc(4px * var(--qrm-scale));
  left: 0;
  z-index: 2;
  max-width: 100%;
  padding-bottom: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: clip;
  white-space: normal;
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 1px;
  color: #69d7ff;
  text-shadow: 0 0 8px rgba(44, 190, 255, 0.32);
}

.qrm-iso-panel .net-iso-body {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  transform: none;
}

/* Every Network slide uses the approved first-page composition. */
.qrm-iso-scroll--network-two .qrm-iso-slide .net-iso-interface {
  top: calc(4px * var(--qrm-scale));
  transform: none;
}

.qrm-iso-scroll--network-two .qrm-iso-slide .net-iso-body {
  transform: none;
}

/* The lower visible Network slot needs extra clearance below its fixed
   Ethernet name. Slot classes are updated while scrolling, so this alignment
   follows the viewport position instead of a particular adapter number. */
.qrm-iso-scroll--network-two .qrm-iso-slide.is-visible-bottom .net-iso-body {
  transform: translateY(calc(24px * var(--qrm-scale)));
}

.qrm-iso-scroll--network-two .qrm-iso-slide .panel-foot-left,
.qrm-iso-scroll--network-two .qrm-iso-slide .panel-foot-right {
  bottom: calc(30px * var(--qrm-scale));
}

.qrm-iso-scroll--network-two .qrm-iso-slide.is-visible-bottom .panel-foot-left,
.qrm-iso-scroll--network-two .qrm-iso-slide.is-visible-bottom .panel-foot-right {
  bottom: calc(8px * var(--qrm-scale));
}

.qrm-iso-scroll--network-two .qrm-iso-slide .net-iso-chart {
  transform: translateY(calc(22px * var(--qrm-scale)));
}

.qrm-iso-panel .net-iso-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  z-index: 1;
  overflow: hidden;
}

.qrm-iso-panel .net-iso-chart {
  overflow: visible;
}

.qrm-iso-panel .net-iso-legend {
  position: absolute;
  left: 43%;
  top: calc(78px * var(--qrm-scale));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(5px * var(--qrm-scale));
  white-space: nowrap;
  font-family: 'Rajdhani', sans-serif;
  font-size: calc(12px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.35px;
  color: #a7b2c6;
  transform: translateY(-50%) matrix(0.866, -0.5, 0, 1, 0, 0);
  transform-origin: left center;
}

.qrm-iso-panel .net-iso-legend span {
  display: grid;
  grid-template-columns: 10px auto;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.qrm-iso-panel .net-iso-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  box-shadow: 0 0 7px currentColor;
}

.qrm-iso-panel .net-iso-legend .download i { color: #39ff9a; background: #39ff9a; }
.qrm-iso-panel .net-iso-legend .upload i { color: #4fc3f7; background: #4fc3f7; }
.qrm-iso-panel .net-iso-legend strong {
  font-weight: 700;
  color: #a7b2c6;
}
.qrm-iso-panel .net-iso-legend b {
  min-width: 54px;
  font-family: 'Michroma', sans-serif;
  font-size: 0.9em;
  font-weight: 600;
  color: #f1f7ff;
  text-align: right;
}

.qrm-iso-panel .net-iso-data-legend {
  position: absolute;
  left: 75%;
  top: calc(18px * var(--qrm-scale));
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(5px * var(--qrm-scale));
  white-space: nowrap;
  font-family: 'Rajdhani', sans-serif;
  font-size: calc(12px * var(--qrm-scale));
  font-weight: 700;
  color: #a7b2c6;
  transform: translateX(-50%) matrix(0.866, 0.5, 0, 1, 0, 0);
  transform-origin: center;
}

.qrm-iso-panel .net-iso-data-legend span {
  display: grid;
  grid-template-columns: 10px auto auto;
  align-items: center;
  gap: 7px;
  line-height: 1;
}

.qrm-iso-panel .net-iso-data-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  box-shadow: 0 0 7px currentColor;
}

.qrm-iso-panel .net-iso-data-legend .upload i { color: #4fc3f7; background: #4fc3f7; }
.qrm-iso-panel .net-iso-data-legend .download i { color: #39ff9a; background: #39ff9a; }
.qrm-iso-panel .net-iso-data-legend strong { color: #a7b2c6; }
.qrm-iso-panel .net-iso-data-legend b {
  min-width: 54px;
  font-family: 'Michroma', sans-serif;
  font-size: 0.9em;
  color: #f1f7ff;
  text-align: right;
}

.qrm-iso-panel .net-iso-meters {
  overflow: visible;
}

.qrm-iso-panel .net-iso-dual-meter {
  overflow: visible;
  transform: matrix(0.866, -0.5, 0, 1, 0, 0);
  transform-box: fill-box;
  transform-origin: center;
}

.qrm-iso-panel .net-iso-meter {
  overflow: visible;
  transform-box: fill-box;
  transform-origin: center;
  filter: none;
}

.qrm-iso-panel .net-iso-meter .qrm-iso-arcgauge *,
.qrm-iso-panel .net-iso-meter .qrm-iso-arc-fill {
  filter: none !important;
}

.qrm-iso-panel .net-iso-meter.download,
.qrm-iso-panel .net-iso-meter.upload {
  transform: matrix(0.866, -0.5, 0, 1, 0, 0);
}

/* Search flyout opened by the map-pin-search circle (reuses the map search bar). */
.map-tool-search-flyout {
  position: absolute;
  top: calc(var(--top-bar-height) + 4px);
  left: calc(34px * var(--qrm-scale) + 12px);
  z-index: 21;
  width: min(300px, 62%);
  height: calc(38px * var(--qrm-scale));
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.map-tool-search-flyout[hidden],
.dash-visual-layout:not(.dash-visual-mode-map) .map-tool-search-flyout,
.dash-visual-layout.dash-visual-devices-open .map-tool-search-flyout {
  display: none;
}

.map-tool-search-flyout .dash-map-search {
  width: 100%;
  margin: 0;
}

.dash-map-search.map-tool-search-bar {
  padding-left: calc(18px * var(--qrm-scale));
}

/* While the search flyout is open, lift the left column above the other columns
   so the suggestions dropdown is on top and clickable (not covered by widgets). */
.dash-visual-left-stack:has(.map-tool-search-flyout:not([hidden])) {
  z-index: 30;
}

.dash-visual-toggle-panel {
  position: relative;
}

.dash-device-nav-button {
  position: absolute;
  top: 0;
  width: var(--top-bar-height);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.dash-device-nav-button-prev {
  left: 0;
}

.dash-device-nav-button-next {
  right: 0;
}

.dash-device-nav-button svg,
.dash-device-nav-button i {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.dash-device-nav-button:hover:not(:disabled) {
  color: var(--text-primary);
  background: linear-gradient(180deg, transparent 0%, rgba(48, 78, 146, 0.34) 6%, rgba(35, 111, 151, 0.52) 50%, rgba(48, 78, 146, 0.34) 94%, transparent 100%);
}

.dash-device-nav-button:focus,
.dash-device-nav-button:focus-visible,
.dash-device-nav-button:active {
  outline: none;
  box-shadow: none;
}

.dash-device-nav-button:disabled,
.dash-device-nav-button.disabled {
  cursor: not-allowed;
  color: rgba(226, 245, 255, 0.22);
  background: transparent;
}

.dash-visual-box-label {
  position: relative;
  z-index: 9;
  display: flex;
  align-items: center;
  height: calc(var(--top-bar-height) / 2);
  margin: 0;
  padding: 0 12px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

/* Match the Network box heading to the CPU/RAM/GPU/Storage panel titles. */
.dash-visual-network-panel > .dash-visual-box-label {
  height: auto;
  margin: 6px 0 0 14px;
  padding: 0;
  overflow: visible;
  color: var(--text-bright, #e7ecf5);
  font-family: 'Michroma', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 1.5px;
}

.dash-visual-network-panel > .dash-visual-box-label .dash-label-dblclick-text {
  display: block;
  overflow: visible;
  padding: 1px 0;
}

.dash-visual-layout.dash-telemetry-health-warning .dash-cpu-title,
.dash-visual-layout.dash-telemetry-health-warning .dash-storage-title,
.dash-visual-layout.dash-telemetry-health-warning .qrm-iso-panel .panel-title,
.dash-visual-layout.dash-telemetry-health-warning .dash-visual-network-panel > .dash-visual-box-label {
  color: #ffd93b !important;
}

.dash-visual-layout.dash-telemetry-health-critical .dash-cpu-title,
.dash-visual-layout.dash-telemetry-health-critical .dash-storage-title,
.dash-visual-layout.dash-telemetry-health-critical .qrm-iso-panel .panel-title,
.dash-visual-layout.dash-telemetry-health-critical .dash-visual-network-panel > .dash-visual-box-label {
  color: #ff3b3b !important;
}

.dash-label-dblclick-text {
  position: relative;
  z-index: 10;
  display: inline-block;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.dash-visual-toggle {
  min-width: min(400px, 100%);
}

.dash-cpu-analytics-widget {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: calc(var(--top-bar-height) / 2) minmax(0, 1fr);
  background:
    linear-gradient(145deg, rgba(6, 18, 42, 0.72), rgba(0, 7, 20, 0.24) 52%, rgba(7, 34, 58, 0.54));
  --dash-gauge-size: 142px;
  --dash-gauge-x-offset: calc(var(--dash-gauge-size) * -0.15);
  --dash-gauge-offset: 0px;
  --dash-legend-left: 0px;
  --dash-legend-top: 10px;
  --dash-instrument-top: 0px;
  --dash-thermostat-top: 0px;
  --dash-label-top: 150px;
  --dash-label-gap: 8px;
  --dash-graph-button-top: 176px;
  --dash-thermostat-height: 142px;
  --dash-thermostat-tube-height: 112px;
  --dash-thermostat-scale-height: 110px;
}

.dash-cpu-analytics-widget::before {
  display: none;
}

.dash-cpu-analytics-widget::after {
  display: none;
}

.dash-cpu-loading {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-cpu-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: calc(var(--top-bar-height) / 2);
  margin: 0;
  padding: 0 12px;
}

.dash-cpu-title {
  position: relative;
  z-index: 9;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: none;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.dash-cpu-processor-heading {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 58px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(10px * var(--qrm-scale));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-align: right;
  text-transform: uppercase;
}

.dash-cpu-main {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.dash-cpu-gauge-zone {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  perspective: calc(var(--dash-gauge-size) * 3.15);
  transform-style: preserve-3d;
}

.dash-cpu-line-graph {
  position: absolute;
  left: 6.25%;
  top: calc(var(--dash-instrument-top) + 3px);
  z-index: 1;
  width: 39%;
  height: calc(var(--dash-gauge-size) * 0.78);
  overflow: visible;
  transform: perspective(calc(var(--dash-gauge-size) * 2.8)) rotateY(-18deg) rotateX(4deg) skewY(-4deg);
  transform-origin: left bottom;
  filter: drop-shadow(0 0 7px rgba(56, 162, 255, 0.22));
  pointer-events: none;
}

.dash-cpu-line-graph-grid,
.dash-cpu-line-graph-frame {
  fill: none;
  stroke: rgba(125, 190, 242, 0.24);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.dash-cpu-line-graph-frame {
  stroke: rgba(125, 190, 242, 0.48);
}

.dash-cpu-line-graph-line {
  fill: none;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dash-cpu-line-graph-area {
  fill: rgba(56, 162, 255, 0.16);
  stroke: none;
}

.dash-cpu-line-graph-line-usage {
  stroke: #38a2ff;
}

.dash-cpu-line-graph-line-temp {
  stroke: #38d39f;
}

.dash-cpu-line-graph-line-warn {
  stroke: #ff3868;
}

.dash-cpu-gauge-wrap {
  position: absolute;
  left: 25%;
  top: var(--dash-instrument-top);
  width: var(--dash-gauge-size);
  height: var(--dash-gauge-size);
  max-width: 37.5%;
  max-height: 75%;
  aspect-ratio: 1;
  z-index: 2;
  transform: translateX(-50%) perspective(calc(var(--dash-gauge-size) * 2.55)) rotateX(58deg);
  transform-origin: 50% 72%;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-cpu-gauge-wrap::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 112%;
  height: 34%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(56, 162, 255, 0.26) 0%, rgba(12, 23, 44, 0.18) 42%, transparent 74%);
  filter: blur(10px);
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
}

.dash-cpu-gauge-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 54%;
  width: 112%;
  height: 76%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(118, 186, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(1, 6, 14, 0.25);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.dash-cpu-gauge-canvas {
  position: absolute;
  inset: 0;
}

.dash-cpu-pie-readout {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.dash-cpu-center-row {
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.dash-cpu-center-row-usage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dash-cpu-center-row-idle {
  position: absolute;
  left: 50%;
  top: calc(50% + 24px);
  transform: translateX(-50%);
}

.dash-cpu-center-row-usage strong {
  color: var(--load-color, #38a2ff);
  font-size: 45px;
  font-weight: 700;
  text-shadow: none;
}

.dash-cpu-center-row-idle strong {
  color: rgba(123, 150, 190, 0.66);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.dash-cpu-load-label {
  position: absolute;
  left: 6.25%;
  top: var(--dash-label-top);
  width: 37.5%;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(186, 230, 253, 0.86);
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dash-cpu-legend {
  position: absolute;
  right: auto;
  /* align the dots with the card title (header padding is 12px) */
  left: 12px;
  top: calc(var(--dash-instrument-top) + 8px);
  min-height: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 3;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 0;
}

.dash-cpu-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(232, 246, 255, 0.64);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
  white-space: nowrap;
}

.dash-cpu-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: none;
}

.dash-cpu-legend-dot-usage {
  color: var(--load-color, #38a2ff);
  background: var(--load-color, #38a2ff);
}

.dash-cpu-legend-item:has(.dash-cpu-legend-dot-usage) {
  color: var(--load-color, #38a2ff);
}

.dash-cpu-legend-dot-idle {
  color: rgba(123, 150, 190, 0.66);
  background: rgba(123, 150, 190, 0.66);
}

.dash-cpu-legend-item:has(.dash-cpu-legend-dot-idle) {
  color: rgba(123, 150, 190, 0.66);
}

.dash-thermostat-panel {
  position: absolute;
  left: 56.25%;
  top: var(--dash-thermostat-top);
  width: 37.5%;
  height: var(--dash-thermostat-height);
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-temp-card {
  width: 100%;
  min-width: 0;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
}

.dash-temp-card::before {
  display: none;
}

.dash-temp-main {
  height: 100%;
  position: relative;
  width: 143px;
  transform: translateX(-28px);
}

.dash-temp-stage {
  position: absolute;
  left: 0;
  top: 50%;
  width: 56px;
  height: var(--dash-thermostat-height);
  transform: translateY(-50%);
}

.dash-temp-scale {
  position: absolute;
  left: -26px;
  top: 9px;
  z-index: 2;
  width: 56.5px;
  height: calc(var(--dash-thermostat-scale-height) - 19px);
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 7px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  line-height: 1;
  text-align: right;
}

.dash-temp-scale > span {
  position: absolute;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 37px) 7px;
  column-gap: 7px;
  align-items: center;
  justify-content: end;
  justify-items: start;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.dash-temp-scale-label {
  display: grid;
  grid-template-columns: 22px 13px;
  column-gap: 2px;
  width: 37px;
  justify-self: start;
  font-family: Consolas, 'Liberation Mono', monospace;
  text-align: right;
}

.dash-temp-scale-number {
  text-align: right;
}

.dash-temp-scale-unit {
  text-align: left;
}

.dash-temp-scale > span:nth-child(1) { top: 0; }
.dash-temp-scale > span:nth-child(2) { top: 25%; }
.dash-temp-scale > span:nth-child(3) { top: 50%; }
.dash-temp-scale > span:nth-child(4) { top: 75%; }
.dash-temp-scale > span:nth-child(5) { top: 100%; }

.dash-temp-scale > span::after {
  content: '';
  position: static;
  width: 7px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.dash-temp-tube {
  width: clamp(108px, calc(100px * var(--qrm-scale)), 144px);
  position: absolute;
  left: 35px;
  top: 0;
  z-index: 1;
  width: 15px;
  height: var(--dash-thermostat-tube-height);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03) 35%, rgba(0, 0, 0, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: calc(6px * var(--qrm-scale)) calc(9px * var(--qrm-scale));
  font-size: calc(10px * var(--qrm-scale));
}

.dash-temp-fill {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 4px;
  height: var(--temp-fill, 0%);
  max-height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(180deg, #eafff8 0%, var(--temp-color, #38d39f) 30%, #059669 100%);
  box-shadow: none;
  transition: height 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-temp-shine {
  position: absolute;
  top: 8px;
  bottom: 9px;
  left: 5px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  opacity: 0.5;
}

.dash-temp-value {
  position: absolute;
  left: 69px;
  top: 50%;
  width: 110px;
  color: var(--temp-color, #38d39f);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
  align-items: baseline;
  justify-content: flex-end;
  text-align: right;
  white-space: nowrap;
  transform: translateY(-50%);
  text-shadow: none;
}

.dash-temp-number {
  text-align: right;
}

.dash-temp-unit {
  text-align: left;
}

.dash-temp-bottom-label {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + var(--dash-label-gap));
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  color: rgba(186, 230, 253, 0.86);
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dash-widget-graph-button {
  position: absolute;
  z-index: 6;
  width: 66px;
  height: 20px;
  border: 1px solid rgba(88, 187, 255, 0.48);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(42, 156, 255, 0.52), rgba(10, 74, 137, 0.88));
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 10px rgba(42, 156, 255, 0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0 7px;
  text-align: center;
  animation: dash-graph-button-pulse 4.2s ease-in-out infinite;
}

@keyframes dash-graph-button-pulse {
  0%, 100% {
    border-color: rgba(88, 187, 255, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 9px rgba(42, 156, 255, 0.2);
  }
  50% {
    border-color: rgba(126, 211, 255, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 18px rgba(72, 180, 255, 0.62);
  }
}

.dash-widget-graph-button-bottom-right {
  right: 10px;
  bottom: 7px;
}

.dash-widget-graph-button-top-right {
  top: 8px;
  right: 10px;
  z-index: 8;
}

.dash-cpu-processor-nav {
  position: absolute;
  left: 50%;
  bottom: 5px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(-50%);
  color: rgba(232, 246, 255, 0.74);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.dash-cpu-processor-nav-button {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(88, 187, 255, 0.48);
  border-radius: 999px;
  background: rgba(5, 18, 42, 0.72);
  color: rgba(232, 246, 255, 0.82);
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.dash-cpu-processor-nav-button svg,
.dash-cpu-processor-nav-button i {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.dash-cpu-processor-nav-button:hover:not(:disabled) {
  border-color: rgba(88, 187, 255, 0.78);
  color: rgba(255, 255, 255, 0.95);
  background: rgba(9, 35, 70, 0.86);
}

.dash-cpu-processor-nav-button:disabled {
  cursor: not-allowed;
  border-color: rgba(88, 187, 255, 0.18);
  color: rgba(232, 246, 255, 0.24);
  background: rgba(5, 18, 42, 0.42);
}

.dash-cpu-processor-nav-button:focus,
.dash-cpu-processor-nav-button:focus-visible,
.dash-cpu-processor-nav-button:active {
  outline: none;
  box-shadow: none;
}

.dash-cpu-processor-count {
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.dash-widget-graph-button:hover {
  border-color: rgba(126, 211, 255, 0.95);
  color: rgba(255, 255, 255, 1);
  background: linear-gradient(180deg, rgba(72, 180, 255, 0.72), rgba(13, 91, 164, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 14px rgba(72, 180, 255, 0.38);
}

.dash-widget-graph-button:active,
.dash-widget-graph-button:focus,
.dash-widget-graph-button:focus-visible {
  outline: none;
  border-color: rgba(88, 187, 255, 0.48);
  color: rgba(232, 246, 255, 0.92);
  background: linear-gradient(180deg, rgba(18, 98, 180, 0.82), rgba(5, 39, 83, 0.98));
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.28);
}

.dash-widget-body-flipped .dash-widget-graph-button,
.dash-widget-body-flipped .dash-widget-graph-button:active,
.dash-widget-body-flipped .dash-widget-graph-button:focus,
.dash-widget-body-flipped .dash-widget-graph-button:focus-visible {
  border-color: rgba(88, 187, 255, 0.48);
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, rgba(42, 156, 255, 0.52), rgba(10, 74, 137, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 10px rgba(42, 156, 255, 0.22);
}

.dash-cpu-analytics-widget--compact {
  padding: 0;
  grid-template-rows: calc(var(--top-bar-height) / 2) minmax(0, 1fr);
}

.dash-cpu-analytics-widget--compact .dash-cpu-header {
  height: calc(var(--top-bar-height) / 2);
  margin: 0;
  padding: 0 12px;
  gap: 5px;
}

.dash-cpu-analytics-widget--compact .dash-cpu-title {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.dash-cpu-analytics-widget--compact .dash-cpu-processor-heading {
  max-width: calc(100% - 52px);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.dash-cpu-analytics-widget--compact .dash-cpu-main {
  grid-template-columns: minmax(70px, 1fr) minmax(48px, 0.48fr);
  gap: 4px;
  padding: 7px 8px 6px;
}

.dash-cpu-analytics-widget--compact .dash-cpu-gauge-zone {
  grid-template-rows: minmax(0, 1fr);
}

.dash-cpu-analytics-widget--compact .dash-cpu-center-row-usage strong {
  font-size: 25px;
}

.dash-cpu-analytics-widget--compact .dash-cpu-center-row-idle {
  top: calc(50% + 15px);
}

.dash-cpu-analytics-widget--compact .dash-cpu-center-row-idle strong {
  font-size: 6px;
}

.dash-cpu-analytics-widget--compact .dash-cpu-load-label,
.dash-cpu-analytics-widget--compact .dash-temp-bottom-label,
.dash-cpu-analytics-widget--compact .dash-cpu-processor-nav {
  display: none;
}

.dash-cpu-analytics-widget--compact .dash-cpu-legend {
  gap: 8px;
  min-height: 9px;
  top: calc(var(--dash-instrument-top) + 8px);
}

.dash-cpu-analytics-widget--compact .dash-cpu-legend-item {
  gap: 3px;
  font-size: 6px;
  letter-spacing: 0.06em;
}

.dash-cpu-analytics-widget--compact .dash-cpu-legend-dot {
  width: 5px;
  height: 5px;
}

.dash-cpu-analytics-widget--compact .dash-temp-main {
  width: 88px;
  transform: translateX(-16px);
}

.dash-cpu-analytics-widget--compact .dash-temp-stage {
  width: 38px;
}

.dash-cpu-analytics-widget--compact .dash-temp-scale {
  left: -10px;
  width: 32px;
  font-size: 5px;
}

.dash-cpu-analytics-widget--compact .dash-temp-scale > span {
  grid-template-columns: minmax(0, 22px) 4px;
  column-gap: 5px;
}

.dash-cpu-analytics-widget--compact .dash-temp-scale > span::after {
  width: 4px;
}

.dash-cpu-analytics-widget--compact .dash-temp-tube {
  left: 27px;
  width: 10px;
}

.dash-cpu-analytics-widget--compact .dash-temp-fill {
  left: 2px;
  right: 2px;
}

.dash-cpu-analytics-widget--compact .dash-temp-shine {
  left: 4px;
  width: 2px;
}

.dash-cpu-analytics-widget--compact .dash-temp-value {
  left: 45px;
  width: 60px;
  min-width: 0;
  gap: 2px;
  font-size: 23px;
}

.dash-storage-analytics-widget {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: calc(var(--top-bar-height) / 2) minmax(0, 1fr);
  background: linear-gradient(145deg, rgba(6, 18, 42, 0.72), rgba(0, 7, 20, 0.24) 52%, rgba(7, 34, 58, 0.54));
  --dash-storage-gauge-size: 142px;
  --dash-storage-instrument-top: 0px;
  --dash-storage-label-top: 150px;
  --dash-storage-graph-button-top: 176px;
}

.dash-storage-loading {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-storage-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: calc(var(--top-bar-height) / 2);
  margin: 0;
  padding: 0 12px;
}

.dash-storage-title {
  position: relative;
  z-index: 9;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: none;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.dash-storage-drive-heading {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 92px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(10px * var(--qrm-scale));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-align: right;
  text-transform: uppercase;
}

.dash-storage-main {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.dash-widget-flip-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  perspective: 820px;
  pointer-events: auto;
}

.dash-widget-flip-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-widget-flip-stage--flipped .dash-widget-flip-inner {
  transform: rotateY(180deg);
}

.dash-widget-flip-face {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  pointer-events: auto;
}

.dash-widget-flip-face-back {
  pointer-events: none;
}

.dash-widget-flip-stage--flipped .dash-widget-flip-face-front {
  pointer-events: none;
}

.dash-widget-flip-stage--flipped .dash-widget-flip-face-back {
  pointer-events: auto;
}

.dash-widget-flip-face-back {
  transform: rotateY(180deg);
}

.dash-widget-flip-back-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.dash-widget-flip-back-chart {
  width: min(76%, 240px);
  height: min(58%, 150px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-left: 1px solid rgba(128, 204, 255, 0.28);
  border-bottom: 1px solid rgba(128, 204, 255, 0.28);
}

.dash-widget-flip-back-chart span {
  width: 14px;
  height: var(--bar-height);
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(180deg, rgba(132, 222, 255, 0.95), rgba(42, 156, 255, 0.38));
  box-shadow: 0 0 14px rgba(42, 156, 255, 0.22);
  animation: dash-flip-back-chart-rise 740ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--bar-delay);
}

@keyframes dash-flip-back-chart-rise {
  from {
    transform: scaleY(0.18);
    opacity: 0.36;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.dash-storage-graph-page {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
}

.dash-storage-graph-card {
  position: relative;
  flex: 0 0 50%;
  min-width: 0;
  height: 100%;
}

.dash-storage-graph-page-single .dash-storage-graph-card {
  flex-basis: 50%;
}

.dash-storage-graph-page-single {
  justify-content: center;
}

.dash-storage-gauge-wrap {
  position: absolute;
  left: 50%;
  top: var(--dash-storage-instrument-top);
  width: var(--dash-storage-gauge-size);
  height: var(--dash-storage-gauge-size);
  max-width: 76%;
  max-height: 75%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-storage-gauge-canvas {
  position: absolute;
  inset: 0;
}

.dash-storage-pie-readout {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.dash-storage-center-row {
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.dash-storage-center-row-load {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dash-storage-center-row-free {
  position: absolute;
  left: 50%;
  top: calc(50% + 24px);
  transform: translateX(-50%);
}

.dash-storage-center-row-load strong {
  color: var(--storage-load-color, #38a2ff);
  font-size: 45px;
  font-weight: 700;
  text-shadow: none;
}

.dash-storage-center-row-free strong {
  color: rgba(123, 150, 190, 0.66);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.dash-storage-legend {
  position: absolute;
  right: auto;
  /* align the dots with the card title (header padding is 12px) */
  left: 12px;
  top: calc(var(--dash-storage-instrument-top) + 8px);
  min-height: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 3;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 0;
}

.dash-storage-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(232, 246, 255, 0.64);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
  white-space: nowrap;
}

.dash-storage-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: none;
}

.dash-storage-legend-dot-load {
  color: var(--storage-load-color, #38a2ff);
  background: var(--storage-load-color, #38a2ff);
}

.dash-storage-legend-item:has(.dash-storage-legend-dot-load) {
  color: var(--storage-load-color, #38a2ff);
}

.dash-storage-legend-dot-free {
  color: rgba(123, 150, 190, 0.66);
  background: rgba(123, 150, 190, 0.66);
}

.dash-storage-legend-item:has(.dash-storage-legend-dot-free) {
  color: rgba(123, 150, 190, 0.66);
}

.dash-storage-load-label {
  position: absolute;
  left: 0;
  top: var(--dash-storage-label-top);
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(186, 230, 253, 0.86);
  font-size: calc(8px * var(--qrm-scale));
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

/* Storage capacity card (pie chart: used vs free) */
.dash-storage-capacity-wrap {
  position: absolute;
  left: 50%;
  top: var(--dash-storage-instrument-top);
  width: var(--dash-storage-gauge-size);
  height: var(--dash-storage-gauge-size);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(12px * var(--qrm-scale, 1));
}

.dash-storage-capacity-pie-wrap {
  position: relative;
  width: calc(var(--dash-storage-gauge-size) * 0.72);
  height: calc(var(--dash-storage-gauge-size) * 0.66);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* pulsing halo disc glowing behind the tilted coin */
.dash-storage-capacity-pie-ring {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 92%;
  height: 92%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--storage-cap-color, #38a2ff) 60%, transparent) 0%,
    color-mix(in srgb, var(--storage-cap-color, #38a2ff) 22%, transparent) 45%,
    transparent 72%);
  filter: blur(calc(6px * var(--qrm-scale, 1)));
  opacity: 0.75;
}

/* 3D perspective stage */
.dash-storage-capacity-pie-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: calc(var(--dash-storage-gauge-size) * 1.7);
}

/* tilted coin: conic top face + extruded edge (stacked shadows) */
.dash-storage-capacity-pie {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  --pie-side: color-mix(in srgb, var(--storage-cap-color, #38a2ff) 38%, #04101f);
  background: conic-gradient(
    var(--storage-cap-color, #38a2ff) 0deg var(--cap-angle, 0deg),
    rgba(96, 122, 158, 0.5) var(--cap-angle, 0deg) 360deg);
  border: 1px solid rgba(9, 20, 40, 0.6);
  box-shadow:
    0 1px 0 var(--pie-side), 0 2px 0 var(--pie-side), 0 3px 0 var(--pie-side),
    0 4px 0 var(--pie-side), 0 5px 0 var(--pie-side), 0 6px 0 var(--pie-side),
    0 7px 0 var(--pie-side), 0 8px 0 var(--pie-side), 0 9px 0 var(--pie-side),
    0 10px 0 var(--pie-side), 0 11px 0 var(--pie-side), 0 12px 0 var(--pie-side),
    0 13px 0 var(--pie-side), 0 14px 0 var(--pie-side),
    0 16px 22px rgba(0, 0, 0, 0.55),
    0 0 30px color-mix(in srgb, var(--storage-cap-color, #38a2ff) 40%, transparent);
  transform: rotateX(54deg);
  transform-style: preserve-3d;
  transition: background 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* depth vignette on the top face */
.dash-storage-capacity-pie::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 46%,
    rgba(0, 0, 0, 0.3) 100%);
}

/* static specular glint on the coin face */
.dash-storage-capacity-pie::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(28% 28% at 68% 26%, rgba(255, 255, 255, 0.55), transparent 70%);
  mix-blend-mode: screen;
}

.dash-storage-capacity-pie-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  line-height: 1;
  flex: 0 0 auto;
}

.dash-storage-capacity-pie-total strong {
  font-size: calc(18px * var(--qrm-scale, 1));
  font-weight: 800;
  color: #eaf4ff;
  text-shadow: 0 0 12px rgba(120, 180, 255, 0.3);
}

.dash-storage-capacity-pie-total span {
  font-size: calc(10px * var(--qrm-scale, 1));
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(200, 225, 255, 0.78);
}

.dash-storage-capacity-pie-total em {
  font-style: normal;
  font-size: calc(8px * var(--qrm-scale, 1));
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 225, 255, 0.5);
  margin-left: calc(3px * var(--qrm-scale, 1));
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  line-height: 1;
  flex: 0 0 auto;
}

.dash-storage-capacity-pie-total strong {
  font-size: calc(18px * var(--qrm-scale, 1));
  font-weight: 800;
  color: #eaf4ff;
  text-shadow: 0 0 12px rgba(120, 180, 255, 0.3);
}

.dash-storage-capacity-pie-total span {
  font-size: calc(10px * var(--qrm-scale, 1));
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(200, 225, 255, 0.78);
}

.dash-storage-capacity-pie-total em {
  font-style: normal;
  font-size: calc(8px * var(--qrm-scale, 1));
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 225, 255, 0.5);
  margin-left: calc(3px * var(--qrm-scale, 1));
}

.dash-storage-capacity-legend {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: calc(6px * var(--qrm-scale, 1));
  width: 100%;
  padding-left: calc(14px * var(--qrm-scale, 1));
}

.dash-storage-capacity-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: calc(10px * var(--qrm-scale, 1));
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(232, 246, 255, 0.72);
  white-space: nowrap;
}

.dash-storage-capacity-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.dash-storage-capacity-sub-used .dash-storage-capacity-dot {
  background: var(--storage-cap-color, #38a2ff);
  box-shadow: 0 0 8px color-mix(in srgb, var(--storage-cap-color, #38a2ff) 70%, transparent);
}

.dash-storage-capacity-sub-free .dash-storage-capacity-dot {
  background: rgba(96, 122, 158, 0.7);
}

.dash-storage-capacity-label {
  color: rgba(200, 225, 255, 0.6);
  min-width: calc(30px * var(--qrm-scale, 1));
}

.dash-storage-capacity-amount {
  color: rgba(232, 246, 255, 0.94);
  font-weight: 700;
}

.dash-storage-analytics-widget--compact .dash-storage-capacity-wrap {
  gap: calc(8px * var(--qrm-scale, 1));
}

.dash-storage-analytics-widget--compact .dash-storage-capacity-pie-wrap {
  width: calc(var(--dash-storage-gauge-size) * 0.6);
  height: calc(var(--dash-storage-gauge-size) * 0.6);
}

.dash-storage-analytics-widget--compact .dash-storage-capacity-sub {
  font-size: calc(8px * var(--qrm-scale, 1));
}

.dash-storage-analytics-widget--compact .dash-storage-capacity-legend {
  gap: calc(5px * var(--qrm-scale, 1));
}

.dash-storage-drive-nav {
  position: absolute;
  left: 50%;
  bottom: 5px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(-50%);
  color: rgba(232, 246, 255, 0.74);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.dash-storage-drive-nav-button {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(88, 187, 255, 0.48);
  border-radius: 999px;
  background: rgba(5, 18, 42, 0.72);
  color: rgba(232, 246, 255, 0.82);
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.dash-storage-drive-nav-button svg,
.dash-storage-drive-nav-button i {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.dash-storage-drive-nav-button:hover:not(:disabled) {
  border-color: rgba(88, 187, 255, 0.78);
  color: rgba(255, 255, 255, 0.95);
  background: rgba(9, 35, 70, 0.86);
}

.dash-storage-drive-nav-button:disabled {
  cursor: not-allowed;
  border-color: rgba(88, 187, 255, 0.18);
  color: rgba(232, 246, 255, 0.24);
  background: rgba(5, 18, 42, 0.42);
}

.dash-storage-drive-nav-button:focus,
.dash-storage-drive-nav-button:focus-visible,
.dash-storage-drive-nav-button:active {
  outline: none;
  box-shadow: none;
}

.dash-storage-drive-count {
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.dash-gpu-page-nav-button,
.dash-visual-page-nav-button {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(88, 187, 255, 0.48);
  border-radius: 999px;
  background: rgba(5, 18, 42, 0.72);
  color: rgba(232, 246, 255, 0.82);
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transform: translateY(-50%);
}

.dash-gpu-page-nav-button-prev,
.dash-visual-page-nav-button-prev {
  left: 4px;
}

.dash-gpu-page-nav-button-next,
.dash-visual-page-nav-button-next {
  right: 4px;
}

.dash-gpu-page-nav-button svg,
.dash-gpu-page-nav-button i,
.dash-visual-page-nav-button svg,
.dash-visual-page-nav-button i {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.dash-gpu-page-nav-button:hover:not(:disabled),
.dash-visual-page-nav-button:hover:not(:disabled) {
  border-color: rgba(88, 187, 255, 0.78);
  color: rgba(255, 255, 255, 0.95);
  background: rgba(9, 35, 70, 0.86);
}

.dash-gpu-page-nav-button:disabled,
.dash-visual-page-nav-button:disabled {
  cursor: not-allowed;
  border-color: rgba(88, 187, 255, 0.18);
  color: rgba(232, 246, 255, 0.24);
  background: rgba(5, 18, 42, 0.42);
}

.dash-gpu-page-nav-button:focus,
.dash-gpu-page-nav-button:focus-visible,
.dash-gpu-page-nav-button:active,
.dash-visual-page-nav-button:focus,
.dash-visual-page-nav-button:focus-visible,
.dash-visual-page-nav-button:active {
  outline: none;
  box-shadow: none;
}

.dash-gpu-temp-wrap {
  position: absolute;
  left: 50%;
  top: var(--dash-gpu-thermostat-top, var(--dash-storage-instrument-top));
  width: 143px;
  height: var(--dash-gpu-thermostat-height, var(--dash-storage-gauge-size));
  transform: translateX(-70px);
}

.dash-gpu-temp-scale {
  position: absolute;
  left: -26px;
  top: 9px;
  z-index: 2;
  width: 56.5px;
  height: calc(var(--dash-gpu-thermostat-height, var(--dash-storage-gauge-size)) - 19px);
  display: block;
  color: rgba(232, 246, 255, 0.58);
  font-size: 7px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  line-height: 1;
  text-align: right;
}

.dash-gpu-temp-scale > span {
  position: absolute;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 37px) 7px;
  column-gap: 7px;
  align-items: center;
  justify-content: end;
  justify-items: start;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.dash-gpu-temp-scale-label {
  display: grid;
  grid-template-columns: 22px 13px;
  column-gap: 2px;
  width: 37px;
  justify-self: start;
  font-family: Consolas, 'Liberation Mono', monospace;
  text-align: right;
}

.dash-gpu-temp-scale-number {
  text-align: right;
}

.dash-gpu-temp-scale-unit {
  text-align: left;
}

.dash-gpu-temp-scale > span:nth-child(1) { top: 0; }
.dash-gpu-temp-scale > span:nth-child(2) { top: 25%; }
.dash-gpu-temp-scale > span:nth-child(3) { top: 50%; }
.dash-gpu-temp-scale > span:nth-child(4) { top: 75%; }
.dash-gpu-temp-scale > span:nth-child(5) { top: 100%; }

.dash-gpu-temp-scale > span::after {
  content: '';
  position: static;
  width: 7px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.dash-gpu-temp-tube {
  position: absolute;
  left: 35px;
  top: 0;
  z-index: 1;
  width: 15px;
  height: var(--dash-gpu-thermostat-height, var(--dash-storage-gauge-size));
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03) 35%, rgba(0, 0, 0, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.dash-gpu-temp-fill {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 4px;
  height: var(--gpu-temp-fill, 0%);
  max-height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(180deg, #eafff8 0%, var(--gpu-temp-color, #38d39f) 30%, #059669 100%);
  transition: height 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-gpu-temp-shine {
  position: absolute;
  top: 8px;
  bottom: 9px;
  left: 5px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  opacity: 0.5;
}

.dash-gpu-temp-value {
  position: absolute;
  left: 69px;
  top: 50%;
  width: 118px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--gpu-temp-color, #38d39f);
  font-size: 45px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  transform: translateY(-50%);
  white-space: nowrap;
}

.dash-storage-analytics-widget--compact .dash-storage-header {
  height: calc(var(--top-bar-height) / 2);
  margin: 0;
  padding: 0 12px;
  gap: 5px;
}

.dash-storage-analytics-widget--compact .dash-storage-title {
  font-size: 18px;
}

.dash-storage-analytics-widget--compact .dash-storage-drive-heading {
  max-width: calc(100% - 82px);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.dash-storage-analytics-widget--compact .dash-storage-center-row-load strong {
  font-size: 25px;
}

.dash-storage-analytics-widget--compact .dash-storage-center-row-free {
  top: calc(50% + 15px);
}

.dash-storage-analytics-widget--compact .dash-storage-center-row-free strong {
  font-size: 6px;
}

.dash-storage-analytics-widget--compact .dash-storage-load-label,
.dash-storage-analytics-widget--compact .dash-storage-drive-nav {
  display: none;
}

.dash-storage-analytics-widget--compact .dash-storage-legend {
  gap: 8px;
  min-height: 9px;
  top: calc(var(--dash-storage-instrument-top) + 8px);
}

.dash-storage-analytics-widget--compact .dash-storage-legend-item {
  gap: 3px;
  font-size: 6px;
  letter-spacing: 0.06em;
}

.dash-storage-analytics-widget--compact .dash-storage-legend-dot {
  width: 5px;
  height: 5px;
}

#telemetry-card,
#dash-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 location */
.view-toggle-button.one-option {
  min-width: 220px;
  padding: 0;
  overflow: hidden;
}

.view-toggle-button.one-option .toggle-slider {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 7px;
}

.view-toggle-button.two-options {
  min-width: 400px;
  padding: 0;
  overflow: hidden;
}

.view-toggle-button.two-options .toggle-slider {
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: #0f557d;
  box-shadow: inset 0 0 0 1px rgba(99, 205, 255, 0.22), 0 0 10px rgba(41, 171, 255, 0.14);
  border-radius: 7px 0 0 7px;
}

.view-toggle-button.two-options[data-active="telemetry"] .toggle-slider,
.view-toggle-button.two-options[data-active="dash-telemetry"] .toggle-slider {
  transform: translateX(100%);
  border-radius: 0 7px 7px 0;
}

/* 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: 400;
  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-icon,
.toggle-option svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
  stroke-width: 2;
}

.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);
}

.view-toggle-button.two-options .toggle-option {
  border-radius: 0;
}

.view-toggle-button.two-options .toggle-option.active {
  background: transparent;
}

.view-toggle-button.two-options .toggle-option:not(.active):hover {
  background: rgba(15, 85, 125, 0.74);
  transform: none;
}

.view-toggle-button.two-options .toggle-option[data-view="network"]:hover,
.view-toggle-button.two-options .toggle-option[data-view="visual"]:hover {
  border-radius: 7px 0 0 7px;
}

.view-toggle-button.two-options .toggle-option[data-view="telemetry"]:hover,
.view-toggle-button.two-options .toggle-option[data-view="dash-telemetry"]:hover {
  border-radius: 0 7px 7px 0;
}

/* 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(2)::after,
.dash-options:nth-child(4)::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: 400;
  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%);
}

/* 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;
}

/* Single tab page - no scroll for full height content */
.main-content.single-tab-page {
  height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height) - 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);
}

.sidebar::-webkit-scrollbar-button,
.sidebar-content::-webkit-scrollbar-button,
.device-locations-list::-webkit-scrollbar-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  color: transparent !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
}

.sidebar::-webkit-scrollbar-button:vertical:start:decrement,
.sidebar::-webkit-scrollbar-button:vertical:end:increment,
.sidebar-content::-webkit-scrollbar-button:vertical:start:decrement,
.sidebar-content::-webkit-scrollbar-button:vertical:end:increment,
.device-locations-list::-webkit-scrollbar-button:vertical:start:decrement,
.device-locations-list::-webkit-scrollbar-button:vertical:end:increment {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  color: transparent !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track,
.device-locations-list::-webkit-scrollbar-track {
  margin: 0 !important;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb,
.device-locations-list::-webkit-scrollbar-thumb {
  background: ghostwhite !important;
  background-color: ghostwhite !important;
  background-image: none !important;
}

.device-locations-list.qrm-native-scroll-hidden::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.device-locations-list.qrm-native-scroll-hidden::-webkit-scrollbar-track,
.device-locations-list.qrm-native-scroll-hidden::-webkit-scrollbar-thumb,
.device-locations-list.qrm-native-scroll-hidden::-webkit-scrollbar-button {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
}

.sidebar,
.sidebar-content {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.sidebar::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-button,
.sidebar-content::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-button {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
}

/* 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;
}

html.qrm-login-gate body {
  background: #000;
}

html.qrm-logout-transitioning body {
  background: #000;
}

html.qrm-logout-transitioning body > :not(.qrm-logout-logo-transition) {
  visibility: hidden;
}

html.qrm-login-gate body > :not(#login-modal):not(.qrm-logout-logo-transition) {
  visibility: hidden;
}

html.qrm-login-gate #login-modal {
  opacity: 1;
  visibility: visible;
}

#login-modal {
  background: #000;
  backdrop-filter: none;
  --qrm-login-brand-center-shift: clamp(18px, 2.1vw, 26px);
  --qrm-login-logo-center-shift: clamp(-24px, -1.8vw, -14px);
  --qrm-login-logo-size: min(108vw, 1200px);
}

#login-modal::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--qrm-login-logo-size);
  height: var(--qrm-login-logo-size);
  background: url('../images/Logos/RMSLogo_login_clean_v3.png') center / contain no-repeat;
  opacity: 0.58;
  transform: translate(-50%, -50%);
  filter: brightness(0.96) drop-shadow(0 0 8px rgba(0, 174, 255, 0.18));
  pointer-events: none;
  animation: qrm-login-logo-pulse 2.8s ease-in-out infinite;
}

#login-modal.qrm-login-arriving::before {
  opacity: 0.58;
  filter: brightness(0.96) drop-shadow(0 0 8px rgba(0, 174, 255, 0.18));
  animation: none;
}

@keyframes qrm-login-logo-pulse {
  0%, 100% {
    opacity: 0.52;
    filter: brightness(0.93) drop-shadow(0 0 7px rgba(0, 174, 255, 0.16));
  }
  50% {
    opacity: 0.64;
    filter: brightness(1.04) drop-shadow(0 0 12px rgba(0, 174, 255, 0.26));
  }
}

#login-modal .modal-content {
  position: relative;
  z-index: 1;
  width: 400px;
  max-width: 90vw;
  background: rgba(10, 14, 20, 0.68);
  backdrop-filter: blur(18px);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1), height 0.36s ease, box-shadow 0.35s ease, filter 0.3s ease;
  will-change: transform;
}

#login-modal .qrm-login-card {
  height: 392px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Minimize button in the login header */
.login-minimize-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 4;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.login-minimize-btn:hover {
  background: transparent;
  color: var(--text-primary);
}

.login-minimize-btn:focus,
.login-minimize-btn:focus-visible,
.login-minimize-btn:active {
  outline: none;
  border: none;
  box-shadow: none;
}

.login-minimize-btn i,
.login-minimize-btn svg {
  width: 18px;
  height: 18px;
}

.login-back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 4;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.login-back-btn:hover:not(:disabled) {
  color: var(--text-primary);
}

.login-back-btn:disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

.login-back-btn:focus,
.login-back-btn:focus-visible,
.login-back-btn:active {
  outline: none;
  border: none;
  box-shadow: none;
}

.login-back-btn i {
  width: 18px;
  height: 18px;
}

/* Body collapse (slides up into the header) */
#login-modal .modal-body {
  position: relative;
  overflow: hidden;
  flex: 0 0 336px;
  height: 336px;
  max-height: 336px;
  box-sizing: border-box;
  padding: 0;
  transition: max-height 0.36s ease, opacity 0.28s ease, padding 0.36s ease;
}

#login-modal.qrm-login-collapsed .modal-body {
  flex-basis: 0;
  height: 0;
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

#login-modal.qrm-login-collapsed .modal-header {
  border-bottom: none;
}

#login-modal.qrm-login-collapsed .login-back-btn {
  opacity: 0;
  pointer-events: none;
}

#login-modal.qrm-login-collapsed .login-minimize-btn {
  opacity: 0;
  pointer-events: none;
}

#login-modal.qrm-login-collapsed .qrm-login-card {
  height: 56px;
}

/* Minimized pill (parked bottom-right) */
#login-modal.qrm-login-minimized .modal-content {
  width: 238px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.65);
}

#login-modal.qrm-login-minimized .modal-content:hover {
  filter: brightness(1.18);
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 26px rgba(0, 174, 255, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

#login-modal.qrm-login-minimized .modal-header {
  cursor: pointer;
  justify-content: center;
  gap: 10px;
  padding-left: 18px;
  padding-right: 18px;
}

#login-modal.qrm-login-minimized #login-modal-title {
  opacity: 0.68;
  filter: saturate(0.62);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

#login-modal.qrm-login-minimized .modal-content:hover #login-modal-title {
  opacity: 1;
  filter: saturate(1.08);
}

#login-modal.qrm-login-minimized .login-minimize-btn {
  display: flex;
  position: static;
  order: -1;
  transform: none;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  overflow: visible;
  color: rgba(255, 255, 255, 0.58);
  opacity: 0.72;
  pointer-events: auto;
}

#login-modal.qrm-login-minimized .login-minimize-btn svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.45;
  overflow: visible;
}

#login-modal.qrm-login-minimized .modal-content:hover .login-minimize-btn {
  color: #ffffff;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.34));
}

/* Keep the background globe + brand text visible while minimized */
.qrm-login-brand {
  transition: opacity 0.35s ease;
}

.qrm-login-brand {
  position: absolute;
  left: 50%;
  top: calc(50% - var(--qrm-login-brand-center-shift) + min(36vw, 360px) + 14px);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
  padding-left: 0;
  background: linear-gradient(90deg, #9debdc 0%, #8fd8ee 36%, #b8abf0 72%, #e6aacd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
  white-space: nowrap;
  min-height: 1.1em;
}

.qrm-login-brand-typing {
  min-width: 1ch;
}

#login-modal.qrm-login-revealing {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  transition: none;
}

#login-modal.qrm-login-revealing::before {
  opacity: 0;
  animation: none;
}

#login-modal.qrm-login-revealing .modal-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* The reveal overlay provides clipped text halves so the brand splits on the weld line. */
#login-modal.qrm-login-revealing .qrm-login-brand {
  opacity: 0;
}

.qrm-login-reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.qrm-login-reveal-overlay::before,
.qrm-login-reveal-overlay::after {
  content: '';
  position: absolute;
  left: 50%;
  z-index: 4;
  pointer-events: none;
  transform: translateX(-50%);
}

.qrm-login-reveal-overlay::before {
  top: -12vh;
  width: 8px;
  height: 24vh;
  border-radius: 999px;
  background: radial-gradient(circle, #fff 0 12%, #8ff3ff 14% 28%, rgba(0, 174, 255, 0.28) 48%, rgba(0, 174, 255, 0) 74%);
  filter: none;
  mix-blend-mode: screen;
  animation: qrm-login-weld-flare 1.05s cubic-bezier(0.68, 0, 0.32, 1) forwards;
}

.qrm-login-reveal-overlay::after {
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #42e4ff 24%, rgba(0, 174, 255, 0.7) 52%, rgba(0, 174, 255, 0));
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.72), 0 0 8px rgba(0, 174, 255, 0.42), 0 0 14px rgba(0, 174, 255, 0.18);
  opacity: 0.9;
  animation: qrm-login-weld-trail 1.05s cubic-bezier(0.68, 0, 0.32, 1) forwards;
}

.qrm-login-reveal-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  background: #000;
  will-change: transform;
}

.qrm-login-reveal-half::before {
  content: '';
  position: absolute;
  top: 50%;
  width: var(--qrm-login-logo-size);
  height: var(--qrm-login-logo-size);
  background: url('../images/Logos/RMSLogo_login_clean_v3.png') center / contain no-repeat;
  opacity: 0.66;
  filter: brightness(1.04) drop-shadow(0 0 18px rgba(0, 174, 255, 0.32));
}

.qrm-login-reveal-half.left {
  left: 0;
}

.qrm-login-reveal-half.left::before {
  left: 100%;
  transform: translate(-50%, -50%);
}

.qrm-login-reveal-half.right {
  right: 0;
}

.qrm-login-reveal-half.right::before {
  left: 0;
  transform: translate(-50%, -50%);
}

.qrm-login-reveal-brand-half {
  position: absolute;
  top: calc(50% - var(--qrm-login-brand-center-shift) + min(36vw, 360px) + 14px);
  width: 50%;
  height: 92px;
  overflow: hidden;
  z-index: 6;
  pointer-events: none;
  will-change: transform;
}

.qrm-login-reveal-brand-half.left {
  left: 0;
}

.qrm-login-reveal-brand-half.right {
  right: 0;
}

.qrm-login-reveal-brand-half span {
  position: absolute;
  top: 0;
  width: 100vw;
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  padding-left: 0;
  background: linear-gradient(90deg, #9debdc 0%, #8fd8ee 36%, #b8abf0 72%, #e6aacd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
  white-space: nowrap;
}

.qrm-login-reveal-brand-half.left span {
  left: 0;
}

.qrm-login-reveal-brand-half.right span {
  right: 0;
}

.qrm-login-reveal-seam,
.qrm-login-reveal-weld {
  position: absolute;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
}

.qrm-login-reveal-seam {
  top: 0;
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff, rgba(59, 216, 255, 0.95), rgba(255, 255, 255, 0.35));
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.66), 0 0 7px rgba(0, 174, 255, 0.38), 0 0 12px rgba(0, 174, 255, 0.16);
  animation: qrm-login-weld-seam 1.05s cubic-bezier(0.68, 0, 0.32, 1) forwards;
}

.qrm-login-reveal-weld {
  top: -22vh;
  width: 2px;
  height: 22vh;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 26%, #18d6ff 52%, rgba(0, 174, 255, 0));
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 9px rgba(0, 174, 255, 0.5), 0 0 16px rgba(0, 174, 255, 0.22);
  animation: qrm-login-weld-pass 1.05s cubic-bezier(0.68, 0, 0.32, 1) forwards;
}

.qrm-login-weld-complete .qrm-login-reveal-seam,
.qrm-login-weld-complete .qrm-login-reveal-weld,
.qrm-login-weld-complete::before,
.qrm-login-weld-complete::after,
.qrm-login-reveal-open .qrm-login-reveal-seam,
.qrm-login-reveal-open .qrm-login-reveal-weld,
.qrm-login-reveal-open::before,
.qrm-login-reveal-open::after {
  opacity: 0;
  transition: none;
}

.qrm-login-weld-complete .qrm-login-reveal-seam,
.qrm-login-weld-complete .qrm-login-reveal-weld,
.qrm-login-weld-complete::before,
.qrm-login-weld-complete::after {
  display: none;
}

@keyframes qrm-login-weld-seam {
  0% { height: 0; }
  100% { height: 100%; }
}

@keyframes qrm-login-weld-pass {
  0% { transform: translate(-50%, 0); }
  100% { transform: translate(-50%, 118vh); }
}

@keyframes qrm-login-weld-flare {
  0% { transform: translate(-50%, 0) scaleX(0.74); opacity: 0; }
  8% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translate(-50%, 112vh) scaleX(1); opacity: 0; }
}

@keyframes qrm-login-weld-trail {
  0% { height: 0; opacity: 0; }
  8% { opacity: 0.95; }
  100% { height: 100%; opacity: 0.9; }
}

.qrm-logout-logo-transition {
  position: fixed;
  inset: 0;
  z-index: 10050;
  overflow: hidden;
  pointer-events: none;
  --qrm-login-logo-center-shift: clamp(-24px, -1.8vw, -14px);
  --qrm-login-logo-size: min(108vw, 1200px);
}

.qrm-logout-logo-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  background: #000;
  will-change: transform;
}

.qrm-logout-logo-half::before {
  content: '';
  position: absolute;
  top: 50%;
  width: var(--qrm-login-logo-size);
  height: var(--qrm-login-logo-size);
  background: url('../images/Logos/RMSLogo_login_clean_v3.png') center / contain no-repeat;
  opacity: 0.58;
  filter: brightness(0.96) drop-shadow(0 0 8px rgba(0, 174, 255, 0.18));
}

.qrm-logout-logo-half.left {
  left: 0;
  transform: translateX(-100%);
}

.qrm-logout-logo-half.left::before {
  left: 100%;
  transform: translate(-50%, -50%);
}

.qrm-logout-logo-half.right {
  right: 0;
  transform: translateX(100%);
}

.qrm-logout-logo-half.right::before {
  left: 0;
  transform: translate(-50%, -50%);
}

/* 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);
}

#login-modal .modal-header {
  height: 56px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

.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: rgba(255, 255, 255, 0.25);
  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;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-device-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-location-label {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 12px;
  text-align: right;
}

.custom-dropdown-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  margin: 2px 0;
}

.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 {
  position: absolute;
  inset: 32px;
  display: grid;
  grid-template-rows: 54px 18.667px 54px 18.667px 54px 18.666px 54px;
  gap: 0;
}

#login-modal-title {
  font-family: inherit;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #9debdc 0%, #8fd8ee 36%, #b8abf0 72%, #e6aacd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
  white-space: nowrap;
  will-change: transform, opacity;
}

.login-slide-item,
.login-title-slide {
  will-change: transform, opacity;
}

.login-slide-out-left {
  animation: qrm-login-slide-out-left 0.24s ease forwards;
}

.login-slide-out-right {
  animation: qrm-login-slide-out-right 0.24s ease forwards;
}

.login-slide-in-left {
  animation: qrm-login-slide-in-left 0.28s ease forwards;
}

.login-slide-in-right {
  animation: qrm-login-slide-in-right 0.28s ease forwards;
}

@keyframes qrm-login-slide-out-left {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-38px); }
}

@keyframes qrm-login-slide-out-right {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(38px); }
}

@keyframes qrm-login-slide-in-left {
  0% { opacity: 0; transform: translateX(-38px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes qrm-login-slide-in-right {
  0% { opacity: 0; transform: translateX(38px); }
  100% { opacity: 1; transform: translateX(0); }
}

#login-role-selection > .login-btn:nth-child(1),
.login-section > .username-select-container,
.login-section > .password-input-container {
  grid-row: 1;
}

#dev-password-section > .password-input-container {
  grid-row: auto;
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
}

#cac-password-section > .username-select-container {
  grid-row: 1;
}

#login-role-selection > .login-btn:nth-child(2) {
  grid-row: 3;
}

#login-role-selection > .login-btn:nth-child(3) {
  grid-row: 5;
}

#user-login-method-section > #cac-card-login-btn {
  grid-row: 1;
}

#user-login-method-section > #user-password-login-btn {
  grid-row: 3;
}

#user-login-method-section > #cac-card-status {
  grid-row: 5;
}

.login-section > .login-qri-logo-wrap {
  grid-row: 7;
}

#cac-password-section > .password-input-container {
  grid-row: 3;
}

#dev-password-section > .login-action-row,
#cac-password-section > .login-action-row {
  grid-row: 5;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  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);
}

.login-btn.cac-card-login-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(14, 116, 144, 0.92));
  border-color: rgba(110, 231, 183, 0.72);
  box-shadow: inset 0 0 20px rgba(94, 234, 212, 0.08), 0 0 18px rgba(16, 185, 129, 0.1);
}

.login-btn.cac-card-login-btn:hover {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.96), rgba(8, 145, 178, 0.96));
  border-color: rgba(167, 243, 208, 0.95);
}

.login-btn.cac-card-login-btn.is-loading {
  pointer-events: none;
  opacity: 0.76;
}

.login-btn.user-password-login-btn {
  background: rgba(18, 35, 64, 0.92);
  border-color: rgba(79, 172, 254, 0.46);
}

.cac-card-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 7px 14px;
  border: 1px solid rgba(79, 172, 254, 0.22);
  border-radius: 8px;
  background: rgba(3, 10, 25, 0.48);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.025em;
  text-align: center;
  box-sizing: border-box;
}

.cac-card-status.is-ready {
  color: #8ff3da;
  border-color: rgba(52, 211, 153, 0.38);
}

.cac-card-status.is-error {
  color: #ff8d9a;
  border-color: rgba(255, 68, 88, 0.42);
  background: rgba(65, 10, 20, 0.28);
}

/* 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;
}

.login-action-row {
  display: flex;
  gap: 10px;
}

.login-action-row .login-btn {
  padding: 15px 20px;
}

.login-qri-logo-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 54px;
  border: 2px solid transparent;
  border-radius: 8px;
  box-sizing: border-box;
  background: transparent;
}

.login-qri-logo {
  max-width: 130px;
  width: 45%;
  height: auto;
  opacity: 0.9;
}

.password-input-container {
  position: relative;
  width: 100%;
}

.dev-password-input {
  width: 100%;
  height: 54px;
  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;
}

/* Username select (login) */
.username-select-container {
  position: relative;
  width: 100%;
}

.username-select {
  width: 100%;
  padding-right: 50px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.username-select:invalid {
  color: var(--text-secondary);
  opacity: 0.75;
}

.username-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  pointer-events: none;
}

.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) and (min-width: 1920px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  .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) and (min-width: 1920px) {
  .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 {
    display: none;
    padding: 0;
    margin: 0;
    min-height: 0;
    height: 0;
    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: var(--bottom-bar-height);
    padding: calc(4px * var(--qrm-scale)) calc(16px * var(--qrm-scale));
  }

/* 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-person-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 34px);
  align-items: stretch;
}

#additional-cards:has(#contact-top-level-grid) {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0 !important;
  padding: 0 !important;
}

#contact-top-level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 170px;
  column-gap: 16px !important;
  row-gap: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: stretch;
  align-content: start !important;
}

#contact-top-level-grid > .content-card {
  width: 100%;
  height: 170px;
  min-height: 170px !important;
  max-height: 170px !important;
  margin: 0 !important;
}

.contact-person-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  height: 170px;
  box-sizing: border-box;
  overflow: hidden;
  color: #f5f8ff;
  background: var(--sidebar-bg) !important;
  border: 1px solid rgba(66, 201, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 0 26px rgba(42, 168, 255, 0.025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-person-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--qrm-ring-angle, 0deg), transparent 0deg, rgba(42, 168, 255, 0.12) 48deg, rgba(125, 218, 255, 0.68) 78deg, rgba(255, 255, 255, 0.56) 94deg, rgba(66, 201, 255, 0.3) 124deg, transparent 164deg, transparent 360deg);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: qrmBorderRingSweep 7s linear infinite;
}

.contact-info {
  position: relative;
  isolation: isolate;
  height: 170px !important;
  box-sizing: border-box;
}

.contact-info::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--qrm-ring-angle, 0deg), transparent 0deg, rgba(42, 168, 255, 0.14) 48deg, rgba(125, 218, 255, 0.74) 76deg, rgba(255, 255, 255, 0.68) 92deg, rgba(66, 201, 255, 0.34) 118deg, transparent 156deg, transparent 360deg);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: qrmBorderRingSweep 7s linear infinite;
}

.contact-person-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), 0 0 18px rgba(42, 168, 255, 0.11);
}

.contact-person-header {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 12px;
  padding: 16px 18px;
  background: transparent;
  border-bottom: 1px solid rgba(66, 201, 255, 0.22);
}

.contact-person-header svg,
.contact-person-row svg {
  flex: 0 0 auto;
}

.contact-person-header svg {
  width: 24px;
  height: 24px;
}

.contact-person-header h4 {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: clamp(17px, 1.1vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-person-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  padding: 16px 18px 18px;
}

.contact-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: clamp(13px, 0.9vw, 17px);
  line-height: 1.25;
}

.contact-person-row svg {
  width: 18px;
  height: 18px;
  color: rgba(225, 239, 255, 0.9);
}

.contact-person-row span,
.contact-person-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-person-email a {
  color: #66baff;
  text-decoration: none;
}

.contact-person-email a:hover {
  color: #9ed8ff;
  text-decoration: underline;
}

/* Legacy/API-rendered contact cards still use inline black backgrounds. */
.contact-info {
  background: var(--sidebar-bg) !important;
}

.contact-info .contact-header {
  background: transparent !important;
}

@media (max-width: 1450px) and (min-width: 1920px) {
  .contact-person-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) and (min-width: 1920px) {
  .contact-person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) and (min-width: 1920px) {
  .contact-person-grid { grid-template-columns: 1fr; }
}

.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: 1920px) 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: 1920px) 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: 1920px) 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: 1920px) 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) and (min-width: 1920px) {
  .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: border-color 0.2s 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);
}

/* 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: border-color 0.2s 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);
}

/* 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;
}

/* 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) and (min-width: 1920px) {
  .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) and (min-width: 1920px) {
  .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%);
}

.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;
  isolation: isolate;
  contain: layout paint;
  will-change: transform;
}

.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;
  backface-visibility: hidden;
}

.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: border-color 0.2s 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);
}

/* 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;
}

.device-overlay-clip {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: calc(100% - 10px) !important;
  height: calc(100% - 10px) !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden;
  box-sizing: border-box;
  isolation: isolate;
  contain: paint;
  backface-visibility: hidden;
  transition: none !important;
  will-change: auto;
}

.device-overlay-clip > .device-overlay-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.2s ease, opacity 0.2s ease;
  backface-visibility: hidden;
  transform: none !important;
}

.network-2d-container .rack110-Switch1-box:hover,
.network-2d-container .rack110-Switch2-box:hover,
.network-2d-container .rack110-Switch3-box:hover,
.network-2d-container .rack110-QSL101-box:hover,
.network-2d-container .rack110-QSL102x-box:hover,
.network-2d-container .rack110-QSL104-box:hover,
.network-2d-container .rack110-QSL105-box:hover,
.network-2d-container .rack110-QSL106x-box:hover,
.network-2d-container .rack110-QCC103-box:hover,
.network-2d-container .rack110-APC101-box:hover,
.network-2d-container .rack110-APC102-box:hover,
.network-2d-container .rack210-Switch1-box:hover,
.network-2d-container .rack210-QSL201x-box:hover,
.network-2d-container .rack210-QSL202-box:hover,
.network-2d-container .rack210-QSL203-box:hover,
.network-2d-container .rack210-QSL204x-box:hover,
.network-2d-container .rack210-APC201-box:hover,
.network-2d-container .rack210-APC202-box:hover,
.network-2d-container .rack310-Switch1-box:hover,
.network-2d-container .rack310-QSL301-box:hover,
.network-2d-container .rack310-QSL302-box:hover,
.network-2d-container .rack310-APC301-box:hover,
.network-2d-container .rack310-APC302-box:hover,
.network-2d-container .decp002-decp002switch-box:hover,
.network-2d-container .decp002-decp002pc-box:hover {
  transform: translate(-50%, -50%) !important;
  cursor: pointer;
}

.network-2d-container .network-vertical-box,
.network-2d-container .network-section-box {
  isolation: isolate;
  contain: layout paint;
}

.network-2d-container .device-overlay-clip,
.network-2d-container .device-overlay-clip > img[data-device] {
  transition: filter 0.2s ease, opacity 0.2s ease;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: filter, opacity, transform;
  isolation: isolate;
  contain: paint;
}

/* 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) and (min-width: 1920px) {
  .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) and (min-width: 1920px) {
  .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;
} */


/* === RIGHT SIDE PANEL STYLING === */
/* Right side panel container - wide panel from right edge to middle */
.right-side-panel {
  position: fixed;
  top: var(--top-bar-height); /* Kiss the bottom edge of the nav bar (where robot button is) */
  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 */
  bottom: var(--bottom-bar-height); /* Kiss the top edge of the bottom nav bar */
  background: rgba(0, 0, 0, 0.85);
  border-top: 3px solid rgba(255, 255, 255, 0.95);
  border-bottom: 3px solid rgba(255, 255, 255, 0.95);
  border-left: 3px solid rgba(255, 255, 255, 0.95);
  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 */
  box-sizing: border-box;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  overflow: hidden;
}

/* Panel resizer handle */
.panel-resizer {
  position: absolute;
  top: 14px;
  left: 0;
  width: 3px;
  bottom: 14px;
  height: auto;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.95) calc(50% - 25px), rgba(92, 92, 92, 0.96) calc(50% - 25px), rgba(92, 92, 92, 0.96) calc(50% + 25px), rgba(255, 255, 255, 0.95) calc(50% + 25px), rgba(255, 255, 255, 0.95) 100%);
  border-left: none;
  cursor: col-resize;
  z-index: 1000;
  border-radius: 999px;
}

.panel-resizer::after {
  content: none;
}

.panel-resizer:hover {
  opacity: 1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.95) calc(50% - 25px), rgba(92, 92, 92, 0.96) calc(50% - 25px), rgba(92, 92, 92, 0.96) calc(50% + 25px), rgba(255, 255, 255, 0.95) calc(50% + 25px), rgba(255, 255, 255, 0.95) 100%);
  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 */
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  overflow: hidden;
}

/* 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;
  border-top-left-radius: 14px;
  overflow: hidden;
}

.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;
  border-bottom-left-radius: 14px;
  overflow: hidden;
}

/* Chat Display Section (70%) */
.chat-display-section {
  flex: 0 0 70%;
  padding: 16px 16px 16px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat-display-area {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: var(--input-bg);
  border: 3px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  padding: 16px 0px 16px 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: scroll;
  background-color: #2a2a2a;
  /* Scrollbar styling - Firefox */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.chat-display-area:hover {
  scrollbar-color: ghostwhite transparent;
}
/* Scrollbar styling - WebKit (Chrome, Safari, Edge) */
.chat-display-area::-webkit-scrollbar {
  width: 8px;
  padding-left: 6px;
}
.chat-display-area::-webkit-scrollbar-track {
  background: transparent;
}
.chat-display-area::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
  border-left: 4px solid transparent;
  background-clip: padding-box;
  margin-left: 8px;
}
.chat-display-area:hover::-webkit-scrollbar-thumb {
  background: ghostwhite;
  border-left: 4px solid transparent;
  background-clip: padding-box;
  margin-left: 8px;
}

.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;
  margin-top: -40px;
}

.chat-input-field {
  flex: 1;
  height: 40px;
  max-height: 40px;
  background: #3a3a3a;
  border: 1px solid #555555;
  border-radius: 20px;
  padding: 10px 50px 10px 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  resize: none;
  overflow-y: auto;
  line-height: 1.3;
  scrollbar-width: thin;
  scrollbar-color: ghostwhite transparent;
}

.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;
}

/* AI Host and Model Selector Styles */
.ai-selector-row {
  display: flex;
  gap: 12px;
  margin-top: -2px;
}

.ai-selector-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-selector-group label {
  font-size: 0.75rem;
  color: #aaaaaa;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-select {
  height: 32px;
  background: #3a3a3a;
  border: 1px solid #555555;
  border-radius: 6px;
  padding: 0 8px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.8rem;
  color: #ffffff;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.ai-select:hover {
  border-color: #777777;
}

.ai-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.ai-select option {
  background: #2a2a2a;
  color: #ffffff;
}

.ai-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 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: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none; /* Hidden by default */
  overflow: hidden;
}

.detached-window.show {
  display: flex;
  flex-direction: column;
}

/* 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: 13px;
  border-top-right-radius: 13px;
  user-select: none;
  position: relative;
  z-index: 50;
  overflow: hidden;
}

.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 16px 16px 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid white;
  min-height: 0;
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 13px;
}

.detached-window .chat-display-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.detached-window .chat-display {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #2a2a2a;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 12px 12px 12px 12px;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  resize: none;
  overflow-y: scroll;
  /* Scrollbar styling - Firefox */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.detached-window .chat-display:hover {
  scrollbar-color: ghostwhite transparent;
}
/* Scrollbar styling - WebKit (Chrome, Safari, Edge) */
.detached-window .chat-display::-webkit-scrollbar {
  width: 8px;
}
.detached-window .chat-display::-webkit-scrollbar-track {
  background: transparent;
}
.detached-window .chat-display::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
  border-left: 4px solid transparent;
  background-clip: padding-box;
}
.detached-window .chat-display:hover::-webkit-scrollbar-thumb {
  background: ghostwhite;
  border-left: 4px solid transparent;
  background-clip: padding-box;
}

.detached-window .chat-input-section {
  height: auto;
}

.detached-window .ai-selector-row {
  margin-top: -8px;
}

.detached-window .input-container {
  display: flex;
  height: 100%;
  gap: 0;
  align-items: center;
  position: relative;
}

.detached-window .chat-input {
  flex: 1;
  height: 40px;
  max-height: 40px;
  background: #3a3a3a;
  border: 1px solid #555555;
  border-radius: 20px;
  padding: 10px 50px 10px 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  resize: none;
  overflow-y: auto;
  line-height: 1.3;
  scrollbar-width: thin;
  scrollbar-color: ghostwhite transparent;
}

.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) and (min-width: 1920px) {
  .right-side-panel {
    width: 50%; /* Take up 50% of screen width on medium screens */
    right: -50%;
  }
}

@media (max-width: 768px) and (min-width: 1920px) {
  .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;
}

@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;
}

/* Drag-to-reorder: sidebar device cells + location dropdown */
.device-item[data-dash-draggable="true"] {
    cursor: grab;
}
.device-accordion-wrapper.dash-device-dragging {
    opacity: 0.55;
}
.location-dropdown-row[data-dash-draggable="true"] {
    cursor: grab;
}
.location-dropdown-row.dash-location-dragging {
    opacity: 0.55;
}
/* Grabbing cursor for the whole page while a drag-to-reorder is in progress */
body.dash-dragging-active,
body.dash-dragging-active * {
    cursor: grabbing !important;
    user-select: none !important;
}

/* Transfer page: header, dataset list, and details are independent cards. */
#main-dashboard-card.data-transfer-page {
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    gap: 16px;
}

#main-dashboard-card.data-transfer-page::before {
    display: none !important;
}

#main-dashboard-card.data-transfer-page > .card-header {
    flex: 0 0 var(--top-bar-height);
    width: 100%;
    height: var(--top-bar-height);
    min-height: var(--top-bar-height);
    max-height: var(--top-bar-height);
    padding: 0 32px !important;
    box-sizing: border-box;
    background: var(--dashboard-panel-bg);
    border: 1px solid rgba(66, 201, 255, 0.42);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

#main-dashboard-card.data-transfer-page > #main-dashboard-content {
    padding: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

#main-dashboard-card.data-transfer-page .data-transfer-layout {
    gap: 16px !important;
    height: 100% !important;
    min-height: 0;
}

#main-dashboard-card.data-transfer-page .data-transfer-left-section,
#main-dashboard-card.data-transfer-page .data-transfer-right-section {
    background: var(--dashboard-panel-bg) !important;
    border: 1px solid rgba(66, 201, 255, 0.42) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    min-height: 0;
    overflow: hidden !important;
}

#main-dashboard-card.data-transfer-page .data-transfer-left-section,
#main-dashboard-card.data-transfer-page .data-transfer-right-section,
#main-dashboard-card.data-transfer-page > .card-header {
    position: relative;
    isolation: isolate;
}

#main-dashboard-card.data-transfer-page .data-transfer-left-section::before,
#main-dashboard-card.data-transfer-page .data-transfer-right-section::before,
#main-dashboard-card.data-transfer-page > .card-header::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

body.qrm-gradients-sweep #main-dashboard-card.data-transfer-page .data-transfer-left-section::before,
body.qrm-gradients-sweep #main-dashboard-card.data-transfer-page .data-transfer-right-section::before,
body.qrm-gradients-sweep #main-dashboard-card.data-transfer-page > .card-header::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

/* About page: two clean panels using the Transfer tab's exact column split. */
#main-dashboard-card.about-page {
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

#main-dashboard-card.about-page::before,
#main-dashboard-card.about-page > .card-header {
    display: none !important;
}

#main-dashboard-card.about-page > #main-dashboard-content {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

#main-dashboard-card.about-page .about-layout {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
}

#main-dashboard-card.about-page .about-left-section {
    width: 20%;
}

#main-dashboard-card.about-page .about-right-section {
    width: 80%;
}

#main-dashboard-card.about-page .about-left-section,
#main-dashboard-card.about-page .about-right-section {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background: var(--dashboard-panel-bg);
    border: 1px solid rgba(66, 201, 255, 0.42);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

#main-dashboard-card.about-page .about-left-section::before,
#main-dashboard-card.about-page .about-right-section::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

body.qrm-gradients-sweep #main-dashboard-card.about-page .about-left-section::before,
body.qrm-gradients-sweep #main-dashboard-card.about-page .about-right-section::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

#main-dashboard-card.about-page .about-menu {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 26px 0;
}

#main-dashboard-card.about-page .about-menu-cap {
    position: absolute;
    left: 0;
    width: 100%;
    min-height: 26px;
    height: 26px;
    box-sizing: border-box;
    background: #000000 !important;
    pointer-events: none;
}

#main-dashboard-card.about-page .about-menu-cap-top {
    top: 0;
    border: 0;
    border-bottom: 1px solid rgba(66, 201, 255, 0.42);
    border-radius: 15px 15px 0 0;
}

#main-dashboard-card.about-page .about-menu-cap-bottom {
    bottom: 0;
    border: 0;
    border-top: 1px solid rgba(66, 201, 255, 0.42);
    border-radius: 0 0 15px 15px;
}

#main-dashboard-card.about-page .about-menu-button {
    position: relative;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 16px 24px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(66, 201, 255, 0.12);
    color: rgba(225, 239, 255, 0.78);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

#main-dashboard-card.about-page .about-menu-button svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    stroke-width: 1.8;
}

#main-dashboard-card.about-page .about-menu-button:hover {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(42, 168, 255, 0.2), rgba(42, 168, 255, 0.04));
}

#main-dashboard-card.about-page .about-menu-button.active {
    color: #7ddaff;
    background: linear-gradient(90deg, rgba(42, 168, 255, 0.28), rgba(42, 168, 255, 0.06));
    box-shadow: inset 4px 0 0 #42c9ff, inset 0 0 24px rgba(42, 168, 255, 0.08);
}

#main-dashboard-card.about-page .about-menu-button:focus-visible {
    outline: 1px solid rgba(125, 218, 255, 0.9);
    outline-offset: -3px;
}

#main-dashboard-card.about-page .about-right-section {
    overflow: hidden;
}

#main-dashboard-card.about-page .about-right-section::after {
    content: '';
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 0;
    width: 24%;
    opacity: 0;
    transform: translate3d(-145%, 0, 0) skewX(-13deg);
    background: linear-gradient(90deg, transparent, rgba(66, 201, 255, 0.03), rgba(125, 218, 255, 0.16), rgba(69, 240, 176, 0.08), transparent);
    pointer-events: none;
}

#main-dashboard-card.about-page .about-right-section.about-section-transitioning::after {
    animation: aboutSectionScan 560ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

#main-dashboard-card.about-page .about-menu-button.active svg {
    animation: aboutMenuIconSelect 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes aboutSectionScan {
    0% {
        opacity: 0;
        transform: translate3d(-145%, 0, 0) skewX(-13deg);
    }
    18% {
        opacity: 0.9;
    }
    82% {
        opacity: 0.62;
    }
    100% {
        opacity: 0;
        transform: translate3d(515%, 0, 0) skewX(-13deg);
    }
}

@keyframes aboutMenuIconSelect {
    0% {
        opacity: 0.35;
        transform: translateX(-5px) scale(0.82);
    }
    65% {
        opacity: 1;
        transform: translateX(1px) scale(1.08);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* About / Info: product identity, version, company, and developer credit. */
#main-dashboard-card.about-page .about-info-content {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: clamp(24px, 3vh, 44px) clamp(30px, 4vw, 66px);
    box-sizing: border-box;
    overflow: hidden;
    color: rgba(226, 239, 255, 0.86);
}

#main-dashboard-card.about-page .about-info-content[hidden] {
    display: none;
}

#main-dashboard-card.about-page .about-info-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(720px, 100%);
    min-width: 0;
}

#main-dashboard-card.about-page .about-info-product,
#main-dashboard-card.about-page .about-info-credit {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
}

#main-dashboard-card.about-page .about-info-rms-mark {
    position: relative;
    width: clamp(245px, 18vw, 340px);
    aspect-ratio: 878 / 891;
}

#main-dashboard-card.about-page .about-info-rms-mark img {
    position: absolute;
    left: -30.3%;
    top: -5.5%;
    width: 162.55%;
    max-width: none;
    height: auto;
    opacity: 0.96;
    animation: aboutInfoLogoBreath 3.4s ease-in-out infinite;
}

#main-dashboard-card.about-page .about-info-product h2 {
    margin: 10px 0 0;
    color: #ffffff;
    background: linear-gradient(90deg, #9debdc 0%, #8fd8ee 36%, #b8abf0 72%, #e6aacd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(27px, 2.25vw, 42px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.015em;
    text-align: center;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-info-version {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-top: 16px;
    padding: 7px 13px;
    border: 1px solid rgba(66, 201, 255, 0.27);
    border-radius: 999px;
    background: rgba(42, 168, 255, 0.055);
}

#main-dashboard-card.about-page .about-info-version span {
    color: rgba(151, 214, 244, 0.62);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

#main-dashboard-card.about-page .about-info-version strong {
    color: #b9ecff;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.08em;
}

#main-dashboard-card.about-page .about-info-developed-divider {
    display: grid;
    grid-template-columns: minmax(42px, 1fr) auto minmax(42px, 1fr);
    align-items: center;
    gap: 14px;
    width: min(430px, 74%);
    margin: clamp(22px, 2.5vh, 32px) 0 clamp(15px, 1.8vh, 22px);
}

#main-dashboard-card.about-page .about-info-developed-divider > span {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 218, 255, 0.4));
}

#main-dashboard-card.about-page .about-info-developed-divider > span:last-child {
    background: linear-gradient(90deg, rgba(125, 218, 255, 0.4), transparent);
}

#main-dashboard-card.about-page .about-info-developed-divider strong {
    color: rgba(187, 220, 246, 0.65);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.24em;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-info-quantum-logo {
    display: grid;
    place-items: center;
    width: min(390px, 72%);
    padding: 4px;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#main-dashboard-card.about-page .about-info-quantum-logo img {
    display: block;
    width: min(330px, 100%);
    height: auto;
    filter: brightness(1.55) saturate(1.18);
}

#main-dashboard-card.about-page .about-info-developer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: clamp(15px, 1.8vh, 22px);
    padding: 9px 16px;
    border: 1px solid rgba(159, 137, 255, 0.22);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(66, 201, 255, 0.055), rgba(159, 137, 255, 0.07));
}

#main-dashboard-card.about-page .about-info-developer-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid rgba(125, 218, 255, 0.3);
    border-radius: 50%;
    color: #7ddaff;
    background: rgba(66, 201, 255, 0.08);
}

#main-dashboard-card.about-page .about-info-developer-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.7;
}

#main-dashboard-card.about-page .about-info-developer > div {
    display: grid;
    gap: 2px;
    text-align: left;
}

#main-dashboard-card.about-page .about-info-developer small {
    color: rgba(159, 210, 244, 0.58);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

#main-dashboard-card.about-page .about-info-developer strong {
    color: #eef8ff;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: 0.025em;
}

@keyframes aboutInfoLogoBreath {
    0%, 100% {
        opacity: 0.9;
        filter: brightness(0.95);
    }
    50% {
        opacity: 1;
        filter: brightness(1.08);
    }
}

@media (max-width: 1200px) {
    #main-dashboard-card.about-page .about-info-product h2 {
        font-size: clamp(22px, 2.7vw, 31px);
    }

    #main-dashboard-card.about-page .about-info-rms-mark {
        width: clamp(205px, 22vw, 275px);
    }
}

@media (max-height: 900px) {
    #main-dashboard-card.about-page .about-info-content {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    #main-dashboard-card.about-page .about-info-rms-mark {
        width: 185px;
    }

    #main-dashboard-card.about-page .about-info-product h2 {
        margin-top: 6px;
        font-size: clamp(21px, 2vw, 26px);
    }

    #main-dashboard-card.about-page .about-info-version {
        gap: 8px;
        margin-top: 9px;
        padding: 5px 10px;
    }

    #main-dashboard-card.about-page .about-info-version span {
        font-size: 6.5px;
    }

    #main-dashboard-card.about-page .about-info-version strong {
        font-size: 11px;
    }

    #main-dashboard-card.about-page .about-info-developed-divider {
        margin-top: 14px;
        margin-bottom: 11px;
    }

    #main-dashboard-card.about-page .about-info-developed-divider strong {
        font-size: 7px;
    }

    #main-dashboard-card.about-page .about-info-quantum-logo {
        width: min(300px, 68%);
        padding: 3px;
    }

    #main-dashboard-card.about-page .about-info-quantum-logo img {
        width: min(245px, 100%);
    }

    #main-dashboard-card.about-page .about-info-developer {
        gap: 9px;
        margin-top: 11px;
        padding: 6px 12px;
        border-radius: 9px;
    }

    #main-dashboard-card.about-page .about-info-developer-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    #main-dashboard-card.about-page .about-info-developer-icon svg {
        width: 15px;
        height: 15px;
    }

    #main-dashboard-card.about-page .about-info-developer strong {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-dashboard-card.about-page .about-info-rms-mark img {
        animation: none;
    }
}

#main-dashboard-card.about-page .about-summary-content {
    position: relative;
    z-index: 1;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: clamp(14px, 1.8vh, 24px);
    width: min(1240px, 100%);
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    padding: clamp(28px, 3.2vh, 48px) clamp(34px, 4vw, 68px);
    box-sizing: border-box;
    overflow: hidden;
    color: rgba(226, 239, 255, 0.84);
}

#main-dashboard-card.about-page .about-summary-content[hidden] {
    display: none;
}

#main-dashboard-card.about-page .about-summary-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(184px, 15vw, 224px);
    align-items: center;
    gap: clamp(24px, 3vw, 46px);
    min-width: 0;
}

#main-dashboard-card.about-page .about-summary-hero-copy {
    min-width: 0;
}

#main-dashboard-card.about-page .about-summary-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 8px;
    color: #42c9ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

#main-dashboard-card.about-page .about-summary-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #45f0b0;
    box-shadow: 0 0 12px rgba(69, 240, 176, 0.9);
}

#main-dashboard-card.about-page .about-summary-content h2 {
    margin: 0 0 12px;
    color: #fff;
    background: linear-gradient(102deg, #ffffff 0%, #ffffff 62%, #94e2ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(27px, 2vw, 37px);
    font-weight: 650;
    line-height: 1.14;
    letter-spacing: -0.025em;
}

#main-dashboard-card.about-page .about-summary-lead {
    margin: 0;
    max-width: 900px;
    font-size: clamp(13px, 0.86vw, 15.5px);
    line-height: 1.48;
}

#main-dashboard-card.about-page .about-summary-visual {
    position: relative;
    justify-self: end;
    width: clamp(184px, 15vw, 224px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: transparent;
    filter: none;
}

#main-dashboard-card.about-page .about-summary-visual::before,
#main-dashboard-card.about-page .about-summary-visual::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: 19%;
    top: 50%;
    width: 62%;
    height: 1px;
    transform-origin: center;
    background: linear-gradient(90deg, transparent, rgba(66, 201, 255, 0.55) 20%, rgba(66, 201, 255, 0.55) 80%, transparent);
    box-shadow: 0 0 8px rgba(66, 201, 255, 0.25);
}

#main-dashboard-card.about-page .about-summary-visual::before {
    transform: rotate(-27deg);
}

#main-dashboard-card.about-page .about-summary-visual::after {
    transform: rotate(88deg);
}

#main-dashboard-card.about-page .about-summary-orbit {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
}

#main-dashboard-card.about-page .about-summary-orbit-outer {
    inset: 8%;
    border: 1px dashed rgba(125, 218, 255, 0.43);
    box-shadow: inset 0 0 28px rgba(42, 168, 255, 0.05), 0 0 20px rgba(42, 168, 255, 0.06);
    animation: aboutSummaryOrbit 24s linear infinite;
}

#main-dashboard-card.about-page .about-summary-orbit-inner {
    inset: 27%;
    border: 1px solid rgba(69, 240, 176, 0.22);
    box-shadow: 0 0 18px rgba(69, 240, 176, 0.08);
}

#main-dashboard-card.about-page .about-summary-node,
#main-dashboard-card.about-page .about-summary-hub {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 1px solid rgba(125, 218, 255, 0.48);
    color: #8ce0ff;
    background: linear-gradient(145deg, rgba(18, 55, 104, 0.96), rgba(4, 17, 43, 0.98));
    box-shadow: 0 0 0 4px rgba(66, 201, 255, 0.045), 0 0 18px rgba(66, 201, 255, 0.22);
}

#main-dashboard-card.about-page .about-summary-node {
    width: clamp(35px, 2.8vw, 42px);
    aspect-ratio: 1;
    border-radius: 12px;
}

#main-dashboard-card.about-page .about-summary-node svg {
    width: 51%;
    height: 51%;
    stroke-width: 1.8;
}

#main-dashboard-card.about-page .about-summary-node-monitor {
    top: 3%;
    left: 41%;
}

#main-dashboard-card.about-page .about-summary-node-database {
    left: 4%;
    bottom: 17%;
}

#main-dashboard-card.about-page .about-summary-node-network {
    right: 3%;
    bottom: 16%;
}

#main-dashboard-card.about-page .about-summary-hub {
    left: 50%;
    top: 50%;
    width: clamp(55px, 4.4vw, 68px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-color: rgba(69, 240, 176, 0.62);
    border-radius: 50%;
    color: #45f0b0;
    background: radial-gradient(circle at 40% 35%, rgba(26, 92, 111, 0.98), rgba(4, 20, 42, 0.98) 65%);
    box-shadow: 0 0 0 7px rgba(69, 240, 176, 0.05), 0 0 28px rgba(69, 240, 176, 0.28);
    animation: aboutSummaryHubPulse 3.2s ease-in-out infinite;
}

#main-dashboard-card.about-page .about-summary-hub svg {
    width: 46%;
    height: 46%;
    stroke-width: 1.8;
}

#main-dashboard-card.about-page .about-summary-live {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    transform: translateX(-50%);
    border: 1px solid rgba(69, 240, 176, 0.26);
    border-radius: 999px;
    color: rgba(211, 255, 239, 0.86);
    background: rgba(3, 18, 37, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-summary-live > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #45f0b0;
    box-shadow: 0 0 9px rgba(69, 240, 176, 0.9);
}

#main-dashboard-card.about-page .about-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.25vh, 14px);
    margin: 0;
}

#main-dashboard-card.about-page .about-summary-grid section {
    --about-card-accent: 66, 201, 255;
    position: relative;
    min-width: 0;
    padding: clamp(13px, 1.5vh, 18px) clamp(15px, 1.4vw, 20px);
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--about-card-accent), 0.13), transparent 37%),
        linear-gradient(145deg, rgba(8, 29, 66, 0.88), rgba(5, 18, 45, 0.78));
    border: 1px solid rgba(var(--about-card-accent), 0.25);
    border-radius: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 9px 24px rgba(0, 0, 0, 0.11);
}

#main-dashboard-card.about-page .about-summary-grid section:nth-child(2) {
    --about-card-accent: 53, 152, 255;
}

#main-dashboard-card.about-page .about-summary-grid section:nth-child(3) {
    --about-card-accent: 69, 240, 176;
}

#main-dashboard-card.about-page .about-summary-grid section:nth-child(4) {
    --about-card-accent: 151, 132, 255;
}

#main-dashboard-card.about-page .about-summary-grid section::before {
    content: '';
    position: absolute;
    inset: 0 12% auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--about-card-accent), 0.9), transparent);
    box-shadow: 0 0 12px rgba(var(--about-card-accent), 0.3);
}

#main-dashboard-card.about-page .about-summary-card-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
}

#main-dashboard-card.about-page .about-summary-card-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border: 1px solid rgba(var(--about-card-accent), 0.3);
    border-radius: 9px;
    color: rgb(var(--about-card-accent));
    background: rgba(var(--about-card-accent), 0.09);
    box-shadow: inset 0 0 12px rgba(var(--about-card-accent), 0.05);
}

#main-dashboard-card.about-page .about-summary-card-icon svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

#main-dashboard-card.about-page .about-summary-grid h3 {
    margin: 0;
    color: rgb(var(--about-card-accent));
    font-size: clamp(14px, 0.9vw, 16px);
    font-weight: 650;
}

#main-dashboard-card.about-page .about-summary-grid p {
    margin: 0;
    color: rgba(218, 233, 250, 0.78);
    font-size: clamp(11.7px, 0.76vw, 13.2px);
    line-height: 1.4;
}

#main-dashboard-card.about-page .about-summary-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: clamp(11px, 1.25vh, 15px) clamp(14px, 1.4vw, 20px);
    border: 1px solid rgba(69, 240, 176, 0.2);
    border-radius: 13px;
    background:
        linear-gradient(90deg, rgba(69, 240, 176, 0.09), transparent 16%, transparent 78%, rgba(66, 201, 255, 0.08)),
        rgba(4, 18, 43, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 9px 24px rgba(0, 0, 0, 0.1);
}

#main-dashboard-card.about-page .about-summary-footer-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(69, 240, 176, 0.34);
    border-radius: 11px;
    color: #45f0b0;
    background: rgba(69, 240, 176, 0.09);
    box-shadow: 0 0 16px rgba(69, 240, 176, 0.08);
}

#main-dashboard-card.about-page .about-summary-footer-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

#main-dashboard-card.about-page .about-summary-closing {
    margin: 0;
    color: rgba(229, 241, 255, 0.83);
    font-size: clamp(12px, 0.82vw, 14px);
    line-height: 1.42;
}

#main-dashboard-card.about-page .about-summary-signal {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 23px;
    padding: 0 3px;
}

#main-dashboard-card.about-page .about-summary-signal i {
    display: block;
    width: 4px;
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(to top, #2aa8ff, #7ddaff);
    box-shadow: 0 0 7px rgba(66, 201, 255, 0.48);
}

#main-dashboard-card.about-page .about-summary-signal i:nth-child(1) {
    height: 8px;
}

#main-dashboard-card.about-page .about-summary-signal i:nth-child(2) {
    height: 15px;
}

#main-dashboard-card.about-page .about-summary-signal i:nth-child(3) {
    height: 22px;
    background: linear-gradient(to top, #31c992, #7effcc);
    box-shadow: 0 0 7px rgba(69, 240, 176, 0.48);
}

@keyframes aboutSummaryOrbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes aboutSummaryHubPulse {
    0%, 100% {
        box-shadow: 0 0 0 7px rgba(69, 240, 176, 0.05), 0 0 24px rgba(69, 240, 176, 0.2);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(69, 240, 176, 0.025), 0 0 34px rgba(69, 240, 176, 0.34);
    }
}

@media (max-width: 1200px) {
    #main-dashboard-card.about-page .about-summary-content {
        gap: 12px;
        padding: 22px 28px;
    }

    #main-dashboard-card.about-page .about-summary-hero {
        grid-template-columns: minmax(0, 1fr) 170px;
        gap: 22px;
    }

    #main-dashboard-card.about-page .about-summary-visual {
        width: 170px;
    }

    #main-dashboard-card.about-page .about-summary-content h2 {
        font-size: clamp(24px, 2.4vw, 31px);
    }

    #main-dashboard-card.about-page .about-summary-lead {
        font-size: 12.5px;
        line-height: 1.42;
    }

    #main-dashboard-card.about-page .about-summary-grid section {
        padding: 12px 14px;
    }

    #main-dashboard-card.about-page .about-summary-grid p {
        font-size: 11.5px;
        line-height: 1.36;
    }
}

@media (max-height: 900px) {
    #main-dashboard-card.about-page .about-summary-content {
        gap: 10px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    #main-dashboard-card.about-page .about-summary-hero {
        grid-template-columns: minmax(0, 1fr) 154px;
        gap: 20px;
    }

    #main-dashboard-card.about-page .about-summary-visual {
        width: 154px;
    }

    #main-dashboard-card.about-page .about-summary-content h2 {
        margin-bottom: 7px;
        font-size: clamp(23px, 1.8vw, 29px);
    }

    #main-dashboard-card.about-page .about-summary-eyebrow {
        margin-bottom: 5px;
        font-size: 10px;
    }

    #main-dashboard-card.about-page .about-summary-lead {
        font-size: 11.5px;
        line-height: 1.36;
    }

    #main-dashboard-card.about-page .about-summary-grid {
        gap: 8px;
    }

    #main-dashboard-card.about-page .about-summary-grid section {
        padding: 9px 12px;
    }

    #main-dashboard-card.about-page .about-summary-card-heading {
        margin-bottom: 5px;
    }

    #main-dashboard-card.about-page .about-summary-card-icon {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    #main-dashboard-card.about-page .about-summary-card-icon svg {
        width: 15px;
        height: 15px;
    }

    #main-dashboard-card.about-page .about-summary-grid h3 {
        font-size: 13px;
    }

    #main-dashboard-card.about-page .about-summary-grid p {
        font-size: 10.5px;
        line-height: 1.31;
    }

    #main-dashboard-card.about-page .about-summary-footer {
        gap: 10px;
        padding: 8px 12px;
    }

    #main-dashboard-card.about-page .about-summary-footer-icon {
        width: 31px;
        height: 31px;
    }

    #main-dashboard-card.about-page .about-summary-footer-icon svg {
        width: 17px;
        height: 17px;
    }

    #main-dashboard-card.about-page .about-summary-closing {
        font-size: 10.8px;
        line-height: 1.33;
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-dashboard-card.about-page .about-summary-orbit-outer,
    #main-dashboard-card.about-page .about-summary-hub,
    #main-dashboard-card.about-page .about-right-section.about-section-transitioning::after,
    #main-dashboard-card.about-page .about-menu-button.active svg {
        animation: none;
    }
}

/* About / Software Tools: independent collectors feeding one resilient telemetry pipeline. */
#main-dashboard-card.about-page .about-tools-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: clamp(14px, 1.8vh, 22px);
    width: min(1240px, 100%);
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    padding: clamp(28px, 3.2vh, 48px) clamp(34px, 4vw, 68px);
    box-sizing: border-box;
    overflow: hidden;
    color: rgba(226, 239, 255, 0.84);
}

#main-dashboard-card.about-page .about-tools-content[hidden] {
    display: none;
}

#main-dashboard-card.about-page .about-tools-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(24px, 3vw, 46px);
    min-width: 0;
}

#main-dashboard-card.about-page .about-tools-hero-copy {
    min-width: 0;
}

#main-dashboard-card.about-page .about-tools-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 8px;
    color: #42c9ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

#main-dashboard-card.about-page .about-tools-eyebrow svg {
    width: 16px;
    height: 16px;
    color: #45f0b0;
    filter: drop-shadow(0 0 7px rgba(69, 240, 176, 0.45));
}

#main-dashboard-card.about-page .about-tools-content h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(27px, 2vw, 37px);
    font-weight: 650;
    line-height: 1.14;
    letter-spacing: -0.025em;
}

#main-dashboard-card.about-page .about-tools-lead {
    max-width: 900px;
    margin: 0;
    color: rgba(226, 239, 255, 0.82);
    font-size: clamp(13px, 0.84vw, 15px);
    line-height: 1.46;
}

#main-dashboard-card.about-page .about-tools-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 260px;
    padding: 13px 16px;
    border: 1px solid rgba(69, 240, 176, 0.28);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(69, 240, 176, 0.1), rgba(42, 168, 255, 0.06));
}

#main-dashboard-card.about-page .about-tools-status > strong {
    padding-right: 14px;
    border-right: 1px solid rgba(125, 218, 255, 0.2);
    color: #ffffff;
    font-size: 38px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.06em;
}

#main-dashboard-card.about-page .about-tools-status > div {
    display: grid;
    gap: 5px;
}

#main-dashboard-card.about-page .about-tools-status span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #76ffd0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

#main-dashboard-card.about-page .about-tools-status span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #45f0b0;
    box-shadow: 0 0 9px rgba(69, 240, 176, 0.8);
    animation: aboutToolsStatusPulse 2.4s ease-in-out infinite;
}

#main-dashboard-card.about-page .about-tools-status small {
    color: rgba(203, 224, 248, 0.62);
    font-size: 8px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.1em;
}

#main-dashboard-card.about-page .about-tools-pipeline {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) 60px minmax(0, 1fr) 60px minmax(0, 0.94fr);
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(66, 201, 255, 0.2);
    border-radius: 14px;
    background: rgba(4, 18, 43, 0.66);
}

#main-dashboard-card.about-page .about-tools-pipeline-stage {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid rgba(66, 201, 255, 0.19);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(11, 38, 82, 0.9), rgba(6, 23, 55, 0.82));
}

#main-dashboard-card.about-page .about-tools-pipeline-stage > svg {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    color: #63d5ff;
    stroke-width: 1.7;
}

#main-dashboard-card.about-page .about-tools-pipeline-stage > span:not(.about-tools-source-icons) {
    display: grid;
    min-width: 0;
    gap: 3px;
}

#main-dashboard-card.about-page .about-tools-pipeline-stage small {
    color: rgba(183, 214, 244, 0.58);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.12em;
}

#main-dashboard-card.about-page .about-tools-pipeline-stage strong {
    overflow: hidden;
    color: #dff6ff;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-tools-source-icons {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

#main-dashboard-card.about-page .about-tools-source-icons svg {
    width: 27px;
    height: 27px;
    padding: 5px;
    box-sizing: border-box;
    border: 1px solid rgba(66, 201, 255, 0.24);
    border-radius: 8px;
    color: #63d5ff;
    background: rgba(42, 168, 255, 0.08);
    stroke-width: 1.7;
}

#main-dashboard-card.about-page .about-tools-source-icons svg + svg {
    margin-left: -5px;
}

#main-dashboard-card.about-page .about-tools-source-icons svg:nth-child(2) {
    color: #ffd266;
    border-color: rgba(255, 210, 102, 0.28);
    background: rgba(255, 210, 102, 0.08);
}

#main-dashboard-card.about-page .about-tools-source-icons svg:nth-child(3) {
    color: #8fa8ff;
    border-color: rgba(143, 168, 255, 0.28);
    background: rgba(143, 168, 255, 0.08);
}

#main-dashboard-card.about-page .about-tools-pipeline-link {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    min-width: 0;
    color: #42c9ff;
    background: linear-gradient(90deg, transparent, rgba(66, 201, 255, 0.38), transparent) center 68% / 100% 1px no-repeat;
}

#main-dashboard-card.about-page .about-tools-pipeline-link span {
    padding: 1px 5px;
    border-radius: 999px;
    color: rgba(157, 226, 255, 0.8);
    background: #071b3f;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

#main-dashboard-card.about-page .about-tools-pipeline-link svg {
    width: 25px;
    height: 25px;
    padding: 3px;
    background: #071b3f;
    stroke-width: 1.6;
    animation: aboutToolsDataFlow 2.2s ease-in-out infinite;
}

#main-dashboard-card.about-page .about-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(9px, 1.1vh, 13px);
    min-width: 0;
}

#main-dashboard-card.about-page .about-tools-grid section {
    --about-tool-accent: 66, 201, 255;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: clamp(12px, 1.4vh, 16px) clamp(13px, 1.2vw, 17px);
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(var(--about-tool-accent), 0.24);
    border-radius: 12px;
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--about-tool-accent), 0.1), transparent 40%),
        linear-gradient(145deg, rgba(8, 29, 66, 0.88), rgba(5, 18, 45, 0.8));
}

#main-dashboard-card.about-page .about-tools-grid section:nth-child(2) {
    --about-tool-accent: 255, 199, 82;
}

#main-dashboard-card.about-page .about-tools-grid section:nth-child(3) {
    --about-tool-accent: 104, 159, 255;
}

#main-dashboard-card.about-page .about-tools-grid section:nth-child(4) {
    --about-tool-accent: 159, 137, 255;
}

#main-dashboard-card.about-page .about-tools-grid section:nth-child(5) {
    --about-tool-accent: 69, 240, 176;
}

#main-dashboard-card.about-page .about-tools-grid section:nth-child(6) {
    --about-tool-accent: 231, 118, 255;
}

#main-dashboard-card.about-page .about-tools-grid section::before {
    content: '';
    position: absolute;
    inset: 0 14% auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--about-tool-accent), 0.9), transparent);
}

#main-dashboard-card.about-page .about-tools-card-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

#main-dashboard-card.about-page .about-tools-card-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border: 1px solid rgba(var(--about-tool-accent), 0.3);
    border-radius: 10px;
    color: rgb(var(--about-tool-accent));
    background: rgba(var(--about-tool-accent), 0.09);
}

#main-dashboard-card.about-page .about-tools-card-icon svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.7;
}

#main-dashboard-card.about-page .about-tools-card-heading > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

#main-dashboard-card.about-page .about-tools-card-heading small {
    color: rgba(var(--about-tool-accent), 0.72);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

#main-dashboard-card.about-page .about-tools-card-heading h3 {
    margin: 0;
    color: rgb(var(--about-tool-accent));
    font-size: clamp(13px, 0.88vw, 15.5px);
    font-weight: 650;
    line-height: 1.15;
}

#main-dashboard-card.about-page .about-tools-grid section > p {
    flex: 1 1 auto;
    margin: 0;
    color: rgba(218, 233, 250, 0.77);
    font-size: clamp(11px, 0.7vw, 12.5px);
    line-height: 1.38;
}

#main-dashboard-card.about-page .about-tools-card-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
}

#main-dashboard-card.about-page .about-tools-card-meta span {
    padding: 3px 6px;
    border: 1px solid rgba(var(--about-tool-accent), 0.2);
    border-radius: 999px;
    color: rgba(var(--about-tool-accent), 0.86);
    background: rgba(var(--about-tool-accent), 0.055);
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

@keyframes aboutToolsDataFlow {
    0%, 100% {
        transform: translateX(-3px);
        opacity: 0.62;
    }
    50% {
        transform: translateX(3px);
        opacity: 1;
    }
}

@keyframes aboutToolsStatusPulse {
    0%, 100% {
        opacity: 0.65;
        transform: scale(0.88);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1450px) {
    #main-dashboard-card.about-page .about-tools-content {
        gap: 12px;
        padding-right: 52px;
        padding-left: 52px;
    }

    #main-dashboard-card.about-page .about-tools-hero {
        gap: 22px;
    }

    #main-dashboard-card.about-page .about-tools-content h2 {
        font-size: clamp(24px, 2.2vw, 31px);
    }

    #main-dashboard-card.about-page .about-tools-lead {
        font-size: 12px;
        line-height: 1.4;
    }

    #main-dashboard-card.about-page .about-tools-status {
        min-width: 225px;
        padding: 11px 13px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline {
        grid-template-columns: minmax(0, 1.16fr) 46px minmax(0, 1fr) 46px minmax(0, 0.94fr);
        gap: 5px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline-stage {
        gap: 8px;
        padding: 9px 10px;
    }

    #main-dashboard-card.about-page .about-tools-grid section {
        padding: 11px 12px;
    }

    #main-dashboard-card.about-page .about-tools-grid section > p {
        font-size: 10.8px;
        line-height: 1.34;
    }
}

@media (max-height: 900px) {
    #main-dashboard-card.about-page .about-tools-content {
        gap: 8px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    #main-dashboard-card.about-page .about-tools-hero {
        gap: 18px;
    }

    #main-dashboard-card.about-page .about-tools-eyebrow {
        margin-bottom: 4px;
        font-size: 8px;
    }

    #main-dashboard-card.about-page .about-tools-eyebrow svg {
        width: 13px;
        height: 13px;
    }

    #main-dashboard-card.about-page .about-tools-content h2 {
        margin-bottom: 6px;
        font-size: clamp(22px, 1.8vw, 27px);
    }

    #main-dashboard-card.about-page .about-tools-lead {
        font-size: 10.7px;
        line-height: 1.32;
    }

    #main-dashboard-card.about-page .about-tools-status {
        min-width: 205px;
        gap: 10px;
        padding: 8px 10px;
    }

    #main-dashboard-card.about-page .about-tools-status > strong {
        padding-right: 10px;
        font-size: 31px;
    }

    #main-dashboard-card.about-page .about-tools-status span {
        font-size: 7px;
    }

    #main-dashboard-card.about-page .about-tools-status small {
        font-size: 6.5px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline {
        padding: 7px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline-stage {
        padding: 7px 8px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline-stage > svg {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    #main-dashboard-card.about-page .about-tools-source-icons svg {
        width: 22px;
        height: 22px;
        padding: 4px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline-stage small {
        font-size: 6.5px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline-stage strong {
        font-size: 8.5px;
    }

    #main-dashboard-card.about-page .about-tools-pipeline-link svg {
        width: 21px;
        height: 21px;
    }

    #main-dashboard-card.about-page .about-tools-grid {
        gap: 8px;
    }

    #main-dashboard-card.about-page .about-tools-grid section {
        padding: 8px 9px;
    }

    #main-dashboard-card.about-page .about-tools-card-heading {
        gap: 7px;
        margin-bottom: 5px;
    }

    #main-dashboard-card.about-page .about-tools-card-icon {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
        border-radius: 8px;
    }

    #main-dashboard-card.about-page .about-tools-card-icon svg {
        width: 16px;
        height: 16px;
    }

    #main-dashboard-card.about-page .about-tools-card-heading small {
        font-size: 6px;
    }

    #main-dashboard-card.about-page .about-tools-card-heading h3 {
        font-size: 11.5px;
    }

    #main-dashboard-card.about-page .about-tools-grid section > p {
        font-size: 9.4px;
        line-height: 1.27;
    }

    #main-dashboard-card.about-page .about-tools-card-meta {
        gap: 3px;
        margin-top: 6px;
    }

    #main-dashboard-card.about-page .about-tools-card-meta span {
        padding: 2px 5px;
        font-size: 5.7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-dashboard-card.about-page .about-tools-status span i,
    #main-dashboard-card.about-page .about-tools-pipeline-link svg {
        animation: none;
    }
}

/* About / Updates: compact release log with a dated two-column timeline. */
#main-dashboard-card.about-page .about-updates-content {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(1240px, 100%);
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    padding: clamp(28px, 3.2vh, 48px) clamp(34px, 4vw, 68px);
    box-sizing: border-box;
    overflow: hidden;
    color: rgba(226, 239, 255, 0.84);
}

#main-dashboard-card.about-page .about-updates-content[hidden] {
    display: none;
}

#main-dashboard-card.about-page .about-updates-stage {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: clamp(14px, 1.7vh, 22px);
    width: 100%;
    min-width: 0;
}

#main-dashboard-card.about-page .about-updates-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(24px, 3vw, 46px);
    min-width: 0;
}

#main-dashboard-card.about-page .about-updates-hero-copy {
    min-width: 0;
}

#main-dashboard-card.about-page .about-updates-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 7px;
    color: #42c9ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.19em;
}

#main-dashboard-card.about-page .about-updates-eyebrow svg {
    width: 16px;
    height: 16px;
    color: #45f0b0;
    stroke-width: 1.8;
}

#main-dashboard-card.about-page .about-updates-hero h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(29px, 2.1vw, 39px);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

#main-dashboard-card.about-page .about-updates-hero-copy > p:last-child {
    margin: 0;
    color: rgba(218, 233, 250, 0.72);
    font-size: clamp(12px, 0.78vw, 14px);
}

#main-dashboard-card.about-page .about-updates-date-card {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
        'label status'
        'date status';
    align-items: center;
    gap: 4px 18px;
    min-width: 248px;
    padding: 12px 15px;
    box-sizing: border-box;
    border: 1px solid rgba(69, 240, 176, 0.27);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(69, 240, 176, 0.085), rgba(42, 168, 255, 0.055));
}

#main-dashboard-card.about-page .about-updates-date-card > span {
    grid-area: label;
    color: rgba(174, 216, 242, 0.58);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

#main-dashboard-card.about-page .about-updates-date-card time {
    grid-area: date;
    display: flex;
    align-items: center;
    gap: 9px;
}

#main-dashboard-card.about-page .about-updates-date-card time > strong {
    color: #ffffff;
    font-size: 39px;
    font-weight: 650;
    line-height: 0.92;
    letter-spacing: -0.05em;
}

#main-dashboard-card.about-page .about-updates-date-card time > span {
    display: grid;
    gap: 1px;
    color: #7ddaff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.13em;
}

#main-dashboard-card.about-page .about-updates-date-card time small {
    color: rgba(186, 219, 245, 0.64);
    font-size: 8px;
    letter-spacing: 0.1em;
}

#main-dashboard-card.about-page .about-updates-date-card em {
    grid-area: status;
    display: flex;
    align-items: center;
    gap: 7px;
    align-self: stretch;
    padding-left: 16px;
    border-left: 1px solid rgba(125, 218, 255, 0.17);
    color: #75ffd0;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.09em;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-updates-date-card em i,
#main-dashboard-card.about-page .about-updates-footer > span i {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #45f0b0;
    box-shadow: 0 0 8px rgba(69, 240, 176, 0.72);
    animation: aboutUpdatesLivePulse 2.4s ease-in-out infinite;
}

#main-dashboard-card.about-page .about-updates-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: clamp(7px, 0.9vh, 10px) 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

#main-dashboard-card.about-page .about-updates-list li {
    --about-update-accent: 66, 201, 255;
    position: relative;
    display: grid;
    grid-template-columns: 28px 35px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 54px;
    padding: 9px 13px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(var(--about-update-accent), 0.22);
    border-radius: 11px;
    background:
        linear-gradient(90deg, rgba(var(--about-update-accent), 0.075), transparent 28%),
        rgba(5, 20, 48, 0.76);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

#main-dashboard-card.about-page .about-updates-list li:nth-child(6n + 2) {
    --about-update-accent: 100, 159, 255;
}

#main-dashboard-card.about-page .about-updates-list li:nth-child(6n + 3) {
    --about-update-accent: 69, 240, 176;
}

#main-dashboard-card.about-page .about-updates-list li:nth-child(6n + 4) {
    --about-update-accent: 159, 137, 255;
}

#main-dashboard-card.about-page .about-updates-list li:nth-child(6n + 5) {
    --about-update-accent: 255, 133, 112;
}

#main-dashboard-card.about-page .about-updates-list li:nth-child(6n) {
    --about-update-accent: 255, 199, 82;
}

#main-dashboard-card.about-page .about-updates-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 2px;
    border-radius: 0 2px 2px 0;
    background: rgb(var(--about-update-accent));
}

#main-dashboard-card.about-page .about-updates-list li:hover {
    transform: translateX(2px);
    border-color: rgba(var(--about-update-accent), 0.42);
    background:
        linear-gradient(90deg, rgba(var(--about-update-accent), 0.12), transparent 34%),
        rgba(6, 24, 56, 0.86);
}

#main-dashboard-card.about-page .about-update-number {
    color: rgba(var(--about-update-accent), 0.58);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

#main-dashboard-card.about-page .about-update-icon {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    border: 1px solid rgba(var(--about-update-accent), 0.28);
    border-radius: 9px;
    color: rgb(var(--about-update-accent));
    background: rgba(var(--about-update-accent), 0.075);
}

#main-dashboard-card.about-page .about-update-icon svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
}

#main-dashboard-card.about-page .about-updates-list li > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

#main-dashboard-card.about-page .about-updates-list small {
    color: rgba(var(--about-update-accent), 0.76);
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.13em;
}

#main-dashboard-card.about-page .about-updates-list p {
    overflow: hidden;
    margin: 0;
    color: rgba(222, 236, 252, 0.8);
    font-size: clamp(10.8px, 0.72vw, 12.5px);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-updates-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-width: 0;
    padding: 9px 13px;
    border: 1px solid rgba(69, 240, 176, 0.17);
    border-radius: 11px;
    background: rgba(4, 18, 43, 0.62);
}

#main-dashboard-card.about-page .about-updates-footer > span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #75ffd0;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.13em;
    white-space: nowrap;
}

#main-dashboard-card.about-page .about-updates-footer p {
    margin: 0;
    color: rgba(205, 226, 247, 0.62);
    font-size: 10px;
    text-align: center;
}

#main-dashboard-card.about-page .about-updates-footer strong {
    color: rgba(125, 218, 255, 0.68);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

@keyframes aboutUpdatesLivePulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1450px) {
    #main-dashboard-card.about-page .about-updates-content {
        padding-right: 52px;
        padding-left: 52px;
    }

    #main-dashboard-card.about-page .about-updates-date-card {
        min-width: 220px;
    }

    #main-dashboard-card.about-page .about-updates-list li {
        grid-template-columns: 24px 32px minmax(0, 1fr);
        gap: 8px;
    }
}

@media (max-height: 900px) {
    #main-dashboard-card.about-page .about-updates-content {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    #main-dashboard-card.about-page .about-updates-stage {
        gap: 10px;
    }

    #main-dashboard-card.about-page .about-updates-hero {
        gap: 18px;
    }

    #main-dashboard-card.about-page .about-updates-eyebrow {
        margin-bottom: 4px;
        font-size: 8.5px;
    }

    #main-dashboard-card.about-page .about-updates-eyebrow svg {
        width: 13px;
        height: 13px;
    }

    #main-dashboard-card.about-page .about-updates-hero h2 {
        margin-bottom: 4px;
        font-size: clamp(23px, 2vw, 28px);
    }

    #main-dashboard-card.about-page .about-updates-hero-copy > p:last-child {
        font-size: 10px;
    }

    #main-dashboard-card.about-page .about-updates-date-card {
        min-width: 202px;
        gap: 2px 12px;
        padding: 8px 11px;
        border-radius: 10px;
    }

    #main-dashboard-card.about-page .about-updates-date-card time > strong {
        font-size: 29px;
    }

    #main-dashboard-card.about-page .about-updates-date-card time > span {
        font-size: 9px;
    }

    #main-dashboard-card.about-page .about-updates-date-card em {
        padding-left: 10px;
        font-size: 6.5px;
    }

    #main-dashboard-card.about-page .about-updates-list {
        gap: 6px 8px;
    }

    #main-dashboard-card.about-page .about-updates-list li {
        grid-template-columns: 21px 30px minmax(0, 1fr);
        gap: 7px;
        min-height: 46px;
        padding: 7px 9px;
        border-radius: 8px;
    }

    #main-dashboard-card.about-page .about-update-number {
        font-size: 6.5px;
    }

    #main-dashboard-card.about-page .about-update-icon {
        width: 30px;
        height: 30px;
        border-radius: 7px;
    }

    #main-dashboard-card.about-page .about-update-icon svg {
        width: 15px;
        height: 15px;
    }

    #main-dashboard-card.about-page .about-updates-list li > div {
        gap: 2px;
    }

    #main-dashboard-card.about-page .about-updates-list small {
        font-size: 6.2px;
    }

    #main-dashboard-card.about-page .about-updates-list p {
        font-size: 9.7px;
    }

    #main-dashboard-card.about-page .about-updates-footer {
        gap: 10px;
        padding: 7px 10px;
        border-radius: 8px;
    }

    #main-dashboard-card.about-page .about-updates-footer p {
        font-size: 8.5px;
    }

    #main-dashboard-card.about-page .about-updates-footer > span,
    #main-dashboard-card.about-page .about-updates-footer strong {
        font-size: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-dashboard-card.about-page .about-updates-date-card em i,
    #main-dashboard-card.about-page .about-updates-footer > span i {
        animation: none;
    }
}

/* Match the Transfer cards' rounded border sweep on the Dashboard Network Diagram grid box. */
#dash-devices-panel.dash-visual-devices-panel {
    isolation: isolate;
}

#dash-devices-panel.dash-visual-devices-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

body.qrm-gradients-sweep #dash-devices-panel.dash-visual-devices-panel::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

/* Carry the same rounded sweep across all five Dashboard telemetry graph boxes. */
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-body-panel,
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-network-panel {
    isolation: isolate;
}

.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-body-panel::before,
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-network-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
}

body.qrm-gradients-sweep .dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-body-panel::before,
body.qrm-gradients-sweep .dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .dash-visual-network-panel::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

/* Match the Location, Network Diagram, and Telemetry top controls to the card sweeps. */
.dash-visual-layout .dash-visual-header-panel {
    position: relative;
    isolation: isolate;
}

.dash-visual-layout .dash-visual-header-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
}

body.qrm-gradients-sweep .dash-visual-layout .dash-visual-header-panel::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

/* Keep the legacy right-edge pseudo-element out of the way; use a real overlay on
   the visible logo/location sidebar so the full perimeter cannot be clipped. */
.sidebar::after {
    display: none;
}

.sidebar-border-sweep {
    position: absolute;
    inset: 2px;
    display: block;
    box-sizing: border-box;
    padding: 1px;
    border-radius: 14px;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 1;
    pointer-events: none;
    z-index: 1000;
}

body.qrm-gradients-sweep .sidebar-border-sweep {
    animation: qrmBorderRingSweep 7s linear infinite;
}

/* Include the telemetry Location/date/time bar in the Dashboard perimeter sweeps. */
.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .telemetry-bottom-box {
    position: relative;
    isolation: isolate;
}

.dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .telemetry-bottom-box::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
}

body.qrm-gradients-sweep .dash-visual-layout:not(.dash-visual-mode-map):not(.dash-visual-devices-open) .telemetry-bottom-box::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

#main-dashboard-card.data-transfer-page .data-transfer-right-section {
    background: var(--dashboard-panel-bg) !important;
}

#main-dashboard-card.data-transfer-page .data-transfer-right-section #dataquery-content,
#main-dashboard-card.data-transfer-page .data-transfer-right-section #dataquery-content > div,
#main-dashboard-card.data-transfer-page .data-transfer-right-section .dq-table,
#main-dashboard-card.data-transfer-page .data-transfer-right-section .dq-header,
#main-dashboard-card.data-transfer-page .data-transfer-right-section .dq-footer {
    background: transparent !important;
    box-shadow: none !important;
}

#main-dashboard-card.data-transfer-page .dataquery-live-charts-grid {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    box-sizing: border-box;
}

/* Graph view: each chart is its own card; remove the shared outer card. */
#main-dashboard-card.data-transfer-page .data-transfer-right-section.data-transfer-charts-unboxed {
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

#main-dashboard-card.data-transfer-page .data-transfer-right-section.data-transfer-charts-unboxed::before {
    display: none !important;
}

#main-dashboard-card.data-transfer-page .data-transfer-right-section.data-transfer-charts-unboxed #dataquery-content {
    padding: 0 !important;
    overflow: visible !important;
}

#main-dashboard-card.data-transfer-page .dataquery-live-chart-panel {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(66, 201, 255, 0.28) !important;
    border-radius: 16px !important;
    background: var(--dashboard-panel-bg) !important;
    box-shadow: inset 0 0 24px rgba(42, 168, 255, 0.025) !important;
}

#main-dashboard-card.data-transfer-page .dataquery-live-chart-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
}

body.qrm-gradients-sweep #main-dashboard-card.data-transfer-page .dataquery-live-chart-panel::before {
    animation: qrmBorderRingSweep 7s linear infinite;
}

/* Data Set right-click deletion UI. */
#main-dashboard-card.data-transfer-page .dataset-btn.dataset-context-target {
    border-color: #ffd84d !important;
    box-shadow: 0 0 0 1px rgba(255, 216, 77, 0.88), 0 0 16px rgba(255, 196, 0, 0.24) !important;
}

.dataset-context-menu {
    position: fixed;
    z-index: 12000;
    width: 190px;
    padding: 6px;
    border: 1px solid rgba(66, 201, 255, 0.48);
    border-radius: 10px;
    background: #07152c;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.52);
}

.dataset-context-menu button {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #f3f6fb;
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.dataset-context-menu button:hover {
    background: rgba(255, 76, 76, 0.16);
    color: #ff7373;
}

.dataset-context-menu svg {
    width: 18px;
    height: 18px;
}

.delete-dataset-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 5, 14, 0.7);
    backdrop-filter: blur(5px);
}

.delete-dataset-modal {
    position: relative;
    width: min(420px, calc(100vw - 40px));
    padding: 22px 24px 20px;
    box-sizing: border-box;
    border: 1px solid rgba(66, 201, 255, 0.62);
    border-radius: 16px;
    background: var(--dashboard-panel-bg);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.58);
}

.delete-dataset-modal h3 {
    margin: 0 36px 18px;
    color: #7deaff;
    font-size: 20px;
    text-align: center;
}

.delete-dataset-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #9fdcf2;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.delete-dataset-modal-message {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 72px;
    justify-content: center;
    padding: 14px;
    border: 1px solid rgba(66, 201, 255, 0.55);
    border-radius: 8px;
    color: #eef6ff;
    font-size: 16px;
}

.delete-dataset-modal-message strong {
    font-size: 18px;
    overflow-wrap: anywhere;
}

.delete-dataset-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.delete-dataset-modal-actions button {
    min-height: 44px;
    border: 1px solid rgba(66, 201, 255, 0.5);
    border-radius: 9px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.delete-dataset-cancel {
    background: rgba(4, 16, 34, 0.78);
    color: #b8dded;
}

.delete-dataset-confirm {
    background: linear-gradient(180deg, #42c9ff, #178dca);
    color: #031120;
}

.delete-dataset-confirm:disabled {
    cursor: wait;
    opacity: 0.72;
}

/* One consistent palette for every right-click menu and submenu. */
:root {
    --qrm-context-menu-bg: #07152c;
    --qrm-context-menu-text: #f3f6fb;
    --qrm-context-menu-hover: rgba(66, 201, 255, 0.18);
    --qrm-context-menu-border: rgba(66, 201, 255, 0.48);
}

:is(
    .device-context-menu,
    .device-context-menu-submenu,
    .sidebar-metric-context-menu,
    .dash-map-location-context-menu,
    .dataset-context-menu,
    .dash-dev-menu,
    .dash-dev-menu [style*="position:absolute"][style*="left:100%"]
) {
    background: var(--qrm-context-menu-bg) !important;
    border-color: var(--qrm-context-menu-border) !important;
    color: var(--qrm-context-menu-text) !important;
}

:is(
    .device-context-menu-item,
    .device-context-menu .context-menu-item,
    .sidebar-metric-context-menu-item,
    .dash-map-location-context-menu button,
    .dataset-context-menu button,
    .dash-dev-menu button
) {
    background: transparent !important;
    color: var(--qrm-context-menu-text) !important;
    font-family: 'Rajdhani', sans-serif !important;
}

:is(
    .device-context-menu-item,
    .device-context-menu .context-menu-item,
    .sidebar-metric-context-menu-item,
    .dash-map-location-context-menu button,
    .dataset-context-menu button,
    .dash-dev-menu button
):is(:hover, :focus-visible) {
    background: var(--qrm-context-menu-hover) !important;
    color: var(--qrm-context-menu-text) !important;
    outline: none !important;
}

:is(
    .device-context-menu-item,
    .device-context-menu .context-menu-item,
    .sidebar-metric-context-menu-item,
    .dash-map-location-context-menu button,
    .dataset-context-menu button,
    .dash-dev-menu button
) :is(i, svg, span) {
    color: inherit !important;
}

/* Delete options use the same selection color as every other option. */
.dash-map-location-context-menu .dash-map-location-context-delete,
.dash-map-location-context-menu .dash-map-location-context-delete:is(:hover, :focus-visible) {
    background: transparent !important;
    color: var(--qrm-context-menu-text) !important;
}

.dash-map-location-context-menu .dash-map-location-context-delete:is(:hover, :focus-visible) {
    background: var(--qrm-context-menu-hover) !important;
}

#main-dashboard-card.data-transfer-page .dataquery-live-chart-panel .plot-container,
#main-dashboard-card.data-transfer-page .dataquery-live-chart-panel .svg-container {
    width: 100% !important;
    height: 100% !important;
}

.transfer-time-custom {
    position: relative;
    width: 100%;
    height: 100%;
    color: #e7ecf5;
    font-family: 'Rajdhani', sans-serif;
}

.transfer-time-custom-title {
    position: absolute;
    top: 14px;
    left: 18px;
    font-family: 'Michroma', sans-serif;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 1.5px;
}

.transfer-time-custom-stage {
    position: absolute;
    inset: 48px 14px 0;
}

.transfer-time-duration-line {
    position: absolute;
    left: var(--timeline-start);
    top: 48%;
    width: var(--timeline-width);
    height: 16px;
    transform: translateY(-50%);
    border-radius: 8px;
    background: linear-gradient(90deg, #238ab9, #42c9ff 52%, #2a91b9);
}

.transfer-time-duration {
    position: absolute;
    left: var(--timeline-mid);
    top: 48%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88);
    white-space: nowrap;
    z-index: 3;
}

.transfer-time-total-label {
    position: absolute;
    left: var(--timeline-mid);
    top: calc(48% - 34px);
    transform: translateX(-50%);
    color: rgba(231, 236, 245, 0.9);
    font-family: 'Michroma', sans-serif;
    font-size: 11px;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.transfer-time-endpoint {
    position: absolute;
    top: 48%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(231, 236, 245, 0.9);
    border-radius: 50%;
    background: #42c9ff;
    box-sizing: border-box;
    z-index: 4;
}

.transfer-time-endpoint-start { left: var(--timeline-start); }
.transfer-time-endpoint-stop { left: var(--timeline-stop); }

.transfer-time-side-label {
    position: absolute;
    bottom: 27px;
    color: rgba(231, 236, 245, 0.78);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.transfer-time-endpoint-start .transfer-time-side-label,
.transfer-time-endpoint-stop .transfer-time-side-label {
    left: 50%;
    transform: translateX(-50%);
}

.transfer-time-timestamp {
    position: absolute;
    /* Sit below the bar while remaining well above the x-axis. */
    top: calc(48% + 18px);
    color: rgba(231, 236, 245, 0.96);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.transfer-time-timestamp-start {
    left: var(--timeline-start);
    transform: translateX(10px);
    text-align: left;
}

.transfer-time-timestamp-stop {
    left: var(--timeline-stop);
    transform: translateX(calc(-100% - 10px));
    text-align: right;
}

.transfer-time-stem {
    position: absolute;
    top: 48%;
    bottom: 46px;
    width: 1px;
    transform: translateX(-50%);
    background: rgba(125, 218, 255, 0.46);
}

.transfer-time-stem-start { left: var(--timeline-start); }
.transfer-time-stem-stop { left: var(--timeline-stop); }

.transfer-time-axis {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 46px;
    height: 1px;
    background: rgba(125, 218, 255, 0.35);
}

.transfer-time-tick {
    position: absolute;
    bottom: 41px;
    width: 1px;
    height: 6px;
    background: rgba(125, 218, 255, 0.45);
}

.transfer-time-tick span {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(231, 236, 245, 0.68);
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    white-space: nowrap;
}

/* Match every Transfer header control to the top-nav action button size. */
#main-dashboard-card.data-transfer-page #data-transfer-buttons {
    right: var(--main-content-gutter) !important;
    gap: 12px !important;
}

/* Keep the left dataset selections at the original right-header height. */
#main-dashboard-card.data-transfer-page .dataset-btn {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    box-sizing: border-box !important;
}

#main-dashboard-card.data-transfer-page .dataset-btn {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 16px !important;
}

#main-dashboard-card.data-transfer-page #dataset-list-content .dataset-btn:first-child,
#main-dashboard-card.data-transfer-page #dataset-list-content .dataset-btn:first-child::after {
    border-radius: 15px 15px 0 0;
}

#main-dashboard-card.data-transfer-page #dataset-list-content .dataset-btn:first-child.active::after {
    border-color: rgba(125, 218, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 10px rgba(66, 201, 255, 0.3);
}

#main-dashboard-card.data-transfer-page .dataset-type-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    flex: 0 0 20px !important;
}

#main-dashboard-card.data-transfer-page #header-upload-btn,
#main-dashboard-card.data-transfer-page .dataquery-view-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
    padding: 0 !important;
    box-sizing: border-box;
    border-radius: 12px !important;
    border: 1px solid rgba(66, 201, 255, 0.18) !important;
    background: rgba(7, 17, 28, 0.38) !important;
    align-items: center;
    justify-content: center;
}

#main-dashboard-card.data-transfer-page #header-upload-btn svg,
#main-dashboard-card.data-transfer-page .dataquery-view-btn svg {
    width: 20px !important;
    height: 20px !important;
}

#main-dashboard-card.data-transfer-page #dataquery-view-toggle {
    width: 100px !important;
    height: 44px !important;
    min-width: 100px !important;
    padding: 0 !important;
    gap: 12px !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box;
}

#main-dashboard-card.data-transfer-page .dataquery-view-slider {
    top: 0 !important;
    left: 0 !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    box-sizing: border-box;
}

#main-dashboard-card.data-transfer-page #dataquery-view-toggle[data-active="table"] .dataquery-view-slider {
    transform: translateX(0) !important;
}

#main-dashboard-card.data-transfer-page #dataquery-view-toggle[data-active="chart"] .dataquery-view-slider {
    transform: translateX(56px) !important;
}

/* Final contact geometry override: keep every legacy and current card equal. */
#contact-top-level-grid > .contact-person-card,
.contact-scroll-area .contact-info {
    height: 170px !important;
    min-height: 170px !important;
    max-height: 170px !important;
}

/* Desktop contact cards: this must remain outside the mobile media query. */
#contact-top-level-grid > .contact-person-card {
    position: relative !important;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(66, 201, 255, 0.22);
    border-radius: 16px;
    background: var(--sidebar-bg) !important;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

#contact-top-level-grid > .contact-person-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 218, 255, 0.92) !important;
    box-shadow:
        0 0 0 1px rgba(66, 201, 255, 0.28),
        0 0 24px rgba(42, 168, 255, 0.32),
        0 16px 34px rgba(0, 0, 0, 0.36) !important;
    filter: brightness(1.12) saturate(1.08);
}

#contact-top-level-grid > .contact-person-card::before {
    content: '' !important;
    position: absolute;
    inset: 0;
    display: block !important;
    box-sizing: border-box;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--qrm-ring-angle, 0deg),
        transparent 0deg,
        rgba(42, 168, 255, 0.14) 48deg,
        rgba(125, 218, 255, 0.74) 76deg,
        rgba(255, 255, 255, 0.68) 92deg,
        rgba(66, 201, 255, 0.34) 118deg,
        transparent 156deg,
        transparent 360deg
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 1 !important;
    pointer-events: none;
    z-index: 10;
    animation: qrmBorderRingSweep 7s linear infinite !important;
    will-change: --qrm-ring-angle;
}

#contact-top-level-grid .contact-person-header {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 12px 18px !important;
    border-bottom: 1px solid rgba(66, 201, 255, 0.22);
}

/* Keep every contact label visually identical and centered with its icon. */
#contact-top-level-grid .contact-person-header h4,
#contact-top-level-grid .contact-person-row,
#contact-top-level-grid .contact-person-row span,
#contact-top-level-grid .contact-person-row a {
    font-size: clamp(17px, 1.1vw, 22px) !important;
    line-height: 24px !important;
}

#contact-top-level-grid .contact-person-header h4 {
    margin: 0 !important;
    padding: 0 !important;
}

#contact-top-level-grid .contact-person-header svg,
#contact-top-level-grid .contact-person-row svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    flex: 0 0 24px !important;
    align-self: center !important;
}

#contact-top-level-grid .contact-person-row {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 24px;
}

#contact-top-level-grid .contact-person-body {
    display: grid !important;
    gap: 5px !important;
    padding: 12px 18px !important;
}
