:root {
  --primary-green: #0d7a63;
  --primary-green-dark: #0b5847;
  --primary-green-light: #d1fae5;
  --bg-gradient-start: #f0fdf4;
  --bg-gradient-end: #ecfdf5;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #0b5847 0%, #0d7a63 50%, #0b5847 100%);

  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 1rem;
}

.login-container,
.forgot-container,
.reset-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.login-card,
.forgot-card,
.reset-card {
  background: #f5f5f5;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: var(--card-shadow);
  position: relative;
}

.logo-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo-circle {
  width: 90px;
  height: 90px;
  background: var(--primary-green-dark);
  border: 3px solid var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.logo-circle img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.logo-placeholder {
  font-size: 2rem;
  color: var(--primary-green);
  font-weight: 700;
}

.system-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.system-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.secure-access {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.secure-access i {
  color: var(--primary-green);
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-label i {
  color: var(--primary-green);
}

.input-group-custom {
  position: relative;
  margin-bottom: 1rem;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 5;
}

.form-control-custom {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #fafafa;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--primary-green);
  background: white;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-green);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  z-index: 5;
}

.password-toggle:hover {
  text-decoration: underline;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-green);
  cursor: pointer;
}

.forgot-link {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

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

.btn-login {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--primary-green-dark) 100%
  );
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

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

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--primary-green);
  text-decoration: none;
  font-size: 0.8rem;
}

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

.alert-custom {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

.whatsapp-float i {
  color: white;
  font-size: 1.8rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .system-title {
    font-size: 1.25rem;
  }

  .logo-circle {
    width: 80px;
    height: 80px;
  }

  .social-buttons {
    grid-template-columns: 1fr;
  }

  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 55px;
    height: 55px;
  }

  .whatsapp-float i {
    font-size: 1.6rem;
  }
}

@media (max-width: 400px) {
  body {
    padding: 0.5rem;
  }

  .login-card,
  .forgot-card {
    padding: 1.5rem 1.25rem;
  }
  .form-options {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

/* Forgot Password */
.back-link {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.back-link:hover {
  color: var(--primary-green);
}

.forgot-icon-badge {
  width: 70px;
  height: 70px;
  background: var(--primary-green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.forgot-icon-badge i {
  font-size: 2rem;
  color: var(--primary-green);
}

.forgot-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.forgot-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.info-box i {
  color: #3b82f6;
  font-size: 1.1rem;
  margin-top: 0.15rem;
}

.info-box-content {
  flex: 1;
}

.info-box-content p {
  font-size: 0.85rem;
  color: #1e40af;
  margin: 0;
  line-height: 1.5;
}

.btn-send-link {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--primary-green-dark) 100%
  );
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-send-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

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

.btn-send-link:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.footer-text a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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


/* Reset Password */
.reset-icon-badge {
  width: 70px;
  height: 70px;
  background: var(--primary-green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.reset-icon-badge i {
  font-size: 2rem;
  color: var(--primary-green);
}

.reset-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.reset-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}


.password-requirements {
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.875rem;
  margin-bottom: 1.25rem;
}

.password-requirements p {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-requirements li {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.password-requirements li i {
  font-size: 0.7rem;
  color: var(--primary-green);
}

.btn-reset {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--primary-green-dark) 100%
  );
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

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

.btn-reset:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
