/* CSS Custom Properties */
:root {
  --primary: 220 98% 61%; /* #2563EB */
  --primary-foreground: 210 40% 98%; /* #F8FAFC */
  --secondary: 210 40% 96%; /* #F1F5F9 */
  --secondary-foreground: 222 84% 5%; /* #0F172A */
  --muted: 210 40% 96%; /* #F1F5F9 */
  --muted-foreground: 215 16% 47%; /* #64748B */
  --accent: 210 40% 96%; /* #F1F5F9 */
  --accent-foreground: 222 84% 5%; /* #0F172A */
  --destructive: 0 84% 60%; /* #EF4444 */
  --destructive-foreground: 210 40% 98%; /* #F8FAFC */
  --border: 214 32% 91%; /* #E2E8F0 */
  --input: 214 32% 91%; /* #E2E8F0 */
  --ring: 220 98% 61%; /* #2563EB */
  --background: 0 0% 100%; /* #FFFFFF */
  --foreground: 222 84% 5%; /* #0F172A */
  --success: 142 76% 36%; /* #16A34A */
  --success-foreground: 210 40% 98%; /* #F8FAFC */
  --warning: 38 92% 50%; /* #F59E0B */
  --warning-foreground: 210 40% 98%; /* #F8FAFC */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  min-height: 100vh;
}

/* Container Styles */
.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--secondary)) 100%);
}

/* Auth Card */
.auth-card {
  background: hsl(var(--background));
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid hsl(var(--border));
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 50%;
  margin-bottom: 1rem;
}

.auth-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.auth-header p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* Form Styles */
.auth-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

.form-group input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-group input::placeholder {
  color: hsl(var(--muted-foreground));
}

.error-message {
  color: hsl(var(--destructive));
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Button Styles */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: hsl(var(--primary) / 0.9);
}

.btn-primary:disabled {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  cursor: not-allowed;
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
  background: hsl(var(--accent));
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.loading .loading-spinner {
  display: block;
}

.loading .btn-text {
  display: none;
}

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

/* Message Styles */
.message {
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.message.success {
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  border: 1px solid hsl(var(--success) / 0.2);
}

.message.error {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  border: 1px solid hsl(var(--destructive) / 0.2);
}

.message.info {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.2);
}

.auth-footer {
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Dashboard Styles */
.dashboard-container {
  min-height: 100vh;
  background: hsl(var(--background));
}

.dashboard-header {
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 0;
}

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

.header-content .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.dashboard-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.welcome-section {
  margin-bottom: 3rem;
}

.welcome-card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.welcome-card h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.welcome-card p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
}

.welcome-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: hsl(var(--muted) / 0.5);
  border-radius: 8px;
  min-width: 160px;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 8px;
}

.stat-content {
  text-align: left;
}

.stat-label {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.features-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 8px;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.feature-card p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-card {
    padding: 1.5rem;
  }
  
  .welcome-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .stat {
    min-width: 200px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  .dashboard-main {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1rem;
  }
  
  .welcome-card {
    padding: 1.5rem;
  }
  
  .welcome-card h1 {
    font-size: 1.5rem;
  }
  
  .features-section h2 {
    font-size: 1.25rem;
  }
}
