:root {
  /* HomeFax Brand Colors - Joker Inspired */
  --primary: #2E1A47;        /* Truist Purple */
  --primary-dark: #1F1230;   /* Darker Purple */
  --primary-light: #4A2F6B;  /* Lighter Purple */
  --secondary: #00B347;      /* Complementary Green */
  --accent: #32CD32;         /* Lime Green */
  --success: #228B22;        /* Forest Green */
  
  /* UI Colors */
  --background: #f8f9fa;
  --surface: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #868e96;
  --border: #dee2e6;
  --shadow: rgba(46, 26, 71, 0.1);
}

/* Fallback for CSS custom properties not loading */
html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

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

body, body.auth-page {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 0;
}

.auth-container {
  background: white; /* Ensure solid white background */
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(46, 26, 71, 0.3);
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  position: relative;
}

.auth-header {
  background: white !important; /* White background for better logo readability */
  color: var(--primary) !important; /* Dark text on white background */
  padding: 1.25rem 2rem 1rem !important; /* Further reduced padding */
  text-align: center;
  position: relative;
  border-bottom: 3px solid var(--primary); /* Add accent border */
  /* Completely clean background - no patterns */
}

/* AGGRESSIVE BACKGROUND PATTERN ELIMINATION */
html, body {
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

/* Completely isolate auth container */
.auth-container {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  background-attachment: initial !important;
  background-blend-mode: normal !important;
  background-clip: padding-box !important;
  background-origin: padding-box !important;
  background-position: initial !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
  position: relative !important;
  z-index: 10 !important;
}

.auth-header {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  background-attachment: initial !important;
  background-blend-mode: normal !important;
  background-clip: padding-box !important;
  background-origin: padding-box !important;
  background-position: initial !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
}

.auth-form {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  background-attachment: initial !important;
  background-blend-mode: normal !important;
  background-clip: padding-box !important;
  background-origin: padding-box !important;
  background-position: initial !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
}

/* Override any background patterns from child elements */
.auth-container *,
.auth-header *,
.auth-form * {
  background-image: none !important;
  background-repeat: no-repeat !important;
}

/* Specific overrides for all elements */
.auth-container input,
.auth-container button,
.auth-container label,
.auth-container div,
.auth-container p,
.auth-container h1,
.auth-container h2,
.auth-container h3 {
  background: transparent !important;
  background-image: none !important;
}

/* Exception for form controls */
.auth-container .form-control {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.brand-logo {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.brand-logo-link {
  display: inline-block;
  margin-bottom: 0 !important; /* Remove margin - was causing extra spacing */
  position: relative;
  z-index: 1;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand-logo-link:hover {
  transform: scale(1.05);
}


.brand-tagline {
  font-size: 1.2rem !important; /* Slightly larger */
  color: var(--text-secondary) !important; /* Muted gray for tagline */
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.auth-form {
  padding: 2.5rem;
  background: white; /* Ensure the form area has clean white background */
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-align: center;
}

.page-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--surface);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 26, 71, 0.1);
  transform: translateY(-1px);
}

.form-select {
  background-image: none !important; /* Removed dropdown arrow to prevent pattern interference */
  background-position: initial !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
  padding-right: 1rem; /* Reset padding since no arrow */
  appearance: none;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.portal-selector {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.portal-option {
  position: relative;
}

.portal-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.portal-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  background: var(--surface);
}

.portal-option input[type="radio"]:checked + .portal-card {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(46, 26, 71, 0.1), rgba(0, 179, 71, 0.1));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 26, 71, 0.2);
}

.portal-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 26, 71, 0.15);
}

.portal-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.portal-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 12px rgba(46, 26, 71, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 26, 71, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  box-shadow: 0 4px 12px rgba(0, 179, 71, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--success), var(--secondary));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 179, 71, 0.4);
}

.auth-links {
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.features-list {
  list-style: none;
  margin-top: 1rem;
}

.features-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.features-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
  margin-right: 0.5rem;
}

.error-message {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
  text-align: center;
}

.success-message {
  background: rgba(34, 139, 34, 0.1);
  color: var(--success);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid rgba(34, 139, 34, 0.2);
  text-align: center;
}

/* Registration Form Specific Styles */
.registration-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.registration-step {
  display: none;
}

.registration-step.active {
  display: block;
}

.step-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.step-actions .btn {
  flex: 1;
}

.form-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.registration-summary {
  background: rgba(46, 26, 71, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.summary-section {
  margin-bottom: 1.5rem;
}

.summary-section:last-child {
  margin-bottom: 0;
}

.summary-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(46, 26, 71, 0.1);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item .label {
  font-weight: 500;
  color: var(--text-secondary);
}

.summary-item .value {
  color: var(--text-primary);
  font-weight: 500;
}

.terms-section {
  margin-bottom: 2rem;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--surface);
}

.checkbox-container:hover {
  border-color: var(--primary-light);
  background: rgba(46, 26, 71, 0.02);
}

.checkbox-container input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-container.error {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.checkbox-container.error input[type="checkbox"] {
  outline: 2px solid #dc3545;
  outline-offset: 2px;
}

.terms-error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

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

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

.form-control.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-help {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

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

.btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Shake Animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  .auth-container {
    max-width: none;
  }
  
  .auth-header {
    padding: 1rem 1.5rem 0.75rem !important; /* Further reduced mobile padding */
  }
  
  .brand-logo {
    font-size: 2rem;
  }
  
  .brand-tagline {
    font-size: 1.1rem !important; /* Slightly larger on mobile */
  }
  
  .auth-form {
    padding: 2rem 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .portal-selector {
    gap: 0.75rem;
  }
  
  .portal-card {
    padding: 1rem;
  }

  .step-actions {
    flex-direction: column;
  }
  
  .checkbox-container {
    padding: 0.75rem;
  }
  
  .registration-summary {
    padding: 1rem;
  }
} 