/* ═══════════════════════════════════════════════════════
   VinciJobs · Dashboard shared styles
   Todos los dashboards de /mercado usan este archivo.
   Para agregar estilos específicos de un dashboard,
   usa {% block extra_css %} en el template hijo.
═══════════════════════════════════════════════════════ */

/* ─── TOKENS ──────────────────────────────────────────── */
:root {
  --bg: #FAFAF7; --bg-warm: #F5F2ED; --bg-card: #FFFFFF;
  --text: #2C2C2C; --text-soft: #5C5C5C; --text-muted: #9A9A9A;
  --primary: #5B6CF0; --primary-soft: #EEF0FF; --primary-border: #D4D8FC;
  --green: #3DB87A; --green-soft: #EDFBF3; --green-border: #BEE8D1;
  --orange: #F0943B; --orange-soft: #FFF5EB; --orange-border: #FDDCB5;
  --pink: #E8678A; --pink-soft: #FFF0F3; --pink-border: #F9C4D1;
  --border: #EAEAE5;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius: 16px;
  --body: 'Nunito', sans-serif;
  --hand: 'Caveat', cursive;
}

/* ─── RESET ───────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── NAV ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 14px 24px;
  transition: all 0.3s ease;
}
.nav.scrolled {
  background: rgba(250,250,247,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo {
  font-weight: 800; font-size: 1.2rem; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.nav-logo-icon {
  width: 32px; height: 32px; background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 15px;
}
.nav-cta {
  background: var(--text); color: white; text-decoration: none;
  padding: 9px 20px; border-radius: 10px; font-size: 0.88rem; font-weight: 700;
  transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.nav-cta:hover { background: #444; transform: translateY(-1px); }

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  max-width: 960px; margin: 0 auto;
  padding: 108px 24px 32px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-soft); border: 1.5px solid var(--green-border);
  color: var(--green); font-size: 0.82rem; font-weight: 700;
  padding: 7px 16px; border-radius: 50px; margin-bottom: 20px;
}
.hero-badge .dot {
  width: 7px; height: 7px; background: var(--green); border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800;
  line-height: 1.18; margin-bottom: 12px; letter-spacing: -0.4px;
}
.hero h1 .hl { color: var(--primary); position: relative; }
.hero h1 .hl::after {
  content: ''; position: absolute; bottom: 2px; left: -2px; right: -2px;
  height: 10px; background: var(--primary-soft); border-radius: 4px; z-index: -1;
}
.hero-sub {
  font-size: 1rem; color: var(--text-soft);
  max-width: 500px; margin: 0 auto 10px; font-weight: 500;
}
.hero-meta { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.hero-meta span { font-weight: 700; color: var(--text-soft); }

/* ─── TAB SWITCHER ────────────────────────────────────── */
.tab-switcher-wrap {
  max-width: 960px; margin: 0 auto;
  padding: 0 24px;
}
.tab-switcher {
  display: flex; gap: 4px;
  background: var(--bg-warm);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  width: fit-content;
  margin-bottom: 36px;
}
.tab-switcher-btn {
  padding: 9px 22px; border-radius: 10px;
  font-size: 0.88rem; font-family: var(--body); font-weight: 700;
  text-decoration: none;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
  transition: all 0.22s ease;
}
.tab-switcher-btn:hover { color: var(--text); }
.tab-switcher-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ─── CONTAINER + PRIMITIVOS ──────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

.card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: all 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

.section-label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
}
.section-header { margin-bottom: 20px; }
.section-header h2 { font-size: 1.2rem; font-weight: 800; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-wrapper { position: relative; height: 240px; }

/* ─── CTA ─────────────────────────────────────────────── */
.cta-section { padding: 8px 0 72px; }
.cta-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 22px; padding: 48px 36px; text-align: center;
  position: relative; box-shadow: var(--shadow-md);
}
.cta-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--primary), var(--green));
  border-radius: 22px 22px 0 0;
}
.cta-emoji { font-size: 2.2rem; margin-bottom: 14px; }
.cta-card h2 { font-size: 1.65rem; font-weight: 800; margin-bottom: 8px; }
.cta-sub {
  color: var(--text-soft); font-size: 0.96rem; font-weight: 500;
  margin: 0 auto 26px; max-width: 400px;
}
.btn-main {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); background: var(--text); color: white;
  text-decoration: none; padding: 15px 36px; border-radius: 14px;
  font-size: 1rem; font-weight: 700; border: none; cursor: pointer;
  transition: all 0.25s ease; box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-main:hover { background: #444; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }
.cta-trust {
  margin-top: 14px; font-size: 0.8rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: 500;
}
.hand-note { font-family: var(--hand); color: var(--primary); font-size: 1.05rem; font-weight: 600; }

/* ─── FOOTER ──────────────────────────────────────────── */
.footer {
  text-align: center; padding: 28px 24px;
  font-size: 0.82rem; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ─── ANIMACIONES ─────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ──────────────────────────────────────── */
/* ── layout base (desktop) ── */
.area-row    { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; cursor: pointer; transition: background 0.15s; margin-bottom: 3px; }
.area-row:hover  { background: var(--bg-warm); }
.area-row.active { background: var(--bg-warm); }

.row-line1   { display: flex; align-items: center; gap: 10px; width: 100%; }
.row-line2   { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding-left: 25px; }

.area-rank   { font-size: 0.72rem; font-weight: 800; color: var(--text-muted); width: 20px; text-align: center; flex-shrink: 0; }
.area-dot    { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.area-name   { font-size: 0.9rem; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.area-bar-bg { flex: 1; height: 8px; background: var(--bg-warm); border-radius: 4px; overflow: hidden; }
.area-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); width: 0%; }
.area-pct    { font-size: 0.78rem; color: var(--text-muted); width: 38px; text-align: right; flex-shrink: 0; font-weight: 700; }
.area-total  { font-size: 0.75rem; color: var(--text-muted); width: 56px; text-align: right; flex-shrink: 0; font-weight: 600; }
.chevron     { font-size: 11px; color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; margin-left: auto; }
.area-row.active .chevron { transform: rotate(90deg); }

/* en desktop la segunda línea siempre se ve — no hay nada que ocultar */
/* en mobile solo ajustamos tamaños */
@media (max-width: 768px) {
  .hero-stat        { flex-direction: column; text-align: center; }
  .movimientos-grid { grid-template-columns: 1fr; }
  .area-name        { font-size: 0.82rem; }
  .area-rank        { width: 16px; font-size: 0.68rem; }
  .area-dot         { width: 9px; height: 9px; }
  .row-line2        { padding-left: 20px; }
  .area-detail      { padding-left: 10px; }
  .det-name         { width: 90px; font-size: 0.74rem; }
  .det-pct          { width: 32px; font-size: 0.7rem; }
  .det-total        { width: 44px; font-size: 0.7rem; }
  .tab-switcher     { width: 100%; justify-content: center; }
  .tab-switcher-btn { flex: 1; justify-content: center; font-size: 0.82rem; padding: 9px 12px; }
}
}