/* ==========================================================================
   EMS INTELLIGENCE - INDUSTRIAL ENERGY MANAGEMENT DESIGN SYSTEM
   Theme: Sleek Dark / Clean Light Glassmorphism with Cyber Industrial Accents
   ========================================================================== */

:root {
  /* Color Palette - Dark Default */
  --bg-primary: #070b12;
  --bg-secondary: #0d1524;
  --bg-card: rgba(18, 28, 48, 0.75);
  --bg-card-hover: rgba(25, 38, 64, 0.9);
  --border-subtle: rgba(70, 110, 180, 0.18);
  --border-glow: rgba(0, 210, 255, 0.35);
  
  --text-primary: #f0f4fc;
  --text-secondary: #94a7c6;
  --text-muted: #5e7394;
  
  /* Brand Industrial Accents */
  --accent-cyan: #00d2ff;
  --accent-cyan-glow: rgba(0, 210, 255, 0.25);
  --accent-blue: #3a86ff;
  --accent-emerald: #00e676;
  --accent-emerald-glow: rgba(0, 230, 118, 0.2);
  --accent-amber: #ffb703;
  --accent-amber-glow: rgba(255, 183, 3, 0.2);
  --accent-red: #ff3366;
  --accent-red-glow: rgba(255, 51, 102, 0.25);
  --accent-purple: #b5179e;
  
  /* Shadows & Glass */
  --glass-blur: blur(16px);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 210, 255, 0.18);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Light Theme Overrides - Ultra-Professional Executive Industrial Palette */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-subtle: #e2e8f0;
  --border-glow: #0284c7;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-blue: #2563eb;
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);
  --accent-amber: #d97706;
  --accent-amber-glow: rgba(217, 119, 6, 0.15);
  --accent-red: #dc2626;
  --accent-red-glow: rgba(220, 38, 38, 0.15);
  --accent-purple: #7c3aed;
  
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.09), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 0 1px rgba(2, 132, 199, 0.2);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 210, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(58, 134, 255, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
  line-height: 1.5;
}

[data-theme="light"] body {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.02) 0%, transparent 40%);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Header & Navbar */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 18, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem clamp(0.75rem, 1.8vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
}
[data-theme="light"] .header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.brand-logo-img-wrap:hover {
  transform: scale(1.05);
}
.brand-logo-img {
  height: 100%;
  max-height: 46px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
  margin: 0 0.2rem;
}
.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}
.brand-title .brand-highlight {
  color: #dc2626;
  font-weight: 800;
}
.brand-subtitle {
  font-weight: 500;
  font-size: 0.9em;
  color: var(--accent-cyan);
}
[data-theme="light"] .brand-subtitle {
  color: #0284c7;
}
.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseAnimation 2s infinite;
}
@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.shift-radio-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.25rem;
  gap: 0.2rem;
}
[data-theme="light"] .shift-radio-group {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.shift-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  color: var(--text-secondary);
}
.shift-radio-label:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="light"] .shift-radio-label:hover {
  background: rgba(0, 0, 0, 0.04);
}
.shift-radio-label input[type="radio"] {
  display: none;
}
.shift-radio-label.active-day {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.32));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(245, 158, 11, 0.2);
}
[data-theme="light"] .shift-radio-label.active-day {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15);
}
.shift-radio-label.active-night {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(99, 102, 241, 0.32));
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.45);
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(139, 92, 246, 0.2);
}
[data-theme="light"] .shift-radio-label.active-night {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  box-shadow: 0 1px 4px rgba(109, 40, 217, 0.15);
}

.shift-selector {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.65rem;
  gap: 0.45rem;
  flex-shrink: 0;
}
[data-theme="light"] .shift-selector {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}
.shift-selector label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.shift-selector select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.4rem;
  cursor: pointer;
  outline: none;
  width: auto;
  white-space: nowrap;
}
.shift-selector select optgroup {
  background: var(--bg-card);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 8px;
}
[data-theme="light"] .shift-selector select optgroup {
  background: #f1f5f9;
  color: #0369a1;
}
.shift-selector select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
[data-theme="light"] .shift-selector select option {
  background: #ffffff;
  color: #0f172a;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  box-shadow: none !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: none !important;
  transform: none;
}
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
[data-theme="light"] .btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}
[data-theme="light"] .btn-secondary:hover {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0284c7;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}
.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
}
.btn-icon:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}
[data-theme="light"] .btn-icon {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}
[data-theme="light"] .btn-icon:hover {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0284c7;
}

/* User Profile Badge & Popover */
.user-profile-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.28rem 0.65rem 0.28rem 0.35rem;
  font-size: 0.8rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.user-profile-badge:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.18);
}
[data-theme="light"] .user-profile-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
[data-theme="light"] .user-profile-badge:hover {
  border-color: #0284c7;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.15);
}

.user-profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 295px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--glass-blur);
  z-index: 1000;
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
[data-theme="light"] .user-profile-popover {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.popover-header {
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}
[data-theme="light"] .popover-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.popover-avatar-wrap {
  position: relative;
}
.popover-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.15);
}
.online-indicator-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-card);
}
[data-theme="light"] .online-indicator-dot {
  border-color: #ffffff;
}

.popover-user-meta {
  min-width: 0;
  flex: 1;
}
.popover-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popover-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-top: 2px;
}

.popover-body {
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.popover-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.popover-detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.popover-detail-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.popover-footer {
  padding: 0.65rem 1.15rem 0.85rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}
[data-theme="light"] .popover-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}
.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.user-name {
  font-weight: 600;
  color: var(--text-primary);
}
.user-role {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Navigation Tabs */
.nav-tabs-wrapper {
  background: rgba(13, 21, 36, 0.7);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem clamp(1rem, 2vw, 2.5rem) 0;
  width: 100%;
  box-sizing: border-box;
}
[data-theme="light"] .nav-tabs-wrapper {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
[data-theme="light"] .tab-btn {
  color: #64748b;
}
[data-theme="light"] .tab-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}
.tab-btn.active {
  color: var(--accent-cyan);
  background: var(--bg-card);
}
[data-theme="light"] .tab-btn.active {
  color: #0284c7;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 3px 3px 0 0;
  box-shadow: none !important;
}
.tab-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

/* Main Content Area - Fluid Full Screen Responsive */
.main-content {
  flex: 1;
  padding: 0.75rem clamp(1rem, 2vw, 2.5rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}
.tab-pane.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* KPI Summary Cards Grid - Responsive full width */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  width: 100%;
}
@media (max-width: 1440px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  width: 100%;
}
@media (max-width: 1400px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
  transition: border-color var(--transition-fast);
}
[data-theme="light"] .kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: none !important;
}
.kpi-card:hover {
  border-color: var(--border-accent);
  box-shadow: none !important;
  transform: none;
}
[data-theme="light"] .kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: none !important;
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.kpi-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
[data-theme="light"] .kpi-title {
  color: #475569;
}

.kpi-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.icon-cyan { background: rgba(0, 210, 255, 0.12); color: var(--accent-cyan); }
.icon-emerald { background: rgba(0, 230, 118, 0.12); color: var(--accent-emerald); }
.icon-amber { background: rgba(255, 183, 3, 0.12); color: var(--accent-amber); }
.icon-red { background: rgba(255, 51, 102, 0.12); color: var(--accent-red); }
.icon-purple { background: rgba(181, 23, 158, 0.12); color: var(--accent-purple); }

[data-theme="light"] .icon-cyan { background: #e0f2fe; color: #0284c7; }
[data-theme="light"] .icon-emerald { background: #d1fae5; color: #059669; }
[data-theme="light"] .icon-amber { background: #fef3c7; color: #d97706; }
[data-theme="light"] .icon-red { background: #fee2e2; color: #dc2626; }
[data-theme="light"] .icon-purple { background: #f3e8ff; color: #7c3aed; }

.kpi-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}
[data-theme="light"] .kpi-value {
  color: #0f172a;
}
.kpi-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.2rem;
}
.kpi-subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="light"] .kpi-subtext {
  color: #64748b;
}

/* Charts Grid */
.charts-grid-2 {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  width: 100%;
}
@media (max-width: 1180px) {
  .charts-grid-2 {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.95rem;
  box-shadow: none !important;
  width: 100%;
}
[data-theme="light"] .chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: none !important;
}
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.chart-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
[data-theme="light"] .chart-title {
  color: #0f172a;
}
.chart-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
[data-theme="light"] .chart-subtitle {
  color: #64748b;
}

.chart-canvas-wrapper {
  position: relative;
  height: 340px;
  width: 100%;
}
.chart-canvas-tall {
  position: relative;
  height: 400px;
  width: 100%;
}

/* Plant Hierarchy Balance Flow Cards */
.hierarchy-flow-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  width: 100%;
}
[data-theme="light"] .hierarchy-flow-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
}
.flow-levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
  width: 100%;
}
@media (max-width: 1200px) {
  .flow-levels {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .flow-levels {
    grid-template-columns: 1fr;
  }
}

.flow-step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  position: relative;
}
[data-theme="light"] .flow-step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.flow-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.flow-step-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}
.flow-step-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}
[data-theme="light"] .flow-step-name {
  color: #0f172a;
}
.flow-step-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-top: 0.25rem;
}
[data-theme="light"] .flow-step-value {
  color: #0f172a;
}
.flow-step-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}
[data-theme="light"] .flow-step-detail {
  color: #64748b;
}

/* Data Tables */
.table-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
[data-theme="light"] .table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative;
  min-width: 260px;
}
.search-input-wrap i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.8rem 0.45rem 2.1rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.search-input:focus {
  border-color: var(--accent-cyan);
}
[data-theme="light"] .search-input {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}
[data-theme="light"] .search-input:focus {
  border-color: #0284c7;
  background: #ffffff;
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: 100%;
}
[data-theme="light"] .table-responsive {
  border: 1px solid #e2e8f0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}
.data-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 0.42rem 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.72rem;
  line-height: 1.25;
}
[data-theme="light"] .data-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
}
.data-table td {
  padding: 0.36rem 0.65rem;
  border-bottom: 1px solid rgba(70, 110, 180, 0.09);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: 0.78rem;
  line-height: 1.3;
}
[data-theme="light"] .data-table td {
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
[data-theme="light"] .data-table tr:hover td {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
  line-height: 1.1;
  max-height: 24px;
}
.badge-critical {
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.3);
}
.badge-warning {
  background: rgba(255, 183, 3, 0.15);
  color: #ffb703;
  border: 1px solid rgba(255, 183, 3, 0.3);
}
.badge-info {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.3);
}
.badge-success {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.3);
}
.badge-secondary {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.badge-night {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Light Theme Badges with Crisp High Contrast */
[data-theme="light"] .badge-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
[data-theme="light"] .badge-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
[data-theme="light"] .badge-critical {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
[data-theme="light"] .badge-info {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}
[data-theme="light"] .badge-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
[data-theme="light"] .badge-night {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

/* Highlight Cell Types */
.cell-green {
  background: rgba(0, 176, 80, 0.22) !important;
  color: #00ff73 !important;
  font-weight: 700;
  border-radius: 4px;
}
.cell-soft-red {
  background: rgba(244, 67, 54, 0.22) !important;
  color: #ff6b6b !important;
  font-weight: 700;
  border-radius: 4px;
}
.cell-overload {
  background: rgba(255, 51, 102, 0.25) !important;
  color: #ff3366 !important;
  font-weight: 700;
  border-radius: 4px;
}

[data-theme="light"] .cell-green {
  background: #d1fae5 !important;
  color: #065f46 !important;
  font-weight: 700;
}
[data-theme="light"] .cell-soft-red {
  background: #fee2e2 !important;
  color: #991b1b !important;
  font-weight: 700;
}
[data-theme="light"] .cell-overload {
  background: #fecaca !important;
  color: #7f1d1d !important;
  font-weight: 700;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 7, 14, 0.82);
  backdrop-filter: var(--glass-blur);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.5);
}
.modal-overlay.active {
  display: flex;
}
.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  animation: modalScale 0.22s ease-out;
}
[data-theme="light"] .modal-dialog {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="light"] .modal-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}
.modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
[data-theme="light"] .modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition-fast);
}
[data-theme="light"] .dropzone {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
}
[data-theme="light"] .dropzone:hover, [data-theme="light"] .dropzone.dragover {
  border-color: #0284c7;
  background: #f0f9ff;
}
.dropzone i {
  font-size: 2.75rem;
  color: var(--accent-cyan);
  margin-bottom: 0.85rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideInRight 0.25s ease;
}
[data-theme="light"] .toast {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   Expeller Deep-Dive & Individual Motor Health Grid
   ========================================================================== */
.panel-switch-cluster {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.cluster-expellers {
  border-left: 3px solid var(--accent-cyan);
}
.cluster-kohlus {
  border-left: 3px solid var(--accent-emerald);
}
[data-theme="light"] .panel-switch-cluster {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.cluster-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0 0.4rem 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}
.cluster-label.label-kohlu {
  color: var(--accent-emerald);
}

.expeller-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.expeller-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .expeller-tab-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.cluster-all-btn {
  border: 1px dashed rgba(0, 210, 255, 0.35) !important;
}
.tab-btn-kohlu.cluster-all-btn {
  border: 1px dashed rgba(16, 185, 129, 0.45) !important;
}
.expeller-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff !important;
  box-shadow: none !important;
}
[data-theme="dark"] .expeller-tab-btn.active {
  background: linear-gradient(135deg, #00d2ff, #0077b6);
  color: #070b12 !important;
  box-shadow: none !important;
}

.expeller-tab-btn[data-kohlu].active {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
[data-theme="dark"] .expeller-tab-btn[data-kohlu].active {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #070b12 !important;
  box-shadow: none !important;
}

/* Motor Rating Filter Buttons */
.rating-filter-group {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}
.rating-filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: none !important;
  transition: all var(--transition-fast);
}
[data-theme="light"] .rating-filter-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}
.rating-filter-btn:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.35);
  color: var(--text-primary);
  box-shadow: none !important;
}
.rating-filter-btn.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan) !important;
  box-shadow: none !important;
  font-weight: 700;
}

.expeller-motors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1rem;
}
@media (min-width: 1400px) {
  .expeller-motors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1850px) {
  .expeller-motors-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.motor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
  height: 100%;
}
.motor-card:hover {
  border-color: var(--border-accent);
  transform: none;
  box-shadow: none !important;
}
[data-theme="light"] .motor-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: none !important;
}
[data-theme="light"] .motor-card:hover {
  border-color: #0284c7;
  box-shadow: none !important;
}

.motor-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.motor-card-head-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.motor-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.motor-card-sub-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.motor-code-tag {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.motor-hp-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(0, 210, 255, 0.12);
  color: var(--accent-cyan);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 210, 255, 0.3);
  white-space: nowrap;
}
[data-theme="light"] .motor-hp-tag {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}
.motor-col-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.06rem 0.32rem;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  display: inline-block;
  white-space: nowrap;
  line-height: 1.2;
}
[data-theme="light"] .motor-col-tag {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}
.motor-panel-mini-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.motor-card-role-line {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.motor-card-head-right {
  flex-shrink: 0;
  margin-left: auto;
}

.motor-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.motor-card-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.motor-metrics-row {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-subtle);
}
[data-theme="light"] .motor-metrics-row {
  background: #f8fafc;
  border-color: #f1f5f9;
}
.motor-metric-mini {
  display: flex;
  flex-direction: column;
}
.motor-metric-mini-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.motor-metric-mini-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Micro Benchmark Bar right above the mini chart canvas - 100% responsive, never truncates */
.motor-chart-benchmarks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.3rem 0.4rem;
  margin-bottom: 0.35rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  user-select: none;
}
[data-theme="light"] .motor-chart-benchmarks {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.bm-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  padding: 0.1rem 0;
  border-radius: 2px;
}
.bm-pct {
  font-weight: 800;
}
.bm-dash {
  display: inline-block;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  flex-shrink: 0;
}
.bm-col-red { color: #ff4d6d; }
[data-theme="light"] .bm-col-red { color: #dc2626; }
.bm-dash-red { background: #ff4d6d; }
[data-theme="light"] .bm-dash-red { background: #dc2626; }

.bm-col-green { color: #00e676; }
[data-theme="light"] .bm-col-green { color: #059669; }
.bm-dash-green { background: #00e676; }
[data-theme="light"] .bm-dash-green { background: #059669; }

.bm-col-amber { color: #ffb703; }
[data-theme="light"] .bm-col-amber { color: #d97706; }
.bm-dash-amber { background: #ffb703; }
[data-theme="light"] .bm-dash-amber { background: #d97706; }

.motor-canvas-wrap {
  position: relative;
  height: 235px;
  width: 100%;
}

.motor-audit-box {
  font-size: 0.76rem;
  line-height: 1.35;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  min-height: 48px;
  display: flex;
  align-items: flex-start;
}
.audit-box-healthy {
  background: rgba(16, 185, 129, 0.08);
  border-color: #10b981;
  color: #10b981;
}
[data-theme="light"] .audit-box-healthy {
  background: #ecfdf5;
  border-color: #059669;
  color: #065f46;
}
.audit-box-idle {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
  color: #f59e0b;
}
[data-theme="light"] .audit-box-idle {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
}
.audit-box-overload {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
  color: #ef4444;
}
[data-theme="light"] .audit-box-overload {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}
.audit-box-stopped {
  background: rgba(100, 116, 139, 0.08);
  border-color: #64748b;
  color: #94a3b8;
}
[data-theme="light"] .audit-box-stopped {
  background: #f8fafc;
  border-color: #64748b;
  color: #475569;
}

/* Motor Card Status Pills & Enhanced Header (Image 5) */
.motor-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.52rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.motor-status-pill.pill-optimal {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}
[data-theme="light"] .motor-status-pill.pill-optimal {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.motor-status-pill.pill-normal {
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(2, 132, 199, 0.35);
}
[data-theme="light"] .motor-status-pill.pill-normal {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}
.motor-status-pill.pill-low {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme="light"] .motor-status-pill.pill-low {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}
.motor-status-pill.pill-high {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}
[data-theme="light"] .motor-status-pill.pill-high {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.motor-status-pill.pill-offline {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.25);
}
[data-theme="light"] .motor-status-pill.pill-offline {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

/* 48-Interval Breakdown Bar & Benchmark Operating Load Gauge (Image 3) */
.motor-load-meter-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
[data-theme="light"] .motor-load-meter-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.motor-load-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.load-pill-text {
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
}
.load-total-base {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.load-zone-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.load-zone-tag.zone-overload {
  background: rgba(239, 68, 68, 0.15);
  color: #ff4d6d;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
[data-theme="light"] .load-zone-tag.zone-overload {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.load-zone-tag.zone-healthy {
  background: rgba(16, 185, 129, 0.12);
  color: #00f59b;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
[data-theme="light"] .load-zone-tag.zone-healthy {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.load-zone-tag.zone-normal {
  background: rgba(2, 132, 199, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.35);
}
[data-theme="light"] .load-zone-tag.zone-normal {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}
.load-zone-tag.zone-idle {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
[data-theme="light"] .load-zone-tag.zone-idle {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.load-zone-tag.zone-stopped {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Horizontal Operating Load Gauge Bar (0% to 100%) */
.load-gauge-track {
  position: relative;
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: visible;
  margin: 0.15rem 0;
}
[data-theme="light"] .load-gauge-track {
  background: #e2e8f0;
}
.load-gauge-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.load-gauge-fill.fill-overload {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.load-gauge-fill.fill-healthy {
  background: linear-gradient(90deg, #10b981, #00f59b);
}
.load-gauge-fill.fill-normal {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.load-gauge-fill.fill-idle {
  background: #f59e0b;
}
.load-gauge-fill.fill-stopped {
  background: #64748b;
}

/* Benchmark Marker Lines (40%, 50%, 80%) */
.load-gauge-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  z-index: 2;
}
.load-gauge-marker.marker-40 {
  left: 40%;
  background: #f59e0b;
}
.load-gauge-marker.marker-50 {
  left: 50%;
  background: #10b981;
}
.load-gauge-marker.marker-80 {
  left: 80%;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}
.load-gauge-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.05rem;
  padding: 0 0.1rem;
}
.load-gauge-ticks .tick-amber { color: #f59e0b; font-weight: 600; }
.load-gauge-ticks .tick-green { color: #10b981; font-weight: 600; }
.load-gauge-ticks .tick-red { color: #ef4444; font-weight: 700; }

.motor-slots-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
[data-theme="light"] .motor-slots-summary-bar {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.motor-slots-avg {
  font-weight: 600;
  color: var(--text-secondary);
}
.motor-slots-avg strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.motor-slots-counts {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}
.slot-count-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}
.slot-count-tag i {
  font-size: 0.45rem;
}
.slot-count-tag.count-good {
  color: var(--accent-emerald);
}
.slot-count-tag.count-low {
  color: var(--accent-amber);
}
.slot-count-tag.count-high {
  color: var(--accent-red);
}
.slot-count-tag.count-off {
  color: #94a3b8;
}

/* Professional "View Details" Action Button (Image 2) */
.btn-view-details {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: auto;
}
[data-theme="light"] .btn-view-details {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}
.btn-view-details:hover {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: none !important;
}
[data-theme="light"] .btn-view-details:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: none !important;
}

/* Upload Mode Selector (Single vs 2-Shift Upload) */
.upload-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.upload-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.upload-mode-option:hover {
  border-color: var(--accent-cyan);
}
.upload-mode-option.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}
.custom-radio-dot {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  background: transparent;
}
.upload-mode-option.active .custom-radio-dot {
  border-color: var(--accent-cyan);
  background: radial-gradient(circle, var(--accent-cyan) 40%, transparent 45%);
}
[data-theme="light"] .upload-mode-option.active .custom-radio-dot {
  border-color: #0284c7;
  background: radial-gradient(circle, #0284c7 40%, transparent 45%);
}
[data-theme="light"] .upload-mode-option {
  background: #f8fafc;
  border-color: #cbd5e1;
}
[data-theme="light"] .upload-mode-option.active {
  background: #f0f9ff;
  border-color: #0284c7;
}

.dual-dropzone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

/* Dual Slot Selected File Tag & Remove Chip */
.selected-file-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.28);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  margin: 0.45rem 0;
  box-sizing: border-box;
}
[data-theme="light"] .selected-file-chip {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.selected-file-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0284c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  flex: 1;
}
[data-theme="dark"] .selected-file-name {
  color: var(--accent-cyan);
}
.btn-remove-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-remove-chip:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-remove-chip {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}
[data-theme="dark"] .btn-remove-chip:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
}
@media (max-width: 650px) {
  .upload-mode-selector, .dual-dropzone-grid {
    grid-template-columns: 1fr;
  }
}

/* Motor Deep-Dive Focus / Enlarged View in Tab 1 - Compact to Maximize Graph Elevation */
.motor-focus-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.35rem !important;
  animation: fadeIn 0.25s ease;
}
[data-theme="light"] .motor-focus-card {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.12);
}
.motor-focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem !important;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.35rem !important;
}
.motor-focus-canvas-wrap {
  position: relative;
  height: clamp(380px, 50vh, 460px);
  width: 100%;
}

/* Telemetry Matrix Table in Tab 2 */
.matrix-container {
  position: relative;
  overflow-x: auto;
  scroll-behavior: smooth;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  max-height: calc(100vh - 240px);
  min-height: 480px;
}
[data-theme="light"] .matrix-container {
  background: #ffffff;
  border-color: #e2e8f0;
}
.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.74rem;
  white-space: nowrap;
}
.matrix-table th, .matrix-table td {
  padding: 0.22rem 0.42rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  text-align: center;
  line-height: 1.15;
}
.matrix-table th {
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.72rem;
  padding: 0.25rem 0.42rem;
}
[data-theme="light"] .matrix-table th {
  background: #f1f5f9;
  color: #0f172a;
}
/* Sticky Left Columns */
.sticky-col-0 {
  position: sticky !important;
  left: 0;
  z-index: 3 !important;
  background: var(--bg-secondary) !important;
  min-width: 44px;
  max-width: 44px;
  border-right: 2px solid var(--border-accent) !important;
  padding: 0.22rem 0.35rem !important;
}
.sticky-col-1 {
  position: sticky !important;
  left: 44px;
  z-index: 3 !important;
  background: var(--bg-secondary) !important;
  min-width: 82px;
  max-width: 82px;
  border-right: 2px solid var(--border-accent) !important;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.22rem 0.35rem !important;
}
[data-theme="light"] .sticky-col-0, [data-theme="light"] .sticky-col-1 {
  background: #f8fafc !important;
}

/* Cell Status Styling */
.cell-healthy {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  font-weight: 600;
}
[data-theme="light"] .cell-healthy {
  background: #ecfdf5 !important;
  color: #065f46 !important;
}
.cell-idle {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #f59e0b !important;
  font-weight: 600;
}
[data-theme="light"] .cell-idle {
  background: #fffbeb !important;
  color: #b45309 !important;
}
.cell-overload {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  font-weight: 700;
  animation: pulseLight 2s infinite;
}
[data-theme="light"] .cell-overload {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}
.cell-stopped {
  color: var(--text-muted) !important;
  opacity: 0.6;
}

/* ==========================================================================
   Activity Audit Logs Table & Pagination Styles
   ========================================================================== */
.activity-subnav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge-activity-login {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
}
[data-theme="light"] .badge-activity-login {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.badge-activity-logout {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-weight: 700;
}
[data-theme="light"] .badge-activity-logout {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.badge-activity-register {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
  font-weight: 700;
}
[data-theme="light"] .badge-activity-register {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.badge-activity-upload {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.35);
  font-weight: 700;
}
[data-theme="light"] .badge-activity-upload {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.badge-activity-invalid {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-weight: 700;
  animation: pulseLight 2s infinite;
}
[data-theme="light"] .badge-activity-invalid {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.01);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 32px;
  text-align: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.06);
}

.page-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #000 !important;
  font-weight: 800;
}

/* Custom Button Disabled State */
.btn:disabled, button:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(40%) !important;
  box-shadow: none !important;
}

.admin-restricted-box {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

/* ==========================================================================
   Login & Registration Collage Backdrop - 100% Pure Original Clarity (Zero Black Flame)
   ========================================================================== */
#login-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  z-index: 1000;
  background: url('/img/auth-collage-bg.webp?v=2x_vibrant') center/cover no-repeat !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 1.5rem 1rem;
  transition: opacity 0.3s ease;
}

#login-modal.active {
  display: flex !important;
}

[data-theme="light"] #login-modal {
  background: url('/img/auth-collage-bg.webp?v=2x_vibrant') center/cover no-repeat !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#login-modal::before,
#login-modal::after {
  display: none !important;
}

/* Executive High-Focus Auth Dialog (Separates Card with Halo & High-Contrast Readability) */
.auth-modal-dialog {
  position: relative;
  z-index: 2 !important;
  max-width: 440px !important;
  width: 100%;
  background: #080d1a !important;
  border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.95), 
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 40px rgba(0, 210, 255, 0.28) !important;
  border-radius: 18px !important;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .auth-modal-dialog {
  background: #080d1a !important;
  border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95) !important;
  color: #e2e8f0 !important;
}

/* Unified High-Contrast Input Fields with Autofill Harmonization */
.auth-modal-dialog .search-input {
  width: 100% !important;
  background: #0f172a !important;
  border: 1.5px solid rgba(0, 210, 255, 0.42) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transition: all 0.25s ease !important;
}
.auth-modal-dialog .search-input:focus {
  background: #141f38 !important;
  border-color: #00d2ff !important;
  box-shadow: none !important;
  outline: none !important;
}
.auth-modal-dialog .search-input::placeholder {
  color: #64748b !important;
  font-weight: 400 !important;
}

/* Chrome/Edge Autofill Background Override so all inputs look unified */
.auth-modal-dialog input:-webkit-autofill,
.auth-modal-dialog input:-webkit-autofill:hover, 
.auth-modal-dialog input:-webkit-autofill:focus,
.auth-modal-dialog input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
  border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
}

[data-theme="light"] .auth-modal-dialog .search-input {
  background: #0f172a !important;
  border: 1.5px solid rgba(0, 210, 255, 0.42) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
[data-theme="light"] .auth-modal-dialog .search-input:focus {
  background: #141f38 !important;
  border-color: #00d2ff !important;
  box-shadow: none !important;
}
[data-theme="light"] .auth-modal-dialog input:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
  border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
}

/* Clean Flat High-Focus CTA Buttons (Zero Drop Shadow) */
.auth-modal-dialog .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: none !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
}
.auth-modal-dialog .btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
  box-shadow: none !important;
  transform: none !important;
}

.auth-tab-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(0, 210, 255, 0.18);
  padding: 0.25rem 0.4rem 0;
}
.auth-tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
}
.auth-tab-btn:hover {
  color: var(--text-primary);
}
.auth-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
  border-radius: 6px 6px 0 0;
}

.btn-block-user {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-block-user:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-unblock-user {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-unblock-user:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-delete-user {
  background: rgba(220, 38, 38, 0.12);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.35);
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-delete-user:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* First-time User Call-To-Action Blinking Glow */
@keyframes pulseUploadBtn {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.75);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(0, 210, 255, 0);
    transform: scale(1.05);
    background: linear-gradient(135deg, #00d2ff, #2563eb);
    border-color: #ffffff;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
    transform: scale(1);
  }
}

.btn-pulse-attention {
  animation: pulseUploadBtn 1.6s infinite cubic-bezier(0.4, 0, 0.6, 1) !important;
  border: 1px solid #38bdf8 !important;
  font-weight: 700 !important;
}

/* Empty State Onboarding Banner */
.empty-state-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1.5px dashed rgba(0, 210, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.empty-state-banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.empty-state-banner-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}
.empty-state-banner h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.3rem 0;
}
.empty-state-banner p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}
[data-theme="light"] .empty-state-banner {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-color: rgba(2, 132, 199, 0.45);
}
[data-theme="light"] .empty-state-banner h3 {
  color: #0f172a;
}
[data-theme="light"] .empty-state-banner p {
  color: #475569;
}




