.login-body {
  --login-ink: #163d35;
  --login-muted: #60736c;
  --login-green: #1f7562;
  --login-green-dark: #18584b;
  --login-sage: #e6f2ed;
  --login-cream: #f7f6f1;
  --login-line: #d1ded7;
  --login-error: #a73642;
  min-height: 100vh;
  margin: 0;
  color: var(--login-ink);
  background: var(--login-cream);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.login-header {
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding-inline: max(24px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--login-line) 72%, transparent);
}

.login-header .brand {
  color: var(--login-ink);
  text-decoration: none;
}

.login-header .brand-mark {
  background: var(--login-ink);
}

.login-header .brand small {
  color: var(--login-muted);
}

.login-home-link {
  min-height: 44px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--login-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: color .16s ease, background-color .16s ease;
}

.login-home-link:hover {
  color: var(--login-green-dark);
}

.login-home-label-short {
  display: none;
}

.login-main {
  min-height: calc(100vh - 89px);
  padding: clamp(44px, 8vh, 84px) 24px 56px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.login-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 480px;
  padding: clamp(30px, 5vw, 46px);
  border: 1px solid var(--login-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 55px rgba(22, 61, 53, .09);
}

.login-heading {
  margin-bottom: 32px;
  text-align: center;
}

.login-symbol {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: var(--login-green);
  background: var(--login-sage);
  border-radius: 14px;
}

.login-symbol svg,
.notice-symbol svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card h1 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(32px, 5vw, 40px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.login-intro {
  margin: 10px 0 0;
  color: var(--login-muted);
  font-size: 15px;
  line-height: 1.55;
}

.demo-access[hidden] {
  display: none;
}

.demo-access {
  margin: 24px 0 0;
}

.demo-panel {
  padding: 20px;
  color: var(--login-ink);
  background: color-mix(in srgb, var(--login-sage) 72%, #fff);
  border: 0;
  border-radius: 14px;
}

.demo-copy {
  text-align: left;
}

.demo-label {
  display: block;
  margin-bottom: 6px;
  color: var(--login-green-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
}

.demo-copy h2 {
  margin: 0;
  color: var(--login-ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.demo-copy p {
  margin: 7px 0 16px;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.5;
}

.demo-button {
  width: 100%;
  min-height: 50px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: var(--login-green);
  border: 1px solid var(--login-green);
  border-radius: 11px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.demo-button:hover:not(:disabled) {
  background: var(--login-green-dark);
  border-color: var(--login-green-dark);
  box-shadow: 0 8px 20px rgba(24, 88, 75, .15);
}

.demo-button:disabled {
  cursor: wait;
  opacity: .72;
}

.demo-message {
  min-height: 0;
  color: var(--login-error);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.demo-message:not(:empty) {
  margin-top: 12px;
}

.login-divider {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--login-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.login-divider span {
  text-align: center;
}

.login-card .portal-field {
  gap: 8px;
  margin: 0 0 18px;
}

.auth-secondary-link {
  margin: 14px 0 0;
  text-align: center;
  font-size: 14px;
}

.auth-secondary-link a,
.auth-note a {
  color: var(--login-green-dark);
  font-weight: 650;
}

.auth-secondary-link a,
.login-card .local-notice a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 10px;
}

.auth-note {
  overflow-wrap: anywhere;
  margin: 18px 0;
  padding: 16px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.55;
  background: color-mix(in srgb, var(--login-sage) 62%, #fff);
  border: 0;
  border-radius: 12px;
}

.auth-note strong { color: var(--login-ink); }
.auth-note.warning { background: #fff8e8; border: 1px solid #ead8a9; }
.auth-guidance {
  margin: 14px 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}
.auth-guidance a { color: var(--login-green-dark); font-weight: 650; }
.auth-stack { display: grid; gap: 14px; }
.auth-stack .portal-primary { margin-top: 0; }
#verify-button[hidden] { display: none !important; }
#verification-email-field[hidden] { display: none !important; }
.auth-resend {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  color: var(--login-green-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-resend:hover:not(:disabled) { background: var(--login-sage); }
.auth-resend:disabled { cursor: wait; opacity: .65; }
.auth-details { margin-top: 22px; border-top: 1px solid var(--login-line); padding-top: 20px; }
.auth-details summary { color: var(--login-green-dark); font-weight: 650; cursor: pointer; }

.login-card .portal-field label {
  color: var(--login-ink);
  font-size: 14px;
  font-weight: 650;
}

.login-card .portal-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--login-ink);
  font-size: 16px;
  background: #fff;
  border: 1px solid #afc4ba;
  border-radius: 11px;
  box-shadow: none;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.login-card .portal-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.login-card .portal-field input:hover {
  border-color: #7f9f92;
}

.login-card .portal-field input:focus {
  border-color: var(--login-green);
  box-shadow: 0 0 0 4px rgba(31, 117, 98, .14);
}

.login-card .portal-field input[aria-invalid="true"] {
  border-color: var(--login-error);
  background: #fffafb;
}

.login-card .field-help {
  margin: -1px 0 0;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.45;
}

.login-card .password-wrap {
  position: relative;
}

.login-card .password-wrap input {
  padding-right: 112px;
}

.login-card .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  bottom: auto;
  width: 88px;
  height: 44px;
  min-height: 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--login-green-dark);
  font-size: 13px;
  font-weight: 650;
  background: var(--login-sage);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .16s ease, background-color .16s ease;
}

.login-card .password-toggle:hover,
.login-card .password-toggle[aria-pressed="true"] {
  color: #fff;
  background: var(--login-green);
}

.login-card .password-toggle[aria-pressed="true"]:hover {
  background: var(--login-green-dark);
}

.login-card .field-error {
  min-height: 20px;
  color: var(--login-error);
  font-size: 13px;
  line-height: 1.45;
}

.login-card .form-message {
  min-height: 0;
  margin: 0;
  color: var(--login-error);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.login-card .form-message:not(:empty) {
  margin: -2px 0 16px;
  padding: 11px 13px;
  background: #fff3f3;
  border-radius: 9px;
}

.login-card .form-message.info,
.login-card .form-message[data-state="info"] {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.login-card .portal-primary {
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: var(--login-green);
  border: 0;
  border-radius: 11px;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.login-card .portal-primary:hover:not(:disabled) {
  background: var(--login-green-dark);
  box-shadow: 0 8px 20px rgba(24, 88, 75, .17);
  transform: none;
}

.login-card .portal-primary:disabled {
  cursor: wait;
  opacity: .72;
}

.login-card .register-link {
  margin: 24px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--login-muted);
  font-size: 14px;
  text-align: center;
}

.login-card .register-link a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--login-green);
  font-weight: 700;
  text-underline-offset: 3px;
}

.login-card .register-link a:hover {
  color: var(--login-green-dark);
}

.login-card .local-notice {
  margin: 22px 0 0;
  padding: 18px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--login-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.login-card .notice-symbol {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  color: var(--login-green);
  background: var(--login-sage);
  border-radius: 9px;
}

.login-card .notice-symbol svg {
  width: 17px;
  height: 17px;
}

.login-card .local-notice p {
  margin: 2px 0 0;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.55;
}

.login-card .local-notice a {
  color: var(--login-green);
  font-weight: 650;
  text-underline-offset: 3px;
}

.login-card .local-notice a:hover {
  color: var(--login-green-dark);
}

.register-main {
  padding-top: clamp(32px, 5vh, 56px);
}

.register-card {
  width: min(540px, 100%);
}

.register-card .login-heading {
  margin-bottom: 28px;
}

.register-card .password-feedback {
  margin: -2px 0 18px;
  padding: 15px 16px;
  color: var(--login-muted);
  background: #f5f9f7;
  border: 1px solid var(--login-line);
  border-radius: 11px;
}

.register-card .password-feedback ul {
  gap: 6px 14px;
  margin-bottom: 12px;
}

.register-card .legal-acceptance {
  margin-bottom: 20px;
  padding: 15px 16px;
  background: var(--login-sage);
  border: 1px solid var(--login-line);
  border-radius: 11px;
}

.register-card .legal-acceptance label {
  align-items: flex-start;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.55;
}

.register-card .legal-acceptance a {
  color: var(--login-green-dark);
  font-weight: 650;
  text-underline-offset: 2px;
}

.register-card .legal-acceptance input {
  accent-color: var(--login-green);
}

.login-body :is(a, button, input):focus-visible {
  outline: 3px solid var(--login-green);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .login-header {
    width: 100%;
    margin-inline: 0;
    padding-inline: 16px;
    min-height: 76px;
  }

  .login-header .brand small {
    display: none;
  }

  .login-home-link {
    font-size: 13px;
  }

  .login-home-label {
    display: none;
  }

  .login-home-label-short {
    display: inline;
  }

  .login-main {
    min-height: calc(100vh - 77px);
    padding: 28px 16px 40px;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 18px;
  }

  .register-card {
    padding-inline: 20px;
  }

  .login-heading {
    margin-bottom: 28px;
  }

  .login-symbol {
    width: 44px;
    height: 44px;
    margin-bottom: 15px;
  }

  .register-card .password-feedback ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .login-header .brand strong {
    font-size: 17px;
  }

  .login-card {
    padding-inline: 18px;
  }
}

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