/* Letras alojadas aquí mismo (sin ir a Google): carga más rápida. Licencia OFL en /fuentes. */
@font-face { font-family: Sora; src: url('/fuentes/sora.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fuentes/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

/* Estilos compartidos · Marca Sólida */
:root {
  --azul: #1B396B;
  --oscuro: #0d1e3a;
  --texto: #0f1f38;
  --texto2: #4a5c78;
  --texto3: #33445f;
  --teal: #34b9a7;
  --enlace: #1f7f73;
  --menta: #E8F6F6;
  --fondo: #f5f9fb;
  --borde: #e2ebf0;
  --borde2: #d5e2ea;
  --ambar-borde: #f0b54a;
  --ambar-fondo: #fffaf0;
  --ambar-texto: #6b4e12;
  --rojo: #b3261e;
  --sombra: 0 10px 26px rgba(16, 39, 74, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 500 16px/1.45 Manrope, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--enlace); }
h1, h2, h3, .sora { font-family: Sora, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--fondo); position: relative; }
.app.con-nav { padding-bottom: 84px; }

/* Encabezado */
.cab { background: var(--azul); color: #fff; padding: 18px 16px 20px; display: flex; align-items: center; gap: 12px; }
.cab.oscuro { background: var(--oscuro); }
.cab.verde { background: var(--enlace); }
.cab .logo { width: 46px; height: 46px; border-radius: 14px; background: var(--teal); color: var(--oscuro); display: flex; align-items: center; justify-content: center; font: 800 17px Sora, sans-serif; flex: none; }
.cab .sub { font-size: 13.5px; color: #d4e2f2; font-weight: 700; }
.cab.oscuro .sub { color: #a9b9cf; }
.cab .tit { font: 800 22px/1.15 Sora, sans-serif; margin: 0; }
.cab .grande { font: 800 28px/1.15 Sora, sans-serif; }
.cab .atras { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: #fff; background: transparent; border: 0; flex: none; margin-left: -8px; cursor: pointer; }
.cab .flex1 { flex: 1; min-width: 0; }

.cuerpo { padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

/* Tarjetas */
.card { background: #fff; border: 1px solid var(--borde); border-radius: 20px; padding: 16px; box-shadow: var(--sombra); }
.card.menta { background: var(--menta); border-color: #c7e9e4; }
.card.azul { background: var(--azul); border-color: var(--azul); color: #fff; }
.card.verde { background: var(--enlace); border-color: var(--enlace); color: #fff; }
.card.ambar { border: 2.5px solid var(--ambar-borde); background: var(--ambar-fondo); }
.card.marcada { border: 2.5px solid var(--teal); }
.card.marcada-azul { border: 2.5px solid var(--azul); }
.kick { font: 800 12px Manrope, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--enlace); margin: 0; }
.kick.gris { color: var(--texto2); }
.h2 { margin: 4px 0 12px; font: 800 21px/1.2 Sora, sans-serif; color: var(--azul); }
.h1 { margin: 0; font: 800 28px/1.2 Sora, sans-serif; color: var(--azul); }
.nota { margin: 0; font-size: 14px; color: var(--texto2); font-weight: 600; }
.centro { text-align: center; }
.fila-dato { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 6px 0; color: var(--texto3); font-weight: 600; }
.fila-dato b { color: var(--texto); text-align: right; }
.fila-dato.total { border-top: 1px dashed #c9d8ea; margin-top: 6px; padding-top: 12px; align-items: baseline; }
.fila-dato.total span { font: 800 18px Sora, sans-serif; color: var(--texto); }
.fila-dato.total b { font: 800 26px Sora, sans-serif; color: var(--azul); }

/* Botones */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 20px; border-radius: 999px; text-decoration: none; font: 800 18px Sora, sans-serif; border: 0; cursor: pointer; width: 100%; text-align: center; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.solido { background: var(--azul); color: #fff; }
.btn.teal { background: var(--teal); color: var(--oscuro); }
.btn.blanco { background: #fff; color: var(--enlace); }
.btn.contorno { background: #fff; color: var(--enlace); border: 1.5px solid var(--enlace); min-height: 54px; font-size: 16px; }
.btn.contorno-azul { background: #fff; color: var(--azul); border: 1.5px solid var(--azul); min-height: 54px; font-size: 16px; }
.btn.rojo { background: #fff; color: var(--rojo); border: 1.5px solid #e6b3ae; min-height: 54px; font-size: 16px; }
.btn.chico { min-height: 48px; font-size: 15px; width: auto; padding: 0 18px; }
.btn.enorme { min-height: 68px; font-size: 19px; }
.enlace { background: none; border: 0; color: var(--enlace); font-weight: 800; font-size: 15px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cuatro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }

/* Chips (opciones) */
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--borde2); background: #fff; font: 700 15.5px Manrope, sans-serif; color: var(--texto); cursor: pointer; text-align: center; line-height: 1.2; }
.chip[aria-pressed="true"], .chip.on { background: var(--azul); border-color: var(--azul); color: #fff; }
.chip.suave[aria-pressed="true"] { background: var(--menta); border-color: var(--teal); color: #1a6b61; }

/* Contador +/- */
.contador { display: flex; align-items: center; justify-content: space-between; background: var(--fondo); border-radius: 18px; padding: 8px; margin-top: 14px; gap: 8px; }
.contador button { width: 60px; height: 60px; border-radius: 999px; border: 1.5px solid var(--borde2); background: #fff; font: 800 28px Sora, sans-serif; color: var(--azul); flex: none; cursor: pointer; }
.contador button.mas { background: var(--azul); color: #fff; border: 0; }
.contador input { width: 100%; min-width: 0; text-align: center; border: 0; background: transparent; font: 800 40px/1 Sora, sans-serif; color: var(--azul); padding: 0; }
.contador .uni { font-size: 14px; font-weight: 700; color: var(--texto2); text-align: center; }
.rapidos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rapidos .chip { min-height: 48px; flex: 1 1 70px; }

/* Formularios */
.campo { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.campo label, .etq { font: 800 15px Manrope, sans-serif; color: var(--texto); }
.campo label small, .etq small { display: block; font-weight: 600; font-size: 13px; color: var(--texto2); }
.entrada { width: 100%; min-height: 56px; border-radius: 16px; border: 1.5px solid var(--borde2); background: #fff; padding: 12px 16px; font: 600 17px Manrope, sans-serif; color: var(--texto); }
.entrada:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 3px #d4e2f2; }
textarea.entrada { min-height: 88px; resize: vertical; }
.entrada.gigante { min-height: 68px; font: 800 30px Sora, sans-serif; color: var(--azul); border: 2px solid var(--azul); }
.error { color: var(--rojo); font-weight: 700; font-size: 14.5px; margin: 0; }

/* Opciones grandes de radio (forma de pago) */
.opc { display: flex; gap: 14px; align-items: center; min-height: 78px; padding: 12px 14px; border-radius: 18px; border: 1.5px solid var(--borde2); background: #fff; color: var(--texto); width: 100%; text-align: left; cursor: pointer; }
.opc[aria-checked="true"] { border: 2.5px solid var(--azul); background: #f2f6fc; }
.opc .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--menta); display: flex; align-items: center; justify-content: center; flex: none; color: var(--azul); }
.opc b { display: block; font: 800 17px Sora, sans-serif; }
.opc span.d { font-size: 14px; color: var(--texto2); font-weight: 600; }
.opc .radio { width: 24px; height: 24px; border-radius: 999px; border: 2px solid #c9d8ea; margin-left: auto; flex: none; }
.opc[aria-checked="true"] .radio { border: 7px solid var(--azul); }
.pill { display: inline-block; font: 800 11.5px Manrope, sans-serif; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: #e3f4f1; color: #1a6b61; margin-top: 4px; }
.pill.ambar { background: #fdf0d5; color: var(--ambar-texto); }
.pill.gris { background: #eef3f7; color: var(--texto2); }
.pill.azul { background: #e5ecf7; color: var(--azul); }

/* Pasos (seguimiento) */
.paso { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.paso .dot { width: 30px; height: 30px; border-radius: 999px; flex: none; display: flex; align-items: center; justify-content: center; border: 2px solid #c9d8ea; }
.paso.hecho .dot { background: var(--enlace); border: 0; }
.paso.ahora .dot { background: var(--azul); border: 0; box-shadow: 0 0 0 6px #d4e2f2; }
.paso b { display: block; font-size: 16px; }
.paso.pend b { color: var(--texto2); }
.paso.ahora b { color: var(--azul); }
.paso .num { color: #fff; font-size: 14px; }
.paso span:not(.num):not(.dot) { font-size: 14px; color: var(--texto2); font-weight: 600; }

/* Datos con botón copiar */
.dato { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.dato:last-child { border-bottom: 0; }
.dato span { display: block; font-size: 13px; color: var(--texto2); font-weight: 700; }
.dato b { display: block; font: 800 17px/1.3 Sora, sans-serif; color: var(--texto); letter-spacing: .02em; word-break: break-word; }
.copiar { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--enlace); background: #fff; color: var(--enlace); font: 800 14px Manrope, sans-serif; cursor: pointer; }
.copiar.ok { background: var(--enlace); color: #fff; }
.num { width: 30px; height: 30px; border-radius: 999px; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 14px Sora, sans-serif; flex: none; }

/* Navegación inferior */
.nav { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; bottom: 0; min-height: 74px; background: #fff; border-top: 1px solid var(--borde); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 700 12.5px Manrope, sans-serif; color: var(--texto2); text-decoration: none; min-height: 64px; }
.nav a[aria-current="page"] { color: var(--azul); }

/* Lista (fila del día, pedidos) */
.lista-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--borde); text-decoration: none; color: var(--texto); min-height: 64px; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.lista-item:last-child { border-bottom: 0; }
.lista-item .n { width: 34px; height: 34px; border-radius: 999px; background: var(--menta); color: var(--azul); display: flex; align-items: center; justify-content: center; font: 800 15px Sora, sans-serif; flex: none; }
.lista-item b { display: block; font-size: 16px; }
.lista-item span.d { font-size: 14px; color: var(--texto2); font-weight: 600; }
.lista-item .der { margin-left: auto; text-align: right; flex: none; font: 800 16px Sora, sans-serif; color: var(--azul); }

/* Estrellas */
.estrellas { display: flex; justify-content: center; gap: 2px; }
.estrella { width: 54px; height: 54px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #d5e2ea; }
.estrella.on { color: #f2b632; }

/* Mapa */
.mapa { height: 260px; border-radius: 16px; overflow: hidden; background: #e3eef3; position: relative; z-index: 0; }
.mapa-pin-ayuda { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 500; background: rgba(255,255,255,.95); border-radius: 12px; padding: 8px 10px; font-size: 13.5px; font-weight: 700; color: var(--texto3); pointer-events: none; }

/* Calendario */
.meses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mes { border-radius: 14px; padding: 8px 4px; text-align: center; background: var(--fondo); min-height: 66px; }
.mes > span { display: block; font: 800 12px Manrope, sans-serif; color: var(--texto2); text-transform: uppercase; letter-spacing: .06em; }
.mes b, .mes i { display: inline-flex; margin: 4px 1px 0; min-width: 30px; height: 30px; border-radius: 999px; align-items: center; justify-content: center; font: 800 13px Sora, sans-serif; font-style: normal; padding: 0 6px; }
.mes b { background: var(--azul); color: #fff; }
.mes i { border: 2px dashed var(--enlace); color: var(--enlace); }
.datos4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.datos4 > div { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 10px 12px; }
.datos4 b { display: block; font: 800 22px/1.1 Sora, sans-serif; color: var(--azul); }
.datos4 span { font-size: 13px; font-weight: 700; color: var(--texto2); }

/* Avisos y carga */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--oscuro); color: #fff; padding: 14px 18px; border-radius: 16px; font-weight: 700; z-index: 1000; max-width: calc(100% - 32px); box-shadow: 0 12px 30px rgba(0,0,0,.25); text-align: center; }
.toast.mal { background: var(--rojo); }
.girando { width: 44px; height: 44px; border-radius: 999px; border: 4px solid var(--borde2); border-top-color: var(--azul); flex: none; animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .girando { animation-duration: 3s; } }
.progreso { display: flex; gap: 6px; margin: 0 0 4px; }
.progreso i { flex: 1; height: 6px; border-radius: 999px; background: var(--borde2); }
.progreso i.on { background: var(--teal); }
.vacio { text-align: center; padding: 28px 12px; color: var(--texto2); font-weight: 700; }
.foto-mini { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-top: 10px; border: 1px solid var(--borde); }
.quitar-foto { display: block; margin: 8px auto 0; min-height: 44px; padding: 0 12px; color: #9a2c1f; }
.quitar-foto[hidden] { display: none; }
.aviso-banda { background: var(--teal); border-radius: 22px; padding: 20px 18px; color: var(--oscuro); display: flex; flex-direction: column; gap: 10px; }
.aviso-banda .t { font: 800 24px/1.15 Sora, sans-serif; }
.estado-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--teal); color: var(--oscuro); font: 800 13.5px Manrope, sans-serif; border: 0; cursor: pointer; }
.estado-chip.apagado { background: #3a4a66; color: #fff; }
.estado-chip i { width: 10px; height: 10px; border-radius: 999px; background: currentColor; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Panel del dueño (pantalla ancha) */
.panel { max-width: none; }
.panel-cab { background: var(--azul); padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.panel-cab .marca { display: flex; align-items: center; gap: 10px; color: #fff; }
.panel-cab .marca .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--teal); color: var(--oscuro); display: flex; align-items: center; justify-content: center; font: 800 15px Sora, sans-serif; }
.panel-cab .marca b { font: 800 16px Sora, sans-serif; display: block; }
.panel-cab .marca small { font-size: 11px; letter-spacing: .18em; color: var(--teal); text-transform: uppercase; font-weight: 800; }
.menu { display: flex; flex-wrap: wrap; gap: 4px; }
.menu a { color: #d4e2f2; text-decoration: none; font-weight: 700; font-size: 15px; min-height: 48px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; }
.menu a[aria-current="page"] { background: #fff; color: var(--azul); }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; width: 100%; }
.columnas { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.columnas > * { flex: 1 1 340px; min-width: 0; }
.srv { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 64px; padding: 10px 16px; border-radius: 16px; border: 1.5px solid var(--borde2); background: #fff; color: var(--texto); text-decoration: none; width: 100%; cursor: pointer; text-align: left; }
.srv[aria-current="true"] { border: 2.5px solid var(--azul); background: #f2f6fc; }
.srv b { display: block; font: 800 16px Sora, sans-serif; }
.srv span { font-size: 13.5px; color: var(--texto2); font-weight: 600; }
.srv i { font: 800 17px Sora, sans-serif; font-style: normal; color: var(--azul); }
.costo { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.costo .nom { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.costo .nom input { border: 0; padding: 4px 0; font: 800 15px Manrope, sans-serif; background: transparent; min-height: 36px; }
.costo .nom input.det { font: 600 13px Manrope, sans-serif; color: var(--texto2); min-height: 28px; }
.costo .monto { width: 130px; flex: none; text-align: right; }
.costo .quitar { width: 44px; height: 44px; border: 0; background: transparent; color: var(--texto2); border-radius: 999px; cursor: pointer; font-size: 22px; flex: none; }
.res { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; font-weight: 600; color: #d4e2f2; }
.res b { color: #fff; font: 800 17px Sora, sans-serif; }
.tabla { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabla th { text-align: left; font: 800 12px Manrope, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--texto2); padding: 10px 8px; border-bottom: 1px solid var(--borde); }
.tabla td { padding: 12px 8px; border-bottom: 1px solid var(--borde); vertical-align: top; }
.tabla-caja { overflow-x: auto; }
.sw { width: 60px; height: 34px; border-radius: 999px; border: 0; background: #c9d8ea; position: relative; cursor: pointer; flex: none; }
.sw::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 999px; background: #fff; transition: left .15s; }
.sw[aria-checked="true"] { background: var(--enlace); }
.sw[aria-checked="true"]::after { left: 30px; }
.top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.top .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--menta); color: var(--azul); display: flex; align-items: center; justify-content: center; flex: none; }
.top b { display: block; font: 800 18px Sora, sans-serif; }
.top span { font-size: 14px; color: var(--texto2); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpis > div { background: #fff; border: 1px solid var(--borde); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); }
.kpis b { display: block; font: 800 26px/1.1 Sora, sans-serif; color: var(--azul); }
.kpis span { font-size: 13.5px; font-weight: 700; color: var(--texto2); }
.acciones-fila { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acciones-fila .btn { flex: 1 1 150px; min-height: 52px; font-size: 15.5px; }
@media (max-width: 640px) { .contenedor { padding: 20px 16px 40px; } .panel-cab { padding: 12px 16px; } .costo .monto { width: 110px; } }
.estrella.fija { width: 44px; height: 44px; cursor: default; }

/* ============ Panel (rediseño para PC y celular) ============ */
.panel { max-width: none; background: var(--fondo); }
.pn { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.pn-lado { background: var(--azul); color: #fff; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; position: sticky; top: 0; z-index: 30; }
.pn-marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pn-marca .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--teal); color: var(--oscuro); display: flex; align-items: center; justify-content: center; font: 800 15px Sora, sans-serif; flex: none; }
.pn-marca b { display: block; font: 800 16px/1.2 Sora, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-marca small { font-size: 11px; letter-spacing: .14em; color: var(--teal); text-transform: uppercase; font-weight: 800; }
.pn-volver { display: inline-flex; align-items: center; gap: 6px; color: #d4e2f2; font-weight: 800; font-size: 14px; text-decoration: none; min-height: 44px; }
.pn-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.pn-nav::-webkit-scrollbar { display: none; }
.pn-nav a { display: inline-flex; align-items: center; gap: 10px; color: #d4e2f2; text-decoration: none; font-weight: 700; font-size: 15px; min-height: 46px; padding: 0 14px; border-radius: 999px; white-space: nowrap; flex: none; }
.pn-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.pn-nav a[aria-current="page"] { background: #fff; color: var(--azul); }
.pn-badge { font-style: normal; margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ambar-borde); color: #3d2a05; font: 800 12px/22px Manrope, sans-serif; text-align: center; }
.pn-pie { display: none; }
.pn-main { min-width: 0; display: flex; flex-direction: column; }
.pn-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; padding: 22px 16px 4px; }
.pn-top h1 { margin: 0; font: 800 26px/1.2 Sora, sans-serif; color: var(--azul); }
.pn-top p { margin: 4px 0 0; font-size: 15px; color: var(--texto2); font-weight: 600; max-width: 70ch; }
.pn-top-a { display: flex; gap: 8px; flex-wrap: wrap; }
.pn-cont { padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 20px; width: 100%; }

.pn-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pn-kpis > div { background: #fff; border: 1px solid var(--borde); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pn-kpis span { font: 800 12px Manrope, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--texto2); }
.pn-kpis b { font: 800 26px/1.15 Sora, sans-serif; color: var(--azul); }
.pn-kpis small { font-size: 13px; font-weight: 600; color: var(--texto2); }
.pn-kpis > .alerta { border: 2px solid var(--ambar-borde); background: var(--ambar-fondo); }
.pn-kpis > .alerta b { color: var(--ambar-texto); }

.pn-hoy, .pn-dos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.pn-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pn-sec-t { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; justify-content: space-between; }
.pn-sec-t h2, .pn-h2 { margin: 0; font: 800 18px/1.25 Sora, sans-serif; color: var(--azul); }
.pn-h2 { margin-bottom: 10px; }
.pn-cuenta { min-width: 28px; height: 28px; border-radius: 999px; background: #e5ecf7; color: var(--azul); font: 800 13px/28px Sora, sans-serif; text-align: center; padding: 0 8px; margin-right: auto; }
.pn-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.pn-pedido { display: flex; flex-direction: column; gap: 4px; }
.pn-pedido .nota { margin: 0; }
.pn-pedido h3 { margin: 6px 0 2px; font: 800 18px/1.25 Sora, sans-serif; color: var(--azul); }
.pn-pedido-cab { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--texto2); }
.pn-mini { margin: 10px 0 0; font: 800 14px Manrope, sans-serif; }
.pn-botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pn-botones .btn { flex: 1 1 110px; }
.pn-vacio { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--texto2); font-weight: 700; padding: 22px 12px; text-align: center; }
.pn-vacio svg { color: var(--enlace); }
.pn-lista { padding-top: 4px; padding-bottom: 4px; }
.pn-fila { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "h p" "h e"; gap: 2px 14px; padding: 12px 0; border-bottom: 1px solid var(--borde); align-items: center; }
.pn-fila:last-child { border-bottom: 0; }
.pn-fila-h { grid-area: h; text-align: center; background: var(--fondo); border-radius: 12px; padding: 8px 4px; align-self: start; }
.pn-fila-h b { display: block; font: 800 16px Sora, sans-serif; color: var(--azul); }
.pn-fila-h small { font-size: 11.5px; font-weight: 700; color: var(--texto2); }
.pn-fila-p { grid-area: p; min-width: 0; }
.pn-fila-p b { display: block; font-size: 15.5px; }
.pn-fila-p span { display: block; font-size: 14px; color: var(--texto2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-fila-r { display: none; font-weight: 700; color: var(--texto3); }
.pn-fila-e { grid-area: e; }
.pn-rep { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.pn-rep:last-child { border-bottom: 0; }
.pn-rep i { width: 12px; height: 12px; border-radius: 999px; background: #c9d8ea; flex: none; }
.pn-rep i.on { background: var(--enlace); box-shadow: 0 0 0 4px #d7efeb; }
.pn-rep div { flex: 1; min-width: 0; }
.pn-rep b { display: block; font-size: 15px; }
.pn-rep span { font-size: 13px; color: var(--texto2); font-weight: 600; }
.pn-rep em { font-style: normal; font: 800 13px Manrope, sans-serif; color: var(--azul); background: #e5ecf7; border-radius: 999px; padding: 4px 10px; flex: none; }
.pn-barra { margin-top: 10px; }
.pn-barra-t { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; color: var(--texto3); }
.pn-barra-b { height: 10px; border-radius: 999px; background: var(--fondo); margin-top: 6px; overflow: hidden; }
.pn-barra-b i { display: block; height: 100%; border-radius: 999px; background: var(--teal); }

.pn-barra-h { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.pn-seg { display: flex; gap: 4px; background: #fff; border: 1px solid var(--borde); border-radius: 999px; padding: 4px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.pn-seg a { white-space: nowrap; text-decoration: none; color: var(--texto3); font-weight: 700; font-size: 14.5px; min-height: 42px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; }
.pn-seg a[aria-current="true"] { background: var(--azul); color: #fff; }
.pn-buscar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--borde2); border-radius: 999px; padding: 0 16px; min-height: 50px; flex: 1 1 260px; max-width: 420px; color: var(--texto2); }
.pn-buscar:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px #d4e2f2; }
.pn-buscar input { border: 0; outline: 0; background: transparent; font: 600 16px Manrope, sans-serif; width: 100%; min-height: 46px; }
.pn-tabla-caja { padding: 4px 0; }
.pn-tabla { font-size: 14.5px; }
.pn-tabla th { position: sticky; top: 0; background: #fff; padding: 12px 14px; }
.pn-tabla td { padding: 12px 14px; vertical-align: middle; }
.pn-tabla tbody tr:hover { background: #f8fbfd; }
.pn-tabla .der { text-align: right; }
.pn-pdf { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; min-height: 40px; }
.estrellitas { color: #f2b632; letter-spacing: 1px; white-space: nowrap; }
.estrellitas span { color: #d5e2ea; }
/* En celular la tabla se vuelve tarjetas. */
@media (max-width: 759px) {
  .pn-tabla thead { display: none; }
  .pn-tabla, .pn-tabla tbody, .pn-tabla tr, .pn-tabla td { display: block; width: 100%; }
  .pn-tabla tr { padding: 10px 16px; border-bottom: 1px solid var(--borde); }
  .pn-tabla td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .pn-tabla td::before { content: attr(data-l); font-weight: 700; color: var(--texto2); text-align: left; }
  .pn-tabla td[data-l=""]::before { content: none; }
  .pn-tabla td[colspan] { display: block; }
}

.pn-srv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.pn-srv-lista { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pn-srv-lista .srv { flex: 0 0 240px; }
.pn-srv-vista { position: static; }
.pn-margen { margin: 14px 0 10px; }
.pn-margen div { height: 10px; border-radius: 999px; background: var(--teal); overflow: hidden; }
.pn-margen i { display: block; height: 100%; background: rgba(255,255,255,.28); }
.pn-margen span { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: #d4e2f2; }
.campos2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0 16px; }
.pn-pie-form { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--borde); }
.pn-pie-form .nota { flex: 1 1 280px; margin: 0; }
.pn-rep-cab { display: flex; gap: 12px; align-items: center; }
.pn-rep-cab b { display: block; font: 800 17px Sora, sans-serif; color: var(--azul); }
.pn-rep-cab span { font-size: 13.5px; color: var(--texto2); font-weight: 600; }
.pn-avatar { width: 48px; height: 48px; border-radius: 999px; background: var(--menta); color: var(--azul); display: flex; align-items: center; justify-content: center; font: 800 16px Sora, sans-serif; flex: none; }
.pn-avatar.nuevo { background: var(--teal); color: var(--oscuro); font-size: 24px; }
.pn-entrar { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.pn-entrar .app { min-height: auto; width: 100%; }

@media (min-width: 640px) {
  .pn-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pn-top { padding: 28px 24px 4px; }
  .pn-cont { padding: 16px 24px 56px; }
  .pn-fila { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "h p e"; }
}
@media (min-width: 900px) {
  .pn-fila { grid-template-columns: 64px minmax(0, 1fr) 110px 190px; grid-template-areas: "h p r e"; }
  .pn-fila-r { display: block; grid-area: r; }
  .pn-fila-e { text-align: right; }
  .pn-srv { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); grid-template-areas: "lista lista" "editor vista"; }
  .pn-srv-lista { grid-area: lista; }
  .pn-srv-editor { grid-area: editor; }
  .pn-srv-vista { grid-area: vista; position: sticky; top: 24px; }
  .pn-dos { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
/* PC: menú lateral fijo y contenido en columnas. */
@media (min-width: 1100px) {
  .pn { grid-template-columns: 264px minmax(0, 1fr); }
  .pn-lado { height: 100dvh; padding: 20px 14px; gap: 18px; }
  .pn-marca { padding: 4px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .pn-nav { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .pn-nav a { border-radius: 14px; min-height: 48px; }
  .pn-pie { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
  .pn-pie-t { margin: 0; font: 800 11px Manrope, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #a9b9cf; }
  .pn-enlace { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 12px; padding: 10px 12px; font: 700 13px Manrope, sans-serif; text-align: left; cursor: pointer; min-height: 44px; }
  .pn-enlace span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pn-enlace:hover { background: rgba(255,255,255,.14); }
  .pn-hecho { margin: 4px 0 0; font-size: 12px; color: #a9b9cf; font-weight: 600; }
  .pn-top, .pn-cont { max-width: 1480px; width: 100%; margin: 0 auto; }
  .pn-top { padding: 32px 36px 4px; }
  .pn-cont { padding: 18px 36px 64px; gap: 24px; }
  .pn-hoy { grid-template-columns: minmax(0, 1fr) 340px; }
  .pn-riel { position: sticky; top: 24px; }
  .pn-srv { grid-template-columns: 260px minmax(0, 1fr) 340px; grid-template-areas: "lista editor vista"; }
  .pn-srv-lista { flex-direction: column; overflow: visible; position: sticky; top: 24px; }
  .pn-srv-lista .srv { flex: none; }
  .pn-dos.ancho { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
}
@media (min-width: 1600px) {
  .pn-hoy { grid-template-columns: minmax(0, 1fr) 380px; }
  .pn-srv { grid-template-columns: 280px minmax(0, 1fr) 380px; }
}

/* Ajustes del rediseño */
.pn { grid-template-columns: minmax(0, 1fr); }
.pn-lado, .pn-main { min-width: 0; }
.campos2 { align-items: end; }
.pn-rejilla { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.pn-pedido { container-type: inline-size; }
.pn-pedido-in { display: grid; gap: 4px 28px; }
.pn-pedido-acc { display: flex; flex-direction: column; }
@container (min-width: 640px) {
  .pn-pedido-in { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; }
  .pn-pedido-acc .campo:first-child, .pn-pedido-acc .pn-mini:first-child, .pn-pedido-acc > input + .pn-mini { margin-top: 0; }
}
.pn-calif { white-space: nowrap; }
@media (min-width: 1100px) {
  .pn { grid-template-columns: 264px minmax(0, 1fr); background: linear-gradient(to right, var(--azul) 264px, var(--fondo) 264px); }
}

/* ============ Pantallas de entrada (celular primero) ============ */
.acc { min-height: 100dvh; display: flex; flex-direction: column; background: var(--azul); }
.acc.oscuro { background: var(--oscuro); }
.acc-hero { color: #fff; text-align: center; padding: calc(36px + env(safe-area-inset-top)) 24px 48px; display: flex; flex-direction: column; align-items: center; }
.acc-icono { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.acc-neg { margin: 18px 0 0; font: 800 12.5px Manrope, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.acc-hero h1 { margin: 6px 0 0; font: 800 28px/1.15 Sora, sans-serif; max-width: 16ch; }
.acc-sub { margin: 10px 0 0; font-size: 15.5px; line-height: 1.45; color: #d4e2f2; font-weight: 600; max-width: 34ch; }
.acc-hoja { flex: 1; background: var(--fondo); border-radius: 28px 28px 0 0; margin-top: -24px; padding: 26px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; width: 100%; }
.acc-form { display: flex; flex-direction: column; gap: 4px; }
.acc-form .campo:first-child { margin-top: 0; }
.acc-form .btn { margin-top: 14px; }
.acc-titulo { margin: 0; font: 800 19px/1.25 Sora, sans-serif; color: var(--azul); }
.btn-llave { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; border-radius: 18px; border: 0; width: 100%; background: var(--azul); color: #fff; font: 800 17.5px Sora, sans-serif; cursor: pointer; box-shadow: 0 10px 22px rgba(27,57,107,.22); }
.btn-llave svg { color: var(--teal); }
.acc-o { display: flex; align-items: center; gap: 12px; color: var(--texto2); font: 700 13.5px Manrope, sans-serif; margin: 4px 0; }
.acc-o::before, .acc-o::after { content: ''; flex: 1; height: 1px; background: var(--borde2); }
.acc-clave { position: relative; }
.acc-clave .entrada { padding-right: 92px; }
.acc-clave button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--enlace); font: 800 14px Manrope, sans-serif; cursor: pointer; border-radius: 12px; }
.entrada.nip { font: 800 26px Sora, sans-serif; letter-spacing: .5em; text-align: center; padding-left: calc(16px + .5em); }
.entrada.nip::placeholder { letter-spacing: .3em; color: #b9c8d8; }
.acc-nota { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 14px; font-size: 14px; color: var(--texto3); font-weight: 600; line-height: 1.45; }
.acc-nota svg { color: var(--enlace); flex: none; margin-top: 1px; }
.acc-nota b { color: var(--texto); }
.acc-ayuda { text-align: center; font-size: 14px; color: var(--texto2); font-weight: 600; margin: 0; }
.acc-oferta { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.acc-oferta .grande { width: 88px; height: 88px; border-radius: 28px; background: var(--menta); color: var(--azul); display: flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  .acc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr); }
  .acc-hero { justify-content: center; padding: 48px; }
  .acc-icono { width: 112px; height: 112px; border-radius: 28px; }
  .acc-hero h1 { font-size: 40px; }
  .acc-sub { font-size: 17px; }
  .acc-hoja { margin: 0; border-radius: 0; justify-content: center; padding: 48px max(48px, calc((100% - 420px) / 2)); }
}
.app.acc-raiz { max-width: none; }

/* Cliente de repartidor independiente: perfil de la persona */
.ind-cab { display: flex; gap: 14px; align-items: center; }
.ind-avatar { position: relative; width: 72px; height: 72px; border-radius: 999px; background: var(--teal); color: var(--oscuro); display: flex; align-items: center; justify-content: center; font: 800 24px Sora, sans-serif; flex: none; }
.ind-avatar i { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; border-radius: 999px; background: #a9b9cf; border: 3px solid #fff; }
.ind-avatar i.on { background: #1f9e5a; }
.ind-nombre { margin: 2px 0 2px; font: 800 22px/1.2 Sora, sans-serif; color: var(--azul); }
.ind-estado { margin: 12px 0 0; display: inline-flex; align-items: center; gap: 8px; font: 800 13.5px Manrope, sans-serif; color: var(--texto2); background: #eef3f7; border-radius: 999px; padding: 6px 12px; }
.ind-estado::before { content: ''; width: 9px; height: 9px; border-radius: 999px; background: #a9b9cf; }
.ind-estado.on { color: #15603a; background: #e3f4ea; }
.ind-estado.on::before { background: #1f9e5a; }
.ind-datos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ind-datos > div { background: var(--fondo); border-radius: 14px; padding: 10px; text-align: center; }
.ind-datos b { display: block; font: 800 17px/1.2 Sora, sans-serif; color: var(--azul); }
.ind-datos span { font-size: 12.5px; font-weight: 700; color: var(--texto2); }

/* Horario de servicio (panel) */
.hor-lista { display: flex; flex-direction: column; }
.hor-dia { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-bottom: 1px solid var(--borde); min-height: 64px; }
.hor-dia:last-child { border-bottom: 0; }
.hor-sw { display: flex; align-items: center; gap: 10px; min-width: 130px; min-height: 48px; font-weight: 800; cursor: pointer; }
.hor-sw input { width: 24px; height: 24px; accent-color: var(--enlace); }
.hor-horas { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; }
.hor-horas .entrada { min-height: 48px; padding: 8px 12px; flex: 1; min-width: 0; font-size: 16px; }
.hor-horas span { font-weight: 700; color: var(--texto2); }
.hor-cerrado { color: var(--texto2); font-weight: 700; }
.hor-chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 4px; scrollbar-width: none; }
.hor-chips::-webkit-scrollbar { display: none; }
.hor-chips .chip { flex: none; min-width: 84px; }
.hor-chips.horas { flex-wrap: wrap; overflow: visible; }
.hor-chips.horas .chip { min-width: 0; flex: 1 1 76px; }

/* Recomendar a un amigo */
.recomendar { border: 2px solid #c7e9e4; background: linear-gradient(#fff, #fff) padding-box; }
.rec-cab { display: flex; gap: 12px; align-items: flex-start; }
.rec-ic { position: relative; width: 48px; height: 48px; border-radius: 16px; background: var(--menta); color: var(--azul); display: flex; align-items: center; justify-content: center; flex: none; }
.rec-ic b { position: absolute; right: -4px; top: -4px; width: 22px; height: 22px; border-radius: 999px; background: var(--teal); color: var(--oscuro); font: 800 16px/22px Sora, sans-serif; text-align: center; }
.rec-t { display: block; font: 800 17px/1.25 Sora, sans-serif; color: var(--azul); margin-bottom: 2px; }
.rec-botones { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rec-botones .contorno { width: 100%; }
.btn.rec-wa { background: #157a45; color: #fff; min-height: 56px; font-size: 16.5px; }
.rec-gracias { margin-top: 10px; color: var(--enlace); font-weight: 800; text-align: center; }
.pn-tabla .pill { white-space: nowrap; }

/* Aviso de sin conexión */
.sin-red { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 2000; background: #6b4e12; color: #fff; font: 700 14px Manrope, sans-serif; padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 22px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }

/* Buscador de direcciones */
.busca { position: relative; margin-top: 10px; z-index: 600; }
.busca-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--borde2); border-radius: 16px; box-shadow: 0 14px 34px rgba(16,39,74,.18); overflow: hidden; }
.busca-op { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--borde); padding: 12px; min-height: 56px; cursor: pointer; color: var(--azul); }
.busca-op:last-child { border-bottom: 0; }
.busca-op:hover, .busca-op:focus-visible { background: var(--fondo); }
.busca-op span { display: flex; flex-direction: column; }
.busca-op b { color: var(--texto); font-size: 15.5px; }
.busca-op small { color: var(--texto2); font-weight: 600; font-size: 13px; }

/* ============ Finanzas ============ */
:root { --serie-v: #2f63c0; --serie-g: #16917f; }
.fn-delta { font-size: 13px; font-weight: 700; color: var(--texto2); }
.fn-delta.sube { color: #15603a; }
.fn-delta.baja { color: #9a2c1f; }
.fn-cab { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.fn-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 14px; font-weight: 700; color: var(--texto3); }
.fn-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.fn-leyenda i, .gr-tip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
i.v { background: var(--serie-v); } i.g { background: var(--serie-g); }

.gr { display: grid; grid-template-columns: 48px minmax(0, 1fr); height: 260px; }
.gr-eje { position: relative; height: calc(100% - 26px); }
.gr-eje span { position: absolute; right: 8px; transform: translateY(50%); font-size: 12px; font-weight: 600; color: var(--texto2); white-space: nowrap; }
.gr-area { position: relative; }
.gr-linea { position: absolute; left: 0; right: 0; height: 1px; background: #e6edf2; }
.gr-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.gr-col { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 10px; min-width: 0; }
.gr-col:hover, .gr-col.activa { background: rgba(47, 99, 192, .06); }
.gr-par { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; padding: 0 2px; }
.gr-b { position: relative; width: min(24px, 40%); border-radius: 4px 4px 0 0; min-height: 0; }
.gr-b.v { background: var(--serie-v); }
.gr-b.g { background: var(--serie-g); }
.gr-b em { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font: 700 12px Manrope, sans-serif; font-style: normal; color: var(--texto); white-space: nowrap; }
.gr-mes { height: 26px; display: flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--texto2); text-transform: capitalize; }
.gr-tip { position: absolute; top: 0; transform: translateX(-50%); background: #fff; border: 1px solid var(--borde); border-radius: 12px; box-shadow: 0 10px 26px rgba(16,39,74,.16); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; font-weight: 600; color: var(--texto3); min-width: 170px; z-index: 5; pointer-events: none; }
.gr-tip b { color: var(--texto); text-transform: capitalize; }
.gr-tip span { display: flex; align-items: center; gap: 6px; }
.gr-tip em { font-style: normal; font-weight: 800; color: var(--texto); margin-left: auto; padding-left: 10px; }

.fn-tres { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; align-items: start; }
.fn-barra { margin-top: 12px; }
.fn-barra-t { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--texto3); }
.fn-barra-t b { color: var(--texto); }
.fn-barra-b { height: 10px; border-radius: 999px; background: var(--fondo); margin-top: 6px; overflow: hidden; }
.fn-barra-b i { display: block; height: 100%; border-radius: 999px; background: var(--serie-v); }
.fn-barra small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--texto2); }
.fn-mini { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.fn-mini:last-child { border-bottom: 0; }
.fn-mini b { font: 800 24px Sora, sans-serif; color: var(--azul); min-width: 48px; }
.fn-mini span { font-weight: 700; color: var(--texto3); }
.fn-dia .entrada { min-height: 48px; }
.fn-total td { background: var(--fondo); }
.pn-cambiar { padding: 0 0 0 10px; min-height: 36px; font-size: 13.5px; }
.pn-dialogo { border: 0; border-radius: 22px; padding: 22px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.pn-dialogo::backdrop { background: rgba(13, 30, 58, .45); }
@media (max-width: 640px) { .gr { height: 220px; grid-template-columns: 40px minmax(0, 1fr); } .gr-mes { font-size: 11px; } .gr-b { width: min(24px, 44%); } }
.pn-kpis .fn-delta { text-transform: none; letter-spacing: 0; font: 700 13px Manrope, sans-serif; }
.pn-kpis .fn-delta.sube { color: #15603a; }
.pn-kpis .fn-delta.baja { color: #9a2c1f; }
@media (max-width: 640px) { .gr-b em { display: none; } }

/* ---------- Inventario: pipa y tanque con nivel ---------- */
.nivel { position: relative; width: 100%; }
.nivel > img { width: 100%; height: auto; display: block; }
.nivel .ventana { position: absolute; overflow: hidden; }
.nivel.pipa .ventana { left: 1.95%; top: 12.7%; width: 70.9%; height: 52.1%; border-radius: 12.9% / 50%; }
.nivel.tanque .ventana { left: .4%; top: 23.2%; width: 99.1%; height: 60.8%; border-radius: 13.8% / 50%; }
.nivel .liquido { position: absolute; left: 0; right: 0; bottom: 0; mix-blend-mode: multiply; background: rgba(52, 185, 167, .62); border-top: 3px solid #1f7f73; transition: height .9s ease; }
.nivel .liquido.medio { background: rgba(230, 163, 40, .62); border-top-color: #a86a00; }
.nivel .liquido.bajo { background: rgba(214, 74, 52, .62); border-top-color: #9a2c1f; }
.nivel.estimado .liquido { border-top-style: dashed; opacity: .9; }
.nivel .marca { position: absolute; left: 26%; top: 27%; background: rgba(13, 30, 58, .88); color: #fff; border-radius: 12px; padding: 6px 12px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.nivel .marca b { font: 800 22px Sora, sans-serif; }
.nivel .marca span { font-size: 12.5px; font-weight: 700; color: #d4e2f2; }
.nivel.apagado > img { opacity: .45; filter: grayscale(1); }
@media (prefers-reduced-motion: reduce) { .nivel .liquido { transition: none; } }
.inv-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.inv-hero > .nivel { flex: 999 1 460px; min-width: 0; }
.inv-hero > .inv-datos { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.inv-grande { font: 800 42px/1.05 Sora, sans-serif; color: var(--azul); }
.inv-fila { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.inv-fila span { color: var(--texto2); font-weight: 600; }
.inv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-graf { position: relative; height: 190px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--borde2); padding: 0 4px; }
.inv-graf .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.inv-graf .col i { width: 100%; max-width: 34px; border-radius: 6px 6px 0 0; background: #2f63c0; min-height: 2px; }
.inv-graf .col i.alto { background: #c2410c; }
.inv-graf .col em { font: 800 12px Manrope, sans-serif; font-style: normal; color: var(--texto); }
.inv-graf .lim { position: absolute; left: 0; right: 0; border-top: 2px dashed #c2410c; }
.inv-ejes { display: flex; gap: 10px; padding: 4px 4px 0; }
.inv-ejes span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--texto2); min-width: 0; }
.inv-paso { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.inv-paso .num { width: 30px; height: 30px; border-radius: 999px; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 15px Sora, sans-serif; flex: none; }
.inv-fotos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.inv-foto { min-height: 84px; border-radius: 14px; border: 2px dashed var(--borde2); background: #fff; color: var(--azul); font: 700 14px Manrope, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; cursor: pointer; }
.inv-foto.lista { border: 0; background: var(--menta); color: var(--enlace); }
.inv-foto img { width: 100%; max-height: 90px; object-fit: cover; border-radius: 10px; }
.inv-evid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.inv-evid a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--borde); }
.inv-evid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.inv-evid figcaption { font-size: 13px; font-weight: 700; color: var(--texto2); margin-top: 4px; }
.chips-litros { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-litros button { min-height: 48px; min-width: 72px; border-radius: 999px; border: 1.5px solid var(--borde2); background: #fff; color: var(--azul); font: 800 15px Manrope, sans-serif; padding: 0 14px; cursor: pointer; }
.chips-litros button[aria-pressed="true"] { background: var(--azul); border-color: var(--azul); color: #fff; }
@media print {
  .pn-lado, .pn-top-a, .no-imprimir { display: none !important; }
  .pn { display: block !important; background: #fff !important; }
  body { background: #fff; }
  .card { box-shadow: none !important; break-inside: avoid; }
}
.tq-pasos { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 8px; }
.tq-pasos span { width: 44px; height: 44px; border-radius: 999px; border: 2px dashed var(--borde2); color: var(--texto2); display: flex; align-items: center; justify-content: center; font: 800 16px Sora, sans-serif; }
.tq-pasos span.hecha { border: 0; background: var(--teal); color: var(--oscuro); }
.tq-pasos i { width: 26px; height: 3px; border-radius: 2px; background: var(--borde2); }
.opc-radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--borde2); border-radius: 14px; cursor: pointer; }
.opc-radio:has(input:checked) { border-color: var(--azul); background: #f3f7fc; }
.opc-radio input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--azul); flex: none; }
.opc-radio span { display: flex; flex-direction: column; gap: 2px; }
.opc-radio small { font-size: 13.5px; font-weight: 600; color: var(--texto2); }

/* ---------- Flotilla: una tarjeta por pipa ---------- */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.fl-card { background: #fff; border: 1px solid var(--borde); border-radius: 20px; box-shadow: var(--sombra); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fl-card.bajo { border-color: #f1c7bd; }
.fl-foto { display: block; background: linear-gradient(180deg, #f3f8fb, #e9f2f7); border-radius: 14px; padding: 10px 8px 4px; }
.fl-foto .nivel .marca { padding: 3px 10px; border-radius: 10px; }
.fl-foto .nivel .marca b { font-size: 17px; }
.fl-cab { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.fl-tit { min-width: 0; }
.fl-tit h3 { margin: 0; font: 800 19px/1.2 Sora, sans-serif; color: var(--azul); }
.fl-tit p { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; color: var(--texto2); }
.fl-acc { display: flex; gap: 6px; flex: none; }
.fl-ico { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--borde2); background: #fff; color: var(--azul); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; flex: none; }
.fl-ico:hover { background: var(--fondo); border-color: var(--azul); }
.fl-ico:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.fl-ico.peligro { color: #9a2c1f; border-color: #e7b7ae; }
.fl-ico.peligro:hover { background: #fdf1ee; border-color: #9a2c1f; }
.fl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--fondo); border: 1px solid var(--borde); font-size: 13.5px; font-weight: 700; color: var(--texto3); }
.fl-chip svg { width: 16px; height: 16px; color: var(--texto2); }
.fl-chip.ok { background: var(--menta); border-color: #c7e9e4; color: #1a6b61; }
.fl-chip.alerta { background: #fdf1ee; border-color: #f1c7bd; color: #9a2c1f; }
.fl-chip.gris { color: var(--texto2); }
.fl-trae { display: flex; gap: 10px; align-items: center; }
.fl-avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 14px Sora, sans-serif; flex: none; }
.fl-avatar.vacio { background: var(--fondo); color: var(--texto2); border: 1.5px dashed var(--borde2); }
.fl-avatar svg { width: 18px; height: 18px; }
.fl-sel { flex: 1; min-width: 0; min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
.fl-pie { display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--borde); font-size: 13px; font-weight: 600; color: var(--texto2); }
.fl-pie svg { width: 16px; height: 16px; flex: none; }
.fl-nueva { align-items: center; justify-content: center; text-align: center; min-height: 260px; border: 2px dashed var(--borde2); box-shadow: none; background: transparent; cursor: pointer; color: var(--azul); font-family: inherit; }
.fl-nueva:hover { border-color: var(--azul); background: #fff; }
.fl-nueva .fl-mas { width: 56px; height: 56px; border-radius: 999px; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; }
.fl-nueva b { font: 800 17px Sora, sans-serif; }
.fl-nueva small { font-size: 13.5px; font-weight: 600; color: var(--texto2); }

/* ---------- Solicitudes programadas y agenda del repartidor ---------- */
.rp-sol { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding-top: 12px; padding-bottom: 12px; }
.rp-sol .pill { margin-top: 0; flex: none; }
.rp-fecha { width: 54px; flex: none; border-radius: 12px; background: #e5ecf7; color: var(--azul); text-align: center; padding: 6px 0; display: flex; flex-direction: column; line-height: 1.15; }
.rp-fecha small { font: 800 11px Manrope, sans-serif; text-transform: uppercase; }
.rp-fecha b { font: 800 20px/1.05 Sora, sans-serif; }
.rp-fecha.grande { width: 72px; background: var(--azul); color: #fff; padding: 10px 0; }
.rp-fecha.grande b { font-size: 30px; }
.rp-fecha.grande small { color: #c6d6ec; }
.rp-hora { font: 800 19px Sora, sans-serif; color: var(--azul); width: 62px; flex: none; }
.rp-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #e8eef4; border-radius: 999px; padding: 4px; }
.rp-seg a { min-height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font: 800 15px Manrope, sans-serif; color: var(--texto2); text-decoration: none; }
.rp-seg a[aria-selected="true"] { background: #fff; color: var(--azul); box-shadow: 0 2px 8px rgba(16, 39, 74, .1); }

/* ---------- Pendientes por atender (oficina) ---------- */
.pd-lista { padding-top: 4px; padding-bottom: 4px; }
.pd-fila { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--borde); }
.pd-fila:last-child { border-bottom: 0; }
.pd-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-info > span { font-size: 14px; font-weight: 600; color: var(--texto2); }
.pd-estado { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--texto3); }
.pd-estado .pill { margin-top: 0; }
.pd-acc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 0 1 420px; }
.pd-acc select { flex: 1 1 240px; min-width: 0; min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
.rp-fecha.ahora { background: #fdf0d5; color: var(--ambar-texto); }
.acc-acepto { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 10px; font-size: 14.5px; font-weight: 600; color: var(--texto3); line-height: 1.4; cursor: pointer; }
.acc-acepto input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--azul); }
.acc-legal { font-size: 12.5px; font-weight: 600; color: var(--texto2); text-align: center; line-height: 1.5; margin: 10px 0 0; }
.acc-legal a { color: var(--enlace); }
.pn-grupo { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.pn-grupo legend { font: 800 15.5px Manrope, sans-serif; color: var(--texto); margin-bottom: 8px; padding: 0; }
