/* Modern Auth Layout - Clean Dark Theme - Mobile First Approach */

/* Import Raleway font */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

/* Reset and base styles scoped to auth containers */
.auth-layout,
.auth-layout * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Global container fixes to prevent white bleed */
.auth-layout .container,
.auth-layout .container.py-5 {
  padding: 0 !important;
  margin: 0 !important;
  background-color: #000000 !important;
  background: #000000 !important;
  border: none !important;
  outline: none !important;
  max-width: none !important;
  width: 100% !important;
}

/* Root level fixes */
body.auth-page,
body.login-page,
body.signup-page,
body.forgot-password-page,
body.reset-password-page,
body.welcome-page,
body.purchase-request-page {
  background-color: #000000 !important;
  background: #000000 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
}

/* Override any potential white backgrounds */
.auth-layout > * {
  background-color: #000000 !important;
  background: #000000 !important;
}

/* Mobile First - Base styles (default for mobile) */
.auth-layout {
  min-height: 100vh !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  background-color: #000000 !important;
  background: #000000 !important;
  padding: 1rem 0.5rem !important;
  margin: 0 !important;
  position: relative !important;
  font-family: 'Raleway', sans-serif !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

/* Auth Card - Main Container */
.auth-layout .auth-card {
  background: #000000 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 1.5rem !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  min-height: auto !important;
}

/* Logo Section */
.auth-layout .auth-logo {
  text-align: center !important;
  margin-bottom: 1.5rem !important;
  width: 100% !important;
  display: block !important;
}

.auth-layout .logo-image {
  height: 2rem !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

/* Auth Header */
.auth-layout .auth-header {
  text-align: center !important;
  margin-bottom: 1.5rem !important;
  width: 100% !important;
  display: block !important;
}

.auth-layout .auth-heading {
  margin: 0 0 1rem 0 !important;
  text-align: center !important;
  font-size: 1.5rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  font-family: 'Raleway', sans-serif !important;
  width: 100% !important;
  display: block !important;
}

/* Auth Body */
.auth-layout .auth-body {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  overflow: visible !important;
  min-height: auto !important;
}

/* Auth Description */
.auth-layout .auth-description {
  text-align: center !important;
  margin-bottom: 1rem !important;
  width: 100% !important;
  display: block !important;
}

.auth-layout .auth-description .auth-text {
  color: #9ca3af !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  display: block !important;
}

/* Auth Form - Main Form Container */
.auth-layout .auth-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  min-height: auto !important;
}

/* Form Fields */
.auth-layout .auth-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  min-height: auto !important;
}

/* Flex Row for Remember Me and Forgot Password */
.auth-layout .auth-flex-row {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Labels */
.auth-layout .auth-label {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #f3f4f6 !important;
  font-family: 'Raleway', sans-serif !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Inputs */
.auth-layout .auth-input {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.75rem !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  background-color: #1a1a1a !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  font-family: 'Raleway', sans-serif !important;
  min-height: 2.75rem !important;
  margin: 0 !important;
  outline: none !important;
  overflow: visible !important;
}

.auth-layout .auth-input:focus {
  outline: none !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

.auth-layout .auth-input::placeholder {
  color: #9ca3af !important;
  font-family: 'Raleway', sans-serif !important;
}

/* Password Container */
.auth-layout .auth-password-container {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.auth-layout .auth-password-toggle {
  position: absolute !important;
  right: 0.75rem !important;
  background: none !important;
  border: none !important;
  color: #d1d5db !important;
  cursor: pointer !important;
  padding: 0.25rem !important;
  font-size: 0.875rem !important;
  transition: color 0.2s ease !important;
  z-index: 2 !important;
  outline: none !important;
}

.auth-layout .auth-password-toggle:hover {
  color: #ffffff !important;
}

/* Checkbox Field */
.auth-layout .auth-checkbox-field {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.auth-layout .auth-checkbox {
  width: 1rem !important;
  height: 1rem !important;
  accent-color: #6366f1 !important;
  flex-shrink: 0 !important;
  border: none !important;
  outline: none !important;
  margin-top: 0.125rem !important;
}

.auth-layout .auth-checkbox-field .auth-label {
  cursor: pointer !important;
  line-height: 1.4 !important;
}

/* Button - Ensure it's always visible with maximum specificity */
body .auth-layout .auth-button,
html body .auth-layout .auth-button,
.auth-layout .auth-button,
button.auth-button,
#signupButton {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.875rem !important;
  background-color: #6366f1 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  font-family: 'Raleway', sans-serif !important;
  min-height: 2.75rem !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  outline: none !important;
  text-decoration: none !important;
  display: block !important;
  text-align: center !important;
  position: relative !important;
  z-index: 999 !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
}

body .auth-layout .auth-button:hover,
html body .auth-layout .auth-button:hover,
.auth-layout .auth-button:hover,
button.auth-button:hover,
#signupButton:hover {
  background-color: #818cf8 !important;
}

body .auth-layout .auth-button:focus,
html body .auth-layout .auth-button:focus,
.auth-layout .auth-button:focus,
button.auth-button:focus,
#signupButton:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Button text - Ensure it's visible */
body .auth-layout .auth-button .btn-text,
html body .auth-layout .auth-button .btn-text,
.auth-layout .auth-button .btn-text,
button.auth-button .btn-text,
#signupButton .btn-text {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  position: relative !important;
  z-index: 1000 !important;
}

/* Alerts */
.auth-layout .auth-alert {
  padding: 1rem !important;
  border-radius: 0 !important;
  margin-bottom: 1rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.auth-layout .auth-alert-success {
  background-color: rgba(34, 197, 94, 0.1) !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
}

.auth-layout .auth-alert-danger {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}

/* Text Elements */
body .auth-layout .auth-text,
html body .auth-layout .auth-text,
.auth-layout .auth-text,
p.auth-text {
  text-align: center !important;
  color: #d1d5db !important;
  font-size: 0.875rem !important;
  margin: 0 !important;
  font-family: 'Raleway', sans-serif !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  overflow: visible !important;
}

.auth-layout .auth-text-link {
  color: #6366f1 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  font-family: 'Raleway', sans-serif !important;
}

.auth-layout .auth-text-link:hover {
  color: #818cf8 !important;
}

.auth-layout .auth-text-strong {
  font-weight: 600 !important;
  font-family: 'Raleway', sans-serif !important;
}

/* Sign Up Section - Ensure it's always visible with maximum specificity */
body .auth-layout .auth-signup,
html body .auth-layout .auth-signup,
.auth-layout .auth-signup,
div.auth-signup {
  margin-top: 1.5rem !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  z-index: 999 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
}

/* Touch-friendly sizing for mobile */
@media (pointer: coarse) {
  .auth-layout .auth-input,
  .auth-layout .auth-button {
    min-height: 3rem !important;
  }
  
  .auth-layout .auth-checkbox {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
}

/* Small mobile devices (320px and up) */
@media (min-width: 320px) {
  .auth-layout {
    padding: 1rem 0.75rem !important;
  }
  
  .auth-layout .auth-card {
    padding: 1.5rem !important;
  }
  
  .auth-layout .auth-form {
    gap: 1rem !important;
  }
  
  .auth-layout .auth-heading {
    font-size: 1.5rem !important;
  }
}

/* Medium mobile devices (375px and up) */
@media (min-width: 375px) {
  .auth-layout .auth-card {
    padding: 1.75rem !important;
  }
  
  .auth-layout .auth-form {
    gap: 1.125rem !important;
  }
}

/* Large mobile devices (425px and up) */
@media (min-width: 425px) {
  .auth-layout .auth-card {
    padding: 2rem !important;
  }
  
  .auth-layout .auth-form {
    gap: 1.25rem !important;
  }
  
  .auth-layout .auth-heading {
    font-size: 1.625rem !important;
  }
}

/* Tablet devices (768px and up) */
@media (min-width: 768px) {
  .auth-layout {
    padding: 2rem 1rem !important;
    justify-content: center !important;
  }
  
  .auth-layout .auth-card {
    max-width: 28rem !important;
    padding: 2.5rem !important;
  }
  
  .auth-layout .auth-form {
    gap: 1.5rem !important;
  }
  
  .auth-layout .auth-field {
    gap: 0.625rem !important;
  }
  
  .auth-layout .auth-logo {
    margin-bottom: 2rem !important;
  }
  
  .auth-layout .auth-header {
    margin-bottom: 2rem !important;
  }
  
  .auth-layout .auth-description {
    margin-bottom: 1.5rem !important;
  }
  
  .auth-layout .auth-signup {
    margin-top: 2rem !important;
  }
  
  .auth-layout .auth-flex-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1rem !important;
  }
  
  .auth-layout .auth-heading {
    font-size: 1.75rem !important;
  }
}

/* Desktop devices (1024px and up) */
@media (min-width: 1024px) {
  .auth-layout .auth-card {
    max-width: 32rem !important;
    padding: 3rem !important;
  }
  
  .auth-layout .auth-form {
    gap: 1.75rem !important;
  }
  
  .auth-layout .auth-field {
    gap: 0.75rem !important;
  }
  
  .auth-layout .auth-logo {
    margin-bottom: 2.5rem !important;
  }
  
  .auth-layout .auth-header {
    margin-bottom: 2.5rem !important;
  }
  
  .auth-layout .auth-description {
    margin-bottom: 2rem !important;
  }
  
  .auth-layout .auth-signup {
    margin-top: 2.5rem !important;
  }
  
  .auth-layout .auth-heading {
    font-size: 2rem !important;
  }
}

/* Large desktop devices (1440px and up) */
@media (min-width: 1440px) {
  .auth-layout .auth-card {
    max-width: 36rem !important;
    padding: 3.5rem !important;
  }
  
  .auth-layout .auth-form {
    gap: 2rem !important;
  }
  
  .auth-layout .auth-field {
    gap: 0.875rem !important;
  }
  
  .auth-layout .auth-logo {
    margin-bottom: 3rem !important;
  }
  
  .auth-layout .auth-header {
    margin-bottom: 3rem !important;
  }
  
  .auth-layout .auth-description {
    margin-bottom: 2.5rem !important;
  }
  
  .auth-layout .auth-signup {
    margin-top: 3rem !important;
  }
  
  .auth-layout .auth-heading {
    font-size: 2.25rem !important;
  }
}

/* Ensure no horizontal overflow */
.auth-layout,
.auth-layout * {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Force full width on mobile */
@media (max-width: 767px) {
  .auth-layout .auth-card {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
}

/* Additional fixes for button and signup visibility with maximum specificity */
body .auth-layout .auth-button,
body .auth-layout .auth-signup,
body .auth-layout .auth-text,
html body .auth-layout .auth-button,
html body .auth-layout .auth-signup,
html body .auth-layout .auth-text,
.auth-layout .auth-button,
.auth-layout .auth-signup,
.auth-layout .auth-text,
button.auth-button,
div.auth-signup,
p.auth-text {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 999 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
}

/* Ensure form elements don't get cut off */
.auth-layout .auth-form {
  overflow: visible !important;
  min-height: auto !important;
}

.auth-layout .auth-field {
  overflow: visible !important;
  min-height: auto !important;
}

/* Override any potential hiding from other CSS files */

/* Login hero section */
.auth-layout .login-hero {
  width: 100% !important;
  max-width: 36rem !important;
  margin: 0 auto 1.25rem auto !important;
  padding: 1.15rem 1rem !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.28), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.24), transparent 45%),
    #050505 !important;
  border: 1px solid #2b2b2b !important;
}

.auth-layout .login-hero-kicker {
  margin: 0 0 0.5rem 0 !important;
  color: #93c5fd !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.auth-layout .login-hero-title {
  margin: 0 0 0.55rem 0 !important;
  color: #ffffff !important;
  font-size: clamp(1.3rem, 4.4vw, 2rem) !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}

.auth-layout .login-hero-subtext {
  margin: 0 !important;
  color: #bfdbfe !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}

.auth-layout .login-hero-points {
  margin-top: 0.9rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.45rem !important;
}

.auth-layout .login-hero-points span {
  display: inline-flex !important;
  align-items: center !important;
  color: #dbeafe !important;
  font-size: 0.84rem !important;
  background: rgba(59, 130, 246, 0.14) !important;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
  border-radius: 999px !important;
  padding: 0.35rem 0.7rem !important;
  width: fit-content !important;
}

.auth-layout .auth-heading {
  color: #ffffff !important;
}

.auth-layout .auth-label,
.auth-layout .auth-text,
.auth-layout .auth-signup .auth-text {
  color: #dbeafe !important;
}

.auth-layout .auth-text-link,
.auth-layout .auth-text-strong {
  color: #93c5fd !important;
}

.auth-layout .auth-input {
  background-color: #0b0b0b !important;
  border-color: #1f2937 !important;
  color: #ffffff !important;
}

.auth-layout .auth-input::placeholder {
  color: #93c5fd !important;
  opacity: 0.85 !important;
}

@media (min-width: 768px) {
  .auth-layout .login-hero {
    max-width: 32rem !important;
    padding: 1.35rem 1.25rem !important;
    margin-bottom: 1.5rem !important;
  }

  .auth-layout .login-hero-points {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
}
body .auth-layout .auth-button[style*="display: none"],
body .auth-layout .auth-signup[style*="display: none"],
body .auth-layout .auth-text[style*="display: none"] {
  display: block !important;
}

body .auth-layout .auth-button[style*="visibility: hidden"],
body .auth-layout .auth-signup[style*="visibility: hidden"],
body .auth-layout .auth-text[style*="visibility: hidden"] {
  visibility: visible !important;
}

body .auth-layout .auth-button[style*="opacity: 0"],
body .auth-layout .auth-signup[style*="opacity: 0"],
body .auth-layout .auth-text[style*="opacity: 0"] {
  opacity: 1 !important;
}

/* Additional specificity for form elements */
body .auth-layout form,
html body .auth-layout form,
.auth-layout form {
  overflow: visible !important;
  min-height: auto !important;
  max-height: none !important;
}

body .auth-layout .auth-body,
html body .auth-layout .auth-body,
.auth-layout .auth-body {
  overflow: visible !important;
  min-height: auto !important;
  max-height: none !important;
}

/* Ensure no content cutoff */
body .auth-layout,
html body .auth-layout,
.auth-layout {
  overflow-y: visible !important;
  max-height: none !important;
  min-height: 100vh !important;
}