:root {
  --navy:      #1B2A4A;
  --navy-mid:  #243652;
  --gold:      #C9A84C;
  --gold-light:#e8c97a;
  --white:     #ffffff;
  --gray:      #f8fafc;
  --gray-mid:  #e2e8f0;
  --text:      #1e293b;
  --text-light:#64748b;
  --danger:    #ef4444;
  --success:   #22c55e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--gray);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
nav {
  background: var(--navy);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; opacity: 0.9; }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--gold); text-decoration: none; }

.nav-btn {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}
.nav-btn:hover { background: var(--gold-light); }

/* ── Main / Footer ────────────────────────────────────────────────────── */
main { flex: 1; }

footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.2rem;
  font-size: 0.82rem;
  margin-top: auto;
}

/* ── Container ────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-navy {
  background: var(--navy);
  color: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
  line-height: 1.4;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-gold  { background: var(--gold);  color: var(--navy); }
.btn-navy  { background: var(--navy);  color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); border: 2px solid var(--navy); }
.btn-sm    { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--gray-mid);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ── Tables ───────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  background: var(--navy);
  color: var(--white);
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-mid); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray); }

/* ── Badges ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-long   { background: #dcfce7; color: #166534; }
.badge-short  { background: #fee2e2; color: #991b1b; }
.badge-orb    { background: #dbeafe; color: #1e40af; }
.badge-gap    { background: #ede9fe; color: #5b21b6; }
.badge-vwap   { background: #fef3c7; color: #92400e; }
.badge-gold   { background: var(--gold); color: var(--navy); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Pricing ──────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-mid);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(201,168,76,0.25);
}
.pricing-card .featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}
.pricing-tier { font-size: 0.8rem; font-weight: 700; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem; }
.pricing-name { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.pricing-price { font-size: 2.2rem; font-weight: 800; color: var(--navy); }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-light); }
.pricing-features { list-style: none; margin: 1.2rem 0 1.5rem; }
.pricing-features li { padding: 0.4rem 0; font-size: 0.9rem; border-bottom: 1px solid var(--gray-mid); }
.pricing-features li::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* ── Steps ────────────────────────────────────────────────────────────── */
.steps-section { background: var(--navy); color: var(--white); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.step-num {
  width: 44px; height: 44px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
  margin-bottom: 1rem;
}
.step h3 { color: var(--gold); margin-bottom: 0.4rem; font-size: 1rem; }
.step p { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

/* ── Dashboard ────────────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--navy); border-radius: 10px; padding: 1.2rem 1.5rem; }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--gold); }
.stat-sub   { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 0.2rem; }

/* ── ETF Cards ────────────────────────────────────────────────────────── */
.etf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
.etf-card {
  background: var(--white);
  border-radius: 10px;
  border-left: 4px solid var(--navy);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}
.etf-card-header {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.etf-card-header .symbol { font-size: 1.1rem; font-weight: 700; }
.etf-card-body { padding: 1rem; }
.etf-grade-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}
.score-bar-wrap { margin: 0.5rem 0; }
.score-bar-label { font-size: 0.78rem; color: var(--text-light); margin-bottom: 3px; display: flex; justify-content: space-between; }
.score-bar-track { height: 6px; background: var(--gray-mid); border-radius: 3px; }
.score-bar-fill  { height: 6px; background: var(--navy); border-radius: 3px; }

/* ── Signal cards ─────────────────────────────────────────────────────── */
.signal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.signal-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.signal-card-header { background: var(--navy); color: var(--white); padding: 0.75rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.signal-card-header .sym { font-size: 1.05rem; font-weight: 700; }
.signal-card-body { padding: 1rem; font-size: 0.88rem; }
.signal-row { display: flex; justify-content: space-between; padding: 0.25rem 0; border-bottom: 1px solid var(--gray-mid); }
.signal-row:last-child { border-bottom: none; }
.signal-row .lbl { color: var(--text-light); }
.signal-row .val { font-weight: 600; }

/* ── Projector ────────────────────────────────────────────────────────── */
.projector-form { max-width: 500px; margin: 0 auto; }
.projector-results { margin-top: 2rem; }

/* ── Slider ───────────────────────────────────────────────────────────── */
input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  height: 6px;
  cursor: pointer;
}

/* ── Upgrade blur overlay ─────────────────────────────────────────────── */
.blur-container { position: relative; }
.blur-content { filter: blur(5px); pointer-events: none; user-select: none; }
.blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27,42,74,0.55);
  border-radius: 10px;
  text-align: center;
  padding: 1rem;
}
.blur-overlay-box { background: var(--white); border-radius: 10px; padding: 1.5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.blur-overlay-box h3 { color: var(--navy); margin-bottom: 0.5rem; }
.blur-overlay-box p  { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1rem; }

/* ── Section titles ───────────────────────────────────────────────────── */
.section-title { font-size: 1.7rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.section-sub   { color: var(--text-light); font-size: 1rem; margin-bottom: 2rem; }

.page-header { background: var(--navy); color: var(--white); padding: 2.5rem 1.5rem 2rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; color: var(--gold); }
.page-header p  { color: rgba(255,255,255,0.7); margin-top: 0.3rem; font-size: 0.95rem; }

/* ── Auth cards ───────────────────────────────────────────────────────── */
.auth-wrap  { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card  { background: var(--white); border-radius: 14px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 4px 24px rgba(0,0,0,0.10); }
.auth-logo  { text-align: center; margin-bottom: 1.8rem; }
.auth-logo .logo-text { font-size: 2rem; font-weight: 800; color: var(--navy); letter-spacing: 0.1em; }
.auth-logo .logo-tag  { font-size: 0.78rem; color: var(--text-light); letter-spacing: 0.06em; }
.auth-title  { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 1.5rem; text-align: center; }
.auth-footer { text-align: center; margin-top: 1.2rem; font-size: 0.87rem; color: var(--text-light); }

/* ── Bilingual toggle ─────────────────────────────────────────────────── */
.lang-toggle {
  display: flex;
  background: rgba(255,255,255,0.15);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.lang-btn.active { background: var(--gold); color: var(--navy); }

.lang-en, .lang-es { transition: opacity 0.2s; }
html.lang-es .lang-en { display: none; }
html.lang-en .lang-es { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .etf-grid { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1rem; }
  .page-header { padding: 1.5rem 1rem; }
  nav { padding: 0 1rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.8rem; }
  table { font-size: 0.8rem; }
  th, td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: center; }
  .auth-card { padding: 1.8rem 1.2rem; }
}
