/* ============================================================
   Docs ONEQ · Auth (Login / Signup)
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
@media (max-width: 980px) { .auth-shell { grid-template-columns: 1fr; } }

/* --- Left brand panel --- */
.auth-brand {
  position: relative;
  background: var(--brand-ink);
  color: white;
  padding: 56px 64px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
@media (max-width: 980px) { .auth-brand { display: none; } }

.auth-brand::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(85, 102, 197, 0.45), transparent 70%),
    radial-gradient(40% 50% at 90% 70%, rgba(49, 130, 246, 0.35), transparent 70%),
    radial-gradient(50% 60% at 50% 100%, rgba(31, 45, 140, 0.5), transparent 70%);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand .brand-mark {
  font-size: 18px;
}
.auth-brand .brand-mark .name { color: white; }
.auth-brand .brand-mark .name em { color: var(--accent); }

.auth-brand-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 480px; }
.auth-brand h1 {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 16px;
}
.auth-brand h1 .accent-text {
  color: var(--accent);
}
.auth-brand p {
  font-size: 16px; line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin: 0 0 40px;
}

.auth-quote {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xl);
  padding: 24px 26px;
  backdrop-filter: blur(8px);
  margin-top: auto;
}
.auth-quote-text {
  font-size: 15px; line-height: 1.65;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.auth-quote-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
}
.auth-quote-meta .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.auth-quote-meta .who { font-size: 13px; font-weight: 700; }
.auth-quote-meta .role { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 1px; }

.auth-brand-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 28px;
  font-size: 12px; color: rgba(255,255,255,0.55);
}
.auth-brand-foot a:hover { color: white; }

/* --- Right form panel --- */
.auth-form-panel {
  position: relative;
  padding: 56px 64px;
  display: flex; flex-direction: column;
  background: var(--paper);
  overflow-y: auto;
}
@media (max-width: 720px) { .auth-form-panel { padding: 40px 24px; } }

.auth-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-5);
  transition: color var(--dur) var(--ease-out);
}
.auth-back:hover { color: var(--ink-1); }

.auth-form-wrap {
  width: 100%; max-width: 420px;
  margin: 56px auto auto;
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  display: inline-flex; padding: 4px;
  background: var(--ink-10);
  border: 1px solid var(--ink-9);
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.auth-tab {
  padding: 8px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700;
  color: var(--ink-5);
  transition: all var(--dur) var(--ease-out);
}
.auth-tab.active {
  background: var(--paper); color: var(--ink-0);
  box-shadow: var(--shadow-sm);
}

.auth-title {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.2;
  margin: 0 0 8px;
}
.auth-subtitle {
  font-size: 15px; color: var(--ink-5);
  margin: 0 0 32px; line-height: 1.55;
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field label {
  font-size: 13px; font-weight: 700;
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between;
}
.auth-field label .helper {
  font-size: 11.5px; color: var(--ink-5); font-weight: 600;
}
.auth-field label .helper a { color: var(--brand); }
.auth-field label .helper a:hover { text-decoration: underline; }

.auth-input {
  width: 100%; height: 48px;
  padding: 0 16px;
  background: var(--paper);
  border: 1.5px solid var(--ink-8);
  border-radius: var(--r-md);
  font-size: 15px; color: var(--ink-1);
  transition: all var(--dur) var(--ease-out);
}
.auth-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 45, 140, 0.1);
}
.auth-input::placeholder { color: var(--ink-6); }
.auth-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(226,61,61,0.08);
}

.auth-error-msg {
  font-size: 12.5px; color: var(--danger);
  margin-top: 2px;
  display: none;
}
.auth-error-msg.shown { display: block; }

.auth-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ink-3);
  cursor: pointer;
  user-select: none;
}
.auth-check input { display: none; }
.auth-check .box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--ink-7);
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur) var(--ease-out);
  flex-shrink: 0;
}
.auth-check .box::after {
  content: "✓";
  color: white; font-size: 12px; font-weight: 700;
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.auth-check input:checked + .box {
  background: var(--brand);
  border-color: var(--brand);
}
.auth-check input:checked + .box::after { opacity: 1; }
.auth-check a { color: var(--brand); font-weight: 600; }
.auth-check a:hover { text-decoration: underline; }

.auth-submit {
  width: 100%; height: 50px;
  font-size: 14.5px; font-weight: 700;
  margin-top: 8px;
}

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0;
  font-size: 12px; color: var(--ink-5);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--ink-9);
}

.auth-oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .auth-oauth { grid-template-columns: 1fr; } }
.oauth-btn {
  height: 48px; display: flex; align-items: center; justify-content: center;
  gap: 10px;
  border: 1.5px solid var(--ink-8); border-radius: var(--r-md);
  background: var(--paper);
  font-size: 14px; font-weight: 600;
  color: var(--ink-1);
  transition: all var(--dur) var(--ease-out);
}
.oauth-btn:hover {
  border-color: var(--ink-7);
  background: var(--ink-10);
  transform: translateY(-1px);
}
.oauth-btn.kakao { background: #FEE500; border-color: #FEE500; color: #1A1A1A; }
.oauth-btn.kakao:hover { background: #FFD900; border-color: #FFD900; }
.oauth-btn .logo {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}

.auth-switch {
  font-size: 14px; color: var(--ink-5);
  margin-top: 28px;
  text-align: center;
}
.auth-switch a { color: var(--brand); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

.auth-lang {
  display: inline-flex; padding: 3px;
  border-radius: var(--r-pill);
  background: var(--ink-10);
  border: 1px solid var(--ink-9);
}
.auth-lang button {
  padding: 5px 10px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; color: var(--ink-5);
  transition: all var(--dur) var(--ease-out);
}
.auth-lang button.active {
  background: var(--paper); color: var(--ink-0);
  box-shadow: var(--shadow-xs);
}

/* Success state */
.auth-success {
  display: none;
  flex-direction: column; align-items: center;
  text-align: center;
  padding: 24px;
}
.auth-success.shown { display: flex; }
.auth-success .check-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
  animation: pop 400ms var(--ease-spring);
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.auth-success h3 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.auth-success p {
  font-size: 14.5px; color: var(--ink-5); margin: 0 0 8px;
}
.auth-success .redirecting {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--brand);
  margin-top: 14px;
}

/* Animated background dots for brand panel */
.auth-floating-doc {
  position: absolute;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  padding: 14px 16px;
  width: 200px;
  animation: float 6s ease-in-out infinite;
}
.auth-floating-doc .label {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.auth-floating-doc .row {
  height: 5px; background: rgba(255,255,255,0.15); border-radius: 3px;
  margin-bottom: 5px;
}
.auth-floating-doc .row.s { width: 50%; }
.auth-floating-doc .row.m { width: 80%; }
.auth-floating-doc.fd-1 { top: 60px; right: 64px; animation-delay: 0s; }
.auth-floating-doc.fd-2 { top: 220px; right: 24px; width: 180px; animation-delay: -2s; }
.auth-floating-doc.fd-3 { top: 380px; right: 80px; width: 170px; animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
