/* ==========================================================================
   HYGI Air — standalone OTP login page (no site chrome)
   The background image is set inline on .login-screen (PHP asset path).
   ========================================================================== */
:root {
  --green-50: #f0fdf4;
  --green-200: #bbf7d0;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --ink: #0f172a;
  --slate: #64748b;
  --line: #e2e8f0;
  --grad: linear-gradient(135deg, #22c55e, #16a34a);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 32px clamp(20px, 6vw, 90px);
  position: relative;
}
/* readability veil that strengthens on small screens */
.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(240, 253, 244, 0) 35%,
    rgba(240, 253, 244, 0.35) 100%
  );
  pointer-events: none;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 44px);
}
/* Branded accent across the very top of the card. */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--grad);
}
/* Brand mark, top-left of the screen — a soft glass chip so it stays
   legible over the photo background. */
.login-brand {
  position: absolute;
  top: clamp(20px, 4vw, 34px);
  left: clamp(20px, 6vw, 64px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 9px 16px;
  transition: transform 0.15s ease;
}
.login-brand:hover {
  transform: translateY(-1px);
}
.login-brand img {
  height: 38px;
  display: block;
}

.login-card h1 {
  font-family: Poppins, sans-serif;
  font-size: 28px;
  text-align: center;
  margin: 0 0 8px;
  color: var(--green-700);
  letter-spacing: -0.01em;
}
.login-card__sub {
  text-align: center;
  color: var(--slate);
  font-size: 15px;
  margin: 0 0 26px;
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--green-700);
}
.field input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

/* Boxed OTP input */
.otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.otp-box {
  width: 100%;
  aspect-ratio: 1 / 1.12;
  min-width: 0;
  text-align: center;
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 800;
  font-family: Poppins, sans-serif;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.12s,
    background 0.18s;
}
.otp-box:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  transform: translateY(-2px);
}
.otp-box.is-filled {
  border-color: var(--green-500);
  background: var(--green-50);
}

.btn-login {
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  /* box-shadow: 0 14px 30px -12px rgba(22, 163, 74, 0.6); */
  transition:
    transform 0.15s,
    box-shadow 0.2s;
  margin-top: 10px;
}
.btn-login:hover {
  transform: translateY(-2px);
}
.btn-login.is-loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}
.btn-login.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* OR divider between email and Google sign-in */
.login-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--slate);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Continue with Google button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.15s;
}
.btn-google:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.35);
  transform: translateY(-1px);
}
.btn-google svg {
  flex: none;
}

/* Terms & privacy consent line */
.login-terms {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--slate);
}
.login-terms a {
  color: var(--green-700);
  font-weight: 600;
  text-decoration: none;
}
.login-terms a:hover {
  text-decoration: underline;
}

.login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13.5px;
}
.login-links form {
  display: inline;
}
.login-links a,
.login-links button {
  color: var(--green-700);
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
}
.login-links a:hover,
.login-links button:hover {
  text-decoration: underline;
}
.login-links button:disabled {
  color: var(--slate);
  cursor: default;
  text-decoration: none;
  opacity: 0.85;
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: var(--slate);
  font-size: 13.5px;
}
.login-back a {
  color: var(--green-700);
  font-weight: 600;
}

.flash {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
  border: 1px solid;
}
.flash--success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.flash--error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.flash--info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.otp-note {
  text-align: center;
  color: var(--slate);
  font-size: 14px;
  margin: -6px 0 22px;
}
.otp-note strong {
  color: var(--ink);
}
.otp-note--lead {
  margin: 16px 0 0;
}

@media (max-width: 760px) {
  /* Stack the logo above the card with a clear gap (no overlap). */
  .login-screen {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 22px;
    padding: 24px;
  }
  .login-screen::before {
    background: rgba(240, 253, 244, 0.45);
  }
  .login-brand {
    position: static;
    align-self: flex-start;
  }
}
