html, body { height: 100%; overflow: hidden; }
.company-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.company-panel {
  height: 100dvh;
  min-height: 0;
  padding: clamp(24px, 3vw, 44px) clamp(24px, 5vw, 72px) 18px;
  overflow: hidden;
}
.company-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 540px;
  min-height: 0;
  margin: auto;
}
.company-content h1 { margin-bottom: 18px; }
.company-back {
  align-self: flex-start;
  margin-top: 14px;
  color: #176ba3;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.company-back:hover { color: #0e527f; }
.company-back:focus-visible,
.company-wizard-back:focus-visible,
.company-wizard-action:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 3px; }
.company-wizard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: min(530px, calc(100dvh - 210px));
  min-height: 0;
  padding: 22px;
  border: 1px solid #d9e0e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 35, 53, .07);
}
.company-step {
  display: none;
  min-height: 0;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.company-step.is-active {
  display: block;
  flex: 1;
  animation: company-step-in .24s ease both;
}
.company-wizard.is-reversing .company-step.is-active { animation-name: company-step-back; }
@keyframes company-step-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes company-step-back {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
.company-step h2 {
  margin: 0 0 20px;
  color: var(--login-ink);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.company-step .form-group { margin-bottom: 15px; }
.company-step .form-group:last-child { margin-bottom: 0; }
.company-step .form-group select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cfd8e1;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--login-ink);
  font: inherit;
  font-size: 1rem;
}
.company-step .form-group select:focus-visible {
  border-color: #2781ad;
  box-shadow: 0 0 0 3px rgba(39, 129, 173, .14);
}
.company-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.required-mark { color: var(--login-action); }
.optional-label { margin-left: 4px; color: var(--login-muted); font-size: .78rem; font-weight: 400; }
.company-domain-status {
  margin: 10px 0 14px;
  color: var(--login-muted);
  font-size: .8rem;
  line-height: 1.4;
}
.company-domain-status[hidden] { display: none; }
.company-domain-status.is-error { color: #9f2525; }
.company-domain-check { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.company-domain-retry { margin: 10px 0 14px; font-size: .8rem; }
.company-domain-retry[hidden] { display: none; }
.existing-company-card {
  margin: 12px 0 16px;
  padding: 16px 17px;
  border: 1px solid #d6dee5;
  border-radius: 8px;
  background: #fff;
}
.existing-company-card[hidden],
#companyWebsiteGroup[hidden] { display: none; }
.existing-company-eyebrow {
  margin: 0 0 8px;
  color: #5d6e80;
  font-size: .8rem;
  font-weight: 600;
}
.existing-company-option + .existing-company-option {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dce3e9;
}
.existing-company-option h3 { margin: 0 0 5px; color: var(--login-ink); font-size: 1.1rem; font-weight: 700; }
.existing-company-option p { margin: 0 0 14px; color: #5d6e80; font-size: .85rem; line-height: 1.45; }
.existing-company-action {
  min-height: 42px;
  padding: 10px 15px;
  border: 0;
  border-radius: 6px;
  background: var(--login-action);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
}
.existing-company-action:hover { background: var(--login-action-hover); }
.existing-company-action:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 3px; }
.company-content .msg { flex: 0 0 auto; max-height: 78px; margin: 0; overflow-y: auto; }
.company-wizard-nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-height: 58px;
  padding-top: 12px;
  border-top: 1px solid #dce3e9;
}
.company-wizard-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--login-muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
}
.company-wizard-back:hover { color: var(--login-ink); }
.company-wizard-back.is-placeholder { visibility: hidden; pointer-events: none; }
.company-wizard-progress { display: flex; align-items: center; justify-content: center; gap: 8px; }
.company-wizard-dot { width: 8px; height: 8px; border-radius: 2px; background: #c6d2dd; transition: background .18s ease, transform .18s ease; }
.company-wizard-dot.is-active { background: var(--login-action); transform: scale(1.08); }
.company-wizard-action {
  min-width: 82px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--login-action);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.company-wizard-action:hover { background: var(--login-action-hover); }
.company-wizard-action[hidden] { display: none; }
.company-panel .signin-legal { margin-top: 14px; }

@media (max-width: 760px) {
  .company-shell { grid-template-columns: 1fr; }
  .company-shell .welcome-panel { height: 140px; min-height: 140px; padding: 18px 24px; }
  .company-panel { height: calc(100dvh - 140px); padding: 16px 20px 12px; }
  .company-wizard { height: min(510px, calc(100dvh - 300px)); padding: 18px; }
}
@media (max-width: 520px) {
  .company-shell .welcome-panel { height: 104px; min-height: 104px; padding: 16px 20px; }
  .company-panel { height: calc(100dvh - 104px); padding: 12px 16px 8px; }
  .company-back { margin-top: 10px; font-size: .78rem; }
  .company-content h1 { margin-bottom: 12px; font-size: 1.55rem; }
  .company-wizard { height: calc(100dvh - 225px); padding: 14px; gap: 10px; border-radius: 14px; }
  .company-step h2 { margin-bottom: 14px; font-size: 1.05rem; }
  .company-step .form-group { margin-bottom: 13px; }
  .company-step .form-group input,
  .company-step .form-group select { min-height: 44px; padding: 10px 12px; }
  .company-row { grid-template-columns: 1fr; gap: 0; }
  .company-wizard-nav { min-height: 52px; grid-template-columns: 42px minmax(0, 1fr) auto; }
  .company-wizard-back { width: 42px; height: 42px; }
  .company-wizard-action { min-height: 42px; padding: 9px 12px; font-size: .82rem; }
  .company-panel .signin-legal { margin-top: 8px; }
}
@media (max-height: 690px) and (min-width: 761px) {
  .company-panel { padding-top: 12px; padding-bottom: 8px; }
  .company-back { margin-top: 10px; }
  .company-content h1 { margin-bottom: 12px; font-size: 1.7rem; }
  .company-wizard { height: calc(100dvh - 160px); padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .company-step.is-active { animation: none; }
  .company-wizard-dot { transition: none; }
}
