/* Quant Neeti Redesigned Auth Stylesheet */
:root {
  --bg-navy: #0a101b;
  --bg-navy-dark: #05080e;
  --bg-card: #172235;
  --bg-card-hover: #1f2d47;
  --text-white: #ffffff;
  --text-muted: #9aa8c2;
  --sky-blue: #24b7ca;
  --green: #39b976;
  --green-hover: #2e9e62;
  --border-color: #24354f;
  --error-color: #d6697b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-navy-dark);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Background mesh */
.bg-mesh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 10% 20%, rgba(36, 183, 202, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, rgba(57, 185, 118, 0.04) 0%, transparent 50%),
              var(--bg-navy-dark);
}

.auth-outer-container {
  width: 100%;
  max-width: 480px;
  padding: 24px;
}

.auth-card {
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  width: 100%;
  position: relative;
}

/* Back Arrow Button */
.back-arrow-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.back-arrow-btn:hover {
  color: var(--text-white);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Centered Logo */
.auth-logo-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-header .logo-icon {
  height: 52px;
  width: auto;
  transition: transform 0.3s ease;
}

.auth-logo-header .logo-icon:hover {
  transform: scale(1.05);
}

/* Form headers */
.auth-head {
  text-align: center;
  margin-bottom: 24px;
}

.auth-head h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.signup-intro {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.5;
}

.signup-intro strong {
  color: var(--sky-blue);
}

/* Email summary badge in Step 2 */
.email-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(36, 183, 202, 0.08);
  border: 1px solid rgba(36, 183, 202, 0.15);
  padding: 6px 12px;
  border-radius: 100px;
  margin-top: 12px;
  font-size: 13px;
}

.email-summary span {
  color: var(--sky-blue);
  font-weight: 500;
}

.edit-email-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
}

.edit-email-btn:hover {
  color: var(--text-white);
}

/* Inputs and Fields */
.field-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  width: 100%;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field input {
  width: 100% !important; /* CRITICAL FIX: enforce 100% width always */
  box-sizing: border-box !important;
  background-color: #121b2d;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-white);
  transition: all 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--sky-blue);
  box-shadow: 0 0 0 2px rgba(36, 183, 202, 0.15);
}

.field input::placeholder {
  color: #4b5563;
}

/* Checkbox field styling */
.checkbox-field {
  margin-top: 4px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-row input {
  width: auto !important;
  margin-top: 3px;
  cursor: pointer;
}

.checkbox-row a {
  color: var(--sky-blue);
  font-weight: 500;
  text-decoration: none;
}

.checkbox-row a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-primary {
  background-color: var(--green); /* Redesigned: Primary buttons are green */
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(57, 185, 118, 0.25);
}

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

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

.btn-secondary:hover {
  border-color: var(--sky-blue);
  background-color: rgba(36, 183, 202, 0.05);
}

.btn-block {
  width: 100%;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.btn-link {
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  align-self: center;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--text-white);
}

/* Google Login Button */
.btn-google {
  background-color: #0b111e;
  color: var(--text-white);
  border: 1px solid var(--border-color);
  margin-top: 8px;
}

.btn-google:hover {
  background-color: #121b2d;
  border-color: #3b5070;
}

.google-icon {
  margin-right: 4px;
}

/* Switch links */
.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.switch-btn {
  background: transparent;
  color: var(--sky-blue);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  margin-left: 4px;
}

.switch-btn:hover {
  text-decoration: underline;
}

/* Dividers */
.or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #4b5563;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.or-divider:not(:empty)::before {
  margin-right: .75em;
}

.or-divider:not(:empty)::after {
  margin-left: .75em;
}

/* hCaptcha widget spacing */
.captcha-container {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  width: 100%;
}

/* Error/Success notification styling */
.error-box {
  background-color: rgba(214, 105, 123, 0.08);
  border: 1px solid rgba(214, 105, 123, 0.15);
  color: var(--error-color);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: left;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--sky-blue);
  color: var(--text-white);
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease forwards;
}

.toast.error {
  border-left-color: var(--error-color);
}

.toast.success {
  border-left-color: var(--green);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Stacking for smaller mobile sizes */
@media (max-width: 480px) {
  .auth-card {
    padding: 24px 16px;
    box-shadow: none;
    border: none;
    background-color: transparent;
  }
}
