:root {
      --primary-green: var(--theme-primary, #28a745);
      --dark-green: var(--btn-primary-hover, #218838);
      --text-dark: var(--text-main, #1b1b1b);
      --border: #dcdcdc;
      --light-bg: #fafafa;
      --signup-bg: #eef8ef;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Poppins", sans-serif;
    }

    /* Body styling is now in the Creative Animated Background section */

    .login-card {
      background: #fff;
      width: 100%;
      max-width: 430px;
      padding: 2.5rem 2rem;
      border-radius: 14px;
      box-shadow: 0 8px 28px rgba(0,0,0,0.12);
      text-align: center;
    }

    .login-logo {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1rem;
    }

    .login-logo img {
      width: 100px;
      border-radius: 50%;
    }

    h1 {
      color: var(--text-dark);
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 1.8rem;
      letter-spacing: 1px;
    }

    .input-group {
      position: relative;
      margin-bottom: 1.4rem;
    }

    .input-field {
      width: 100%;
      padding: 15px 48px 15px 18px;
      font-size: 0.95rem;
      border-radius: 10px;
      border: 1.5px solid var(--border);
      background: #fff;
      transition: 0.3s ease;
    }

    .input-field:focus {
      outline: none;
      border-color: var(--primary-green);
      box-shadow: 0 0 5px rgba(40,167,69,0.4);
    }

    .input-icon {
      position: absolute;
      right: 18px;
      top: 50%;
      transform: translateY(-50%);
      color: gray;
      font-size: 1.05rem;
      cursor: pointer;
    }

    .forgot-password {
      text-align: right;
      margin-bottom: 1.8rem;
    }

    .forgot-password a {
      color: var(--primary-green);
      font-size: 0.9rem;
      text-decoration: none;
      font-weight: 500;
    }

    .forgot-password a:hover {
      text-decoration: underline;
    }

    .login-btn {
      width: 100%;
      padding: 14px;
      background: var(--primary-green);
      color: #fff;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: 0.3s ease;
      margin-bottom: 1rem;
    }

    .login-btn:hover {
      background: var(--dark-green);
    }

    /* Sign Up Button */
    .signup-btn {
      width: 100%;
      padding: 12px;
      background: var(--signup-bg);
      border: 1.5px solid var(--primary-green);
      border-radius: 10px;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      color: white;
      transition: 0.3s ease;
    }

    .signup-btn:hover {
      background: #dff0e0;
    }

    .footer-note {
      margin-top: 1.8rem;
      font-size: 0.83rem;
      color: gray;
    }

    /* ================= MODAL CORE ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 380px;
  padding: 22px 24px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  animation: modalFade 0.25s ease;
}

@keyframes modalFade {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-header {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body label {
  font-size: 0.85rem;
  font-weight: 500;
}

.modal-body input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cancel-btn {
  background: #e5e7eb;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.save-btn {
  background: var(--primary-green);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.otp-box{
  width:50px;
  height:52px;
  text-align:center;
  font-size:20px;
  font-weight:700;
  border-radius:12px;
  border:1.5px solid #d1d5db;
  transition:0.25s;
}

.otp-box:focus{
  outline:none;
  border-color:#28a745;
  box-shadow:0 0 0 3px rgba(40,167,69,.2);
}

/* ===== PASSWORD FORM STYLES ===== */
.form-group{
  margin-bottom:18px;
}

.form-group label{
  display:block;
  font-size:13px;
  font-weight:600;
  margin-bottom:6px;
  color:#374151;
}

.input-wrapper{
  position:relative;
  display:flex;
  align-items:center;
}

.input-wrapper input{
  width:100%;
  padding:12px 42px 12px 42px;
  border-radius:10px;
  border:1.5px solid #d1d5db;
  font-size:14px;
  transition:0.25s;
}

.input-wrapper input:focus{
  outline:none;
  border-color:var(--primary-green);
  box-shadow:0 0 0 3px rgba(40,167,69,.18);
}

.input-icon-left{
  position:absolute;
  left:14px;
  color:#6b7280;
  font-size:14px;
}

.toggle-eye{
  position:absolute;
  right:14px;
  color:#6b7280;
  cursor:pointer;
  font-size:15px;
}

.toggle-eye:hover{
  color:var(--primary-green);
}

.swal2-container {
  z-index: 100000 !important;
}

/* ================= CREATIVE ANIMATED BACKGROUND ================= */

/* Main body with animated gradient background */
body {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 25%, #ffffff 50%, #e3f2e1 75%, #d4edda 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animated geometric pattern overlay */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(30deg, rgba(40, 167, 69, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(40, 167, 69, 0.03) 87.5%, rgba(40, 167, 69, 0.03)),
    linear-gradient(150deg, rgba(40, 167, 69, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(40, 167, 69, 0.03) 87.5%, rgba(40, 167, 69, 0.03)),
    linear-gradient(30deg, rgba(40, 167, 69, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(40, 167, 69, 0.03) 87.5%, rgba(40, 167, 69, 0.03)),
    linear-gradient(150deg, rgba(40, 167, 69, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(40, 167, 69, 0.03) 87.5%, rgba(40, 167, 69, 0.03)),
    linear-gradient(60deg, rgba(40, 167, 69, 0.02) 25%, transparent 25.5%, transparent 75%, rgba(40, 167, 69, 0.02) 75%, rgba(40, 167, 69, 0.02)),
    linear-gradient(60deg, rgba(40, 167, 69, 0.02) 25%, transparent 25.5%, transparent 75%, rgba(40, 167, 69, 0.02) 75%, rgba(40, 167, 69, 0.02));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
  opacity: 0.4;
  z-index: 0;
}

/* Floating orbs for depth */
body::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  animation: floatOrb1 20s ease-in-out infinite;
  z-index: 0;
}

@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, 100px) scale(1.1); }
}

/* Additional floating orb */
.bg-icons::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(33, 136, 56, 0.12) 0%, rgba(33, 136, 56, 0.04) 40%, transparent 70%);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  animation: floatOrb2 18s ease-in-out infinite;
  z-index: 0;
}

@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, -80px) scale(1.15); }
}

/* Wrapper for icon doodles */
.bg-icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: normal;
}

/* Subtle animated dots pattern */
.bg-icons::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(40, 167, 69, 0.06) 2px, transparent 2px),
    radial-gradient(circle at 60% 70%, rgba(40, 167, 69, 0.04) 1.5px, transparent 1.5px),
    radial-gradient(circle at 80% 20%, rgba(40, 167, 69, 0.05) 2px, transparent 2px);
  background-size: 100px 100px, 150px 150px, 120px 120px;
  background-position: 0 0, 50px 50px, 25px 75px;
  animation: driftDots 30s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes driftDots {
  0% { background-position: 0 0, 50px 50px, 25px 75px; }
  100% { background-position: 100px 100px, 150px 150px, 145px 195px; }
}

/* Doodle icons styling */
.bg-icons .doodle {
  position: absolute;
  font-size: 48px;
  color: var(--primary-green);
  opacity: 0.08;
  transform-origin: center;
  will-change: transform, opacity;
  animation: gentleFloat 16s ease-in-out infinite;
  z-index: 1;
  filter: blur(0.3px);
}

/* Gentle floating animation */
@keyframes gentleFloat {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg); 
    opacity: 0.08; 
  }
  25% { 
    transform: translate(8px, -12px) rotate(2deg); 
    opacity: 0.12; 
  }
  50% { 
    transform: translate(-6px, -8px) rotate(-1deg); 
    opacity: 0.10; 
  }
  75% { 
    transform: translate(10px, -15px) rotate(3deg); 
    opacity: 0.11; 
  }
}

/* Doodle icons are now dynamically positioned via JavaScript */
/* Base styles only - positioning handled inline */


/* ensure login card appears above the icons */
.login-card {
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(40, 167, 69, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* hide decorative icons on small screens */
@media (max-width: 640px) {
  .bg-icons { display: none; }
  body::after { display: none; }
}

/* ─── OR Divider ─── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0.6rem 0;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ─── Google Sign-In Button ─── */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  margin-bottom: 0.75rem;
}
.google-btn:hover {
  background: #f9fafb;
  border-color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
}