/* ═══════════════════════════════════════════════════════════════════════
   Área de Membros — Quero Viajar na Faixa
   Editorial-luxe direction matching the Compra Bonificada login surface:
   warm cream background with subtle gradient + grain, Fraunces serif
   wordmark, refined card chrome, properly styled secondary controls.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Warm neutrals */
  --bg-page:        #F4F2EE;
  --bg-card:        #FFFFFF;
  --bg-inset:       #F3F1ED;

  --border:         #E8E4DD;
  --border-input:   #D8D3CB;
  --border-soft:    #EEEAE2;

  --text:           #1A1A1A;
  --text-strong:    #0F172A;
  --text-muted:     #4B5563;
  --text-soft:      #6B6B6B;
  --text-faint:     #8A857B;
  --text-ghost:     #B8B2A8;

  /* Accent */
  --accent-blue:        #2A5CE8;
  --accent-blue-dark:   #1844B8;
  --accent-blue-tint:   #EBF1FF;
  --accent-green:       #1F8B5F;
  --accent-green-tint:  #ECFCF5;
  --accent-red:         #C03B3B;

  --shadow-sm:   0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-pop:  0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 6px 18px rgba(15, 23, 42, 0.08);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji";
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --fs-2xs: 0.75rem;     /* 12px */
  --fs-xs:  0.8125rem;   /* 13px */
  --fs-sm:  0.875rem;    /* 14px */
  --fs-base:0.9375rem;   /* 15px */
  --fs-md:  1.0625rem;   /* 17px */
  --fs-lg:  1.1875rem;   /* 19px */
  --fs-xl:  1.5rem;      /* 24px */

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-blue-dark); text-decoration: underline; }

/* ── Boot loader ─────────────────────────────────────────────────────── */
.boot-loader {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  background: var(--bg-page);
}
.boot-loader-ring {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}
.boot-loader-text { font-size: var(--fs-xs); color: var(--text-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════
   Auth surface — login + help-form
   ════════════════════════════════════════════════════ */

.auth-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 20px;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(42, 92, 232, 0.06), transparent 60%),
    radial-gradient(ellipse 100% 50% at 50% 100%, rgba(15, 23, 42, 0.05), transparent 70%);
  background-attachment: fixed;
  position: relative;
}
.auth-screen::before {
  /* Subtle grain — SVG noise via data URI. Adds texture without dominating. */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.auth-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex; flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.auth-mark { text-align: center; }
.auth-mark-overline {
  font-family: var(--font);
  font-size: 11px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.auth-mark-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  font-optical-sizing: auto;
}
.auth-mark-rule {
  width: 36px; height: 2px;
  background-color: var(--accent-blue);
  margin: 18px auto 0;
  border-radius: 1px;
}

/* Card */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 36px 32px;
  box-shadow: var(--shadow-pop);
}

/* Form */
.auth-form { display: flex; flex-direction: column; }
.auth-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.auth-input {
  font-family: var(--font);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-md);
  background: var(--bg-card);
  color: var(--text);
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input::placeholder { color: var(--text-ghost); }
.auth-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(42, 92, 232, 0.12);
}
.auth-input--invalid {
  border-color: var(--accent-red);
  background-color: #FCF6F5;
}
.auth-input--invalid:focus { box-shadow: 0 0 0 3px rgba(192, 59, 59, 0.15); }
.auth-input--valid { border-color: var(--accent-green); }
.auth-input--code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 10px;
  padding: 18px 8px 18px 18px;
  font-variant-numeric: tabular-nums;
}
.auth-input--cpf {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.auth-help {
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-soft);
  margin: 8px 2px 0;
}
.auth-help--error { color: var(--accent-red); }

/* Help form */
.auth-form--help .auth-label { margin-top: 14px; }
.auth-form--help .auth-label:first-of-type { margin-top: 0; }
.auth-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: var(--font);
  line-height: 1.45;
}

.auth-tel-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.auth-input--ddi {
  width: 76px; flex-shrink: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
.auth-input--num { flex: 1; min-width: 0; }

.auth-link.auth-link--alert {
  color: var(--accent-red);
  font-weight: 600;
}
.auth-link.auth-link--alert:hover { color: #8A2929; }

/* Help-sent confirmation card */
.auth-card--confirm {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 44px 32px;
}
.auth-confirm-icon { font-size: 56px; line-height: 1; margin-bottom: 18px; }
.auth-confirm-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 14px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.auth-confirm-body {
  font-size: 15px; line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.auth-confirm-body strong { color: var(--text); font-weight: 600; }

/* Turnstile slot */
.auth-turnstile {
  margin: 18px 0 4px;
  min-height: 65px;
  display: flex; justify-content: center;
}

/* Primary button */
.auth-btn {
  margin-top: 20px;
  font-family: var(--font);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.4px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--text);
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
  width: 100%;
}
.auth-btn:hover { background: #2D2D2D; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled {
  background: var(--border-input);
  color: #FFFFFF;
  cursor: not-allowed;
  transform: none;
}

/* Links */
.auth-link {
  display: inline-block;
  font-family: var(--font);
  font-size: 14px; font-weight: 500;
  color: var(--accent-blue);
  text-decoration: none;
  background: none;
  border: 0; padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.auth-link:hover {
  color: var(--accent-blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.auth-link--quiet {
  margin-top: 16px;
  align-self: center;
  color: var(--text-soft);
  font-size: 13px; font-weight: 500;
}
.auth-link--quiet:hover { color: var(--text); }

.auth-aux { text-align: center; margin: 0; }

/* Status message */
.auth-message {
  font-size: 13px; line-height: 1.5;
  margin: 14px 0 0;
  text-align: center;
  min-height: 18px;
  color: var(--text-muted);
}
.auth-message--success { color: var(--accent-green); }
.auth-message--error   { color: var(--accent-red); }
.auth-message--info {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: #2B2B2B;
  text-align: left;
  margin-top: 18px;
}

/* OTP-stage aux row */
.auth-otp-aux {
  display: flex;
  justify-content: center; align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.auth-otp-sep { color: #C8C2B7; font-size: 13px; }

@media (max-width: 480px) {
  .auth-screen { padding: 40px 16px; }
  .auth-stage { gap: 20px; }
  .auth-card { padding: 28px 24px 24px; border-radius: 14px; }
  .auth-mark-title { font-size: 30px; }
  .auth-input--code { font-size: 22px; letter-spacing: 8px; padding-left: 14px; padding-right: 6px; }
  .auth-otp-aux { flex-direction: column; gap: 6px; }
  .auth-otp-sep { display: none; }
}

/* ════════════════════════════════════════════════════
   Portal — post-login surface (topbar + hero + cards)
   ════════════════════════════════════════════════════ */

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
}
.topbar-brand { display: flex; flex-direction: column; line-height: 1.15; }
.topbar-overline {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-soft); font-weight: 600;
}
.topbar-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
}
.topbar-spacer { flex: 1; }
.topbar-user { font-size: 13px; color: var(--text-muted); }
.btn-logout {
  background: var(--text);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s ease;
}
.btn-logout:hover { background: #2D2D2D; }
.topbar-version {
  font-size: 11px; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin-left: 10px;
}
@media (max-width: 640px) {
  .topbar-version { display: none; }
  .topbar-inner { padding: 12px 16px; }
}

.portal {
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.portal-hero { text-align: center; margin-bottom: 40px; }
.portal-greeting {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.portal-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 10px 0 0;
  color: var(--text);
}
.portal-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin: 14px auto 0;
  max-width: 540px;
  line-height: 1.55;
}
.dev-banner {
  display: inline-block;
  margin: 22px auto 0;
  padding: 8px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 150ms cubic-bezier(.2,.7,.3,1),
              box-shadow 150ms,
              border-color 150ms;
  position: relative;
  min-height: 232px;
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  text-decoration: none;
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.product-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-blue-tint);
  color: var(--accent-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.product-card-icon--brand {
  background: transparent;
  padding: 0;
}
.product-card-icon--brand img {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}
.product-card-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.product-card-deck {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 10px;
  flex: 1;
}
.product-card-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 14px;
}
.product-card-cta::after { content: '→'; transition: transform 150ms; }
.product-card:hover .product-card-cta::after { transform: translateX(4px); }
.product-card-tag {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-blue-tint);
  color: var(--accent-blue-dark);
}
.product-card-tag--new {
  background: var(--accent-green-tint);
  color: var(--accent-green);
}
