/* ============================================
   MODERN LOGIN PAGE STYLES
   ============================================ */

/* Animated Background Shapes */
.login-bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
  animation: float 28s infinite ease-in-out;
  filter: blur(1px);
}

.env-prod .shape {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.3);
}

.env-dev .shape {
  background: linear-gradient(135deg, #f97316, #eab308);
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.3);
}

.env-uat .shape {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  box-shadow: 0 0 60px rgba(147, 51, 234, 0.3);
}

.shape-1 {
  width: 450px;
  height: 450px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
  animation-duration: 24s;
}

.shape-2 {
  width: 350px;
  height: 350px;
  top: 50%;
  right: -80px;
  animation-delay: -7s;
  animation-duration: 32s;
}

.shape-3 {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: 20%;
  animation-delay: -12s;
  animation-duration: 28s;
}

.shape-4 {
  width: 180px;
  height: 180px;
  top: 30%;
  left: 40%;
  animation-delay: -9s;
  animation-duration: 22s;
}

.shape-5 {
  width: 280px;
  height: 280px;
  bottom: -50px;
  right: 30%;
  animation-delay: -5s;
  animation-duration: 30s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.18;
  }
  25% {
    transform: translate(100px, -90px) rotate(12deg) scale(1.15);
    opacity: 0.22;
  }
  50% {
    transform: translate(-80px, 80px) rotate(-12deg) scale(0.85);
    opacity: 0.15;
  }
  75% {
    transform: translate(90px, 40px) rotate(8deg) scale(1.1);
    opacity: 0.2;
  }
}

/* Main Layout */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #1e293b;
}

.login-body.env-prod {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f3ff 100%);
}

.login-body.env-dev {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fff7ed 100%);
}

.login-body.env-uat {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%, #fae8ff 100%);
}

.login-wrapper {
  display: flex;
  max-width: 1100px;
  width: 100%;
  min-height: 600px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12), 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Left Hero Section */
.login-hero {
  flex: 1.2;
  padding: 40px 42px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.env-prod .login-hero {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  color: white;
}

.env-dev .login-hero {
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 50%, #eab308 100%);
  color: white;
}

.env-uat .login-hero {
  background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #c084fc 100%);
  color: white;
}

.login-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  transform: translateY(-32px);
}

.hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 24px;
  filter: brightness(0) invert(1);
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-icon svg {
  color: white;
}

/* Brand logo - unmasked, no added background/effects, sized up ~23% from
   the previous 52px and left-aligned with the heading below it (both are
   plain block-level children of .hero-content with no extra indent). */
.hero-brand-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  margin-top: 5px;
  margin-bottom: -20px;
  transform: translate(-18px, -12px);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-headline {
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0.95;
  margin: 0 0 5px;
  line-height: 1.4;
  max-width: 400px;
}

.hero-tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0 0 30px;
  line-height: 1.5;
  max-width: 400px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.feature-icon svg {
  color: white;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-text strong {
  font-size: 1rem;
  font-weight: 600;
}

.feature-text span {
  font-size: 0.9rem;
  opacity: 0.85;
}

.hero-footer {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  transform: translateY(34px);
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.trust-item svg {
  opacity: 0.9;
}

/* Right Login Container */
.login-container {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

.login-card {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

.login-card-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-card-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1f2937;
}

.login-card-header p {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

.login-card-header .invited-only-note {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 12px;
  font-style: italic;
}

/* Google Sign In Button */
.google-signin-wrapper {
  margin-bottom: 24px;
  text-align: center;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.google-signin-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.google-signin-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-logo {
  width: 22px;
  height: 22px;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.login-divider span {
  padding: 0 16px;
  font-size: 0.8rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Benefits List */
.login-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding-left: 55px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: #4b5563;
}

.env-prod .benefit-item svg {
  color: #3b82f6;
}

.env-dev .benefit-item svg {
  color: #f97316;
}

.env-uat .benefit-item svg {
  color: #9333ea;
}

/* Auth Error */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  margin-bottom: 20px;
}

.auth-error svg {
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-error p {
  margin: 0;
  font-size: 0.9rem;
  color: #dc2626;
  line-height: 1.4;
}

/* Auth Status */
.auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  margin-bottom: 20px;
}

.auth-status-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #bae6fd;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-status p {
  margin: 0;
  font-size: 0.9rem;
  color: #0369a1;
}

/* Disclaimer */
.login-disclaimer {
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: left;
  line-height: 1.6;
  margin: 0;
  padding-left: 48px;
}

.login-disclaimer a {
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.env-prod .login-disclaimer a:hover {
  color: #3b82f6;
}

.env-dev .login-disclaimer a:hover {
  color: #f97316;
}

.env-uat .login-disclaimer a:hover {
  color: #9333ea;
}

/* Copyright */
.login-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 32px;
}

/* Responsive Design */
@media (max-width: 900px) {
  /* Below this width the card stacks (hero on top, form below) instead of
     sitting side-by-side. Centering that stacked card vertically inside a
     full-height viewport (the desktop behavior) leaves a large empty gap
     above it whenever the card's natural content height is shorter than
     the screen -- which it normally is on a phone. Let the card flow from
     the top instead, with a modest fixed top gap rather than a viewport-
     height-dependent one, so this holds up across different phone heights. */
  .login-body {
    align-items: flex-start;
    padding-top: 24px;
  }

  .login-wrapper {
    flex-direction: column;
    max-width: 500px;
    /* Desktop's 600px floor is what was inflating the stacked hero+form
       card well past its actual content height on mobile. Let it size to
       content instead. */
    min-height: auto;
  }
  
  .login-hero {
    padding: 36px;
    min-height: auto;
    /* Desktop vertically centers the branding group inside a tall hero
       panel; on the stacked mobile layout that centers it inside a much
       shorter box, but still leaves a visible gap above it. Flow it from
       the top of the panel instead. */
    justify-content: flex-start;
  }
  
  .hero-content {
    margin-top: 14px;
    /* Reset the desktop-only fine-tuning offset (used to nudge the group
       up within the centered desktop layout) -- not meaningful once the
       content is top-aligned, and left in place it would shift the group
       out from under the hero's own top padding. */
    transform: none;
  }
  
  .hero-brand-icon {
    width: 84px;
    height: 84px;
    object-fit: contain;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 18px;
    transform: none;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-headline {
    margin-bottom: 6px;
  }
  
  .hero-tagline {
    margin-bottom: 24px;
  }
  
  .hero-features {
    display: none;
  }
  
  .hero-footer {
    margin-top: 24px;
  }
  
  .trust-badges {
    justify-content: center;
  }
  
  .login-container {
    padding: 36px;
  }
}

@media (max-width: 480px) {
  .login-body {
    padding: 12px;
  }
  
  .login-wrapper {
    border-radius: 16px;
  }
  
  .login-hero {
    padding: 28px;
  }
  
  .hero-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
  
  .hero-icon svg {
    width: 32px;
    height: 32px;
  }
  
  .hero-content {
    margin-top: 8px;
  }
  
  .hero-brand-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 18px;
    transform: none;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-headline {
    font-size: 1.05rem;
  }
  
  .hero-tagline {
    font-size: 0.95rem;
  }
  
  .trust-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .login-container {
    padding: 28px;
  }
  
  .login-card-header h2 {
    font-size: 1.5rem;
  }
  
  .google-signin-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* ============================================
   EMAIL SIGN-IN STYLES
   ============================================ */

.email-signin-toggle {
  margin-top: 8px;
}

.email-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-toggle-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.email-signin-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.login-benefits {
  margin-top: 24px;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.email-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-form .form-row {
  display: flex;
  gap: 12px;
}

.email-form .form-group.half {
  flex: 1;
}

.email-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  text-align: left;
}

.email-form input {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-form input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.email-form input::placeholder {
  color: #94a3b8;
}

.email-submit-btn {
  padding: 12px 16px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.email-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
}

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

.email-form-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: #64748b;
}

.link-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: #2563eb;
}

.form-error {
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 0.85rem;
}

/* Password Requirements */
.password-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
}

.password-requirements .req {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.password-requirements .req.valid {
  color: #10b981;
}

.password-requirements .req.valid::first-letter {
  content: '✓';
}

.password-match {
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 18px;
}

.password-match.match {
  color: #10b981;
}

.password-match.no-match {
  color: #ef4444;
}

/* ============================================
   PASSWORD VISIBILITY TOGGLE
   ============================================ */

/* Container for password input with toggle button */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 44px; /* Space for the toggle button */
}

/* Password visibility toggle button */
.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle-btn:hover {
  color: #64748b;
  background-color: #f1f5f9;
}

.password-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.password-toggle-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.password-toggle-btn svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Hide the "hide" icon by default, show "show" icon */
.password-toggle-btn .icon-show {
  display: block;
}

.password-toggle-btn .icon-hide {
  display: none;
}

.password-toggle-btn.is-visible .icon-show {
  display: none;
}

.password-toggle-btn.is-visible .icon-hide {
  display: block;
}

/* ============================================
   REMEMBER ME CHECKBOX
   ============================================ */

.remember-me-wrapper {
  margin: 12px 0 4px;
}

.remember-me-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  color: #475569;
}

.remember-me-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.remember-me-checkmark {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remember-me-checkbox:checked + .remember-me-checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.remember-me-checkmark::after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-me-checkbox:checked + .remember-me-checkmark::after {
  display: block;
}

.remember-me-checkbox:focus + .remember-me-checkmark {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.remember-me-label:hover .remember-me-checkmark {
  border-color: #94a3b8;
}

.remember-me-text {
  line-height: 1;
}

/* Forgot Password Link */
.forgot-password-link {
  text-align: center;
  margin-top: 12px;
}

.forgot-password-link a {
  color: #64748b;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password-link a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Password Reset Page Styles */
.reset-password-container {
  max-width: 440px;
  width: 100%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12), 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 40px;
  position: relative;
  z-index: 1;
}

.reset-password-header {
  text-align: center;
  margin-bottom: 28px;
}

.reset-password-header .icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.reset-password-header .icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.reset-password-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px;
}

.reset-password-header p {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.reset-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reset-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reset-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
}

.reset-form input {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reset-form input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reset-form input::placeholder {
  color: #94a3b8;
}

.reset-submit-btn {
  padding: 14px 16px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.reset-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
}

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

.reset-form-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.reset-form-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.reset-form-footer a:hover {
  text-decoration: underline;
}

.reset-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.reset-success .success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.reset-success .success-icon svg {
  width: 32px;
  height: 32px;
  color: #16a34a;
}

.reset-success h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px;
}

.reset-success p {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.reset-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  margin-bottom: 20px;
}

.reset-error svg {
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

.reset-error p {
  margin: 0;
  font-size: 0.9rem;
  color: #dc2626;
  line-height: 1.4;
}

/* ============================================
   PROGRESSIVE AUTHENTICATION STYLES
   ============================================ */

.user-greeting {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  text-align: center;
}

.google-only-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  margin-bottom: 20px;
}

.google-only-notice svg {
  color: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

.google-only-notice p {
  margin: 0;
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.4;
}

.or-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.or-divider span {
  padding: 0 12px;
}

.email-toggle-btn.secondary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.email-toggle-btn.secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.setup-notice {
  padding: 14px 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  margin-bottom: 20px;
}

.setup-notice p {
  margin: 0;
  font-size: 0.9rem;
  color: #0369a1;
  line-height: 1.4;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group.half {
  flex: 1;
  min-width: 0; /* Prevent flex items from overflowing */
}

/* Stack name fields vertically on smaller screens */
@media (max-width: 480px) {
  .email-form .form-row {
    flex-direction: column;
    gap: 14px;
  }
  
  .email-form .form-group.half {
    width: 100%;
  }
}

/* ============================================
   MODAL STYLES FOR LOGIN PAGE
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  margin: 40px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #475569;
}

.modal-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 24px 0 12px;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin: 0 0 12px;
}

.modal-body ul {
  margin: 0 0 12px;
  padding-left: 24px;
}

.modal-body li {
  margin-bottom: 6px;
}

.modal-body a {
  color: #2563eb;
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.modal .btn-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.modal .btn-close:hover {
  color: #1e293b;
}

.modal .btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.modal .btn-primary:hover {
  background: #1d4ed8;
}

/* ============================================
   TWO-FACTOR AUTHENTICATION LOGIN STYLES
   ============================================ */

.two-factor-login {
  text-align: center;
}

.two-factor-header {
  margin-bottom: 24px;
}

.two-factor-header svg {
  margin-bottom: 12px;
}

.two-factor-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.two-factor-header p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.two-factor-input-group {
  margin-bottom: 16px;
}

.two-factor-input-group input {
  width: 100%;
  max-width: 200px;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.two-factor-input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.two-factor-input-group input::placeholder {
  color: #cbd5e1;
  letter-spacing: 8px;
}
