/* ==========================================================================
   Vista del cliente (bloque 6 del rediseño). Pensada para el móvil: cabecera con
   el negocio, bloque de tarea, opciones en rejilla de 2 columnas y barra inferior
   fija. En el escritorio, la misma columna algo más ancha (4 opciones por fila).
   Tokens y componentes comunes (chip .estado, .banner, .punto, .av, .seg,
   .vacio) en base.css. Todo con el prefijo .vc- para no pisar el panel.
   ========================================================================== */

.vc {
  --vc-ancho: 36rem;
  --vc-toque: 44px;
  --vc-radio: 12px;
  --vc-barra: 64px;
  min-height: 100vh;
  background: var(--superficie);
  padding-bottom: calc(var(--vc-barra) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 60rem) {
  .vc { --vc-ancho: 60rem; background: var(--fondo); }
}

.vc h1, .vc h2 { letter-spacing: -0.01em; }
/* `hidden` gana siempre (los botones llevan display propio). */
.vc [hidden] { display: none !important; }
.vc p { margin: 0; }
.vc .pie-legal { padding: 24px 16px 16px; font-size: 12px; color: var(--texto-3); }

/* ---------- Cabecera: el negocio, no el @usuario ---------- */
/* No es fija: en el móvil la pantalla es para las opciones (la barra de abajo sí lo es). */
.vc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px max(16px, calc((100% - var(--vc-ancho)) / 2 + 16px)) 10px;
  background: var(--superficie);
  border-bottom: 1px solid var(--borde);
}
.vc-av { width: 36px; height: 36px; font-size: 15px; }
.vc-top-textos { min-width: 0; }
.vc-negocio { font-weight: 650; font-size: 16px; line-height: 1.2; }
.vc-hola { font-size: 12.5px; color: var(--texto-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vc-main {
  max-width: var(--vc-ancho);
  margin: 0 auto;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 60rem) {
  .vc-main { padding-top: 24px; }
}

.vc-mensaje { font-size: 14px; }
.vc-cab-pagina h1 { margin: 0; font-size: 22px; font-weight: 650; }
.vc-sub { color: var(--texto-2); font-size: 14px; margin-top: 4px; }
.vc-volver { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.vc-volver a { color: var(--acento-texto); text-decoration: none; font-weight: 500; }
.vc-paso { display: inline-flex; align-items: center; gap: 4px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.vc-paso a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 99px; font-size: 20px; }
.vc-paso a:hover { background: var(--superficie-2); }

/* ---------- Botones grandes, para el dedo ---------- */
.vc-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--vc-toque);
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--borde-fuerte);
  border-radius: 10px;
  background: var(--superficie);
  color: var(--texto);
  font: 600 15px/1.2 var(--f);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.vc-boton:hover { background: var(--superficie-2); }
.vc-boton.primario { background: var(--acento); border-color: var(--acento); color: #fff; }
.vc-boton.primario:hover { background: var(--acento-hover); }
.vc-boton.suave { background: transparent; border-color: #d8cdf7; color: #5b35a8; }
.vc-boton.suave:hover { background: #ede7fc; }
.vc-boton.elegida {
  background: color-mix(in srgb, var(--estado-elegida) 11%, #fff);
  border-color: color-mix(in srgb, var(--estado-elegida) 30%, #fff);
  color: #5b35a8;
  cursor: default;
}
.vc-boton:disabled:not(.elegida) { background: var(--superficie-2); color: var(--texto-3); border-color: var(--borde); cursor: default; }
.vc-boton.cuadrado { width: var(--vc-toque); padding: 0; font-size: 20px; }
.vc-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.vc-botones .vc-boton { width: auto; flex: 1 1 10rem; }

/* ---------- Bloque de tarea ---------- */
.vc-tarea {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--vc-radio);
  background: #f5f3ff;
  border: 1px solid #e4dcfb;
}
.vc-tarea.hecha { background: var(--ok-suave); border-color: var(--ok-borde); }
.vc-tarea-clave { font-size: 12px; font-weight: 650; color: var(--estado-elegida); text-transform: uppercase; letter-spacing: 0.06em; }
.vc-tarea.hecha .vc-tarea-clave { color: var(--ok); }
.vc-tarea h1 { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.25; }
.vc-cuenta { display: flex; gap: 7px; align-items: center; font-size: 14px; color: var(--texto-2); }
.vc-cuenta b { color: var(--texto); font-variant-numeric: tabular-nums; }
.vc-aviso-hora {
  background: var(--superficie);
  border: 1px solid #e4dcfb;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
}
.vc-tarea.hecha .vc-aviso-hora { border-color: var(--ok-borde); }
.vc-aviso-hora b { font-variant-numeric: tabular-nums; }
.vc-aviso-hora s { color: var(--texto-3); margin-left: 2px; }
.vc-aviso-hora.cambios { border-left: 4px solid var(--estado-cambios); }
.vc-tarea .vc-boton { margin-top: 2px; }

/* ---------- Opciones: rejilla de 2 columnas (4 en el escritorio) ---------- */
.vc-opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 60rem) {
  .vc-opciones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
.vc-op {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--borde);
  border-radius: var(--vc-radio);
  overflow: hidden;
  background: var(--superficie);
}
.vc-op.elegida { border-color: var(--estado-elegida); box-shadow: 0 0 0 1px var(--estado-elegida); }
.vc-op.caducada { opacity: 0.7; }
.vc-op-foto { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--superficie-2); overflow: hidden; }
.vc-op-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vc-op-foto:focus-visible { outline: 3px solid var(--acento); outline-offset: -3px; }
.vc-op-cuantas {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font: 600 11px/1.5 var(--f);
  font-variant-numeric: tabular-nums;
}
.vc-op-marca {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--estado-elegida);
  color: #fff;
  font: 600 11.5px/1.5 var(--f);
}
.vc-op-texto {
  padding: 8px 10px 0;
  font-size: 13px;
  color: var(--texto-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.vc-op-nota { padding: 4px 10px 0; font-size: 12px; color: var(--texto-3); }
.vc-op-nota.aviso { color: var(--atencion); font-weight: 500; }
.vc-op-accion { margin-top: auto; padding: 8px 10px 10px; }
.vc-op-accion form { margin: 0; }
.vc-op-accion .vc-boton { min-height: 40px; font-size: 14px; }
.vc-pista { font-size: 13px; color: var(--texto-3); text-align: center; }
.vc-enlace-lote .vc-boton { font-size: 14px; }
.vc-vacio { border: 1px dashed var(--borde-fuerte); border-radius: var(--vc-radio); }

/* ---------- «Ninguna me convence»: se abre al tocar el enlace (:target, sin JS) ---------- */
.vc-pedir { display: none; }
.vc-pedir:target {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--borde);
  border-left: 4px solid var(--estado-cambios);
  border-radius: var(--vc-radio);
  background: var(--superficie);
  scroll-margin-top: 80px;
}
.vc-pedir h2 { margin: 0; font-size: 16px; font-weight: 650; }
.vc-pedir form { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Formularios ---------- */
.vc-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.vc-campo { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #3f3f46; }
.vc-campo input, .vc-campo textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--borde-fuerte);
  border-radius: 10px;
  background: var(--superficie);
  color: var(--texto);
  /* 16 px: con menos, el iPhone amplía la página al tocar el campo. */
  font: 400 16px/1.45 var(--f);
}
.vc-campo input { min-height: var(--vc-toque); }
.vc-campo input:focus, .vc-campo textarea:focus { outline: 0; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-suave); }
.vc-ayuda { font-size: 12.5px; font-weight: 400; color: var(--texto-3); }

/* ---------- Listas: «Después» y «Publicadas» ---------- */
.vc-titulo-seccion { margin: 0 0 8px; font-size: 12.5px; font-weight: 650; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.06em; }
.vc-lista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--borde); border-radius: var(--vc-radio); background: var(--superficie); }
.vc-lista > li + li { border-top: 1px solid var(--borde); }
.vc-fila { display: flex; align-items: center; gap: 12px; padding: 12px; color: inherit; text-decoration: none; min-height: 56px; }
a.vc-fila:hover { background: var(--superficie-2); }
.vc-fila .estado { margin-left: auto; flex: none; }
.vc-fila-textos { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.vc-fila-textos b { display: block; font-variant-numeric: tabular-nums; }
.vc-fila-textos b::first-letter { text-transform: uppercase; }
.vc-fila-detalle { font-size: 13px; color: var(--texto-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-fila-detalle.dos-lineas { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vc-fila-pie { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.vc-fila-pie .estado { margin-left: 0; }
.vc-fila-pie a { color: var(--acento-texto); font-weight: 500; text-decoration: none; }
.vc-mini { width: 36px; height: 45px; flex: none; border-radius: 6px; object-fit: cover; background: var(--superficie-2); }
.vc-mini.grande { width: 64px; height: 80px; align-self: flex-start; }
.vc-mini.vacia { background: repeating-linear-gradient(135deg, #f1f1f3 0 6px, #e9e9ec 6px 12px); border: 1px dashed var(--borde-fuerte); }
.vc-antes { font-size: 12.5px; font-weight: 500; color: var(--atencion); }
.vc-publicada .vc-fila { align-items: flex-start; }
.vc-cifras { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 12px 12px 88px; font-size: 13px; color: var(--texto-2); }
.vc-cifras strong { color: var(--texto); font-variant-numeric: tabular-nums; }

/* ---------- Una opción entera ---------- */
.vc-grande { display: flex; flex-direction: column; gap: 12px; max-width: 34rem; width: 100%; margin: 0 auto; }
.vc-grande img.vc-grande-foto, .vc-grande .carrusel { width: 100%; border-radius: var(--vc-radio); overflow: hidden; }
.vc-grande img.vc-grande-foto { display: block; height: auto; }
.vc-grande-texto { white-space: pre-line; font-size: 15px; overflow-wrap: anywhere; }
.vc-grande-acciones { display: flex; flex-direction: column; gap: 10px; }
.vc-grande-acciones form { margin: 0; }
.vc-con-cambios > summary { list-style: none; }
.vc-con-cambios > summary::-webkit-details-marker { display: none; }
.vc-con-cambios[open] > summary { margin-bottom: 12px; }
.vc-con-cambios .vc-form { padding: 14px; border: 1px solid var(--borde); border-radius: var(--vc-radio); background: var(--fondo); }

/* ---------- Elegir las próximas: guardado al tocar ---------- */
.vc-lote { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.vc-hueco {
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--borde);
  border-radius: var(--vc-radio);
  background: var(--superficie);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  scroll-margin-top: 80px;
}
.vc-hueco:target { border-color: var(--estado-elegida); box-shadow: 0 0 0 1px var(--estado-elegida); }
.vc-hueco legend { float: left; width: 100%; padding: 0; font-size: 16px; font-weight: 650; }
.vc-hueco legend + * { clear: both; }
.vc-hueco-sub { font-size: 13px; color: var(--texto-3); }
.vc-guardado { min-height: 18px; font-size: 13px; font-weight: 600; color: var(--texto-3); }
.vc-guardado:empty { min-height: 0; }
.vc-guardado.ok { color: var(--ok); }
.vc-guardado.error { color: var(--peligro); }
.vc-lote-opciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
@media (min-width: 60rem) {
  .vc-lote-opciones { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.vc-lote-op {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-weight: 400;
  cursor: pointer;
}
.vc-lote-op:has(input:checked) { border-color: var(--estado-elegida); background: color-mix(in srgb, var(--estado-elegida) 8%, #fff); }
.vc-lote-op:has(input:focus-visible) { outline: 2px solid var(--acento); outline-offset: 2px; }
.vc-lote-op.caducada { opacity: 0.55; cursor: default; }
/* La casilla redonda, encima de la foto (sigue siendo un radio de verdad). */
.vc-lote-op input {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--estado-elegida);
}
.vc-lote-foto { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 7px; overflow: hidden; background: var(--superficie-2); }
.vc-lote-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vc-lote-texto {
  font-size: 12px;
  line-height: 1.35;
  color: var(--texto-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.vc-lote-texto .aviso { color: var(--atencion); font-weight: 500; }
.vc-guardar-todas { align-self: stretch; }

/* ---------- Calendario del cliente ---------- */
.vc-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; flex-wrap: wrap; }
.vc-cal-pasos { display: flex; gap: 6px; }
.vc-cal-pasos .vc-boton { width: auto; min-height: 38px; font-size: 14px; }
.vc-cal-pasos .vc-boton.cuadrado { width: 38px; }
.vc-seg a { padding: 7px 14px; font-size: 14px; }
.vc-cal-titulo { margin: 0; font-size: 17px; font-weight: 650; }
.vc .calendario { border-radius: var(--vc-radio); background: var(--superficie); }
.vc .cal-casilla { border-radius: 8px; }
.vc .cal-estado { font-size: 12px; }
.vc .cal-dia.finde { background: transparent; }
.vc .cal-dia.hoy { box-shadow: inset 0 0 0 2px var(--acento); }
.vc-hoy { font-size: 11px; font-weight: 600; color: var(--acento); text-transform: uppercase; letter-spacing: 0.04em; }
.vc .cal-casilla .vc-antes { font-size: 11.5px; }
.vc .cal-casilla.te-toca { background: color-mix(in srgb, var(--estado-elegida) 9%, #fff); border-left-color: var(--estado-elegida); }
.vc .cal-casilla.te-toca .cal-estado { color: var(--estado-elegida); }
.vc-leyenda { margin: 0; font-size: 13px; }
.vc .cal-punto.te-toca { background: #fff; border: 2px solid var(--estado-elegida); }
@media (max-width: 40rem) {
  .vc .cal-mes .cal-casilla.te-toca { background: #fff; outline: 2px solid var(--estado-elegida); outline-offset: -2px; }
}

/* «Te toca elegir»: violeta como «Elegida», sin punto (la llamada a elegir). */
.estado.te-toca { --c: var(--estado-elegida); background: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--estado-elegida) 45%, #fff); }
.estado.te-toca::before { display: none; }

/* ---------- Mi perfil ---------- */
.vc .perfil-cabecera { margin: 0; }
.vc .perfil-cabecera .avatar { background: var(--texto); }
.vc .cuadricula { margin: 0 -16px; }
@media (min-width: 34rem) { .vc .cuadricula { margin-inline: 0; } }
.vc .cuadricula-titulo { margin: 8px 0 8px; font-size: 12.5px; font-weight: 650; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.06em; }
.celda-nota { flex-basis: 100%; font-size: 11px; font-weight: 500; color: var(--atencion); }
.vc-cuenta-sesion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--borde);
  border-radius: var(--vc-radio);
  background: var(--superficie);
  font-size: 14px;
  color: var(--texto-2);
}
.vc-cuenta-sesion form { margin: 0; }
.vc-cuenta-sesion .vc-boton { width: auto; }

/* ---------- Barra inferior fija ---------- */
.vc-barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px max(8px, calc((100% - var(--vc-ancho)) / 2)) calc(4px + env(safe-area-inset-bottom, 0px));
  background: rgb(255 255 255 / 0.96);
  border-top: 1px solid var(--borde);
  backdrop-filter: blur(8px);
}
.vc-barra a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 56px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--texto-3);
  text-decoration: none;
}
.vc-barra a[aria-current="page"] { color: var(--acento); }
/* En el escritorio, los cuatro botones juntos en el centro (con 60rem de ancho
   quedaban repartidos por toda la pantalla, lejos unos de otros). */
@media (min-width: 60rem) {
  .vc-barra { grid-template-columns: repeat(4, 7.5rem); justify-content: center; }
}
.vc-barra svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.vc-insignia {
  position: absolute;
  top: 3px;
  left: calc(50% + 6px);
  min-width: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--peligro);
  color: #fff;
  font: 600 11px/18px var(--f);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Acceso: entrar, revisa tu correo, confirmar el enlace ---------- */
.vc-acceso {
  min-height: 80vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  padding: 32px 16px 16px;
}
.vc-marca { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 650; }
.vc-marca .iso { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.vc-marca .muted { font-weight: 400; }
.vc-acceso-caja {
  width: min(26rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
  border: 1px solid var(--borde);
  border-radius: var(--vc-radio, 12px);
  background: var(--superficie);
  box-shadow: var(--sombra);
}
.vc-acceso-caja { --vc-toque: 44px; }
.vc-acceso-caja h1 { margin: 0; font-size: 22px; font-weight: 650; }
.vc-acceso-caja p { margin: 0; }
.vc-acceso-caja a:not(.vc-boton) { color: var(--acento-texto); }
.vc-email { overflow-wrap: anywhere; }
.vc-reenviar { flex-direction: row; align-items: center; flex-wrap: wrap; }
.vc-reenviar .vc-boton { width: auto; }

/* En el escritorio, los botones sueltos no ocupan todo el ancho. */
@media (min-width: 60rem) {
  .vc-tarea .vc-boton, .vc-enlace-lote .vc-boton, .vc-grande-acciones .vc-boton { width: auto; align-self: flex-start; min-width: 14rem; }
  .vc-enlace-lote { text-align: center; }
}

/* Conectar Instagram desde el enlace: el negocio arriba, como en su cabecera. */
.vc-conectar-negocio { display: flex; align-items: center; gap: 10px; }
.vc-conectar-lista { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; color: var(--texto-2); font-size: 14px; }
.vc-acceso-caja .aviso { color: var(--peligro); }
