:root {
  --cielo: #C8E2FD; --bosque: #045002; --ink: #10213B; --muted: #3A5573; --line-cielo: #7FA9D6; --line-w: #D6E8FB;
  --soft: #EAF4FF; --pill: #E1EEFC; --dis: #DCE8F5; --dis-txt: #50627A; --danger: #B3261E; --ph: #5B6D86;
  --camila: #7C3AED; --nancy: #E8710A; --dianela: #0E9F8E;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Poppins', system-ui, sans-serif; background: var(--cielo); color: var(--ink); font-size: 14px; line-height: 1.4; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--bosque); outline-offset: 2px; }
.lateral :focus-visible { outline-color: var(--cielo); }

.app { display: flex; min-height: 100vh; }
.lateral { width: 260px; flex: none; background: var(--bosque); color: var(--cielo); padding: 28px 20px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.logo-cl { width: 220px; height: auto; display: block; margin-bottom: 18px; }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--cielo); text-decoration: none; font-weight: 500; font-size: 15px; }
.menu a:hover { background: rgba(200,226,253,.14); }
.menu a[aria-current="page"] { background: var(--cielo); color: var(--bosque); font-weight: 600; }
.marca { margin-top: auto; padding: 6px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.marca img { width: 204px; height: auto; display: block; }
.lugar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--cielo); border-radius: 999px; font-size: 13px; font-weight: 500; width: max-content; margin-top: 10px; }
.lugar i { width: 8px; height: 8px; border-radius: 50%; background: var(--cielo); }

.contenido { flex: 1; min-width: 0; padding: 36px 40px 48px; display: flex; flex-direction: column; gap: 22px; outline: none; }
.cabecera { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
h1 { margin: 0; font-size: 30px; line-height: 1.2; color: var(--bosque); font-weight: 700; }
.sub { margin: 4px 0 0; color: var(--muted); }
.barra { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.campo { position: relative; display: flex; align-items: center; height: 48px; background: #fff; border: 1px solid var(--line-cielo); border-radius: 12px; }
.campo.buscar { flex: 1 1 320px; max-width: 460px; padding-left: 14px; gap: 10px; color: var(--muted); }
.campo.buscar input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; color: var(--ink); min-width: 0; }
.campo.buscar:focus-within { border-color: var(--bosque); box-shadow: 0 0 0 3px rgba(4,80,2,.25); }
::placeholder { color: var(--ph); opacity: 1; }
select { appearance: none; -webkit-appearance: none; height: 48px; padding: 0 40px 0 14px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234F6B8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 14px center; border: 1px solid var(--line-cielo); border-radius: 12px; font-weight: 500; cursor: pointer; }
select:focus-visible { border-color: var(--bosque); }
select.vacio { color: var(--ph); font-weight: 400; }
select.chica { height: 40px; width: 150px; font-size: 13px; padding-right: 34px; }

.interruptor { display: inline-flex; align-items: center; gap: 10px; color: var(--bosque); font-weight: 500; cursor: pointer; user-select: none; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor .pista { width: 40px; height: 22px; border-radius: 999px; background: var(--line-cielo); position: relative; transition: background .16s; }
.interruptor .pista::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .16s; }
.interruptor input:checked + .pista { background: var(--bosque); }
.interruptor input:checked + .pista::after { transform: translateX(18px); }
.interruptor input:focus-visible + .pista { outline: 3px solid var(--bosque); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { height: 44px; padding: 0 20px; border-radius: 999px; background: #fff; border: 1px solid var(--line-cielo); color: var(--bosque); font-weight: 500; }
.chip:hover { background: var(--soft); }
.chip[aria-pressed="true"] { background: var(--bosque); border-color: var(--bosque); color: #fff; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid var(--bosque); background: var(--bosque); color: #fff; font-weight: 600; }
.btn:hover { background: #033d01; }
.btn:disabled { background: var(--dis); border-color: var(--dis); color: var(--dis-txt); cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--bosque); }
.btn.ghost:hover { background: var(--soft); }
.btn.peligro { background: var(--danger); border-color: var(--danger); }
.btn.peligro:hover { background: #99201a; }
.btn.chico { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.borrar { height: 36px; padding: 0 14px; background: #fff; color: var(--danger); border-color: var(--danger); font-weight: 500; font-size: 13px; }
.btn.borrar:hover { background: #FCEDEC; }
.btn.borrar svg { width: 16px; height: 16px; }

.tabla { background: #fff; border: 1px solid var(--line-cielo); border-radius: 16px; overflow: hidden; }
.tabla .scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 14px 20px; background: var(--soft); white-space: nowrap; }
td { padding: 12px 20px; border-top: 1px solid var(--line-w); vertical-align: middle; }
.der { text-align: right; }
tr.fila:hover td { background: #F4F9FF; }
.cod { color: var(--muted); white-space: nowrap; }
.nombre { font-weight: 500; }
.linea { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pil { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--pill); color: var(--bosque); font-size: 12px; font-weight: 500; white-space: nowrap; }
.precio { font-weight: 600; font-size: 15px; text-align: right; white-space: nowrap; }
.aviso-precio { display: block; font-size: 11px; font-weight: 500; color: var(--danger); margin: 2px 0 0 auto; white-space: normal; max-width: 130px; line-height: 1.3; }
.guion { color: var(--muted); }
.pie-tabla { padding: 12px 20px; font-size: 12px; color: var(--muted); background: var(--soft); border-top: 1px solid var(--line-w); }

.vend { display: flex; align-items: center; gap: 8px; }
.vend .punto, .punto { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.c-Camila { background: var(--camila); } .c-Nancy { background: var(--nancy); } .c-Dianela { background: var(--dianela); }
.sel-vend { position: relative; display: inline-block; }
.sel-vend .punto { position: absolute; left: 12px; top: 15px; pointer-events: none; }
.sel-vend select.con-punto { padding-left: 30px; }
.sel-vend select { border-color: var(--line-cielo); }
.sel-vend select:not(.vacio) { border-color: var(--bosque); }

.paso { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line-cielo); border-radius: 10px; background: #fff; }
.paso button { width: 38px; height: 100%; border: 0; background: transparent; color: var(--bosque); border-radius: 10px; display: grid; place-items: center; }
.paso button:hover:not(:disabled) { background: var(--soft); }
.paso button:disabled { color: var(--dis-txt); cursor: not-allowed; }
.paso .n { min-width: 36px; text-align: center; font-weight: 600; }
.icono-btn { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: grid; place-items: center; }
.icono-btn:hover { background: #FCEDEC; color: var(--danger); }
.muestra { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-cielo); vertical-align: -3px; margin-right: 8px; background: #fff; }

.grupo td { background: var(--cielo); color: var(--bosque); font-weight: 600; font-size: 13px; padding: 10px 20px; border-top: 1px solid var(--line-cielo); }
.grupo td.der { font-weight: 500; font-size: 12px; }
.com { color: var(--muted); text-align: right; white-space: nowrap; }

.vacio-estado { padding: 56px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.vacio-estado strong { color: var(--ink); font-size: 16px; font-weight: 600; }

.tarjeta { background: #fff; border: 1px solid var(--line-cielo); border-radius: 16px; overflow: hidden; }
.tarjeta-cab { background: var(--cielo); display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.tarjeta-cab .punto { width: 14px; height: 14px; }
.tarjeta-cab h2 { margin: 0; color: var(--bosque); font-size: 18px; font-weight: 700; line-height: 1.2; }
.tarjeta-cab small { display: block; color: var(--muted); font-size: 13px; }
.le-corresponde { margin-left: auto; text-align: right; }
.le-corresponde span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.le-corresponde b { color: var(--bosque); font-size: 24px; font-weight: 700; line-height: 1.2; }
.tarjeta .sin-ventas { padding: 18px 20px; color: var(--muted); }
.total-barra { background: var(--bosque); color: var(--cielo); border-radius: 16px; padding: 18px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.total-barra .t { font-weight: 500; font-size: 15px; margin-right: auto; }
.total-barra small { font-size: 13px; }
.total-barra b { font-size: 24px; font-weight: 700; }

.velo { position: fixed; inset: 0; background: rgba(3,45,2,.55); display: grid; place-items: center; padding: 24px; z-index: 20; overflow-y: auto; }
.modal { background: #fff; border-radius: 24px; width: min(560px, 100%); padding: 32px; box-shadow: 0 24px 60px rgba(0,0,0,.25); max-height: calc(100vh - 48px); overflow-y: auto; }
.modal.angosto { width: min(480px, 100%); }
.modal h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--bosque); }
.modal .cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal p { margin: 10px 0 0; color: var(--muted); }
.modal label.et { display: block; font-size: 13px; font-weight: 500; margin: 14px 0 6px; }
.modal .fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal select, .modal input[type=text] { width: 100%; }
.modal input[type=text] { height: 48px; padding: 0 14px; border: 1px solid var(--line-cielo); border-radius: 12px; background: #fff; }
.modal input[type=text]:focus-visible { border-color: var(--bosque); }
.modal .nota { font-size: 12px; color: var(--muted); margin-top: 6px; }
.modal .pie { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.modal .ayuda-error { color: var(--danger); font-size: 13px; margin-top: 10px; }
.cerrar { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 50%; display: grid; place-items: center; }
.cerrar:hover { background: var(--soft); }
.solo-lectura { height: 48px; display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line-cielo); border-radius: 12px; background: var(--soft); color: var(--ink); }
.opciones-color { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.opcion { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid var(--line-cielo); border-radius: 12px; background: #fff; text-align: left; }
.opcion:hover { background: var(--soft); border-color: var(--bosque); }
.opcion small { color: var(--muted); }

.combo { position: relative; }
.combo input { width: 100%; padding-right: 40px !important; }
.combo-lista { position: absolute; z-index: 5; left: 0; right: 0; top: 52px; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--line-cielo); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.combo-lista[hidden] { display: none; }
.combo-op { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line-w); }
.combo-op:last-child { border-bottom: 0; }
.combo-op[aria-selected="true"], .combo-op:hover { background: var(--soft); }
.combo-op small { display: block; color: var(--muted); font-size: 12px; }
.combo-vacio { padding: 14px; color: var(--muted); }

.toast { position: fixed; bottom: 32px; right: 40px; background: var(--bosque); color: var(--cielo); padding: 14px 22px; border-radius: 12px; font-weight: 600; display: flex; align-items: center; gap: 10px; z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: entra .2s ease-out; }
.toast[hidden] { display: none; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.cargando { color: var(--muted); padding: 40px 0; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .lateral { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .logo-cl { width: 120px; margin: 0; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .menu a { padding: 8px 12px; font-size: 14px; }
  .marca, .lugar { display: none; }
  .contenido { padding: 24px 16px 40px; }
  .cabecera { flex-direction: column; align-items: flex-start; }
  .toast { right: 16px; left: 16px; bottom: 16px; }
}
