:root {
  /* Brand Colors */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* Vibrant Gradients */
  --gradient-hero: linear-gradient(135deg, #1e1b4b, #4338ca, #7c3aed);
  --gradient-btn: linear-gradient(90deg, #4f46e5, #6366f1);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));

  /* Secondary/Success Colors */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-700: #047857;

  /* Warning/Attention Colors */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-700: #b45309;

  /* Error/Danger Colors */
  --error-50: #fef2f2;
  --error-100: #fee2e2;
  --error-500: #ef4444;
  --error-700: #b91c1c;

  /* Neutral/Slate Colors */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Global Settings */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

body {
  font-family: var(--font-sans);
  margin: 0;
  background-color: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Utilities */
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Headers & Reset */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

button {
  font-family: inherit;
}

/* Layout Core */
.dashboard-shell {
  display: flex;
  min-height: 100vh;
  background: var(--slate-50);
}

/* Sidebar */
.dashboard-sidebar {
  width: 280px;
  background: var(--slate-900);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 2rem;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--primary-500);
  border-radius: var(--radius-md);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.sidebar-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  margin-bottom: 0.75rem;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--slate-400);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sidebar-link.active {
  background: var(--primary-600);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-help {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-help p {
  color: var(--slate-400);
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
}

/* Main Content Area */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Prevent overflow */
}

.dashboard-topbar {
  background: white;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-topbar h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.dashboard-topbar p {
  color: var(--slate-500);
  margin: 0;
  font-size: 0.95rem;
}

.dashboard-content {
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

/* Cards & Sections */
.section-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  margin-bottom: 1.5rem;
}

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

.section-card header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Stats */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card h4 {
  color: var(--slate-500);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.stat-card .stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate-900);
}

/* Tables */
.table-card {
  overflow: hidden;
  padding: 0;
}

.table-card header {
  padding: 1.5rem 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th {
  text-align: start;
  padding: 1rem 1.5rem;
  background: var(--slate-50);
  color: var(--slate-500);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--slate-200);
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  font-size: 0.95rem;
  color: var(--slate-700);
}

tr:last-child td {
  border-bottom: none;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: var(--primary-600);
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.button:hover {
  background: var(--primary-700);
  color: white;
  transform: translateY(-1px);
}

.button-secondary {
  background: white;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.button-secondary:hover {
  background: var(--slate-50);
  color: var(--slate-800);
  border-color: var(--slate-400);
}

.button-ghost {
  background: transparent;
  color: var(--primary-600);
  padding: 0.5rem 1rem;
  box-shadow: none;
}

.button-ghost:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

/* Forms */
form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--slate-900);
  background: white;
  transition: all 0.2s;
  box-sizing: border-box;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-100);
}

/* Custom Select Styling */
.select-wrapper {
  position: relative;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-switcher select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  min-width: 100px;
  background-color: transparent;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
}

.language-switcher select:hover {
  background-color: var(--slate-100);
}

.language-switcher select:focus {
  box-shadow: none;
  border-color: var(--slate-300);
}

/* Badges & Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.tag-success {
  background: var(--success-100);
  color: var(--success-700);
}

.tag-warning {
  background: var(--warning-100);
  color: var(--warning-700);
}

/* Utilities */
.muted {
  color: var(--slate-500);
}

.w-full {
  width: 100%;
}

.mt-4 {
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-shell {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  }
}

/* Auth Centered Layout */
.auth-body {
  background: var(--slate-50);
  background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-centered-shell {
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
}

.auth-card-centered {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.03);
  text-align: center;
}

.auth-card-centered h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-card-centered p {
  color: var(--slate-500);
  margin-bottom: 2rem;
}

.auth-brand {
  display: inline-flex;
  margin-bottom: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-600);
  color: white;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

/* Landing Page Styles */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-nav .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-nav .nav-links {
  display: flex;
  gap: 2rem;
}

.landing-nav a {
  color: var(--slate-300);
  font-weight: 500;
  font-size: 0.95rem;
}

.landing-nav a:hover {
  color: white;
}

.hero-section {
  padding: 8rem 2rem 5rem;
  background: var(--slate-900);
  color: white;
  text-align: center;
  overflow: hidden;
  position: relative;
}

/* Pricing Grid Fix */
.pricing-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  flex: 1;
  min-width: 300px;
  max-width: 380px;
  background: white;
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  color: var(--primary-300);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, white, var(--slate-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--slate-400);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.feature-section {
  padding: 6rem 2rem;
  background: white;
}

.feature-grid-lg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-item {
  text-align: start;
}

.feature-icon-box {
  width: 64px;
  height: 64px;
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.feature-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-item p {
  color: var(--slate-500);
  line-height: 1.6;
}

.stats-bar {
  background: var(--slate-900);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 2rem;
  text-align: center;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat-item h4 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: var(--slate-400);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.how-it-works {
  padding: 6rem 2rem;
  background: var(--slate-50);
  text-align: center;
}

.step-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
}

.step-number {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: var(--primary-600);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  border: 4px solid var(--slate-50);
}

.footer-simple {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: 4rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .landing-nav .nav-links {
    display: none;
  }

  .stats-grid {
    gap: 2rem;
  }
}
/* RTL Support */
[dir="rtl"] .language-switcher select {
  background-position: left 0.5rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}

[dir="rtl"] .hero-title {
  background: linear-gradient(to left, white, var(--slate-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Centered Popup Notifications */
.toast-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 1rem;
}

.toast {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  animation: popupScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.hiding {
  animation: popupScaleOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.toast-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

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

.toast-content {
  color: var(--slate-700);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
}

.toast-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 50%;
}

.toast-close:hover {
  background: var(--slate-50);
  color: var(--slate-600);
}

[dir="rtl"] .toast-close {
  right: auto;
  left: 1rem;
}

/* Variants */
.toast-success .toast-icon {
  background: var(--success-50);
  color: var(--success-500);
  box-shadow: 0 0 0 4px var(--success-100);
}

.toast-error .toast-icon {
  background: var(--error-50);
  color: var(--error-500);
  box-shadow: 0 0 0 4px var(--error-100);
}

.toast-warning .toast-icon {
  background: var(--warning-50);
  color: var(--warning-500);
  box-shadow: 0 0 0 4px var(--warning-100);
}

.toast-info .toast-icon {
  background: var(--primary-50);
  color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-100);
}

