:root {
  --orange: #C06C3C;
  --orange-dk: #a84d18;
  --olive: #8A8636;
  --olive-dk: #6e6928;
  --green: #4A7C59;
  --text: #1E2A38;
  --text-md: #4a5b6e;
  --text-sm: #7c8b9c;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 16px;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(207, 99, 34, 0.15), rgba(140, 134, 54, 0.15)),
    url('/images/bg.jpg') no-repeat center center/cover;
  padding: 20px;
  position: relative;
}

/* back button */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
  background: var(--orange);
  color: white;
  transform: translateX(-2px);
}

/* login card */
.login-card {
  background: var(--white);
  width: 100%;
  max-width: 380px;
  padding: 30px 28px;
  border-radius: 24px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.logo-container {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
}

.logo-container img {
  width: 100px;
  height: auto;
}

.brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.brand-name .txt-olive {
  color: var(--olive);
}

.brand-name .txt-orange {
  color: var(--orange);
}

.subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-sm);
  margin-bottom: 24px;
}

/* form styles */
.form-group {
  position: relative;
  margin-bottom: 12px;
}

.form-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sm);
  font-size: 0.8rem;
}

.form-control {
  width: 100%;
  padding: 11px 12px 11px 42px;
  border: 1.5px solid var(--border);
  background: #fdfdfd;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(207, 99, 34, 0.1);
}

.form-control::placeholder {
  color: var(--text-sm);
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--olive);
  text-decoration: none;
  margin: 6px 0 20px;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--orange-dk);
  transform: translateY(-1px);
}

.separator {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-sm);
  font-size: 0.6rem;
  font-weight: 600;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.separator span {
  padding: 0 10px;
}

.btn-google {
  width: 100%;
  padding: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 18px;
}

.btn-google:hover {
  border-color: var(--orange);
  background: rgba(207, 99, 34, 0.05);
}

.btn-google img {
  width: 16px;
}

.signup-text {
  font-size: 0.7rem;
  color: var(--text-md);
}

.signup-text a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.signup-text a:hover {
  text-decoration: underline;
}

.copyright {
  margin-top: 18px;
  font-size: 0.6rem;
  color: var(--text-sm);
}

/* alert messages */
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: left;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: left;
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px;
    max-width: 340px;
  }

  .logo-container img {
    width: 80px;
  }

  .back-btn {
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    font-size: 0.65rem;
  }
}

/* Custom Password Toggle */
.form-group.password-group {
  position: relative;
}

.form-group.password-group .form-control {
  padding-right: 40px; /* Space for the eye icon */
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-sm);
  font-size: 0.85rem;
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--orange);
}

/* Reset default absolute left styling for icons inside password-toggle */
.form-group .password-toggle i {
  position: static;
  transform: none;
  color: inherit;
  font-size: inherit;
}

/* ═══════════════════════════════════════════════
   FORGOT PASSWORD MODAL
   ═══════════════════════════════════════════════ */
.fp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.fp-overlay.open {
  display: flex;
}

.fp-modal {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.fp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-sm);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.fp-close:hover {
  color: var(--orange);
}

.fp-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  text-align: center;
}

.fp-subtitle {
  font-size: 0.75rem;
  color: var(--text-sm);
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.5;
}

.fp-step .form-group {
  margin-bottom: 14px;
}

.fp-message {
  font-size: 0.7rem;
  min-height: 1.2em;
  margin-bottom: 10px;
  text-align: center;
}

.fp-message--error {
  color: #c0392b;
}

.fp-message--success {
  color: var(--olive);
}

.fp-resend-link {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--olive);
  text-decoration: none;
  margin-top: 14px;
}

.fp-resend-link:hover {
  text-decoration: underline;
}

.fp-success-icon {
  text-align: center;
  font-size: 2.5rem;
  color: var(--olive);
  margin-bottom: 8px;
}

/* Hide Microsoft Edge / IE default show password reveal button */
input::-ms-reveal,
input::-ms-clear {
  display: none;
}