/* ====================================
   HERELIES Custom Login Page Styles
   8px Grid + Modern Design + Fixes
   ==================================== */

body.login-page {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: radial-gradient(circle at top left, #1e40af, #1e3a8a 60%, #111827 100%);
  color: #1e293b;
}
/* 🔒 Disable browser autofill styles and popups */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-internal-autofill-selected {
  background: none !important;
  color: inherit !important;
  box-shadow: 0 0 0px 1000px white inset !important;
}

/* Hide Chrome’s dropdown autofill icon */
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* -------------------------------
   Login Card
---------------------------------*/
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 32px;
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  text-align: center;
  animation: fadeIn 0.6s ease;
}

.login-card img {
  display: block;
  margin: 0 auto 16px auto;
  max-height: 80px;
  max-width: 100%;
}

.login-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
}

/* -------------------------------
   Input Group (Flex Layout)
---------------------------------*/
.input-group {
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 16px;
  overflow: hidden;
  height: 44px;
}

.input-group i {
  margin-left: 12px;
  margin-right: 8px;
  font-size: 14px;
  color: #64748b;
}

.input-group input {
  flex: 1;
  min-width: 0;              /* ✅ Fix: prevents text pushing */
  border: none;
  height: 100%;
  font-size: 15px;
  padding: 0 8px;             /* ✅ no extra padding-right */
  outline: none;
  background: transparent;
}

.input-group input:focus {
  outline: none;
}

/* Password toggle button */
.toggle-password {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0 0px;
  color: #64748b;
  font-size: 14px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: #1e3a8a;
  text-decoration: none;
}
label{
    margin: 0 0 -0.5rem 0;
}
/* ✅ Fix #1: Remove browser’s native password reveal/clear icons */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
}

/* -------------------------------
   Button
---------------------------------*/
.btn-login {
  background: #1e3a8a;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  height: 48px;
  padding: 0;
  border: none;
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-login:hover {
  background: #1e40af;
  transform: translateY(-2px);
  text-decoration: none;
}

/* -------------------------------
   Remember Me
---------------------------------*/
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}

.switch label {
  font-size: 14px;
  color: #374151;
}

/* -------------------------------
   Forgot Password
---------------------------------*/
.forgot {
  margin-top: 16px;
  font-size: 13px;
}

.forgot a {
  color: #1e3a8a;
  text-decoration: none;
}

.forgot a:hover {
  color: #1e40af;
  text-decoration: none;
}

/* -------------------------------
   Error Alert
---------------------------------*/
.alert {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  text-align: left;
}

/* -------------------------------
   Loader Overlay
---------------------------------*/
.loader-overlay {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loader {
  border: 6px solid #e2e8f0;
  border-top: 6px solid #1e3a8a;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -------------------------------
   Animations
---------------------------------*/
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------
   Responsive Design
---------------------------------*/

/* Mobile (up to 480px) */
@media (max-width: 480px) {
  body.login-page {
    padding: 16px;
  }

  .login-card {
    max-width: 100%;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  }

  .login-card h3 {
    font-size: 20px;
  }

  .login-card p {
    font-size: 13px;
  }

  .input-group input {
    font-size: 14px;
    height: 42px;
  }

  .btn-login {
    font-size: 15px;
    height: 46px;
  }
}

/* Tablet (481px – 1024px) */
@media (min-width: 481px) and (max-width: 1024px) {
  .login-card {
    max-width: 420px;
    padding: 28px;
  }

  .login-card h3 {
    font-size: 22px;
  }

  .btn-login {
    font-size: 16px;
    height: 48px;
  }
}