:root {
  /* Backgrounds */
  --background: #faf8f5;
  --foreground: #1a1714;

  --card: #ffffff;
  --card-foreground: #1a1714;

  /* Core brand colors */
  --primary: #c9a050;
  --primary-dark: #a88535;
  --primary-foreground: #ffffff;

  --secondary: #efe6d8;
  --secondary-foreground: #5c4a2f;

  /* Muted / neutrals */
  --muted: #f3efe9;
  --muted-foreground: #6b635a;

  --accent: #e6efe9;

  --border: #e8e4de;

  /* Status colors */
  --success: #2d5a47;
  --error: #c45c5c;
  --destructive: #c45c5c;

  /* Radius */
  --radius: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--background) 0%, #FEF3C7 50%, #FFEDD5 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.auth-header {
  padding: 1.5rem;
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

/* Main */
.auth-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 1.5rem 2rem;
}

.auth-container {
  width: 100%;
  max-width: 560px;
}

/* Card */
.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.auth-card-header {
  padding: 2rem 2rem 0;
  text-align: center;
}

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

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

.auth-card-body {
  padding: 2rem;
}

/* Steps */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

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

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

.step.pending .step-number {
  background: var(--muted);
  color: var(--muted-foreground);
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

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

.step.pending .step-label {
  color: var(--muted-foreground);
}

.step-divider {
  width: 40px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s ease;
}

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

/* Form panels */
.form-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.form-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.form-group label .optional {
  font-weight: 400;
  color: var(--muted-foreground);
}

.input-wrapper {
  position: relative;
}

.input-wrapper > svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted-foreground);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.form-input.with-icon {
  padding-left: 3rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1);
}

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

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

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 20px;
  padding-right: 2.5rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0;
  display: flex;
}

.password-toggle:hover {
  color: var(--foreground);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Password strength */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
}

.strength-fill.weak { width: 25%; background: var(--error); }
.strength-fill.fair { width: 50%; background: #F59E0B; }
.strength-fill.good { width: 75%; background: #84CC16; }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Error state */
.form-group.error .form-input {
  border-color: var(--error);
}

.form-error {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 0.5rem;
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-label .required {
  color: var(--destructive);
  margin-left: 0.25rem;
}

/* Terms */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.terms-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.terms-check label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.terms-check a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.terms-check a:hover {
  text-decoration: underline;
}

/* Section title */
.form-section {
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

/* Logo upload */
.logo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo-preview {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background: var(--muted);
  border: 3px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.logo-preview:hover {
  border-color: var(--primary);
  background: var(--accent);
}

.logo-preview.has-image {
  border-style: solid;
  border-color: var(--primary);
}

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

.logo-preview svg {
  width: 28px;
  height: 28px;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.logo-preview span {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.logo-preview .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.logo-preview.has-image:hover .remove-btn {
  opacity: 1;
}

.logo-preview .remove-btn svg {
  width: 12px;
  height: 12px;
  margin: 0;
  color: white;
}

.logo-upload input {
  display: none;
}

.logo-upload-hint {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

/* Cuisine tags */
.cuisine-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cuisine-tag {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cuisine-tag:hover {
  border-color: var(--primary);
  background: var(--accent);
}

.cuisine-tag.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Table setup */
.table-setup {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.table-counter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.counter-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.counter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.counter-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  min-width: 50px;
  text-align: center;
}

.table-info {
  flex: 1;
}

.table-info strong {
  font-size: 0.875rem;
  color: var(--foreground);
}

.table-info p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Service fee */
.service-fee-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.service-fee-input {
  width: 100px;
  text-align: center;
}

.service-fee-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Profile Tags */
.profile-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: grab;
}

.profile-tag .tag-emoji {
  font-size: 1rem;
}

.profile-tag .tag-remove {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.profile-tag .tag-remove:hover {
  background: var(--destructive);
  color: white;
}

.add-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--background);
  border: 2px dashed var(--border);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.add-tag-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tag-suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .tag-suggestions {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tag-suggestion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-suggestion:hover {
  border-color: var(--primary);
  background: var(--accent);
}

.tag-suggestion.selected {
  border-color: var(--primary);
  background: var(--accent);
}

/* Buttons */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn svg {
  width: 20px;
  height: 20px;
}

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

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading */
.btn.loading .btn-content {
  display: none;
}

.btn .spinner {
  display: none;
}

.btn.loading .spinner {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

/* Social */
.social-btn {
  width: 100%;
  padding: 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: inherit;
}

.social-btn:hover {
  background: var(--muted);
  border-color: var(--muted-foreground);
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.auth-card-footer {
  padding: 1.5rem 2rem;
  background: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

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

.auth-card-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-card-footer a:hover {
  text-decoration: underline;
}

.auth-footer {
  padding: 1.5rem;
  text-align: center;
}

.auth-footer p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .table-setup {
    flex-direction: column;
    text-align: center;
  }
  
  .steps {
    flex-wrap: wrap;
  }
  
  .step-divider {
    display: none;
  }
}

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

.slug-prefix {
  padding: 0.625rem 0.75rem;
  background: var(--muted);
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
}

.slug-input-group .form-input {
  border-radius: 0 var(--radius) var(--radius) 0;
  flex: 1;
}

.slug-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
}

.slug-hint.error {
  color: var(--error);
}
