/* GUACAMAYA — estilos compartidos (cliente y paneles). Colores de la guacamaya bandera. */
:root {
  --rojo: #e8442b; --rojo-2: #c7341d; --amarillo: #ffc21a; --azul: #1767c2; --verde: #1f9d63;
  --tinta: #1d2333; --tinta-2: #4b5468; --tinta-3: #8a92a5; --fondo: #fff8ef; --blanco: #ffffff;
  --borde: #ece3d6; --sombra: 0 10px 30px -14px rgba(60, 35, 10, .35); --radio: 18px;
  --fuente: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fuente); color: var(--tinta); background: var(--fondo); line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
.oculto { display: none !important; }
.contenedor { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Barra superior */
.barra { position: sticky; top: 0; z-index: 30; background: var(--rojo); color: #fff; box-shadow: 0 4px 16px -8px rgba(0, 0, 0, .4); }
.barra .contenedor { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.35rem; letter-spacing: -.01em; }
.marca img { background: #111; border-radius: 12px; padding: 4px 6px; width: 62px; height: 46px; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.marca i { width: 38px; height: 38px; border-radius: 50%; background: var(--amarillo); display: grid; place-items: center; font-style: normal; font-size: 1.3rem; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.marca small { display: block; font-size: .7rem; font-weight: 700; opacity: .9; letter-spacing: .04em; margin-top: -4px; }
.barra .derecha { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.franja { height: 5px; background: linear-gradient(90deg, var(--amarillo) 0 33%, var(--azul) 33% 66%, var(--verde) 66%); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 0; background: var(--rojo); color: #fff; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { background: var(--rojo-2); }
.btn:active { transform: scale(.97); }
.btn.sec { background: #fff; color: var(--tinta); border: 2px solid var(--borde); }
.btn.azul { background: var(--azul); }
.btn.verde { background: var(--verde); }
.btn.amarillo { background: var(--amarillo); color: var(--tinta); }
.btn.peq { padding: 8px 14px; font-size: .88rem; }
.btn.bloque { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Inicio */
.hero { background: linear-gradient(160deg, var(--rojo) 0%, #f0602f 60%, var(--amarillo) 140%); color: #fff; padding: 26px 0 70px; }
.hero h1 { margin: 6px 0 6px; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.1; font-weight: 900; }
.hero p { margin: 0; opacity: .95; }
.buscar { margin: -34px auto 0; position: relative; z-index: 2; }
.buscar input { width: 100%; padding: 16px 20px; border-radius: 999px; border: 0; box-shadow: var(--sombra); font-size: 1rem; outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; background: #fff; border: 2px solid var(--borde); font-weight: 700; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.grid-negocios { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 12px 0 40px; }
.negocio { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radio); background: #fff; border: 1px solid var(--borde); text-decoration: none; box-shadow: 0 2px 0 rgba(0, 0, 0, .02); transition: transform .15s, box-shadow .15s; }
.negocio:hover { transform: translateY(-2px); box-shadow: var(--sombra); }
.avatar { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.4rem; }
.negocio b { display: block; font-size: 1.05rem; }
.negocio small { color: var(--tinta-3); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.pill.abierto { background: #e3f6ec; color: var(--verde); }
.pill.cerrado { background: #fde6e2; color: var(--rojo-2); }
.pill.demo { background: #e8f0fb; color: var(--azul); }
.vacio { text-align: center; color: var(--tinta-3); padding: 40px 10px; }

/* Catálogo */
.cab-negocio { padding: 22px 0; color: #fff; }
.cab-negocio .contenedor { display: flex; gap: 16px; align-items: center; }
.cab-negocio .avatar { width: 70px; height: 70px; border: 3px solid rgba(255, 255, 255, .6); }
.cab-negocio h1 { margin: 0; font-size: 1.6rem; line-height: 1.15; }
.volver { display: inline-block; margin: 14px 0 0; font-weight: 800; text-decoration: none; color: var(--tinta-2); }
.cat-titulo { margin: 22px 0 10px; font-size: 1.1rem; }
.producto { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--borde); border-radius: 14px; margin-bottom: 10px; }
.producto .info { flex: 1; min-width: 0; }
.producto b { display: block; }
.producto small { color: var(--tinta-3); display: block; }
.precio { font-weight: 900; color: var(--rojo-2); }
.cant { display: flex; align-items: center; gap: 8px; }
.cant button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--amarillo); font-weight: 900; font-size: 1.2rem; cursor: pointer; }
.cant span { min-width: 18px; text-align: center; font-weight: 800; }
.barra-carrito { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 640px; margin: 0 auto; }
.barra-carrito .btn { width: 100%; justify-content: space-between; padding: 16px 22px; font-size: 1.02rem; box-shadow: 0 14px 30px -10px rgba(200, 50, 20, .7); }

/* Formulario y tarjetas */
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; box-shadow: 0 2px 0 rgba(0, 0, 0, .02); }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: 5px; }
.campo input, .campo select, .campo textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--borde); background: #fff; font-size: 16px; outline: none; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--azul); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opciones { display: flex; gap: 8px; flex-wrap: wrap; }
.opciones label { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border: 2px solid var(--borde); border-radius: 12px; cursor: pointer; font-weight: 700; }
.opciones input { accent-color: var(--rojo); }
.resumen { display: grid; gap: 6px; padding: 14px 0; border-top: 2px dashed var(--borde); margin-top: 6px; }
.resumen div { display: flex; justify-content: space-between; }
.resumen .total { font-size: 1.2rem; font-weight: 900; }
.aviso { padding: 12px 14px; border-radius: 12px; background: #fff3d1; color: #6b4b00; font-size: .92rem; margin: 10px 0; }
.error { color: var(--rojo-2); font-weight: 700; min-height: 1.2em; margin: 8px 0 0; }

/* Seguimiento */
.estado-grande { text-align: center; padding: 26px 16px; border-radius: var(--radio); color: #fff; background: var(--azul); margin: 18px 0; }
.estado-grande b { display: block; font-size: 1.6rem; }
.pasos { list-style: none; padding: 0; margin: 0; }
.pasos li { position: relative; padding: 0 0 18px 34px; color: var(--tinta-3); }
.pasos li::before { content: ''; position: absolute; left: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--borde); background: #fff; }
.pasos li::after { content: ''; position: absolute; left: 12px; top: 22px; bottom: 2px; width: 2px; background: var(--borde); }
.pasos li:last-child::after { display: none; }
.pasos li.hecho { color: var(--tinta); font-weight: 700; }
.pasos li.hecho::before { background: var(--verde); border-color: var(--verde); }
.pasos small { display: block; font-weight: 400; color: var(--tinta-3); }

/* Paneles */
.panel-cab { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; }
.tab { flex: none; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--borde); background: #fff; font-weight: 800; cursor: pointer; }
.tab.on { background: var(--azul); color: #fff; border-color: var(--azul); }
.lista { display: grid; gap: 12px; padding-bottom: 40px; }
.pedido { background: #fff; border: 1px solid var(--borde); border-left: 6px solid var(--tinta-3); border-radius: 14px; padding: 14px 16px; }
.pedido.nuevo { border-left-color: var(--rojo); animation: latido 1.6s ease-in-out 3; }
.pedido.aceptado { border-left-color: var(--amarillo); }
.pedido.listo { border-left-color: var(--azul); }
.pedido.en_camino { border-left-color: #7b4bd1; }
.pedido.entregado { border-left-color: var(--verde); opacity: .8; }
.pedido.rechazado, .pedido.cancelado { opacity: .55; }
.pedido .cab { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pedido ul { margin: 8px 0; padding-left: 18px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acciones select { padding: 8px 10px; border-radius: 10px; border: 2px solid var(--borde); }
.estado { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: #eef1f6; }
.tabla { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
.tabla th, .tabla td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--borde); font-size: .92rem; }
.tabla th { background: #fbf4ea; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-radius: var(--radio); background: #fff; border: 2px solid var(--borde); margin: 12px 0; }
.interruptor.on { border-color: var(--verde); background: #eefaf3; }
.bloqueo { padding: 14px 16px; border-radius: 14px; background: #fde6e2; color: var(--rojo-2); font-weight: 700; margin: 12px 0; }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(20, 15, 10, .55); display: grid; place-items: center; padding: 16px; }
.modal .tarjeta { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.qr-tarjeta { text-align: center; padding: 26px; border: 4px solid var(--rojo); border-radius: 22px; }
.qr-tarjeta svg, .qr-tarjeta img { width: 240px; height: 240px; }
.qr-tarjeta h2 { margin: 6px 0 2px; }
@keyframes latido { 50% { box-shadow: 0 0 0 6px rgba(232, 68, 43, .18); } }
@media (max-width: 560px) { .fila { grid-template-columns: 1fr; } .hero { padding-bottom: 60px; } }
@media print { body * { visibility: hidden; } .imprimir, .imprimir * { visibility: visible; } .imprimir { position: absolute; left: 0; top: 0; width: 100%; } }

/* ── Mapas ── */
.mapa { height: 300px; border-radius: 16px; border: 2px solid var(--borde); overflow: hidden; z-index: 0; }
.mapa-seg { height: 280px; margin: 0 0 8px; }
.ayuda-mapa { color: var(--tinta-3); font-size: .88rem; }
.nota-tarifa { color: var(--tinta-3); font-size: .82rem; margin: 6px 0 0; }
.gq-pin { background: none; border: 0; }
.gq-pin span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.35); }

/* ── Pago virtual ── */
.pago-virtual { padding: 14px 16px; border-radius: 14px; background: #e8f0fb; color: #123d75; font-size: .95rem; margin: 6px 0 12px; }
.pago-caja { border: 3px solid var(--amarillo); margin: 16px 0; }
.pago-caja .monto { font-size: 1.2rem; }
.pago-caja .instrucciones { padding: 14px; border-radius: 12px; background: #fbf4ea; font-weight: 700; font-size: 1.05rem; }

.confirmado { padding: 16px 18px; border-radius: 14px; background: #e3f6ec; color: #135c3a; font-size: 1.02rem; margin: 14px 0; }
.pago-virtual .instrucciones { margin: 10px 0 6px; padding: 12px 14px; border-radius: 12px; background: #fff; color: var(--tinta); font-weight: 800; font-size: 1.02rem; }
.pago-virtual small { display: block; color: #3d5a80; }
