/* ============================================================
   QOYLLUR — Design System
   Empresa de Analítica de Datos e Investigación Informática
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Roboto+Mono:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2035;
  --bg-elevated: #1e2a45;

  /* Glass */
  --glass-bg: rgba(17, 24, 39, 0.45);
  --glass-bg-strong: rgba(17, 24, 39, 0.7);
  --glass-bg-subtle: rgba(17, 24, 39, 0.25);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --glass-blur: 20px;

  /* Accent Colors — Neon */
  --accent-cyan: #00f0ff;
  --accent-cyan-dim: #06d6a0;
  --accent-violet: #8b5cf6;
  --accent-violet-bright: #a855f7;
  --accent-emerald: #10b981;
  --accent-emerald-bright: #34d399;
  --accent-pink: #ec4899;
  --accent-amber: #f59e0b;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-accent: #00f0ff;

  /* Gradients */
  --gradient-cyan: linear-gradient(135deg, #06d6a0, #00f0ff);
  --gradient-violet: linear-gradient(135deg, #8b5cf6, #a855f7);
  --gradient-emerald: linear-gradient(135deg, #10b981, #34d399);
  --gradient-neon: linear-gradient(135deg, #00f0ff, #8b5cf6, #ec4899);
  --gradient-dark: linear-gradient(180deg, #0a0e1a 0%, #111827 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.15);
  --shadow-glow-violet: 0 0 20px rgba(139, 92, 246, 0.15);

  /* Spacing */
  --sidebar-width: 280px;
  --sidebar-collapsed: 80px;
  --navbar-height: 72px;
  --topbar-height: 64px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ============================================================
   2. Base Reset & Globals
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   3. Scrollbar Custom
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elevated) var(--bg-primary);
}

/* ============================================================
   4. Glassmorphism Classes
   ============================================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.glass-subtle {
  background: var(--glass-bg-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.glass-hover {
  transition: all var(--transition-base);
}

.glass-hover:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

/* ============================================================
   5. Neon Glow Borders & Accents
   ============================================================ */
.neon-border-cyan {
  position: relative;
}

.neon-border-cyan::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-cyan);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.neon-border-cyan:hover::before {
  opacity: 1;
}

.glow-text-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3), 0 0 30px rgba(0, 240, 255, 0.1);
}

.glow-text-violet {
  color: var(--accent-violet);
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.3), 0 0 30px rgba(139, 92, 246, 0.1);
}

/* ============================================================
   6. Typography Utilities
   ============================================================ */
.font-mono {
  font-family: 'Roboto Mono', 'Fira Code', monospace;
}

.text-gradient-neon {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-violet {
  background: var(--gradient-violet);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   7. Buttons
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--gradient-cyan);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
  transform: translateY(-2px);
}

/* ============================================================
   8. Animations & Keyframes
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(0, 240, 255, 0.1); }
  50% { border-color: rgba(0, 240, 255, 0.3); }
}

@keyframes particleFloat {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.5);
    opacity: 0;
  }
}

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

/* Animation utility classes */
.animate-fade-in-up {
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.animate-fade-in-down {
  animation: fadeInDown 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.animate-fade-in-right {
  animation: fadeInRight 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-shimmer {
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

/* Staggered delay classes */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* Intersection observer — hidden before scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   9. Navbar (Landing)
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  z-index: 1000;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.navbar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-cyan);
  border-radius: 1px;
  transition: width var(--transition-base);
}

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

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* ============================================================
   10. Hero Section
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0.6) 0%,
    rgba(10, 14, 26, 0.4) 40%,
    rgba(10, 14, 26, 0.85) 100%
  );
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.05);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulseGlow 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   11. Feature Cards (Landing)
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.feature-card {
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-cyan);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
  background: rgba(0, 240, 255, 0.15);
  box-shadow: var(--shadow-glow-cyan);
  transform: scale(1.05);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-icon.violet {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
}

.feature-card:hover .feature-icon.violet {
  background: rgba(139, 92, 246, 0.15);
  box-shadow: var(--shadow-glow-violet);
}

.feature-icon.emerald {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.feature-card:hover .feature-icon.emerald {
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.feature-icon.pink {
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
}

.feature-icon.amber {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   12. Metrics Counter Section
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.metric-item {
  text-align: center;
  padding: 24px;
}

.metric-value {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
   13. Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--glass-border);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--gradient-neon);
  opacity: 0.5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 16px;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-link {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ============================================================
   14. Dashboard — Sidebar
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-base);
  border-right: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.sidebar-logo {
  height: 32px;
  transition: opacity var(--transition-base);
}

.sidebar.collapsed .sidebar-logo {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.2);
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-base);
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 12px 8px;
  transition: opacity var(--transition-base);
}

.sidebar.collapsed .sidebar-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 2px;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.12);
}

.sidebar-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-item-label {
  transition: opacity var(--transition-base), width var(--transition-base);
}

.sidebar.collapsed .sidebar-item-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 10px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--glass-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info {
  transition: opacity var(--transition-base);
}

.sidebar.collapsed .sidebar-user-info {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   15. Dashboard — Top Bar
   ============================================================ */
.dashboard-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base);
}

.sidebar.collapsed ~ .dashboard-main,
.dashboard-layout.sidebar-collapsed .dashboard-main {
  margin-left: var(--sidebar-collapsed);
}

.topbar {
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  min-width: 280px;
  transition: all var(--transition-fast);
}

.topbar-search:focus-within {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.03);
  box-shadow: var(--shadow-glow-cyan);
}

.topbar-search svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.topbar-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
}

.topbar-search input::placeholder {
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.topbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.topbar-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-pink);
  border: 2px solid var(--bg-secondary);
}

.topbar-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   16. Dashboard — Content & Widgets Grid
   ============================================================ */
.dashboard-content {
  padding: 32px;
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.dashboard-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* KPI Cards row */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-base);
}

.kpi-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.kpi-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kpi-change.positive {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

.kpi-change.negative {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.kpi-sparkline {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

/* Widget grid */
.widgets-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.widget {
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.widget:hover {
  border-color: var(--glass-border-hover);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.widget-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.widget-actions {
  display: flex;
  gap: 8px;
}

.widget-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.widget-action-btn:hover {
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.2);
}

.widget-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Column spans */
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

@media (max-width: 1200px) {
  .col-span-4,
  .col-span-5,
  .col-span-7,
  .col-span-8 { grid-column: span 6; }
}

@media (max-width: 768px) {
  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8,
  .col-span-12 { grid-column: span 12; }

  .dashboard-content {
    padding: 16px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   17. Data Table Widget
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.data-table tbody td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-badge.info {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   18. Responsive — Dashboard Mobile
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0 !important;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .sidebar-overlay.active {
    display: block;
  }
}

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

  .topbar {
    padding: 0 16px;
  }

  .topbar-search {
    min-width: unset;
    flex: 1;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}
