/* ══════════════════════════════════════════════════════
   AUTH.CSS — Create Password + Login pages
   Matches base.css design tokens exactly.
   ══════════════════════════════════════════════════════ */

/* ── Full-page auth layout ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

/* Background glow orbs (same as landing) */
.auth-page::before {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(91,106,240,0.12) 0%, transparent 65%);
  top: -180px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.auth-page::after {
  content: '';
  position: fixed;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(16,184,168,0.08) 0%, transparent 65%);
  bottom: -80px; right: -60px;
  pointer-events: none;
  z-index: 0;
}

/* ── Auth card ── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 44px 40px 40px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(91,106,240,0.08);
  animation: authFadeUp 0.4s ease both;
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 32px;
  text-decoration: none;
}

.auth-logo:hover { text-decoration: none; }

.auth-logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.auth-logo-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.11em;
}

/* ── Heading ── */
.auth-title {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Form group ── */
.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* Input inherits from base.css .input class */

/* ── Password wrapper with eye toggle ── */
.input-pw-wrap {
  position: relative;
}

.input-pw-wrap .input {
  padding-right: 42px;
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.14s;
}

.pw-toggle:hover { color: var(--text-secondary); }

/* ── Submit button ── */
.auth-btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 13px;
  margin-top: 8px;
}

/* ── Error / success messages ── */
.auth-message {
  display: none;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
  font-weight: 500;
}

.auth-message.error {
  background: rgba(244,63,94,0.10);
  border: 1px solid rgba(244,63,94,0.22);
  color: var(--red);
}

.auth-message.success {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.22);
  color: var(--green);
}

.auth-message.info {
  background: var(--accent-dim);
  border: 1px solid rgba(91,106,240,0.20);
  color: var(--accent-light);
}

/* ── Divider line ── */
.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── Footer link ── */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--text-link);
  font-weight: 500;
}

.auth-footer a:hover { color: var(--accent-light); }

/* ── Loading spinner inside button ── */
.btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

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

.btn-loading .btn-spinner { display: block; }
.btn-loading .btn-label   { display: none; }

/* ── Success state (after create-password) ── */
.auth-success-state {
  display: none;
  text-align: center;
}

.success-icon {
  width: 52px; height: 52px;
  background: rgba(34,197,94,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1px solid rgba(34,197,94,0.22);
}

.auth-success-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-success-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}
