:root {
  --auth-ink: #17251b;
  --auth-muted: #66736a;
  --auth-green: #4f8060;
  --auth-green-dark: #3f6e50;
  --auth-green-soft: #e5f0e7;
  --auth-story-ink: #284333;
  --auth-line: #e5e4d9;
  --auth-paper: #fffef9;
  --auth-cream: #faf7ef;
}

body.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(18px, 4vw, 54px);
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 226, 148, .32), transparent 28%),
    radial-gradient(circle at 90% 88%, rgba(164, 215, 179, .32), transparent 32%),
    var(--auth-cream);
}

.auth-shell {
  width: min(1040px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(220, 220, 207, .92);
  border-radius: 24px;
  background: var(--auth-paper);
  box-shadow: 0 32px 90px rgba(30, 54, 38, .14);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 62px);
  overflow: hidden;
  color: var(--auth-story-ink);
  background: linear-gradient(155deg, #e8f2e9 0%, #d1e5d5 55%, #bdd8c4 100%);
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  content: "";
}

.auth-story::before { width: 340px; height: 340px; top: -170px; right: -180px; }
.auth-story::after { width: 220px; height: 220px; left: -110px; bottom: -90px; }

.auth-brand,
.auth-home-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 850;
}

.auth-story-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.auth-story-top .auth-home-link { color: rgba(40, 67, 51, .72); font-size: 14px; }
.auth-story-top .auth-home-link:hover { color: #1f3829; }

.auth-brand img { width: 38px; height: 38px; border-radius: 11px; background: #fff; }
.auth-story-copy { position: relative; z-index: 1; margin: 54px 0; }
.auth-story-kicker { margin: 0 0 14px; color: #557b61; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.auth-story h1 { max-width: 420px; margin: 0; color: #203b2a; font-size: clamp(34px, 4vw, 52px); line-height: 1.14; font-weight: 900; }
.auth-story-lead { max-width: 410px; margin: 20px 0 0; color: rgba(40, 67, 51, .78); line-height: 1.8; }
.auth-story-proof { position: relative; z-index: 1; display: grid; gap: 10px; }
.auth-story-proof span { display: flex; align-items: center; gap: 9px; color: rgba(40, 67, 51, .82); font-size: 14px; }
.auth-story-proof i { width: 18px; color: #8a6a25; text-align: center; }

.auth-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 66px);
  background: var(--auth-paper);
}

body.auth-page .login-card,
body.auth-page .register-card {
  max-width: 470px;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.auth-page .login-header,
body.auth-page .register-header { padding: 0 0 27px; color: var(--auth-ink); background: transparent; text-align: left; }
body.auth-page .login-header h2,
body.auth-page .register-header h2 { color: var(--auth-ink); font-size: 30px; font-weight: 900; }
body.auth-page .login-header h2 i,
body.auth-page .register-header h2 i { display: none; }
body.auth-page .login-header p,
body.auth-page .register-header p { margin-top: 9px; color: var(--auth-muted); font-size: 15px; opacity: 1; }
body.auth-page .login-body,
body.auth-page .register-body { padding: 0; }
body.auth-page .login-footer,
body.auth-page .register-footer { padding: 24px 0 0; color: var(--auth-muted); }
body.auth-page .field-label { color: #344139; font-weight: 750; }
body.auth-page .field-label i { width: 17px; color: var(--auth-green); text-align: center; }
body.auth-page .auth-field .form-control,
body.auth-page #captcha {
  min-height: 52px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: #fff;
}
body.auth-page .auth-field .form-control:focus,
body.auth-page #captcha:focus { border-color: #83aa8d; box-shadow: 0 0 0 4px rgba(79, 128, 96, .11); }
body.auth-page .btn-login,
body.auth-page .btn-register {
  min-height: 52px;
  border-radius: 12px;
  background: var(--auth-green);
  box-shadow: 0 12px 28px rgba(79, 128, 96, .18);
}
body.auth-page .btn-login:hover,
body.auth-page .btn-register:hover { background: var(--auth-green-dark); opacity: 1; }
body.auth-page .login-footer a,
body.auth-page .register-footer a { color: var(--auth-green); }
body.auth-page #captcha-img { height: 50px !important; border-radius: 10px !important; }

@media (max-width: 820px) {
  body.auth-page { display: block; padding: 0; background: var(--auth-paper); }
  .auth-shell { min-height: 100vh; display: block; border: 0; border-radius: 0; box-shadow: none; }
  .auth-story { min-height: 190px; padding: 26px 22px 34px; border-radius: 0 0 28px 28px; }
  .auth-story-copy { margin: 26px 0 0; }
  .auth-story h1 { max-width: 340px; font-size: 31px; }
  .auth-story-lead { margin-top: 12px; font-size: 14px; line-height: 1.65; }
  .auth-story-proof { display: none; }
  .auth-form-panel { min-height: 0; padding: 34px 22px calc(38px + env(safe-area-inset-bottom)); }
  body.auth-page .login-header,
  body.auth-page .register-header { padding-bottom: 23px; }
  body.auth-page .login-header h2,
  body.auth-page .register-header h2 { font-size: 25px; }
}

@media (max-width: 420px) {
  .auth-story { min-height: 176px; padding: 22px 18px 30px; }
  .auth-brand img { width: 34px; height: 34px; }
  .auth-story h1 { font-size: 28px; }
  .auth-form-panel { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-page *, body.auth-page *::before, body.auth-page *::after { transition: none !important; }
}
