/* ====== Estilos compartidos (cliente y paneles) ====== */
:root {
  --verde: #1d5a38;
  --verde-2: #2f7d4a;
  --naranja: #e8731a;
  --naranja-2: #fff1e4;
  --crema: #faf6ef;
  --blanco: #fff;
  --tinta: #1f1d19;
  --gris: #6c675e;
  --gris-2: #a29c90;
  --borde: #e8e1d4;
  --rojo: #c0392b;
  --rojo-2: #fdecea;
  --ok: #1f8a4c;
  --ok-2: #e5f5eb;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(40, 30, 10, .06), 0 4px 14px rgba(40, 30, 10, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--crema); color: var(--tinta);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.4;
}
body.sin-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--verde); }
.oculto { display: none !important; }
.contenedor { max-width: 640px; margin: 0 auto; padding: 0 14px; }

/* ---- barra superior ---- */
/* En iPhone la barra de estado tapa lo de arriba: la barra verde se extiende debajo de ella */
:root { --arriba: env(safe-area-inset-top, 0px); }
.barra {
  position: sticky; top: 0; z-index: 20; background: var(--verde); color: #fff;
  padding: calc(10px + var(--arriba)) 14px 10px; display: flex; align-items: center; gap: 10px; min-height: calc(56px + var(--arriba));
}
.barra h1 { font-size: 19px; margin: 0; font-weight: 800; letter-spacing: -.2px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra .sub { display: block; font-size: 12px; font-weight: 500; opacity: .85; }
.barra button {
  background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 10px;
  min-width: 42px; height: 42px; padding: 0 12px; font-size: 15px; font-weight: 600;
}
.marca-punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--naranja); margin-right: 6px; vertical-align: middle; }
.aviso-demo { background: #fff3cd; color: #6b4e00; font-size: 12.5px; text-align: center; padding: 6px 10px; font-weight: 600; border-bottom: 1px solid #f0dc9a; }

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0;
  background: var(--naranja); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-bloque { display: flex; width: 100%; }
.btn-sec { background: var(--blanco); color: var(--tinta); border: 1.5px solid var(--borde); }
.btn-verde { background: var(--verde); }
.btn-wa { background: #1fa855; }
.btn-peligro { background: var(--rojo); }
.btn-mini { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn-texto { background: none; border: 0; color: var(--verde); font-weight: 700; padding: 8px 4px; cursor: pointer; font-size: 15px; }
.fila-botones { display: flex; gap: 10px; margin-top: 16px; }
.fila-botones .btn { flex: 1; }

/* ---- formulario ---- */
.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.ayuda { font-size: 14px; color: var(--gris); line-height: 1.45; }
.campo .ayuda { font-size: 12.5px; color: var(--gris); margin-top: 4px; }
.entrada, select.entrada, textarea.entrada {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1.5px solid var(--borde); border-radius: 11px;
  background: #fff; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
textarea.entrada { min-height: 70px; resize: vertical; }
.entrada:focus { border-color: var(--verde-2); box-shadow: 0 0 0 3px rgba(47, 125, 74, .15); }
.entrada.error { border-color: var(--rojo); background: var(--rojo-2); }
.msg-error { color: var(--rojo); font-size: 13px; font-weight: 600; margin-top: 4px; }
.opciones { display: grid; gap: 8px; }
.opcion {
  display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1.5px solid var(--borde);
  border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600;
}
.opcion input { width: 20px; height: 20px; accent-color: var(--verde); margin: 0; }
.opcion.sel { border-color: var(--verde-2); background: var(--ok-2); }
.opcion small { display: block; font-weight: 500; color: var(--gris); font-size: 13px; }

/* ---- tarjetas de restaurante ---- */
.lista-rest { display: grid; gap: 14px; padding: 14px 0 100px; }
.tarjeta {
  background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden;
  display: block; text-decoration: none; color: inherit; border: 0; text-align: left; width: 100%; padding: 0; cursor: pointer;
}
.portada {
  position: relative; height: 112px; display: flex; align-items: center; justify-content: center;
  font-size: 50px; background: var(--verde-2); background-size: cover; background-position: center;
}
.portada .estado {
  position: absolute; left: 10px; top: 10px; font-size: 12.5px; font-weight: 800; padding: 4px 9px;
  border-radius: 20px; background: #fff; color: var(--ok);
}
.portada .estado.cerrado { color: #fff; background: rgba(30, 25, 20, .78); }
.portada .chip-ejemplo { position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 20px; background: #fff3cd; color: #6b4e00; }
.tarjeta.cerrada .portada { filter: grayscale(.75); opacity: .85; }
.tarjeta-cuerpo { padding: 12px 14px 14px; }
.tarjeta-cuerpo h2 { margin: 0 0 3px; font-size: 18px; letter-spacing: -.2px; }
.tipo { font-size: 13px; color: var(--naranja); font-weight: 700; }
.desc { font-size: 14px; color: var(--gris); margin: 4px 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--tinta); font-weight: 600; }
.meta span { white-space: nowrap; }
.horario { font-size: 12.5px; color: var(--gris); margin-top: 6px; }

.filtros { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--borde); background: #fff; border-radius: 20px; padding: 7px 13px;
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.chip.activo { background: var(--verde); color: #fff; border-color: var(--verde); }

/* ---- página del restaurante ---- */
.cabecera-rest { background: #fff; padding: 14px 0 12px; border-bottom: 1px solid var(--borde); }
.cabecera-rest h2 { margin: 0; font-size: 22px; }
.aviso-cerrado { margin-top: 10px; background: var(--rojo-2); color: var(--rojo); border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.cats {
  position: sticky; top: calc(56px + var(--arriba)); z-index: 15; background: var(--crema); display: flex; gap: 8px;
  overflow-x: auto; padding: 10px 14px; scrollbar-width: none; border-bottom: 1px solid var(--borde);
}
.cats::-webkit-scrollbar { display: none; }
.cat-titulo { font-size: 17px; margin: 22px 0 8px; scroll-margin-top: 120px; }
.plato {
  display: flex; gap: 12px; background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px;
  box-shadow: var(--sombra); align-items: stretch;
}
.plato-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plato-info h3 { margin: 0 0 3px; font-size: 16px; }
.plato-info p { margin: 0 0 6px; font-size: 13.5px; color: var(--gris); }
.precio { font-weight: 800; font-size: 16px; margin-top: auto; }
.plato-foto {
  width: 92px; height: 92px; border-radius: 11px; flex: none; background: var(--naranja-2);
  display: flex; align-items: center; justify-content: center; font-size: 38px; position: relative; overflow: hidden;
}
.plato-foto img { width: 100%; height: 100%; object-fit: cover; }
.plato-foto .mas {
  position: absolute; right: 5px; bottom: 5px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--naranja); color: #fff; font-size: 22px; font-weight: 700; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.plato.agotado { opacity: .55; }
.plato .en-carrito { font-size: 12.5px; color: var(--ok); font-weight: 800; }
.etiqueta-agotado { font-size: 12px; font-weight: 800; color: var(--rojo); }

/* ---- barra del carrito ---- */
.barra-carrito {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--crema) 70%, rgba(250, 246, 239, 0));
}
.barra-carrito .btn { max-width: 612px; margin: 0 auto; justify-content: space-between; box-shadow: 0 6px 18px rgba(232, 115, 26, .35); }
.barra-carrito .cant { background: rgba(255, 255, 255, .25); border-radius: 8px; padding: 2px 9px; }

/* ---- carrito ---- */
.bloque { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 14px; margin: 14px 0; }
.bloque h3 { margin: 0 0 12px; font-size: 17px; }
.item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.item:last-child { border-bottom: 0; }
.item-info { flex: 1; min-width: 0; }
.item-info b { display: block; font-size: 15px; }
.item-nota { font-size: 13px; color: var(--gris); font-style: italic; }
.contador { display: flex; align-items: center; gap: 2px; background: var(--crema); border-radius: 10px; height: 38px; flex: none; }
.contador button { width: 36px; height: 38px; border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--verde); cursor: pointer; }
.contador span { min-width: 22px; text-align: center; font-weight: 800; }
.totales div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 15px; }
.totales .total { font-size: 19px; font-weight: 800; border-top: 1px solid var(--borde); margin-top: 6px; padding-top: 10px; }
.zona { font-size: 13px; background: var(--naranja-2); color: #8a4510; border-radius: 10px; padding: 9px 11px; font-weight: 600; }

/* ---- confirmación ---- */
.confirmacion { text-align: center; padding: 26px 0 8px; }
.check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 40px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.codigo-pedido { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 1.5px dashed var(--gris-2); border-radius: 9px; padding: 5px 12px; font-weight: 800; letter-spacing: .5px; }
.pasos { text-align: left; margin: 0; padding-left: 20px; font-size: 14.5px; }
.pasos li { margin-bottom: 6px; }

/* ---- modal tipo hoja inferior ---- */
.modal-fondo {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 16, 10, .5); display: flex;
  align-items: flex-end; justify-content: center; animation: aparecer .15s ease-out;
}
.modal {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  animation: subir .2s ease-out;
}
@media (min-width: 600px) { .modal-fondo { align-items: center; } .modal { border-radius: 18px; } }
.modal h3 { margin: 0 0 6px; font-size: 19px; }
.modal-foto { height: 170px; margin: -18px -16px 14px; background: var(--naranja-2); display: flex; align-items: center; justify-content: center; font-size: 70px; overflow: hidden; border-radius: 18px 18px 0 0; }
.modal-foto img { width: 100%; height: 100%; object-fit: cover; }
.confirmar-txt { font-size: 16px; font-weight: 600; margin: 4px 0 0; }
@keyframes subir { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

/* ---- toast y banner de instalación ---- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 80; opacity: 0;
  background: var(--tinta); color: #fff; padding: 11px 16px; border-radius: 11px; font-size: 14.5px; font-weight: 600;
  transition: all .25s; max-width: 90vw; text-align: center; pointer-events: none;
}
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--rojo); }
.toast-ok { background: var(--ok); }
.banner-instalar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
  background: #fff; border-top: 3px solid var(--naranja); border-radius: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.2);
  padding: 12px 40px 12px 14px; font-size: 14px; transform: translateY(140%); transition: transform .35s ease-out;
  max-width: 560px; margin: 0 auto;
}
.banner-instalar.ver { transform: none; }
.banner-instalar .btn { margin-left: 6px; }
.bi-x { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: none; font-size: 16px; color: var(--gris); }
body.con-carrito .banner-instalar { bottom: calc(80px + env(safe-area-inset-bottom)); }

/* ---- vacío / cargando ---- */
.vacio { text-align: center; color: var(--gris); padding: 40px 10px; }
.vacio .grande { font-size: 46px; }
.esqueleto { background: linear-gradient(90deg, #eee8dd 25%, #f6f1e8 50%, #eee8dd 75%); background-size: 200% 100%; animation: brillo 1.2s infinite; border-radius: var(--radio); height: 200px; }
@keyframes brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.pie { text-align: center; font-size: 12.5px; color: var(--gris); padding: 10px 0 18px; }

/* =================== PANELES =================== */
.pestanas { display: flex; background: #fff; border-bottom: 1px solid var(--borde); position: sticky; top: calc(56px + var(--arriba)); z-index: 15; }
.pestanas button { flex: 1; border: 0; background: none; padding: 13px 4px; font-weight: 700; font-size: 14.5px; color: var(--gris); border-bottom: 3px solid transparent; cursor: pointer; }
.pestanas button.activo { color: var(--verde); border-bottom-color: var(--naranja); }
.panel-login { max-width: 420px; margin: 30px auto; padding: 0 16px; }
.panel-login .bloque { padding: 20px; }
.logo-panel { font-size: 46px; text-align: center; }
.interruptor {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px;
  border-radius: var(--radio); background: #fff; box-shadow: var(--sombra); margin: 14px 0; cursor: pointer; border: 2px solid transparent;
}
.interruptor.on { border-color: var(--ok); background: var(--ok-2); }
.interruptor.off { border-color: var(--rojo); background: var(--rojo-2); }
.interruptor b { font-size: 18px; display: block; }
.interruptor small { color: var(--gris); font-size: 13px; }
.switch { width: 62px; height: 36px; border-radius: 20px; background: var(--gris-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.on .switch { background: var(--ok); }
.on .switch::after { transform: translateX(26px); }
.fila-plato { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px; border-radius: 12px; margin-bottom: 8px; box-shadow: var(--sombra); }
.fila-plato .mini { width: 52px; height: 52px; border-radius: 9px; background: var(--naranja-2); display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none; overflow: hidden; }
.fila-plato .mini img { width: 100%; height: 100%; object-fit: cover; }
.fila-plato .info { flex: 1; min-width: 0; }
.fila-plato .info b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-plato .info span { font-size: 13.5px; color: var(--gris); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 20px; background: var(--crema); color: var(--gris); }
.pill-ok { background: var(--ok-2); color: var(--ok); }
.pill-rojo { background: var(--rojo-2); color: var(--rojo); }
.pill-naranja { background: var(--naranja-2); color: #a34e0c; }
.pill-azul { background: #e6efff; color: #2453a6; }
.foto-picker { width: 100%; height: 150px; border-radius: 12px; border: 2px dashed var(--borde); background: var(--crema); display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--gris); font-weight: 600; cursor: pointer; overflow: hidden; position: relative; }
.foto-picker img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dias { display: flex; gap: 5px; flex-wrap: wrap; }
.dias label { flex: 1; min-width: 40px; }
.dias input { display: none; }
.dias span { display: block; text-align: center; padding: 9px 0; border-radius: 9px; border: 1.5px solid var(--borde); font-weight: 700; font-size: 13.5px; background: #fff; cursor: pointer; }
.dias input:checked + span { background: var(--verde); color: #fff; border-color: var(--verde); }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resumen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.resumen div { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--sombra); }
.resumen b { display: block; font-size: 21px; }
.resumen span { font-size: 12.5px; color: var(--gris); font-weight: 600; }
.pedido { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--sombra); border-left: 5px solid var(--naranja); }
.pedido.est-entregado { border-left-color: var(--ok); }
.pedido.est-cancelado { border-left-color: var(--gris-2); opacity: .65; }
.pedido.est-confirmado, .pedido.est-en_camino { border-left-color: #2f6fd6; }
.pedido-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pedido-cab b { font-size: 16px; }
.pedido-det { font-size: 13.5px; color: var(--gris); margin: 4px 0 8px; }
.pedido-items { font-size: 14px; margin: 6px 0; padding: 8px 10px; background: var(--crema); border-radius: 9px; }
.pedido-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pedido-acc select { min-height: 40px; padding: 6px 10px; font-size: 14.5px; }
.barra-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.barra-acciones .entrada { flex: 1; min-width: 140px; }
.codigo-acceso { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 17px; letter-spacing: 1px; background: var(--crema); padding: 3px 8px; border-radius: 7px; }
.btn-atras { display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); color: #fff; border-radius: 10px; min-width: 42px; height: 42px; font-size: 20px; font-weight: 700; text-decoration: none; }

/* =================== FASE 2 =================== */
.pestanas-5 button { font-size: 13px; padding: 13px 2px; }
.aviso-susc { background: var(--naranja-2); color: #7a3c0b; border-radius: 12px; padding: 12px 13px; margin: 14px 0; font-size: 14px; }
.aviso-susc.malo { background: var(--rojo-2); color: #8e2418; }
.aviso-susc small { color: inherit; opacity: .85; }
.sub-h { margin: 16px 0 8px; font-size: 14px; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; }
.opciones .btn small { font-weight: 600; opacity: .85; }
/* seguimiento del pedido */
.seguimiento { list-style: none; padding: 0; margin: 18px 0 6px; position: relative; }
.seguimiento li { display: flex; gap: 12px; align-items: flex-start; padding: 0 0 18px; position: relative; color: var(--gris-2); }
.seguimiento li::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--borde); }
.seguimiento li:last-child::before { display: none; }
.seguimiento li.hecho { color: var(--tinta); }
.seguimiento li.hecho::before { background: var(--ok); }
.seguimiento .punto { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--borde); background: #fff; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; z-index: 1; }
.seguimiento li.hecho .punto { background: var(--ok); border-color: var(--ok); }
.seguimiento li.actual .punto { box-shadow: 0 0 0 5px rgba(31, 138, 76, .18); animation: latido 1.6s infinite; }
.seguimiento b { display: block; font-size: 15.5px; padding-top: 5px; }
.seguimiento small { display: block; font-size: 13px; color: var(--gris); }
@keyframes latido { 50% { box-shadow: 0 0 0 9px rgba(31, 138, 76, .08); } }
.mapa-vivo { height: 260px; border-radius: 14px; overflow: hidden; margin: 12px 0 0; box-shadow: var(--sombra); background: #e9e4da; z-index: 0; position: relative; }
.pin-mapa { background: none; border: 0; }
.pin-mapa span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); font-size: 21px; }
/* opiniones */
.estrellas { display: flex; gap: 6px; }
.estrellas button { font-size: 34px; line-height: 1; border: 0; background: none; color: #ddd5c6; cursor: pointer; padding: 0; }
.estrellas button.on { color: #f2a91c; }
.opinion { border-bottom: 1px solid var(--borde); padding: 10px 0; font-size: 14px; }
.opinion:last-child { border-bottom: 0; }
.opinion p { margin: 4px 0 0; }
.opinion small { color: var(--gris); }
.estr { color: #f2a91c; letter-spacing: 1px; }
.fila-num { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); font-size: 14px; }
.fila-num:last-child { border-bottom: 0; }
.fila-num .nums { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--gris); font-size: 13px; flex: none; }
.fila-num .nums b { color: var(--tinta); font-size: 15px; }
/* repartidor */
.bloque-entrega { background: var(--crema); border-radius: 10px; padding: 9px 11px; margin: 8px 0; font-size: 14.5px; }
.bloque-entrega small { display: block; font-size: 11.5px; font-weight: 800; color: var(--gris); letter-spacing: .5px; }
.fila-mini { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.cobro { background: var(--ok-2); border-radius: 10px; padding: 9px 11px; margin: 8px 0 10px; font-size: 15px; }
.cobro small { color: var(--gris); }
.pedido .btn-bloque + .btn-bloque { margin-top: 6px; }
.btn-col { flex-direction: column; gap: 0; line-height: 1.15; padding: 8px 4px; font-size: 15px; }
.btn-col small { font-size: 12.5px; }
/* =================== v2.5 =================== */
.pie-accesos { display: flex; justify-content: center; gap: 18px; padding: 0 0 110px; font-size: 12.5px; }
.pie-accesos a { color: var(--gris-2); text-decoration: none; }
.foto-rep { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--naranja-2); display: flex; align-items: center; justify-content: center; font-size: 30px; flex: none; }
.foto-rep img { width: 100%; height: 100%; object-fit: cover; }
.foto-grande { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px; background: var(--naranja-2); display: flex; align-items: center; justify-content: center; font-size: 54px; }
.foto-grande img { width: 100%; height: 100%; object-fit: cover; }
.ficha { font-size: 14.5px; }
.ficha div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--borde); }
.ficha div span:first-child { color: var(--gris); }
.ficha div span:last-child { font-weight: 700; text-align: right; }
.bloqueado-pantalla { text-align: center; padding: 40px 18px; }

/* ---- código de entrega (cliente) ---- */
.caja-pin { border: 2px solid var(--verde); text-align: center; }
.caja-pin small { display: block; font-size: 13px; color: var(--gris); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.caja-pin .pin-num { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 40px; letter-spacing: 10px; color: var(--verde); margin: 2px 0 4px; }
.caja-pin p { font-size: 14px; margin: 4px 0 10px; color: var(--tinta); }
.entrada-pin { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 34px !important; letter-spacing: 14px; text-align: center; font-weight: 800; }
/* notas en las tarjetas de pedido */
.nota-ped { background: #fff7e6; border-left: 3px solid var(--naranja); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; margin: 6px 0; }
.nota-ped.rep { background: #eef6ff; border-left-color: #2b6cb0; }
/* buscador de pedidos */
.buscador { position: relative; margin: 0 0 10px; }
.buscador input { padding-left: 38px; }
.buscador::before { content: "🔎"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .6; }
/* edición de pedido */
.ed-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.ed-item .info { flex: 1; min-width: 0; font-size: 14.5px; }
.ed-item .info small { display: block; color: var(--gris); }
.foto-veh { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; background: var(--crema); display: flex; align-items: center; justify-content: center; font-size: 40px; min-height: 120px; }
.lista-mini .fila-plato { padding: 8px 0; }
/* suscripciones (admin → Números) */
.grid-susc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile-susc { text-align: left; background: var(--crema); border: 1.5px solid var(--borde); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--tinta); }
.tile-susc b { display: block; font-size: 17px; }
.tile-susc span { display: block; font-size: 13px; font-weight: 700; }
.tile-susc small { display: block; font-size: 12px; color: var(--gris); }
.tile-susc:active { transform: scale(.98); }
/* notificaciones */
.caja-push { background: #fff; border: 1.5px dashed var(--borde); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.caja-push b { font-size: 14.5px; }
.caja-push small { color: var(--gris); font-size: 13px; line-height: 1.4; }
.caja-push.on { border-style: solid; border-color: #b9dfc6; background: #f1faf4; }
/* especiales */
.especiales { border: 2px solid #f0c24b; }
.mini-switch { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 4px; cursor: pointer; font: inherit; }
.mini-switch span { width: 46px; height: 26px; border-radius: 20px; background: var(--gris-2); position: relative; transition: background .2s; }
.mini-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mini-switch.on span { background: var(--ok); }
.mini-switch.on span::after { transform: translateX(20px); }
.mini-switch small { font-size: 11px; font-weight: 700; color: var(--gris); }
.mini-switch.on small { color: var(--ok); }
.cuando { display: inline-block; font-size: 12.5px; font-weight: 700; color: #9a6a00; }
.plato.especial { border-left: 3px solid #f0c24b; }

/* logo del restaurante */
.logo-rest { border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.logo-rest img { width: 100%; height: 100%; object-fit: cover; display: block; }
.con-logo { display: flex; gap: 10px; align-items: center; }
.con-logo > div:last-child, .con-logo > h2 { min-width: 0; }

/* con foto: se ve la foto completa, sin recortar */
.foto-picker:has(img) { height: auto !important; border-style: solid; background: #fff; }
.foto-picker:has(img) > span { display: none; }
.foto-picker:has(img) img { position: static; height: auto; max-height: 60vh; object-fit: contain; display: block; }
.modal-foto:has(img) { height: auto; background: #fff; }
.modal-foto:has(img) img { height: auto; max-height: 55vh; object-fit: contain; display: block; }

/* plato agotado en el panel del restaurante */
.fila-plato.agotado .info b, .fila-plato.agotado .mini { opacity: .5; }

/* ---------- reportes del restaurante ---------- */
.tiles-rep { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles-rep > div { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--sombra); }
.tiles-rep b { display: block; font-size: 22px; color: var(--verde); letter-spacing: -.3px; }
.tiles-rep span { font-size: 12.5px; color: var(--gris); }
.fila-rep { margin: 0 0 10px; }
.fr-txt { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.fr-txt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-txt b { white-space: nowrap; }
.fr-barra { height: 8px; background: var(--crema); border-radius: 6px; overflow: hidden; }
.fr-barra i { display: block; height: 100%; background: var(--naranja); border-radius: 6px; }
.pestanas button { white-space: nowrap; }

/* ---------- modo cocina: pantalla grande para cocina o caja ---------- */
.contenedor-cocina { padding: 12px 14px 40px; max-width: 1500px; margin: 0 auto; }
.modo-cocina .barra button { white-space: nowrap; }
.cocina-cols { display: grid; gap: 14px; }
.col-cocina h3 { margin: 4px 0 10px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.col-cocina h3 span { background: var(--verde); color: #fff; border-radius: 20px; font-size: 14px; padding: 1px 10px; }
.col-cocina.c-nuevo h3 span { background: var(--naranja); }
@media (min-width: 700px) { .cocina-cols { grid-template-columns: repeat(2, 1fr); align-items: start; } }
@media (min-width: 900px) {
  .cocina-cols { grid-template-columns: repeat(2, 1fr); align-items: start; }
  .col-cocina { background: rgba(0, 0, 0, .03); border-radius: 14px; padding: 10px; min-height: 60vh; }
  .modo-cocina .pedido-cab b { font-size: 19px; }
  .modo-cocina .pedido-items { font-size: 18px; line-height: 1.45; }
  .modo-cocina .pedido-det { font-size: 15px; }
}

/* elegir un punto en el mapa */
.mapa-elegir { position: relative; height: min(48vh, 360px); border-radius: 12px; overflow: hidden; background: var(--crema); }
#ub-mapa { position: absolute; inset: 0; }
.pin-centro { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -92%); font-size: 36px; line-height: 1; pointer-events: none; z-index: 500; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.ub-res { max-height: 190px; overflow-y: auto; margin-bottom: 6px; }
.ub-item { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font: inherit; cursor: pointer; }
.ub-item b { display: block; font-size: 14.5px; }
.ub-item small { color: var(--gris); font-size: 12.5px; }

/* fotos del repartidor: perfil editable y foto del vehículo completa (sin taparse con el texto) */
.foto-editable { position: relative; cursor: pointer; overflow: visible; }
.foto-editable .ffg-in { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.foto-editable .ffg-in img { width: 100%; height: 100%; object-fit: cover; }
.foto-lapiz { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); font-size: 17px; display: flex; align-items: center; justify-content: center; }
.foto-veh { overflow: hidden; }
.foto-veh:has(img) { max-height: none; display: block; background: #111; }
.foto-veh img { display: block; width: 100%; max-height: 45vh; object-fit: contain; cursor: zoom-in; }

@media (min-width: 1100px) { .cocina-cols { grid-template-columns: repeat(4, 1fr); } }
.col-cocina.c-camino h3 span { background: #2b6cb0; }
.col-cocina.c-camino .pedido { opacity: .92; }

/* botón ACCESO (restaurantes, repartidores, admin) al pie del inicio */
.pie-acceso { display: flex; justify-content: center; padding: 6px 0 120px; }
.btn-acceso { width: 92px; height: 92px; border-radius: 50%; border: 0; background: #111; color: #fff; font: inherit; font-weight: 800; font-size: 14px; letter-spacing: 1.5px; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.btn-acceso span { font-size: 22px; letter-spacing: 0; }
.btn-acceso:active { transform: scale(.96); }
.accesos-lista { display: grid; gap: 10px; margin: 6px 0 4px; }
.acceso-op { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: #111; color: #fff; text-decoration: none; }
.acceso-op b { display: block; font-size: 18px; }
.acceso-op small { display: block; opacity: .75; font-size: 13px; margin-top: 2px; }
.acceso-op .ico { font-size: 30px; }

/* ---- documentos, contrato y firma del repartidor ---- */
.docs-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.doc-foto small{display:block;text-align:center;font-size:12.5px;color:var(--gris);margin-top:4px}
.doc-foto .foto-veh{display:flex;align-items:center;justify-content:center;font-size:26px}
.contrato-caja{max-height:300px;overflow:auto;border:1px solid var(--borde);border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.5;background:#fbfaf6}
.contrato-caja p{margin:8px 0}
.firma-caja{position:relative;border:2px dashed var(--borde);border-radius:12px;background:#fff;height:160px;margin-top:6px;touch-action:none}
.firma-caja canvas{width:100%;height:100%;display:block;touch-action:none}
.firma-caja span{position:absolute;left:0;right:0;bottom:28px;text-align:center;color:#aaa;pointer-events:none;font-size:14px;border-top:1px solid #ddd;margin:0 20px;padding-top:4px}
/* ---- efectivo y calificaciones ---- */
.nota-ped{background:#eef5f0;border-radius:8px;padding:7px 10px;font-size:13.5px;margin:6px 0}
.nota-ped.deuda{background:#fff4e0}
.estrellas{color:#e6a700;letter-spacing:1px}
.calif-prom{font-size:15px;margin-bottom:6px}.calif-prom b{font-size:20px}
.calif-item{border-top:1px solid var(--borde);padding:7px 0;font-size:13.5px}.calif-item p{margin:3px 0 0;color:var(--tinta)}
.calif-elegir{display:flex;gap:6px;justify-content:center;font-size:36px;margin:6px 0 10px}
.calif-elegir button{background:none;border:0;font-size:36px;color:#ccc;cursor:pointer;padding:0 2px}
.calif-elegir button.on{color:#e6a700}
.chip-conf{display:inline-block;background:#eef5f0;border-radius:20px;padding:2px 9px;font-size:12.5px;margin:2px 0}
