/* assets/css/style.css - MicroLab Global Cyber-Lab Design System */

:root, [data-theme="dark"] {
  --bg-primary: #070a12;
  --bg-secondary: #0e1526;
  --bg-card: rgba(18, 27, 47, 0.75);
  --bg-card-hover: rgba(26, 38, 64, 0.9);
  --bg-card-solid: #0e1526;
  --border-color: rgba(255, 90, 0, 0.2);
  --border-glow: rgba(255, 90, 0, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --heading-color: #ffffff;
  
  --navbar-bg: rgba(14, 21, 38, 0.85);
  --input-bg: rgba(15, 23, 42, 0.8);
  --input-border: rgba(255, 90, 0, 0.25);
  
  --brand-orange: #ff5a00;
  --brand-orange-hover: #e04f00;
  --brand-orange-light: rgba(255, 90, 0, 0.15);
  --cyan-accent: #ff5a00;
  --blue-accent: #0284c7;
  --purple-accent: #8b5cf6;
  --emerald-accent: #10b981;
  --amber-accent: #f59e0b;
  --rose-accent: #f43f5e;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.25);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace, Consolas, Courier;

  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
}

[data-theme="light"] {
  --bg-primary: #fdfbf7;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fff9f5;
  --bg-card-solid: #ffffff;
  --border-color: #fed7aa;
  --border-glow: rgba(255, 90, 0, 0.35);
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --heading-color: #0f172a;
  
  --navbar-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #fed7aa;
  
  --brand-orange: #ff5a00;
  --brand-orange-hover: #e04f00;
  --brand-orange-light: rgba(255, 90, 0, 0.1);
  --cyan-accent: #ff5a00;
  --blue-accent: #0284c7;
  --purple-accent: #7c3aed;
  --emerald-accent: #10b981;
  --amber-accent: #f59e0b;
  --rose-accent: #ff4757;
  
  --shadow-glow-cyan: 0 0 16px rgba(255, 90, 0, 0.2);
  --shadow-glow-blue: 0 0 16px rgba(2, 132, 199, 0.2);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);

  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(255, 90, 0, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(2, 132, 199, 0.04) 0px, transparent 50%);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: var(--theme-bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: -0.02em;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: var(--heading-color);
}

a {
  color: var(--cyan-accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--blue-accent);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

/* Glassmorphic Navbar & Unified Prodigy Navigation */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.prodigy-navbar {
  padding: 0.85rem 2rem;
  background: var(--bg-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.prodigy-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.prodigy-brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.prodigy-brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--brand-orange);
  letter-spacing: -0.03em;
}

.prodigy-nav-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prodigy-nav-item {
  position: relative;
}

.prodigy-nav-link {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.prodigy-nav-link:hover,
.prodigy-nav-link.active {
  color: var(--brand-orange);
  background: rgba(255, 90, 0, 0.08);
}

.chevron-icon {
  transition: transform 0.2s ease;
}

.has-dropdown:hover .chevron-icon {
  transform: rotate(180deg);
}

.prodigy-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 100;
  animation: fadeInDown 0.2s ease-out forwards;
}

.has-dropdown:hover .prodigy-dropdown-menu {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.prodigy-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.prodigy-dropdown-item:hover {
  background: rgba(255, 90, 0, 0.08);
}

.dropdown-icon {
  font-size: 1.25rem;
  margin-top: 2px;
}

.prodigy-dropdown-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--heading-color);
  margin-bottom: 2px;
}

.prodigy-dropdown-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

.prodigy-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.prodigy-login-link {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.prodigy-login-link:hover {
  color: var(--brand-orange);
}

.btn-prodigy-pill-primary {
  background: linear-gradient(180deg, #ff5a00 0%, #e04f00 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.65rem 1.45rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 0 #b83d00, 0 8px 15px rgba(255, 90, 0, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-prodigy-pill-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #b83d00, 0 12px 20px rgba(255, 90, 0, 0.4);
}

.btn-prodigy-pill-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b83d00;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--cyan-accent), var(--blue-accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-cyan);
}

.brand-logo svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 90, 0, 0.15);
  color: var(--brand-orange);
  border: 1px solid rgba(255, 90, 0, 0.35);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-orange);
  background: rgba(255, 90, 0, 0.08);
  border: 1px solid rgba(255, 90, 0, 0.2);
}

.nav-user-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem 0.3rem 0.4rem;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.theme-toggle-btn:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.theme-toggle-track {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

[data-theme="light"] .theme-toggle-track {
  background: rgba(245, 158, 11, 0.18);
}

.theme-toggle-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-icon-sun {
  display: none;
  color: #f59e0b;
}

.theme-icon-moon {
  display: block;
  color: #38bdf8;
}

[data-theme="light"] .theme-icon-sun {
  display: block;
}

[data-theme="light"] .theme-icon-moon {
  display: none;
}

.theme-toggle-text {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-accent), var(--blue-accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0891b2, #2563eb);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Layout Containers */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

.container-fluid {
  width: 100%;
  padding: 1rem 1.5rem;
}

/* Glassmorphic Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

[data-theme="light"] .form-control {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-offline {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
  .prodigy-nav-center {
    display: none !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  body {
    padding-bottom: 90px !important;
  }

  .container {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    justify-content: space-around;
    align-items: center;
  }

  .prodigy-navbar {
    padding: 0.65rem 1rem !important;
    gap: 0.5rem !important;
  }

  .prodigy-brand-link {
    gap: 0.45rem !important;
  }

  .prodigy-brand-logo {
    height: 28px !important;
  }

  .prodigy-brand-text {
    font-size: 1.15rem !important;
  }

  .prodigy-nav-actions {
    gap: 0.5rem !important;
  }

  .prodigy-nav-actions .btn-prodigy-pill-primary {
    display: none !important;
  }

  .theme-toggle-btn {
    padding: 0.25rem 0.35rem !important;
    gap: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .theme-toggle-text {
    display: none !important;
  }

  .prodigy-login-link {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.75rem !important;
    background: rgba(255, 90, 0, 0.1) !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(255, 90, 0, 0.3) !important;
    color: var(--brand-orange) !important;
    font-weight: 800 !important;
  }
}

@media (max-width: 640px) {
  .grid-cols-4, .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; }
  .navbar:not(.prodigy-navbar) { flex-direction: column; gap: 0.75rem; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
}

/* Mobile Bottom Navigation (Native App-Like across whole platform) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 66px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  padding: 0 0.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  transition: color 0.15s ease, transform 0.15s ease;
  position: relative;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: #ff5a00;
}

.bottom-nav-icon {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-2px);
}

.bottom-nav-icon.highlight-badge {
  background: #ff5a00;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin-top: -14px;
  box-shadow: 0 4px 15px rgba(255, 90, 0, 0.4);
}

.bottom-nav-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

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

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 90%;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.875rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.3s ease forwards;
}

.toast-success { border-left: 4px solid var(--emerald-accent); }
.toast-error { border-left: 4px solid var(--rose-accent); }
.toast-info { border-left: 4px solid var(--cyan-accent); }

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

/* Global Light Theme Specific Overrides */
[data-theme="light"] .brand-title {
  background: linear-gradient(90deg, #0f172a, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-badge {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: #0284c7;
  background: #f0f9ff;
  border-color: #bae6fd;
}

[data-theme="light"] .card {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card-title,
[data-theme="light"] .card h3,
[data-theme="light"] .card h2,
[data-theme="light"] .card h4 {
  color: #0f172a !important;
}

[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .modal-dialog {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

[data-theme="light"] .modal-dialog h2,
[data-theme="light"] .modal-dialog h3,
[data-theme="light"] .modal-dialog h4 {
  color: #0f172a !important;
}

[data-theme="light"] .toast {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

[data-theme="light"] footer {
  background: #ffffff !important;
  border-top-color: #e2e8f0 !important;
  color: #64748b !important;
}

[data-theme="light"] footer b {
  color: #0f172a !important;
}

/* Project Cards & Template Cards */
.project-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .project-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 0 15px rgba(6, 182, 212, 0.15);
}

[data-theme="light"] .project-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 0 15px rgba(2, 132, 199, 0.12);
  border-color: #38bdf8;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.project-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.project-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  margin-top: auto;
}

/* Template Cards */
.template-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.25s ease;
}

[data-theme="light"] .template-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.12);
}

.template-card-body {
  flex: 1;
}

.template-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.35rem 0 0.25rem 0;
}

.template-card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Board Badges */
.badge-board-uno {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

[data-theme="light"] .badge-board-uno {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.badge-board-esp32 {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .badge-board-esp32 {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.badge-board-esp8266 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .badge-board-esp8266 {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

/* Reusable Nested Cards & List Items */
.card-nested {
  background: rgba(10, 16, 28, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

[data-theme="light"] .card-nested {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.card-nested-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

[data-theme="light"] .card-nested-item {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-nested-item:hover {
  border-color: var(--border-glow);
}

.card-nested-item-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

[data-theme="light"] .card-nested-item-title a {
  color: #0f172a;
}

/* ==========================================================
   Admin User Monitoring & Detail Hub Styles
   ========================================================== */
.admin-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 2rem;
}

.badge-role-admin {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="light"] .badge-role-admin {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.badge-role-teacher {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="light"] .badge-role-teacher {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.badge-role-student {
  background: rgba(56, 189, 248, 0.12);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="light"] .badge-role-student {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.user-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange), #f59e0b);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--border-color);
}

.filter-pills-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.filter-pill-btn.active {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 90, 0, 0.25);
}

.admin-search-input {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  width: 260px;
  max-width: 100%;
  transition: all 0.2s ease;
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.15);
  width: 320px;
}

.admin-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.03);
  padding: 0.85rem 1.25rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

[data-theme="light"] .admin-table th {
  background: #f8fafc;
  color: #64748b;
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(255, 90, 0, 0.02);
}

/* User Detail Modal / Offcanvas */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.admin-modal-backdrop.open .admin-modal-card {
  transform: translateY(0) scale(1);
}

.admin-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.02);
}

.admin-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.admin-modal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.65rem 1.25rem;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.admin-modal-tab-btn:hover {
  color: var(--brand-orange);
}

.admin-modal-tab-btn.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

.timeline-feed {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -1.95rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-orange);
  border: 2px solid var(--bg-card);
}
