/* ==========================================
   BACKGROUND
========================================== */

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-y: auto;
  position: relative;
}

/* ==========================================
   WRAPPER - FIXED CENTERING
========================================== */

.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
  margin: 0;
  box-sizing: border-box;
}

/* ==========================================
   CARD - SLIGHTLY WIDER
========================================== */

.login-card {
  position: relative;
  width: 100%;
  max-width: 460px; /* Increased from 420px to 460px */
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 35px 35px 30px; /* Increased horizontal padding */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.265);
  animation: fadeIn 0.4s ease;
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  border: none;
  background: none;
  font-size: 28px;
  color: #9ca3af;
  cursor: pointer;
  transition: 0.2s;
}

.close-btn:hover {
  color: var(--status-danger-text);
}

/* ==========================================
   HEADER
========================================== */

.login-header {
  position: relative;
  text-align: center;
  margin-bottom: 25px;
}

.login-back-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-ink-soft);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-back-btn:hover,
.login-back-btn:focus-visible {
  color: var(--status-info-fill);
}

.login-back-btn:focus-visible {
  outline: 2px solid var(--status-info-fill);
  outline-offset: 3px;
  border-radius: 4px;
}

.login-header h2 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-ink);
}

.login-header p {
  margin-top: 6px;
  color: var(--color-ink-soft);
  font-size: 14px;
}

/* ==========================================
   ALERTS
========================================== */

/* ==========================================
   FORM
========================================== */

.form-group {
  position: relative;
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-soft);
  letter-spacing: 0.2px;
}

.form-group input {
  width: 100%;
  height: 40px;
  border: 1px solid #a5a6a867;
  border-radius: 10px;
  background: var(--color-surface);
  padding: 0 38px 0 12px; /* Adjusted padding */
  font-size: 14px;
  box-sizing: border-box;
  transition: 0.25s ease;
}

.form-group input::placeholder {
  color: var(--color-ink-faint);
  font-size: 12px;
}

.form-group input:focus {
  outline: none;
  background: rgb(244, 246, 247);
  border-color: var(--status-info-fill);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-helper {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--color-ink-soft);
}

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

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #888;
  transition: color 0.2s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: #333;
}

.toggle-password:focus {
  outline: none;
}

.toggle-password i {
  font-size: 20px;
}

/* ==========================================
   INPUT ICONS
========================================== */

.input-icon {
  position: absolute;
  right: 12px;
  top: 55%;
  color: #9ca3af;
  font-size: 14px;
  pointer-events: none;
}

/* ==========================================
   LOGIN BUTTON
========================================== */

.btn-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--status-danger-fill), var(--status-danger-hover));
  transition: 0.25s ease;
}

.btn-login-submit:hover {
  background: var(--status-danger-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(203, 31, 31, 0.25);
}

.btn-login-submit:active {
  transform: translateY(0);
}

/* ==========================================
   EXTRA OPTIONS
========================================== */

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 18px;
  font-size: 13px;
}

.login-options a {
  color: var(--status-info-fill);
  text-decoration: none;
}

.login-options a:hover {
  text-decoration: underline;
}

/* LEFT - Remember Me */
.remember-me-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(52, 50, 50, 0.85);
}

.remember-me-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Override Bootstrap's default form-check indentation so the checkbox
   row's left edge lines up with the input fields above it. */
.remember-me-wrapper .bs-form-check {
  padding-left: 0;
}

.remember-me-wrapper .bs-form-check-input {
  float: none;
  margin-left: 0;
  margin-right: 8px;
}

/* RIGHT - Forgot Password */
.forgot-password-wrapper a {
  font-size: 13px;
  color: #444347;
  text-decoration: none;
}

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

/* ==========================================
   FOOTER
========================================== */

.login-footer {
  text-align: center;
  margin-top: 22px;
}

.login-footer p {
  color: var(--color-ink-soft);
  font-size: 14px;
}

.login-footer a {
  color: var(--status-info-fill);
  text-decoration: none;
  font-weight: 600;
}

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

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 480px) {
  .login-card {
    max-width: 100%;
    padding: 20px 18px 18px;
  }


  .login-options {
    gap: 10px;
    font-size: 12px;
  }

  .remember-me-wrapper,
  .forgot-password-wrapper a {
    font-size: 12px;
  }

  .login-wrapper {
    padding: 15px;
  }
}
