* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }

/* ========== Layout ========== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ========== Left — Visual ========== */
.auth-visual {
  background: var(--navy-900);
  color: white;
  padding: 32px 56px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.auth-visual::before {
  content: '';
  position: absolute;
  top: -20%; right: -30%;
  width: 80%; height: 100%;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.auth-visual::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -20%;
  width: 70%; height: 80%;
  background: radial-gradient(circle, rgba(45, 77, 117, 0.5) 0%, transparent 60%);
  pointer-events: none;
}

.visual-brand {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 30px;
  background: white;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--navy-800);
  font-weight: 800;
  font-size: 13px;
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  right: -3px; top: 4px;
  width: 5px; height: 5px;
  background: var(--red-600);
  border-radius: 50%;
}

.visual-content {
  position: relative; z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.visual-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
}

.visual-headline {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  max-width: 420px;
}
.visual-headline .display {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
}

.visual-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 48px;
}

/* mock console preview */
.preview-frame {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  width: 100%;
  max-width: 480px;
  transform: rotateY(-3deg) rotateX(2deg);
  transform-origin: center;
  position: relative;
}
.preview-bar {
  display: flex; align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-100);
}
.preview-dots { display: flex; gap: 5px; }
.preview-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
}
.preview-dots span:nth-child(1) { background: #FF5F57; }
.preview-dots span:nth-child(2) { background: #FEBC2E; }
.preview-dots span:nth-child(3) { background: #28C840; }
.preview-url {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-500);
  display: flex; align-items: center; gap: 5px;
}
.preview-url i { width: 10px; height: 10px; color: var(--green); }

.preview-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  height: 220px;
  background: var(--bg);
}
.pb-side {
  background: #FAFBFC;
  border-right: 1px solid var(--ink-100);
  padding: 10px 6px;
}
.pb-side .it {
  padding: 6px;
  margin-bottom: 2px;
  border-radius: 4px;
  display: flex; align-items: center; gap: 5px;
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-700);
}
.pb-side .it .ic {
  width: 11px; height: 11px;
  background: var(--ink-300);
  border-radius: 2px;
}
.pb-side .it.active {
  background: var(--navy-800);
  color: white;
}
.pb-side .it.active .ic { background: rgba(255,255,255,0.7); }

.pb-main { padding: 14px 16px; }
.pb-main .ttl {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink-900);
}
.pb-main .kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.pb-main .k {
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: 5px;
  padding: 8px 10px;
}
.pb-main .k .l {
  font-size: 8px; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 600;
}
.pb-main .k .v {
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 1px;
}
.pb-main .k .d {
  font-size: 8px;
  color: var(--green);
  font-weight: 600;
  margin-top: 1px;
}
.pb-main .chart {
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: 5px;
  height: 60px;
  position: relative;
  overflow: hidden;
}
.pb-main .chart::before {
  content: '';
  position: absolute;
  inset: 8px;
  background: linear-gradient(to bottom, transparent 0%, rgba(31, 58, 95, 0.15) 100%);
  clip-path: polygon(0% 75%, 18% 60%, 35% 50%, 50% 55%, 70% 30%, 85% 35%, 100% 18%, 100% 100%, 0% 100%);
}
.pb-main .chart::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-bottom: 1.5px solid var(--navy-800);
  clip-path: polygon(0% 75%, 18% 60%, 35% 50%, 50% 55%, 70% 30%, 85% 35%, 100% 18%, 100% 17%, 0% 74%);
  background: var(--navy-800);
}

/* floating success card */
.float-card {
  position: absolute;
  top: -16px; right: -24px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
  z-index: 3;
}
.float-card .ic {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.float-card .ic i { width: 16px; height: 16px; }
.float-card .t { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.float-card .s { font-size: 10.5px; color: var(--ink-500); margin-top: 1px; }

.preview-wrap {
  position: relative;
  perspective: 1500px;
  align-self: center;
  margin: 0 auto;
}

.visual-foot {
  position: relative; z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.visual-foot a {
  color: rgba(255,255,255,0.7);
  transition: color .15s;
}
.visual-foot a:hover { color: white; }
.visual-foot .links { display: flex; gap: 18px; }

/* ========== Right — Form ========== */
.auth-form-side {
  display: flex;
  flex-direction: column;
  padding: 32px 56px;
}

.form-top {
  display: flex; justify-content: flex-end;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-500);
}
.form-top a {
  color: var(--navy-800);
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  transition: all .15s;
}
.form-top a:hover {
  border-color: var(--navy-800);
  background: var(--navy-50);
}

.form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.form-card {
  width: 100%;
  max-width: 380px;
}

.form-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 32px;
  justify-content: center;
}
.form-mobile-brand .brand-mark {
  background: var(--navy-800);
  color: white;
}

.form-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.form-subtitle {
  font-size: 14.5px;
  color: var(--ink-500);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* SNS buttons */
.sns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.sns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink-900);
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.sns-btn:hover {
  border-color: var(--ink-300);
  background: var(--ink-50);
  transform: translateY(-1px);
}
.sns-btn .sns-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 11px;
  border-radius: 4px;
  color: white;
}
.sns-btn.google .sns-icon {
  background: white;
  color: #4285F4;
  border: 1px solid #E8ECF1;
  font-family: Arial, sans-serif;
}
.sns-btn.naver .sns-icon { background: #03C75A; }
.sns-btn.kakao .sns-icon { background: #FEE500; color: #3C1E1E; }
.sns-btn.apple .sns-icon { background: #000; }
.sns-btn.apple .sns-icon i { width: 11px; height: 11px; }

/* divider */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--ink-400);
  font-weight: 500;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-100);
}

/* form fields */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-700);
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .leading-icon {
  position: absolute;
  left: 12px;
  width: 16px; height: 16px;
  color: var(--ink-400);
  pointer-events: none;
}
.input-text {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  background: var(--surface);
}
.input-text:focus {
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.08);
}
.input-text.error {
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}
.input-text.has-trailing { padding-right: 38px; }
.trailing-btn {
  position: absolute;
  right: 8px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: var(--ink-400);
  transition: color .12s, background .12s;
}
.trailing-btn:hover {
  color: var(--ink-700);
  background: var(--ink-50);
}
.trailing-btn i { width: 16px; height: 16px; }

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 22px;
  font-size: 13px;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--ink-700);
  font-weight: 500;
}
.checkbox input {
  width: 15px; height: 15px;
  accent-color: var(--navy-800);
  cursor: pointer;
}
.form-options a {
  color: var(--navy-800);
  font-weight: 600;
  transition: color .12s;
}
.form-options a:hover { color: var(--navy-900); text-decoration: underline; }

.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--navy-800);
  color: white;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: var(--radius);
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-submit:hover { background: var(--navy-900); }
.btn-submit i { width: 16px; height: 16px; transition: transform .15s; }
.btn-submit:hover i { transform: translateX(2px); }

.signup-prompt {
  text-align: center;
  margin-top: 28px;
  font-size: 13.5px;
  color: var(--ink-500);
}
.signup-prompt a {
  color: var(--navy-800);
  font-weight: 700;
  margin-left: 4px;
}
.signup-prompt a:hover { text-decoration: underline; }

.legal-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-400);
  line-height: 1.7;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-100);
}
.legal-note a {
  color: var(--ink-700);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-400);
}
.form-bottom a { color: var(--ink-500); transition: color .12s; }
.form-bottom a:hover { color: var(--ink-900); }
.form-bottom .lang-select {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  color: var(--ink-700);
  font-weight: 500;
}
.form-bottom .lang-select i { width: 12px; height: 12px; }

/* ========== Responsive ========== */
@media (max-width: 1023px) {
  .auth-visual { padding: 28px 40px; }
  .auth-form-side { padding: 28px 40px; }
  .visual-headline { font-size: 36px; }
  .float-card { right: 0; }
  .preview-frame { transform: none; }
}

@media (max-width: 767px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }

  .auth-form-side { padding: 24px 20px; min-height: 100vh; }
  .form-mobile-brand { display: inline-flex; }

  .form-top {
    position: absolute;
    top: 24px; right: 20px;
  }
  .form-wrap { padding: 0; }

  .sns-grid { grid-template-columns: 1fr; }
}
