:root {
  --ink: #111827;
  --navy: #111b2e;
  --navy-soft: #1a2943;
  --accent: #d7a35d;
  --paper: #f4f1eb;
  --surface: #ffffff;
  --line: #d9dde5;
  --muted: #687386;
  --danger: #a4262c;
  --danger-soft: #fff1f2;
  --focus: #2563eb;
  --shadow: 0 26px 70px rgba(17, 27, 46, 0.14);
  font-family: Inter, Pretendard, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
}

button:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(430px, 45fr);
  min-height: 100svh;
  background: var(--surface);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(34px, 5vw, 72px);
  color: #f8fafc;
  background:
    radial-gradient(circle at 84% 18%, rgba(215, 163, 93, 0.16), transparent 28%),
    linear-gradient(145deg, #0b1323 0%, var(--navy) 54%, #172842 100%);
}

.brand-panel::after {
  position: absolute;
  right: -12vw;
  bottom: -24vw;
  width: 47vw;
  height: 47vw;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.brand-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(18px, 2.4vw, 38px);
  width: 1px;
  background: linear-gradient(transparent, rgba(215, 163, 93, 0.75) 18%, rgba(255, 255, 255, 0.08) 82%, transparent);
}

.brand-header,
.brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.wordmark,
.brand-discipline,
.brand-index,
.brand-footer p,
.brand-footer span,
.form-topline,
.eyebrow {
  margin: 0;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.wordmark {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-discipline {
  color: rgba(248, 250, 252, 0.6);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.8;
  text-align: right;
}

.brand-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 91%);
  margin: auto 0;
  padding: clamp(72px, 11vh, 128px) 0;
}

.brand-index {
  margin-bottom: 28px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
}

.brand-copy h1 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: clamp(50px, 5.7vw, 88px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.brand-copy > p:last-child {
  margin: 38px 0 0;
  color: rgba(248, 250, 252, 0.67);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.9;
}

.brand-footer {
  align-items: flex-end;
  color: rgba(248, 250, 252, 0.45);
  font-size: 9px;
  font-weight: 700;
}

.brand-footer p {
  color: rgba(248, 250, 252, 0.78);
  font-size: 11px;
}

.brand-footer p span {
  display: block;
  margin-top: 7px;
  color: rgba(248, 250, 252, 0.38);
  font-size: 8px;
}

.form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: clamp(32px, 5vw, 72px);
  background:
    linear-gradient(rgba(17, 27, 46, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 27, 46, 0.024) 1px, transparent 1px),
    var(--surface);
  background-size: 32px 32px;
}

.form-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.form-topline::after {
  width: 42px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.form-content {
  width: min(100%, 430px);
  margin: auto;
  padding: clamp(48px, 7vh, 82px) 0;
}

.eyebrow {
  color: #9a6b2e;
  font-size: 10px;
  font-weight: 800;
}

.form-content h2 {
  margin: 16px 0 0;
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: clamp(42px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.form-description {
  margin: 20px 0 38px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.auth-form {
  display: grid;
  gap: 23px;
}

.field-group {
  display: grid;
  gap: 9px;
}

.field-group label {
  color: #273449;
  font-size: 12px;
  font-weight: 750;
}

.field-group small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.field-group input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field-group input:hover {
  border-color: #aeb7c5;
}

.field-group input:focus {
  border-color: var(--navy-soft);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-group input[aria-invalid="true"] {
  border-color: var(--danger);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 58px;
  min-height: 44px;
  border: 0;
  color: #4c596d;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: -4px;
}

.security-copy {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.text-action {
  flex: none;
  min-height: 32px;
  padding: 0;
  border: 0;
  color: #7d8795;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.customer-cta button {
  width: 100%;
  min-height: 54px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.primary-button {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--navy);
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.primary-button:not(:disabled):hover {
  background: #1a2943;
}

.primary-button:disabled {
  opacity: 0.67;
}

.primary-button.is-busy::after {
  position: absolute;
  right: 18px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.secondary-button {
  border: 1px solid var(--line);
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.secondary-button:not(:disabled):hover {
  border-color: #9da8b8;
  background: #f8fafc;
}

.form-message {
  margin: -7px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  color: #7f1d1d;
  background: var(--danger-soft);
  font-size: 12px;
  line-height: 1.55;
}

.customer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.customer-cta div {
  display: grid;
  gap: 5px;
}

.customer-cta strong {
  font-size: 12px;
}

.customer-cta span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.customer-cta button {
  width: auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: #7d8795;
  background: #f5f6f8;
  white-space: nowrap;
}

.account-summary {
  margin: -17px 0 26px;
  padding: 14px 16px;
  border: 1px solid #d7dce4;
  color: #354052;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.55;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #99a1ad;
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.form-footer strong {
  color: #7d8795;
}

noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  padding: 14px;
  border: 1px solid #fecaca;
  color: #7f1d1d;
  background: #fff1f2;
  text-align: center;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

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

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: minmax(0, 47fr) minmax(420px, 53fr);
  }

  .brand-copy h1 {
    font-size: clamp(48px, 6.2vw, 68px);
  }
}

@media (max-width: 760px) {
  .auth-shell {
    display: block;
    background: var(--surface);
  }

  .brand-panel {
    min-height: 265px;
    padding: 28px 24px 30px;
  }

  .brand-rail,
  .brand-discipline,
  .brand-copy > p:last-child,
  .brand-footer {
    display: none;
  }

  .brand-copy {
    width: 100%;
    margin: auto 0 0;
    padding: 44px 0 0;
  }

  .brand-index {
    margin-bottom: 12px;
  }

  .brand-copy h1 {
    font-size: clamp(40px, 12vw, 56px);
  }

  .form-panel {
    min-height: calc(100svh - 265px);
    padding: 28px 24px 24px;
  }

  .form-topline {
    display: none;
  }

  .form-content {
    width: 100%;
    padding: 38px 0 52px;
  }

  .form-content h2 {
    font-size: 40px;
  }

  .form-description {
    margin: 17px 0 31px;
  }

  .customer-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-cta button {
    width: 100%;
  }

  .form-footer {
    display: grid;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
