/* =========================================================
   Login page  (standalone, does not need custom.css)
   ========================================================= */
:root {
  --olive: #33371e;
  --green: #637704;
  --orange: #f4831f;
  --line: #e6e6df;
  --text: #252e36;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: #f4f4f4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- background bands ---------- */
.lg-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.lg-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/login-bg.png") no-repeat center top /
    max(100%, 1100px) auto;
  animation: lgBand 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes lgBand {
  from {
    opacity: 0;
    transform: translate(-60px, 40px);
  }
}

/* ---------- layout ---------- */
.lg-wrap {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 48px) 16px;
}

.lg-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(26px, 5vw, 36px) clamp(20px, 5vw, 36px) clamp(26px, 4vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(51, 55, 30, 0.1);
  animation: lgRise 0.8s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition:
    box-shadow 0.4s,
    transform 0.4s;
}

.lg-card:hover {
  box-shadow: 0 30px 70px rgba(51, 55, 30, 0.14);
}

@keyframes lgRise {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
}

/* staggered children */
.lg-card > * {
  animation: lgUp 0.6s both;
  animation-delay: calc(0.25s + var(--i, 0) * 0.07s);
}

@keyframes lgUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- head ---------- */
.lg-logo {
  display: flex;
  justify-content: center;
  height: 56px;
  margin-bottom: 20px;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.lg-logo:hover {
  transform: scale(1.04);
}

.lg-logo img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.lg-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 700;
  color: var(--olive);
}

.lg-card p {
  margin: 0 0 clamp(22px, 4vw, 30px);
  text-align: center;
  font-size: 14px;
  color: #666;
}

/* ---------- fields ---------- */

.lg-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111;
}

.lg-input {
  position: relative;
}

.lg-input > iconify-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #555;
  pointer-events: none;
  transition: color 0.25s;
}

.lg-input input {
  width: 100%;
  /* height: 48px; */
  padding: clamp(10px, 1.2vw, 14px) 46px clamp(10px, 1.2vw, 14px) 44px;
  border: 1px solid #e3e3dc;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #111;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.lg-input input::placeholder {
  color: #9a9a92;
}

.lg-input input:hover {
  border-color: #c9ccb8;
}

.lg-input input:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 0.2rem rgba(99, 119, 4, 0.15);
}

.lg-input:focus-within > iconify-icon {
  color: var(--green);
}

/* red outline once the user typed something invalid */
.lg-input input:not(:placeholder-shown):invalid {
  border-color: #e32626;
}

.lg-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #444;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s;
}

.lg-eye:hover {
  background: #f0f2e6;
  color: var(--green);
}

.lg-eye:focus-visible {
  outline: 2px solid var(--green);
}

/* ---------- row: remember + forgot ---------- */
.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 20px;
}

.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

.lg-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lg-check a {
  color: var(--green);
  font-weight: 500;
  text-decoration: underline;
}

.lg-check i {
  font-style: normal;
  color: #e32626;
}
.lg-box {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--green);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  transition:
    background 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}

.lg-box iconify-icon {
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.lg-check:hover .lg-box {
  box-shadow: 0 0 0 4px rgba(99, 119, 4, 0.12);
}

.lg-check input:checked + .lg-box {
  background: var(--green);
}

.lg-check input:checked + .lg-box iconify-icon {
  transform: scale(1);
}

.lg-check input:focus-visible + .lg-box {
  box-shadow: 0 0 0 0.2rem rgba(99, 119, 4, 0.3);
}

.lg-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s;
}

.lg-link:hover {
  color: var(--olive);
}

/* ---------- buttons ---------- */
.lg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  /* height: 50px; */
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: clamp(10px, 1.2vw, 14px) clamp(18px, 2vw, 24px);
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}

.lg-btn.primary {
  background: var(--green);
  color: #fff;
}

.lg-btn.primary:hover {
  background: var(--olive);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(51, 55, 30, 0.25);
}

.lg-btn.primary:active,
.lg-btn.google:active {
  transform: translateY(0);
  box-shadow: none;
}

.lg-btn.google {
  /* height: 46px; */
  background: #fff;
  border-color: #e3e3dc;
  color: #222;
  font-weight: 500;
}

.lg-btn.google svg {
  width: 20px;
  height: 20px;
  flex: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.lg-btn.google:hover {
  background: #f8f9f4;
  border-color: #c9ccb8;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(51, 55, 30, 0.08);
}

.lg-btn.google:hover svg {
  transform: rotate(-12deg) scale(1.1);
}

.lg-btn:focus-visible {
  outline: 3px solid rgba(99, 119, 4, 0.4);
  outline-offset: 2px;
}

/* ---------- divider ---------- */
.lg-or {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
  font-size: 13px;
  color: #666;
}

.lg-or::before,
.lg-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e3e3dc;
}

/* ---------- foot ---------- */
.lg-foot {
  margin: 26px 0 0 !important;
  text-align: center;
  font-size: 14px;
  color: #555;
}

.lg-foot .lg-link {
  margin-left: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 420px) {
  .lg-row {
    flex-wrap: wrap;
  }

  .lg-card {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
