/**
 * VizGolf Auth Pages Styles
 *
 * Standalone auth pages (login, register, password reset, OTP)
 * Uses design system tokens for consistent styling
 */

/* Box-sizing reset */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */
:root {
  /* Background Colors - Dark Mode (Default) */
  --auth-bg-page: #0A0F0D;
  --auth-bg-card: #1A2420;
  --auth-bg-elevated: #222D28;
  --auth-bg-input: #121916;

  /* Text Colors */
  --auth-text-primary: #F8FAF9;
  --auth-text-secondary: #94A3A8;
  --auth-text-muted: #64757A;

  /* Border Colors */
  --auth-border-subtle: rgba(255, 255, 255, 0.06);
  --auth-border-medium: rgba(255, 255, 255, 0.12);
  --auth-border-strong: rgba(255, 255, 255, 0.20);

  /* Accent */
  --auth-accent: #22C55E;
  --auth-accent-hover: #4ADE80;
  --auth-accent-muted: rgba(34, 197, 94, 0.12);
  --auth-accent-glow: 0 4px 30px rgba(34, 197, 94, 0.40);

  /* Semantic */
  --auth-error: #EF4444;
  --auth-error-bg: rgba(239, 68, 68, 0.15);
  --auth-success: #22C55E;
  --auth-success-bg: rgba(34, 197, 94, 0.15);
  --auth-info: #3B82F6;
  --auth-info-bg: rgba(59, 130, 246, 0.15);
  --auth-warning: #FBBF24;
  --auth-warning-bg: rgba(251, 191, 36, 0.15);

  /* Typography */
  --auth-font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --auth-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --auth-space-xs: 4px;
  --auth-space-sm: 8px;
  --auth-space-md: 12px;
  --auth-space-lg: 16px;
  --auth-space-xl: 20px;
  --auth-space-2xl: 24px;
  --auth-space-3xl: 32px;

  /* Border Radius */
  --auth-radius-md: 10px;
  --auth-radius-lg: 14px;
  --auth-radius-xl: 18px;
  --auth-radius-full: 9999px;

  /* Transitions */
  --auth-transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --auth-transition-normal: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode */
[data-theme="light"] {
  --auth-bg-page: #F8FAF9;
  --auth-bg-card: #FFFFFF;
  --auth-bg-elevated: #F1F5F3;
  --auth-bg-input: #FFFFFF;
  --auth-text-primary: #0A0F0D;
  --auth-text-secondary: #4A5568;
  --auth-text-muted: #718096;
  --auth-border-subtle: rgba(0, 0, 0, 0.06);
  --auth-border-medium: rgba(0, 0, 0, 0.12);
  --auth-border-strong: rgba(0, 0, 0, 0.20);
  --auth-accent: #16A34A;
  --auth-accent-hover: #15803D;
}

/* ==========================================================================
   Base Layout
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--auth-space-lg);
  background-color: var(--auth-bg-page);
  font-family: var(--auth-font-body);
  line-height: 1.5;
  color: var(--auth-text-primary);
}


.auth-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Logo/Header
   ========================================================================== */
.auth-header {
  text-align: center;
  margin-bottom: var(--auth-space-3xl);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--auth-space-md);
  color: var(--auth-accent);
  text-decoration: none;
  transition: opacity var(--auth-transition-fast);
}

.auth-logo:hover {
  opacity: 0.85;
}

.auth-logo__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--auth-accent-glow);
}

.auth-logo__icon svg {
  width: 48px;
  height: 48px;
}

.auth-logo__text {
  font-family: var(--auth-font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-header__tagline {
  color: var(--auth-text-secondary);
  margin-top: var(--auth-space-md);
  font-size: 1rem;
}

/* ==========================================================================
   Card Container
   ========================================================================== */
.auth-card {
  background-color: var(--auth-bg-card);
  border: 1px solid var(--auth-border-subtle);
  border-radius: var(--auth-radius-xl);
  padding: var(--auth-space-3xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.auth-card__title {
  font-family: var(--auth-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auth-text-primary);
  text-align: center;
  margin-bottom: var(--auth-space-sm);
}

.auth-card__subtitle {
  color: var(--auth-text-secondary);
  text-align: center;
  margin-bottom: var(--auth-space-2xl);
  font-size: 0.9375rem;
}

/* Icon Circle (for password reset, etc.) */
.auth-card__icon-circle {
  width: 64px;
  height: 64px;
  background: var(--auth-accent-muted);
  border-radius: var(--auth-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--auth-space-xl);
  color: var(--auth-accent);
}

.auth-card__icon-circle svg {
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--auth-space-xl);
}

.auth-form__group {
  display: flex;
  flex-direction: column;
}

.auth-form__label {
  display: flex;
  align-items: center;
  gap: var(--auth-space-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-text-secondary);
  margin-bottom: var(--auth-space-sm);
}

.auth-form__label svg {
  width: 16px;
  height: 16px;
  color: var(--auth-accent);
}

.auth-form__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--auth-space-sm);
}

.auth-form__input,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
  width: 100%;
  padding: var(--auth-space-md) var(--auth-space-lg);
  border: 1px solid var(--auth-border-medium);
  border-radius: var(--auth-radius-md);
  font-size: 0.9375rem;
  transition: all var(--auth-transition-fast);
  background-color: var(--auth-bg-input);
  color: var(--auth-text-primary);
}

.auth-form__input::placeholder,
.auth-form input::placeholder {
  color: var(--auth-text-muted);
}

.auth-form__input:focus,
.auth-form input:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px var(--auth-accent-muted);
}

.auth-form__help {
  font-size: 0.75rem;
  color: var(--auth-text-muted);
  margin-top: var(--auth-space-sm);
  line-height: 1.5;
}

.auth-form__help ul {
  margin-top: var(--auth-space-sm);
  padding-left: var(--auth-space-xl);
}

.auth-form__help li {
  margin-bottom: var(--auth-space-xs);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--auth-space-sm);
  width: 100%;
  padding: var(--auth-space-md) var(--auth-space-xl);
  border: none;
  border-radius: var(--auth-radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--auth-transition-fast);
  text-decoration: none;
}

.auth-btn svg {
  width: 18px;
  height: 18px;
}

.auth-btn--primary {
  background: var(--auth-accent);
  color: var(--auth-bg-page);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.auth-btn--primary:hover {
  background: #16A34A;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--auth-accent-glow);
}

.auth-btn--primary:active {
  transform: translateY(0);
}

.auth-btn--secondary {
  background: transparent;
  color: var(--auth-accent);
  border: 1px solid var(--auth-accent);
}

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

.auth-btn--large {
  padding: var(--auth-space-lg) var(--auth-space-2xl);
  font-size: 1rem;
}

/* ==========================================================================
   Alerts/Messages
   ========================================================================== */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--auth-space-md);
  padding: var(--auth-space-lg);
  border-radius: var(--auth-radius-md);
  border-left: 3px solid;
  margin-bottom: var(--auth-space-xl);
}

.auth-alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-alert--error {
  background-color: var(--auth-error-bg);
  border-left-color: var(--auth-error);
  color: var(--auth-error);
}

.auth-alert--success {
  background-color: var(--auth-success-bg);
  border-left-color: var(--auth-success);
  color: var(--auth-success);
}

.auth-alert--info {
  background-color: var(--auth-info-bg);
  border-left-color: var(--auth-info);
  color: var(--auth-info);
}

.auth-alert--warning {
  background-color: var(--auth-warning-bg);
  border-left-color: var(--auth-warning);
  color: var(--auth-warning);
}

.auth-alert__content {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-alert__title {
  font-weight: 600;
  margin-bottom: var(--auth-space-xs);
}

.auth-alert__list {
  list-style: disc;
  padding-left: var(--auth-space-xl);
  margin-top: var(--auth-space-sm);
}

.auth-alert__list li {
  margin-bottom: var(--auth-space-xs);
}

/* ==========================================================================
   Dividers and Links
   ========================================================================== */
.auth-divider {
  border-top: 1px solid var(--auth-border-subtle);
  margin-top: var(--auth-space-2xl);
  padding-top: var(--auth-space-2xl);
  text-align: center;
}

.auth-link {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--auth-transition-fast);
}

.auth-link:hover {
  color: var(--auth-accent-hover);
}

.auth-link--muted {
  color: var(--auth-text-muted);
  font-weight: 400;
}

.auth-link--muted:hover {
  color: var(--auth-text-secondary);
}

.auth-link--small {
  font-size: 0.8125rem;
}

.auth-link--with-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--auth-space-xs);
}

.auth-link--with-icon svg {
  width: 14px;
  height: 14px;
}

.auth-text {
  color: var(--auth-text-secondary);
  font-size: 0.9375rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.auth-footer {
  text-align: center;
  margin-top: var(--auth-space-3xl);
  color: var(--auth-text-muted);
  font-size: 0.8125rem;
}

/* ==========================================================================
   OTP Specific Styles
   ========================================================================== */
.auth-otp {
  text-align: center;
}

.auth-otp__icon {
  width: 80px;
  height: 80px;
  background: var(--auth-accent-muted);
  border-radius: var(--auth-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--auth-space-xl);
  color: var(--auth-accent);
}

.auth-otp__icon svg {
  width: 40px;
  height: 40px;
}

.auth-otp__info {
  color: var(--auth-text-secondary);
  margin-bottom: var(--auth-space-2xl);
  line-height: 1.6;
}

.auth-otp__phone {
  font-weight: 700;
  color: var(--auth-text-primary);
}

/* OTP Input Field - Large centered digits */
.auth-otp__input {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.5rem;
  font-weight: 700;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.auth-mt-sm {
  margin-top: var(--auth-space-sm);
}

.auth-mt-lg {
  margin-top: var(--auth-space-lg);
}

.auth-mt-xl {
  margin-top: var(--auth-space-xl);
}

.auth-text-center {
  text-align: center;
}

.auth-space-y-sm > * + * {
  margin-top: var(--auth-space-sm);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
  .auth-card {
    padding: var(--auth-space-2xl);
  }

  .auth-logo__icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }

  .auth-logo__icon svg {
    width: 40px;
    height: 40px;
  }

  .auth-logo__text {
    font-size: 1.75rem;
  }

  .auth-card__title {
    font-size: 1.25rem;
  }
}
