/* ===========================================
   FamilyRack Auth Styles
   Matches mobile app theme
   =========================================== */

:root {
  /* Primary - Orange theme */
  --primary: #F5841F;
  --primary-dark: #D9740A;
  --primary-light: #FFB366;
  --primary-soft: #F7E8E1;

  /* Backgrounds */
  --background: #FFFFFF;
  --background-alt: #EDE0D9;
  --surface: #F8F6F6;

  /* Text */
  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-light: #999999;

  /* Borders */
  --border: #E0E0E0;
  --divider: #EEEEEE;

  /* Status */
  --error: #DC3545;
  --success: #28A745;
  --warning: #FFC107;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
}

/* Auth Form Container (used inside page-content) */
.auth-form-container {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Image */
.hero-image-container {
  margin-bottom: 24px;
  margin-top: 20px;
}

.hero-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
}

/* Title & Subtitle */
.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
  line-height: 24px;
}

/* Form Inputs */
.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 0 16px;
  height: 56px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.15);
}

.input-icon {
  color: var(--text-secondary);
  margin-right: 12px;
  font-size: 20px;
}

.input-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  height: 100%;
}

.input-field::placeholder {
  color: var(--text-light);
}

.toggle-password {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
}

/* Forgot Password */
.forgot-password-link {
  display: block;
  text-align: right;
  margin-top: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

/* Primary Button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 8px rgba(245, 132, 31, 0.3);
  transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary .mdi {
  font-size: 20px;
}

/* Error Message */
.error-message {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: var(--error);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Footer */
.auth-footer {
  margin-top: auto;
  padding-bottom: 20px;
  text-align: center;
}

.auth-footer-text {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-footer-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

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

/* Loading Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px 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);
  }
}

/* Terms Container */
.terms-container {
  margin-bottom: 24px;
}

.terms-text {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 20px;
}

.terms-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.terms-link:hover {
  text-decoration: underline;
}