/* --- Auth Redesign Stylesheet (Glassmorphism & Neon Mesh Theme) --- */

:root {
  --bg-dark: #080a10;
  --card-bg: rgba(15, 23, 42, 0.45);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --input-bg: rgba(15, 23, 42, 0.6);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-border: #4f46e5;
  --input-focus-shadow: rgba(79, 70, 229, 0.25);
  
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  --hover-gradient: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
  --accent-cyan: #06b6d4;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-family: 'Poppins', 'Inter', sans-serif;
}

/* Base Body and Layout Adjustments */
body {
  font-family: var(--font-family);
  background-color: var(--bg-dark) !important;
  color: var(--text-primary) !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#root {
  background: var(--bg-dark) !important;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
  overflow: hidden;
  padding: 2rem 1rem;
}

/* Background Glowing Blurs (Mesh Effect) */
.auth-glow-1, .auth-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
  animation: pulseGlow 15s infinite alternate ease-in-out;
}

.auth-glow-1 {
  background: #4f46e5;
  top: -10%;
  left: -10%;
}

.auth-glow-2 {
  background: #06b6d4;
  bottom: -10%;
  right: -10%;
  animation-delay: -5s;
}

@keyframes pulseGlow {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.1;
  }
  50% {
    transform: translate(30px, -20px) scale(1.1);
    opacity: 0.15;
  }
  100% {
    transform: translate(-20px, 30px) scale(0.9);
    opacity: 0.1;
  }
}

/* Auth Card Wrapper */
main {
  width: 100%;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.w-full.max-w-\[26rem\] {
  max-width: 28rem !important; /* Slightly wider for modern layout */
  width: 100%;
  background: var(--card-bg) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--card-shadow) !important;
  padding: 2.5rem 2rem !important;
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.w-full.max-w-\[26rem\]:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Brand Logo and Headings */
.text-center img.mx-auto {
  width: 200px !important;
  height: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.text-center img.mx-auto:hover {
  transform: scale(1.1) rotate(2deg);
}

.text-center h2 {
  font-family: var(--font-family);
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 1rem !important;
  letter-spacing: -0.02em;
}

.text-center p.text-slate-400 {
  color: var(--text-secondary) !important;
  font-size: 0.95rem !important;
  margin-top: 0.35rem !important;
  font-weight: 400;
}

/* Form Styles and Overrides */
form {
  width: 100%;
}

.card.mt-5 {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 1.5rem !important;
}

/* Form Labels & Groupings */
label {
  display: block;
  margin-bottom: 1.25rem;
}

label span:first-child {
  display: block;
  color: var(--text-secondary) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

/* Input Fields Styling */
.form-input {
  width: 100% !important;
  box-sizing: border-box;
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
  padding: 0.75rem 1rem 0.75rem 2.75rem !important; /* Left padding for icons */
  font-size: 0.95rem !important;
  font-family: var(--font-family);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.75;
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.form-input:focus {
  outline: none !important;
  border-color: var(--input-focus-border) !important;
  box-shadow: 0 0 0 4px var(--input-focus-shadow), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  background: rgba(15, 23, 42, 0.85) !important;
}

/* Input Icons */
.relative.mt-1\.5.flex {
  position: relative;
  display: flex;
  align-items: center;
}

.relative.mt-1\.5.flex > span.pointer-events-none {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
  transition: color 0.25s ease;
  z-index: 10;
}

.form-input:focus + span.pointer-events-none,
.form-input:focus + span.pointer-events-none i,
.form-input:focus + span.pointer-events-none svg {
  color: #3b82f6 !important;
}

/* Dropdown list customization (Sign Up Page) */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 2.5rem !important;
}

select.form-input option {
  background-color: #0b0f19 !important;
  color: var(--text-primary) !important;
}

/* Primary Action Buttons */
.btn.bg-primary {
  width: 100% !important;
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 0.85rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin-top: 1.5rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.bg-primary:hover {
  background: var(--hover-gradient) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px);
}

.btn.bg-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4) !important;
}

/* Secondary Actions / "OR" Divider / Alternative Login Methods */
.forgot-pass-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.forgot-pass-link,
a[href="forgot_password"] {
  color: var(--text-secondary) !important;
  font-size: 0.825rem !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover,
a[href="forgot_password"]:hover {
  color: #3b82f6 !important;
}

.or-divider {
  display: flex;
  align-items: center;
  margin: 1.75rem 0 !important;
}

.or-divider .divider-line {
  flex-grow: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.or-divider p {
  margin: 0 1rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  letter-spacing: 0.1em;
}

.use-phrase-btn,
.btn.border-slate-300 {
  width: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 0.75rem 1.5rem !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
}

.use-phrase-btn:hover,
.btn.border-slate-300:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Captcha Block Stylings */
.cCaptcha {
  display: flex !important;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px !important;
  margin-top: 1.25rem !important;
}

.cCaptcha > div {
  background: transparent !important;
  height: 42px !important;
  display: flex;
  align-items: center;
}

.cCaptcha img {
  height: 100% !important;
  border-radius: 6px;
  filter: contrast(1.1) brightness(0.95);
}

.cCaptcha input[type="text"] {
  flex-grow: 1;
  background: rgba(15, 23, 42, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  height: 42px;
  font-size: 0.9rem !important;
  text-indent: 10px;
  transition: all 0.2s ease;
}

.cCaptcha input[type="text"]:focus {
  outline: none;
  border-color: var(--input-focus-border) !important;
  background: rgba(15, 23, 42, 0.7) !important;
}

/* Footer & Sublinks Styles */
.footer-text {
  text-align: center;
  margin-top: 1.5rem !important;
  font-size: 0.85rem !important;
  color: var(--text-secondary);
}

.footer-text a {
  color: #3b82f6 !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-text a:hover {
  color: #60a5fa !important;
}

.bottom-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem !important;
  font-size: 0.8rem !important;
}

.bottom-links a {
  color: var(--text-muted) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bottom-links a:hover {
  color: var(--text-secondary) !important;
}

.bottom-links .divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
}

/* Resend OTP Block Styling */
.otp-wrapper {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.otp-wrapper a {
  color: #3b82f6 !important;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.otp-wrapper a:hover {
  color: #60a5fa !important;
}

/* Notification & Alertify Styles Override */
.alertify-notifier .ajs-message {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Error/Success Alert Box Styling */
#Lblmsg, .response {
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  font-size: 0.875rem !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.4 !important;
}

#Lblmsg:empty {
  display: none !important;
}

/* If error contains elements or text */
#Lblmsg span, #Lblmsg {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* Custom Success style if the innerText has success clues */
#Lblmsg.success, .response.success {
  color: #86efac !important;
  background: rgba(34, 197, 94, 0.1) !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
}
