:root {
  --auth-green-950: #102f23;
  --auth-green-900: #153d2d;
  --auth-green-600: #319a57;
  --auth-green-100: #e7f5eb;
  --auth-yellow: #f6d850;
  --auth-orange: #f28a32;
  --auth-ink: #202922;
  --auth-muted: #69746c;
  --auth-line: #dfe7e1;
}

* { box-sizing: border-box; }

body.portal-auth {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 9% 14%, rgba(246, 216, 80, .22), transparent 26rem),
    radial-gradient(circle at 88% 88%, rgba(49, 154, 87, .18), transparent 30rem),
    #f3f7f3;
  font-family: 'Lato-Regular', Arial, Helvetica, sans-serif;
}

.portal-auth-shell {
  width: min(1080px, calc(100% - 40px));
  min-height: 650px;
  margin: max(40px, 6vh) auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(16, 47, 35, .08);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(25, 56, 36, .16);
}

.portal-auth-story {
  position: relative;
  min-height: 650px;
  padding: 58px 60px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, var(--auth-green-950), var(--auth-green-900) 72%, #24543b);
}

.portal-auth-story::after {
  content: '';
  position: absolute;
  right: -84px;
  bottom: -84px;
  width: 270px;
  height: 270px;
  border: 38px solid rgba(246, 216, 80, .15);
  border-radius: 50%;
}

.portal-auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}

.portal-auth-brand:hover { color: #fff; }
.portal-auth-brand__logo {
  width: 54px;
  height: 54px;
  padding: 5px;
  border-radius: 15px;
  background: #fff;
}
.portal-auth-brand img { width: 100%; height: 100%; object-fit: contain; }
.portal-auth-brand strong,
.portal-auth-brand small { display: block; }
.portal-auth-brand strong { font: 1.05rem/1.15 'Lato-Black', Arial, sans-serif; }
.portal-auth-brand small { margin-top: 4px; color: rgba(255,255,255,.63); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }

.portal-auth-story__content {
  position: relative;
  z-index: 1;
  margin: auto 0;
}
.portal-auth-story__eyebrow,
.portal-auth-eyebrow {
  display: block;
  margin-bottom: 15px;
  color: var(--auth-yellow);
  font: .74rem/1.2 'Lato-Black', Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.portal-auth-story h1 {
  max-width: 500px;
  margin: 0;
  color: #fff;
  font: clamp(2.5rem, 5vw, 4.2rem)/.98 'Lato-Black', Arial, sans-serif;
  letter-spacing: -.045em;
}
.portal-auth-story p { max-width: 460px; margin: 24px 0 0; color: rgba(255,255,255,.75); font-size: 1rem; line-height: 1.65; }
.portal-auth-story__footer { position: relative; z-index: 1; display: grid; gap: 3px; font-size: .86rem; }
.portal-auth-story__footer span { color: rgba(255,255,255,.57); }

.portal-auth-panel { padding: 54px 58px; display: flex; align-items: center; background: rgba(255,255,255,.98); }
.portal-auth-card { width: 100%; max-width: 410px; margin: auto; }
.portal-auth-card .portal-auth-eyebrow { color: var(--auth-green-600); }
.portal-auth-card h2 { margin: 0; color: var(--auth-ink); font: clamp(2rem, 4vw, 2.65rem)/1.05 'Lato-Black', Arial, sans-serif; letter-spacing: -.035em; }
.portal-auth-description { margin: 13px 0 30px; color: var(--auth-muted); line-height: 1.55; }
.portal-auth-form { display: grid; gap: 18px; }
.portal-auth-field label { display: block; margin-bottom: 7px; color: #34453a; font-family: 'Lato-Black', Arial, sans-serif; font-size: .82rem; }
.portal-auth-input-wrap { position: relative; }
.portal-auth-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #ced8d0;
  border-radius: 12px;
  color: var(--auth-ink);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.portal-auth-input:focus { border-color: var(--auth-green-600); box-shadow: 0 0 0 4px rgba(49,154,87,.14); }
.portal-auth-input-wrap .portal-auth-input { padding-right: 48px; }
.portal-auth-password-toggle { position: absolute; top: 50%; right: 8px; width: 36px; height: 36px; margin-top: -18px; border: 0; border-radius: 9px; color: var(--auth-muted); background: transparent; }
.portal-auth-password-toggle:hover { color: var(--auth-green-600); background: var(--auth-green-100); }
.portal-auth-submit { min-height: 50px; border: 0; border-radius: 12px; color: #fff; background: var(--auth-green-600); box-shadow: 0 12px 24px rgba(49,154,87,.2); font-family: 'Lato-Black', Arial, sans-serif; transition: transform .18s ease, background .18s ease; }
.portal-auth-submit:hover { transform: translateY(-1px); background: #267e46; }
.portal-auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.portal-auth-links a { color: var(--auth-green-600); font-size: .88rem; text-decoration: none; }
.portal-auth-links a:hover { color: var(--auth-orange); }
.portal-auth-notice { margin: 0 0 20px; padding: 12px 14px; border: 1px solid; border-radius: 12px; font-size: .88rem; line-height: 1.45; }
.portal-auth-notice--error { color: #8c2e2e; border-color: #f0caca; background: #fff3f2; }
.portal-auth-notice--success { color: #1f6638; border-color: #c7e9d1; background: #eefaf2; }
.portal-auth-notice--warning { color: #805311; border-color: #f1ddad; background: #fff8e8; }
.portal-auth-notice--info { color: #345044; border-color: #d9e8de; background: #f2f8f4; }
.portal-auth-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 35px;
  padding-top: 22px;
  border-top: 1px solid var(--auth-line);
  border-radius: 8px;
  color: #7d887f;
  font-size: .76rem;
  text-align: center;
  text-decoration: none;
  transition: color .18s ease;
}
.portal-auth-credit strong {
  color: var(--auth-green-900);
  font-family: 'Lato-Black', Arial, sans-serif;
}
.portal-auth-credit__heart {
  display: inline-block;
  color: #e65757;
  font-size: .86rem;
  line-height: 1;
  transform-origin: center;
  animation: portal-auth-heartbeat 2.4s ease-in-out infinite;
}
.portal-auth-credit:hover,
.portal-auth-credit:focus-visible { color: var(--auth-green-600); }
.portal-auth-credit:focus-visible {
  outline: 3px solid rgba(49, 154, 87, .16);
  outline-offset: 4px;
}

@keyframes portal-auth-heartbeat {
  0%, 38%, 100% { transform: scale(1); }
  44% { transform: scale(1.18); }
  50% { transform: scale(.98); }
  56% { transform: scale(1.1); }
}
.portal-password-rules { margin: -8px 0 0; color: var(--auth-muted); font-size: .76rem; }

@media (max-width: 820px) {
  .portal-auth-shell { width: min(560px, calc(100% - 28px)); min-height: 0; margin: 24px auto; grid-template-columns: 1fr; }
  .portal-auth-story { min-height: auto; padding: 28px; }
  .portal-auth-story__content { margin: 46px 0 38px; }
  .portal-auth-story h1 { font-size: clamp(2.2rem, 11vw, 3.25rem); }
  .portal-auth-story__footer { display: none; }
  .portal-auth-panel { padding: 38px 28px; }
}

@media (max-width: 480px) {
  .portal-auth-shell { width: 100%; min-height: 100vh; margin: 0; border: 0; border-radius: 0; }
  .portal-auth-story { padding: 22px 20px; }
  .portal-auth-story__content { margin: 34px 0 22px; }
  .portal-auth-story p { display: none; }
  .portal-auth-panel { padding: 32px 20px 38px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
