/* ============================================
   MODERN UI ENHANCEMENTS 2026
   Layered on top of existing styles.css
   ============================================ */

/* ===== Smooth Page Transitions ===== */
@view-transition {
  navigation: auto;
}

/* ===== Enhanced Typography ===== */
body {
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* ===== Subtle Noise Texture Overlay ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ===== Login Page Enhancements ===== */
.login-card {
  animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Password toggle button */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.85rem;
  transition: color 0.2s;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--primary);
}

.form-group {
  position: relative;
}

/* Floating label effect */
.form-group input:not(:placeholder-shown) + label,
.form-group input:focus + label {
  transform: translateY(-1.5rem) scale(0.85);
  color: var(--primary);
}

/* Input focus ring animation */
.form-group input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 
    0 0 0 3px rgba(99, 102, 241, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Button loading state with shimmer */
.btn.loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
}

/* ===== Dashboard Header Enhancements ===== */
.dashboard-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-content h1 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

/* User info pill with avatar */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  transition: all 0.2s;
}

.user-info:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

.user-info::before {
  content: '';
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Log ud button */
.header-actions .btn[onclick*="logout"],
.header-actions button:last-child {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--danger);
  transition: all 0.2s;
}

.header-actions .btn[onclick*="logout"]:hover,
.header-actions button:last-child:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ===== Section Headers ===== */
.section-header h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section-header h2::before {
  width: 3px;
  height: 1.25rem;
  border-radius: 2px;
  background: var(--gradient-primary);
}

/* ===== Device Cards - Modern Redesign ===== */
.device-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.device-card::before {
  height: 2px;
  border-radius: 2px 2px 0 0;
}

.device-card:hover {
  transform: translateY(-6px);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 
    0 20px 40px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}

.device-card.offline {
  opacity: 0.5;
  filter: grayscale(0.3);
}

.device-card.offline:hover {
  opacity: 0.8;
  filter: grayscale(0);
}

.device-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Status badge micro-animation */
.status-badge {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
}

.status-badge.online::before {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 4px currentColor;
  }
  50% { 
    transform: scale(1.3);
    box-shadow: 0 0 8px currentColor;
  }
}

/* Delete button on device cards */
.device-card button[onclick*="delete"],
.device-card button:last-child {
  opacity: 0;
  transition: all 0.2s;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  cursor: pointer;
}

.device-card:hover button[onclick*="delete"],
.device-card:hover button:last-child {
  opacity: 1;
}

.device-card button[onclick*="delete"]:hover,
.device-card button:last-child:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* ===== Remote Preview - Cleaner Look ===== */
.remote-preview-container {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 
    0 20px 60px -15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.preview-idle-content h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.preview-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

.feature-tag {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.12);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
  transition: all 0.2s;
}

.feature-tag:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--text-secondary);
}

/* ===== Support Queue - Refined ===== */
.queue-section {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.queue-empty {
  padding: 1.5rem 1rem;
}

.queue-empty-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.3));
}

/* ===== Downloads Section ===== */
.downloads-section a,
a[href*="downloads.hawkeye123.dk"],
a[href*="agent.html"] {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
}

.downloads-section a:hover,
a[href*="downloads.hawkeye123.dk"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.4);
}

/* ===== Admin Panel Enhancements ===== */
.admin-header {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem 1.75rem;
  box-shadow: 
    0 20px 40px -12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-header h1 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

/* Admin tabs - pill style */
.admin-tabs {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 0.375rem;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-tab.active::after {
  display: none;
}

/* Super Admin Badge */
.super-admin-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
  animation: none;
}

/* Stat Cards - Cleaner */
.stat-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
  height: 2px;
  opacity: 0.6;
}

.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* User Cards - Refined */
.user-card,
.pending-user {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-card:hover,
.pending-user:hover {
  transform: translateX(6px);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.3);
}

.user-email {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

/* Filter Tabs */
.filter-tabs {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.3rem;
}

.filter-tab {
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border: none;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ===== Agent Page Enhancements ===== */
.agent-wrapper {
  max-width: 520px;
}

.glass-card {
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.info-item {
  border-radius: 12px;
  padding: 0.875rem;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.info-item:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.15);
}

.info-icon {
  border-radius: 10px;
}

/* ===== Scrollbar Refinement ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}

/* ===== Smooth Hover Transitions for All Interactive Elements ===== */
a, button, .btn, .device-card, .stat-card, .user-card, .admin-tab, .filter-tab, .queue-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Focus Visible - Modern Focus Ring ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* ===== Staggered Animations ===== */
.device-card,
.stat-card,
.user-card,
.pending-user {
  animation: fadeSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.device-card:nth-child(1), .stat-card:nth-child(1), .user-card:nth-child(1) { animation-delay: 0.05s; }
.device-card:nth-child(2), .stat-card:nth-child(2), .user-card:nth-child(2) { animation-delay: 0.1s; }
.device-card:nth-child(3), .stat-card:nth-child(3), .user-card:nth-child(3) { animation-delay: 0.15s; }
.device-card:nth-child(4) { animation-delay: 0.2s; }
.device-card:nth-child(5) { animation-delay: 0.25s; }

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

/* ===== Tooltip Styles ===== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.4rem 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Toast Notifications ===== */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 2.5rem);
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--text-primary, #f1f5f9);
  font-size: 0.875rem;
  line-height: 1.4;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  will-change: transform, opacity;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-exit {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 1, 1), opacity 0.2s ease;
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.toast-message {
  flex: 1;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  transition: color 0.2s;
  border-radius: 4px;
}

.toast-close:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Toast type colors */
.toast-success {
  border-left: 3px solid #22c55e;
}
.toast-success .toast-icon { color: #22c55e; }

.toast-error {
  border-left: 3px solid #ef4444;
}
.toast-error .toast-icon { color: #ef4444; }

.toast-warning {
  border-left: 3px solid #f59e0b;
}
.toast-warning .toast-icon { color: #f59e0b; }

.toast-info {
  border-left: 3px solid #6366f1;
}
.toast-info .toast-icon { color: #6366f1; }

/* ===== Confirm Modal ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.confirm-overlay.show {
  opacity: 1;
}

.confirm-overlay.confirm-exit {
  opacity: 0;
}

.confirm-modal {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  max-width: 400px;
  width: calc(100% - 2rem);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-overlay.show .confirm-modal {
  transform: scale(1) translateY(0);
}

.confirm-overlay.confirm-exit .confirm-modal {
  transform: scale(0.9) translateY(20px);
}

.confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.confirm-title {
  color: var(--text-primary, #f1f5f9);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.confirm-message {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  white-space: pre-line;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 100px;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #f1f5f9);
}

/* Mobile toast adjustments */
@media (max-width: 480px) {
  #toast-container {
    top: auto;
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
    width: auto;
  }
  
  .toast {
    transform: translateY(120%);
  }
  
  .toast.show {
    transform: translateY(0);
  }
  
  .toast.toast-exit {
    transform: translateY(120%);
  }
  
  .confirm-modal {
    margin: 1rem;
  }
}

/* ===== Mobile Responsive Fixes ===== */
@media (max-width: 768px) {
  .user-card,
  .pending-user {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .user-card .user-actions,
  .pending-user .user-actions {
    flex-wrap: wrap;
  }

  .user-card .user-actions .btn,
  .pending-user .user-actions .btn,
  .approve-btn,
  .admin-btn,
  .revoke-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .admin-tabs {
    gap: 0.2rem;
    padding: 0.25rem;
  }

  .admin-tab {
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
  }

  .stat-card .stat-number {
    font-size: 1.75rem;
  }

  .glass-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .device-card:hover {
    transform: translateY(-3px);
  }

  .stat-card:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 480px) {
  .admin-header h1 {
    font-size: 1.2rem;
  }

  .super-admin-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
  }

  .filter-tabs {
    flex-wrap: wrap;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Print Styles ===== */
@media print {
  body::before, body::after, .animated-bg {
    display: none;
  }
  
  .dashboard-header, .admin-header {
    background: white;
    color: black;
    backdrop-filter: none;
  }
}

/* ===== Light Theme Override ===== */
[data-theme="light"] {
  --background: #f1f5f9;
  --background-secondary: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-solid: #ffffff;
  --surface-hover: rgba(241, 245, 249, 0.9);
  --surface-active: rgba(226, 232, 240, 0.9);
  --border: rgba(148, 163, 184, 0.3);
  --border-light: rgba(148, 163, 184, 0.2);
  --text: #0f172a;
  --text-secondary: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(148, 163, 184, 0.2);
  --gradient-surface: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(241,245,249,0.9) 100%);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
}

[data-theme="light"] body::after {
  opacity: 0.15;
}

[data-theme="light"] .animated-bg .gradient-orb {
  opacity: 0.15;
}

[data-theme="light"] .dashboard-header,
[data-theme="light"] .admin-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

[data-theme="light"] .glass-card,
[data-theme="light"] .device-card,
[data-theme="light"] .stat-card {
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

[data-theme="light"] .btn-secondary {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text);
}

[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  color: var(--text-muted);
}
.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--primary);
}

/* ===== Password Strength Meter ===== */
.pw-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pw-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.pw-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.pw-label {
  font-size: 0.7rem;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}
