/* ── SCR-01 로그인 ── */
.kx-login {
  display: flex;
  min-height: 100vh;
}

.kx-login__brand {
  position: relative;
  width: 55%;
  display: none;
  background: #0a2a47;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .kx-login__brand {
    display: block;
  }
}

/* 캐러셀 슬라이드 — 페이드 전환(겹쳐 두고 opacity 토글) */
.kx-login__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
}
.kx-login__slide.is-active {
  opacity: 1;
}

/* 인디케이터 도트 */
.kx-login__dots {
  display: flex;
  gap: 8px;
  margin-top: var(--space-2);
}
.kx-login__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease;
}
.kx-login__dot.is-active {
  width: 22px;
  background: var(--color-white);
}
.kx-login__dot:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* 문구 페이드 인 — 슬라이드 전환 시 key 교체로 재생 */
.kx-login__headline,
.kx-login__sub {
  animation: kx-login-copy-in 0.7s ease both;
}
@keyframes kx-login-copy-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.kx-login__brand-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(2, 20, 40, 0.88) 0%, rgba(2, 20, 40, 0) 58%),
    linear-gradient(to right, rgba(0, 76, 134, 0.8) 0%, rgba(0, 76, 134, 0.48) 100%);
}
.kx-login__brand-content {
  position: absolute;
  bottom: var(--space-8);
  left: var(--space-8);
  right: var(--space-8);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.kx-login__ai-cap {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #d3c7ff;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  backdrop-filter: blur(4px);
}
.kx-login__headline {
  color: var(--color-on-accent);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}
@media (min-width: 1280px) {
  .kx-login__headline {
    font-size: 36px;
    line-height: 44px;
  }
}
.kx-login__sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

.kx-login__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
  background: var(--color-white);
  position: relative;
}
.kx-login__card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.kx-login__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
}
.kx-login__logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-600);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: 18px;
}
.kx-login__logo-text {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-primary-700);
}
.kx-login__logo-img {
  height: 30px;
  width: auto;
  display: block;
}
.kx-login__logo-suffix {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-500);
  padding-left: 2px;
  border-left: 1px solid var(--color-neutral-200);
  padding-left: 10px;
  margin-left: 4px;
}
.kx-login__prod {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-neutral-500);
  text-align: center;
  margin: -8px 0 0;
}
.kx-login__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  text-align: center;
}
.kx-login__title-sub {
  font-size: var(--fs-body);
  color: var(--color-neutral-500);
  text-align: center;
  margin-top: -12px;
}
.kx-login__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.kx-login__error {
  color: var(--color-error);
  font-size: var(--fs-caption);
  margin: -4px 0 0;
}
.kx-login__divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-neutral-500);
  font-size: var(--fs-caption);
}
.kx-login__divider::before,
.kx-login__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-neutral-200);
}
.kx-login__invite-link {
  background: none;
  border: none;
  color: var(--color-primary-600);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-align: center;
}
.kx-login__invite-link:hover {
  color: var(--color-primary-700);
}

/* 아이디 기억 / 비밀번호 찾기 행 */
.kx-login__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}
.kx-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-caption);
  color: var(--color-neutral-700);
  cursor: pointer;
  user-select: none;
}
.kx-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary-600);
  cursor: pointer;
}
.kx-login__text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary-600);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}
.kx-login__text-link:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}
.kx-login__text-link:focus-visible {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.kx-login__signup-row {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-login__signup-row .kx-login__text-link {
  font-size: var(--fs-caption);
}

/* 비밀번호 강도 힌트 */
.kx-pw {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 2px;
}
.kx-pw__bar {
  display: inline-flex;
  gap: 4px;
}
.kx-pw__bar span {
  width: 26px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-200);
  transition: background-color 0.15s ease;
}
.kx-pw__bar--weak span.is-on {
  background: var(--color-error);
}
.kx-pw__bar--fair span.is-on {
  background: var(--color-warning, #d97706);
}
.kx-pw__bar--strong span.is-on {
  background: var(--color-success, #16a34a);
}
.kx-pw__label {
  font-size: var(--fs-micro);
  color: var(--color-neutral-500);
}
.kx-pw__label--error {
  color: var(--color-error);
}

/* 성공 아이콘(회원가입/재설정 완료) */
.kx-modal__ok-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--color-success, #16a34a);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
}
.kx-modal__blocked .kx-modal__ok-icon + h3 {
  color: var(--color-neutral-900);
}
.kx-login__copy {
  position: absolute;
  bottom: var(--space-5);
  color: var(--color-neutral-500);
  font-size: var(--fs-micro);
}

/* ── 공통 필드 ── */
.kx-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-field label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-700);
}
.kx-field input {
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  background: var(--color-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kx-field input:focus {
  outline: none;
  border-color: var(--color-primary-600);
  box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.15);
}
/* 비밀번호 표시/숨김 토글 (눈 아이콘) */
.kx-field__pw {
  position: relative;
}
.kx-field__pw input {
  width: 100%;
  padding-right: 44px;
}
.kx-field__pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-neutral-500);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.kx-field__pw-toggle:hover {
  color: var(--color-primary-600);
  background: var(--color-neutral-050);
}

/* ── 워크스페이스 선택 ── */
.kx-ws {
  min-height: 100vh;
  background: var(--color-neutral-050);
  display: flex;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
}
.kx-ws__inner {
  width: 100%;
  max-width: 960px;
}
.kx-ws__header {
  margin-bottom: var(--space-6);
}
.kx-ws__header h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
}
.kx-ws__header p {
  color: var(--color-neutral-500);
  margin-top: var(--space-2);
}
.kx-ws__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}
.kx-ws__card {
  text-align: left;
  background: var(--color-white);
  border: var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.kx-ws__card:hover {
  border-color: var(--color-primary-600);
  box-shadow: var(--shadow-level2);
}
.kx-ws__card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}
.kx-ws__card-title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-900);
}
.kx-ws__card-meta {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-ws__card-hall {
  font-size: var(--fs-caption);
  color: var(--color-neutral-700);
}
.kx-ws__invite-row {
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
}

/* ── 모달 ── */
.kx-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.kx-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(2px);
}
.kx-modal__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-level2);
  padding: var(--space-6);
}
.kx-modal__title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-900);
  margin-bottom: var(--space-2);
}
.kx-modal__desc {
  font-size: var(--fs-body);
  color: var(--color-neutral-500);
  margin-bottom: var(--space-5);
}
.kx-modal__panel .kx-field {
  margin-bottom: var(--space-4);
}
.kx-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.kx-modal__blocked {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.kx-modal__blocked-icon {
  font-size: 40px;
}
.kx-modal__blocked h3 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-error);
}
.kx-modal__blocked p {
  font-size: var(--fs-body);
  color: var(--color-neutral-700);
}

/* ── 2차 인증(OTP) 패널 ─────────────────────────────────────────── */
.kx-otp-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: var(--color-neutral-050);
}
.kx-otp__badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-primary-600);
  background: var(--color-primary-050);
  border: 1px solid var(--color-primary-100);
}
.kx-otp__enroll {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.kx-otp__steps {
  margin: 0;
  padding-left: 18px;
  font-size: var(--fs-caption);
  line-height: 1.8;
  color: var(--color-neutral-700);
}
.kx-otp__qr {
  text-align: center;
}
.kx-otp__qr img {
  border: 1px solid var(--color-neutral-200);
  border-radius: 8px;
  background: var(--color-white);
  padding: 8px;
}
.kx-otp__secret {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kx-otp__secret-label {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-otp__secret code {
  display: block;
  word-break: break-all;
  background: var(--color-neutral-050);
  border: 1px solid var(--color-neutral-200);
  color: var(--color-neutral-900);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: var(--fs-caption);
}
.kx-otp__code-input {
  letter-spacing: 6px;
  text-align: center;
  font-size: var(--fs-h2);
}
.kx-otp__ok {
  font-size: var(--fs-body);
  color: var(--color-primary-700);
}
.kx-otp__cancel {
  align-self: center;
  margin-top: var(--space-2);
}
