:root {
  --rojo: #c62828; --rojo-osc: #8e0000; --amarillo: #ffc107; --verde: #2e7d32;
  --fondo: #f4f4f5; --tarjeta: #fff; --texto: #1c1c1e; --suave: #6b6b70; --borde: #e3e3e6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fondo); color: var(--texto); font-size: 16px; }
#barra { position: sticky; top: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--rojo); color: #fff; }
.marca { font-size: 20px; letter-spacing: .3px; }
.marca b { color: var(--amarillo); }
.logo { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%;
  background: #fff; color: var(--rojo); font-size: 16px; }
#quien { font-size: 13px; opacity: .9; text-align: right; }
#quien button { margin-left: 8px; background: transparent; border: 1px solid #fff8; color: #fff; padding: 4px 8px; border-radius: 6px; }
main { padding: 12px 12px 88px; max-width: 720px; margin: 0 auto; }
#tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; display: flex; background: #fff; border-top: 1px solid var(--borde);
  padding-bottom: env(safe-area-inset-bottom); }
#tabs button { flex: 1; background: none; border: 0; padding: 10px 4px 12px; font-size: 13px; color: var(--suave); }
#tabs button span { display: block; font-size: 20px; }
#tabs button.activo { color: var(--rojo); font-weight: 600; }
.tarjeta { background: var(--tarjeta); border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px #0001; }
h2 { font-size: 18px; margin: 4px 0 12px; }
h3 { font-size: 15px; margin: 14px 0 8px; color: var(--suave); text-transform: uppercase; letter-spacing: .5px; }
label { display: block; font-size: 13px; color: var(--suave); margin: 10px 0 4px; }
input, textarea, select { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; }
textarea { min-height: 70px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border: 0; border-radius: 10px;
  padding: 12px 16px; background: var(--rojo); color: #fff; text-decoration: none; cursor: pointer; }
.btn.ancho { width: 100%; margin-top: 14px; }
.btn.sec { background: #fff; color: var(--rojo); border: 1px solid var(--rojo); }
.btn.verde { background: var(--verde); }
.btn.wa { background: #25d366; }
.btn:disabled { opacity: .5; }
.fila { display: flex; gap: 8px; align-items: center; }
.fila > * { flex: 1; }
.selector-rol { display: flex; gap: 8px; margin: 6px 0 4px; }
.selector-rol button { flex: 1; padding: 14px 8px; border-radius: 12px; border: 2px solid var(--borde); background: #fff; font: inherit; }
.selector-rol button.activo { border-color: var(--rojo); background: #fff5f5; font-weight: 600; }
.selector-rol span { display: block; font-size: 26px; }
.enlace { background: none; border: 0; color: var(--rojo); font: inherit; text-decoration: underline; padding: 8px 0; }
.mapa { height: 300px; border-radius: 12px; overflow: hidden; border: 1px solid var(--borde); }
.mapa.grande { height: 52vh; }
.producto { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--borde); }
.producto:last-child { border-bottom: 0; }
.producto .info { flex: 1; min-width: 0; }
.producto .precio { font-size: 13px; color: var(--suave); }
.cantidad { display: flex; align-items: center; gap: 4px; }
.cantidad button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; font-size: 18px; }
.cantidad input { width: 64px; text-align: center; padding: 7px 4px; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-top: 12px; }
.chip { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #eee; color: #444; }
.chip.abierto { background: #fff3cd; color: #7a5b00; }
.chip.asignado, .chip.en_camino { background: #e3f2fd; color: #0d47a1; }
.chip.entregado { background: #e8f5e9; color: var(--verde); }
.chip.cancelado { background: #fdecea; color: var(--rojo-osc); }
.oferta { border: 1px solid var(--borde); border-radius: 12px; padding: 10px; margin-top: 8px; }
.oferta.aceptada { border-color: var(--verde); background: #f3fbf4; }
.oferta .monto { font-size: 20px; font-weight: 700; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.acciones .btn { flex: 1; padding: 10px; font-size: 14px; }
.suave { color: var(--suave); font-size: 13px; }
.vacio { text-align: center; color: var(--suave); padding: 30px 10px; }
.items { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.piso { font-size: 13px; color: var(--verde); font-weight: 600; }
#aviso { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 2000; background: #222; color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90vw; }
.marcador-pedido { background: var(--rojo); color: #fff; border-radius: 50%; width: 34px; height: 34px; line-height: 30px; text-align: center;
  border: 2px solid #fff; box-shadow: 0 1px 4px #0006; font-size: 16px; }
.marcador-yo { background: #1565c0; border: 3px solid #fff; border-radius: 50%; width: 18px; height: 18px; box-shadow: 0 0 0 4px #1565c044; }
