/* =====================================================================================================
   GESMART parqueo_01: Parqueo > Control de playa. Todo bajo .gs-pq (claro y oscuro con body.theme-dark).
   Las hojas (salida, cobro, cliente) usan las de pos.css (.gs-pos-velo / .gs-pos-hoja / .gs-tecl).
   ===================================================================================================== */
.gs-pq {
    --q-bg: var(--g-bg2, #eef0f7); --q-panel: #ffffff; --q-panel2: #f5f6fb; --q-line: var(--g-border2, #dde1ee);
    --q-fg: var(--g-text, #1a1e32); --q-fg2: var(--g-text2, #4b5270); --q-fg3: var(--g-text3, #868ca7);
    --q-acc: #5b5bd6; --q-acc-s: rgba(91, 91, 214, .10); --q-acc-fg: #fff;
    --q-ok: #0f9d6e; --q-ok-s: rgba(15, 157, 110, .12); --q-warn: #b7640b; --q-warn-s: rgba(217, 119, 6, .14);
    --q-err: #d33c3c; --q-err-s: rgba(211, 60, 60, .11); --q-plate: #ffffff; --q-plate-ink: #111; --q-band: #1f4fa3;
    background: var(--q-bg); color: var(--q-fg); font-size: 14px; display: grid; gap: 12px; padding: 10px 12px;
}
body.theme-dark .gs-pq {
    --q-bg: var(--g-bg2, #11131d); --q-panel: var(--g-bg3, #1a1d2b); --q-panel2: #222637; --q-line: var(--g-border2, #2f3448);
    --q-acc: #8b8cf6; --q-acc-s: rgba(139, 140, 246, .16); --q-acc-fg: #12141f; --q-ok: #36c795; --q-ok-s: rgba(54, 199, 149, .15);
    --q-warn: #f0a542; --q-warn-s: rgba(240, 165, 66, .15); --q-err: #f07070; --q-err-s: rgba(240, 112, 112, .14); --q-plate: #f4f5f8;
}
.gs-pq * { box-sizing: border-box; }
.gs-pq [hidden] { display: none !important; }
.gs-pq button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
.gs-pq button:focus-visible, .gs-pq input:focus-visible, .gs-pq select:focus-visible { outline: 3px solid var(--q-acc); outline-offset: 2px; }
.gs-pq .num { font-variant-numeric: tabular-nums; }
.gs-pq .nota { font-size: 12.5px; color: var(--q-fg3); }
/* cabecera */
.gs-pq .q-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gs-pq .q-top h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.gs-pq .q-chip { font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 3px 10px; background: var(--q-acc-s); color: var(--q-acc); white-space: nowrap; }
.gs-pq .q-chip.ok { background: var(--q-ok-s); color: var(--q-ok); } .gs-pq .q-chip.warn { background: var(--q-warn-s); color: var(--q-warn); } .gs-pq .q-chip.err { background: var(--q-err-s); color: var(--q-err); }
.gs-pq .q-tabs { display: flex; gap: 4px; background: var(--q-panel); border: 1px solid var(--q-line); border-radius: 12px; padding: 4px; margin-left: auto; }
.gs-pq .q-tabs button { padding: 8px 14px; border-radius: 9px; font-weight: 700; color: var(--q-fg2); }
.gs-pq .q-tabs button.on { background: var(--q-acc); color: var(--q-acc-fg); }
/* indicadores */
.gs-pq .q-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gs-pq .q-kpi { background: var(--q-panel); border: 1px solid var(--q-line); border-radius: 14px; padding: 11px 14px; display: grid; gap: 2px; min-width: 0; }
.gs-pq .q-kpi small { font-size: 11px; font-weight: 800; color: var(--q-fg3); text-transform: uppercase; letter-spacing: .05em; }
.gs-pq .q-kpi b { font-size: 24px; font-weight: 800; }
.gs-pq .q-bar { height: 6px; border-radius: 99px; background: var(--q-panel2); overflow: hidden; margin-top: 3px; }
.gs-pq .q-bar i { display: block; height: 100%; background: var(--q-acc); border-radius: 99px; transition: width .3s; }
.gs-pq .q-bar i.lleno { background: var(--q-err); }
/* cuerpo */
.gs-pq .q-main { display: grid; grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); gap: 12px; align-items: start; }
.gs-pq .q-card { background: var(--q-panel); border: 1px solid var(--q-line); border-radius: 16px; padding: 14px; display: grid; gap: 11px; min-width: 0; }
.gs-pq .q-card h3 { margin: 0; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.gs-pq .q-card h3 .q-chip { margin-left: auto; }
/* placa peruana */
.gs-pq .q-placa { position: relative; background: var(--q-plate); color: var(--q-plate-ink); border: 3px solid #1b1b1b; border-radius: 10px; padding: 18px 8px 6px; text-align: center; display: block; margin: 0; }
.gs-pq .q-placa::before { content: "PERÚ"; position: absolute; inset: 0 0 auto; height: 15px; background: var(--q-band); color: #fff; font: 800 10px/15px sans-serif; letter-spacing: .3em; border-radius: 6px 6px 0 0; }
.gs-pq .q-placa input { width: 100%; border: 0; background: transparent; text-align: center; font-size: 40px; line-height: 1.1; font-weight: 800; font-family: "Arial Black", "Segoe UI", sans-serif; height: auto; letter-spacing: .08em; color: var(--q-plate-ink); text-transform: uppercase; padding: 0; }
.gs-pq .q-placa input::placeholder { color: #c9cbd4; }
.gs-pq .q-placa input:focus { outline: none; }
.gs-pq .q-placa:focus-within { box-shadow: 0 0 0 4px var(--q-acc-s); }
.gs-pq .q-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gs-pq .q-tipos button { border: 2px solid var(--q-line); background: var(--q-panel2); border-radius: 12px; padding: 9px 5px; display: grid; gap: 3px; place-items: center; font-weight: 800; font-size: 12.5px; text-align: center; min-width: 0; overflow-wrap: break-word; }
.gs-pq .q-tipos button i { font-size: 22px; color: var(--q-fg2); }
.gs-pq .q-tipos button small { font-size: 10.5px; color: var(--q-fg3); font-weight: 700; line-height: 1.2; }
.gs-pq .q-tipos button.on { border-color: var(--q-acc); background: var(--q-acc-s); color: var(--q-acc); }
.gs-pq .q-tipos button.on i { color: var(--q-acc); }
.gs-pq .q-aviso { border-radius: 12px; padding: 10px 12px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.gs-pq .q-aviso b { display: block; }
.gs-pq .q-aviso i { margin-top: 2px; }
.gs-pq .q-aviso.ok { background: var(--q-ok-s); color: var(--q-ok); } .gs-pq .q-aviso.warn { background: var(--q-warn-s); color: var(--q-warn); }
.gs-pq .q-aviso.err { background: var(--q-err-s); color: var(--q-err); } .gs-pq .q-aviso.info { background: var(--q-acc-s); color: var(--q-acc); }
.gs-pq .q-aviso button { margin-top: 6px; padding: 5px 10px; border-radius: 8px; background: var(--q-acc); color: var(--q-acc-fg); font-weight: 800; font-size: 12px; }
.gs-pq .q-campo { width: 100%; border: 1px solid var(--q-line); background: var(--q-panel2); border-radius: 10px; padding: 9px 12px; color: var(--q-fg); font: inherit; min-width: 0; }
.gs-pq .q-btn { border-radius: 12px; padding: 11px 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gs-pq .q-btn.prim { background: var(--q-acc); color: var(--q-acc-fg); }
.gs-pq .q-btn.sec { background: var(--q-panel2); border: 1px solid var(--q-line); }
.gs-pq .q-btn.big { height: 52px; font-size: 15px; width: 100%; }
.gs-pq .q-btn:disabled { opacity: .45; cursor: not-allowed; }
.gs-pq kbd { font: 700 11px sans-serif; border: 1px solid currentColor; border-radius: 5px; padding: 1px 5px; opacity: .8; background: none; color: inherit; box-shadow: none; }
.gs-pq .q-fila { display: flex; gap: 8px; align-items: center; }
.gs-pq .q-fila > .q-campo { flex: 1; }
.gs-pq .q-kbd { width: 46px; height: 42px; border-radius: 10px; border: 1px solid var(--q-line); background: var(--q-panel2); color: var(--q-acc); font-size: 18px; flex: none; }
/* playa en vivo */
.gs-pq .q-filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.gs-pq .q-filtros button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--q-line); background: var(--q-panel2); font-weight: 700; font-size: 12.5px; color: var(--q-fg2); }
.gs-pq .q-filtros button.on { background: var(--q-fg); color: var(--q-panel); border-color: var(--q-fg); }
.gs-pq .q-filtros button b { font-weight: 800; opacity: .7; margin-left: 3px; }
.gs-pq .q-playa { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; align-content: start; max-height: calc(100vh - 340px); min-height: 220px; overflow-y: auto; padding: 2px; }
.gs-pq .q-auto { text-align: left; border: 1px solid var(--q-line); background: var(--q-panel2); border-radius: 14px; padding: 11px 12px; display: grid; gap: 7px; transition: transform .1s, border-color .12s; min-width: 0; }
.gs-pq .q-auto:hover { border-color: var(--q-acc); }
.gs-pq .q-auto:active { transform: scale(.98); }
.gs-pq .q-auto .q-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gs-pq .q-auto .q-tipo { margin-left: auto; color: var(--q-fg3); font-size: 18px; }
.gs-pq .q-auto .q-t { font-size: 21px; font-weight: 800; }
.gs-pq .q-auto .q-m { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--q-fg3); }
.gs-pq .q-auto .q-imp { font-weight: 800; color: var(--q-fg); font-size: 15px; }
.gs-pq .q-auto.largo { border-color: var(--q-warn); }
.gs-pq .q-auto.abon .q-imp { color: var(--q-ok); }
.gs-pq .q-auto.abon.vence { border-color: var(--q-warn); } .gs-pq .q-auto.abon.vence .q-imp { color: var(--q-warn); }
.gs-pq .q-auto.cerrado { border-style: dashed; border-color: var(--q-err); }
.gs-pq .q-auto.cerrado .q-imp { color: var(--q-err); }
.gs-pq .q-auto.nuevo { animation: gsPqFlash 1.2s; }
@keyframes gsPqFlash { from { background: var(--q-acc-s); } to { background: var(--q-panel2); } }
.gs-pq .q-mini, .gs-pos-hoja .q-mini { font: 800 15px/1.2 "Arial Black", "Segoe UI", sans-serif; letter-spacing: .05em; background: #fff; color: #111; border: 2px solid #1b1b1b; border-radius: 6px; padding: 1px 7px; border-top: 6px solid #1f4fa3; white-space: nowrap; display: inline-block; text-transform: uppercase; }
.gs-pq .q-vacio { text-align: center; color: var(--q-fg3); padding: 34px 10px; grid-column: 1 / -1; line-height: 1.5; }
.gs-pq .q-vacio b { display: block; color: var(--q-fg2); font-size: 15px; }
/* historial */
.gs-pq .q-tabla { overflow-x: auto; border: 1px solid var(--q-line); border-radius: 12px; }
.gs-pq .q-tabla table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.gs-pq .q-tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--q-fg3); padding: 9px 11px; background: var(--q-panel2); font-weight: 800; }
.gs-pq .q-tabla td { padding: 9px 11px; border-top: 1px solid var(--q-line); vertical-align: middle; }
.gs-pq .q-tabla tr.anulado td { opacity: .55; }
.gs-pq .q-tabla .der { text-align: right; }
.gs-pq .q-tabla .q-acc-btn { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--q-line); background: var(--q-panel2); font-weight: 700; font-size: 12px; }
.gs-pq .q-mas { width: 100%; padding: 10px; border-radius: 10px; border: 1px dashed var(--q-line); color: var(--q-acc); font-weight: 800; }
/* tarifas */
.gs-pq .q-tarifas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gs-pq .q-tar { border: 1px solid var(--q-line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; background: var(--q-panel2); align-content: start; }
.gs-pq .q-tar b { font-size: 14px; }
.gs-pq .q-tar ul { margin: 0; padding-left: 18px; color: var(--q-fg2); font-size: 13px; display: grid; gap: 3px; align-content: start; }
.gs-pq .q-sim { display: grid; gap: 8px; }
.gs-pq .q-calc { background: var(--q-panel2); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--q-fg2); line-height: 1.6; }
.gs-pq .q-calc b { color: var(--q-fg); }
/* hojas propias del parqueo (sobre .gs-pos-hoja) */
.gs-pos-hoja.q-hoja { width: min(860px, 100%); }
.gs-pos-hoja .q-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gs-pos-hoja .q-cab .q-mini { font-size: 22px; }
.gs-pos-hoja .q-dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.gs-pos-hoja .q-lin { display: grid; gap: 2px; }
.gs-pos-hoja .q-lin > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--p-line); font-size: 13.5px; }
.gs-pos-hoja .q-lin > div span:first-child { color: var(--p-fg2); }
.gs-pos-hoja .q-calc { background: var(--p-panel2); border-radius: 12px; padding: 9px 11px; font-size: 12.5px; color: var(--p-fg2); line-height: 1.55; margin-top: 6px; }
.gs-pos-hoja .q-total { background: var(--p-acc-s); border-radius: 14px; padding: 12px 14px; display: grid; gap: 1px; }
.gs-pos-hoja .q-total small { font-size: 11px; font-weight: 800; color: var(--p-acc); letter-spacing: .05em; text-transform: uppercase; }
.gs-pos-hoja .q-total b { font-size: 36px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gs-pos-hoja .q-total.cero { background: var(--p-panel2); }
.gs-pos-hoja .q-total.cero small { color: var(--p-fg3); }
.gs-pos-hoja .q-comp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gs-pos-hoja .q-comp button { padding: 9px 4px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-panel2); font-weight: 800; font-size: 12.5px; line-height: 1.2; }
.gs-pos-hoja .q-comp button small { display: block; font-size: 10.5px; opacity: .75; }
.gs-pos-hoja .q-comp button.on { background: var(--p-acc); color: var(--p-acc-fg); border-color: var(--p-acc); }
.gs-pos-hoja .q-comp button:disabled { opacity: .4; cursor: not-allowed; }
.gs-pos-hoja .q-cli { text-align: left; padding: 9px 11px; border-radius: 10px; border: 1px dashed var(--p-line); font-size: 13px; color: var(--p-fg2); width: 100%; }
.gs-pos-hoja .q-cli b { color: var(--p-fg); }
.gs-pos-hoja .q-mas-acc { display: flex; gap: 6px; flex-wrap: wrap; }
.gs-pos-hoja .q-mas-acc button { padding: 7px 11px; border-radius: 9px; border: 1px solid var(--p-line); background: var(--p-panel2); font-weight: 700; font-size: 12.5px; }
.gs-pos-hoja .q-mas-acc button.peligro { color: var(--p-err); }
@media (max-width: 1100px) { .gs-pq .q-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .gs-pq .q-main { grid-template-columns: minmax(0, 1fr); }
    .gs-pq .q-playa { max-height: none; }
    .gs-pos-hoja .q-dos { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .gs-pq .q-auto { transition: none; } .gs-pq .q-auto.nuevo { animation: none; } }
.gs-pos-hoja .q-cobro { display: grid; gap: 9px; min-width: 0; align-content: start; }
.gs-pos-hoja .q-cobro .metodos { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.gs-pos-hoja .q-cobro .metodos button { min-width: 0; overflow-wrap: break-word; font-size: 12px; padding: 9px 4px; }
.gs-pos-hoja.q-hoja { overflow-x: hidden; }
/* parqueo_02: veto bien visible */
.gs-pq .q-aviso.veto { border: 2px solid var(--q-err); padding: 12px 14px; animation: gsPqVeto .5s ease 2; }
.gs-pq .q-aviso.veto > i { font-size: 22px; }
.gs-pq .q-aviso.veto b { font-size: 14px; text-transform: uppercase; letter-spacing: .02em; }
.gs-pq .q-aviso.veto .motivo { display: block; font-size: 16px; font-weight: 800; color: var(--q-fg); margin: 4px 0; overflow-wrap: anywhere; }
.gs-pq .q-aviso.veto small { display: block; font-size: 11.5px; opacity: .85; }
@keyframes gsPqVeto { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
/* parqueo_02: tickets olvidados (mas de 7 dias) */
.gs-pq .q-viejos { margin-bottom: 10px; }
.gs-pq .q-aviso button.sec { background: transparent; color: inherit; border: 1px solid currentColor; }
.gs-pos-hoja.q-hoja-viejos .q-viejos-lista { max-height: 38vh; overflow: auto; border: 1px solid var(--p-line, #dde1ee); border-radius: 12px; margin: 10px 0; }
.gs-pos-hoja.q-hoja-viejos .q-viejos-lista label { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; margin: 0; font-weight: 500; border-bottom: 1px solid var(--p-line, #dde1ee); cursor: pointer; }
.gs-pos-hoja.q-hoja-viejos .q-viejos-lista label:last-child { border-bottom: 0; }
.gs-pos-hoja.q-hoja-viejos .q-viejos-lista input { width: 18px; height: 18px; }
.gs-pos-hoja.q-hoja-viejos .q-viejos-lista .q-mini { font-size: 12px; }
.gs-pos-hoja.q-hoja-viejos .q-viejos-lista b { color: var(--p-err, #d33c3c); }
.gs-pos-hoja.q-hoja-viejos .q-sug { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gs-pos-hoja.q-hoja-viejos .q-sug button { padding: 5px 10px; border-radius: 99px; font-size: 12px; background: var(--p-panel2, #f5f6fb); border: 1px solid var(--p-line, #dde1ee); color: inherit; }
.gs-pos-hoja.q-hoja-viejos > * { flex-shrink: 0; }
.gs-pos-hoja.q-hoja-viejos > .q-viejos-lista { flex-shrink: 1; min-height: 90px; }
