/* =============================================================
   SOLO PROMOS - Panel del comercio y páginas de acceso
   ============================================================= */

/* ---------- Acceso (registro, ingreso, recuperar) ---------- */
body.acceso {
  min-height: 100vh;
  background: linear-gradient(160deg, #fff 0%, var(--azul-suave) 100%);
  padding: 24px 16px 48px;
}
.acceso-caja {
  max-width: 440px; margin: 0 auto; background: #fff;
  border-radius: var(--radio); box-shadow: var(--sombra); padding: 28px 22px;
}
.acceso-logo { display: block; margin: 0 auto 20px; max-width: 200px; }
.acceso-logo img { margin: 0 auto; }
.acceso-caja h1 { font-size: 1.5rem; }
.acceso-pie { margin-top: 20px; line-height: 2; }
.logo-texto { font-size: 2rem; font-weight: 900; color: var(--azul); text-align: center; }
.logo-texto span { color: var(--coral); }

.caja-fundador {
  background: var(--amarillo-suave); border: 2px solid var(--amarillo);
  border-radius: var(--radio-chico); padding: 12px 14px; margin: 16px 0;
}
.caja-fundador p { margin: 8px 0 0; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 18px; cursor: pointer; font-weight: 600; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--coral); flex-shrink: 0; }
.check.chico { font-size: .85rem; margin: 6px 0; }

.campo-pass { position: relative; }
.campo-pass input { padding-right: 64px; }
.ver-pass {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--azul); font-weight: 800; cursor: pointer; font-family: inherit;
}
.modo-prueba {
  margin-top: 10px; padding: 8px 12px; background: var(--amarillo-suave);
  border: 1px dashed var(--amarillo); border-radius: 8px; font-size: .85rem; color: var(--azul-oscuro);
}

/* ---------- Estructura del panel ---------- */
body.panel { padding-bottom: 90px; }
.panel-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; padding: 10px 16px; box-shadow: 0 2px 8px rgba(0, 46, 82, .06);
}
.panel-logo img { height: 42px; width: auto; }
.panel-top-der { display: flex; align-items: center; gap: 14px; min-width: 0; }
.panel-nombre { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
.panel-salir { font-size: .9rem; color: var(--texto-suave); font-weight: 700; }

.panel-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-around; background: #fff;
  border-top: 1px solid var(--borde); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.panel-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 2px; border-radius: 10px; color: var(--texto-suave);
  font-size: .72rem; font-weight: 800; text-decoration: none;
}
.panel-nav a.activo { color: var(--coral); background: var(--coral-suave); }
.nav-icono { font-size: 1.3rem; line-height: 1; }
.panel-nav a.nav-nueva .nav-icono {
  background: var(--coral); color: #fff; border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  margin-top: -18px; box-shadow: 0 4px 12px rgba(255, 77, 46, .4); font-size: 1.1rem;
}

.panel-main { max-width: 760px; margin: 0 auto; padding: 18px 14px; }
.panel-main h1 { font-size: 1.6rem; }

@media (min-width: 900px) {
  body.panel { padding-bottom: 0; padding-left: 220px; }
  .panel-nav {
    top: 0; bottom: 0; right: auto; width: 220px; flex-direction: column; justify-content: flex-start;
    border-top: 0; border-right: 1px solid var(--borde); padding: 80px 12px 20px; gap: 4px;
  }
  .panel-nav a { flex: none; flex-direction: row; gap: 10px; font-size: .95rem; padding: 10px 14px; }
  .panel-nav a.nav-nueva .nav-icono { margin-top: 0; width: 28px; height: 28px; font-size: .9rem; }
  .panel-top { position: fixed; left: 0; right: 0; z-index: 70; }
  .panel-main { padding-top: 84px; }
}

/* ---------- Bloques ---------- */
.bloque { padding: 18px; margin-bottom: 16px; }
.bloque h2 { font-size: 1.15rem; }
.bloque-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.progreso-texto { font-weight: 800; color: var(--coral); font-size: .9rem; white-space: nowrap; }
.barra { height: 10px; background: var(--azul-suave); border-radius: 999px; overflow: hidden; margin: 6px 0 10px; }
.barra div { height: 100%; background: linear-gradient(90deg, var(--coral), var(--amarillo)); border-radius: 999px; }
.checklist { list-style: none; padding: 0; margin: 8px 0 16px; }
.checklist li { padding: 4px 0; }
.checklist li.hecho { color: var(--texto-suave); text-decoration: line-through; }
.mt { margin-top: 14px; }
.chico { font-size: .85rem; }

.saludo { margin-bottom: 10px; }
.plan-caja {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--azul-suave); color: var(--azul); font-weight: 700;
  padding: 10px 14px; border-radius: var(--radio-chico); margin-bottom: 16px; font-size: .92rem;
}
.plan-caja.plan-fundador { background: var(--amarillo-suave); color: var(--azul-oscuro); border: 2px solid var(--amarillo); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 14px; text-align: center; }
.stat strong { display: block; font-size: 1.7rem; font-weight: 900; color: var(--coral); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--texto-suave); font-weight: 700; }

.vacio { text-align: center; padding: 20px 10px; }
.vacio-icono { font-size: 2.6rem; }

.fila-promo {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--borde); color: var(--texto); text-decoration: none !important;
}
.fila-foto {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  background: var(--azul-suave) center/cover no-repeat;
}
.fila-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fila-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-info span { font-size: .85rem; }

.estado {
  font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.estado-activa { background: #E3F6EC; color: var(--exito); }
.estado-programada { background: var(--azul-suave); color: var(--azul); }
.estado-pausada { background: #EEF0F3; color: var(--texto-suave); }
.estado-vencida { background: #FDE8E6; color: var(--error); }
.estado-oculta { background: var(--amarillo-suave); color: #8a6100; }

.link-publico { display: flex; gap: 8px; }
.link-publico input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--borde);
  border-radius: var(--radio-chico); font-family: inherit; font-size: .9rem; color: var(--azul); background: var(--fondo);
}

.aviso-verificar { line-height: 1.6; }
.form-linea { display: inline; }
.enlace-boton {
  background: none; border: 0; padding: 0; color: var(--coral); font-weight: 800;
  text-decoration: underline; cursor: pointer; font-family: inherit; font-size: inherit;
}

/* ---------- Formularios del panel ---------- */
.grilla-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 600px) { .grilla-2 { grid-template-columns: 1fr 1fr; } }

.campo-prefijo { display: flex; align-items: stretch; }
.campo-prefijo span {
  display: flex; align-items: center; padding: 0 10px; background: var(--azul-suave); color: var(--azul);
  border: 2px solid var(--borde); border-right: 0; border-radius: var(--radio-chico) 0 0 var(--radio-chico);
  font-size: .85rem; font-weight: 700; white-space: nowrap;
}
.campo-prefijo input { border-radius: 0 var(--radio-chico) var(--radio-chico) 0 !important; min-width: 0; }

.fotos-perfil { display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
@media (max-width: 520px) { .fotos-perfil { grid-template-columns: 1fr; } }

.subir-imagen {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--borde); border-radius: var(--radio); cursor: pointer;
  background: var(--fondo) center/cover no-repeat; color: var(--azul); font-weight: 800; overflow: hidden;
}
.subir-imagen input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.subir-imagen span { background: rgba(255, 255, 255, .88); padding: 6px 12px; border-radius: 999px; font-size: .85rem; }
.subir-logo { width: 140px; height: 140px; }
.subir-portada { width: 100%; height: 140px; }

.fotos-promo { display: flex; flex-wrap: wrap; gap: 10px; }
.subir-foto, .foto-existente, .foto-nueva { width: 104px; height: 104px; }
.foto-existente, .foto-nueva {
  position: relative; border-radius: var(--radio); background: var(--fondo) center/cover no-repeat; cursor: pointer; overflow: hidden;
}
.foto-existente input { display: none; }
.foto-existente .quitar, .foto-nueva .quitar {
  position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 46, 82, .75); color: #fff;
  font-size: .75rem; font-weight: 800; text-align: center; padding: 4px;
}
.foto-existente.marcada { opacity: .35; }
.foto-existente.marcada .quitar { background: var(--error); }
.foto-nueva .quitar { background: var(--exito); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { display: none; }
.chip span, .chip-boton {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--borde);
  background: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; font-family: inherit; color: var(--texto);
}
.chip input:checked + span { background: var(--coral); border-color: var(--coral); color: #fff; }
.chip-boton:hover { border-color: var(--azul); }
.atajos-fecha { margin-bottom: 8px; }

.ahorro-vista { font-weight: 800; color: var(--exito); margin: -6px 0 12px; min-height: 1em; }

.horarios { display: grid; gap: 8px; margin-bottom: 8px; }
.horario-fila { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 10px; font-weight: 700; }
.horario-fila input { padding: 9px 12px; border: 2px solid var(--borde); border-radius: var(--radio-chico); font-family: inherit; font-size: .95rem; }

.botones-mapa { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.botones-mapa .btn { padding: 9px 14px; font-size: .9rem; }
.mapa { height: 300px; border-radius: var(--radio); overflow: hidden; border: 2px solid var(--borde); z-index: 1; }
.pin-coral { background: none; border: 0; }

.barra-guardar {
  position: sticky; bottom: 76px; z-index: 40; padding: 10px 0;
  background: linear-gradient(transparent, var(--fondo) 30%);
}
@media (min-width: 900px) { .barra-guardar { bottom: 0; } }

.contador { text-align: right; font-size: .75rem; color: var(--texto-suave); margin-top: 2px; }

/* ---------- Mis promos ---------- */
.titulo-accion { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pestanas { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 16px; padding-bottom: 4px; }
.pestanas a {
  padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--borde);
  font-weight: 800; font-size: .9rem; white-space: nowrap; color: var(--texto); text-decoration: none;
}
.pestanas a span { background: var(--fondo); border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: .8rem; }
.pestanas a.activo { background: var(--azul); border-color: var(--azul); color: #fff; }
.pestanas a.activo span { background: rgba(255, 255, 255, .2); }

.lista-promos { display: grid; gap: 14px; }
.promo-item { display: grid; grid-template-columns: 120px 1fr; }
@media (max-width: 480px) { .promo-item { grid-template-columns: 1fr; } }
.promo-foto {
  position: relative; min-height: 120px; background: var(--azul-suave) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.promo-foto .estado { position: absolute; top: 8px; left: 8px; }
@media (max-width: 480px) { .promo-foto { min-height: 170px; } }
.promo-cuerpo { padding: 12px 14px; }
.promo-cuerpo h3 { font-size: 1.05rem; margin-bottom: 4px; }
.promo-precio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.promo-precio .precio-promo { font-size: 1.25rem; }
.promo-stats { display: flex; gap: 12px; font-size: .85rem; color: var(--texto-suave); margin: 8px 0; font-weight: 700; }
.promo-acciones { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.chico { padding: 7px 14px; font-size: .85rem; }
.btn-texto-rojo { background: none; color: var(--error); padding-left: 8px; padding-right: 8px; }
.btn-texto-rojo:hover { text-decoration: underline !important; }

.zona-peligro { border: 2px solid #FDE8E6; }
.zona-peligro h2 { color: var(--error); }

/* Íconos en el panel */
.nav-icono .ico { width: 24px; height: 24px; }
.panel-nav a.nav-nueva .nav-icono .ico { width: 22px; height: 22px; }
.checklist .ico { color: var(--exito); }
.checklist li:not(.hecho) .ico { color: var(--texto-suave); }
.subir-imagen span .ico { width: 1.4em; height: 1.4em; }
.promo-foto .ico { width: 40px; height: 40px; color: var(--azul); }
.promo-stats .ico { color: var(--azul); }
