/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: 262.1 83.3% 57.8%;
  --primary-foreground: 210 20% 98%;
  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 220.9 39.3% 11%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 220 8.9% 46.1%;
  --accent: 220 14.3% 95.9%;
  --accent-foreground: 220.9 39.3% 11%;
  --border: 220 13% 91%;
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --gradient-primary: linear-gradient(135deg, hsl(262.1 83.3% 57.8%), hsl(262.1 83.3% 67.8%));
  --gradient-subtle: linear-gradient(180deg, hsl(220 14.3% 98%), hsl(220 14.3% 95.9%));
  --shadow-elegant: 0 10px 30px -10px hsl(262.1 83.3% 57.8% / 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--gradient-subtle);
  color: hsl(var(--foreground));
  line-height: 1.6;
  min-height: 100vh;
}

/* Page Transitions */
.page {
  display: none;
  min-height: 100vh;
  animation: fadeIn 0.3s ease-in;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Auth Page Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: hsl(var(--background));
  border-radius: 12px;
  box-shadow: var(--shadow-elegant);
  padding: 40px;
  width: 100%;
  max-width: 450px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  height: 48px;
  margin-bottom: 20px;
}

.auth-header h1 {
  font-size: 24px;
  color: hsl(var(--primary));
  margin-bottom: 8px;
}

.auth-header p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid hsl(var(--border));
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: -2px;
}

.tab-btn.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: hsl(var(--foreground));
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition-smooth);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

textarea {
  resize: vertical;
  font-family: inherit;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  border: none;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover:not(:disabled) {
  background: hsl(var(--accent));
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.button-group .btn {
  flex: 1;
}

/* Header */
.app-header {
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 2px 4px hsl(var(--foreground) / 0.05);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h1 {
  font-size: 20px;
  color: hsl(var(--primary));
  margin-bottom: 2px;
}

.header-left p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

/* Form Container */
.form-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Progress Section */
.progress-section {
  margin-bottom: 40px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.progress-text span:first-child {
  font-weight: 500;
  color: hsl(var(--primary));
}

.progress-text span:last-child {
  color: hsl(var(--muted-foreground));
}

.progress-bar {
  height: 8px;
  background: hsl(var(--muted));
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

/* Steps Navigation */
.steps-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 40px;
}

.step-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  transition: var(--transition-smooth);
}

.step-item.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.step-item.completed {
  background: hsl(var(--accent));
  border-color: hsl(var(--accent));
}

.step-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 10px;
  opacity: 0.75;
}

/* Form Card */
.form-card {
  background: hsl(var(--background));
  border-radius: 12px;
  box-shadow: var(--shadow-elegant);
  overflow: hidden;
}

.card-header {
  padding: 24px;
  border-bottom: 1px solid hsl(var(--border));
}

.card-header h2 {
  font-size: 20px;
  color: hsl(var(--foreground));
  margin-bottom: 4px;
}

.card-header p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.card-body {
  padding: 24px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

/* Photo Upload */
.upload-container {
  text-align: center;
}

.upload-label {
  display: block;
  padding: 60px 20px;
  border: 2px dashed hsl(var(--border));
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.upload-label:hover {
  border-color: hsl(var(--primary));
  background: hsl(var(--accent));
}

.upload-icon {
  margin-bottom: 16px;
  color: hsl(var(--muted-foreground));
}

.upload-text {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.photo-preview {
  margin-top: 20px;
}

.photo-preview img {
  max-width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 12px hsl(var(--foreground) / 0.1);
}

/* Review Section */
.review-section {
  padding: 20px;
  background: hsl(var(--accent));
  border-radius: 8px;
  margin-bottom: 20px;
}

.review-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: hsl(var(--primary));
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  font-size: 14px;
}

.review-grid strong {
  color: hsl(var(--muted-foreground));
  display: block;
  margin-bottom: 4px;
}

/* Status Page */
.status-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.status-card {
  background: hsl(var(--background));
  border-radius: 12px;
  box-shadow: var(--shadow-elegant);
  padding: 40px;
  width: 100%;
  max-width: 700px;
}

.status-header {
  text-align: center;
  margin-bottom: 32px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
}

.status-header h2 {
  font-size: 24px;
  color: hsl(var(--primary));
  margin-bottom: 8px;
}

.status-info {
  background: hsl(var(--accent));
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.status-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.status-badge .label {
  font-weight: 600;
}

.badge {
  padding: 6px 16px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 20px;
  font-size: 14px;
}

.status-date {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.details-section {
  margin-bottom: 24px;
}

.details-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: hsl(var(--primary));
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  font-size: 14px;
}

.details-grid .label {
  color: hsl(var(--muted-foreground));
  display: block;
  margin-bottom: 4px;
}

.details-grid p {
  font-weight: 500;
}

/* Loading & Toast */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: hsl(var(--background) / 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border-radius: 8px;
  box-shadow: 0 4px 12px hsl(var(--foreground) / 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
  max-width: 350px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: #ef4444;
  color: white;
}

.error-message {
  color: #ef4444;
  font-size: 14px;
  margin: 8px 0;
  display: none;
}

.error-message.show {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .steps-nav {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    gap: 16px;
  }
}
