/* Chroma AI — auth pages (login, upgrade gate, callback, thank-you, mypage).
   Light theme; shares the :root tokens defined in legal.css. */

.cn-auth-main {
  max-width: 480px;
  margin: 56px auto 24px;
  padding: 0 20px;
}

.cn-auth-card {
  padding: 40px 32px;
  background: var(--cn-card);
  border: 1px solid var(--cn-border);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16,28,52,0.04), 0 14px 36px rgba(16,28,52,0.08);
}

.cn-auth-card h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.2;
  color: var(--cn-ink);
}

.cn-auth-card .cn-auth-sub {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cn-body);
  margin: 0 0 28px;
}

/* OAuth + email button stack */
.cn-auth-providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cn-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  color: var(--cn-ink);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Pretendard', system-ui, sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,28,52,0.04);
  transition: background 160ms ease, border-color 160ms ease;
}
.cn-auth-btn:hover {
  background: var(--cn-soft);
  border-color: #d3d9e3;
  text-decoration: none;
}
.cn-auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cn-auth-btn svg {
  flex-shrink: 0;
}

.cn-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 11px;
  color: var(--cn-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cn-auth-divider::before,
.cn-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cn-border);
}

.cn-auth-email-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cn-auth-input {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  color: var(--cn-ink);
  font-size: 14px;
  font-family: 'Pretendard', system-ui, sans-serif;
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.cn-auth-input:focus {
  border-color: var(--cn-blue);
  box-shadow: 0 0 0 3px rgba(20,110,245,0.12);
}
.cn-auth-input::placeholder {
  color: var(--cn-dim);
}

.cn-auth-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #3b89ff 0%, #146ef5 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Pretendard', system-ui, sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(20,110,245,0.28);
  transition: filter 160ms ease;
}
.cn-auth-primary:hover { filter: brightness(1.05); }
.cn-auth-primary:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }

.cn-auth-status {
  margin-top: 18px;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cn-body);
  text-align: center;
}
.cn-auth-status.error   { color: #dc2626; }
.cn-auth-status.success { color: #16a34a; }

.cn-auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--cn-hair);
  font-size: 12px;
  color: var(--cn-dim);
  text-align: center;
  line-height: 1.55;
}
.cn-auth-foot a { color: var(--cn-body); text-decoration: underline; text-underline-offset: 2px; }

/* Mode-switch links (forgot password / create account / back to sign in) */
.cn-auth-altrow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
}
.cn-auth-altrow a {
  color: var(--cn-body);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.cn-auth-altrow a:hover { color: var(--cn-blue); text-decoration: underline; text-underline-offset: 2px; }

/* Loading state (used in auth-callback.html and during transitions) */
.cn-auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
}
.cn-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--cn-border);
  border-top-color: var(--cn-blue);
  border-radius: 50%;
  animation: cn-spin 0.8s linear infinite;
}
@keyframes cn-spin { to { transform: rotate(360deg); } }

/* Email confirmation chip — shown on callback and thank-you pages */
.cn-email-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  background: var(--cn-tint);
  border: 1px solid rgba(20,110,245,0.25);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cn-blue-dk);
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: -0.01em;
}

/* Checkout email-lock warning — shown before forwarding to Lemon Squeezy */
.cn-checkout-warn {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 11px 13px;
  background: #fff7ed;
  border: 1px solid #fcd9a3;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #92610a;
  text-align: left;
}
.cn-checkout-warn svg { flex-shrink: 0; margin-top: 1px; color: #d97706; }
.cn-checkout-warn strong { color: #7c4a03; font-weight: 700; }

/* Hidden util (used for showing/hiding states) */
[hidden] { display: none !important; }

@media (max-width: 540px) {
  .cn-auth-main { margin: 32px auto 16px; padding: 0 16px; }
  .cn-auth-card { padding: 32px 22px; }
  .cn-auth-card h1 { font-size: 22px; }
}
