@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --primary: #713df0;
  --primary-dark: #6230d6;
  --ink: #111d37;
  --muted: #8998b3;
  --line: #e6e9f2;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family:
    Inter,
    "Noto Sans KR",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
svg {
  display: block;
}
::selection {
  color: #fff;
  background: var(--primary);
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px 20px;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(129, 92, 255, 0.11),
      transparent 53%
    ),
    linear-gradient(180deg, #faf9ff 0%, #fff 85%);
}
.login-shell {
  width: 100%;
  max-width: 460px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 auto 36px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #7060ff;
}
.brand-mark svg {
  width: 100%;
  height: 100%;
}
.brand strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.login-card {
  padding: 43px 39px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(35, 44, 81, 0.065);
}
.login-header {
  margin-bottom: 31px;
  text-align: center;
}
.eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}
.login-header h1 {
  margin: 13px 0 11px;
  color: #121e38;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.055em;
}
.login-header p {
  margin: 0;
  color: #8b9ab3;
  font-size: 12px;
  line-height: 1.7;
}
.field-group {
  margin-bottom: 20px;
}
.field-group label {
  display: block;
  margin-bottom: 10px;
  color: #35435e;
  font-size: 12px;
  font-weight: 800;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  border: 1px solid #e1e6f0;
  border-radius: 11px;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.input-wrap:focus-within {
  border-color: #a88aff;
  box-shadow: 0 0 0 4px rgba(113, 61, 240, 0.07);
}
.field-icon {
  width: 43px;
  height: 100%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #96a4bb;
}
.field-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.input-wrap input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 13px 0 0;
  border: 0;
  outline: 0;
  color: #192741;
  background: transparent;
  font-size: 13px;
}
.input-wrap input::placeholder {
  color: #a4aec0;
}
.password-toggle {
  width: 45px;
  height: 100%;
  flex: 0 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #9ca8bb;
}
.password-toggle:hover {
  color: var(--primary);
}
.password-toggle svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
  display: none;
}
.password-toggle.is-visible .eye-closed {
  display: block;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #6c60ff, #7835ef);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(113, 61, 240, 0.17);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.login-button span {
  font-size: 18px;
  font-weight: 500;
}
.login-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(113, 61, 240, 0.23);
}
.login-button:disabled {
  opacity: 0.75;
  cursor: wait;
}
.signup-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 28px;
  color: #93a0b6;
  font-size: 12px;
}
.signup-line a {
  color: var(--primary);
  font-weight: 850;
}
.signup-line a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-copy {
  margin: 31px 0 0;
  text-align: center;
  color: #abb5c6;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 25, 46, 0.58);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
.auth-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.auth-box {
  width: 100%;
  max-width: 355px;
  padding: 39px 30px 34px;
  border: 1px solid #e5e8f2;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 25, 46, 0.21);
  text-align: center;
}
.auth-mark {
  width: 45px;
  height: 45px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #f3eeff;
  border-radius: 13px;
}
.auth-mark svg {
  width: 30px;
  height: 30px;
}
.auth-spinner {
  width: 27px;
  height: 27px;
  margin: 0 auto 22px;
  border: 3px solid #ede7ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.auth-box h2 {
  margin: 0 0 9px;
  color: #16223b;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.auth-box p {
  margin: 0 0 25px;
  color: #8899b4;
  font-size: 12px;
}
.progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe9ff;
}
.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8175ff, #713df0);
}
.auth-overlay.is-visible .progress-fill {
  animation: progress 5s linear forwards;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 26px 18px;
  }
  .brand {
    margin-bottom: 28px;
  }
  .brand strong {
    font-size: 21px;
  }
  .login-card {
    padding: 35px 23px 32px;
    border-radius: 17px;
  }
  .login-header {
    margin-bottom: 28px;
  }
  .login-header h1 {
    font-size: 29px;
  }
  .input-wrap {
    height: 51px;
  }
  .login-button {
    min-height: 51px;
  }
  .auth-box {
    padding: 35px 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-button,
  .input-wrap,
  .auth-overlay {
    transition: none;
  }
  .auth-spinner {
    animation-duration: 2s;
  }
}
