:root {
  --primary: #064f28;
  --primary-dark: #022c15;
  --deep: #011c0d;
  --accent: #86efac;
  --accent-soft: rgba(134, 239, 172, 0.18);
  --text: #e0e7ff;
  --text-muted: rgba(224, 231, 255, 0.65);
  --glass: rgba(6, 79, 40, 0.45);
  --glass-border: rgba(134, 239, 172, 0.25);
  --radius: 14px;
}

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

/* Generic visibility utility (wizard step switching, banners, overlays) */
.hidden {
  display: none !important;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(145deg, var(--deep), var(--primary-dark));
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 340px;
}

/* Card */
.login-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Logo inside card */
.logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.7rem;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.logo-text span {
  color: var(--accent);
}

.logo-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* Form */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i.left-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 2.6rem 0.7rem 2.5rem;
  background: rgba(1, 28, 13, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  border-color: var(--accent);
  background: rgba(1, 28, 13, 0.7);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.15);
}

/* Password toggle */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 2;
}

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

/* Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
  font-size: 0.8rem;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  cursor: pointer;
}

.remember input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.forgot {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

/* Button */
.login-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--primary), #0a7a3c);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover {
  background: linear-gradient(135deg, #0a7a3c, var(--accent));
  color: var(--deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(134, 239, 172, 0.3);
}

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

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Error banner */
.login-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.login-error.hidden {
  display: none;
}

/* Password hint text (modal) */
.pw-hints {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: -0.2rem 0 1.1rem;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 28, 13, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--deep);
}

.modal-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.modal-sub {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

/* Responsive */
@media (max-width: 400px) {
  .login-card {
    padding: 1.6rem 1.3rem;
  }

  .modal-card {
    padding: 1.6rem 1.3rem;
  }
}

/* ============================================================
   Forgot-password wizard (3-step modal)
   ============================================================ */
.fp-card {
  max-width: 400px;
}

.fp-head {
  position: relative;
}

.fp-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(134, 239, 172, 0.12);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.fp-close:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

/* Progress indicator */
.fp-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.3rem;
}

.fp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.fp-step em {
  font-style: normal;
}

.fp-step span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(224, 231, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.fp-step.is-active {
  color: var(--accent);
}

.fp-step.is-active span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: var(--deep);
}

.fp-step-line {
  flex: 1;
  max-width: 36px;
  height: 2px;
  border-radius: 2px;
  background: rgba(134, 239, 172, 0.2);
}

.fp-step-body .login-btn {
  margin-top: 0.4rem;
}

/* Success banner (mirrors .login-error but green) */
.fp-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.fp-success.hidden {
  display: none;
}

/* OTP step */
.fp-otp-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  text-align: center;
}

.fp-otp-hint strong {
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}

#fpOtp {
  text-align: center;
  letter-spacing: 9px;
  font-weight: 600;
  font-size: 1.1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.fp-resend {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.fp-resend a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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