:root {
  --background: #faf8f5;
  --foreground: #1a1714;

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

  --primary: #c9a050;
  --primary-dark: #a88535;
  --primary-foreground: #ffffff;

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

  --muted: #f3efe9;
  --muted-foreground: #6b635a;

  --accent: #e6efe9;

  --border: #e8e4de;

  --success: #2d5a47;
  --error: #c45c5c;

  --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: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.5s ease-out;
}

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

/* 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-body {
  padding: 2.5rem 2rem;
}

/* Icon */
.lock-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, #FED7AA 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-icon svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

/* Title */
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 2rem;
}

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

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

.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 0.875rem 2.75rem;
  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: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);
}

/* 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;
}

/* Button */
.btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  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;
}

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

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

.btn-primary .spinner {
  display: none;
}

.btn-primary.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); }
}

/* Back link */
.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

/* Success state */
.success-state {
  display: none;
  text-align: center;
}

.success-state.active {
  display: block;
}

.request-form.hidden {
  display: none;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #DCFCE7 0%, #BBF7D0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.success-icon svg {
  width: 36px;
  height: 36px;
  color: var(--success);
}

.success-state h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.success-state p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.email-sent {
  display: inline-block;
  font-weight: 600;
  color: var(--foreground);
  background: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}

.resend-info {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

.resend-info a:hover {
  text-decoration: underline;
}

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

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