/* ============================================================
   Mascarita · estilos compartidos (cliente y panel de negocio)
   ============================================================ */
:root {
  --mag: #C10755;
  --mag-2: #E2337A;
  --mag-osc: #8E043F;
  --oro: #FFB703;
  --tur: #12A8A3;
  --tinta: #22172E;
  --gris: #6E6577;
  --linea: #EDE4DA;
  --crema: #FFF7EE;
  --blanco: #FFFFFF;
  --ok: #1E9E5A;
  --mal: #D93A2B;
  --radio: 18px;
  --sombra: 0 6px 24px rgba(34, 23, 46, .08);
  --fuente-titulo: 'Bricolage Grotesque', system-ui, sans-serif;
  --fuente: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--fuente); color: var(--tinta); background: var(--crema);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--mag); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--fuente-titulo); margin: 0; line-height: 1.1; letter-spacing: -.01em; }
.oculto { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Papel picado ---------- */
.picado {
  height: 22px; background:
    radial-gradient(circle at 50% 0, transparent 9px, var(--c, var(--mag)) 10px) 0 0 / 28px 22px repeat-x;
  -webkit-mask: linear-gradient(#000 0 0);
}
.picado.oro { --c: var(--oro); }
.picado.tur { --c: var(--tur); }
.tira-picado { display: flex; height: 14px; }
.tira-picado span { flex: 1; clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }
.tira-picado span:nth-child(4n+1) { background: var(--mag); }
.tira-picado span:nth-child(4n+2) { background: var(--oro); }
.tira-picado span:nth-child(4n+3) { background: var(--tur); }
.tira-picado span:nth-child(4n+4) { background: var(--mag-2); }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 247, 238, .92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linea);
}
.barra .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.marca { display: flex; align-items: center; gap: 8px; color: var(--tinta); font-family: var(--fuente-titulo); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.marca img { width: 38px; height: 38px; object-fit: contain; }
.marca b { color: var(--mag); }
.barra .esp { flex: 1; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer; font-weight: 700;
  background: var(--mag); color: #fff; transition: transform .08s, background .15s, box-shadow .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--mag-osc); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sec { background: #fff; color: var(--tinta); border: 1.5px solid var(--linea); }
.btn.sec:hover { border-color: var(--tinta); background: #fff; }
.btn.oro { background: var(--oro); color: var(--tinta); }
.btn.oro:hover { background: #F2A900; }
.btn.wa { background: #1FAF55; }
.btn.wa:hover { background: #178F44; }
.btn.chico { padding: 8px 14px; font-size: 14px; }
.btn.bloque { width: 100%; }
.icono-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--linea); background: #fff;
  display: inline-grid; place-items: center; cursor: pointer; position: relative; color: var(--tinta); font-size: 18px;
}
.icono-btn .punto { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--mag); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

/* ---------- Formularios ---------- */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo > span { font-weight: 700; font-size: 14px; }
.campo small { color: var(--gris); font-size: 13px; }
.entrada, select.entrada, textarea.entrada {
  width: 100%; border: 1.5px solid var(--linea); border-radius: 14px; padding: 12px 14px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.entrada:focus { border-color: var(--mag); box-shadow: 0 0 0 4px rgba(193, 7, 85, .12); }
textarea.entrada { min-height: 84px; resize: vertical; }
.fila { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .fila { grid-template-columns: 1fr; } }
.interruptor { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; margin-bottom: 10px; }
.interruptor input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: #DDD3C8; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.interruptor input:checked { background: var(--ok); }
.interruptor input:checked::after { left: 21px; }
.segmento { display: flex; background: #F1E8DE; border-radius: 999px; padding: 4px; gap: 4px; }
.segmento button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 12px; font-weight: 700; cursor: pointer; color: var(--gris); }
.segmento button.on { background: #fff; color: var(--tinta); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* ---------- Chips / etiquetas ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--linea); background: #fff;
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.etq { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #F3EBE2; color: var(--tinta); }
.etq.abierto { background: #E3F6EC; color: #137A43; }
.etq.cerrado { background: #F6E6E4; color: #A9302A; }
.etq.demo { background: #FFF1C9; color: #8A5A00; }
.etq.mag { background: #FCE4EE; color: var(--mag-osc); }
.estrellas { color: #F2A900; font-weight: 800; }

/* ---------- Tarjetas ---------- */
.tarjeta { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); border: 1px solid #F2E9DF; }
.caja { padding: 18px; }
.vacio { text-align: center; padding: 40px 16px; color: var(--gris); }
.vacio img { width: 140px; margin: 0 auto 12px; }

/* ---------- Modal / hoja ---------- */
.velo { position: fixed; inset: 0; background: rgba(34, 23, 46, .45); z-index: 200; display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s; }
.hoja {
  background: var(--crema); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); animation: sube .22s cubic-bezier(.2,.8,.2,1);
}
.hoja .agarre { width: 44px; height: 5px; border-radius: 3px; background: #D8CDC1; margin: 6px auto 14px; }
.hoja h2 { font-size: 24px; margin-bottom: 14px; }
@media (min-width: 700px) { .velo { align-items: center; } .hoja { border-radius: 26px; } }
@keyframes aparece { from { opacity: 0; } }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Aviso flotante ---------- */
.aviso {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; background: var(--tinta); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px);
  animation: sube .2s;
}
.aviso.error { background: var(--mal); }

/* ---------- Carga ---------- */
.cargando { display: grid; place-items: center; padding: 60px; }
.cargando::after { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 4px solid #EADFD3; border-top-color: var(--mag); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Mapa ---------- */
.leaflet-container { font-family: var(--fuente); }
.pin {
  width: 40px; height: 40px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--mag);
  display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.pin span { transform: rotate(45deg); font-size: 18px; }
.pin.cerrado { background: #8D8394; }
.pin.yo { background: var(--tur); border-radius: 50%; width: 22px; height: 22px; transform: none; }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.leaflet-popup-content { margin: 12px 14px; }
