/* ═══════════════════════════════════════════════════════════
   EchoFeed — Auth Pages (Login / Register)
   ═══════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  position: relative;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: auto;
}

.auth-topbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.auth-form {
  width: 100%;
  max-width: 400px;
}

.auth-header {
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 10px;
}

.auth-header h1 em {
  font-style: normal;
  color: var(--orange);
}

.auth-header p {
  font-size: 15px;
  color: var(--text-2);
}

.auth-header a {
  color: var(--orange);
  font-weight: 500;
  text-decoration: none;
}

.auth-header a:hover { text-decoration: underline; }

/* Social auth buttons */
.social-auth {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.social-btn:hover {
  background: var(--bg-3);
  border-color: var(--border-hover);
}

.social-btn svg { width: 18px; height: 18px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form fields */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group label .required { color: var(--orange); }

.input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s;
  outline: none;
}

.form-input::placeholder { color: var(--text-3); }

.form-input:hover { border-color: var(--border-hover); }

.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

.input-icon-wrap .form-input { padding-left: 42px; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.input-action {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.input-action:hover { color: var(--text); }

.input-action svg { width: 16px; height: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-2);
  user-select: none;
}

.checkbox-wrap input { display: none; }

.checkbox-fake {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-hover);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.checkbox-wrap input:checked ~ .checkbox-fake {
  background: var(--orange);
  border-color: var(--orange);
}

.checkbox-fake svg {
  width: 10px; height: 10px;
  color: white;
  opacity: 0;
  transition: opacity 0.15s;
}

.checkbox-wrap input:checked ~ .checkbox-fake svg { opacity: 1; }

.forgot-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}

.forgot-link:hover { text-decoration: underline; }

.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.2s;
}

.strength-bar.weak { background: #ef4444; }
.strength-bar.medium { background: #f59e0b; }
.strength-bar.strong { background: #10b981; }

.form-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

.auth-footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 12px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-footer a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ── RIGHT SIDE (Hero Art) ── */
.auth-right {
  position: relative;
  background: linear-gradient(135deg, #fff1e6 0%, #ffe4d1 50%, #ffd9bc 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

[data-theme="dark"] .auth-right {
  background: linear-gradient(135deg, #1c1917 0%, #292524 50%, #3f2a1c 100%);
}

.auth-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(249,115,22,0.25) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(249,115,22,0.2) 0%, transparent 40%);
  pointer-events: none;
}

[data-theme="dark"] .auth-right::before {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(249,115,22,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(249,115,22,0.1) 0%, transparent 40%);
}

.auth-hero {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
}

.auth-quote {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 32px;
}

.auth-quote em {
  font-style: normal;
  color: var(--orange);
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.auth-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.auth-stat-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.auth-stat-lbl {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 500;
}

.auth-showcase {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.showcase-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.showcase-card:last-child { border-bottom: none; }

.showcase-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.showcase-content { flex: 1; min-width: 0; }

.showcase-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.showcase-text {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.showcase-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
}

.showcase-plat {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  margin-left: 4px;
}

/* Mobile */
@media (max-width: 960px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-right { display: none; }
  .auth-left { min-height: 100vh; }
}

@media (max-width: 480px) {
  .auth-left { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Auth messages ── */
.auth-message {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  border: 1px solid;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-message.error {
  background: rgba(239,68,68,0.08);
  color: #dc2626;
  border-color: rgba(239,68,68,0.2);
}

[data-theme="dark"] .auth-message.error {
  background: rgba(239,68,68,0.12);
  color: #f87171;
}

.auth-message.success {
  background: rgba(16,185,129,0.08);
  color: #059669;
  border-color: rgba(16,185,129,0.2);
}

[data-theme="dark"] .auth-message.success {
  background: rgba(16,185,129,0.12);
  color: #34d399;
}

.auth-message.info {
  background: var(--orange-soft);
  color: var(--orange);
  border-color: rgba(249,115,22,0.2);
}

[data-theme="dark"] .auth-message.info {
  background: rgba(249,115,22,0.12);
}

/* ── Button loading state ── */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spinLoader 0.7s linear infinite;
}

.btn.loading svg { display: none; }

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

/* ── Check-email page ── */
.check-email-wrap {
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.check-email-icon {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .check-email-icon {
  background: rgba(249,115,22,0.12);
}

.check-email-icon svg { width: 36px; height: 36px; }

.check-email-wrap h1 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 14px;
}

.check-email-wrap p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 8px;
}

.check-email-email {
  font-weight: 600;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  padding: 8px 16px;
  background: var(--bg-3);
  border-radius: 10px;
  display: inline-block;
  margin: 6px 0 20px;
}

.check-email-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 20px;
}

.check-email-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

/* ═══════════════════════════════════════════════════════════
   AUTH STATUS PAGES (check-email, confirm, reset success)
   More polished, centered, hero-style layouts
   ═══════════════════════════════════════════════════════════ */

.auth-status {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0;
}

/* Large hero icon with animated background */
.auth-status-hero {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-status-hero-bg {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  opacity: 0.15;
  animation: heroPulse 3s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.08); opacity: 0.25; }
}

.auth-status-hero-icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 8px 32px rgba(249, 115, 22, 0.2);
}

.auth-status-hero.orange .auth-status-hero-bg { background: var(--orange); }
.auth-status-hero.orange .auth-status-hero-icon {
  background: linear-gradient(135deg, var(--orange), #fb923c);
  color: white;
}

.auth-status-hero.green .auth-status-hero-bg { background: #10b981; }
.auth-status-hero.green .auth-status-hero-icon {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.25);
}

.auth-status-hero.red .auth-status-hero-bg { background: #ef4444; }
.auth-status-hero.red .auth-status-hero-icon {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25);
}

.auth-status-hero.loading .auth-status-hero-bg { background: var(--text-3); }
.auth-status-hero.loading .auth-status-hero-icon {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  box-shadow: none;
}

.auth-status-hero-icon svg {
  width: 34px;
  height: 34px;
}

/* Orbiting dots around hero icon */
.auth-status-hero-orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-status-hero-orbit {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px dashed var(--border-hover);
  opacity: 0.5;
}

.auth-status-hero-orbit.o1 {
  width: 100%; height: 100%;
  animation: spinSlowOrbit 20s linear infinite;
}
.auth-status-hero-orbit.o2 {
  width: 130%; height: 130%;
  animation: spinSlowOrbit 30s linear infinite reverse;
}

@keyframes spinSlowOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.auth-status-hero-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  top: 50%; left: 50%;
}

.auth-status h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.auth-status h1 em {
  font-style: normal;
  color: var(--orange);
  position: relative;
}

.auth-status h1 em::after {
  content: '';
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 6px;
  background: var(--orange);
  opacity: 0.15;
  border-radius: 3px;
  z-index: -1;
}

.auth-status .lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 6px;
}

.auth-status-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin: 16px 0 24px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-status-email-chip svg {
  width: 14px; height: 14px;
  color: var(--orange);
  flex-shrink: 0;
}

.auth-status-help {
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  text-align: left;
}

.auth-status-help-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.auth-status-help-title svg {
  width: 14px; height: 14px;
  color: var(--orange);
}

.auth-status-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

/* Loading spinner for confirm page */
.auth-loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

/* Success checkmark animation */
.auth-check-svg {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.5s ease-out 0.2s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* Resend countdown state */
.resend-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 12px;
}

