:root {
  --kooritm-ink: #203d31;
  --kooritm-muted: #607067;
  --kooritm-surface: #f5f7f3;
}


body.auth-page {
  background: var(--kooritm-surface);
  color: var(--kooritm-ink);
}

.auth-page .brand {
  color: var(--kooritm-ink);
  font-size: 1.625rem;
  font-weight: 750;
  letter-spacing: -.05rem;
}

.brand-mark {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: #377e64;
}

.auth-layout {
  width: min(100%, 76rem);
  margin-inline: auto;
}

.auth-eyebrow {
  color: #377e64;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-hero-title {
  max-width: 34rem;
  letter-spacing: -.055em;
}

.auth-illustration {
  width: min(100%, 29rem);
  padding: 2rem;
  border: 1px solid #c7d5ca;
  border-radius: 1.5rem;
  background: #e7efe9;
}

.auth-screen {
  position: relative;
  height: 15rem;
  overflow: hidden;
  border: 2px solid #9fb6a6;
  border-radius: .875rem;
  background: #f8faf7;
}

.auth-path {
  position: absolute;
  inset: 58% 10% auto 10%;
  border-top: 4px dashed rgb(55 126 100 / 45%);
  transform: rotate(-12deg);
}

.auth-target {
  position: absolute;
  left: 51%;
  top: 38%;
  width: 4.25rem;
  height: 4.25rem;
  border: 5px solid #36b8a8;
  border-radius: 50%;
  background: #f8faf7;
}

.auth-target::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: #2d5f49;
  content: "";
  transform: translate(-50%, -50%);
}

.auth-lock {
  width: 3.5rem;
  height: 3.5rem;
  background: #e7efe9;
  color: #377e64;
  font-size: 1.5rem;
}

.auth-lock-lg {
  width: 6rem;
  height: 6rem;
  font-size: 2.5rem;
}

.auth-limit-card {
  width: min(100%, 39.75rem);
}


.auth-narrow {
  max-width: 35rem;
}

.password-page {
  width: min(100% - 2rem, 35rem);
  margin: 2rem auto;
}
.password-page { padding: 2rem 1rem; }
.password-brand { justify-content: center; margin: 0 0 1rem; }
.auth-helptext { color: var(--kooritm-muted); font-size: .875rem; }
.auth-field-error { color: #8b3028; font-size: .875rem; }
.auth-secondary-action { margin-top: .75rem; }
.auth-secondary-button { display: inline-flex; justify-content: center; width: 100%; min-height: 2.75rem; padding: .65rem .75rem; border: 1px solid #377e64; border-radius: .5rem; background: #fff; color: #2f6c56; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.auth-secondary-button:hover { border-color: #245d50; background: #f0f5f1; color: #245d50; }
.auth-limit-layout { display: grid; place-items: center; flex: 1; padding: 1rem; }
.auth-limit-card { width: min(100%, 39.75rem); text-align: center; }
.auth-limit-card .auth-lock { margin: 0 auto 1rem; }
.auth-limit-card .auth-alert { display: grid; gap: .25rem; text-align: start; }

.password-page .field {
  margin-bottom: 1.5rem;
}

.password-page label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 600;
}

.password-page .helptext,
.password-page .errorlist {
  margin-top: .5rem;
  color: var(--kooritm-muted);
  font-size: .875rem;
}

.password-page .error-summary {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #c98d85;
  border-radius: .5rem;
  background: #fff0ee;
  color: #6e2620;
}

.auth-shell { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100dvh; padding: 1.5rem; }
.auth-shell *, .auth-shell *::before, .auth-shell *::after { box-sizing: border-box; }
.brand { display: inline-flex; align-items: center; gap: .5rem; width: fit-content; color: var(--kooritm-ink); text-decoration: none; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(20rem, .85fr); gap: 4rem; width: min(100%, 76rem); margin: auto; align-items: center; }
.auth-hero-title { max-width: 34rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.auth-muted, .auth-footer { color: var(--kooritm-muted); }
.auth-caption { margin: .75rem 0 0; font-size: .875rem; font-weight: 600; }
.auth-card { padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid #d5ddd7; border-radius: 1rem; background: #fff; box-shadow: 0 8px 22px rgb(32 61 49 / 10%); }
.auth-card h1 { margin: .75rem 0 .5rem; }
.auth-lock { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #e7efe9; color: #377e64; font-size: 1.5rem; }
.auth-field { display: grid; gap: .5rem; margin-top: 1.25rem; font-weight: 650; }
.auth-input, .auth-password-toggle { min-height: 2.75rem; border: 1px solid #a9bbb0; border-radius: .5rem; padding: .65rem .75rem; font: inherit; }
.auth-input:focus, .auth-password-toggle:focus-visible, .auth-submit:focus-visible { outline: 3px solid rgb(55 126 100 / 25%); outline-offset: 2px; border-color: #377e64; }
.auth-password-field { display: flex; }
.auth-password-field .auth-input { min-width: 0; flex: 1; border-radius: .5rem 0 0 .5rem; }
.auth-password-toggle { border-left: 0; border-radius: 0 .5rem .5rem 0; background: #fff; color: #2f6c56; cursor: pointer; }
.auth-alert { margin-top: 1rem; padding: .75rem; border: 1px solid #c9b16a; border-radius: .5rem; background: #fff8df; color: #5f4a10; }
.auth-alert--error { border-color: #c98d85; background: #fff0ee; color: #6e2620; }
.auth-submit { display: inline-flex; justify-content: center; align-items: center; width: 100%; min-height: 3rem; margin-top: 1.5rem; border: 1px solid #377e64; border-radius: .5rem; background: #377e64; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.auth-help { margin: 1.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid #d5ddd7; text-align: center; color: var(--kooritm-muted); font-size: .875rem; }
.auth-registration { display: grid; gap: .5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #d5ddd7; }
.auth-registration-title { margin: 0; color: var(--kooritm-ink); font-weight: 650; }
.auth-registration-copy { margin: 0; color: var(--kooritm-muted); font-size: .875rem; line-height: 1.5; }
.auth-registration .auth-secondary-button { margin-top: .25rem; }
.auth-help--compact { margin-top: 1rem; padding-top: 0; border-top: 0; }
.auth-help > p { margin: 0; }
.auth-help > p + p { margin-top: .5rem; }
.auth-help a { color: #245d50; text-underline-offset: .2em; }
.auth-footer { margin: 0; text-align: center; font-size: .875rem; }
.auth-spinner { width: 1rem; height: 1rem; margin-right: .5rem; border: 2px solid rgb(255 255 255 / 40%); border-top-color: #fff; border-radius: 50%; animation: auth-spin .8s linear infinite; }
.auth-hidden { display: none; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 800px) { .auth-layout { grid-template-columns: 1fr; gap: 1.5rem; } .auth-hero { display: none; } }

/* Operator auth is intentionally compact. Admin routes keep the legacy layout. */
body.auth-page--operator { margin: 0; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.5; font-synthesis: none; text-rendering: optimizeLegibility; color: #17332d; background: #f4f7f2; }
.auth-page--operator .brand { font-size: 1.05rem; font-weight: 700; letter-spacing: normal; }
.auth-page--operator .auth-muted { font-size: 1rem; line-height: 1.5; }
.auth-page--operator *, .auth-page--operator *::before, .auth-page--operator *::after { box-sizing: border-box; }
.auth-page--operator button, .auth-page--operator input { font-family: inherit; }
.auth-page--operator .auth-field { font-weight: 400; }
.auth-page--operator .auth-field label { margin: 0; font-size: .875rem; font-weight: 500; }
.auth-page--operator .auth-input { width: 100%; min-width: 0; height: 2.5rem; min-height: 2.5rem; padding: .5rem .75rem; font-size: 1rem; background: #fff; color: inherit; }
@media (min-width: 768px) { .auth-page--operator .auth-input { font-size: .875rem; line-height: 1.25rem; } }
.auth-page--operator .auth-password-toggle { font-size: .875rem; font-weight: 500; line-height: 1.25rem; }
.auth-page--operator .auth-password-field { align-items: center; min-width: 0; height: 2.5rem; padding-right: .25rem; border: 1px solid #a9bbb0; border-radius: .5rem; background: #fff; }
.auth-page--operator .auth-password-field:has(.auth-input:focus) { outline: 3px solid rgb(55 126 100 / 25%); outline-offset: 2px; border-color: #377e64; }
.auth-page--operator .auth-password-field .auth-input { width: 0; height: 100%; min-height: 0; margin: 0; border: 0; border-radius: .5rem; outline: none; }
.auth-page--operator .auth-password-field .auth-password-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 5.5rem; height: 2rem; min-height: 0; margin: 0; padding: .25rem .5rem; border: 0; border-radius: .375rem; background: transparent; }
.auth-page--operator .auth-password-field .auth-password-toggle:hover { background: #f4f7f2; }
.auth-page--operator .auth-helptext { font-weight: 400; line-height: 1.5; }
.auth-page--operator .auth-helptext ul { margin: 0; padding-left: 1.25rem; }
.auth-page--operator .auth-helptext li + li { margin-top: .25rem; }
.auth-page--operator .auth-submit, .auth-page--operator .auth-secondary-button { min-height: 2.25rem; padding: .5rem .75rem; font-size: .875rem; font-weight: 500; line-height: 1.25rem; border-radius: .5rem; }
.auth-page--operator .auth-submit { background: #1e6655; border-color: #1e6655; }
.auth-page--operator .auth-back { display: inline-flex; align-items: center; width: fit-content; margin-bottom: 1.25rem; color: #245d50; font-size: .875rem; text-underline-offset: .2em; }
.auth-page--operator .auth-back:focus-visible, .auth-page--operator .auth-secondary-button:focus-visible { outline: 3px solid rgb(55 126 100 / 25%); outline-offset: 2px; }
.auth-page--operator .auth-shell { padding: clamp(1rem, 3vw, 2rem); }
.auth-page--operator .auth-layout { grid-template-columns: minmax(0, 30rem); width: min(100%, 30rem); gap: 0; }
.auth-page--operator .auth-hero { display: none; }
.auth-page--operator .auth-card { padding: clamp(1.5rem, 4vw, 2rem); border-radius: .75rem; box-shadow: none; }
.auth-page--operator .auth-lock { display: none; }
.auth-page--operator .auth-card h1 { margin-top: 0; font-size: clamp(26px, 4vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.7px; }
.auth-page--operator .password-page { display: grid; gap: 1rem; width: min(100%, 32rem); min-height: 100dvh; margin: 0 auto; padding: 2rem 1rem; align-content: center; }
.auth-page--operator .password-brand { margin: 0; }
.auth-page--operator .password-page .auth-muted { margin: .75rem 0 0; }
.auth-page--operator .auth-limit-card { width: min(100%, 32rem); }
.auth-page--operator .auth-limit-layout { padding: 2rem 0; }
.onboarding-page { overflow-wrap: anywhere; }
.auth-page--operator .onboarding-page textarea.auth-input { height: auto; resize: vertical; }
.onboarding-page .auth-field-error ul, .onboarding-page .auth-alert ul { margin: 0; padding-left: 1.25rem; }
.onboarding-page a:focus-visible { outline: 3px solid #377e64; outline-offset: 3px; }
.onboarding-page a { color: var(--kooritm-ink); text-underline-offset: .2em; }
.onboarding-page .auth-input[aria-invalid="true"] { border-color: #8b3028; }

@media (max-height: 760px) and (min-width: 992px) {
  .auth-illustration {
    display: none;
  }
}

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