/* ====================================================
   MKT PORTAL — layout de plataforma (sobre style.css)
   Reusa las variables de color de style.css (--azul, --violeta, etc.)
   ==================================================== */

body.portal {
  background-image: none;
  background-color: #f4f7fc;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Nav ---------- */
.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--blanco);
  color: var(--azul);
  border-bottom: 1px solid var(--gris-borde);
}
.portal-brand { color: var(--azul); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; }
.portal-brand:hover { text-decoration: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.portal-links { display: flex; gap: 16px; align-items: center; }
.portal-links a { color: var(--azul); font-weight: 600; }
/* .btn-sm va dentro de .portal-links: subo la especificidad para que el texto
   blanco gane sobre `.portal-links a` (si no, toma --azul y queda ilegible
   sobre el degradado, sobre todo en modo claro). */
.portal-links a.btn-sm, .btn-sm {
  background: var(--grad-btn);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
}
.lang-switch { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; font-size: 0.82rem; }
.lang-switch a { color: #9aa6bb; font-weight: 700; padding: 2px 4px; }
.lang-switch a.on { color: var(--azul); text-decoration: underline; }

.portal-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 20px; }

.portal-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  padding: 18px;
  font-size: 0.8rem;
  color: #6b7280;
  background: var(--blanco);
  border-top: 1px solid var(--gris-borde);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 40px 10px 24px; }
.hero h1 { font-size: 2.1rem; color: var(--azul); line-height: 1.15; }
.hero-sub { max-width: 620px; margin: 14px auto 0; color: #4b5563; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

.btn-ghost {
  display: inline-block;
  padding: 14px 22px;
  border-radius: var(--radio);
  border: 2px solid var(--azul);
  color: var(--azul);
  font-weight: 700;
}
.btn-ghost:hover { text-decoration: none; background: var(--celeste); }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.feature-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 22px;
  box-shadow: var(--sombra);
}
.feature-emoji { font-size: 2rem; }
.feature-card h3 { color: var(--azul); margin: 8px 0 6px; }
.feature-card p { color: var(--gris-txt); font-size: 0.95rem; }

/* ---------- Auth ---------- */
.auth-card {
  max-width: 420px;
  margin: 24px auto;
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 28px;
}
.auth-card h2 { color: var(--azul); margin-bottom: 16px; text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--azul); font-size: 0.9rem; }
.auth-form input {
  padding: 12px 14px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--blanco);
  color: var(--gris-txt);
}
.auth-form input:focus { outline: none; border-color: var(--azul-med); box-shadow: 0 0 0 3px rgba(0, 85, 179, 0.15); }
.auth-sep { text-align: center; color: #9ca3af; margin: 16px 0; position: relative; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 10px;
  font-weight: 700;
  color: var(--gris-txt);
}
.btn-google:hover { text-decoration: none; background: #f9fafb; }
.btn-google svg { width: 18px; height: 18px; flex: none; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 0.9rem; }

/* ---------- Panel ---------- */
.panel-head { margin-bottom: 22px; }
.panel-head h2 { color: var(--azul); }
.panel-sub { color: #6b7280; }
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.panel-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 22px;
  box-shadow: var(--sombra);
}
.panel-card h3 { color: var(--azul); margin-bottom: 6px; }
.panel-card p { color: #4b5563; font-size: 0.92rem; margin-bottom: 12px; }
.badge-soon {
  display: inline-block;
  background: var(--celeste);
  color: var(--azul);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Campañas (Fase 2) ---------- */
.muted { color: #9ca3af; font-size: 0.85rem; }

.btn-cta {
  display: inline-block;
  background: var(--grad-btn);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radio);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-cta:hover { text-decoration: none; opacity: 0.92; }

.btn-mini {
  display: inline-block;
  background: var(--blanco);
  border: 1.5px solid var(--gris-borde);
  color: var(--azul);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn-mini:hover { background: #f3f6fc; }
.btn-mini[disabled] { opacity: 0.5; cursor: default; }
.btn-ok { border-color: var(--ok, #2d8a4e); color: var(--ok, #2d8a4e); }
.btn-danger { border-color: var(--error, #e53e3e); color: var(--error, #e53e3e); }

.tabla-wrap {
  overflow-x: auto;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  box-shadow: 0 2px 12px rgba(0, 48, 135, .07);
}
.tabla { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tabla th {
  background: var(--celeste);
  color: var(--azul);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 13px 18px;
  white-space: nowrap;
}
.tabla td {
  padding: 13px 18px;
  border-top: 1px solid #eef2f8;
  vertical-align: middle;
  color: var(--gris-txt);
}
.tabla tbody tr:first-child td { border-top: none; }
.tabla tbody tr:hover td { background: #f5f9ff; }
.tabla th:last-child, .tabla td:last-child { text-align: right; white-space: nowrap; }
.tabla a { font-weight: 700; }

.estado { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: capitalize; letter-spacing: .02em; }
.estado-borrador   { background: #eef2f7; color: #6b7280; }
.estado-activa     { background: #e8f7ee; color: #2d8a4e; }
.estado-pausada    { background: #fff4e0; color: #b7791f; }
.estado-finalizada { background: #fde8e8; color: #b91c1c; }

.stat { text-align: center; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--azul); }

.acciones-estado { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.form-inline { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; max-width: 520px; }
.form-inline label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.85rem; color: var(--azul); }
.form-inline input, .form-inline select, .form-inline textarea { padding: 10px 12px; border: 1.5px solid var(--gris-borde); border-radius: 8px; font-size: 0.95rem; background: var(--blanco); color: var(--gris-txt); }
.form-inline textarea { font-family: inherit; resize: vertical; min-height: 64px; }
/* Edición de premio: imagen (miniatura) + instrucciones, lado a lado */
/* Acciones de premio: íconos (lápiz/tacho) en la fila, texto solo en hover (title) */
.acciones-premio { white-space: nowrap; }
.acciones-premio form { display: inline; }
.icono-btn { background: none; border: none; cursor: pointer; font-size: 1.15rem; line-height: 1;
  padding: 5px 7px; border-radius: 8px; vertical-align: middle; }
.icono-btn:hover { background: var(--celeste); }
.icono-del:hover { background: #fde8e8; }
/* Fila editora inline desplegable bajo cada premio */
.tabla tr.premio-edit-row > td { text-align: left; background: var(--blanco); padding: 16px 18px; }
.premio-edit > summary { display: inline-block; margin-bottom: 10px; }
.premio-edit-body { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.premio-img-col { display: flex; flex-direction: column; gap: 8px; }
.premio-thumb { width: 140px; height: 140px; object-fit: contain; border: 1px solid var(--gris-borde);
  border-radius: 10px; background: var(--blanco); }
.premio-thumb-empty { display: grid; place-items: center; color: var(--gris-txt); opacity: .6; font-size: .8rem; text-align: center; }
@media (max-width: 560px) { .premio-edit-body { flex-direction: column; } .premio-thumb { width: 110px; height: 110px; } }

.alerta-ok { background: #e8f7ee; color: #2d8a4e; padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 0.9rem; }

/* Ícono de ayuda "?" con tooltip flotante */
.ayuda { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border-radius: 50%; background: var(--azul-med, #0055b3); color: #fff; font-size: 11px; font-weight: 700;
  cursor: help; position: relative; margin-left: 6px; vertical-align: middle; user-select: none; }
.ayuda::after { content: attr(data-tip); position: absolute; left: 50%; top: 150%; transform: translateX(-50%);
  width: 250px; max-width: 70vw; background: #1b2a4a; color: #fff; font-weight: 400; font-size: 0.78rem;
  line-height: 1.4; text-align: left; padding: 10px 12px; border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transition: opacity .12s;
  z-index: 60; pointer-events: none; }
.ayuda:hover::after, .ayuda:focus::after { opacity: 1; visibility: visible; }

/* Toggle tipo slider (off=izq, on=der) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { flex: none; width: 48px; height: 26px; background: #cbd5e1; border-radius: 999px;
  position: relative; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.switch input:checked + .track { background: #2d8a4e; }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(0,85,179,.35); }
.switch .sw-on { display: none; color: #2d8a4e; }
.switch .sw-off { display: inline; color: var(--gris, #64748b); }
.switch input:checked ~ .sw-on { display: inline; }
.switch input:checked ~ .sw-off { display: none; }

/* Menú de acceso directo a secciones (sticky) */
html { scroll-behavior: smooth; }
[id^="sec-"] { scroll-margin-top: 80px; }
.camp-nav { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 4px; padding: 10px 12px; margin: 0 0 18px; background: var(--blanco);
  backdrop-filter: blur(6px); border: 1px solid var(--gris-borde); border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.camp-nav-title { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--azul); opacity: .75; margin-right: 4px; padding: 4px 6px; white-space: nowrap; }
.camp-nav a { font-size: .82rem; font-weight: 600; color: var(--azul, #0055b3); text-decoration: none;
  padding: 5px 11px; border-radius: 999px; background: #eef3fb; white-space: nowrap; transition: background .12s; }
.camp-nav a:hover { background: #d9e6fb; }
.camp-nav-sub { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px 6px; border-radius: 999px;
  background: #f6f8fc; border: 1px dashed #d7e0ee; }
.camp-nav-sub a { font-size: .76rem; font-weight: 500; background: transparent; color: var(--gris, #64748b); padding: 3px 8px; }
.camp-nav-sub a:hover { background: #e7eefb; color: var(--azul, #0055b3); }
@media (max-width: 640px) { .camp-nav { gap: 5px; } .camp-nav-sub { width: 100%; } }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros input[type=text], .filtros select { padding: 9px 12px; border: 1.5px solid var(--gris-borde); border-radius: 8px; font-size: 0.92rem; background: var(--blanco); color: var(--gris-txt); }
.filtros input[type=text] { flex: 1; min-width: 160px; }
.paginado { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 16px; }

.nivel { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.nivel-critico { background: #fde8e8; color: #b91c1c; }
.nivel-cambio  { background: #fff4e0; color: #b7791f; }
.nivel-info    { background: #e8f0fe; color: var(--azul); }

/* Gráfico de participación (timeline SVG) */
.timeline-leyenda { display: flex; gap: 18px; font-size: 0.82rem; color: #6b7280; margin-bottom: 10px; }
.timeline-leyenda .tl-lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.tl-lg-part { background: #6c3fd5; }
.tl-lg-jug  { background: #2d8a4e; }
.timeline-chart { width: 100%; }
.tl-svg { width: 100%; height: auto; display: block; }
.tl-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tl-line-part { stroke: #6c3fd5; }
.tl-line-jug  { stroke: #2d8a4e; }
.tl-dot-part { fill: #6c3fd5; }
.tl-dot-jug  { fill: #2d8a4e; }
.tl-axis { stroke: #d0d8e8; stroke-width: 1; }
.tl-grid { stroke: #eef2f8; stroke-width: 1; }
.tl-ytext { fill: #999; font-size: 10px; text-anchor: end; }
.tl-xtext { fill: #999; font-size: 10px; text-anchor: middle; }
.timeline-pie { font-size: 0.85rem; color: #555; margin-top: 12px; text-align: right; }

/* Barras comparativas (métricas) */
.bars { display: flex; flex-direction: column; gap: 16px; }
.bar-row .bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; font-weight: 600; color: var(--azul); margin-bottom: 5px; }
.bar-track { background: #eef2f8; border-radius: 6px; height: 13px; overflow: hidden; margin-bottom: 4px; }
.bar-fill { height: 100%; border-radius: 6px; min-width: 2px; transition: width .4s ease; }
.bar-fill.jug { background: #2d8a4e; }
.bar-fill.leads { background: #6c3fd5; }
.bar-fill.win { background: #f6b40e; }

/* Dona por tipo de juego */
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.donut { width: 148px; height: 148px; border-radius: 50%; position: relative; flex: none; }
.donut::after { content: ""; position: absolute; inset: 28px; background: #fff; border-radius: 50%; }
.donut-leyenda { list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 0.9rem; }
.donut-leyenda li { display: flex; align-items: center; gap: 8px; color: var(--gris-txt); }
.donut-leyenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }

/* Mapa de provincias (choropleth SVG — forma real de Argentina) */
.mapa-wrap { text-align: center; margin-top: 10px; }
.mapa-svg { width: auto; height: auto; max-height: 540px; max-width: 100%; display: inline-block; }
.mapa-svg path { transition: fill .15s; }
.mapa-svg path:hover { fill: #2160ff !important; }

/* Apariencia (tema + preview de skin) */
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 760px) { .look-grid { grid-template-columns: 1fr; } }
.skin-preview { width: 100%; height: 540px; border: 1px solid var(--gris-borde); border-radius: var(--radio); background: #fff; }

/* Modal flotante de preview ampliado */
.preview-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.preview-modal[hidden] { display: none; }
.preview-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px); }
.preview-modal-box { position: relative; z-index: 1; width: min(440px, 96vw); height: min(840px, 92vh); background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45); }
.preview-modal-frame { width: 100%; height: 100%; border: 0; display: block; }
.preview-modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.preview-modal-close:hover { background: rgba(0, 0, 0, 0.75); }
.fondo-galeria { display: flex; gap: 10px; flex-wrap: wrap; }
.fondo-thumb { margin: 0; }
.fondo-thumb button { padding: 0; border: 2px solid var(--gris-borde); border-radius: 10px; background: #fff; cursor: pointer; overflow: hidden; width: 96px; }
.fondo-thumb button:hover { border-color: var(--azul); }
.fondo-thumb img { display: block; width: 96px; height: 60px; object-fit: cover; }
.fondo-thumb span { display: block; font-size: 0.7rem; color: #6b7280; padding: 3px 4px; }
/* Biblioteca de assets subidos: thumbnail con botón ✕ para borrar de la cuenta */
.biblioteca-item { position: relative; }
.biblioteca-del { position: absolute; top: 4px; right: 4px; margin: 0; line-height: 0; }
.fondo-thumb .biblioteca-del-btn {
  width: 22px; height: 22px; min-width: 0; padding: 0;
  border: 1px solid rgba(255,255,255,.85); border-radius: 50%;
  background: rgba(0,0,0,.62); color: #fff; overflow: visible;
  font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.fondo-thumb .biblioteca-del-btn:hover { background: var(--error, #e53e3e); border-color: var(--error, #e53e3e); }

/* Publicación + QR */
.publi-grid { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.qr-box { text-align: center; }
.qr-img { border: 1px solid var(--gris-borde); border-radius: 10px; background: #fff; display: block; }
.qr-dl { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }

/* ====================================================
   Landing page (welcome)
   ==================================================== */
body.portal { overflow-x: hidden; }
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* Hero */
.lp-hero {
  margin-top: -32px;                      /* pega el hero bajo el nav */
  padding: 64px 20px 72px;
  background:
    radial-gradient(900px 400px at 80% -10%, #dbe7ff 0%, rgba(219,231,255,0) 60%),
    linear-gradient(180deg, #eef4ff 0%, #ffffff 100%);
}
.lp-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
}
.lp-eyebrow {
  display: inline-block; background: var(--blanco); color: var(--azul);
  border: 1px solid var(--celeste); font-weight: 700; font-size: 0.76rem;
  padding: 6px 14px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase;
}
.lp-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.07; color: var(--azul);
  margin: 18px 0 0; letter-spacing: -0.015em;
}
.lp-lead { font-size: 1.16rem; color: #4b5563; max-width: 540px; margin: 18px 0 26px; }
.lp-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-trust { margin-top: 16px; color: #6b7280; font-size: 0.9rem; }

/* Arte: ruleta CSS girando + chips flotantes */
.lp-art { position: relative; display: flex; justify-content: center; align-items: center; }
.lp-wheel-wrap { position: relative; width: min(320px, 74vw); aspect-ratio: 1; }
.lp-wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#003087 0 60deg, #0055b3 60deg 120deg, #6c3fd5 120deg 180deg,
    #2d8a4e 180deg 240deg, #f8961e 240deg 300deg, #e53e3e 300deg 360deg);
  box-shadow: 0 24px 60px rgba(0, 48, 135, 0.3), inset 0 0 0 10px #fff;
  animation: lp-spin 26s linear infinite;
}
.lp-hub {
  position: absolute; inset: 0; margin: auto; width: 78px; height: 78px;
  background: #fff; border-radius: 50%; display: grid; place-items: center;
  font-size: 34px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}
@keyframes lp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lp-wheel { animation: none; } }
.lp-chip {
  position: absolute; font-size: 1.9rem; width: 60px; height: 60px; background: #fff;
  border-radius: 16px; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0, 48, 135, 0.18); animation: lp-float 4s ease-in-out infinite;
}
.lp-chip-1 { top: 0; right: 6%; }
.lp-chip-2 { bottom: 8%; left: 0; animation-delay: 1.2s; }
.lp-chip-3 { bottom: -6px; right: 18%; animation-delay: 2.1s; }
@keyframes lp-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .lp-chip { animation: none; } }

/* Secciones */
.lp-section { max-width: 1100px; margin: 0 auto; padding: 58px 20px; text-align: center; }
.lp-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--azul); }
.lp-sub { color: #6b7280; max-width: 620px; margin: 10px auto 0; }
.lp-section .features { margin-top: 34px; }
.feature-card { transition: transform .15s, box-shadow .15s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 48, 135, 0.14); }

/* Pasos */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.lp-step { background: var(--blanco); border: 1px solid var(--gris-borde); border-radius: var(--radio); padding: 28px 22px; box-shadow: var(--sombra); }
.lp-step-n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--grad-btn); color: #fff; font-weight: 800; font-size: 1.2rem; margin: 0 auto 14px; }
.lp-step h3 { color: var(--azul); margin-bottom: 6px; }
.lp-step p { color: #4b5563; font-size: 0.95rem; }

/* Banda CTA final */
.lp-band { background: var(--grad-btn); padding: 60px 20px; text-align: center; }
.lp-band-inner { max-width: 760px; margin: 0 auto; }
.lp-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 22px; }
.btn-band { display: inline-block; background: #fff; color: var(--azul); font-weight: 800; padding: 15px 30px; border-radius: 999px; font-size: 1.02rem; }
.btn-band:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.2); }

@media (max-width: 820px) {
  .lp-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lp-art { order: -1; }
  .lp-lead { margin-inline: auto; }
  .lp-cta-row { justify-content: center; }
  .lp-steps { grid-template-columns: 1fr; }
}

/* ---- Mini-demos animados de las feature-cards ---- */
.demo { height: 88px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }

/* Ruleta: gira */
.demo-wheel-wrap { position: relative; width: 72px; height: 72px; }
.demo-wheel {
  width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(#003087 0 60deg, #0055b3 60deg 120deg, #6c3fd5 120deg 180deg,
    #2d8a4e 180deg 240deg, #f8961e 240deg 300deg, #e53e3e 300deg 360deg);
  box-shadow: inset 0 0 0 4px #fff, 0 5px 14px rgba(0, 48, 135, 0.22);
}
.demo-wheel-pin {
  position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 11px solid var(--azul); z-index: 2;
}
.feature-card.play .demo-wheel { animation: d-spin 1.6s cubic-bezier(.15, .75, .2, 1) both; }
@keyframes d-spin { from { transform: rotate(0); } to { transform: rotate(1080deg); } }

/* Raspadita: se rasca (wipe que revela) */
.demo-scratch {
  position: relative; width: 132px; height: 72px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; background: #e8f7ee; color: #2d8a4e;
  font-weight: 800; font-size: 0.95rem; box-shadow: inset 0 0 0 1px #cdeedd;
}
.demo-cover { position: absolute; inset: 0; background: linear-gradient(135deg, #b9c2d0, #dfe5ee, #aeb8c7); }
.feature-card.play .demo-cover { animation: d-scratch 1.4s ease-in-out .2s both; }
@keyframes d-scratch { to { clip-path: inset(0 0 0 100%); } }

/* Validar código: se escribe solo + ✓ */
.demo-code {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid #d7dce5;
  border-radius: 10px; background: #fff; font-family: ui-monospace, Menlo, monospace;
  font-size: 1.05rem; font-weight: 700; letter-spacing: 2px; color: var(--azul);
}
.demo-typed { overflow: hidden; white-space: nowrap; width: 0; border-right: 2px solid var(--azul); }
.demo-ok { color: #2d8a4e; opacity: 0; font-family: inherit; }
.feature-card.play .demo-typed { animation: d-type .9s steps(6) .25s forwards; }
.feature-card.play .demo-code { animation: d-green .3s 1.2s forwards; }
.feature-card.play .demo-ok { animation: d-pop .3s 1.2s forwards; }
@keyframes d-type { from { width: 0; } to { width: 7ch; } }
@keyframes d-green { to { border-color: #2d8a4e; } }
@keyframes d-pop { to { opacity: 1; transform: scale(1.15); } }

/* CRM: timeline que se dibuja */
.demo-chart { width: 132px; height: 66px; }
.demo-line {
  fill: none; stroke: var(--violeta); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 260; stroke-dashoffset: 260;
}
.feature-card.play .demo-line { animation: d-draw 1.4s ease-out .2s forwards; }
@keyframes d-draw { to { stroke-dashoffset: 0; } }
.demo-dot { fill: var(--violeta); opacity: 0; }
.feature-card.play .demo-dot { animation: d-pop .3s forwards; }

@media (prefers-reduced-motion: reduce) {
  .feature-card.play .demo-wheel, .feature-card.play .demo-cover,
  .feature-card.play .demo-typed, .feature-card.play .demo-line,
  .feature-card.play .demo-ok, .feature-card.play .demo-dot { animation: none !important; }
  .demo-cover { display: none; }
  .demo-typed { width: 7ch; }
  .demo-ok { opacity: 1; }
  .demo-line { stroke-dashoffset: 0; }
  .demo-dot { opacity: 1; }
}

/* ── Operadores (gestión owner + pantalla del operador + chooser de rol) ── */
.oper-emails { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.oper-emails li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; background: #f6f8fb; border-radius: 10px; }
.oper-emails li span { font-weight: 600; color: var(--azul); word-break: break-all; }

.oper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.oper-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.oper-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 85, 179, 0.12); }
.oper-card h3 { color: var(--azul); }
.oper-card .btn-cta { margin-top: auto; align-self: flex-start; }

.oper-screen { text-align: center; }
.oper-conteos { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 24px; }
.oper-num { color: var(--gris, #667); font-size: 0.95rem; }
.oper-num strong { display: block; font-size: 1.8rem; color: var(--azul); }
.btn-grande { font-size: 1.25rem; padding: 18px 40px; }
.oper-codigo { margin: 8px auto 24px; padding: 24px; background: #e8f7ee; border-radius: 14px; max-width: 420px; }
.oper-codigo-val { font-size: 2.4rem; font-weight: 800; letter-spacing: 0.08em; color: #2d8a4e;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; margin-top: 8px; word-break: break-all; }

/* ─────────────────────────────────────────────────────────────────────────
   Modo noche (sigue la preferencia del navegador/SO via prefers-color-scheme).
   Sólo afecta a las páginas de la plataforma (body.portal): las páginas
   públicas del juego conservan el tema elegido por cada campaña.
   La mayoría de superficies usan var(--blanco)/var(--azul)/var(--gris-borde),
   así que basta con re-mapear esas variables; abajo se ajustan los pocos
   colores que estaban hardcodeados.
   ───────────────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  body.portal {
    --azul:       #8ab4ff;   /* títulos, links, texto de marca */
    --azul-med:   #6f9dff;
    --gris-txt:   #c7d0de;   /* texto base */
    --gris-borde: #2b3340;   /* bordes */
    --celeste:    #20304d;   /* fondos sutiles (th de tablas, badges) */
    --blanco:     #161a22;   /* superficies (cards, nav, inputs) */
    --sombra:     0 8px 28px rgba(0, 0, 0, 0.5);

    background-color: #0e1116;
    background-image: none;
    color: var(--gris-txt);
  }

  /* Texto secundario un poco más claro para contraste en oscuro */
  body.portal .panel-card p { color: #aab4c4; }
  body.portal .panel-sub   { color: #9aa6bb; }

  /* Tablas */
  body.portal .tabla td { border-top-color: #2b3340; }
  body.portal .tabla tbody tr:hover td { background: #1c2230; }

  /* Botones secundarios */
  body.portal .btn-mini:hover { background: #222c3c; }

  /* Menú sticky de secciones */
  body.portal .camp-nav a { background: #1d2533; }
  body.portal .camp-nav a:hover { background: #283450; }
  body.portal .camp-nav-sub { background: #131923; border-color: #33405a; }
  body.portal .camp-nav-sub a:hover { background: #283450; }

  /* Listas / barras / donut que tenían blanco o gris claro fijos */
  body.portal .oper-emails li { background: #1c2230; }
  body.portal .bar-track { background: #222c3c; }
  body.portal .donut::after { background: var(--blanco); }

  /* Badges de nivel (auditoría): tonos oscuros legibles */
  body.portal .nivel-critico { background: #3a1d1d; color: #ff9b9b; }
  body.portal .nivel-cambio  { background: #3a2f17; color: #f0c674; }
  body.portal .nivel-info    { background: #1d2b45; color: #9ec1ff; }
  body.portal .icono-del:hover { background: #3a1d1d; }

  /* Landing (welcome): hero, textos secundarios y botón de la banda */
  body.portal .lp-hero {
    background:
      radial-gradient(900px 400px at 80% -10%, #1b2740 0%, rgba(27,39,64,0) 60%),
      linear-gradient(180deg, #141925 0%, #0e1116 100%);
  }
  body.portal .lp-lead,
  body.portal .lp-step p   { color: #aab4c4; }
  body.portal .lp-trust,
  body.portal .lp-sub      { color: #8d99ad; }
  body.portal .btn-band    { color: #11305f; }  /* botón blanco sobre la banda: texto oscuro fijo */

  /* Mini-demos de las feature-cards: son maquetas de UI clara (caja blanca),
     así que el texto se mantiene oscuro aunque --azul se aclare en oscuro. */
  body.portal .demo-code { color: #003087; }
  body.portal .demo-typed { color: #003087; border-right-color: #003087; }

  /* Botón de Google: hover no debe encenderse en claro */
  body.portal .btn-google:hover { background: #222c3c; }
}
