/* ══ AUTH SCREENS ══ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--bg);
}
.auth-screen.hidden { display: none; }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(28,18,8,0.10);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}
.auth-logo-mark {
  width: 72px; height: 72px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(200,90,30,0.30);
}
.auth-brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.20em;
  color: var(--orange);
}
.auth-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* LANGUAGE — registration picker + bilingual trial/paywall copy */
body.lang-es .t-en { display: none; }
body.lang-en .t-es { display: none; }
.lang-pill {
  display: flex; gap: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: 3px; margin: 0 auto 1.25rem;
  width: fit-content;
}
.lang-pill-btn {
  padding: 6px 16px; border: none; border-radius: 99px;
  background: transparent; color: var(--text-muted);
  font-size: 12px; font-weight: 600; font-family: var(--sans);
  cursor: pointer; transition: all var(--t);
}
.lang-pill-btn.active { background: var(--forest); color: #fff; }

.auth-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--earth-deep);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.06em;
}

.auth-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 1rem;
  display: none;
}
.auth-error.show { display: block; }

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 1.25rem 0;
  color: var(--text-dim); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* TOP BAR when logged in */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 1.5rem;
  background: var(--forest);
  font-size: 12px;
  position: sticky; top: 0; z-index: 50;
}
@media (min-width: 900px) {
  .top-bar { grid-column: 1 / -1; }
  .trial-banner { grid-column: 1 / -1; }
  .sync-bar { grid-column: 2; border-left: none; }
}
.top-bar-user { color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 6px; }
.top-bar-user i { font-size: 13px; }
.top-bar-actions { display: flex; gap: 8px; align-items: center; }
.btn-logout {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
  font-size: 11.5px; font-family: var(--sans);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all var(--t);
}
.btn-logout:hover { background: rgba(255,255,255,0.20); color: #fff; }

.plan-badge {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--orange);
  color: #fff;
  text-transform: uppercase;
}

/* MAIN APP hidden until auth */
.main-app { display: none; }
.main-app.visible { display: block; }


/* TRIAL BANNER */
.trial-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 1.5rem;
  font-size: 12px; font-weight: 500;
  gap: 8px; flex-wrap: wrap;
}
.trial-banner.urgent { background: #FFF3E0; color: #C85A1E; border-bottom: 1px solid rgba(200,90,30,0.20); }
.trial-banner.normal { background: #EFF7EE; color: #274F10; border-bottom: 1px solid rgba(39,79,16,0.15); }
.trial-banner.expired { display: none; }
.trial-banner-left { display: flex; align-items: center; gap: 6px; }
.trial-days-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.urgent .trial-days-pill { background: var(--orange); color: #fff; }
.normal .trial-days-pill { background: var(--forest); color: #fff; }
.trial-upgrade-btn {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px; font-weight: 700;
  border: none; cursor: pointer;
  font-family: var(--sans);
  transition: all var(--t);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.urgent .trial-upgrade-btn { background: var(--orange); color: #fff; }
.urgent .trial-upgrade-btn:hover { background: var(--orange-light); }
.normal .trial-upgrade-btn { background: var(--forest); color: #fff; }
.normal .trial-upgrade-btn:hover { background: var(--forest-light); }

/* PAYWALL SCREEN */
.paywall-screen {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,18,8,0.92);
  z-index: 300;
  align-items: center; justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}
.paywall-screen.show { display: flex; }
.paywall-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 0;
  width: 100%; max-width: 680px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.40);
  animation: slideUp 0.2s ease;
}
.paywall-tiers { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 12px; }
.paywall-tier {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r);
  padding: 1rem 0.85rem; text-align: center; position: relative;
  display: flex; flex-direction: column; gap: 8px;
}
.paywall-tier.featured { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.paywall-tier-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.paywall-tier-name { font-family: var(--serif); font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 4px; }
.paywall-tier-price { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--orange); line-height: 1.2; }
.paywall-tier-price span { font-size: 10px; color: var(--text-dim); font-weight: 400; }
.paywall-tier .btn-paywall { font-size: 12.5px; padding: 10px; margin-top: auto; box-shadow: none; }
@media (max-width: 640px) { .paywall-tiers { grid-template-columns: 1fr; } }
.paywall-head {
  background: linear-gradient(135deg, var(--forest) 0%, var(--yellow) 100%);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}
.paywall-logo {
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
}
.paywall-title {
  font-family: var(--serif);
  font-size: 18px; font-weight: 600;
  color: #fff; letter-spacing: 0.10em;
  margin-bottom: 6px;
}
.paywall-sub { font-size: 13px; color: rgba(255,255,255,0.70); }
.paywall-body { padding: 1.75rem 2rem; }
.paywall-price {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--orange-bg);
  border-radius: var(--r);
  border: 1px solid var(--orange-border);
}
.paywall-amount {
  font-family: var(--serif);
  font-size: 48px; font-weight: 700;
  color: var(--orange); line-height: 1;
}
.paywall-once {
  font-size: 13px; color: var(--text-muted);
  margin-top: 4px;
}
.paywall-once strong { color: var(--forest); }
.paywall-features {
  list-style: none; margin-bottom: 1.5rem;
}
.paywall-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.paywall-features li:last-child { border-bottom: none; }
.paywall-features li::before {
  content: '✓'; width: 18px; height: 18px;
  background: var(--forest); color: #fff;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.btn-paywall {
  width: 100%; padding: 14px;
  background: var(--orange); border: none;
  border-radius: var(--r); color: #fff;
  font-size: 16px; font-family: var(--sans); font-weight: 700;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px;
  transition: all var(--t);
  box-shadow: 0 4px 16px rgba(200,90,30,0.35);
  text-decoration: none;
}
.btn-paywall:hover { background: var(--orange-light); transform: translateY(-1px); }
.paywall-contact {
  text-align: center; margin-top: 12px;
  font-size: 12px; color: var(--text-dim);
}
.paywall-contact a { color: var(--yellow); text-decoration: none; }
.paywall-contact a:hover { text-decoration: underline; }
.paywall-logout {
  display: block; width: 100%; text-align: center;
  margin-top: 10px; padding: 8px;
  font-size: 12px; color: var(--text-dim);
  background: none; border: none; cursor: pointer;
  font-family: var(--sans);
  transition: color var(--t);
}
.paywall-logout:hover { color: var(--danger); }
