:root {
  /* Colors */
  --primary: #7c69bc;
  --primary-light: #f5f3ff;
  --primary-dark: #63529b;
  --text-main: #2d3748;
  --text-muted: #718096;
  --bg-app: #f8f9fd;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --error: #e53e3e;
  --success: #38a169;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.onboarding-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl) 0;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Onboarding Card */
.onboarding-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 680px;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.onboarding-header h1 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.onboarding-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto var(--space-2xl);
}

/* Form Elements */
.form-group {
  text-align: left;
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--text-main);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
}

.select-icon {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--text-muted);
}

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  background: #fafafa;
  transition: background 0.2s;
  color: var(--text-muted);
}

.upload-zone:hover {
  background: #f1f1f1;
}

/* Buttons */
.btn-group {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2xl);
}

.btn {
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:active {
  transform: scale(0.98);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Sidebar */
.sidebar {
  background: white;
  border-right: 1px solid var(--border-color);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  font-weight: 800;
  font-size: 1.25rem;
  color: #1a202c;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav-section {
  margin-bottom: var(--space-xl);
}

.nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  padding-left: var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-sm);
  text-decoration: none;
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

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

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

.nav-link svg {
  width: 20px;
  height: 20px;
}

/* Main Dashboard Area */
.main-content {
  padding: var(--space-xl);
  overflow-y: auto;
}

.header-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
}

.user-profile-name {
  font-weight: 500;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.stat-value.warning { color: #f59e0b; }
.stat-value.success { color: #10b981; }

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

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

.stat-icon.blue { background: #e0f2fe; color: #0369a1; }
.stat-icon.pink { background: #fdf2f8; color: #be185d; }
.stat-icon.orange { background: #fff7ed; color: #c2410c; }
.stat-icon.green { background: #f0fdf4; color: #15803d; }

/* Dashboard Hero */
.dashboard-hero {
  margin-bottom: var(--space-2xl);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.dashboard-hero h2 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.dashboard-hero p {
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.empty-icon-wrapper {
  width: 80px;
  height: 80px;
  background: #fff7ed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: #f59e0b;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: var(--space-xl);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.filter-group {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.clear-filters-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-sub-item {
  padding-left: 32px;
  margin-top: 4px;
}

.nav-link-sub {
  font-size: 0.85rem;
}

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

@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
