/* ═══════════════════════════════════════════════════════════
   Nova Design System v2.0 — RobovAI Nova
   Unified premium dark theme with glassmorphism
   ═══════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=Tajawal:wght@400;500;700&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  /* Backgrounds */
  --nova-bg: #050508;
  --nova-bg-raised: #0a0a0f;
  --nova-surface: rgba(255, 255, 255, 0.03);
  --nova-surface-hover: rgba(255, 255, 255, 0.06);
  --nova-glass: rgba(255, 255, 255, 0.04);
  --nova-glass-hover: rgba(255, 255, 255, 0.08);
  --nova-glass-border: rgba(255, 255, 255, 0.08);
  --nova-glass-border-hover: rgba(255, 255, 255, 0.14);

  /* Brand Colors */
  --nova-violet: #7c3aed;
  --nova-violet-hover: #6d28d9;
  --nova-violet-glow: rgba(124, 58, 237, 0.25);
  --nova-violet-soft: rgba(124, 58, 237, 0.12);
  --nova-cyan: #06b6d4;
  --nova-cyan-hover: #0891b2;
  --nova-cyan-glow: rgba(6, 182, 212, 0.25);
  --nova-cyan-soft: rgba(6, 182, 212, 0.12);

  /* Status Colors */
  --nova-success: #10b981;
  --nova-success-soft: rgba(16, 185, 129, 0.12);
  --nova-warning: #f59e0b;
  --nova-warning-soft: rgba(245, 158, 11, 0.12);
  --nova-danger: #ef4444;
  --nova-danger-soft: rgba(239, 68, 68, 0.12);
  --nova-info: #3b82f6;
  --nova-info-soft: rgba(59, 130, 246, 0.12);

  /* Text */
  --nova-text: #f8fafc;
  --nova-text-secondary: #94a3b8;
  --nova-text-muted: #64748b;
  --nova-text-dim: #475569;

  /* Gradient */
  --nova-gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
  --nova-gradient-text: linear-gradient(135deg, #a78bfa, #22d3ee);
  --nova-gradient-subtle: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.15),
    rgba(6, 182, 212, 0.15)
  );

  /* Typography */
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', 'Tajawal', sans-serif;
  --font-ar: 'Tajawal', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-violet: 0 0 30px rgba(124, 58, 237, 0.2);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.2);

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

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--nova-bg);
  color: var(--nova-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL Support */
[dir='rtl'] body,
[lang='ar'] body {
  font-family: var(--font-ar);
}
[dir='rtl'] h1,
[dir='rtl'] h2,
[dir='rtl'] h3,
[dir='rtl'] h4,
[dir='rtl'] h5,
[dir='rtl'] h6 {
  font-family: var(--font-ar);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5);
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--nova-text);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

p {
  color: var(--nova-text-secondary);
  line-height: 1.7;
}

a {
  color: var(--nova-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--nova-cyan-hover);
}

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

.text-muted {
  color: var(--nova-text-muted);
}
.text-secondary {
  color: var(--nova-text-secondary);
}
.text-center {
  text-align: center;
}

/* ─── Background Effects ─── */
.nova-bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nova-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: novaOrbDrift 20s ease-in-out infinite alternate;
}

.nova-orb--violet {
  width: 500px;
  height: 500px;
  background: var(--nova-violet);
  top: -10%;
  right: -5%;
}

.nova-orb--cyan {
  width: 400px;
  height: 400px;
  background: var(--nova-cyan);
  bottom: -10%;
  left: -5%;
  animation-delay: -10s;
}

.nova-orb--small {
  width: 200px;
  height: 200px;
  opacity: 0.15;
}

/* Grid overlay */
.nova-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes novaOrbDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -20px) scale(1.05);
  }
  100% {
    transform: translate(-20px, 30px) scale(0.95);
  }
}

/* ─── Glass Card ─── */
.nova-card {
  background: var(--nova-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nova-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}
.nova-card:hover {
  background: var(--nova-glass-hover);
  border-color: var(--nova-glass-border-hover);
  box-shadow: var(--shadow-md);
}

.nova-card--elevated {
  background: var(--nova-bg-raised);
  border-color: var(--nova-glass-border);
}

.nova-card--glow:hover {
  box-shadow: var(--shadow-glow-violet);
}

.nova-card--interactive {
  cursor: pointer;
}
.nova-card--interactive:hover {
  transform: translateY(-2px);
}

/* ─── Buttons ─── */
.nova-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  outline: none;
}

.nova-btn--primary {
  background: var(--nova-gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}
.nova-btn--primary:hover {
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
  color: #fff;
}

.nova-btn--secondary {
  background: var(--nova-glass);
  color: var(--nova-text);
  border: 1px solid var(--nova-glass-border);
}
.nova-btn--secondary:hover {
  background: var(--nova-glass-hover);
  border-color: var(--nova-glass-border-hover);
  color: var(--nova-text);
}

.nova-btn--outline {
  background: transparent;
  color: var(--nova-violet);
  border: 1px solid var(--nova-violet);
}
.nova-btn--outline:hover {
  background: var(--nova-violet-soft);
}

.nova-btn--danger {
  background: var(--nova-danger-soft);
  color: var(--nova-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.nova-btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.nova-btn--ghost {
  background: transparent;
  color: var(--nova-text-secondary);
}
.nova-btn--ghost:hover {
  background: var(--nova-surface);
  color: var(--nova-text);
}

.nova-btn--sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}
.nova-btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.nova-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ─── Inputs ─── */
.nova-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--nova-text);
  background: var(--nova-surface);
  border: 1px solid var(--nova-glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

[dir='rtl'] .nova-input {
  font-family: var(--font-ar);
}

.nova-input:focus {
  border-color: var(--nova-violet);
  box-shadow: 0 0 0 3px var(--nova-violet-soft);
}

.nova-input::placeholder {
  color: var(--nova-text-dim);
}

.nova-input--error {
  border-color: var(--nova-danger);
  box-shadow: 0 0 0 3px var(--nova-danger-soft);
}

.nova-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--nova-text-secondary);
  margin-bottom: 6px;
}

.nova-input-group {
  position: relative;
  margin-bottom: var(--space-md);
}

.nova-input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nova-text-muted);
  font-size: 1rem;
  pointer-events: none;
}
[dir='rtl'] .nova-input-icon {
  right: 14px;
}
[dir='ltr'] .nova-input-icon {
  left: 14px;
}
[dir='rtl'] .nova-input-group .nova-input {
  padding-right: 42px;
}
[dir='ltr'] .nova-input-group .nova-input {
  padding-left: 42px;
}

/* ─── Navigation ─── */
.nova-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nova-glass-border);
  padding: 0 var(--space-lg);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nova-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--nova-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.nova-nav__brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nova-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.nova-nav__link {
  padding: 8px 14px;
  color: var(--nova-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.nova-nav__link:hover {
  color: var(--nova-text);
  background: var(--nova-surface);
}
.nova-nav__link--active {
  color: var(--nova-cyan);
  background: var(--nova-cyan-soft);
}

.nova-nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--nova-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
}

/* ─── Toast ─── */
.nova-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: var(--z-toast);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
  max-width: 90vw;
  text-align: center;
}

.nova-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nova-toast--success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.nova-toast--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.nova-toast--info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}
.nova-toast--warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ─── Modal ─── */
.nova-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nova-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.nova-modal {
  width: 90%;
  max-width: 480px;
  background: var(--nova-bg-raised);
  border: 1px solid var(--nova-glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  animation: novaModalIn 0.3s ease;
}

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

.nova-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.nova-modal__body {
  color: var(--nova-text-secondary);
  margin-bottom: var(--space-lg);
}

.nova-modal__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

[dir='rtl'] .nova-modal__actions {
  justify-content: flex-start;
}

/* ─── Badge / Tag ─── */
.nova-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.nova-badge--violet {
  background: var(--nova-violet-soft);
  color: var(--nova-violet);
}
.nova-badge--cyan {
  background: var(--nova-cyan-soft);
  color: var(--nova-cyan);
}
.nova-badge--success {
  background: var(--nova-success-soft);
  color: var(--nova-success);
}
.nova-badge--warning {
  background: var(--nova-warning-soft);
  color: var(--nova-warning);
}
.nova-badge--danger {
  background: var(--nova-danger-soft);
  color: var(--nova-danger);
}

/* ─── Grid Layouts ─── */
.nova-grid {
  display: grid;
  gap: var(--space-lg);
}
.nova-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.nova-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.nova-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}
.nova-grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.nova-flex {
  display: flex;
}
.nova-flex--center {
  align-items: center;
  justify-content: center;
}
.nova-flex--between {
  align-items: center;
  justify-content: space-between;
}
.nova-flex--col {
  flex-direction: column;
}
.nova-flex--gap-sm {
  gap: var(--space-sm);
}
.nova-flex--gap-md {
  gap: var(--space-md);
}
.nova-flex--gap-lg {
  gap: var(--space-lg);
}
.nova-flex--wrap {
  flex-wrap: wrap;
}

/* ─── Container ─── */
.nova-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nova-container--narrow {
  max-width: 640px;
}
.nova-container--medium {
  max-width: 900px;
}
.nova-container--wide {
  max-width: 1400px;
}

/* ─── Section ─── */
.nova-section {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}

.nova-section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.nova-section__title {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.nova-section__subtitle {
  color: var(--nova-text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Stats Card ─── */
.nova-stat {
  text-align: center;
  padding: var(--space-lg);
}

.nova-stat__value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  background: var(--nova-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nova-stat__label {
  font-size: 0.85rem;
  color: var(--nova-text-muted);
  margin-top: 4px;
}

/* ─── Table ─── */
.nova-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--nova-glass-border);
}

.nova-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.nova-table th {
  padding: 12px 16px;
  text-align: start;
  font-weight: 600;
  color: var(--nova-text-secondary);
  background: var(--nova-surface);
  border-bottom: 1px solid var(--nova-glass-border);
}

.nova-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--nova-text-secondary);
}

.nova-table tbody tr:hover {
  background: var(--nova-surface);
}

/* ─── Toggle Switch ─── */
.nova-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--nova-surface);
  border: 1px solid var(--nova-glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nova-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--nova-text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

[dir='rtl'] .nova-toggle::after {
  left: auto;
  right: 3px;
}

.nova-toggle.active {
  background: var(--nova-violet-soft);
  border-color: var(--nova-violet);
}

.nova-toggle.active::after {
  background: var(--nova-violet);
  transform: translateX(22px);
}

[dir='rtl'] .nova-toggle.active::after {
  transform: translateX(-22px);
}

/* ─── Slider / Range ─── */
.nova-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--nova-surface);
  border-radius: var(--radius-full);
  outline: none;
}

.nova-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--nova-gradient);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
}

.nova-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--nova-gradient);
  cursor: pointer;
}

/* ─── Progress Bar ─── */
.nova-progress {
  width: 100%;
  height: 6px;
  background: var(--nova-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.nova-progress__bar {
  height: 100%;
  background: var(--nova-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ─── Divider ─── */
.nova-divider {
  border: none;
  height: 1px;
  background: var(--nova-glass-border);
  margin: var(--space-lg) 0;
}

/* ─── Spinner ─── */
.nova-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--nova-glass-border);
  border-top-color: var(--nova-violet);
  border-radius: 50%;
  animation: novaSpin 0.6s linear infinite;
}
.nova-spinner--lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes novaSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Page Header ─── */
.nova-page-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.nova-page-header__title {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.nova-page-header__subtitle {
  color: var(--nova-text-secondary);
  font-size: 1rem;
}

/* ─── Sidebar Layout ─── */
.nova-layout-sidebar {
  display: flex;
  min-height: 100vh;
}

.nova-sidebar {
  width: 260px;
  background: var(--nova-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-inline-end: 1px solid var(--nova-glass-border);
  padding: var(--space-lg) 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: var(--z-fixed);
  overflow-y: auto;
}

[dir='rtl'] .nova-sidebar {
  right: 0;
}
[dir='ltr'] .nova-sidebar {
  left: 0;
}

.nova-sidebar__header {
  padding: 0 var(--space-lg) var(--space-lg);
  border-bottom: 1px solid var(--nova-glass-border);
  margin-bottom: var(--space-md);
}

.nova-sidebar__nav {
  list-style: none;
  padding: 0 var(--space-sm);
  flex: 1;
}

.nova-sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  margin-bottom: 2px;
  color: var(--nova-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.nova-sidebar__item:hover {
  background: var(--nova-surface);
  color: var(--nova-text);
}

.nova-sidebar__item.active {
  background: var(--nova-violet-soft);
  color: var(--nova-violet);
}

.nova-main-content {
  flex: 1;
  padding: var(--space-lg);
}

[dir='rtl'] .nova-main-content {
  margin-right: 260px;
}
[dir='ltr'] .nova-main-content {
  margin-left: 260px;
}

/* ─── Tabs ─── */
.nova-tabs {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 1px solid var(--nova-glass-border);
  padding: 0 var(--space-sm);
  overflow-x: auto;
}

.nova-tab {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nova-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nova-tab:hover {
  color: var(--nova-text-secondary);
}

.nova-tab.active {
  color: var(--nova-violet);
  border-bottom-color: var(--nova-violet);
}

.nova-tab-content {
  display: none;
  animation: novaFadeIn 0.3s ease;
}

.nova-tab-content.active {
  display: block;
}

/* ─── Animations ─── */
@keyframes novaFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

@keyframes novaScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes novaPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.nova-animate-fadeIn {
  animation: novaFadeIn 0.4s ease both;
}
.nova-animate-fadeInUp {
  animation: novaFadeInUp 0.5s ease both;
}
.nova-animate-scaleIn {
  animation: novaScaleIn 0.4s ease both;
}

/* Stagger children */
.nova-stagger > *:nth-child(1) {
  animation-delay: 0.05s;
}
.nova-stagger > *:nth-child(2) {
  animation-delay: 0.1s;
}
.nova-stagger > *:nth-child(3) {
  animation-delay: 0.15s;
}
.nova-stagger > *:nth-child(4) {
  animation-delay: 0.2s;
}
.nova-stagger > *:nth-child(5) {
  animation-delay: 0.25s;
}
.nova-stagger > *:nth-child(6) {
  animation-delay: 0.3s;
}
.nova-stagger > *:nth-child(7) {
  animation-delay: 0.35s;
}
.nova-stagger > *:nth-child(8) {
  animation-delay: 0.4s;
}

/* Reveal on scroll (driven by JS IntersectionObserver) */
.nova-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.nova-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Utility Classes ─── */
.nova-hidden {
  display: none !important;
}
.nova-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nova-mt-sm {
  margin-top: var(--space-sm);
}
.nova-mt-md {
  margin-top: var(--space-md);
}
.nova-mt-lg {
  margin-top: var(--space-lg);
}
.nova-mt-xl {
  margin-top: var(--space-xl);
}
.nova-mb-sm {
  margin-bottom: var(--space-sm);
}
.nova-mb-md {
  margin-bottom: var(--space-md);
}
.nova-mb-lg {
  margin-bottom: var(--space-lg);
}
.nova-mb-xl {
  margin-bottom: var(--space-xl);
}
.nova-p-md {
  padding: var(--space-md);
}
.nova-p-lg {
  padding: var(--space-lg);
}

/* ─── Footer ─── */
.nova-footer {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  color: var(--nova-text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--nova-glass-border);
}

.nova-footer a {
  color: var(--nova-text-secondary);
}
.nova-footer a:hover {
  color: var(--nova-cyan);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .nova-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }

  .nova-grid--2,
  .nova-grid--3,
  .nova-grid--4 {
    grid-template-columns: 1fr;
  }

  .nova-nav {
    padding: 0 var(--space-md);
  }

  .nova-nav__links {
    display: none;
    position: fixed;
    inset: 0;
    top: 64px;
    flex-direction: column;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    gap: var(--space-xs);
    z-index: var(--z-overlay);
  }

  .nova-nav__links.open {
    display: flex;
  }
  .nova-nav__mobile-toggle {
    display: block;
  }

  .nova-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  [dir='rtl'] .nova-sidebar {
    transform: translateX(100%);
  }
  .nova-sidebar.open {
    transform: translateX(0);
  }
  .nova-main-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .nova-container {
    padding: 0 var(--space-md);
  }
  .nova-section {
    padding: var(--space-2xl) 0;
  }

  .nova-page-header {
    padding: var(--space-xl) 0 var(--space-lg);
  }
  .nova-page-header__title {
    font-size: 1.4rem;
  }

  .nova-modal {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  .nova-btn--lg {
    padding: 12px 24px;
  }
  .nova-card {
    padding: var(--space-md);
  }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .nova-reveal {
    opacity: 1;
    transform: none;
  }
  .nova-orb {
    animation: none;
  }
}
