:root {
  /* Updated color palette to match brand requirements */
  --primary-dark: #3b0510;
  --primary-gold: #d4af37;
  --primary-white: #ffffff;
  --secondary-gray: #f8f9fa;
  --text-dark: #1a1a1a;
  --text-light: #6c757d;
  --border-light: #e9ecef;
  --shadow-light: rgba(59, 5, 16, 0.1);
  --shadow-medium: rgba(59, 5, 16, 0.15);
  --error-color: #dc3545;
  --success-color: #28a745;

  /* Typography */
  --font-sans: "Inter", sans-serif;
  --font-serif: "Playfair Display", serif;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  line-height: 1.6;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #5a0818 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
}

/* Auth Page Layout */
.auth-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* Card Styles */
.card {
  background: var(--primary-white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
}

.auth-card {
  padding: 0;
}

/* Auth Header */
.auth-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #5a0818 100%);
  padding: 3rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23d4af37" opacity="0.1"/></svg>');
  opacity: 0.3;
}

.auth-logo {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-white);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
  letter-spacing: 2px;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin: 1.5rem 2rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert svg {
  flex-shrink: 0;
}

.alert-error {
  background-color: #fee;
  color: var(--error-color);
  border: 1px solid #fcc;
}

.alert-success {
  background-color: #efe;
  color: var(--success-color);
  border: 1px solid #cfc;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  position: relative;
  padding: 0 2rem;
  margin-top: 2rem;
  border-bottom: 2px solid var(--border-light);
}

.auth-tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-tab:hover {
  color: var(--primary-dark);
}

.auth-tab.active {
  color: var(--primary-dark);
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-gold) 100%);
}

/* Auth Forms */
.auth-forms {
  padding: 2rem;
}

.auth-form {
  display: none;
  animation: fadeIn 0.4s ease-in;
}

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

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

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

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
  background-color: var(--primary-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

/* Form Footer */
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-dark);
}

/* Links */
.link-gold {
  color: var(--primary-gold);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.link-gold:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #5a0818 100%);
  color: var(--primary-white);
  box-shadow: 0 4px 12px rgba(59, 5, 16, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 5, 16, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #c19b26 100%);
  color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background-color: var(--secondary-gray);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

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

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-gold);
  animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 640px) {
  body {
    padding: 1rem;
  }

  .auth-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .auth-logo {
    font-size: 2rem;
  }

  .auth-tabs {
    padding: 0 1rem;
  }

  .auth-forms {
    padding: 1.5rem;
  }

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

  .alert {
    margin: 1rem 1rem;
  }

  .form-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .auth-container {
    max-width: 100%;
  }

  .card {
    border-radius: 12px;
  }
}