:root {
  --brand-green: #145744;
  --brand-green-dark: #0b3f31;
  --brand-green-soft: #e8f3ef;
  --brand-yellow: #f7c600;
  --brand-red: #b91c35;
  --cream: #fff8e7;
  --ink: #17201d;
  --muted: #5f6b67;
  --line: #d9e0dd;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgb(247 198 0 / 16%), transparent 30rem),
    linear-gradient(145deg, #fffdf7 0%, var(--cream) 55%, #f4efe1 100%);
}

a {
  color: var(--brand-green);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand-green-dark);
}

.auth-skip {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  background: var(--brand-green-dark);
  color: white;
  transform: translateY(-150%);
}

.auth-skip:focus {
  transform: translateY(0);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(24rem, 1.15fr);
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 5rem);
  color: white;
  background: var(--brand-green-dark);
}

.auth-brand::after {
  content: "";
  position: absolute;
  right: -9rem;
  bottom: -9rem;
  width: 25rem;
  height: 25rem;
  border: 4rem solid rgb(247 198 0 / 14%);
  border-radius: 50%;
}

.auth-brand__logo {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  height: auto;
  border-radius: 1rem;
}

.auth-brand__copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin-top: 3rem;
}

.auth-brand__eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brand-yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.05;
}

.auth-brand__copy > p:last-child {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: #d8e7e1;
  font-size: 1.05rem;
  line-height: 1.65;
}

.auth-brand__footer {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  color: #bdd2ca;
  font-size: 0.82rem;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 5vw, 5rem);
}

.auth-panel {
  width: min(100%, 31rem);
}

.auth-mobile-logo {
  display: none;
  width: min(18rem, 80%);
  height: auto;
  margin: 0 auto 1.5rem;
}

.auth-breadcrumb {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-card {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid rgb(20 87 68 / 10%);
  border-radius: 1.5rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 1.5rem 4rem rgb(20 55 45 / 12%);
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.2;
}

.auth-intro {
  margin: 0.65rem 0 1.7rem;
  color: var(--muted);
  line-height: 1.55;
}

.auth-alert {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #fecdd3;
  border-radius: 0.8rem;
  color: #881337;
  background: #fff1f2;
  font-size: 0.9rem;
}

.auth-alert--success {
  border-color: #a7f3d0;
  color: #065f46;
  background: #ecfdf5;
}

.auth-alert p,
.auth-alert ul {
  margin: 0;
}

.auth-alert ul {
  padding-left: 1.15rem;
}

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 750;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--ink);
  background: white;
  font: inherit;
}

.field input:hover {
  border-color: #a5b2ad;
}

.field input:focus-visible,
.auth-button:focus-visible,
.password-toggle:focus-visible,
a:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 3px solid rgb(247 198 0 / 60%);
  outline-offset: 2px;
}

.field input[aria-invalid="true"] {
  border-color: var(--brand-red);
}

.field-help,
.field-error {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.field-help {
  color: var(--muted);
}

.field-error {
  color: var(--brand-red);
  font-weight: 650;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 3.4rem !important;
}

.password-toggle {
  position: absolute;
  top: 0.32rem;
  right: 0.32rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border: 0;
  border-radius: 0.55rem;
  color: var(--brand-green);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.25rem 0 1.5rem;
  font-size: 0.88rem;
}

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

.remember input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand-green);
}

.auth-button {
  display: inline-flex;
  width: 100%;
  min-height: 3.15rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--brand-green);
  border-radius: 0.75rem;
  color: white;
  background: var(--brand-green);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.auth-button:hover {
  color: white;
  background: var(--brand-green-dark);
}

.auth-button--secondary {
  color: var(--brand-green);
  background: white;
}

.auth-button--secondary:hover {
  color: var(--brand-green-dark);
  background: var(--brand-green-soft);
}

.auth-actions {
  display: flex;
  gap: 0.75rem;
}

.auth-note {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: center;
}

.auth-status-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  color: var(--brand-green);
  background: var(--brand-green-soft);
  font-size: 1.6rem;
  font-weight: 900;
}

@media (max-width: 820px) {
  .auth-shell {
    display: block;
  }

  .auth-brand {
    display: none;
  }

  .auth-main {
    min-height: 100vh;
    align-items: flex-start;
    padding-top: clamp(1.5rem, 7vw, 3rem);
  }

  .auth-mobile-logo {
    display: block;
  }
}

@media (max-width: 420px) {
  .auth-main {
    padding-inline: 0.85rem;
  }

  .auth-card {
    border-radius: 1.15rem;
  }

  .auth-options,
  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-button,
  a,
  input {
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  }
}
