/* Keep the public sign-in flow visually connected to the landing page. */
.auth-screen {
  grid-template-columns: minmax(0, 1fr);
  background: #fff;
  color: #20243a;
  font-family: Pretendard, sans-serif;
}

.auth-story { display: none; }

.auth-brand,
.auth-mobile-brand {
  width: auto;
  height: auto;
  background: none;
}
.auth-mobile-brand {
  display: flex;
  position: absolute;
  top: 32px;
  left: clamp(24px, 5vw, 80px);
  z-index: 1;
}

.auth-brand strong,
.auth-mobile-brand strong { color: #20243a; font-family: Paperlogy, Pretendard, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.038em; }
.auth-brand small { display: none; }
.auth-brand-mark i:nth-child(1),
.auth-mobile-brand .auth-brand-mark i:nth-child(1) { background: #20243a; }
.auth-brand-mark i:nth-child(2),
.auth-mobile-brand .auth-brand-mark i:nth-child(2) { background: #596af2; }
.auth-brand-mark i:nth-child(3),
.auth-mobile-brand .auth-brand-mark i:nth-child(3) { background: #e86aa7; }

.auth-form-side {
  position: relative;
  align-content: center;
  min-height: 100svh;
  padding: 112px 24px 56px;
  overflow: visible;
  background: #fff;
}
.auth-card { width: min(420px, 100%); margin-top: 0; }
.auth-card header > span { display: none; }
.auth-card h2 {
  margin: 0 0 12px;
  color: #20243a;
  font-family: Paperlogy, Pretendard, sans-serif;
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.038em;
}
.auth-card header p { color: #747b90; font-size: 15px; line-height: 1.55; }
.auth-card form { gap: 19px; margin-top: 38px; }
.auth-card label { gap: 9px; color: #20243a; font-size: 14px; font-weight: 600; }
.auth-card label > div {
  height: 46px;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.auth-card label > div:focus-within {
  border-color: transparent;
  border-bottom-color: #596af2;
  box-shadow: none;
}
.auth-card label svg { color: #939aac; }
.auth-card label:not(.auth-kapt-field) > div > svg { display: none; }
.auth-card .auth-kapt-field > div > input { order: 1; }
.auth-card .auth-kapt-field > div > svg { order: 2; flex: none; }
.auth-card .auth-kapt-field > div > button { order: 3; }
.auth-card input {
  background-color: #fff;
  box-shadow: inset 0 0 0 1000px #fff;
  color: #20243a;
  font-size: 15px;
}
.auth-card label:not(.auth-office-phone) > div > input { padding: 0; }
.auth-card input:focus { outline: none; box-shadow: inset 0 0 0 1000px #fff; }
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
  -webkit-box-shadow: inset 0 0 0 1000px #fff !important;
  box-shadow: inset 0 0 0 1000px #fff !important;
  -webkit-text-fill-color: #20243a;
  caret-color: #20243a;
}
.auth-card input::placeholder { color: #a3a9b7; }
.auth-card .auth-office-phone > div,
.auth-card .auth-office-phone > div:focus-within {
  position: relative;
  gap: 12px;
  padding: 0;
  border-bottom: 0;
}
.auth-card .auth-office-phone > div::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 88px;
  width: 12px;
  height: 12px;
  background: #a3a9b7;
  -webkit-mask: url('/icons/caret.svg') center / contain no-repeat;
  mask: url('/icons/caret.svg') center / contain no-repeat;
  pointer-events: none;
  transform: translateY(-50%);
}
.auth-card .auth-office-phone > div:has(select:open)::before {
  transform: translateY(-50%) rotate(180deg);
}
.auth-card .auth-office-phone select,
.auth-card .auth-office-phone input {
  box-sizing: border-box;
  height: 46px;
  background: #fff;
}
.auth-card .auth-office-phone select {
  flex: 0 0 112px;
  width: 112px;
  height: 46px;
  align-self: center;
  align-items: center;
  appearance: none;
  padding: 0 28px 0 11px;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  border-radius: 0;
  color: #20243a;
  cursor: pointer;
}
.auth-card .auth-office-phone select:has(option[value=""]:checked) { color: #a3a9b7; }
.auth-card .auth-office-phone input {
  flex: 1 1 auto;
  width: 0;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  border-radius: 0;
}
.auth-card .auth-office-phone select:focus,
.auth-card .auth-office-phone select:focus-visible,
.auth-card .auth-office-phone select:open {
  border-bottom-color: #596af2;
  outline: none;
  box-shadow: none;
}
.auth-card .auth-office-phone input:focus {
  outline: none;
  border-bottom-color: #596af2;
}
@supports (appearance: base-select) {
  .auth-card .auth-office-phone select,
  .auth-card .auth-office-phone select::picker(select) { appearance: base-select; }
  .auth-card .auth-office-phone select::picker(select) {
    position-area: block-end;
    position-try-fallbacks: none;
    width: anchor-size(width);
    max-height: 166px;
    margin: 4px 0 0;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #e5e8eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(51, 61, 116, .12);
  }
  .auth-card .auth-office-phone select option {
    display: flex;
    min-height: 38px;
    align-items: center;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #20243a;
  }
  .auth-card .auth-office-phone select option:is(:hover, :focus, :focus-visible, :checked) {
    background: #f8f9fb;
    outline: none;
  }
  .auth-card .auth-office-phone select option::checkmark,
  .auth-card .auth-office-phone select::picker-icon { display: none; }
}
.auth-screen .password-visibility:hover { background: transparent; }

.auth-submit { margin-top: 8px; }
.auth-submit,
.auth-submit:hover:not(:disabled) {
  justify-content: center;
  gap: 12px;
  height: 54px;
  border-radius: 14px;
  background: #596af2;
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transform: none;
}
.auth-submit:focus-visible,
.auth-back:focus-visible,
.auth-switch button:focus-visible { outline: 3px solid #596af2; outline-offset: 3px; }
.auth-submit:disabled { opacity: .5; }
.auth-switch { margin-top: 29px; padding-top: 23px; border-top-color: #e5e8eb; color: #747b90; font-size: 14px; }
.auth-switch button,
.auth-switch button:hover { color: #596af2; font-weight: 600; text-decoration: none; }
.auth-terms { margin-top: 30px; color: #8a90a1; font-size: 11px; }
.auth-screen:has(.auth-card-register) .auth-terms { display: none; }
.auth-back {
  top: 29px;
  right: clamp(32px, 5vw, 80px);
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #596176;
  font-size: 13px;
  font-weight: 600;
}
.auth-back svg { width: 16px; }

.auth-card-register { width: min(480px, 100%); }
.auth-card-register form { gap: 15px; margin-top: 26px; }
.auth-card-register h2 { font-size: clamp(30px, 3vw, 38px); }
.auth-card-register header p { display: block; }
.auth-card-register .auth-switch { margin-top: 22px; padding-top: 18px; }
.auth-screen:has(.auth-card-register) { height: auto; min-height: 100svh; overflow: visible; }
.auth-screen:has(.auth-card-register) .auth-form-side {
  align-content: start;
  height: auto;
  min-height: 100svh;
  padding-top: 136px;
  overflow: visible;
}
.auth-action-field > div > button,
.auth-action-field > div > button:hover,
.auth-kapt-clear {
  background: #eef0ff;
  color: #596af2;
  font-size: 12px !important;
  font-weight: 600;
}
.auth-card-register .auth-action-field > div {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
  height: 46px;
  padding: 4px 12px;
}
.auth-card-register .auth-action-field > div > button,
.auth-card-register .auth-action-field > div > button:hover {
  grid-column: auto;
  width: auto;
  min-width: 0;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #f7f8fa;
  box-shadow: none;
  color: #667085;
  font-size: 12px !important;
  font-weight: 500;
  transform: none;
  transition: none;
}
.auth-card-register .auth-action-field > div > button svg { display: none; }
.auth-card-register .auth-action-field > div > button svg.lucide-loader-circle {
  display: block;
  width: 12px;
}
.auth-kapt-results > button:hover { background: #f4f5ff; }

@media (max-width: 900px) {
  .auth-form-side { padding: 108px 24px 40px; }
  .auth-screen:has(.auth-card-register) .auth-form-side { padding-top: 120px; }
  .auth-mobile-brand { top: 24px; left: 24px; display: flex; width: auto; height: auto; }
  .auth-back { top: 28px; right: 24px; }
}

@media (max-width: 520px) {
  .auth-form-side { padding: 100px 20px 32px; }
  .auth-screen:has(.auth-card-register) .auth-form-side { padding-top: 112px; }
  .auth-mobile-brand { left: 20px; }
  .auth-back { right: 20px; font-size: 12px; }
  .auth-card h2,
  .auth-card-register h2 { font-size: 30px; }
  .auth-card header p { font-size: 14px; }
  .auth-card label > div { height: 46px; }
  .auth-card input { font-size: 16px; }
  .auth-card .auth-office-phone input { height: 46px; }
  .auth-card .auth-office-phone select { flex-basis: 104px; width: 104px; }
  .auth-card .auth-office-phone > div::before { left: 80px; }
  .auth-terms { font-size: 10px; }
}

/* Keep the login screen focused on the logo and the form. */
.auth-screen:not(:has(.auth-card-register)) .auth-form-side {
  align-content: start;
  padding: 48px 24px 64px;
}
.auth-screen:not(:has(.auth-card-register)) .auth-back { display: none; }
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand {
  position: static;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 42px;
}
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand strong {
  font-size: 32px;
  font-weight: 800;
}
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand .auth-brand-mark {
  width: 39px;
  height: 44px;
}
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand .auth-brand-mark i { width: 10px; }
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand .auth-brand-mark i:nth-child(1) { height: 20px; }
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand .auth-brand-mark i:nth-child(2) { height: 32px; }
.auth-screen:not(:has(.auth-card-register)) .auth-mobile-brand .auth-brand-mark i:nth-child(3) { height: 44px; }
.auth-screen:not(:has(.auth-card-register)) .auth-card {
  width: min(480px, 100%);
  margin-top: 0;
}
.auth-screen:not(:has(.auth-card-register)) .auth-card > header {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.auth-screen:not(:has(.auth-card-register)) .auth-card form {
  margin-top: 0;
  padding: 36px 38px 40px;
  border: 1px solid #e5e8eb;
  border-radius: 20px;
  background: #fff;
}
.auth-screen:not(:has(.auth-card-register)) .auth-submit > svg { display: none; }
.auth-screen:not(:has(.auth-card-register)) .auth-switch {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}
@media (max-width: 520px) {
  .auth-screen:not(:has(.auth-card-register)) .auth-card form {
    padding: 28px 22px 32px;
    border-radius: 16px;
  }
}

/* Match the registration page to the same centered, outlined layout. */
.auth-screen:has(.auth-card-register) .auth-form-side {
  align-content: start;
  padding: 48px 24px 64px;
}
.auth-screen:has(.auth-card-register) .auth-back { display: none; }
.auth-screen:has(.auth-card-register) .auth-mobile-brand {
  position: static;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 42px;
}
.auth-screen:has(.auth-card-register) .auth-mobile-brand strong {
  font-size: 32px;
  font-weight: 800;
}
.auth-screen:has(.auth-card-register) .auth-mobile-brand .auth-brand-mark {
  width: 39px;
  height: 44px;
}
.auth-screen:has(.auth-card-register) .auth-mobile-brand .auth-brand-mark i { width: 10px; }
.auth-screen:has(.auth-card-register) .auth-mobile-brand .auth-brand-mark i:nth-child(1) { height: 20px; }
.auth-screen:has(.auth-card-register) .auth-mobile-brand .auth-brand-mark i:nth-child(2) { height: 32px; }
.auth-screen:has(.auth-card-register) .auth-mobile-brand .auth-brand-mark i:nth-child(3) { height: 44px; }
.auth-screen:has(.auth-card-register) .auth-card-register {
  width: min(520px, 100%);
  margin-top: 0;
}
.auth-screen:has(.auth-card-register) .auth-card-register > header {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.auth-screen:has(.auth-card-register) .auth-card-register form {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
  padding: 36px 38px 40px;
  border: 1px solid #e5e8eb;
  border-radius: 20px;
  background: #fff;
}
.auth-screen:has(.auth-card-register) .auth-submit > svg { display: none; }
.auth-screen:has(.auth-card-register) .auth-switch {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}
@media (max-width: 520px) {
  .auth-screen:not(:has(.auth-card-register)) .auth-form-side { padding: 40px 20px 48px; }
  .auth-screen:has(.auth-card-register) .auth-form-side { padding: 40px 20px 48px; }
  .auth-screen:has(.auth-card-register) .auth-card-register form {
    padding: 28px 22px 32px;
    border-radius: 16px;
  }
}

.auth-screen .auth-mobile-brand[role="link"] { cursor: pointer; }
.auth-screen .auth-mobile-brand[role="link"]:focus-visible {
  outline: 3px solid #596af2;
  outline-offset: 8px;
  border-radius: 4px;
}

/* Split registration without changing the existing submit and verification flow. */
.auth-card-register[data-signup-step="1"] form > label:has(input[name="businessRegistrationNumber"]),
.auth-card-register[data-signup-step="1"] form > .auth-office-phone,
.auth-card-register[data-signup-step="1"] form > .auth-kapt-field,
.auth-card-register[data-signup-step="1"] form > .signup-fee-guide,
.auth-card-register[data-signup-step="1"] form > .signup-consents,
.auth-card-register[data-signup-step="2"] form > label:has(input[name="username"]),
.auth-card-register[data-signup-step="2"] form > label:has(input[name="signupPassword"]),
.auth-card-register[data-signup-step="2"] form > label:has(input[name="passwordConfirmation"]),
.auth-card-register[data-signup-step="2"] form > .auth-action-field,
.auth-card-register[data-signup-step="2"] form > .auth-helper {
  display: none;
}
.auth-card-register[data-signup-step="1"] .auth-submit { font-size: 0; }
.auth-card-register[data-signup-step="1"] .auth-submit,
.auth-card-register[data-signup-step="1"] .auth-submit:hover:not(:disabled),
.auth-card-register[data-signup-step="1"] .auth-submit:active:not(:disabled) {
  background: #596af2;
  box-shadow: none;
  color: #fff;
  filter: none;
  opacity: 1;
  transform: none;
  text-decoration: none;
  transition: none;
}
.auth-card-register[data-signup-step="1"] .auth-submit::before {
  content: "다음";
  font-size: 16px;
  font-weight: 600;
}
.auth-screen .auth-step-error[hidden] { display: none; }
.auth-card-register .auth-error {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: var(--danger, #d9455f);
}
.auth-card-register[data-signup-step="2"] .auth-submit { margin-top: 10px; }
.auth-card-register[data-signup-step="2"] .auth-switch { display: none; }
.auth-card-register[data-signup-step="2"] form > .signup-consents {
  display: block;
  min-width: 0;
  margin: 8px 0 0;
}
.signup-fee-guide { border: 0; }
.signup-fee-guide > div { font-size: 16px; }
.auth-card-register .signup-fee-guide p { font-size: 14px !important; }
.signup-fee-guide > p { margin: 0; }
.signup-fee-guide > p:first-of-type { margin-top: 20px; }
.signup-fee-guide > p:last-of-type { max-width: 100%; overflow-x: auto; white-space: nowrap; }
