/* ========================================
   FLUFFO AUTH SUITE – LOGIN | SIGNUP
   White Background + Brand Colors (Blue #47c2e2 | Pink #f38ca6)
   "Forgot Password?" BELOW password, right-aligned
   10px gap below footer on mobile
   Glassmorphism removed → Clean modern card with brand accents
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem;
  overflow-y: auto;
  position: relative;
}
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid #47c2e2;
  outline-offset: 3px;
}

/* ========================================
   UNIVERSAL AUTH CARD (LOGIN & SIGNUP ONLY)
   ======================================== */
.login-card, .signup-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 24px;
  box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(71, 194, 226, 0.05) inset;
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 100%;
  margin: 5rem auto 3rem;
  text-align: center;
  animation: fadeInUp 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card::before, .signup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(71, 194, 226, 0.08), transparent);
  border-radius: 24px;
  pointer-events: none;
}
.login-card h1, .signup-card h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.6rem;
  letter-spacing: -0.6px;
}
.subtitle {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 1.8rem;
}

/* ========================================
   FORM INPUTS
   ======================================== */
.form-group {
  margin-bottom: 1.6rem;
  text-align: left;
  position: relative;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.6rem;
}
.form-group input {
  width: 100%;
  padding: 0.95rem 1rem;
  background: #f7fafc;
  border: 1.5px solid #cbd5e0;
  border-radius: 14px;
  font-size: 1.025rem;
  color: #1a1a1a;
  transition: all 0.35s ease;
  caret-color: #47c2e2;
}
.form-group input::placeholder {
  color: #a0aec0;
  font-weight: 500;
}
.form-group input:focus {
  outline: none;
  border-color: #47c2e2;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(71, 194, 226, 0.15), 0 0 18px rgba(71, 194, 226, 0.12);
  transform: translateY(-1px);
}

/* ========================================
   PASSWORD TOGGLE (INSIDE FIELD)
   ======================================== */
.password-wrapper {
  position: relative;
}
.toggle-pw {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.toggle-pw:hover {
  background: rgba(71, 194, 226, 0.12);
  color: #47c2e2;
}
.toggle-pw svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ========================================
   FORGOT PASSWORD – BELOW PASSWORD, RIGHT-ALIGNED
   ======================================== */
.forgot-link {
  text-align: right;
  margin-top: -0.8rem;
  margin-bottom: 1.8rem;
}
.forgot-link a {
  font-size: 0.9rem;
  color: #47c2e2;
  text-decoration: none;
  font-weight: 500;
  transition: all .25s ease;
}
.forgot-link a:hover {
  color: #3aa8c7;
  text-decoration: underline;
}

/* ========================================
   PRIMARY BUTTON (BLUE)
   ======================================== */
button.primary {
  width: 100%;
  padding: 1rem;
  background: #47c2e2;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 25px rgba(71, 194, 226, 0.25);
  position: relative;
  overflow: hidden;
}
button.primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: 0.6s;
}
button.primary:hover:not(:disabled)::before {
  left: 100%;
}
button.primary:hover:not(:disabled) {
  background: #3aa8c7;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(71, 194, 226, 0.35);
}
button.primary:active {
  transform: translateY(-1px);
}
.spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top: 2.5px solid #ffffff;
  border-radius: 50%;
  animation: spin .85s linear infinite;
}
button.primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   SECONDARY LINK (PINK – e.g., "Sign up" on Login page)
   ======================================== */
.link-secondary {
  color: #ffff;
  font-weight: 600;
  text-decoration: none;
  transition: color .25s ease;
}
.link-secondary:hover {
  color: #ffff;
  text-decoration: underline;
}

/* ========================================
   STATUS MESSAGES
   ======================================== */
.error {
  background: #fff5f5;
  color: #c53030;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  margin-bottom: 1.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 5px solid #f56565;
  animation: shake 0.5s ease-in-out;
  box-shadow: 0 4px 12px rgba(245, 101, 101, 0.15);
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ========================================
   FOOTER – 10px BELOW ON MOBILE
   ======================================== */
footer {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-bottom: 10px;
  font-size: 0.9rem;
  color: #718096;
  text-align: center;
}
footer a {
  color: #47c2e2;
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: color .3s ease;
}
footer a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2.5px;
  bottom: -4px;
  left: 0;
  background: #47c2e2;
  border-radius: 2px;
  transition: width .4s ease;
}
footer a:hover::after {
  width: 100%;
}
footer a:hover {
  color: #3aa8c7;
}

/* ========================================
   MOBILE OPTIMIZATION
   ======================================== */
@media (max-width: 480px) {
  body {
    padding: 1.2rem 20px 0;
  }
 .login-card, .signup-card {
    max-width: 380px;     /* ← NARROWER ON MOBILE */
    margin: 3rem auto 2.5rem; /* Less top space on small screens */
    padding: 2rem 1.6rem;
    border-radius: 20px;
  }
  .login-card h1, .signup-card h1 {
    font-size: 1.8rem;
    margin-bottom: 1.4rem;
  }
  .form-group input,
  button.primary {
    font-size: 1rem;
    padding: 0.85rem;
  }
  .toggle-pw {
    right: 0.8rem;
    width: 34px;
    height: 34px;
  }
  .forgot-link {
    margin-top: -0.6rem;
    margin-bottom: 1.6rem;
  }
  footer {
    margin-top: 2rem;
    padding-bottom: 10px;
    font-size: 0.875rem;
  }
}

/* ========================================
   DESKTOP WIDER
   ======================================== */
@media (min-width: 768px) {
  .login-card, .signup-card {
    max-width: 540px;
    padding: 3.5rem 3rem;
  }
}

/* ========================================
   FINAL: ENSURE 10px BELOW FOOTER ON MOBILE
   ======================================== */
html, body {
  margin: 0;
  padding: 0;
}
body {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
@media (max-width: 480px) {
  body {
    padding-bottom: 10px !important;
  }
}