/* ============================================================
   RD Vendora - Complete eCommerce SaaS Platform
   Core Design System & Styles
   ============================================================ */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
  /* Colors - Light Mode */
  --bg-primary: #fafbfc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f5f7;
  --bg-elevated: #ffffff;
  --bg-hover: #f0f1f3;
  --bg-active: #e8e9ec;
  
  --surface-primary: #ffffff;
  --surface-secondary: #f8f9fa;
  --surface-tertiary: #f0f1f3;
  
  --text-primary: #1a1d23;
  --text-secondary: #5a6578;
  --text-muted: #8b95a5;
  --text-inverse: #ffffff;
  
  --border-primary: #e4e7ec;
  --border-secondary: #d1d5db;
  --border-focus: #4f46e5;
  
  /* Accent Colors */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --primary-dark: #3730a3;
  
  --success: #10b981;
  --success-light: #d1fae5;
  --success-dark: #047857;
  
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-dark: #b45309;
  
  --error: #ef4444;
  --error-light: #fee2e2;
  --error-dark: #b91c1c;
  
  --info: #3b82f6;
  --info-light: #dbeafe;
  --info-dark: #1d4ed8;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.12) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.08) 0%, transparent 50%),
                    radial-gradient(ellipse at 40% 80%, rgba(16,185,129,0.06) 0%, transparent 50%);
  --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Spacing */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 40px rgba(79,70,229,0.15);
  --shadow-glow-sm: 0 0 20px rgba(79,70,229,0.10);
  
  /* 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: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;
  --z-overlay: 900;
  
  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
  --container-max: 1280px;
  --container-wide: 1440px;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
  --bg-primary: #0c0e14;
  --bg-secondary: #14161f;
  --bg-tertiary: #1a1d28;
  --bg-elevated: #1e2130;
  --bg-hover: #242838;
  --bg-active: #2a2e40;
  
  --surface-primary: #14161f;
  --surface-secondary: #1a1d28;
  --surface-tertiary: #1e2130;
  
  --text-primary: #e8eaf0;
  --text-secondary: #9ca3b0;
  --text-muted: #6b7280;
  --text-inverse: #1a1d23;
  
  --border-primary: #2d3139;
  --border-secondary: #3a3f4a;
  --border-focus: #6366f1;
  
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: rgba(99,102,241,0.15);
  --primary-dark: #4f46e5;
  
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.20);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.30), 0 2px 4px rgba(0,0,0,0.20);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35), 0 4px 8px rgba(0,0,0,0.25);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.40), 0 8px 16px rgba(0,0,0,0.30);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.20);
  --shadow-glow-sm: 0 0 20px rgba(99,102,241,0.15);
  
  --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.05) 0%, transparent 50%),
                    radial-gradient(ellipse at 40% 80%, rgba(16,185,129,0.04) 0%, transparent 50%);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---- Selection ---- */
::selection {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-wide {
  max-width: var(--container-wide);
}

.container-sm {
  max-width: 960px;
}

/* ---- Typography Utilities ---- */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-inverse { color: var(--text-inverse); }

.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }

/* ---- Spacing Utilities ---- */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }
.pt-12 { padding-top: var(--space-12); }
.pt-20 { padding-top: var(--space-20); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }
.pb-12 { padding-bottom: var(--space-12); }
.pb-20 { padding-bottom: var(--space-20); }

/* ---- Flexbox ---- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ---- Grid ---- */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ---- Display ---- */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* ---- Position ---- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ---- Width/Height ---- */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ---- Text Alignment ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ---- Border Radius ---- */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ---- Backgrounds ---- */
.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-tertiary { background: var(--bg-tertiary); }
.bg-elevated { background: var(--bg-elevated); }
.bg-accent { background: var(--primary); }

/* ---- Shadows ---- */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ---- Overflow ---- */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* ---- Cursor ---- */
.cursor-pointer { cursor: pointer; }

/* ---- Transitions ---- */
.transition { transition: all var(--transition-base); }

/* ============================================================
   GLASSMORPHISM
   ============================================================ */
.glass {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.25);
}

[data-theme="dark"] .glass {
  background: rgba(20,22,31,0.75);
  border-color: rgba(255,255,255,0.06);
}

.glass-strong {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.35);
}

[data-theme="dark"] .glass-strong {
  background: rgba(20,22,31,0.90);
  border-color: rgba(255,255,255,0.08);
}

.glass-card {
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

[data-theme="dark"] .glass-card {
  background: rgba(26,29,40,0.60);
  border-color: rgba(255,255,255,0.05);
  box-shadow: 0 8px 32px rgba(0,0,0,0.20);
}

/* ============================================================
   GRADIENTS & EFFECTS
   ============================================================ */
.gradient-bg {
  background: var(--gradient-mesh);
}

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

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glow {
  box-shadow: var(--shadow-glow);
}

.glow-sm {
  box-shadow: var(--shadow-glow-sm);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border: none;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-secondary);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--gradient-error);
  color: var(--text-inverse);
  border: none;
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239,68,68,0.35);
}

.btn-success {
  background: var(--gradient-success);
  color: var(--text-inverse);
  border: none;
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

/* ---- Icon Button ---- */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
}

.btn-icon-lg {
  width: 44px;
  height: 44px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success-dark);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning-dark);
}

.badge-error {
  background: var(--error-light);
  color: var(--error-dark);
}

.badge-info {
  background: var(--info-light);
  color: var(--info-dark);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

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

.card-header {
  padding: var(--space-5) var(--space-6) 0;
}

.card-body {
  padding: var(--space-5) var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-primary);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-label .required::after {
  content: ' *';
  color: var(--error);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

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

.form-input:hover {
  border-color: var(--border-secondary);
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-light);
}

.form-input.success {
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238b95a5' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--error);
  margin-top: var(--space-1);
}

/* ---- Input Groups ---- */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-input {
  border-radius: 0;
  flex: 1;
}

.input-group .form-input:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-input:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group .input-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.input-group .input-addon:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}

.input-group .input-addon:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
}

/* ---- Checkbox & Radio ---- */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---- Toggle Switch ---- */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-secondary);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.data-table {
  width: 100%;
  font-size: var(--text-sm);
}

.data-table thead th {
  padding: var(--space-3) var(--space-4);
  font-weight: var(--font-semibold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
  text-align: left;
}

.data-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab-btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
}

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

/* ============================================================
   NAVBAR - Landing Pages
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled.glass {
  background: rgba(255,255,255,0.85);
}

[data-theme="dark"] .navbar.scrolled.glass {
  background: rgba(20,22,31,0.85);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.navbar-brand .rdv-brand-logo {
  height: 28px;
  width: auto;
  max-width: 100px;
  padding: 1px 4px;
  border-radius: 6px;
  object-fit: contain;
}

.navbar-brand .rdv-brand-name,
.footer-logo .rdv-brand-name,
.rdv-brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: inherit;
  line-height: 1;
}

.navbar-brand-icon {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
  padding: 2px;
}

.navbar-brand-icon img,
.navbar-brand-icon .rdv-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

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

.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

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

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 0.75fr) minmax(240px, 1.5fr);
  gap: var(--space-10);
  margin-bottom: var(--space-12);
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}
.footer-logo .rdv-brand-logo {
  height: 48px;
  max-width: 200px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand-desc {
  color: var(--text-secondary);
  margin-top: var(--space-4);
  line-height: var(--leading-relaxed);
}

.footer-column h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-primary);
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-developer-credit {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

.footer-developer-link {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-developer-link:hover {
  color: var(--primary-hover, var(--primary));
  text-decoration: underline;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  z-index: 0;
}

.hero-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(79,70,229,0.25);
  top: -100px;
  right: -100px;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(236,72,153,0.15);
  bottom: -50px;
  left: -50px;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(16,185,129,0.12);
  top: 50%;
  left: 30%;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  max-width: 700px;
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 560px;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.hero-stats {
  display: flex;
  gap: var(--space-12);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hero-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-dashboard-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--space-20) 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

.section-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature-card {
  padding: var(--space-8);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-secondary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}

.feature-icon.purple { background: var(--primary-light); color: var(--primary); }
.feature-icon.green { background: var(--success-light); color: var(--success-dark); }
.feature-icon.amber { background: var(--warning-light); color: var(--warning-dark); }
.feature-icon.red { background: var(--error-light); color: var(--error-dark); }
.feature-icon.blue { background: var(--info-light); color: var(--info-dark); }

.feature-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.feature-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow-sm);
  transform: scale(1.02);
}

.pricing-card.popular:hover {
  transform: scale(1.02) translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-4);
  background: var(--gradient-primary);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.pricing-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.pricing-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
}

.pricing-amount {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
}

.pricing-period {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.pricing-feature.included {
  color: var(--text-primary);
}

.pricing-feature svg {
  flex-shrink: 0;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.testimonial-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.testimonial-stars {
  display: flex;
  gap: var(--space-1);
  color: var(--warning);
  margin-bottom: var(--space-4);
}

.testimonial-text {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.testimonial-name {
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.testimonial-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-secondary);
}

.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 var(--space-6) var(--space-6);
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  position: relative;
  padding: var(--space-20) 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  border-radius: var(--radius-2xl);
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  padding: var(--space-12);
}

.cta-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.cta-description {
  font-size: var(--text-lg);
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: var(--leading-relaxed);
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.btn-white {
  background: white;
  color: var(--primary);
  font-weight: var(--font-semibold);
}

.btn-white:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.active):not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
}

.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 24px; }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border-primary);
  margin: var(--space-6) 0;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
  color: var(--text-muted);
}

.empty-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.empty-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 400px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

/* ============================================================
   STEPPER
   ============================================================ */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.step-circle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-muted);
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--text-primary);
}

.step.completed .step-label {
  color: var(--success-dark);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--border-primary);
  margin: 0 var(--space-3);
}

.step-connector.completed {
  background: var(--success);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ============================================================
   TOOLTIP
   ============================================================ */
[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: var(--space-1) var(--space-3);
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: var(--z-tooltip);
}

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

/* ============================================================
   PRODUCT CARD (Storefront)
   ============================================================ */
.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-secondary);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge-sale {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-2);
  background: var(--error);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-sm);
}

.product-wishlist {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.product-wishlist:hover {
  color: var(--error);
  background: var(--error-light);
}

.product-wishlist.active {
  color: var(--error);
}

.product-info {
  padding: var(--space-4);
}

.product-category {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.product-name {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.product-rating-stars {
  display: flex;
  color: var(--warning);
}

.product-rating-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.product-price {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.product-price-current {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.product-price-original {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-primary);
}

.cart-drawer-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6);
}

.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-primary);
}

.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-variant {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

.qty-btn:hover {
  background: var(--bg-hover);
}

.qty-value {
  min-width: 28px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.cart-item-price {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.cart-drawer-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-primary);
  background: var(--bg-secondary);
}

.cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.cart-subtotal-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.cart-subtotal-value {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.cart-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-4);
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}

.search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform var(--transition-base);
}

.search-overlay.active .search-modal {
  transform: translateY(0);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-primary);
}

.search-input-wrapper svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--text-lg);
  background: transparent;
  color: var(--text-primary);
}

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

.search-shortcut {
  padding: var(--space-1) var(--space-2);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.page-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-2);
}

.skeleton-text-sm { width: 60%; }
.skeleton-text-md { width: 80%; }
.skeleton-text-lg { width: 100%; }

.skeleton-circle {
  border-radius: var(--radius-full);
}

.skeleton-card {
  height: 200px;
}

/* ============================================================
   DRAG & DROP UPLOADER
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--text-muted);
}

.upload-zone-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.upload-zone-text span {
  color: var(--primary);
  font-weight: var(--font-medium);
}

.upload-zone-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================================
   ONBOARDING STYLES
   ============================================================ */
.onboarding-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-8);
  border-bottom: 1px solid var(--border-primary);
}

.onboarding-progress {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.onboarding-progress-bar {
  width: 200px;
  height: 6px;
}

.onboarding-step {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  flex: 1;
}

.onboarding-step-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2);
  text-align: center;
}

.onboarding-step-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-8);
}

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-8);
  border-top: 1px solid var(--border-primary);
}

/* Theme Selection */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.theme-card {
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.theme-card:hover {
  border-color: var(--border-secondary);
  transform: translateY(-2px);
}

.theme-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.theme-preview {
  aspect-ratio: 4/3;
  background: var(--bg-tertiary);
  position: relative;
}

.theme-info {
  padding: var(--space-4);
}

.theme-name {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.theme-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Store Preview */
.store-preview-frame {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-secondary);
}

.store-preview-header {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.store-preview-body {
  padding: var(--space-6);
}

/* ============================================================
   ORDER SUCCESS PAGE
   ============================================================ */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.success-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-12);
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--success-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.success-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
}

.success-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.success-details {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  text-align: left;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

.success-detail-label {
  color: var(--text-secondary);
}

.success-detail-value {
  font-weight: var(--font-medium);
}

/* ============================================================
   INVENTORY MANAGEMENT
   ============================================================ */
.stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.stock-in { background: var(--success); }
.stock-low { background: var(--warning); }
.stock-out { background: var(--error); }

/* ============================================================
   MARKETING & DISCOUNTS
   ============================================================ */
.coupon-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}

.coupon-code {
  padding: var(--space-2) var(--space-4);
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-secondary);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-item.unread {
  background: var(--primary-light);
}

.notification-item.unread:hover {
  background: rgba(99,102,241,0.15);
}

.notification-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-1);
}

.notification-text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.notification-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================================
   DOMAINS
   ============================================================ */
.domain-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}

.domain-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.domain-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--primary);
}

.domain-name {
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
}

.domain-status {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================================
   BILLING
   ============================================================ */
.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-primary);
}

.invoice-row:last-child {
  border-bottom: none;
}

.invoice-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.invoice-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.invoice-details h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.invoice-details p {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.invoice-amount {
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
}

.error-code {
  font-size: 120px;
  font-weight: var(--font-bold);
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.error-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
}

.error-text {
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto var(--space-8);
  line-height: var(--leading-relaxed);
}

/* ============================================================
   MAINTENANCE PAGE
   ============================================================ */
.maintenance-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-6);
  background: var(--warning-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
}

/* ============================================================
   ICONS (SVG inline)
   ============================================================ */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
