/* Registration uses the same visual shell as the sign-in page. */
.register-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.register-panel { min-height: 0; overflow-y: auto; }
.register-shell .signin-content h1 { font-weight: 700; letter-spacing: -.025em; }
.register-content h1 { margin-bottom: 30px; }
.register-content .form-group { margin-bottom: 21px; }
.register-shell .form-group label { margin-bottom: 7px; }
.register-shell .form-group input { border-color: #cfd8e1; border-radius: 7px; }
.register-shell .form-group input:focus-visible { border-color: #2781ad; box-shadow: 0 0 0 3px rgba(39, 129, 173, .14); }
.company-combobox { position: relative; }
.company-combobox input { padding-right: 52px; }
.company-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--login-muted);
  cursor: pointer;
}
.company-toggle:hover { color: var(--login-ink); }
.company-toggle:focus-visible,
.company-add-option:focus-visible,
.company-choice:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 2px; }
.company-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  overflow: auto;
  max-height: 250px;
  padding: 4px;
  border: 1px solid #cfd8e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 35, 53, .14);
}
.company-menu[hidden] { display: none; }
.company-menu-status {
  margin: 0;
  padding: 10px 12px;
  color: var(--login-muted);
  font-size: .84rem;
  line-height: 1.4;
}
.company-menu-status[hidden] { display: none; }
.company-choice {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--login-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.company-choice:hover,
.company-choice:focus-visible,
.company-choice.is-active { background: #f2f4f6; }
.company-choice-name { display: block; font-weight: 600; line-height: 1.35; }
.company-choice-meta { display: block; margin-top: 2px; color: var(--login-muted); font-size: .8rem; line-height: 1.35; }
.company-menu-status.is-quiet {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  padding: 0;
}
.company-add-option {
  display: block;
  margin-top: 4px;
  padding: 12px;
  border-top: 1px solid var(--login-border);
  color: var(--login-action);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.company-add-option:hover,
.company-add-option.is-active { background: #f2f4f6; }
.field-note {
  margin: 8px 0 0;
  color: var(--login-muted);
  font-size: .83rem;
  line-height: 1.4;
}
.field-error {
  margin: 8px 0 0;
  color: #a22424;
  font-size: .83rem;
  line-height: 1.4;
}
.field-error[hidden] { display: none; }
.field-error.is-match { color: #17613b; }
.password-rules {
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: max-height .28s ease, margin-top .28s ease, opacity .22s ease, transform .28s ease, visibility .28s;
}
.password-rules.is-open {
  max-height: 240px;
  margin-top: 12px;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.password-rules p { margin: 0 0 8px; color: var(--login-muted); font-size: .84rem; }
.password-rules ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.password-rules li { display: flex; align-items: center; gap: 9px; color: var(--login-muted); font-size: .83rem; }
.rule-mark {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #b9c7d5;
  border-radius: 50%;
  color: transparent;
  font-size: .7rem;
  font-weight: 800;
}
.password-rules li.is-met { color: #17613b; }
.password-rules li.is-met .rule-mark { border-color: #24864f; background: #24864f; color: #fff; }
.name-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.name-fieldset legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--login-ink);
  font-size: .875rem;
  font-weight: 650;
}
.name-fieldset .form-group { margin-bottom: 0; }
.name-fieldset + .form-group { margin-top: 21px; }
.register-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.register-content .btn-login { margin-top: 8px; border-radius: 7px; box-shadow: none; }
.register-content .btn-login:hover { box-shadow: none; }
.register-content .login-footer { margin-top: 22px; }
.msg:empty { display: none; }
.msg {
  margin-top: 18px;
  padding: 10px 0 0;
  border-top: 1px solid #dce3e9;
  font-size: .875rem;
  line-height: 1.5;
}
.msg.err { color: #9f2525; border-color: #bd6b6b; }
.msg.ok { color: #415366; }
.register-shell [hidden] { display: none !important; }

/* Check your email (after Create account) and Confirm your email. */
.check-email-lead,
.check-email-note,
.confirm-message {
  margin: 0 0 14px;
  font-size: .875rem;
  line-height: 1.55;
}
.check-email-lead { color: var(--login-ink); }
.check-email-lead strong { font-weight: 650; overflow-wrap: anywhere; }
.check-email-note { color: var(--login-muted); }
.check-email .text-action { margin-top: 4px; }
.check-email .text-action:disabled { cursor: default; }
.check-email .login-footer { margin-top: 26px; }
.confirm-content h1 { margin-bottom: 24px; }
.confirm-message { margin-bottom: 24px; color: var(--login-muted); }
.confirm-message.is-error { color: #9f2525; }
.confirm-message.is-ok { color: #17613b; }
.confirm-content .btn-login { margin-top: 0; }
.confirm-content .btn-login:disabled { cursor: default; }
.confirm-content .login-footer { margin-top: 24px; }

/* Keep the initial desktop form and legal line within one screen. Expanded
   password help and validation can still scroll inside the form panel. */
@media (min-width: 761px) and (max-height: 960px) {
  .register-panel { padding-top: clamp(20px, 3vh, 32px); padding-bottom: clamp(20px, 3vh, 32px); }
  .register-content h1 { margin-bottom: 20px; }
  .register-content .form-group { margin-bottom: 14px; }
  .register-shell .form-group label { margin-bottom: 5px; }
  .register-shell .form-group input { min-height: 40px; padding: 8px 11px; font-size: .9rem; }
  .company-toggle { height: 40px; }
  .name-fieldset legend { margin-bottom: 6px; }
  .name-fieldset + .form-group { margin-top: 14px; }
  .register-content .btn-login { min-height: 44px; margin-top: 6px; padding: 10px 14px; }
  .register-content .login-footer { margin-top: 14px; }
  .register-panel .signin-legal { margin-top: 14px; }
}

@media (min-width: 761px) and (max-height: 680px) {
  .register-panel { padding-top: 16px; padding-bottom: 16px; }
  .register-content h1 { margin-bottom: 10px; font-size: 1.5rem; }
  .register-content .form-group { margin-bottom: 8px; }
  .register-shell .form-group label { margin-bottom: 3px; font-size: .78rem; }
  .register-shell .form-group input { min-height: 34px; padding: 5px 9px; font-size: .86rem; }
  .company-toggle { height: 34px; }
  .name-fieldset legend { margin-bottom: 4px; font-size: .78rem; }
  .name-fieldset + .form-group { margin-top: 8px; }
  .register-content .btn-login { min-height: 36px; margin-top: 4px; padding: 7px 12px; font-size: .86rem; }
  .register-content .login-footer { margin-top: 8px; font-size: .78rem; }
  .register-panel .signin-legal { margin-top: 8px; }
}

@media (max-width: 760px) {
  .register-shell { height: auto; min-height: 100dvh; overflow: visible; }
  .register-panel { overflow: visible; }
}

@media (max-width: 520px) {
  .register-row { grid-template-columns: 1fr; gap: 0; }
  .name-fieldset .form-group + .form-group { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .password-rules { transition: none; }
}
