/* ============================================================
   Comunidad Mérida · hoja de estilos única (v5)
   Lenguaje visual Fligo (el de Mi Energía / Berny) con el negro
   del one page de Eduardo como color que manda. Todas las
   pantallas usan SOLO estas piezas. Nada suelto.
   ============================================================ */

:root {
  /* Marca: negro del one page. Sin logo ni nombre todavía (pendiente de Eduardo). */
  --marca: #111111;
  --marca-h: #000000;
  --marca-suave: #EDEDEA;     /* fondo de lo seleccionado */
  --marca-tinta: #FFFFFF;     /* texto sobre la marca */

  /* Superficies (grises cálidos de Fligo) */
  --fondo: #F6F6F3;
  --sup: #FFFFFF;
  --sup2: #F1F0EC;
  --sup3: #E7E5DF;
  --borde: #DDDBD4;
  --borde2: #EAE8E2;

  /* Texto */
  --texto: #1F2732;
  --texto2: #4A5260;
  --texto3: #878C95;

  /* Semáforo */
  --ok: #1E8A5C;     --ok-t: #166A46;     --ok-bg: #E4F3EB;     --ok-borde: #BFE3CF;
  --warn: #B27C1B;   --warn-t: #8A5F10;   --warn-bg: #FBF1DA;   --warn-borde: #EBD9A6;
  --bad: #C0442E;    --bad-t: #A33823;    --bad-bg: #FAE8E3;    --bad-borde: #F2C9C2;
  --info: #1F6FA3;   --info-t: #1D5E8A;   --info-bg: #E5F1F9;   --info-borde: #BFD9EC;
  --neutro: #6C7A80; --neutro-t: #54646B; --neutro-bg: #EFEFEC;
  --whats: #1E8A5C;

  /* Forma */
  --r: 14px;
  --r2: 10px;
  --sombra: 0 1px 2px rgba(17,17,17,.05), 0 6px 20px rgba(17,17,17,.06);
  --sombra-alta: 0 4px 10px rgba(17,17,17,.08), 0 18px 44px rgba(17,17,17,.14);

  /* Medidas fijas (guía Fligo): fila 48 · encabezado 38 · KPI 96 · chips 34 · botones y campos 38 · título 56 */
  --alto-fila: 48px;
  --alto-enc: 38px;
  --alto-kpi: 96px;
  --alto-chip: 34px;
  --alto-boton: 38px;
  --alto-campo: 38px;
  --alto-titulo: 56px;
  --alto-barra-sup: 56px;
  --alto-barra-inf: 66px;
  --ancho-max: 1360px;
  --ancho-lectura: 560px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  font-family: -apple-system, "Segoe UI", "Avenir Next", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14.5px; line-height: 1.55;
  color: var(--texto); background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--marca); text-decoration: none; }
b, strong { font-weight: 700; }
img { display: block; max-width: 100%; }

/* ============================================================
   NAVEGACIÓN · dos niveles
   Nivel 1: barra arriba en el color de la marca, pastilla blanca en la sección activa.
   Nivel 2: submenú de la sección como línea subrayada, debajo del título.
   Celular: la barra de arriba solo dice el nombre; las secciones van abajo (4 + Más).
   ============================================================ */
.barra-sup {
  position: sticky; top: 0; z-index: 40;
  height: var(--alto-barra-sup); background: var(--marca); color: var(--marca-tinta);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 14px rgba(17,17,17,.18);
}
.barra-sup-in {
  height: 100%; max-width: var(--ancho-max); margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 22px;
}
.barra-sup .marca { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.2px; white-space: nowrap; }
.barra-sup .marca small { font-weight: 500; color: rgba(255,255,255,.6); font-size: 12px; }
.barra-sup .marca .sello { width: 26px; height: 26px; border-radius: 8px; background: #fff; color: var(--marca); display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: -.5px; }
.menu { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a, .menu button {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: none; color: rgba(255,255,255,.78); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .12s, color .12s;
}
.menu a:hover, .menu button:hover { background: rgba(255,255,255,.12); color: #fff; }
.menu .activo, .menu .activo:hover { background: #fff; color: var(--marca); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.menu .n { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.menu .activo .n { background: var(--marca-suave); color: var(--marca); }
.barra-sup .usuario { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.barra-sup .usuario small { display: block; font-weight: 400; color: rgba(255,255,255,.6); line-height: 1.2; }
.barra-sup .usuario .ava { background: #fff; color: var(--marca); }

/* Submenú de sección: línea subrayada */
.submenu { display: flex; gap: 22px; border-bottom: 1px solid var(--borde2); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.submenu::-webkit-scrollbar { display: none; }
.submenu a { padding: 9px 2px 10px; font-weight: 600; font-size: 13.5px; color: var(--texto2); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.submenu a:hover { color: var(--marca); }
.submenu a.activo { color: var(--marca); border-color: var(--marca); }

/* Píldoras: solo filtros dentro de una pantalla (Hoy · Próximos · Pasados) */
.vista-tabs { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--sup2); border-radius: 999px; padding: 3px; gap: 2px; scrollbar-width: none; height: var(--alto-chip); }
.vista-tabs::-webkit-scrollbar { display: none; }
.vista-tabs button { border: none; background: none; font-size: 12.5px; font-weight: 600; color: var(--texto2); padding: 0 16px; border-radius: 999px; white-space: nowrap; transition: background .12s, color .12s; }
.vista-tabs button.activo { background: var(--sup); color: var(--texto); box-shadow: var(--sombra); }

/* ============================================================
   ARMAZÓN
   ============================================================ */
.contenido { max-width: var(--ancho-max); margin: 0 auto; padding: 22px 28px 40px; min-width: 0; }
.contenido.lectura { max-width: var(--ancho-lectura); }
.contenido.ancha { max-width: 960px; }

/* Título de pantalla: alto fijo para que las pantallas hermanas no brinquen */
.titulo { height: var(--alto-titulo); display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 10px; }
.titulo h1 { font-size: 23px; font-weight: 700; letter-spacing: -.4px; color: var(--marca); margin: 0; line-height: 1.2; white-space: nowrap; }
.titulo .pista { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titulo .acciones { margin-left: auto; }
.pista { color: var(--texto3); font-size: 13px; }
.volver { display: inline-flex; align-items: center; gap: 6px; color: var(--texto2); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.volver:hover { color: var(--marca); }
.seccion-t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.seccion-t h3 { font-size: 15px; font-weight: 700; color: var(--texto); margin: 0; }
.seccion-t .pista { font-size: 12.5px; }
.seccion-t .der { margin-left: auto; }

/* Panel (tarjeta) */
.panel { background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sombra); }
.panel.chico { padding: 14px 16px; }
.panel + .panel { margin-top: 12px; }

/* Avatar con iniciales (sin fotos hasta que las suban) */
.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--marca-suave); color: var(--marca); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; letter-spacing: -.2px; }
.ava.g { width: 56px; height: 56px; font-size: 18px; }
.ava.xg { width: 88px; height: 88px; font-size: 28px; }
.ava.ch { width: 32px; height: 32px; font-size: 11.5px; }
.ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ============================================================
   BOTONES · una acción principal por pantalla, el resto en ⋯
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--alto-boton); padding: 0 16px;
  border: 1px solid var(--borde); border-radius: var(--r2);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  background: var(--sup); color: var(--texto); box-shadow: 0 1px 2px rgba(17,17,17,.05);
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: var(--texto3); }
.btn.sol { background: var(--marca); border-color: var(--marca); color: var(--marca-tinta); }
.btn.sol:hover { background: var(--marca-h); border-color: var(--marca-h); }
.btn.linea { background: none; border-color: var(--borde); color: var(--texto2); box-shadow: none; }
.btn.linea:hover { color: var(--marca); border-color: var(--marca); }
.btn.peligro { color: var(--bad-t); border-color: var(--bad-borde); background: var(--sup); }
.btn.whats { color: var(--ok-t); border-color: var(--ok-borde); background: var(--ok-bg); }
.btn.whats:hover { border-color: var(--ok); }
.btn.chico { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn.grande { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn.ancho { width: 100%; }
.btn.icono { width: var(--alto-boton); padding: 0; font-size: 18px; }
.btn.icono.chico { width: 30px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Menú ⋯ */
.mas { position: relative; display: inline-block; }
.mas-lista {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 25; min-width: 220px;
  background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r2); box-shadow: var(--sombra-alta); padding: 6px;
}
.item-menu { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 8px; font-weight: 600; color: var(--texto); white-space: nowrap; }
.item-menu:hover { background: var(--sup2); }
.item-menu.peligro { color: var(--bad-t); }

/* ============================================================
   ETIQUETAS (estado) · siempre texto, nunca solo color
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
  white-space: nowrap; border: 1px solid transparent; line-height: 1.5;
  background: var(--neutro-bg); color: var(--neutro-t);
}
/* ¿Te interesa asistir? */
.t-si      { background: var(--ok-bg);     color: var(--ok-t); }
.t-talvez  { background: var(--warn-bg);   color: var(--warn-t); }
.t-no      { background: var(--neutro-bg); color: var(--neutro-t); }
/* Postulación de speaker */
.t-pendiente { background: var(--warn-bg); color: var(--warn-t); }
.t-aceptada  { background: var(--info-bg); color: var(--info-t); }
.t-agendada  { background: var(--ok-bg);   color: var(--ok-t); }
.t-rechazada { background: var(--neutro-bg); color: var(--neutro-t); }
/* Asistencia */
.t-va       { background: var(--info-bg); color: var(--info-t); }
.t-llego    { background: var(--ok-bg);   color: var(--ok-t); }
.t-nollego  { background: var(--bad-bg);  color: var(--bad-t); }
/* Evento */
.t-proximo  { background: var(--info-bg); color: var(--info-t); }
.t-pasado   { background: var(--neutro-bg); color: var(--neutro-t); }
/* Industria y tema: texto gris con borde, sin color (las listas son de Eduardo) */
.t-industria, .t-tema { background: var(--sup); color: var(--texto2); border-color: var(--borde); }
.t-miembro  { background: var(--marca); color: #fff; }
.t-baja     { background: var(--bad-bg); color: var(--bad-t); }

/* Chips seleccionables (temas que me interesan, puedo ayudar con) · 34 px */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: var(--alto-chip); padding: 0 14px;
  border: 1px solid var(--borde); border-radius: 999px; background: var(--sup); color: var(--texto2);
  font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 2px rgba(17,17,17,.04); transition: .12s;
}
.chip:hover { border-color: var(--texto3); }
.chip.activo { background: var(--marca); border-color: var(--marca); color: #fff; }
.chip.activo::before { content: "✓"; font-size: 12px; }

/* ============================================================
   INICIO DE ROL · indicadores y "Para hoy"
   ============================================================ */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.kpi {
  height: var(--alto-kpi); background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r2);
  padding: 11px 14px 10px; box-shadow: var(--sombra); display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
}
.kpi b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.6px; color: var(--marca); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b small { font-size: 14px; color: var(--texto3); font-weight: 600; letter-spacing: 0; }
.kpi .q { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .p { font-size: 11.5px; color: var(--texto3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.urg b { color: var(--bad-t); }
.kpi.txt b { font-size: 17px; line-height: 1.25; letter-spacing: -.2px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.hoy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hoy {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left;
  height: var(--alto-kpi); border: 1px solid var(--borde2); background: var(--sup); border-radius: var(--r);
  padding: 11px 36px 10px 14px; box-shadow: var(--sombra); transition: .12s; width: 100%; min-width: 0;
}
.hoy:hover { border-color: var(--marca); }
.hoy b { font-size: 24px; line-height: 1.05; color: var(--marca); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.hoy b small { font-size: 14px; color: var(--texto3); font-weight: 600; letter-spacing: 0; }
.hoy .q { font-weight: 700; font-size: 12.5px; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hoy .p { font-size: 11.5px; color: var(--texto3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hoy .fl { position: absolute; right: 14px; top: 12px; color: var(--texto3); font-size: 16px; }
.hoy.urg { border-color: var(--bad-borde); background: linear-gradient(180deg, #FFF5F3, #fff); }
.hoy.urg b { color: var(--bad-t); }
.hoy.cero { opacity: .55; box-shadow: none; }

/* ============================================================
   FILTROS Y BUSCADOR · rejilla fija, nada que agrande el encabezado
   ============================================================ */
.filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.filtro label.f { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto3); margin: 0 0 5px; white-space: nowrap; }
.filtro select, .filtro input {
  width: 100%; height: var(--alto-campo); padding: 0 12px; background: var(--sup);
  border: 1px solid var(--borde); border-radius: var(--r2); box-shadow: 0 1px 2px rgba(17,17,17,.04);
}
.buscar {
  display: flex; align-items: center; gap: 9px; height: var(--alto-campo); padding: 0 14px;
  background: var(--sup); border: 1px solid var(--borde); border-radius: 999px; box-shadow: var(--sombra);
  color: var(--texto3); width: 100%;
}
.buscar input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--texto); }
.buscar input::placeholder { color: var(--texto3); }
.buscar.grande { height: 48px; padding: 0 18px; font-size: 15px; }
.filtros.dos { grid-template-columns: 1fr; margin-bottom: 10px; align-items: center; }
@media (min-width: 701px) { .filtros.dos { grid-template-columns: 1fr auto; } }

/* ============================================================
   FORMULARIO (la encuesta y el perfil) · campos 38 px
   ============================================================ */
.campo { margin-bottom: 16px; }
.campo:last-child { margin-bottom: 0; }
.campo label.f { display: block; font-size: 13px; font-weight: 700; color: var(--texto); margin: 0 0 6px; }
.campo label.f small { font-weight: 400; color: var(--texto3); margin-left: 6px; }
.campo .ayuda { font-size: 12px; color: var(--texto3); margin: 5px 0 0; }
.campo input, .campo select, .campo textarea {
  width: 100%; height: var(--alto-campo); padding: 0 12px;
  border: 1px solid var(--borde); border-radius: var(--r2); background: var(--sup);
}
.campo textarea { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--marca); outline-offset: -1px; }
.campo input.error, .campo select.error { border-color: var(--bad); }
.campo .msg-error { font-size: 12px; color: var(--bad-t); margin-top: 5px; font-weight: 600; }
.dos-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.segmentado button {
  height: var(--alto-boton); border: 1px solid var(--borde); border-radius: var(--r2); background: var(--sup);
  font-weight: 700; color: var(--texto2); box-shadow: 0 1px 2px rgba(17,17,17,.04); font-size: 13.5px;
}
.segmentado button.activo { background: var(--marca); border-color: var(--marca); color: #fff; }

.rejilla-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcion {
  min-height: 48px; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  background: var(--sup); border: 1px solid var(--borde); border-radius: var(--r2); text-align: left; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(17,17,17,.04);
}
.opcion .pista { font-weight: 400; font-size: 11.5px; }
.opcion.activo { border-color: var(--marca); background: var(--marca-suave); color: var(--marca); }

.casilla { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--texto2); cursor: pointer; }
.casilla input { width: 18px; height: 18px; accent-color: var(--marca); margin: 2px 0 0; flex: none; }
.casilla a { text-decoration: underline; }

/* Interruptor (qué contacto muestro) */
.fila-opcion { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--alto-fila); border-bottom: 1px solid var(--borde2); }
.fila-opcion:last-child { border-bottom: 0; }
.fila-opcion .q { font-weight: 600; }
.fila-opcion .p { font-size: 12px; color: var(--texto3); display: block; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--borde); border: 0; flex: none; transition: .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .15s; }
.switch.on { background: var(--ok); }
.switch.on::after { left: 21px; }

/* Avance de la encuesta */
.avance { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 12px; color: var(--texto3); font-weight: 600; white-space: nowrap; }
.avance .pista-barra { flex: 1; height: 4px; border-radius: 2px; background: var(--sup3); overflow: hidden; }
.avance .pista-barra i { display: block; height: 100%; background: var(--marca); border-radius: 2px; }

/* ============================================================
   PÁGINA PÚBLICA (landing con video) · tono del one page
   ============================================================ */
.portada { padding: 36px 0 10px; }
.portada h1 { font-size: 34px; line-height: 1.1; letter-spacing: -1px; font-weight: 800; color: var(--marca); margin: 0 0 14px; }
.portada h1::after { content: ""; display: block; width: 56px; height: 3px; background: var(--marca); margin-top: 16px; }
.portada p { font-size: 16px; color: var(--texto2); margin: 0 0 20px; line-height: 1.5; }
.sobre { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--texto3); font-weight: 700; margin-bottom: 12px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); background: linear-gradient(135deg, #2A2A2A, #111); overflow: hidden; box-shadow: var(--sombra-alta); display: grid; place-items: center; color: #fff; margin-bottom: 18px; }
.video .play { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--marca); display: grid; place-items: center; font-size: 24px; border: 0; box-shadow: 0 6px 20px rgba(0,0,0,.3); padding-left: 4px; }
.video .quien { position: absolute; left: 16px; bottom: 14px; font-size: 12.5px; color: rgba(255,255,255,.85); font-weight: 600; }
.noche { display: grid; gap: 0; border-top: 1px solid var(--borde); }
.noche > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde2); font-size: 13.5px; }
.noche .cuando { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--texto3); padding-top: 2px; }
.noche b { display: block; }
.noche span { color: var(--texto2); }
.franja { background: var(--marca); color: #fff; border-radius: var(--r); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.franja b { font-size: 16px; }
.franja .btn { background: #fff; color: var(--marca); border-color: #fff; }
.pie-pub { margin-top: 26px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--texto3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   DIRECTORIO · tarjeta de miembro (UN solo formato)
   ============================================================ */
.miembros { display: grid; grid-template-columns: 1fr; gap: 10px; }
.miembro {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: start;
  height: 124px; padding: 14px 16px; background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r);
  box-shadow: var(--sombra); text-align: left; color: var(--texto); transition: .12s; min-width: 0; overflow: hidden;
}
.miembro:hover { border-color: var(--marca); }
.miembro .ava { width: 48px; height: 48px; font-size: 15px; }
.miembro .datos { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.miembro .nombre { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--marca); }
.miembro .oficio { font-size: 13px; color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miembro .ayudo { font-size: 12.5px; color: var(--texto3); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.miembro .ayudo b { color: var(--texto2); font-weight: 600; }
.miembro .lado { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Perfil completo (pantalla propia) */
.perfil-cab { display: grid; grid-template-columns: 88px 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.perfil-cab h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; color: var(--marca); }
.perfil-cab .oficio { color: var(--texto2); font-size: 14px; }
.perfil-cab .desde { font-size: 12px; color: var(--texto3); margin-top: 4px; }
.dato { padding: 10px 0; border-bottom: 1px solid var(--borde2); }
.dato:last-child { border-bottom: 0; }
.dato .q { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--texto3); font-weight: 700; display: block; margin-bottom: 3px; }
.dato .v { font-size: 14px; }

/* ============================================================
   ASISTENCIA (la noche del evento) · buscar nombre y palomear
   ============================================================ */
.lista-asistencia { background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r); box-shadow: var(--sombra); overflow: hidden; }
.asis { display: grid; grid-template-columns: 40px 1fr auto 48px; gap: 12px; align-items: center; height: 56px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--borde2); }
.asis:last-child { border-bottom: 0; }
.asis .nombre { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asis .nombre small { display: block; font-weight: 400; color: var(--texto3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asis.llego { background: var(--ok-bg); }
.palomita { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--borde); background: var(--sup); font-size: 20px; color: transparent; display: grid; place-items: center; transition: .12s; padding: 0; }
.palomita.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.resumen-asis { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--texto2); margin-bottom: 12px; flex-wrap: wrap; }
.resumen-asis b { font-size: 18px; color: var(--marca); font-variant-numeric: tabular-nums; }

/* ============================================================
   TABLA (computadora) · regla Fligo
   Orden: 1) nombre legible en negritas, 2) descripción, 3) estado, 4) números y fechas, 5) Acción.
   Texto y etiquetas a la izquierda; número, fecha e importe a la derecha (.num); nada centrado.
   Acción (.accion) SIEMPRE última, pegada a la derecha. Etiqueta o acción: ancho fijo = pieza más ancha + 36 px, nunca "…".
   Fila 48 y encabezado 38 en computadora (56 / 42 en pantallas chicas). Una línea por celda.
   ============================================================ */
.tabla-wrap { background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r); overflow: hidden; box-shadow: var(--sombra); }
.tabla { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tabla th, .tabla td {
  height: var(--alto-fila); padding: 0 14px; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--borde2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tabla th { height: var(--alto-enc); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto3); background: #FBFAF8; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla .etiq, .tabla .accion { text-overflow: clip; }
.tabla .accion { text-align: right; }
.tabla .accion .btn { vertical-align: middle; }
.tabla tbody tr:hover td { background: #F5F3EE; cursor: pointer; }
.tabla td b { color: var(--marca); }
.tabla td .ava { display: inline-grid; vertical-align: middle; margin-right: 8px; }
.tabla tfoot td { font-weight: 700; background: #FBFAF8; }

/* ============================================================
   GRÁFICA DE BARRAS (precio y temas) · un color, texto nunca del color de la serie
   ============================================================ */
.graficas { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
.grafica { background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r); padding: 14px 16px 12px; box-shadow: var(--sombra); min-width: 0; }
.g-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.g-cab b { display: block; font-size: 13.5px; }
.g-cab .pista { font-size: 12px; }
.barras { display: grid; gap: 6px; }
.barra { display: grid; grid-template-columns: 120px 1fr 52px; align-items: center; gap: 10px; height: 26px; font-size: 12.5px; border-radius: 6px; }
.barra:hover { background: var(--sup2); }
.b-nombre { color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-pista { position: relative; height: 14px; background: var(--sup2); border-radius: 0 4px 4px 0; }
.b-pista i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 0 4px 4px 0; display: block; background: var(--marca); }
.barra.gana .b-pista i { background: var(--ok); }
.b-valor { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--texto); }

/* ============================================================
   AVISOS, VACÍO, TOAST
   ============================================================ */
.aviso-l { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r2); background: var(--info-bg); color: var(--info-t); font-weight: 600; font-size: 13.5px; margin-bottom: 14px; border: 1px solid var(--info-borde); }
.aviso-l.ok { background: var(--ok-bg); color: var(--ok-t); border-color: var(--ok-borde); }
.aviso-l.mal { background: var(--bad-bg); color: var(--bad-t); border-color: var(--bad-borde); }
.aviso-l.atencion { background: var(--warn-bg); color: var(--warn-t); border-color: var(--warn-borde); }
.vacio { text-align: center; padding: 36px 16px; color: var(--texto3); font-size: 13.5px; }
.vacio b { display: block; color: var(--texto2); font-size: 15px; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--alto-barra-inf) + 14px); transform: translateX(-50%); z-index: 70; background: var(--marca); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--sombra-alta); white-space: nowrap; }

/* Confirmación (lo que no tiene regreso) */
.velo { position: fixed; inset: 0; z-index: 60; background: rgba(17,17,17,.45); display: grid; place-items: end center; padding: 16px; }
.dialogo { width: 100%; max-width: 420px; background: var(--sup); border-radius: var(--r); padding: 20px; box-shadow: var(--sombra-alta); }
.dialogo h3 { margin: 0 0 6px; font-size: 16px; }
.dialogo p { margin: 0 0 16px; color: var(--texto2); font-size: 13.5px; }
.dialogo .acciones { justify-content: flex-end; }

/* ============================================================
   CELULAR · barra fija abajo (4 + Más)
   ============================================================ */
.barra-inf {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--alto-barra-inf) + env(safe-area-inset-bottom)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--marca); box-shadow: 0 -4px 16px rgba(17,17,17,.18);
}
.barra-inf button, .barra-inf a {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
  border: 0; background: none; color: rgba(255,255,255,.7); font-size: 11px; font-weight: 700; position: relative;
  padding: 0 2px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.barra-inf .ico { width: 40px; height: 30px; display: grid; place-items: center; font-size: 18px; border-radius: 999px; }
.barra-inf .activo { color: #fff; }
.barra-inf .activo .ico { background: #fff; color: var(--marca); }
.barra-inf .punto { position: absolute; top: 2px; right: calc(50% - 22px); width: 7px; height: 7px; border-radius: 50%; background: #FF8A73; }
.con-barra-inf { padding-bottom: calc(var(--alto-barra-inf) + 16px + env(safe-area-inset-bottom)); }


/* ============================================================
   FICHA · la tabla en celular y tablet (≤1024): mismas reglas, una ficha por fila
   título en negritas · descripción · etiquetas · números a la derecha · Acción al final
   ============================================================ */
.fichas { display: grid; gap: 8px; }
.ficha {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; width: 100%;
  background: var(--sup); border: 1px solid var(--borde2); border-radius: var(--r); box-shadow: var(--sombra);
  text-align: left; color: var(--texto); min-width: 0;
}
.ficha .f-t { font-weight: 700; color: var(--marca); font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ficha .f-s { font-size: 12.5px; color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha .f-n { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font-size: 12.5px; color: var(--texto3); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.35; }
.ficha .f-n b { display: block; color: var(--texto); font-size: 13.5px; }
.ficha .f-n em { display: block; font-style: normal; font-size: 10.5px; color: var(--texto3); margin: -2px 0 4px; }
.ficha .f-e { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ficha .f-a { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--borde2); }
.ficha.apagada { opacity: .6; }

/* Siguiente paso (tablero) */
.siguiente { display: block; padding: 10px 14px; border-radius: var(--r2); background: var(--marca-suave); color: var(--texto); font-size: 13.5px; margin: 12px 0 0; }
.siguiente b { color: var(--marca); }

/* Lista de nombres (quiénes van, quiénes fueron) */
.nombres { display: flex; flex-wrap: wrap; gap: 6px; }
.nombres a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--borde); background: var(--sup); font-size: 12.5px; font-weight: 600; color: var(--texto); }
.nombres a:hover { border-color: var(--marca); }
.nombres .ava { width: 22px; height: 22px; font-size: 9.5px; }

/* Lista simple de opciones (pantalla "Más", textos) */
.lista-simple { display: grid; }
.lista-simple a, .lista-simple button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--alto-fila); padding: 0 4px; border: 0; border-bottom: 1px solid var(--borde2); background: none; text-align: left; font-weight: 600; color: var(--texto); font-size: 14px; width: 100%; }
.lista-simple a:last-child, .lista-simple button:last-child { border-bottom: 0; }
.lista-simple small { display: block; font-weight: 400; color: var(--texto3); font-size: 12px; }
.lista-simple .fl { color: var(--texto3); }

/* ============================================================
   TAMAÑOS · celular ≤700 · tablet 701–1024 · laptop 1025–1280 · escritorio 1281–1600 · monitor ≥1601
   ============================================================ */
.solo-escritorio { display: block; }
.solo-celular { display: none; }

@media (max-width: 1024px) {
  :root { --alto-fila: 56px; --alto-enc: 42px; --alto-barra-sup: 52px; }
  .barra-sup-in { padding: 0 16px; }
  .menu, .barra-sup .usuario span:not(.ava) { display: none; }
  .barra-sup .usuario { margin-left: auto; }
  .contenido { padding: 16px 16px 24px; }
  .contenido.con-barra-inf { padding-bottom: calc(var(--alto-barra-inf) + 16px + env(safe-area-inset-bottom)); }
  .titulo { height: auto; min-height: 44px; margin-bottom: 8px; }
  .titulo h1 { font-size: 21px; }
  .titulo .pista { flex-basis: 100%; }
  .submenu { gap: 16px; margin-bottom: 14px; }
  .submenu a { font-size: 13px; }
  .solo-escritorio { display: none; }
  .solo-celular { display: block; }
  .panel { padding: 14px 16px; }
  .portada { padding: 22px 0 6px; }
  .portada h1 { font-size: 28px; }
  .miembro { grid-template-columns: 44px 1fr; height: auto; min-height: 112px; }
  .miembro .ava { width: 44px; height: 44px; font-size: 14px; }
  .miembro .lado { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .perfil-cab { grid-template-columns: 64px 1fr; gap: 14px; }
  .perfil-cab .ava.xg { width: 64px; height: 64px; font-size: 22px; }
  .barra { grid-template-columns: 96px 1fr 44px; }
  .dos-campos.apilar { grid-template-columns: 1fr; }
  .velo { place-items: end center; }
}
@media (max-width: 700px) {
  .filtros.apilar { grid-template-columns: 1fr; }
  .kpis, .hoy-grid { gap: 8px; }
  /* celular: número y pregunta en dos renglones; la pista se omite (menos es más) */
  .hoy { padding-right: 30px; }
  .hoy .q { white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .hoy .p { display: none; }
  .hoy .fl { right: 10px; }
  .kpi.txt b { font-size: 16px; line-height: 1.2; }
  .kpi.txt .p { display: none; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  .miembros { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1025px) {
  .barra-inf { display: none; }
  .con-barra-inf { padding-bottom: 40px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .hoy-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .filtros { grid-template-columns: repeat(4, 1fr); }
  .graficas { grid-template-columns: 1fr 1fr; }
  .miembros { grid-template-columns: repeat(2, 1fr); }
  .rejilla-opciones { grid-template-columns: repeat(4, 1fr); }
  .rejilla-opciones.dos { grid-template-columns: 1fr 1fr; }
  .velo { place-items: center; }
}
@media (min-width: 1281px) {
  .miembros { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1601px) {
  :root { --ancho-max: 1600px; }
  .miembros { grid-template-columns: repeat(4, 1fr); }
  .kpis { grid-template-columns: repeat(6, 1fr); }
}
@media print {
  .barra-sup, .barra-inf, .toast { display: none; }
  body { background: #fff; }
}
