/* Login screen */
.login-screen {
  --a-bg: #f6f7f2;
  --a-ink: #1f2d24;
  --a-muted: #6b786e;
  --a-line: #dfe5da;
  --a-green: #2f5a42;
  --a-green-dark: #234634;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: var(--a-bg);
  color: var(--a-ink);
}

/* ---- Hero ---- */
.auth-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px clamp(28px, 6vw, 80px) 28px;
  color: #eaf3ea;
  background:
    radial-gradient(120% 90% at 0% 0%, #3f7557 0%, transparent 55%),
    linear-gradient(160deg, #234634 0%, #16291f 100%);
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.auth-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
}
.auth-glow-a {
  width: 340px;
  height: 340px;
  right: -90px;
  top: 18%;
  background: rgba(233, 149, 93, 0.28);
}
.auth-glow-b {
  width: 300px;
  height: 300px;
  left: -80px;
  bottom: -60px;
  background: rgba(159, 214, 168, 0.22);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  width: fit-content;
}
.auth-brand .brand-mark {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.auth-brand .brand-name span {
  color: #a9c7b0;
}
.auth-hero-copy {
  margin-top: clamp(8px, 4vh, 48px);
  max-width: 520px;
}
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cfe6d3;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.auth-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e9955d;
  box-shadow: 0 0 0 4px rgba(233, 149, 93, 0.22);
}
.auth-hero h1 {
  font: 800 clamp(34px, 4.4vw, 56px) / 1.06 Manrope, sans-serif;
  letter-spacing: -0.04em;
  margin: 20px 0 16px;
  color: #fff;
}
.auth-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #b8e6bf, #f2c9a4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-hero-copy p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #b9cfbf;
  max-width: 430px;
}

/* Illustration */
.auth-preview {
  position: relative;
  flex: 1;
  min-height: 260px;
  margin: 0 calc(-1 * clamp(28px, 6vw, 80px)) -28px;
  overflow: hidden;
}
.auth-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene-window,
.scene-halo {
  animation: scene-glow 5s ease-in-out infinite;
}
.scene-window-b {
  animation-delay: -2.2s;
}
.scene-smoke {
  animation: scene-smoke 6s ease-in-out infinite;
}
.scene-cloud-a {
  animation: scene-drift 36s ease-in-out infinite alternate;
}
.scene-cloud-b {
  animation: scene-drift 48s ease-in-out infinite alternate-reverse;
}
@keyframes scene-glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.78;
  }
}
@keyframes scene-smoke {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  50% {
    opacity: 0.45;
    transform: translateY(-6px);
  }
}
@keyframes scene-drift {
  to {
    transform: translateX(46px);
  }
}
.auth-hero-foot {
  font-size: 12px;
  color: #8fb09a;
}

/* ---- Form panel ---- */
.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px clamp(24px, 6vw, 84px);
  background: #fff;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.auth-mobile-brand {
  display: none;
}
.auth-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e9955d;
}
.auth-panel h2 {
  font: 800 34px / 1.1 Manrope, sans-serif;
  letter-spacing: -0.03em;
  margin: 12px 0 8px;
  color: var(--a-ink);
}
.auth-sub {
  margin: 0 0 28px;
  color: var(--a-muted);
  font-size: 15px;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #3a4a3f;
}
.auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f6f8f4;
  box-shadow: inset 0 0 0 1.5px var(--a-line);
  transition:
    box-shadow 0.15s,
    background 0.15s;
}
.auth-input:focus-within {
  background: #fff;
  box-shadow:
    inset 0 0 0 2px var(--a-green),
    0 0 0 4px rgba(47, 90, 66, 0.12);
}
.auth-input svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: #8a978d;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: 500 16px "DM Sans", sans-serif;
  color: var(--a-ink);
}
.auth-input input::placeholder {
  color: #9aa69d;
}
.auth-eye {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.auth-eye:hover svg,
.auth-eye[aria-pressed="true"] svg {
  stroke: var(--a-green);
}
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: 13px;
}
.auth-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #3a4a3f;
}
.auth-check-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--a-green);
}
.auth-row small {
  color: var(--a-muted);
  font-size: 12px;
  text-align: right;
}
.login-error {
  min-height: 0;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: #b3392b;
}
.login-error:not(:empty) {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdeeeb;
  box-shadow: inset 0 0 0 1px #f6cbc4;
}
.auth-submit {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  font: 700 16px "DM Sans", sans-serif;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #386a4e, var(--a-green-dark));
  box-shadow:
    0 10px 22px rgba(35, 70, 52, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    opacity 0.15s;
}
.auth-submit:active {
  transform: translateY(1px);
}
.auth-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}
.auth-submit.is-loading .auth-arrow {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  font-size: 0;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: #9aa69d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-or span {
  flex: 1;
  height: 1px;
  background: var(--a-line);
}
.auth-demo {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  font: 600 15px "DM Sans", sans-serif;
  color: var(--a-green-dark);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--a-line);
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.auth-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  color: #8a978d;
}
.auth-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 12px;
  color: #9aa69d;
}
.auth-submit:focus-visible,
.auth-demo:focus-visible,
.auth-eye:focus-visible {
  outline: 3px solid rgba(47, 90, 66, 0.35);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
      0 14px 28px rgba(35, 70, 52, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  .auth-demo:hover {
    background: #f3f7f1;
    box-shadow: inset 0 0 0 1.5px #c5d2c3;
  }
}
@media (max-width: 820px) {
  .login-screen {
    display: block;
    background: #fff;
  }
  .auth-hero {
    display: none;
  }
  .auth-panel {
    min-height: 100dvh;
    justify-content: flex-start;
    padding: 28px 22px 64px;
    background:
      radial-gradient(90% 40% at 100% 0%, rgba(233, 149, 93, 0.13), transparent 70%),
      radial-gradient(80% 40% at 0% 0%, rgba(63, 117, 87, 0.14), transparent 70%), #fff;
  }
  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 36px;
  }
  .auth-form-wrap {
    max-width: none;
  }
  .auth-panel h2 {
    font-size: 28px;
  }
  .auth-footer {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-window,
  .scene-halo,
  .scene-smoke,
  .scene-cloud-a,
  .scene-cloud-b,
  .auth-submit.is-loading .auth-arrow {
    animation: none;
  }
}
