
:root {
  /* Colors */
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);
  --color-select-caret: rgba(19, 52, 59, 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' 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");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' 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");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: rgba(31, 33, 33, 1);
    --color-surface: rgba(38, 40, 40, 1);
    --color-text: rgba(245, 245, 245, 1);
    --color-text-secondary: rgba(167, 169, 169, 0.7);
    --color-primary: rgba(50, 184, 198, 1);
    --color-primary-hover: rgba(45, 166, 178, 1);
    --color-primary-active: rgba(41, 150, 161, 1);
    --color-secondary: rgba(119, 124, 124, 0.15);
    --color-secondary-hover: rgba(119, 124, 124, 0.25);
    --color-secondary-active: rgba(119, 124, 124, 0.3);
    --color-border: rgba(119, 124, 124, 0.3);
    --color-error: rgba(255, 84, 89, 1);
    --color-success: rgba(50, 184, 198, 1);
    --color-warning: rgba(230, 129, 97, 1);
    --color-info: rgba(167, 169, 169, 1);
    --color-focus-ring: rgba(50, 184, 198, 0.4);
    --color-btn-primary-text: rgba(19, 52, 59, 1);
    --color-card-border: rgba(119, 124, 124, 0.2);
    --color-card-border-inner: rgba(119, 124, 124, 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(119, 124, 124, 0.2);
    --color-border-secondary: rgba(119, 124, 124, 0.2);
    --color-select-caret: rgba(245, 245, 245, 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' 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");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' 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");

    /* RGB versions for dark mode */
    --color-success-rgb: 50, 184, 198;
    --color-error-rgb: 255, 84, 89;
    --color-warning-rgb: 230, 129, 97;
    --color-info-rgb: 167, 169, 169;
  }
}

/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
  --color-background: rgba(31, 33, 33, 1);
  --color-surface: rgba(38, 40, 40, 1);
  --color-text: rgba(245, 245, 245, 1);
  --color-text-secondary: rgba(167, 169, 169, 0.7);
  --color-primary: rgba(50, 184, 198, 1);
  --color-primary-hover: rgba(45, 166, 178, 1);
  --color-primary-active: rgba(41, 150, 161, 1);
  --color-secondary: rgba(119, 124, 124, 0.15);
  --color-secondary-hover: rgba(119, 124, 124, 0.25);
  --color-secondary-active: rgba(119, 124, 124, 0.3);
  --color-border: rgba(119, 124, 124, 0.3);
  --color-error: rgba(255, 84, 89, 1);
  --color-success: rgba(50, 184, 198, 1);
  --color-warning: rgba(230, 129, 97, 1);
  --color-info: rgba(167, 169, 169, 1);
  --color-focus-ring: rgba(50, 184, 198, 0.4);
  --color-btn-primary-text: rgba(19, 52, 59, 1);
  --color-card-border: rgba(119, 124, 124, 0.15);
  --color-card-border-inner: rgba(119, 124, 124, 0.15);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --color-border-secondary: rgba(119, 124, 124, 0.2);
  --color-select-caret: rgba(245, 245, 245, 0.8);

  /* Common style patterns - updated for dark mode */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' 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");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' 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");

  /* RGB versions for dark mode */
  --color-success-rgb: 50, 184, 198;
  --color-error-rgb: 255, 84, 89;
  --color-warning-rgb: 230, 129, 97;
  --color-info-rgb: 167, 169, 169;
}

[data-color-scheme="light"] {
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);

  /* RGB versions for light mode */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}

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

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn--secondary:hover {
  background: var(--color-secondary-hover);
}

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--accent {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.btn--accent:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

.btn--accent:active {
  background: rgba(139, 92, 246, 0.15);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-secondary);
}

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(
    var(--color-success-rgb, 33, 128, 141),
    var(--status-bg-opacity)
  );
  color: var(--color-success);
  border: 1px solid
    rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(
    var(--color-error-rgb, 192, 21, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-error);
  border: 1px solid
    rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(
    var(--color-warning-rgb, 168, 75, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-warning);
  border: 1px solid
    rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(
    var(--color-info-rgb, 98, 108, 113),
    var(--status-bg-opacity)
  );
  color: var(--color-info);
  border: 1px solid
    rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}
.gap-8 {
  gap: var(--space-8);
}
.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}
.hidden {
  display: none;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://www.perplexity.ai/fonts/FKGroteskNeue.woff2')
    format('woff2');
}

/* Custom styles for WiFi DensePose application */

/* Base layout and containers */
body {
  background-color: var(--color-background);
  color: var(--color-text);
  overflow-x: hidden;
}

.container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-16);
}

.header {
  text-align: center;
  padding: var(--space-32) 0;
}

.subtitle {
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  margin-top: var(--space-8);
}

/* Navigation tabs */
.nav-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-24);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: var(--space-12) var(--space-16);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  white-space: nowrap;
  position: relative;
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--duration-normal) var(--ease-standard);
}

.nav-tab:hover {
  color: var(--color-text);
}

.nav-tab.active {
  color: var(--color-primary);
}

.nav-tab.active::after {
  transform: scaleX(1);
}

/* Tab content */
.tab-content {
  display: none;
  animation: fadeIn var(--duration-normal) var(--ease-standard);
}

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

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

/* Dashboard styles */
.hero-section {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  line-height: 1.6;
  margin: var(--space-16) auto var(--space-32);
  max-width: 800px;
}

.key-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-20);
  margin: var(--space-32) 0;
}

.benefit-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-card-border);
  transition: transform var(--duration-normal) var(--ease-standard),
    box-shadow var(--duration-normal) var(--ease-standard);
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-12);
}

.benefit-card h3 {
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-semibold);
}

.benefit-card p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
  margin-bottom: 0;
}

.system-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: var(--space-32) 0;
  gap: var(--space-16);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-16);
}

.stat-value {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.stat-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* Hardware tab styles */
.hardware-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
}

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

.antenna-array {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  margin-top: var(--space-16);
}

.antenna-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

.antenna {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-standard);
  cursor: pointer;
}

.antenna::before {
  content: attr(data-type);
  font-size: var(--font-size-sm);
  color: var(--color-surface);
  font-weight: var(--font-weight-medium);
}

.antenna.tx {
  background-color: rgba(33, 128, 141, 0.8);
}

.antenna.rx {
  background-color: rgba(168, 75, 47, 0.8);
}

.antenna.active::after {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: pulse 2s infinite;
}

.antenna.tx.active::after {
  color: rgba(33, 128, 141, 0.4);
}

.antenna.rx.active::after {
  color: rgba(168, 75, 47, 0.4);
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 1;
  }
  70% {
    transform: scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.95);
    opacity: 1;
  }
}

.antenna-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-20);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.legend-color.tx {
  background-color: rgba(33, 128, 141, 0.8);
}

.legend-color.rx {
  background-color: rgba(168, 75, 47, 0.8);
}

.config-section {
  margin-top: var(--space-16);
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  margin-bottom: var(--space-24);
}

.config-item {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  border: 1px solid var(--color-card-border);
}

.config-item label {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.config-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

.csi-data {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  border: 1px solid var(--color-card-border);
}

.csi-display {
  margin-top: var(--space-12);
}

.csi-row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: var(--space-8);
}

.csi-bar {
  flex: 1;
  height: 12px;
  background-color: var(--color-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.csi-fill {
  height: 100%;
  transition: width 0.5s var(--ease-standard);
}

.csi-fill.amplitude {
  background: linear-gradient(90deg, #1FB8CD, #32B8C6);
}

.csi-fill.phase {
  background: linear-gradient(90deg, #FF9A3D, #E65125);
}

.csi-value {
  width: 40px;
  text-align: right;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
}

/* Demo tab styles */
.demo-controls {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-bottom: var(--space-24);
}

.demo-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Status indicator dot */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
}

.status-indicator.active {
  background: #00cc88;
  box-shadow: 0 0 6px #00cc88;
}

.status-indicator.sim {
  background: #ffa500;
  box-shadow: 0 0 6px #ffa500;
  animation: pulse 1.5s infinite;
}

.status-indicator.connecting {
  background: #f0ad4e;
  animation: pulse 1s infinite;
}

.status-indicator.error {
  background: #ff3c3c;
}

/* Live Demo data-source banner */
.demo-source-banner {
  display: block;
  width: 100%;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-sizing: border-box;
}

.demo-source-live {
  background: rgba(0, 204, 136, 0.15);
  border: 1px solid #00cc88;
  color: #00cc88;
}

.demo-source-sim {
  background: rgba(255, 165, 0, 0.15);
  border: 1px solid #ffa500;
  color: #ffa500;
}

.demo-source-reconnecting {
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid #f0ad4e;
  color: #f0ad4e;
  animation: pulse 1.5s infinite;
}

.demo-source-offline {
  background: rgba(255, 60, 60, 0.12);
  border: 1px solid #ff3c3c;
  color: #ff3c3c;
}

.demo-source-unknown {
  background: rgba(128, 128, 128, 0.12);
  border: 1px solid #888;
  color: #888;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
}

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

.signal-panel, .pose-panel {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  border: 1px solid var(--color-card-border);
}

.signal-display, .pose-display {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  margin: var(--space-12) 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

canvas {
  max-width: 100%;
}

.signal-metrics, .detection-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.metric, .info-item {
  flex: 1;
  min-width: 120px;
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.metric span:last-child, .info-item span:last-child {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  font-family: var(--font-family-mono);
}

/* Architecture tab styles */
.architecture-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-24);
}

.architecture-image {
  max-width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-md);
}

.flow-steps {
  display: flex;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.step-card {
  flex: 1;
  min-width: 180px;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  border: 1px solid var(--color-card-border);
  position: relative;
  transition: transform var(--duration-normal) var(--ease-standard),
    box-shadow var(--duration-normal) var(--ease-standard);
  cursor: pointer;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-primary);
  color: var(--color-surface);
  border-radius: 50%;
  font-weight: var(--font-weight-bold);
  position: absolute;
  top: -16px;
  left: var(--space-16);
}

.step-card h3 {
  margin-top: var(--space-16);
  margin-bottom: var(--space-8);
}

.step-card p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

/* Performance tab styles */
.performance-chart {
  text-align: center;
  margin-bottom: var(--space-24);
}

.chart-image {
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-24);
}

.performance-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  border: 1px solid var(--color-card-border);
}

.metric-list {
  margin-top: var(--space-16);
}

.metric-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding: var(--space-8);
  border-radius: var(--radius-md);
  background-color: rgba(0, 0, 0, 0.05);
}

.metric-value {
  font-weight: var(--font-weight-medium);
  font-family: var(--font-family-mono);
}

.metric-value.success {
  color: var(--color-success);
}

.limitations-section {
  grid-column: 1 / -1;
  margin-top: var(--space-16);
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
  margin-top: var(--space-16);
}

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

.pros h4, .cons h4 {
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.pros ul, .cons ul {
  padding-left: var(--space-20);
}

.pros li, .cons li {
  margin-bottom: var(--space-8);
  color: var(--color-text-secondary);
}

/* Applications tab styles */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-24);
  margin-bottom: var(--space-32);
}

.app-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  border: 1px solid var(--color-card-border);
  transition: transform var(--duration-normal) var(--ease-standard),
    box-shadow var(--duration-normal) var(--ease-standard);
  height: 100%;
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.app-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-12);
}

.app-card h3 {
  margin-bottom: var(--space-12);
}

.app-card p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-16);
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.feature-tag {
  background-color: var(--color-secondary);
  color: var(--color-text);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.implementation-note {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  border: 1px solid var(--color-card-border);
  margin-top: var(--space-32);
}

.implementation-note h3 {
  margin-bottom: var(--space-12);
}

.implementation-note p {
  color: var(--color-text-secondary);
  margin-bottom: 0;
}
/* Additional styles for modular UI components */

/* Header info bar */
.header-info {
  display: flex;
  gap: var(--space-16);
  justify-content: center;
  margin-top: var(--space-16);
  font-size: var(--font-size-sm);
}

.api-version,
.api-environment,
.overall-health {
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  font-weight: var(--font-weight-medium);
}
/* Hide chips until JS fills them — was showing 3 empty pills next to CTA */
.api-version:empty,
.api-environment:empty,
.overall-health:empty { display: none; }

.api-environment.env-development {
  background: rgba(var(--color-info-rgb), 0.1);
  color: var(--color-info);
}

.api-environment.env-production {
  background: rgba(var(--color-success-rgb), 0.1);
  color: var(--color-success);
}

.overall-health.status-healthy {
  background: rgba(var(--color-success-rgb), 0.1);
  color: var(--color-success);
}

.overall-health.status-degraded {
  background: rgba(var(--color-warning-rgb), 0.1);
  color: var(--color-warning);
}

.overall-health.status-unhealthy {
  background: rgba(var(--color-error-rgb), 0.1);
  color: var(--color-error);
}

/* Dashboard panels */
.live-status-panel,
.system-metrics-panel,
.features-panel,
.live-stats-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  margin-bottom: var(--space-24);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-16);
  margin-top: var(--space-16);
}

.component-status {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-12);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
}

.component-status.status-healthy {
  border-color: var(--color-success);
  background: rgba(var(--color-success-rgb), 0.05);
}

.component-status.status-degraded {
  border-color: var(--color-warning);
  background: rgba(var(--color-warning-rgb), 0.05);
}

.component-status.status-warning {
  border-color: #ffa500;
  background: rgba(255, 165, 0, 0.08);
}

.component-status.status-warning .status-text {
  color: #ffa500;
}

.component-status.status-unhealthy {
  border-color: var(--color-error);
  background: rgba(var(--color-error-rgb), 0.05);
}

.component-name {
  font-weight: var(--font-weight-semibold);
}

.status-text {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
}

.status-message {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* Metrics display */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-16);
  margin-top: var(--space-16);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.metric-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.progress-bar {
  height: 8px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-fill.normal {
  background: var(--color-success);
}

.progress-fill.warning {
  background: var(--color-warning);
}

.progress-fill.critical {
  background: var(--color-error);
}

/* Features status */
.features-status {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-12);
  margin-top: var(--space-16);
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) var(--space-12);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  font-size: var(--font-size-sm);
}

.feature-item.enabled {
  background: rgba(var(--color-success-rgb), 0.05);
  border-color: var(--color-success);
}

.feature-item.disabled {
  opacity: 0.6;
}

.feature-status {
  font-weight: var(--font-weight-semibold);
}

/* Live statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-16);
  margin-top: var(--space-16);
}

.stat-item {
  text-align: center;
}

.stat-item .stat-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.person-count,
.avg-confidence,
.detection-count {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Zones display */
.zones-panel {
  margin-top: var(--space-24);
}

.zones-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) var(--space-12);
  background: var(--color-secondary);
  border-radius: var(--radius-base);
  font-size: var(--font-size-sm);
}

.zone-name {
  font-weight: var(--font-weight-medium);
}

.zone-count {
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
}

/* Error container */
.error-container {
  background: rgba(var(--color-error-rgb), 0.1);
  border: 1px solid var(--color-error);
  color: var(--color-error);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-16);
}

/* Global error toast */
.error-toast {
  position: fixed;
  bottom: var(--space-24);
  right: var(--space-24);
  background: var(--color-error);
  color: white;
  padding: var(--space-12) var(--space-20);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.error-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Backend status toast */
.backend-status-toast {
  position: fixed;
  top: var(--space-24);
  right: var(--space-24);
  padding: var(--space-12) var(--space-20);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1001;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.backend-status-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.backend-status-toast.success {
  background: var(--color-success);
  color: white;
}

.backend-status-toast.warning {
  background: var(--color-warning);
  color: white;
}

.backend-status-toast.error {
  background: var(--color-error);
  color: white;
}

/* Tab badge */
.tab-badge {
  display: inline-block;
  margin-left: var(--space-8);
  padding: var(--space-2) var(--space-6);
  background: var(--color-error);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

/* Help text */
.help-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: var(--space-16);
}

/* Array status */
.array-status {
  display: flex;
  gap: var(--space-16);
  margin-top: var(--space-16);
  padding: var(--space-12);
  background: var(--color-secondary);
  border-radius: var(--radius-base);
}

.array-info {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.info-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.info-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

/* ===== Sensing Tab Styles ===== */

.sensing-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-16);
  min-height: 550px;
}

@media (max-width: 900px) {
  .sensing-layout {
    grid-template-columns: 1fr;
  }
}

.sensing-viewport {
  background: #0a0a12;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  overflow: hidden;
  min-height: 500px;
  position: relative;
}

.sensing-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.sensing-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
}

/* Side panel */
.sensing-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  overflow-y: auto;
  max-height: 600px;
}

.sensing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: var(--space-12);
}

.sensing-card-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

/* Connection status */
.sensing-connection {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-size-sm);
}

.sensing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-info);
  flex-shrink: 0;
}

.sensing-dot.connected {
  background: #00cc88;
  box-shadow: 0 0 6px #00cc88;
}

.sensing-dot.simulated {
  background: var(--color-warning);
  box-shadow: 0 0 6px var(--color-warning);
}

.sensing-dot.connecting {
  background: var(--color-info);
  animation: pulse 1.5s infinite;
}

.sensing-dot.disconnected {
  background: var(--color-error);
}

.sensing-dot.reconnecting {
  background: var(--color-warning);
  animation: pulse 1.5s infinite;
}

.sensing-source {
  margin-left: auto;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  font-family: var(--font-family-mono);
}

.sensing-about-text {
  margin: 0;
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
}

.sensing-about-text strong {
  color: #ccc;
}

/* Data-source status banner (live / reconnecting / simulated) */
.sensing-source-banner {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  margin-bottom: var(--space-12);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family-mono);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-sizing: border-box;
}

.sensing-source-live {
  background: rgba(0, 204, 136, 0.15);
  border: 1px solid #00cc88;
  color: #00cc88;
}

.sensing-source-reconnecting {
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid var(--color-warning);
  color: var(--color-warning);
  animation: pulse 1.5s infinite;
}

.sensing-source-server-sim {
  background: rgba(255, 165, 0, 0.15);
  border: 1px solid #ffa500;
  color: #ffa500;
}

.sensing-source-simulated {
  background: rgba(255, 60, 60, 0.12);
  border: 1px solid var(--color-error);
  color: var(--color-error);
}

/* Health indicator for server-simulated data */
.health-sim {
  color: #ffa500;
  font-weight: 600;
}

/* Big RSSI value */
.sensing-big-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  font-family: var(--font-family-mono);
  margin-bottom: var(--space-4);
}

#sensingSparkline {
  width: 100%;
  height: 40px;
  display: block;
}

/* Meter bars */
.sensing-meters {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.sensing-meter {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-size-sm);
}

.sensing-meter label {
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.sensing-bar {
  height: 6px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sensing-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  background: var(--color-primary);
  width: 0%;
}

.sensing-bar-fill.motion {
  background: linear-gradient(90deg, #ff6633, #ff3333);
}

.sensing-bar-fill.breath {
  background: linear-gradient(90deg, #33ccff, #3366ff);
}

.sensing-bar-fill.optarisl {
  background: linear-gradient(90deg, #aa66ff, #ff66aa);
}

.sensing-bar-fill.confidence {
  background: linear-gradient(90deg, #33cc88, #00ff88);
}

.sensing-meter-val {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  text-align: right;
  color: var(--color-text-secondary);
}

/* Classification */
.sensing-classification {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.sensing-class-label {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  padding: var(--space-8);
  border-radius: var(--radius-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sensing-class-label.absent {
  background: rgba(var(--color-info-rgb), 0.15);
  color: var(--color-info);
}

.sensing-class-label.present_still {
  background: rgba(var(--color-success-rgb), 0.15);
  color: var(--color-success);
}

.sensing-class-label.active {
  background: rgba(var(--color-error-rgb), 0.15);
  color: var(--color-error);
}

.sensing-confidence {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-size-sm);
}

.sensing-confidence label {
  color: var(--color-text-secondary);
}

/* Details */
.sensing-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sensing-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-card-border-inner);
}

.sensing-detail-row:last-child {
  border-bottom: none;
}

.sensing-detail-row span:first-child {
  color: var(--color-text-secondary);
}

.sensing-detail-row span:last-child {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-medium);
}

/* ===== Training Tab Styles ===== */

#training .tab-header {
  margin-bottom: 20px;
}

#training .tab-header h2 {
  color: var(--color-text);
  margin: 0 0 8px 0;
}

#training .tab-header p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--font-size-sm);
}

/* Training Panel */
.training-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
}

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

.training-panel-header h3 {
  color: var(--color-text);
  margin: 0;
  font-size: var(--font-size-base);
}

.training-status-badge {
  padding: var(--space-2) 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
}

.training-status-idle {
  background: var(--color-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.training-status-active {
  background: rgba(var(--color-error-rgb), 0.15);
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb), var(--status-border-opacity));
  animation: pulse-training 2s infinite;
}

.training-status-completed {
  background: rgba(var(--color-success-rgb), 0.15);
  color: var(--color-success);
  border: 1px solid rgba(var(--color-success-rgb), var(--status-border-opacity));
}

@keyframes pulse-training {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Recording list */
.recording-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--space-12);
  background: var(--color-secondary);
  border: 1px solid var(--color-card-border-inner);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-8);
}

.recording-item-info {
  flex: 1;
}

.recording-item-name {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.recording-item-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin-top: var(--space-2);
}

/* Model cards */
.model-card {
  padding: var(--space-12);
  background: var(--color-secondary);
  border: 1px solid var(--color-card-border-inner);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-8);
  transition: border-color 0.2s;
}

.model-card:hover {
  border-color: var(--color-border);
}

.model-card-active {
  border-left: 3px solid var(--color-success);
}

.model-card-name {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.model-card-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin-top: var(--space-4);
}

.model-card-stats {
  display: flex;
  gap: var(--space-12);
  margin-top: var(--space-8);
}

.model-card-stat {
  font-size: var(--font-size-xs);
}

.model-card-stat-label {
  color: var(--color-text-secondary);
}

.model-card-stat-value {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

/* Training chart */
.training-chart-container {
  background: var(--color-secondary);
  border: 1px solid var(--color-card-border-inner);
  border-radius: var(--radius-base);
  padding: var(--space-12);
  margin: var(--space-12) 0;
}

.training-chart-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-8);
}

/* Training config form */
.training-config-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

.training-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.training-form-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.training-form-input {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  color: var(--color-text);
  padding: var(--space-8) 10px;
  font-size: var(--font-size-sm);
  font-family: inherit;
}

.training-form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

.training-form-select {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  color: var(--color-text);
  padding: var(--space-8) 10px;
  font-size: var(--font-size-sm);
}

/* Training buttons */
.training-btn {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  border: 1px solid transparent;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s;
}

.training-btn-primary {
  background: rgba(var(--color-success-rgb), 0.15);
  color: var(--color-success);
  border-color: rgba(var(--color-success-rgb), var(--status-border-opacity));
}

.training-btn-primary:hover {
  background: rgba(var(--color-success-rgb), 0.25);
}

.training-btn-danger {
  background: rgba(var(--color-error-rgb), 0.15);
  color: var(--color-error);
  border-color: rgba(var(--color-error-rgb), var(--status-border-opacity));
}

.training-btn-danger:hover {
  background: rgba(var(--color-error-rgb), 0.25);
}

.training-btn-secondary {
  background: rgba(var(--color-primary-rgb), 0.15);
  color: var(--color-primary);
  border-color: rgba(var(--color-primary-rgb), var(--status-border-opacity));
}

.training-btn-secondary:hover {
  background: rgba(var(--color-primary-rgb), 0.25);
}

.training-btn-muted {
  background: var(--color-secondary);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.training-btn-muted:hover {
  background: var(--color-secondary-hover);
}

/* Progress bar */
.training-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-8) 0;
}

.training-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Metrics grid */
.training-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin: var(--space-12) 0;
}

.training-metric {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-secondary);
  border-radius: var(--radius-base);
}

.training-metric-value {
  color: var(--color-text);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family-mono);
}

.training-metric-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-2);
}

/* Collapsible section */
.training-collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-bottom: 1px solid var(--color-card-border-inner);
}

.training-collapsible-header:hover {
  color: var(--color-primary);
}

.training-collapsible-content {
  padding: var(--space-12) 0;
}

/* Pose trail toggle in toolbar */
.pose-trail-btn {
  padding: var(--space-6) 14px;
  border-radius: var(--radius-base);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.pose-trail-btn.active {
  background: rgba(var(--color-primary-rgb), 0.25);
  border-color: rgba(var(--color-primary-rgb), 0.6);
}

.pose-trail-btn:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
}

/* ============================================================
   Optaris Theme Override — Console (index.html)
   Dark navy + amber, numbered sections, editorial typography.
   This block overrides the upstream light-theme tokens above.
   To revert, delete from this comment to EOF.
   ============================================================ */

:root {
  --color-background: #060d1a;
  --color-surface: #0a1628;
  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-primary: #f5a623;
  --color-primary-hover: #ffb844;
  --color-primary-active: #d08614;
  --color-primary-rgb: 245, 166, 35;
  --color-secondary: rgba(245, 166, 35, 0.10);
  --color-secondary-hover: rgba(245, 166, 35, 0.18);
  --color-secondary-active: rgba(245, 166, 35, 0.25);
  --color-border: rgba(245, 166, 35, 0.18);
  --color-card-border: rgba(245, 166, 35, 0.18);
  --color-card-border-inner: rgba(245, 166, 35, 0.10);
  --color-btn-primary-text: #0a1628;
  --color-focus-ring: rgba(245, 166, 35, 0.35);
}

body {
  background: var(--color-background);
  color: var(--color-text);
  position: relative;
}

/* Optaris lattice — dot grid behind page content */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(245, 166, 35, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at top, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 20%, transparent 80%);
}

.container { position: relative; z-index: 1; }

/* Console header */
.header {
  text-align: left;
  padding: var(--space-32) 0 var(--space-20);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-24);
}
.header h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 40px;
  letter-spacing: 0;
  color: var(--color-text);
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
}
.header h1 .brand-mark {
  align-self: center;
  filter: drop-shadow(0 0 12px rgba(245, 166, 35, 0.45));
  margin-right: 2px;
}
.header h1 .brand-word {
  font-weight: 300;
  font-size: 38px;
  letter-spacing: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #cdd6e3 55%, #f5a623 220%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(245, 166, 35, 0.15);
}
.header h1 .brand-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: rgba(232, 236, 224, 0.5);
  padding-left: 14px;
  border-left: 1px solid rgba(245, 166, 35, 0.25);
  margin-left: 4px;
}
.subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 11px;
  color: var(--color-primary);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: 12px;
  margin-left: 2px;
  opacity: 0.85;
}

/* Numbered nav tabs — Optaris editorial flourish */
.nav-tabs {
  border-bottom: 1px solid var(--color-border);
  counter-reset: tab;
  justify-content: flex-start;
  gap: 0;
}
.nav-tab {
  counter-increment: tab;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 300;
  padding: 14px 18px;
  color: var(--color-text-secondary);
  font-family: 'Inter', sans-serif;
}
.nav-tab::before {
  content: counter(tab, decimal-leading-zero) " · ";
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  color: var(--color-primary);
  margin-right: 4px;
  opacity: 0.85;
}
.nav-tab.active {
  color: var(--color-primary);
}

/* Numbered tab-section headers */
.tab-content {
  counter-reset: section;
}
.tab-content > h2,
.tab-content > .hero-section > h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--color-text);
  margin-bottom: var(--space-16);
}
.tab-content > h2::before,
.tab-content > .hero-section > h2::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-primary);
  vertical-align: middle;
  margin-right: 14px;
  margin-bottom: 5px;
}

/* Subsection h3 */
h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--color-text);
}

/* Cards/panels darker surface */
.live-status-panel,
.benefit-card,
.metrics-panel,
.feature-list-panel,
.live-stats-panel,
.spec-panel,
.demo-panel,
.architecture-panel,
.performance-panel,
.application-card {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--color-card-border);
  color: var(--color-text);
}

/* Hero section left-align like Optaris hero */
.hero-section { text-align: left; max-width: 100%; }
.hero-description {
  color: var(--color-text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  max-width: 720px;
}

/* ---- Demo Day Readiness ---- */
.demo-readiness {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 22px 28px;
  margin-bottom: 28px;
  background:
    linear-gradient(135deg, rgba(245,166,35,0.04) 0%, rgba(10,22,40,0) 60%),
    linear-gradient(180deg, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.55) 100%);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 24px rgba(0,0,0,0.35);
}
.demo-readiness::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,166,35,0.45), transparent);
}
.readiness-left { min-width: 180px; }
.readiness-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 3px;
}
.readiness-verdict[data-state="ready"]  { color: #4ade80; }
.readiness-verdict[data-state="warn"]   { color: var(--color-primary); }
.readiness-verdict[data-state="fail"]   { color: #f87171; }
.verdict-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: verdict-pulse 2.4s ease-in-out infinite;
}
@keyframes verdict-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.readiness-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.readiness-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(148,163,184,0.06);
  color: var(--color-text-secondary);
}
.readiness-source[data-live="1"] {
  color: #4ade80;
  background: rgba(74,222,128,0.10);
  box-shadow: 0 0 10px rgba(74,222,128,0.18);
}
.readiness-source[data-live="0"] {
  color: #93c5fd;
  background: rgba(96,165,250,0.10);
}
.readiness-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  flex: 1;
}
.r-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 4px 22px;
  border-left: 1px solid rgba(245,166,35,0.10);
}
.r-item:first-child { border-left: 1px solid rgba(245,166,35,0.18); padding-left: 22px; }
.r-item label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.r-item span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.3px;
}

/* ---- Demo cards ---- */
.demo-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
@media (max-width: 900px) {
  .demo-cards { grid-template-columns: 1fr; }
  .readiness-grid { grid-template-columns: repeat(2, 1fr); }
}

.demo-card {
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(245,166,35,0.10) 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(74,222,128,0.04) 0%, transparent 60%),
    linear-gradient(180deg, rgba(16,28,52,0.92) 0%, rgba(6,14,28,0.92) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(245,166,35,0.22);
  border-radius: 14px;
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 24px 60px -20px rgba(0,0,0,0.7),
    0 1px 0 rgba(245,166,35,0.05);
}
.demo-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,166,35,0.55), transparent);
  opacity: 0.6;
}
.demo-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 30px rgba(0,0,0,0.45),
    0 0 0 1px rgba(245,166,35,0.15);
}
.demo-card[data-state="alert"]    { border-color: rgba(239, 68, 68, 0.55); }
.demo-card[data-state="alert"]::after { background: linear-gradient(90deg, transparent, rgba(239,68,68,0.7), transparent); }
.demo-card[data-state="detected"] { border-color: rgba(245, 166, 35, 0.6); }
.demo-card[data-state="live"]     { border-color: rgba(74, 222, 128, 0.4); }
.demo-card[data-state="live"]::after  { background: linear-gradient(90deg, transparent, rgba(74,222,128,0.55), transparent); }
.demo-card[data-state="offline"]  { border-color: rgba(148, 163, 184, 0.30); }

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(245,166,35,0.12);
  position: relative;
}
.card-head::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
}
.card-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--color-primary);
  padding-right: 12px;
  border-right: 1px solid rgba(245, 166, 35, 0.4);
}
.card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.2px;
  color: var(--color-text);
  margin: 0;
  flex: 1;
}
.card-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.02);
}
.card-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.demo-card[data-state="scanning"] .card-status { color: var(--color-text-secondary); background: rgba(148,163,184,0.08); }
.demo-card[data-state="detected"] .card-status { color: var(--color-primary); background: rgba(245,166,35,0.10); }
.demo-card[data-state="alert"] .card-status    { color: #f87171; background: rgba(239,68,68,0.10); }
.demo-card[data-state="live"] .card-status     { color: #4ade80; background: rgba(74,222,128,0.10); }
.demo-card[data-state="offline"] .card-status  { color: var(--color-text-secondary); background: rgba(148,163,184,0.06); }
.demo-card[data-state="offline"] .card-status::before { animation: none; opacity: 0.5; }

.card-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.kpi { }
.kpi-value {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 68px;
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -2.5px;
  background: linear-gradient(180deg, #ffffff 0%, #93a4be 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 30px rgba(245,166,35,0.10);
}
.demo-card[data-state="alert"] .kpi-value,
.demo-card[data-state="detected"] .kpi-value {
  background: linear-gradient(180deg, #ffd27a 0%, #f5a623 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.kpi-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-top: 6px;
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px dashed var(--color-card-border-inner);
  border-bottom: 1px dashed var(--color-card-border-inner);
}
.card-meta label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 3px;
}
.card-meta strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text);
}

.card-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 80px;
  max-height: 140px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.event-row {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(245, 166, 35, 0.06);
  color: var(--color-text);
}
.event-time { color: var(--color-text-secondary); }
.event-meta { color: var(--color-primary); }
.event-empty {
  color: var(--color-text-secondary);
  opacity: 0.5;
  padding: 8px 0;
  font-style: italic;
}

.card-actions { display: flex; justify-content: flex-end; }
.btn-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-primary);
  background: linear-gradient(180deg, rgba(245,166,35,0.10), rgba(245,166,35,0.04));
  border: 1px solid rgba(245,166,35,0.45);
  border-radius: 999px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-launch:hover {
  background: linear-gradient(180deg, rgba(245,166,35,0.22), rgba(245,166,35,0.10));
  border-color: var(--color-primary);
  color: #ffd27a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 24px rgba(245,166,35,0.25);
}

/* ---------- Premium tile additions (sparkline, trend, insight, etc) ---------- */

.card-actions { gap: 12px; justify-content: flex-end; }

.btn-presenter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(226,232,240,0.85);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.btn-presenter:hover {
  border-color: rgba(245,166,35,0.55);
  color: #ffd27a;
  background: linear-gradient(180deg, rgba(245,166,35,0.10), rgba(245,166,35,0.02));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 18px rgba(245,166,35,0.18);
}
.btn-presenter:active { transform: translateY(1px); }

/* KPI row / trend chip */
.kpi-row { display: flex; align-items: baseline; gap: 12px; }
.kpi-trend {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--color-text-secondary);
  background: rgba(148,163,184,0.06);
  white-space: nowrap;
  transform: translateY(-6px);
}
.kpi-trend[data-dir="up"]   { color: #4ade80; background: rgba(74,222,128,0.08); }
.kpi-trend[data-dir="down"] { color: #f87171; background: rgba(239,68,68,0.08); }
.kpi-trend[data-dir="flat"] { color: var(--color-text-secondary); }

/* Sparkline */
.kpi-spark {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: 10px;
  filter: drop-shadow(0 2px 8px rgba(245,166,35,0.18));
}
.demo-card[data-state="live"]  .kpi-spark { filter: drop-shadow(0 2px 8px rgba(74,222,128,0.18)); }
.demo-card[data-state="alert"] .kpi-spark { filter: drop-shadow(0 2px 10px rgba(239,68,68,0.28)); }

/* Confidence bar (lithium) */
.kpi-conf-bar {
  margin-top: 10px;
  height: 4px;
  width: 100%;
  background: rgba(148,163,184,0.10);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.kpi-conf-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(245,166,35,0.4), #f5a623);
  transition: width 0.5s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 10px rgba(245,166,35,0.5);
}
.kpi-sub {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-text-secondary);
  letter-spacing: 0.5px;
}
.kpi-sub > span { color: var(--color-text); font-weight: 600; }

/* Insight line */
.card-insight {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 300;
  color: rgba(226,232,240,0.85);
  padding: 12px 14px;
  border-left: 2px solid rgba(245,166,35,0.45);
  background: linear-gradient(90deg, rgba(245,166,35,0.05), transparent 70%);
  border-radius: 4px;
  letter-spacing: 0.1px;
}
.demo-card[data-state="live"]  .card-insight { border-left-color: rgba(74,222,128,0.55); background: linear-gradient(90deg, rgba(74,222,128,0.05), transparent 70%); }
.demo-card[data-state="alert"] .card-insight { border-left-color: rgba(239,68,68,0.65); background: linear-gradient(90deg, rgba(239,68,68,0.07), transparent 70%); }

/* Card meta — now a 4-col grid for lithium, 2-col still works for people */
.card-meta { grid-template-columns: repeat(2, 1fr); }
#card-lithium .card-meta { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
@media (max-width: 1100px) {
  #card-lithium .card-meta { grid-template-columns: repeat(2, 1fr); }
}

/* Hourly histogram (lithium) */
.card-histogram {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.hist-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  flex-shrink: 0;
}
.hist-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
  flex: 1;
}
.hist-bar {
  flex: 1;
  background: linear-gradient(180deg, rgba(245,166,35,0.85), rgba(245,166,35,0.25));
  border-radius: 2px 2px 0 0;
  min-height: 6px;
  transition: height 0.4s ease;
  box-shadow: 0 0 6px rgba(245,166,35,0.2);
}

/* Zone viewing label */
.zone-viewing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0 2px;
}
.zone-viewing-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}
.zone-viewing-value {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.1px;
}
.zone-viewing-hint {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--color-text-secondary);
  opacity: 0.65;
  font-style: italic;
}

/* Zone pills (people) — clickable tabs */
.card-zones {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (max-width: 1100px) {
  .card-zones { grid-template-columns: repeat(3, 1fr); }
}
.zone-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(148,163,184,0.04);
  transition: all 0.22s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.zone-pill::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}
.zone-pill:hover {
  border-color: rgba(74,222,128,0.45);
  background: rgba(74,222,128,0.06);
  transform: translateY(-1px);
}
.zone-pill[data-occupied="1"] {
  border-color: rgba(74,222,128,0.45);
  background: linear-gradient(180deg, rgba(74,222,128,0.10), rgba(74,222,128,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 14px rgba(74,222,128,0.10);
}
.zone-pill[data-selected="1"] {
  border-color: rgba(245,166,35,0.65);
  background: linear-gradient(180deg, rgba(245,166,35,0.14), rgba(245,166,35,0.04));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 22px rgba(245,166,35,0.22);
}
.zone-pill[data-selected="1"]::after { background: var(--color-primary); }
.zone-pill[data-selected="1"] .zone-name { color: var(--color-primary); }
.zone-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  line-height: 1.2;
}
.zone-pill[data-occupied="1"]:not([data-selected="1"]) .zone-name { color: #4ade80; }
.zone-count {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.zone-pill[data-zone="all"] {
  border-color: rgba(245,166,35,0.30);
}
.zone-pill[data-zone="all"][data-selected="1"] .zone-name { color: var(--color-primary); }

/* Dwell mix bar (people) */
.card-dwell { display: flex; flex-direction: column; gap: 8px; }
.dwell-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}
.dwell-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148,163,184,0.08);
}
.dwell-seg { display: block; transition: width 0.5s cubic-bezier(.2,.7,.2,1); }
.dwell-seg.short { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dwell-seg.med   { background: linear-gradient(90deg, #4ade80, #22d3ee); }
.dwell-seg.long  { background: linear-gradient(90deg, #818cf8, #a78bfa); }
.dwell-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--color-text-secondary);
}
.dwell-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dwell-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dwell-legend i.d-short { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dwell-legend i.d-med   { background: linear-gradient(90deg, #4ade80, #22d3ee); }
.dwell-legend i.d-long  { background: linear-gradient(90deg, #818cf8, #a78bfa); }

/* Status: 'demo' for offline-fallback (people tile) */
.demo-card[data-state="demo"] { border-color: rgba(96, 165, 250, 0.35); }
.demo-card[data-state="demo"]::after { background: linear-gradient(90deg, transparent, rgba(96,165,250,0.55), transparent); }
.demo-card[data-state="demo"] .card-status { color: #93c5fd; background: rgba(96,165,250,0.10); }

/* Detection pulse (lithium) */
@keyframes detect-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,166,35,0.55), inset 0 1px 0 rgba(255,255,255,0.08); }
  60%  { box-shadow: 0 0 0 18px rgba(245,166,35,0.0),  inset 0 1px 0 rgba(255,255,255,0.08); }
  100% { box-shadow: 0 0 0 0 rgba(245,166,35,0.0),    inset 0 1px 0 rgba(255,255,255,0.08); }
}
.demo-card.pulse { animation: detect-pulse 2.4s ease-out 1; }
.demo-card[data-state="alert"].pulse { animation-name: detect-pulse-alert; }
@keyframes detect-pulse-alert {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  60%  { box-shadow: 0 0 0 22px rgba(239,68,68,0.0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.0); }
}

.demo-note {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  font-style: italic;
  color: var(--color-text-secondary);
  opacity: 0.7;
  margin: 8px 0 24px;
}
.demo-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid var(--color-card-border-inner);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--color-primary);
}

/* ---- Hardware tab ---- */
.hw-lede {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: var(--color-text-secondary);
  max-width: 760px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.hw-h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-card-border-inner);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.hw-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--color-primary);
  border-right: 1px solid rgba(245, 166, 35, 0.4);
  padding-right: 12px;
}

/* nodes */
.hw-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}
.hw-node {
  background: rgba(10, 22, 40, 0.65);
  border: 1px solid var(--color-card-border);
  border-radius: 6px;
  padding: 16px 18px;
}
.hw-node.primary {
  border-color: rgba(245, 166, 35, 0.55);
}
.hw-node header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--color-card-border-inner);
}
.hw-node header h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--color-text);
  margin: 0;
  flex: 1;
}
.hw-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(245, 166, 35, 0.4);
  padding: 2px 6px;
  border-radius: 2px;
}
.hw-port {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--color-text-secondary);
  letter-spacing: 1px;
}
.hw-spec {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hw-spec li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-text);
}
.hw-spec label {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.hw-callout {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: var(--color-text-secondary);
  background: rgba(239, 68, 68, 0.08);
  border-left: 2px solid rgba(239, 68, 68, 0.5);
  padding: 10px 14px;
  margin: 12px 0 0;
  border-radius: 0 3px 3px 0;
}
.hw-callout strong { color: #f87171; font-weight: 600; }

/* architecture */
.hw-arch {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.arch-stage {
  flex: 1 1 200px;
  min-width: 200px;
  background: rgba(10, 22, 40, 0.65);
  border: 1px solid var(--color-card-border);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arch-stage[data-tier="edge"]       { border-top: 2px solid #4ade80; }
.arch-stage[data-tier="aggregator"] { border-top: 2px solid #38bdf8; }
.arch-stage[data-tier="ml"]         { border-top: 2px solid var(--color-primary); }
.arch-stage[data-tier="api"]        { border-top: 2px solid #c084fc; }
.stage-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--color-primary);
}
.stage-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--color-text);
}
.stage-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.stage-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--color-primary);
}
.arch-arrow {
  align-self: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: var(--color-primary);
  opacity: 0.6;
  display: flex;
  align-items: center;
}
@media (max-width: 1100px) {
  .arch-arrow { transform: rotate(90deg); margin: -4px 0; }
  .arch-stage { flex: 1 1 100%; }
}

/* crates list */
.hw-crates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 4px 24px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid var(--color-card-border);
  border-radius: 6px;
  padding: 14px 18px;
}
.crate-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(245, 166, 35, 0.05);
  color: var(--color-text-secondary);
}
.crate-row code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-primary);
}

/* live status */
.hw-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  background: rgba(10, 22, 40, 0.65);
  border: 1px solid var(--color-card-border);
  border-radius: 6px;
  padding: 18px 22px;
}
.hw-stat { display: flex; flex-direction: column; gap: 4px; }
.hw-stat label {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.hw-stat span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

/* ---- Header CTA — premium two-line glass card with arrow ---- */
.header-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  color: var(--color-text);
  padding: 11px 20px 11px 22px;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(245,166,35,0.18) 0%, transparent 55%),
    radial-gradient(140% 120% at 100% 100%, rgba(0,216,120,0.08) 0%, transparent 60%),
    linear-gradient(135deg, rgba(20,34,60,0.95) 0%, rgba(8,16,32,0.95) 100%);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(245,166,35,0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(0,0,0,0.45),
    0 18px 50px -16px rgba(0,0,0,0.7),
    0 0 0 1px rgba(245,166,35,0.06);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.header-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,166,35,0.7), transparent);
}
.header-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(60% 100% at 100% 50%, rgba(245,166,35,0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.header-cta .cta-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-text);
}
.header-cta .cta-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.3s ease;
  text-shadow: 0 0 10px rgba(245,166,35,0.5);
  margin-left: 4px;
}
.header-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(245,166,35,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.45),
    0 24px 60px -16px rgba(0,0,0,0.78),
    0 0 28px rgba(245,166,35,0.22);
}
.header-cta:hover::after { opacity: 1; }
.header-cta:hover .cta-arrow { transform: translateX(4px); }
.header-cta:hover .cta-label { color: #ffc869; }
.header-cta:active { transform: translateY(0); }
.header-cta:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 0 3px rgba(245,166,35,0.35);
}
.header-info { display: flex; align-items: center; gap: 12px; }

/* ---- Setup Wizard modal ---- */
.wiz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 13, 26, 0.85);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.wiz-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  background: #0a1628;
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.wiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--color-card-border-inner);
}
.wiz-head-left { display: flex; align-items: baseline; gap: 14px; }
.wiz-step-marker {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--color-primary);
}
.wiz-head h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--color-text);
  margin: 0;
}
.wiz-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.18s ease;
}
.wiz-close:hover { color: var(--color-text); }
.wiz-progress {
  height: 2px;
  background: rgba(245, 166, 35, 0.10);
}
.wiz-progress-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.3s ease;
}
.wiz-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}
.wiz-step { display: flex; flex-direction: column; gap: 14px; }
.wiz-step h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin: 6px 0 -4px;
}
.wiz-lede {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0;
}
.wiz-list {
  margin: 0;
  padding-left: 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}
.wiz-note,
.wiz-hint {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.8;
  margin: 0;
}
.wiz-warn {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: #fbbf77;
  background: rgba(245, 166, 35, 0.08);
  border-left: 2px solid var(--color-primary);
  padding: 8px 12px;
  margin: 0;
  border-radius: 0 3px 3px 0;
}
.wiz-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
}
.wiz-field > span {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.wiz-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(6, 13, 26, 0.6);
  border: 1px solid var(--color-card-border);
  border-radius: 3px;
  color: var(--color-text);
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.18s ease;
  width: 100%;
}
.wiz-input:focus { border-color: var(--color-primary); }
.wiz-row { display: flex; gap: 8px; align-items: stretch; }
.wiz-row .wiz-input { flex: 1; }

.wiz-code {
  position: relative;
  background: #060d1a;
  border: 1px solid var(--color-card-border);
  border-radius: 4px;
}
.wiz-code pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--color-text);
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre;
}
.wiz-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--color-primary);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid var(--color-primary);
  border-radius: 3px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wiz-copy:hover { background: rgba(245, 166, 35, 0.18); color: #ffc869; }
.wiz-code .wiz-copy {
  position: absolute; top: 8px; right: 8px;
}

.wiz-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 8px 12px;
  border: 1px solid var(--color-card-border);
  border-radius: 3px;
  flex: 1;
}
.wiz-status .wiz-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-text-secondary);
  box-shadow: 0 0 0 0 transparent;
}
.wiz-status[data-state="ok"]      { color: #4ade80; border-color: rgba(74, 222, 128, 0.5); }
.wiz-status[data-state="ok"] .wiz-dot      { background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.wiz-status[data-state="fail"]    { color: #f87171; border-color: rgba(239, 68, 68, 0.5); }
.wiz-status[data-state="fail"] .wiz-dot    { background: #f87171; box-shadow: 0 0 10px #f87171; }
.wiz-status[data-state="pending"] { color: var(--color-primary); }
.wiz-status[data-state="pending"] .wiz-dot { background: var(--color-primary); animation: verdict-pulse 1.2s ease-in-out infinite; }

.wiz-launch {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: #0a1628;
  background: var(--color-primary);
  border-radius: 3px;
  text-align: center;
  transition: all 0.18s ease;
}
.wiz-launch:hover { background: #ffb844; }

.wiz-foot {
  display: flex;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--color-card-border-inner);
  background: rgba(6, 13, 26, 0.4);
}
.wiz-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--color-card-border);
  color: var(--color-text-secondary);
  padding: 9px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wiz-btn:not(:disabled):hover { border-color: var(--color-primary); color: var(--color-text); }
.wiz-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.wiz-btn.primary {
  background: var(--color-primary);
  color: #0a1628;
  border-color: var(--color-primary);
}
.wiz-btn.primary:hover { background: #ffb844; border-color: #ffb844; color: #0a1628; }

/* ---- Wizard: stepper rail, what/why box, room sketch ---- */
.wiz-head-right { display: flex; align-items: center; gap: 6px; }
.wiz-reset {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  background: transparent;
  border: 1px solid var(--color-card-border);
  color: var(--color-text-secondary);
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wiz-reset:hover { color: #f87171; border-color: rgba(239, 68, 68, 0.5); }

.wiz-rail {
  display: flex;
  gap: 2px;
  padding: 12px 22px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.wiz-rail::-webkit-scrollbar { display: none; }
.wiz-rail-item {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-card-border-inner);
  padding: 6px 10px 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.wiz-rail-item:hover { border-bottom-color: rgba(245, 166, 35, 0.4); }
.wiz-rail-item.active { border-bottom-color: var(--color-primary); }
.wiz-rail-item.done .wiz-rail-num { color: var(--color-primary); }
.wiz-rail-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
}
.wiz-rail-item.active .wiz-rail-num { color: var(--color-primary); }
.wiz-rail-label {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.wiz-rail-item.active .wiz-rail-label { color: var(--color-text); }

.wiz-ww {
  background: rgba(6, 13, 26, 0.45);
  border: 1px solid var(--color-card-border-inner);
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ww-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: baseline;
}
.ww-row label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--color-primary);
}
.ww-row > span {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
}

/* Room sketch */
.room-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  background: rgba(6, 13, 26, 0.6);
  border: 1px solid var(--color-card-border);
  border-radius: 4px;
  display: block;
  touch-action: none;
}
.room-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.room-pin {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-text);
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--color-card-border-inner);
  padding: 4px 8px;
  border-radius: 3px;
}
.pin-tag {
  background: var(--color-primary);
  color: #0a1628;
  font-weight: 700;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}
.room-verdict {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 3px;
  margin-left: auto;
}
.room-verdict[data-state="ok"]    { color: #4ade80; }
.room-verdict[data-state="ok"] .wiz-dot   { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.room-verdict[data-state="warn"]  { color: var(--color-primary); }
.room-verdict[data-state="warn"] .wiz-dot { background: var(--color-primary); box-shadow: 0 0 8px var(--color-primary); }

/* Wizard step 03 — coverage controls */
.wiz-mode-row { gap: 6px; flex-wrap: wrap; }
.wiz-mode-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid var(--color-card-border);
  color: var(--color-text-secondary);
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wiz-mode-btn:hover { color: var(--color-text); border-color: rgba(245, 166, 35, 0.4); }
.wiz-mode-btn.active {
  color: #0a1628;
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.wiz-model {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  background: rgba(10, 22, 40, 0.45);
  border: 1px solid var(--color-card-border-inner);
  border-radius: 4px;
  padding: 10px 12px;
}
.wiz-model .wiz-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.wiz-model .wiz-field > span {
  font-size: 10px;
  letter-spacing: 1.5px;
}

/* ── Setup-wizard: chat drawer + diagnose + flash list + photo ───────────── */
.wiz-chat-drawer {
  position: absolute;
  right: 12px;
  bottom: 64px;
  width: 320px;
  max-height: 60vh;
  background: rgba(10, 22, 40, 0.96);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  z-index: 4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.wiz-chat-drawer.collapsed { height: 36px; max-height: 36px; overflow: hidden; }
.wiz-chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-bottom: 1px solid rgba(245, 166, 35, 0.25);
}
.wiz-chat-head h4 { margin: 0; font-size: 11px; letter-spacing: 1.5px; color: #f5a623; }
.wiz-chat-toggle {
  background: none; border: none; color: #f5a623; cursor: pointer; font-size: 14px;
}
.wiz-chat-log {
  flex: 1; overflow-y: auto; padding: 8px 10px; font-size: 12px; line-height: 1.5;
  display: flex; flex-direction: column; gap: 6px;
}
.wiz-chat-msg {
  padding: 6px 8px; border-radius: 6px; white-space: pre-wrap; word-break: break-word;
}
.wiz-chat-msg.user      { background: rgba(245, 166, 35, 0.12); color: #f5d18a; align-self: flex-end; max-width: 88%; }
.wiz-chat-msg.assistant { background: rgba(255, 255, 255, 0.05); color: #d8e3f1; align-self: flex-start; max-width: 95%; }
.wiz-chat-form {
  display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(245, 166, 35, 0.25);
}
.wiz-chat-form input { flex: 1; }

.wiz-diagnose {
  margin-top: 8px; padding: 10px 12px;
  border: 1px dashed rgba(245, 166, 35, 0.4);
  border-radius: 6px; font-size: 12px; color: #d8e3f1;
}
.wiz-diagnose:empty { display: none; }
.wiz-diagnose h5 { margin: 8px 0 4px; font-size: 11px; color: #f5a623; letter-spacing: 1px; }

.wiz-report {
  margin-top: 8px; padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 6px; font-size: 12px; color: #d8e3f1;
  white-space: pre-wrap; max-height: 360px; overflow-y: auto;
}
.wiz-report:empty { display: none; }

.wiz-flash-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.wiz-flash-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; background: rgba(255, 255, 255, 0.03);
  border-radius: 6px; cursor: pointer;
}
.wiz-flash-row input[type=checkbox] { accent-color: #f5a623; }

.wiz-photo-btn { cursor: pointer; }

.wiz-room-row {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr 1fr 1.5fr auto;
  gap: 8px;
  align-items: end;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  margin-bottom: 6px;
}
.wiz-room-row .wiz-field { margin: 0; }

/* ── Setup-wizard: full-page premium layout (ui/wizard.html) ─────────────── */
body.wizard-page {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245, 166, 35, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(59, 130, 246, 0.10), transparent 60%),
    #06101e;
  color: #d8e3f1;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
}
.wiz-page {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.wiz-page-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 166, 35, 0.18);
  position: sticky; top: 0; z-index: 5;
}
.wiz-page-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: #f5e2b6;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; letter-spacing: 1.5px; font-size: 14px;
}
.wiz-page-brand em { color: #f5a623; font-style: normal; font-weight: 700; }
.wiz-page-meta {
  display: flex; align-items: center; gap: 18px;
  justify-self: center;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #a4b4c8; letter-spacing: 1px;
}
.wiz-page-customer {
  padding: 4px 10px; border-radius: 999px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.30);
  color: #f5d18a;
}
.wiz-page-step-meta { color: #d8e3f1; }
.wiz-page-step-meta #wiz-page-title { color: #f5a623; font-weight: 600; }
.wiz-page-actions { display: flex; gap: 8px; }
.wiz-page-action {
  background: transparent;
  border: 1px solid rgba(245, 166, 35, 0.35);
  color: #f5d18a;
  padding: 6px 14px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px;
  cursor: pointer; transition: all .15s ease;
}
.wiz-page-action:hover { background: rgba(245, 166, 35, 0.12); }
.wiz-page-action.danger { border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.wiz-page-action.danger:hover { background: rgba(239, 68, 68, 0.10); }

.wiz-page-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 360px;
  gap: 0;
  min-height: 0;
}
.wiz-page-rail {
  border-right: 1px solid rgba(245, 166, 35, 0.12);
  padding: 22px 12px;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(10, 22, 40, 0.4);
}
.wiz-page-rail .wiz-rail-item {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 10px; align-items: center;
  background: transparent; border: 1px solid transparent;
  color: #a4b4c8; text-align: left;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13px;
  transition: all .15s ease;
}
.wiz-page-rail .wiz-rail-item:hover { background: rgba(255,255,255,0.04); color: #f5d18a; }
.wiz-page-rail .wiz-rail-item.active {
  background: linear-gradient(90deg, rgba(245,166,35,0.18), rgba(245,166,35,0.04));
  border-color: rgba(245,166,35,0.45);
  color: #f5e2b6;
}
.wiz-page-rail .wiz-rail-item.done .wiz-rail-num { color: #4ade80; }
.wiz-page-rail .wiz-rail-num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px;
  color: #f5a623; opacity: .85;
}
.wiz-page-rail .wiz-rail-label { font-weight: 500; }

.wiz-page-main {
  display: flex; flex-direction: column;
  padding: 0 32px 24px;
  min-width: 0;
}
.wiz-page-progress {
  height: 3px; background: rgba(255,255,255,0.05);
  margin: 14px -32px 28px; border-radius: 0;
}
.wiz-page-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #f5a623, #f5d18a);
  width: 0%; transition: width .3s ease;
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.5);
}
.wiz-page-step {
  flex: 1;
  max-width: 880px; width: 100%;
  margin: 0 auto;
  padding-bottom: 28px;
}
.wiz-page-step h4 {
  margin: 28px 0 10px; font-size: 13px; letter-spacing: 2px;
  color: #f5a623; text-transform: uppercase; font-weight: 600;
}
.wiz-page-step h5 {
  margin: 14px 0 6px; font-size: 11px; letter-spacing: 1.5px;
  color: #f5d18a; text-transform: uppercase;
}
.wiz-page-step p, .wiz-page-step .wiz-lede { line-height: 1.7; color: #c9d4e3; }
.wiz-page-step .wiz-lede { font-size: 16px; color: #e3edfa; }
.wiz-page-step .wiz-input {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(245, 166, 35, 0.25);
  color: #e3edfa;
  padding: 10px 12px; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  width: 100%; box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wiz-page-step .wiz-input:focus {
  outline: none;
  border-color: #f5a623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}
.wiz-page-step .wiz-field {
  display: grid; grid-template-columns: 180px 1fr; gap: 14px;
  align-items: center; margin: 8px 0;
}
.wiz-page-step .wiz-field > span {
  font-size: 11px; letter-spacing: 1.5px; color: #a4b4c8;
  text-transform: uppercase;
}
.wiz-page-step .wiz-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.wiz-page-step .wiz-copy {
  background: transparent;
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #f5d18a;
  padding: 8px 14px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px;
  cursor: pointer; transition: all .15s ease;
}
.wiz-page-step .wiz-copy:hover { background: rgba(245,166,35,0.12); }
.wiz-page-step .wiz-code {
  position: relative; margin: 12px 0;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(245,166,35,0.20);
  border-radius: 8px; padding: 14px 16px;
}
.wiz-page-step .wiz-code pre {
  margin: 0; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #e3edfa; white-space: pre-wrap; word-break: break-word;
}
.wiz-page-step .wiz-code .wiz-copy { position: absolute; top: 8px; right: 8px; }
.wiz-page-step .room-svg {
  width: 100%; height: auto; max-height: 460px;
  background: rgba(0,0,0,0.25); border-radius: 8px;
  border: 1px solid rgba(245,166,35,0.15);
  margin: 8px 0;
}
.wiz-page-step .wiz-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px;
}
.wiz-page-step .wiz-status[data-state=ok]      { border-color: rgba(74,222,128,0.5);  color: #4ade80; }
.wiz-page-step .wiz-status[data-state=fail]    { border-color: rgba(239,68,68,0.5);   color: #f87171; }
.wiz-page-step .wiz-status[data-state=pending] { border-color: rgba(245,166,35,0.5);  color: #f5d18a; }
.wiz-page-step .wiz-dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .8;
}
.wiz-page-step .wiz-launch {
  display: inline-block; margin-top: 18px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #f5a623, #d97706);
  color: #0a1628; text-decoration: none; font-weight: 700;
  border-radius: 8px; letter-spacing: 1.5px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  box-shadow: 0 4px 18px rgba(245,166,35,0.3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.wiz-page-step .wiz-launch:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(245,166,35,0.45); }
.wiz-page-step .wiz-warn {
  border-left: 3px solid #f59e0b; padding: 8px 14px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 0 6px 6px 0; color: #fde68a;
  margin: 10px 0; font-size: 13px;
}
.wiz-page-step .wiz-hint { color: #94a3b8; font-size: 12px; margin: 6px 0; }
.wiz-page-step .wiz-list { color: #c9d4e3; line-height: 1.8; padding-left: 22px; }
.wiz-page-step .wiz-ww {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(245,166,35,0.18);
  border-radius: 8px; padding: 14px 18px; margin: 14px 0;
}
.wiz-page-step .ww-row {
  display: grid; grid-template-columns: 90px 1fr; gap: 14px;
  align-items: baseline; margin: 6px 0;
}
.wiz-page-step .ww-row label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 2px;
  color: #f5a623; text-transform: uppercase;
}
.wiz-page-step .ww-row span { color: #d8e3f1; line-height: 1.6; }

.wiz-page-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0 0; margin-top: 18px;
  border-top: 1px solid rgba(245,166,35,0.12);
}
.wiz-page-foot .wiz-btn {
  background: transparent;
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #f5d18a;
  padding: 12px 22px; border-radius: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 1.5px;
  cursor: pointer; transition: all .15s ease;
}
.wiz-page-foot .wiz-btn:hover:not(:disabled) { background: rgba(245,166,35,0.12); }
.wiz-page-foot .wiz-btn:disabled { opacity: .35; cursor: not-allowed; }
.wiz-page-foot .wiz-btn.primary {
  background: linear-gradient(135deg, #f5a623, #d97706);
  color: #0a1628; border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 14px rgba(245,166,35,0.3);
}
.wiz-page-foot .wiz-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(245,166,35,0.45); }

/* Right-column chat drawer in page mode (override the absolute modal positioning) */
.wiz-page-chat {
  border-left: 1px solid rgba(245, 166, 35, 0.12);
  background: rgba(10, 22, 40, 0.55);
  display: flex; flex-direction: column;
  min-height: 0;
}
.wiz-page-chat .wiz-chat-drawer {
  position: static;
  width: 100%; max-height: none; height: 100%;
  border: none; border-radius: 0;
  box-shadow: none; background: transparent;
}
.wiz-page-chat .wiz-chat-head {
  border-bottom: 1px solid rgba(245, 166, 35, 0.18);
  padding: 14px 18px;
}
.wiz-page-chat .wiz-chat-head h4 {
  font-size: 12px; letter-spacing: 2px;
}
.wiz-page-chat .wiz-chat-toggle { display: none; }
.wiz-page-chat .wiz-chat-log { padding: 14px 18px; }
.wiz-page-chat .wiz-chat-form { padding: 12px 14px; }

@media (max-width: 1100px) {
  .wiz-page-body { grid-template-columns: 220px 1fr 320px; }
}
@media (max-width: 900px) {
  .wiz-page-body { grid-template-columns: 1fr; }
  .wiz-page-rail {
    flex-direction: row; overflow-x: auto;
    border-right: none; border-bottom: 1px solid rgba(245,166,35,0.12);
    padding: 12px;
  }
  .wiz-page-rail .wiz-rail-item { flex: 0 0 auto; }
  .wiz-page-chat { border-left: none; border-top: 1px solid rgba(245,166,35,0.12); height: 320px; }
  .wiz-page-meta { display: none; }
}

/* ====== Fleet Tab — ESP32-S3 Node Status ====== */

.fleet-summary {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  margin-bottom: 16px;
}
.fleet-stat {
  display: flex; flex-direction: column; align-items: center;
  min-width: 80px; flex: 1;
}
.fleet-stat-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-2xl); font-weight: 700;
  color: var(--color-text);
}
.fleet-stat-value.fleet-active { color: var(--color-success); }
.fleet-stat-value.fleet-warning { color: var(--color-warning); }
.fleet-stat-value.fleet-error { color: var(--color-error); }
.fleet-stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
}

.fleet-relay-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  padding: 10px 16px;
  background: var(--color-secondary);
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}
.fleet-relay-bar strong {
  font-family: var(--font-family-mono);
  color: var(--color-text);
}

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: auto;
}
.status-dot.active { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.status-dot.warning { background: var(--color-warning); }
.status-dot.error { background: var(--color-error); }
.status-dot.offline { background: var(--color-text-secondary); }

.fleet-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.fleet-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
  border: 2px dashed var(--color-border);
  border-radius: 8px;
}
.fleet-empty code {
  font-family: var(--font-family-mono);
  background: var(--color-secondary);
  padding: 2px 6px; border-radius: 3px;
}

.fleet-node-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s;
}
.fleet-node-card[data-state="active"] { border-left: 3px solid var(--color-success); }
.fleet-node-card[data-state="unhealthy"] { border-left: 3px solid var(--color-warning); }
.fleet-node-card[data-state="lost"] { border-left: 3px solid var(--color-error); }

.fleet-node-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.fleet-node-id {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg); font-weight: 700;
}
.fleet-node-badge {
  font-size: var(--font-size-xs);
  padding: 2px 8px; border-radius: 10px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.fleet-node-badge.active {
  background: rgba(var(--color-success-rgb), var(--status-bg-opacity));
  color: var(--color-success);
}
.fleet-node-badge.unhealthy {
  background: rgba(var(--color-warning-rgb), var(--status-bg-opacity));
  color: var(--color-warning);
}
.fleet-node-badge.lost {
  background: rgba(var(--color-error-rgb), var(--status-bg-opacity));
  color: var(--color-error);
}

.fleet-node-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.fleet-node-stats dt {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.fleet-node-stats dd {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  margin: 0;
}

.fleet-frame-types {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  padding: 16px 20px;
}
.fleet-frame-types h3 {
  font-size: var(--font-size-base);
  margin: 0 0 12px;
}
.frame-type-grid {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.frame-type {
  display: flex; flex-direction: column; align-items: center;
  min-width: 80px; flex: 1;
  padding: 8px;
  background: var(--color-secondary);
  border-radius: 6px;
}
.ft-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.ft-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg); font-weight: 600;
}

/* ====== Calibrate Tab — People Counting Test ====== */

.cal-controls {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
}
.cal-input-group { display: flex; flex-direction: column; gap: 6px; }
.cal-input-group label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}
.cal-stepper {
  display: flex; align-items: center; gap: 0;
}
.cal-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 18px; font-weight: 700;
  cursor: pointer; color: var(--color-text);
  transition: background 0.15s;
}
.cal-btn:hover { background: var(--color-secondary); }
.cal-btn:first-child { border-radius: 6px 0 0 6px; }
.cal-btn:last-child { border-radius: 0 6px 6px 0; }
#cal-actual {
  width: 60px; height: 36px; text-align: center;
  border: 1px solid var(--color-border);
  border-left: none; border-right: none;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg); font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
}
.cal-start-btn, .cal-stop-btn {
  padding: 8px 24px; border-radius: 6px;
  border: none; font-weight: 600; cursor: pointer;
  font-size: var(--font-size-base);
  transition: background 0.15s;
}
.cal-start-btn {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}
.cal-start-btn:hover { background: var(--color-primary-hover); }
.cal-stop-btn {
  background: var(--color-error);
  color: white;
}

.cal-comparison {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.cal-side {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  min-width: 140px;
}
.cal-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.cal-big-number {
  font-family: var(--font-family-mono);
  font-size: 48px; font-weight: 800;
  line-height: 1;
}
.cal-actual-side .cal-big-number { color: var(--color-primary); }
.cal-detected-side .cal-big-number { color: var(--color-text); }
.cal-accuracy-side .cal-big-number[data-match="true"] { color: var(--color-success); }
.cal-accuracy-side .cal-big-number[data-match="false"] { color: var(--color-error); }
.cal-accuracy-side .cal-big-number[data-match="close"] { color: var(--color-warning); }
.cal-sub {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: 4px;
}
.cal-vs {
  font-size: var(--font-size-xl);
  font-weight: 300;
  color: var(--color-text-secondary);
}

.cal-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.cal-detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}
.cal-detail-card h4 {
  font-size: var(--font-size-xs);
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  margin: 0 0 6px;
}
.cal-detail-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg); font-weight: 600;
}

.cal-log {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  padding: 16px 20px;
}
.cal-log h3 { margin: 0 0 12px; font-size: var(--font-size-base); }
.cal-log-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.cal-log-table th, .cal-log-table td {
  padding: 6px 12px; text-align: center;
  border-bottom: 1px solid var(--color-card-border);
}
.cal-log-table th {
  font-size: var(--font-size-xs);
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-text-secondary);
}
.cal-log-table td { font-family: var(--font-family-mono); }
.cal-log-summary {
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--color-secondary);
  border-radius: 6px;
  font-size: var(--font-size-sm);
}


/* ============================================================
   OPTARIS Console — premium polish pass (2026-05-18)
   Subtle Apple/Google-esque refinements; no structural changes,
   only typography rhythm + micro-animation tightening.
   ============================================================ */

/* Header — gentle ambient glow under the brand line so the
   wordmark feels lifted from the page surface. */
.header {
  position: relative;
  isolation: isolate;
}
.header::before {
  content: '';
  position: absolute;
  inset: -20% -20% 60% -20%;
  z-index: -1;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(245, 166, 35, 0.05) 0%, transparent 70%),
    radial-gradient(50% 60% at 80% 20%, rgba(40, 144, 220, 0.04) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Subtitle — refined kerning, gentle fade-in on load. */
.subtitle {
  animation: subtitle-rise 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes subtitle-rise {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 0.85; transform: translateY(0); }
}

/* Nav-tabs row — frosted backdrop strip + smoother active glow.
   Tabs themselves keep the numbered '01 · DASHBOARD' editorial
   treatment; just the row chrome is polished. */
.nav-tabs {
  position: relative;
  padding-bottom: 2px;
}
.nav-tabs::before {
  content: '';
  position: absolute;
  inset: 0 -20px -1px -20px;
  background: linear-gradient(180deg,
    rgba(10, 22, 40, 0.0) 0%,
    rgba(10, 22, 40, 0.35) 70%,
    rgba(10, 22, 40, 0.55) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Tab hover — slight letter-spacing breath + colour lift.
   Matches Apple's preference for restrained micro-motion. */
.nav-tab {
  transition: color 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
              letter-spacing 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-tab:hover {
  letter-spacing: 2.4px;
}

/* Active tab underline — softer gradient with a soft glow underneath. */
.nav-tab.active::after {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(245, 166, 35, 0.7) 18%,
    #f5a623 50%,
    rgba(245, 166, 35, 0.7) 82%,
    transparent 100%);
  box-shadow: 0 1px 6px rgba(245, 166, 35, 0.45);
}

/* Hover indicator (preview line for non-active tabs). */
.nav-tab:not(.active):hover::after {
  transform: scaleX(0.4);
  background-color: rgba(245, 166, 35, 0.5);
}

/* Sticky nav — keeps the page selector reachable as the user
   scrolls the dashboard. Backdrop blur layered cleanly above the
   content. */
.nav-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg,
    rgba(6, 13, 26, 0.82) 0%,
    rgba(6, 13, 26, 0.55) 100%);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

/* Hairline at the bottom of the nav fades softly toward the
   centre — a touch Apple-like. */
.nav-tabs {
  border-bottom-color: transparent;
}
.nav-tabs::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(245, 166, 35, 0.18) 30%,
    rgba(245, 166, 35, 0.18) 70%,
    transparent 100%);
  pointer-events: none;
}

/* ============================================================
   Homepage redesign — premium dashboard (2026-05-21)
   Appended last so it wins the cascade. Reuses existing tokens.
   ============================================================ */

/* Header → top bar: brand left, Wizard pinned top-right */
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.header-brand { min-width: 0; }
.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 6px;
}

/* Wizard button — subtle premium glass (outline, amber accent) */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: rgba(245, 166, 35, 0.92);
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.28);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .2s, border-color .2s, color .2s;
}
.header-cta .cta-icon { opacity: 0.85; }
.header-cta .cta-arrow { font-size: 14px; transition: transform .2s; opacity: 0.6; }
.header-cta:hover {
  transform: translateY(-1px);
  color: #ffc869;
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 8px 22px -12px rgba(245,166,35,0.5);
}
.header-cta:hover .cta-arrow { transform: translateX(3px); opacity: 1; }
.header-cta:active { transform: translateY(0); }

/* Live sensor status chip */
.sensor-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 11px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600; letter-spacing: 1.2px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(148,163,184,0.06);
  color: var(--color-text-secondary);
}
.sensor-chip .sensor-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sensor-chip .sensor-count { color: var(--color-text); opacity: 0.85; }
.sensor-chip[data-live="1"] {
  color: #3eff8a; border-color: rgba(0,216,120,0.4); background: rgba(0,216,120,0.08);
}
.sensor-chip[data-live="1"] .sensor-dot { box-shadow: 0 0 8px #3eff8a; animation: verdict-pulse 2.2s ease-in-out infinite; }

/* ── Hero band ─────────────────────────────────────────────── */
.hero-band {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 34px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(245, 166, 35, 0.16);
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(245,166,35,0.10), transparent 52%),
    radial-gradient(120% 160% at 100% 100%, rgba(32,144,255,0.08), transparent 55%),
    linear-gradient(180deg, rgba(13,27,48,0.72), rgba(8,16,30,0.55));
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 30px 70px -40px rgba(0,0,0,0.9);
}
/* slow animated sheen */
.hero-band::after {
  content: '';
  position: absolute;
  top: -60%; left: -30%;
  width: 60%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.045), transparent);
  transform: rotate(8deg);
  animation: hero-sheen 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hero-sheen {
  0%, 100% { transform: translateX(-20%) rotate(8deg); opacity: 0; }
  45% { opacity: 1; }
  60% { transform: translateX(280%) rotate(8deg); opacity: 0; }
}
.hero-copy { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: 5px 12px;
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 999px;
  background: rgba(245,166,35,0.07);
  margin-bottom: 18px;
}
.hero-title {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
  color: #f3f7ee;
}
.hero-title span {
  background: linear-gradient(95deg, #ffd479, #f5a623 55%, #ffb347);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-lede {
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 50ch;
  margin: 0 0 24px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-launch {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.4px; text-decoration: none;
  color: #1a1205;
  background: linear-gradient(180deg, #ffd479, #f5a623 65%, #e0920f);
  border: 1px solid rgba(245,166,35,0.6);
  box-shadow: 0 10px 26px -12px rgba(245,166,35,0.7);
  transition: transform .18s, box-shadow .25s, filter .2s;
}
.hero-launch .hl-arrow { transition: transform .2s; }
.hero-launch:hover { transform: translateY(-2px); filter: brightness(1.05); }
.hero-launch:hover .hl-arrow { transform: translateX(4px); }
.hero-launch.ghost {
  color: var(--color-text);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(245,166,35,0.28);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}
.hero-launch.ghost:hover { background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.5); }

/* quick-launch cards */
.hero-quick {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.quick-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 16px 15px; border-radius: 14px; text-decoration: none;
  background: rgba(10,20,38,0.55);
  border: 1px solid rgba(245,166,35,0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
  transition: transform .2s, border-color .25s, background .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.quick-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background: radial-gradient(90% 70% at 0% 0%, var(--qc-glow, rgba(245,166,35,0.12)), transparent 60%);
}
.quick-card[data-accent="amber"]  { --qc-glow: rgba(245,166,35,0.16); --qc: #f5a623; }
.quick-card[data-accent="blue"]   { --qc-glow: rgba(32,144,255,0.16);  --qc: #4aa3ff; }
.quick-card[data-accent="green"]  { --qc-glow: rgba(0,216,120,0.16);   --qc: #3eff8a; }
.quick-card[data-accent="violet"] { --qc-glow: rgba(160,120,255,0.16);  --qc: #b79bff; }
.quick-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--qc) 45%, transparent);
  background: rgba(14,26,46,0.8);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.85);
}
.qc-icon { font-size: 20px; color: var(--qc, var(--color-primary)); line-height: 1; filter: drop-shadow(0 0 8px var(--qc-glow)); }
.qc-title { font-size: 13.5px; font-weight: 600; color: var(--color-text); margin-top: 8px; }
.qc-sub { font-size: 11.5px; font-weight: 300; color: var(--color-text-secondary); line-height: 1.4; }

/* ── Enhanced readiness command bar ───────────────────────── */
.demo-readiness {
  border-radius: 16px !important;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 24px 60px -36px rgba(0,0,0,0.85) !important;
}
.readiness-verdict { font-size: 20px !important; }
.readiness-verdict[data-state="idle"] { color: #94a3b8 !important; }
.r-item {
  border-radius: 12px;
  padding: 12px 18px !important;
  margin: 0 4px;
  border-left: none !important;
  background: rgba(10,20,38,0.4);
  border: 1px solid rgba(245,166,35,0.08) !important;
  transition: border-color .25s, background .25s, transform .2s;
}
.r-item:hover { transform: translateY(-2px); border-color: rgba(245,166,35,0.28) !important; background: rgba(14,26,46,0.7); }
.r-item span { font-size: 20px !important; }
.readiness-grid { gap: 8px !important; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-band { grid-template-columns: 1fr; gap: 22px; padding: 26px 22px; }
  .hero-title { font-size: 30px; }
  .header { flex-direction: column; }
  .header-info { padding-top: 0; }
}
@media (max-width: 560px) {
  .hero-quick { grid-template-columns: 1fr; }
}

/* ============================================================
   Nav menu polish (2026-05-21) — kill the hover "jump", add a
   stable premium pill. Appended last so it wins the cascade.
   ============================================================ */
.nav-tabs {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 0 4px;
  align-items: center;
}
/* Stable hover/active: animate only colour + background, never metrics.
   letter-spacing is pinned so tab width never changes → no reflow jump. */
.nav-tab {
  letter-spacing: 2px !important;
  padding: 11px 15px !important;
  border-radius: 10px;
  white-space: nowrap;
  transition: color 200ms cubic-bezier(.2,.8,.2,1),
              background-color 200ms cubic-bezier(.2,.8,.2,1) !important;
}
.nav-tab:hover {
  letter-spacing: 2px !important;
  color: var(--color-text);
  background: rgba(245, 166, 35, 0.07);
}
.nav-tab.active {
  color: var(--color-primary);
  background: rgba(245, 166, 35, 0.10);
}
/* Underline indicator hugs the rounded pill */
.nav-tab::after,
.nav-tab.active::after,
.nav-tab:not(.active):hover::after {
  left: 12px !important;
  right: 12px !important;
  bottom: 0 !important;
}
/* Anchor tabs (People & Sensing, Observatory, etc.) sit identically to
   button tabs — kill any inline opacity dimming flicker. */
.nav-tabs a.nav-tab { opacity: 1 !important; display: inline-flex; align-items: center; }
.nav-tab:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }

/* Dashboard cards — equal height + bottom-aligned actions (2026-05-21) */
.demo-cards .demo-card { display: flex; flex-direction: column; }
.demo-card .card-actions { margin-top: auto; padding-top: 18px; }
.demo-card .card-insight { min-height: 20px; }
.demo-card .card-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
#card-activity .card-meta { grid-template-columns: repeat(2, 1fr); }

/* ============================================================
   Buttons → pill, smaller dashboard cards + compact row (2026-05-21)
   ============================================================ */
/* All primary buttons rounded like the NO SIGNAL chip (full pill) */
.header-cta, .hero-launch { border-radius: 999px !important; }

/* Shrink the two main dashboard cards */
.demo-cards { gap: 18px; }
.demo-card { padding: 24px 26px 22px !important; gap: 18px !important; border-radius: 16px !important; }
.demo-card .card-title { font-size: 18px; }
.demo-card .kpi-value { font-size: 40px; }

/* Compact cards (row 2) — smaller still */
.demo-card--compact { padding: 20px 22px 18px !important; gap: 14px !important; }
.demo-card--compact .kpi-value { font-size: 30px; }
.demo-card--compact .card-title { font-size: 15px; }
.demo-card--compact .card-primary { gap: 28px; }

/* Action buttons sit on a consistent bottom line, aligned horizontally */
.demo-card .card-actions { margin-top: auto; padding-top: 16px; justify-content: flex-start; }

/* ============================================================
   Polish pass v6 (2026-05-21): unified status pills, premium
   menu, efficient compact cards. Appended last → wins cascade.
   ============================================================ */

/* ── Unified status pill — identical everywhere ──────────────
   Card status, header sensor chip, readiness source all share
   one look: muted when no signal, green pulse when live. */
.card-status,
.sensor-chip,
.readiness-source {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 1.6px !important;
  text-transform: uppercase;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 7px !important;
  border: 1px solid rgba(148,163,184,0.3) !important;
  background: rgba(148,163,184,0.08) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}
.sensor-chip .sensor-count { color: #cdd6e3; opacity: .8; letter-spacing: 1px; }
/* dot */
.card-status::before,
.sensor-chip .sensor-dot,
.readiness-source::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; box-shadow: none; animation: none;
  flex-shrink: 0;
}
.readiness-source::before { display: inline-block; margin-right: 1px; }
/* LIVE state — green + gentle pulse, everywhere */
.demo-card[data-state="live"] .card-status,
.sensor-chip[data-live="1"],
.readiness-source[data-live="1"] {
  color: #4ade80 !important;
  border-color: rgba(74,222,128,0.45) !important;
  background: rgba(74,222,128,0.10) !important;
}
.demo-card[data-state="live"] .card-status::before,
.sensor-chip[data-live="1"] .sensor-dot,
.readiness-source[data-live="1"]::before {
  box-shadow: 0 0 8px #4ade80; animation: status-pulse 2s ease-in-out infinite;
}
/* scanning = amber-ish (sensors up, no presence) */
.demo-card[data-state="scanning"] .card-status {
  color: var(--color-primary) !important;
  border-color: rgba(245,166,35,0.4) !important;
  background: rgba(245,166,35,0.08) !important;
}

/* ── Compact uniform dashboard cards ────────────────────────── */
.demo-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.demo-card {
  padding: 20px 22px !important;
  gap: 18px !important;
  border-radius: 16px !important;
  border-color: rgba(245,166,35,0.16) !important;
}
.demo-card .card-head { margin: 0; padding: 0 0 14px; border-bottom: 1px solid rgba(245,166,35,0.10); }
.demo-card .card-head::after { display: none !important; }
.demo-card .card-title { font-size: 15px !important; font-weight: 500; letter-spacing: 0.3px; }
.demo-card .card-num { display: none; }
.demo-card .card-primary { display: grid !important; grid-template-columns: 1fr 1fr; gap: 20px; }
.demo-card .kpi-value { font-size: 34px !important; font-weight: 300; letter-spacing: -1px; line-height: 1; }
.demo-card .kpi-label { margin-top: 8px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--color-text-secondary); }
.demo-card .card-meta {
  display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px 20px;
  margin: 0; padding-top: 14px; border-top: 1px solid rgba(245,166,35,0.08);
}
.demo-card .card-meta label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-text-secondary); display: block; margin-bottom: 3px; }
.demo-card .card-meta strong { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 500; color: var(--color-text); }
.kpi-conf-bar { margin-top: 10px; }

/* ── Premium menu — Apple / Google-esque (2026-05-21g) ─────────────
   Single glassy scroll-rail. 13 destinations live in one horizontally
   scrollable row that never clips: subtle edge fades cue overflow, the
   scrollbar is hidden, and the active tab is a soft amber-inset pill.
   The atrium switcher (page-switcher --nav-inline) is normalised to read
   as just another pill in this same row.
   NB: never animate metrics (padding / letter-spacing / width) on hover —
   a past bug grew tab width by animating letter-spacing. Only colour,
   background and box-shadow transition here. */

/* ── Console menu — clean Material/Google aesthetic (2026-05-21i) ───
   Flat tab bar on a hairline divider. Items are quiet text; selected is
   a filled amber pill. The row scrolls when it must, and edge fades are
   OVERFLOW-AWARE (toggled by app.js): a side only fades when content is
   actually hidden there — so at full width nothing looks dimmed.
   Never animate metrics (width/padding/letter-spacing) — colour/bg only. */

.nav-tab::before { content: none !important; }   /* drop legacy "01 ·" counters */

.nav-tabs {
  position: relative;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 2px !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding: 6px 4px !important;
  margin-bottom: 24px;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.nav-tabs::-webkit-scrollbar { display: none; }
/* Overflow-aware edge fades — classes set by app.js (updateNavFades). */
.nav-tabs.fade-left {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px);
}
.nav-tabs.fade-right {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
}
.nav-tabs.fade-left.fade-right {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

/* Every clickable nav item shares one pill shape. */
.nav-tab,
.atrium-switcher--nav-inline .atrium-switcher__trigger {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 9px 16px !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.1px !important;
  line-height: 1 !important;
  text-transform: none !important;
  text-decoration: none !important;
  color: rgba(226,232,240,0.62) !important;
  background: transparent !important;
  cursor: pointer;
  opacity: 1 !important;
  will-change: background-color, color;
  transition:
    color .2s ease,
    background-color .2s ease !important;
}
.nav-tab:hover,
.atrium-switcher--nav-inline .atrium-switcher__trigger:hover {
  color: #f1f5f9 !important;
  background: rgba(255,255,255,0.055) !important;
}
/* Selected = clean subtle amber-tint pill, amber text */
.nav-tab.active,
.atrium-switcher--nav-inline.is-current-route .atrium-switcher__trigger {
  color: #f5a623 !important;
  font-weight: 600 !important;
  background: rgba(245,166,35,0.12) !important;
  box-shadow: none !important;
}
.nav-tab:focus-visible,
.atrium-switcher--nav-inline .atrium-switcher__trigger:focus-visible {
  outline: 2px solid var(--color-focus-ring, #f5a623);
  outline-offset: 2px;
}
.nav-tab::after,
.nav-tab.active::after,
.nav-tab:not(.active):hover::after { display: none !important; }
.nav-tabs::before, .nav-tabs::after { display: none !important; }
.nav-tab[hidden] { display: none !important; }

/* ── Atrium switcher normalisation (overrides page-switcher.css) ──── */
.atrium-switcher--nav-inline { counter-increment: none !important; }
.atrium-switcher--nav-inline .atrium-switcher__trigger::before { content: none !important; }
.atrium-switcher--nav-inline .atrium-switcher__trigger::after { display: none !important; }
.atrium-switcher--nav-inline .atrium-switcher__label { font: inherit; letter-spacing: inherit; text-transform: none; }
.atrium-switcher--nav-inline .atrium-switcher__trigger svg {
  width: 9px; height: 6px; opacity: 0.5;
  transition: transform .2s ease, opacity .16s ease;
}
.atrium-switcher--nav-inline .atrium-switcher__trigger:hover svg { opacity: 0.85; }
.atrium-switcher--nav-inline.is-current-route .atrium-switcher__trigger svg { opacity: 0.8; }
.atrium-switcher--nav-inline .atrium-switcher__trigger[aria-expanded='true'] svg { transform: rotate(180deg); opacity: 1; }
#atrium-switcher-mount { flex: 0 0 auto; display: inline-flex; align-items: center; }

/* ============================================================
   optaris-website design language (2026-05-21j)
   Hamburger → fullscreen overlay menu + sharp amber mono buttons.
   Tokens mirror optaris-website: navy-900 #0a1628, amber-500 #f5a623,
   ink-50 #f1f5f9 / ink-300 #94a3b8 / ink-500 #475569.
   ============================================================ */

/* Retire the tab strip (kept in DOM for TabManager wiring) */
.nav-tabs.is-hidden { display: none !important; }

/* Hamburger trigger — 3 amber hairlines, like the website */
.menu-trigger {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 40px; height: 38px; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; padding: 0;
}
.menu-trigger span {
  display: block; width: 22px; height: 1px;
  background: rgba(245,166,35,0.8); transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
}
.menu-trigger:hover span { background: #f5a623; }

/* ── Buttons → rounded glassy modern premium ─────────────────── */
.header-cta, .hero-launch, .btn-launch {
  display: inline-flex !important; align-items: center; gap: 9px;
  border-radius: 999px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13.5px !important; font-weight: 600 !important;
  letter-spacing: 0.3px !important; text-transform: none !important;
  text-decoration: none !important; cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, border-color .25s, color .2s !important;
}
/* primary (hero primary) — amber glass with glow */
.hero-launch:not(.ghost) {
  padding: 13px 22px !important;
  color: #1a1205 !important;
  background: linear-gradient(180deg, #ffd479, #f5a623 62%, #ec9c14) !important;
  border: 1px solid rgba(245,166,35,0.65) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 12px 30px -12px rgba(245,166,35,0.7) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.hero-launch:not(.ghost):hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 18px 38px -14px rgba(245,166,35,0.8) !important;
}
.cta-dot { width: 6px; height: 6px; border-radius: 50%; background: #f5a623; flex-shrink: 0; box-shadow: 0 0 8px rgba(245,166,35,0.7); animation: status-pulse 2s ease-in-out infinite; }
.header-cta .cta-arrow, .hero-launch .hl-arrow { transition: transform .2s ease; }
.header-cta:hover .cta-arrow, .hero-launch:hover .hl-arrow { transform: translateX(3px); }
/* secondary / ghost / Wizard — frosted glass pill */
.header-cta, .hero-launch.ghost, .btn-launch {
  padding: 13px 22px !important;
  color: #e2e8f0 !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(245,166,35,0.28) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset !important;
}
.btn-launch { padding: 11px 18px !important; font-size: 13px !important; color: #ffc869 !important; }
.header-cta { padding: 10px 18px !important; font-size: 13px !important; color: #ffc869 !important; }
.header-cta:hover, .hero-launch.ghost:hover, .btn-launch:hover {
  transform: translateY(-2px);
  border-color: rgba(245,166,35,0.55) !important; color: #ffd27a !important;
  background: rgba(245,166,35,0.10) !important;
}

/* Secondary / technical nav tabs — quieter; divider before them */
.nav-sep { flex: 0 0 auto; width: 1px; height: 18px; margin: 0 8px; background: rgba(245,166,35,0.18); }
.nav-tab.nav-tab--sec { font-size: 12px !important; color: rgba(226,232,240,0.42) !important; }
.nav-tab.nav-tab--sec:hover { color: rgba(241,245,249,0.85) !important; }

/* ── Atrium flagship quick-card — royal presence ─────────────── */
.hero-quick { grid-template-columns: repeat(2, 1fr) !important; }
@media (max-width: 640px) {
  .hero-quick { grid-template-columns: 1fr !important; }
}
.quick-card--feature {
  grid-column: 1 / -1;
  padding: 22px 24px !important;
  border: 1px solid rgba(245,166,35,0.4) !important;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(245,166,35,0.18), transparent 55%),
    radial-gradient(120% 160% at 100% 100%, rgba(32,144,255,0.10), transparent 60%),
    rgba(12,24,44,0.7) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 24px 60px -28px rgba(245,166,35,0.45) !important;
  position: relative; overflow: hidden;
}
.quick-card--feature .qc-title { font-size: 22px !important; font-weight: 600; color: #fff; }
.quick-card--feature .qc-sub { font-size: 13px; max-width: 42ch; }
.quick-card--feature .qc-icon { font-size: 26px; }
.qc-badge {
  position: absolute; top: 16px; right: 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: #1a1205; background: linear-gradient(180deg,#ffd479,#f5a623); padding: 4px 10px; border-radius: 999px; font-weight: 700;
}
.qc-cta {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 13px; font-weight: 600; color: #ffc869;
}
.quick-card--feature:hover .qc-cta span { transform: translateX(3px); display: inline-block; transition: transform .2s ease; }

/* ── Fullscreen overlay menu ─────────────────────────────────── */
.ov-menu {
  position: fixed; inset: 0; z-index: 200;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease-crisp, ease), visibility .3s;
}
.ov-menu[hidden] { display: block; }     /* override UA hidden; we animate */
.ov-menu.open { opacity: 1; visibility: visible; }
.ov-scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: default;
  background: rgba(6,13,26,0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ov-panel {
  position: relative; height: 100%; display: flex; flex-direction: column;
  max-width: 1100px; margin: 0 auto; padding: 0 28px;
  transform: translateY(10px); transition: transform .35s var(--ease-crisp, cubic-bezier(.16,1,.3,1));
}
.ov-menu.open .ov-panel { transform: translateY(0); }
.ov-top { display: flex; align-items: center; justify-content: space-between; padding: 30px 4px; }
.ov-word { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 6px; color: #f5a623; }
.ov-close { background: transparent; border: 0; cursor: pointer; width: 36px; height: 36px; position: relative; }
.ov-close span { position: absolute; top: 50%; left: 50%; width: 22px; height: 1px; background: #f5a623; }
.ov-close span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); }
.ov-close span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); }
.ov-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 760px; width: 100%; margin: 0 auto; }
.ov-group-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: #64748b;
}
.ov-group-head .ov-mark { color: #f5a623; }
.ov-group-head .ov-rule { width: 32px; height: 1px; background: rgba(245,166,35,0.4); }
.ov-list { list-style: none; margin: 0 0 44px; padding: 0; }
.ov-list a {
  display: flex; align-items: baseline; gap: 22px; padding: 14px 2px; text-decoration: none;
  border-bottom: 1px solid rgba(245,166,35,0.1); transition: border-color .25s ease;
}
.ov-list a:hover { border-color: rgba(245,166,35,0.4); }
.ov-idx { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 3px; color: rgba(245,166,35,0.6); width: 26px; flex-shrink: 0; }
.ov-label { font-family: 'Inter', sans-serif; font-weight: 300; font-size: clamp(26px, 4vw, 44px); letter-spacing: -0.5px; color: #f1f5f9; transition: color .25s ease; }
.ov-list a:hover .ov-label { color: #f5a623; }
.ov-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.ov-grid a { display: block; padding: 10px 2px; text-decoration: none;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #cbd5e1; transition: color .2s ease; }
.ov-grid a:hover { color: #f5a623; }
.ov-foot { display: flex; align-items: center; justify-content: space-between; padding: 22px 4px;
  border-top: 1px solid rgba(245,166,35,0.1);
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: #475569; }
.ov-live { display: inline-flex; align-items: center; gap: 8px; }
.ov-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #f5a623; animation: status-pulse 2s ease-in-out infinite; }
body.menu-open { overflow: hidden; }
@media (max-width: 640px) { .ov-grid { grid-template-columns: repeat(2, 1fr); } }

/* Hero left-side Atrium flagship card (royal treatment under the title) */
.hero-atrium { margin-top: 26px; max-width: 480px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }

/* ============================================================================
   Live wiring — connection badge, Pi CSI section, data logs
   (navy #0a1628 + amber #f5a623 palette; matches existing OPTARIS console)
   ============================================================================ */

/* — Header connection badge — */
.live-conn-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 999px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 1px; font-weight: 600;
  border: 1px solid rgba(245,166,35,0.35);
  background: rgba(245,166,35,0.08); color: #f5a623;
  white-space: nowrap;
}
.live-conn-badge .lcb-dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
}
.live-conn-badge[data-state="connecting"] { color: #f5a623; border-color: rgba(245,166,35,0.4); }
.live-conn-badge[data-state="connecting"] .lcb-dot { animation: status-pulse 1.1s ease-in-out infinite; }
.live-conn-badge[data-state="live"] {
  color: #3ee08f; border-color: rgba(62,224,143,0.5); background: rgba(62,224,143,0.1);
}
.live-conn-badge[data-state="live"] .lcb-dot { box-shadow: 0 0 8px #3ee08f; animation: status-pulse 2.2s ease-in-out infinite; }
.live-conn-badge[data-state="stale"] { color: #f5a623; border-color: rgba(245,166,35,0.5); }
.live-conn-badge[data-state="down"] {
  color: #ff6b7a; border-color: rgba(255,107,122,0.45); background: rgba(255,107,122,0.08);
}

/* — Pi CSI section — */
.picsi-section {
  margin-top: 28px; padding: 22px;
  background: rgba(10,22,40,0.55);
  border: 1px solid rgba(245,166,35,0.18);
  border-radius: 14px;
}
.picsi-head {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.picsi-title {
  margin: 0; font-size: 17px; letter-spacing: 0.3px; color: #f5a623;
}
.picsi-lede {
  margin: 6px 0 0; max-width: 560px; font-size: 13px; line-height: 1.5;
  color: rgba(205,214,227,0.78);
}
.picsi-lede code {
  font-family: ui-monospace, monospace; font-size: 12px;
  color: #f5a623; background: rgba(245,166,35,0.08); padding: 1px 5px; border-radius: 4px;
}
.picsi-stat-row { display: flex; gap: 22px; }
.picsi-stat { display: flex; flex-direction: column; gap: 3px; }
.picsi-stat label {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(167,181,201,0.7);
}
.picsi-stat span {
  font-family: ui-monospace, monospace; font-size: 15px; font-weight: 600; color: #e8eef7;
}
.picsi-nodes {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.picsi-empty {
  grid-column: 1 / -1; padding: 28px; text-align: center;
  font-size: 13px; color: rgba(167,181,201,0.7);
  border: 1px dashed rgba(245,166,35,0.2); border-radius: 10px;
}
.picsi-card {
  padding: 14px; border-radius: 11px;
  background: rgba(6,14,28,0.7);
  border: 1px solid rgba(120,140,170,0.16);
  border-left: 3px solid rgba(120,140,170,0.3);
}
.picsi-card[data-state="active"] { border-left-color: #3ee08f; }
.picsi-card[data-state="unhealthy"] { border-left-color: #f5a623; }
.picsi-card[data-state="lost"] { border-left-color: #ff6b7a; }
.picsi-card-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.picsi-card-id {
  font-family: ui-monospace, monospace; font-size: 13px; font-weight: 600; color: #e8eef7;
}
.picsi-card-state {
  font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 999px;
}
.picsi-card-state.active { color: #3ee08f; background: rgba(62,224,143,0.12); }
.picsi-card-state.unhealthy { color: #f5a623; background: rgba(245,166,35,0.12); }
.picsi-card-state.lost { color: #ff6b7a; background: rgba(255,107,122,0.12); }
.picsi-spark {
  display: block; width: 100%; height: 64px; border-radius: 7px;
  background: rgba(10,22,40,0.55); border: 1px solid rgba(120,140,170,0.12);
}
.picsi-card-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin-top: 11px;
}
.picsi-card-meta span { display: flex; flex-direction: column; gap: 2px; }
.picsi-card-meta label {
  font-size: 9px; letter-spacing: 0.8px; text-transform: uppercase; color: rgba(167,181,201,0.6);
}
.picsi-card-meta b {
  font-family: ui-monospace, monospace; font-size: 12px; font-weight: 600; color: #cdd6e3;
}

/* — Data logs — */
.datalog-section {
  margin-top: 22px; padding: 18px 20px;
  background: rgba(10,22,40,0.55);
  border: 1px solid rgba(120,140,170,0.16);
  border-radius: 14px;
}
.datalog-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.datalog-title { margin: 0; font-size: 15px; letter-spacing: 0.3px; color: #e8eef7; }
.datalog-controls { display: flex; align-items: center; gap: 10px; }
.datalog-count {
  font-family: ui-monospace, monospace; font-size: 11px; color: rgba(167,181,201,0.7);
}
.datalog-btn {
  font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 0.5px;
  padding: 5px 12px; border-radius: 7px; cursor: pointer;
  color: #f5a623; background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3); transition: background 0.15s;
}
.datalog-btn:hover { background: rgba(245,166,35,0.18); }
.datalog-btn:focus-visible { outline: 2px solid #f5a623; outline-offset: 2px; }
.datalog-btn[data-paused="1"] { color: #3ee08f; border-color: rgba(62,224,143,0.4); background: rgba(62,224,143,0.1); }
.datalog-body {
  height: 240px; overflow-y: auto;
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11.5px; line-height: 1.7;
  background: rgba(4,10,22,0.7); border: 1px solid rgba(120,140,170,0.12);
  border-radius: 9px; padding: 10px 12px;
}
.dl-row { display: grid; grid-template-columns: 92px 130px 1fr; gap: 10px; white-space: nowrap; }
.dl-t { color: rgba(167,181,201,0.6); }
.dl-src { color: #7da2c8; }
.dl-msg { color: #cdd6e3; white-space: pre-wrap; word-break: break-word; }
.dl-row.dl-ok .dl-src { color: #3ee08f; }
.dl-row.dl-warn .dl-src { color: #f5a623; }
.dl-row.dl-ok .dl-msg { color: #b8e9cf; }
.dl-row.dl-warn .dl-msg { color: #f3d6a0; }

@media (max-width: 640px) {
  .picsi-head { flex-direction: column; }
  .picsi-card-meta { grid-template-columns: repeat(2, 1fr); }
  .dl-row { grid-template-columns: 70px 1fr; }
  .dl-src { display: none; }
}
