/* ==========================================================================
   AO.OS (AO Operating System) — Design System & Visual Engine
   Theme: Enterprise Dark | Glassmorphism | Cybernetic Neon Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Tokens */
  --bg-dark: #06080d;
  --bg-surface: #0b0f19;
  --bg-card: rgba(15, 22, 35, 0.75);
  --bg-card-hover: rgba(22, 32, 51, 0.85);
  --bg-card-active: rgba(28, 41, 66, 0.9);
  --bg-glass: rgba(10, 15, 26, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-neon-cyan: rgba(0, 240, 255, 0.25);
  --border-neon-mint: rgba(0, 255, 157, 0.25);
  --border-neon-purple: rgba(112, 0, 255, 0.3);

  --neon-cyan: #00f0ff;
  --neon-mint: #00ff9d;
  --neon-purple: #9d4edd;
  --neon-amber: #ffb700;
  --neon-coral: #ff3b5c;
  --neon-blue: #3a86ff;

  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.35);
  --glow-mint: 0 0 20px rgba(0, 255, 157, 0.35);
  --glow-purple: 0 0 20px rgba(157, 78, 221, 0.35);
  --glow-coral: 0 0 20px rgba(255, 59, 92, 0.35);

  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Ambient Glow */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.07) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(112, 0, 255, 0.07) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* App Shell Layout */
#ao-app-root {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* Top App Header */
.ao-topbar {
  height: var(--topbar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  flex-shrink: 0;
}

.ao-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.ao-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: #000;
  box-shadow: var(--glow-cyan);
}

.ao-brand-text {
  display: flex;
  flex-direction: column;
}

.ao-brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #ffffff, var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ao-brand-tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ao-topbar-center {
  flex: 1;
  max-width: 540px;
  margin: 0 32px;
}

.ao-ai-cmd-trigger {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-neon-cyan);
  border-radius: var(--radius-md);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ao-ai-cmd-trigger:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
  color: var(--text-primary);
}

.ao-shortcut-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
}

.ao-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ao-sys-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid var(--border-neon-mint);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--neon-mint);
}

.ao-status-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--neon-mint);
  border-radius: 50%;
  box-shadow: var(--glow-mint);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 255, 157, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

.ao-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ao-user-profile:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ao-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4361ee, #4cc9f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Main Container Area */
.ao-main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Sidebar Navigation Dock */
.ao-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 6px;
  overflow-y: auto;
  flex-shrink: 0;
}

.ao-nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px 4px 12px;
  margin-top: 8px;
}

.ao-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  position: relative;
}

.ao-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.ao-nav-item.active {
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-neon-cyan);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.1);
}

.ao-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--neon-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--glow-cyan);
}

.ao-nav-icon {
  font-size: 16px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ao-nav-badge {
  margin-left: auto;
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Workspace Canvas Viewport */
.ao-viewport {
  flex: 1;
  background: var(--bg-dark);
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Common UI Components */

/* Header / Title Bar */
.ao-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ao-page-title-group h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ao-page-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* Buttons */
.ao-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
}

.ao-btn-primary {
  background: linear-gradient(135deg, #00f0ff, #0088ff);
  color: #000;
  border: none;
  box-shadow: var(--glow-cyan);
}

.ao-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

.ao-btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.ao-btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.ao-btn-neon-purple {
  background: rgba(157, 78, 221, 0.15);
  border: 1px solid var(--border-neon-purple);
  color: var(--neon-purple);
}

.ao-btn-neon-purple:hover {
  background: rgba(157, 78, 221, 0.3);
  box-shadow: var(--glow-purple);
}

/* Cards & Panels */
.ao-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.ao-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}

.ao-card-neon {
  border-color: var(--border-neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.08);
}

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

.ao-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Metric Stats Grid */
.ao-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.ao-metric-card {
  background: rgba(15, 22, 35, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ao-metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ao-metric-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ao-metric-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.ao-metric-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ao-trend-up { color: var(--neon-mint); }
.ao-trend-down { color: var(--neon-coral); }

/* Progress Bars */
.ao-progress-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ao-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.fill-cyan { background: var(--neon-cyan); box-shadow: var(--glow-cyan); }
.fill-mint { background: var(--neon-mint); box-shadow: var(--glow-mint); }
.fill-purple { background: var(--neon-purple); box-shadow: var(--glow-purple); }
.fill-amber { background: var(--neon-amber); }
.fill-coral { background: var(--neon-coral); box-shadow: var(--glow-coral); }

/* Tables */
.ao-table-container {
  width: 100%;
  overflow-x: auto;
}

.ao-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.ao-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.ao-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
}

.ao-table tr:hover td {
  background: rgba(0, 240, 255, 0.03);
  color: var(--text-primary);
}

/* Badges & Status Tags */
.ao-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.ao-badge-cyan { background: rgba(0, 240, 255, 0.12); color: var(--neon-cyan); border: 1px solid var(--border-neon-cyan); }
.ao-badge-mint { background: rgba(0, 255, 157, 0.12); color: var(--neon-mint); border: 1px solid var(--border-neon-mint); }
.ao-badge-purple { background: rgba(157, 78, 221, 0.15); color: var(--neon-purple); border: 1px solid var(--border-neon-purple); }
.ao-badge-amber { background: rgba(255, 183, 0, 0.12); color: var(--neon-amber); border: 1px solid rgba(255, 183, 0, 0.3); }
.ao-badge-coral { background: rgba(255, 59, 92, 0.12); color: var(--neon-coral); border: 1px solid rgba(255, 59, 92, 0.3); }

/* Terminal Simulator */
.ao-terminal {
  background: #04060a;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a0aec0;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.ao-terminal-output {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
}

.ao-term-line { display: flex; gap: 8px; }
.ao-term-prompt { color: var(--neon-mint); font-weight: 700; }
.ao-term-cmd { color: var(--text-primary); }
.ao-term-info { color: var(--neon-cyan); }
.ao-term-success { color: var(--neon-mint); }
.ao-term-error { color: var(--neon-coral); }

.ao-term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.ao-term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Global AI Overlay Modal (Ctrl+K) */
.ao-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.ao-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ao-cmd-modal {
  width: 100%;
  max-width: 680px;
  background: var(--bg-surface);
  border: 1px solid var(--neon-cyan);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ao-cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 240, 255, 0.03);
}

.ao-cmd-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 18px;
}

.ao-cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ao-cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ao-cmd-item:hover, .ao-cmd-item.selected {
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
}

/* Utilities */
.text-cyan { color: var(--neon-cyan); }
.text-mint { color: var(--neon-mint); }
.text-purple { color: var(--neon-purple); }
.text-amber { color: var(--neon-amber); }
.text-coral { color: var(--neon-coral); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }

/* Form Controls */
.ao-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ao-form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.ao-input, .ao-select {
  background: rgba(15, 22, 35, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.ao-input:focus, .ao-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* Toast Notifications */
.ao-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.ao-toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-neon-cyan);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 420px;
}

.ao-toast.success { border-color: var(--neon-mint); box-shadow: 0 0 20px rgba(0, 255, 157, 0.2); }
.ao-toast.error { border-color: var(--neon-coral); box-shadow: 0 0 20px rgba(255, 59, 92, 0.2); }
.ao-toast.purple { border-color: var(--neon-purple); box-shadow: 0 0 20px rgba(157, 78, 221, 0.2); }

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

/* Generic Modal System */
.ao-app-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.ao-app-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.ao-app-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-neon-cyan);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.2);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ao-app-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 240, 255, 0.03);
}

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

.ao-app-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   CCTV NVR SURVEILLANCE STYLES
   ========================================================================== */
.nvr-grid-container {
  display: grid;
  gap: 12px;
  width: 100%;
  background: #020408;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  aspect-ratio: 16 / 9;
  max-height: 560px;
}

.nvr-grid-1 { grid-template-columns: 1fr; }
.nvr-grid-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.nvr-grid-9 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.nvr-grid-16 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }

.nvr-cam-cell {
  background: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nvr-cam-cell:hover, .nvr-cam-cell.selected {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.nvr-cam-video-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.nvr-cam-header-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.nvr-cam-footer-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  font-family: var(--font-mono);
  font-size: 11px;
}

.nvr-rec-dot {
  width: 10px;
  height: 10px;
  background: var(--neon-coral);
  border-radius: 50%;
  box-shadow: var(--glow-coral);
  animation: pulse-ring 1.5s infinite;
}

.ptz-wheel {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(15, 22, 35, 0.9);
  border: 2px solid var(--border-neon-cyan);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.ptz-btn {
  position: absolute;
  width: 38px;
  height: 38px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  border-radius: 50%;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.ptz-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: var(--glow-cyan);
}

.ptz-up { top: 8px; }
.ptz-down { bottom: 8px; }
.ptz-left { left: 8px; }
.ptz-right { right: 8px; }
.ptz-center { width: 44px; height: 44px; font-size: 11px; font-weight: 700; }

/* Timeline Scrubber */
.nvr-timeline-bar {
  width: 100%;
  height: 50px;
  background: #070a12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
}

.nvr-timeline-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--neon-coral);
  box-shadow: 0 0 8px var(--neon-coral);
  z-index: 10;
}

/* ==========================================================================
   KANBAN BOARD STYLES
   ========================================================================== */
.ao-kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  min-height: 540px;
}

.ao-kanban-col {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ao-kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.ao-kanban-cards-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.ao-kanban-card {
  background: rgba(20, 29, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: grab;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ao-kanban-card:hover {
  border-color: var(--neon-cyan);
  background: rgba(28, 41, 66, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   RE-ACT AGENT TRACE STYLES
   ========================================================================== */
.react-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 28px;
}

.react-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(0, 240, 255, 0.2);
}

.react-step {
  position: relative;
  background: rgba(15, 22, 35, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: var(--transition-fast);
}

.react-step.active {
  border-color: var(--neon-purple);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.25);
}

.react-step-dot {
  position: absolute;
  left: -28px;
  top: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.react-step.active .react-step-dot {
  border-color: var(--neon-purple);
  color: var(--neon-purple);
  box-shadow: var(--glow-purple);
}

/* ==========================================================================
   VISUAL AUTOMATION WORKFLOW CANVAS
   ========================================================================== */
.workflow-canvas {
  width: 100%;
  height: 520px;
  background: #050811;
  background-image: radial-gradient(rgba(0, 240, 255, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.workflow-node {
  position: absolute;
  width: 220px;
  background: rgba(15, 22, 35, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 14px;
  cursor: move;
  transition: border-color var(--transition-fast);
}

.workflow-node:hover {
  border-color: var(--neon-mint);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.workflow-port {
  width: 10px;
  height: 10px;
  background: var(--neon-mint);
  border-radius: 50%;
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: var(--glow-mint);
}

/* ==========================================================================
   PRINTABLE QUOTATION INVOICE MODAL
   ========================================================================== */
.quote-invoice-sheet {
  background: #ffffff;
  color: #17202a;
  padding: 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
}

.quote-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f2b4c;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

