:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --line: #dbe2ea;
  --blue: #3157d5;
  --blue-hover: #2849b7;
  --blue-soft: #edf2ff;
  --teal: #0f766e;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success: #15704a;
  --success-soft: #ecfdf3;
  --shadow: 0 18px 50px rgba(24, 39, 75, 0.11);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-header {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-size: 12px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 470px);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  width: min(1040px, calc(100% - 40px));
  min-height: calc(100vh - 94px);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.auth-context {
  max-width: 490px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.auth-context h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.22;
}

.auth-context > p:not(.eyebrow) {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.trust-list {
  display: grid;
  gap: 15px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  position: relative;
  padding-left: 28px;
  color: #344054;
  line-height: 1.6;
}

.trust-list li::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--teal);
  background: #e7f8f4;
  content: "✓";
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.auth-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card-inner {
  padding: 34px;
}

.auth-card h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.35;
}

.auth-card .intro {
  margin: 9px 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.social-stack,
.auth-form {
  display: grid;
  gap: 12px;
}

.social-button,
.primary-button,
.secondary-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
}

.social-button {
  position: relative;
  border: 1px solid #cfd7e3;
  padding: 10px 78px 10px 50px;
  color: #253045;
  background: #ffffff;
  line-height: 1.35;
}

.social-button:hover:not(:disabled) {
  border-color: #98a6bb;
  background: var(--surface-muted);
}

.social-button:disabled {
  cursor: not-allowed;
  color: #98a2b3;
  background: #f8fafc;
}

.provider-mark {
  display: grid;
  position: absolute;
  left: 14px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.provider-status {
  position: absolute;
  right: 13px;
  width: 58px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #98a2b3;
  font-size: 12px;
}

.divider::before,
.divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.field input {
  width: 100%;
  min-height: 47px;
  border: 1px solid #cfd7e3;
  border-radius: 7px;
  padding: 0 13px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 87, 213, 0.12);
}

.field-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.primary-button {
  border: 1px solid var(--blue);
  color: #ffffff;
  background: var(--blue);
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-hover);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.message {
  margin: 16px 0 0;
  border: 1px solid #a6dfc7;
  border-radius: 7px;
  padding: 12px 13px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 13px;
  line-height: 1.55;
}

.message.error {
  border-color: #f1b4af;
  color: var(--danger);
  background: var(--danger-soft);
}

.message[hidden] {
  display: none;
}

.auth-footer {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.security-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

.callback-layout {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 30px 20px;
}

.callback-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 38px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.callback-panel h1 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.callback-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 3px solid #dce5ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.secondary-link {
  margin-top: 22px;
  border: 1px solid #cfd7e3;
  color: var(--text);
  background: #ffffff;
}

.secondary-link:hover {
  text-decoration: none;
  background: var(--surface-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
  .auth-header {
    width: min(100% - 30px, 520px);
    padding-top: 18px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(100% - 30px, 520px);
    padding: 28px 0 50px;
  }

  .auth-context h1 {
    font-size: 32px;
  }

  .auth-context > p:not(.eyebrow) {
    font-size: 15px;
  }

  .trust-list {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-card-inner {
    padding: 26px 20px;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .social-button {
    padding-right: 68px;
    padding-left: 43px;
    font-size: 13px;
    white-space: nowrap;
  }

  .provider-mark {
    left: 11px;
  }

  .provider-status {
    right: 9px;
    width: 54px;
    font-size: 10px;
  }

  .callback-panel {
    padding: 30px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.8s;
  }
}
