.auth-ui {
  min-width: 0;
  color: var(--ink);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: 28px;
}
.auth-brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 750;
}
.auth-brand strong,
.auth-brand div > span {
  display: block;
}
.auth-brand strong {
  font-size: 0.9375rem;
  line-height: 1.5;
}
.auth-brand div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}
.auth-mode-tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  margin-top: 22px;
}
.auth-mode-tabs button {
  position: relative;
  padding: 12px 0 13px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
}
.auth-mode-tabs button.is-active {
  color: var(--blue);
}
.auth-mode-tabs button.is-active::after {
  position: absolute;
  content: "";
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: currentColor;
  border-radius: 2px 2px 0 0;
}
.auth-mode-tabs button:hover {
  color: var(--blue);
}
.auth-intro {
  margin-top: 23px;
}
.dialog-body .auth-ui h2 {
  padding: 0;
  margin: 0 0 7px;
  font-size: 1.625rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.auth-intro p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
}
.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 21px;
}
.auth-role-fieldset {
  padding: 0;
  margin: 0;
  min-width: 0;
  border: 0;
}
.auth-role-fieldset legend,
.auth-field > label {
  margin: 0 0 8px;
  padding: 0;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
}
.auth-role-picker {
  display: flex;
  gap: 9px;
}
.auth-role-option {
  flex: 1 1 0;
  min-width: 0;
  min-height: 65px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 6px;
  background: var(--white);
  text-align: center;
  transition:
    border-color 160ms ease-out,
    background-color 160ms ease-out;
}
.auth-role-option strong,
.auth-role-option span {
  display: block;
  line-height: 1.5;
}
.auth-role-option strong {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 650;
}
.auth-role-option span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}
.auth-role-option:hover {
  border-color: var(--blue);
}
.auth-role-option.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.auth-role-option.is-active strong {
  color: var(--blue);
}
.auth-verification {
  display: grid;
  gap: 17px;
  min-width: 0;
}
.auth-field {
  min-width: 0;
}
.auth-field > label {
  display: block;
}
.auth-field input {
  width: 100%;
  min-width: 0;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--white);
  font-size: 1rem;
  line-height: 1.5;
}
.auth-field input::placeholder {
  color: var(--muted);
  opacity: 1;
  letter-spacing: 0;
}
.auth-phone-box {
  display: flex;
  align-items: center;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.auth-phone-box > span {
  flex: none;
  padding-inline: 13px;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
  border-right: 1px solid var(--line);
}
.auth-phone-box input {
  flex: 1 1 0;
  width: 0;
  min-height: 47px;
  border: 0;
  background: transparent;
}
.auth-phone-box:focus-within {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.auth-phone-box input:focus-visible {
  outline: 0;
}
.auth-field input:user-invalid,
.auth-phone-box:has(input:user-invalid) {
  border-color: var(--danger);
}
.auth-code-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
  min-width: 0;
}
.auth-code-row input {
  flex: 1 1 0;
  width: 0;
  letter-spacing: 0.13em;
}
.auth-send-code {
  flex: none;
  min-width: 125px;
  min-height: 49px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
  transition:
    background-color 160ms ease-out,
    border-color 160ms ease-out;
}
.auth-send-code:hover:not(:disabled) {
  border-color: var(--blue);
  background: oklch(0.88 0.055 255);
  color: var(--blue-dark);
}
.auth-send-code:active:not(:disabled) {
  background: oklch(0.91 0.04 255);
}
.auth-send-code:disabled {
  opacity: 1;
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}
.auth-code-status,
.auth-status {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.auth-code-status {
  color: var(--muted);
}
.auth-status {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--danger);
  background: oklch(0.97 0.015 25);
}
.auth-code-status:empty,
.auth-status:empty {
  display: none;
}
.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.85;
  color: var(--muted);
}
.auth-consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
}
.auth-consent a {
  color: var(--blue);
}
.auth-submit {
  width: 100%;
  min-height: 49px;
  font-size: 1rem;
}
.auth-agency-link {
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.85;
}
.auth-agency-link a {
  display: inline-block;
  margin-left: 4px;
  font-weight: 600;
}
.auth-service-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.75;
}
.auth-service-note > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
@media (max-width: 600px) {
  .auth-brand {
    gap: 9px;
  }
  .auth-brand-mark {
    width: 35px;
    height: 35px;
  }
  .auth-brand strong {
    font-size: 0.875rem;
  }
  .auth-brand div > span {
    font-size: 0.75rem;
  }
  .auth-mode-tabs {
    gap: 26px;
    margin-top: 19px;
  }
  .dialog-body .auth-ui h2 {
    font-size: 1.5rem;
  }
  .auth-role-picker {
    gap: 7px;
  }
  .auth-role-option {
    padding-inline: 4px;
  }
  .auth-role-option span {
    font-size: 0.75rem;
  }
  .auth-send-code {
    min-width: 110px;
    padding-inline: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-role-option,
  .auth-send-code {
    transition: none;
  }
}
