:root{font-family:Arial,Helvetica,sans-serif;color:#10375e;background:#f3f7fb;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{min-height:46px;padding:10px 16px;border:1px solid #cbdced;border-radius:10px;background:white;color:#10477c;cursor:pointer}button:hover{background:#edf5ff}button:disabled{opacity:.5;cursor:wait}input,select,textarea{min-height:46px;padding:12px;border:1px solid #cbdced;border-radius:9px;max-width:100%;color:#123b60;background:white}input:focus,button:focus-visible{outline:3px solid #82bbff;outline-offset:2px}.primary{background:#0068e7;color:white;border-color:#0068e7}.primary:hover{background:#0051ba}header{height:84px;background:white;display:flex;align-items:center;gap:22px;padding:16px 30px;border-bottom:1px solid #dbe7f2}header strong{font-size:24px}header span{margin-left:auto}.logo{max-width:190px;max-height:54px;object-fit:contain}#pos{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;padding:24px;max-width:1700px;margin:auto}.card{background:white;border:1px solid #dce7f3;border-radius:16px;padding:20px;margin-bottom:18px}.selling{min-width:0}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.row h2{flex:1;font-size:19px}.customer .row{margin-top:16px}.customer input{flex:1}.search{width:100%;font-size:22px;min-height:62px}.totals{position:sticky;top:20px;height:fit-content;display:flex;flex-direction:column;gap:14px}.grand{font-size:38px;font-weight:800}.charge{min-height:70px;font-size:23px;font-weight:bold}.product-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;margin-top:12px}.product-result{text-align:left;display:flex;gap:10px;align-items:center}.product-result img,.cart-line img{width:48px;height:48px;object-fit:contain}.cart-line{display:grid;grid-template-columns:52px minmax(120px,1fr) 105px 160px 110px 95px;gap:10px;align-items:center;padding:16px 0;border-bottom:1px solid #e6edf5}.cart-line small{display:block;color:#64829c;margin-top:5px}.quantity{display:flex;gap:3px}.quantity input{width:62px;padding:5px;text-align:center}.quantity button{padding:6px 12px}.suggestions{display:flex;flex-direction:column;gap:5px}.suggestions button{text-align:left}.muted{font-size:14px;color:#647c94}.warning,#issues{color:#9b3c13}#issues:empty{display:none}.login-card{max-width:440px;margin:10vh auto;background:white;padding:36px;border:1px solid #dce7f3;border-radius:20px;box-shadow:0 10px 40px #153c6412}.login-card label{display:block;margin:18px 0}.login-card input,.login-card button{width:100%}dialog{border:0;border-radius:18px;width:min(740px,94vw);max-height:90vh;padding:28px;color:#10375e;box-shadow:0 15px 80px #00132d44}dialog::backdrop{background:#071c3e88}.close{float:right;font-size:26px;padding:0 12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label{display:flex;flex-direction:column;gap:6px}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.paused-sale{border:1px solid #dce7f3;border-radius:12px;padding:16px;margin:12px 0}.success-total{font-size:32px;font-weight:bold}#messages{min-height:20px}#cart:empty:after{content:'Busca o escanea el primer producto.';color:#6c8298;display:block;padding:40px;text-align:center}@media(max-width:1100px){.cart-line{grid-template-columns:42px 1fr 140px}.cart-line>*{min-width:0}#pos{grid-template-columns:1fr 280px;padding:14px;gap:14px}}@media(max-width:760px){#pos{grid-template-columns:1fr}.totals{position:static}header{padding:10px;height:auto;flex-wrap:wrap}header strong{font-size:20px}.form-grid{grid-template-columns:1fr}}

/* v485: employee selection only; sale layout remains unchanged. */
.employee-login{max-width:620px;margin:7vh auto}.employee-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:48vh;overflow:auto;margin:20px 0}.employee-choices button{text-align:left;padding:20px;min-height:92px}.employee-choices strong,.employee-choices span{display:block}.employee-choices span{font-size:14px;color:#647c94;margin-top:8px}#pos-type-user,#pos-change-user{margin-top:16px}#pos-login-form[hidden],#pos-user-selector[hidden],#pos-manual-login[hidden]{display:none}@media(max-width:540px){.employee-login{margin:20px 12px;padding:24px}.employee-choices{grid-template-columns:1fr}}

/* v487: cashier ergonomics, scoped to the standalone POS. */
button:disabled{cursor:not-allowed;background:#eef2f6;color:#718096;border-color:#d6e0ea;opacity:.65}
.customer.card{padding:14px 18px;margin-bottom:14px}.customer .row{margin-top:10px}#customer-current p{margin:5px 0;line-height:1.35}.remove-customer{margin-left:14px;min-height:44px;padding:7px 12px;font-size:14px}
.totals>p{display:flex;justify-content:space-between;gap:10px;margin:4px 0}.totals>p[hidden]{display:none}#tier-saving-row{color:#187844}.totals strong,.grand,.unit-price,.line-subtotal{font-variant-numeric:tabular-nums}.grand{font-size:clamp(24px,2.4vw,38px);overflow-wrap:anywhere}.charge{font-size:clamp(19px,1.5vw,23px)}
.cart-line{grid-template-columns:48px minmax(100px,1fr) minmax(94px,max-content) 158px minmax(105px,max-content) 90px;gap:8px;padding:13px 0}.cart-line>*{min-width:0}.unit-price,.line-subtotal{text-align:right;white-space:nowrap}.line-name{overflow-wrap:anywhere}.cart-line>button{padding:8px}.quantity button{min-width:44px;padding:6px}.quantity input{width:62px}
@media(max-width:1250px){.cart-line{grid-template-columns:48px minmax(110px,1fr) minmax(110px,max-content)}.cart-line .quantity{grid-column:2}.cart-line .line-subtotal{grid-column:3}.cart-line>button{grid-column:3;justify-self:end}.unit-price{grid-column:3}}
@media(max-width:760px){.remove-customer{margin-left:8px}.cart-line{grid-template-columns:42px minmax(100px,1fr) minmax(95px,max-content)}}

/* v488: keep the cashier workspace stable; only the active-sale list scrolls. */
@media(min-width:761px){
 #pos{height:calc(100vh - 84px);overflow:hidden;align-items:start}
 .selling{height:100%;min-height:0;display:flex;flex-direction:column}
 .selling>.card{flex:0 0 auto}
 .selling>.sale-card{flex:1 1 auto;min-height:0;margin-bottom:0;display:flex;flex-direction:column}
 .sale-card>.row{flex:0 0 auto}
 #cart{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:4px;-webkit-overflow-scrolling:touch}
 .totals{align-self:start;max-height:calc(100vh - 132px);overflow-y:auto}
}
#tax-row{display:flex;justify-content:space-between;gap:10px;margin:4px 0}

/* v490: cobro POS */
.payment-methods{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:18px 0}.payment-method{min-height:54px;font-weight:700;display:flex;align-items:center;justify-content:center;text-align:center}.payment-method.active{background:#0068e7;color:#fff;border-color:#0068e7}.payment-panel{margin:8px 0 20px}.payment-section[hidden]{display:none!important}.payment-section>.muted{margin:0 0 14px}.payment-status{font-size:18px;font-weight:700;margin-top:14px;padding:12px 14px;background:#f3f7fb;border-radius:10px}.payment-submit{width:100%;min-height:62px;font-size:21px;font-weight:800;margin-top:4px}@media(max-width:760px){.payment-methods{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}}

.cash-change{font-size:20px}.completed-change{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:18px 0;padding:16px 18px;background:#f3f7fb;border-radius:12px}.completed-change span{font-size:17px}.completed-change strong{font-size:30px}
.payment-section>label{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.payment-section>label>input{margin-left:0}.payment-section>label{margin:12px 0 14px}.payment-section>label>input{min-width:220px}.payment-section .form-grid label{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0}.payment-section .form-grid label>input{min-width:0}
/* v493 · pago desde la cuenta del cliente */

.account-payment-intro{padding:14px 16px;background:#f6f9fd;border:1px solid #dce7f3;border-radius:12px}.account-customer{font-weight:700}.account-pay-qr{display:flex;justify-content:center;margin:18px 0}.account-pay-qr img{width:240px;height:240px;max-width:72vw;border:1px solid #dce7f3;border-radius:12px;background:#fff;padding:8px}.account-pay-link{display:block;max-width:520px;margin:0 auto;padding:12px 16px;border:1px solid #cbdced;border-radius:10px;text-align:center;text-decoration:none;color:#075dab;background:#fff;font-weight:700}.account-waiting{text-align:center}.gercan-pos-origin{padding:10px 12px;background:#eef6ff;border-radius:8px}

/* v522: provisional POS usage timer and live server connection status added to register box. */
@media(min-width:901px){
 html,body{height:100%;overflow:hidden}
 body>header{height:98px;position:relative;display:flex;align-items:center;justify-content:flex-end;gap:0;padding:0 30px 0 36px;background:#fff;border-bottom:0}
 body>header .pos-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 body>header .logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(520px,36vw);max-width:none;max-height:70px;object-fit:contain}
 body>header .register-box{position:absolute;left:36px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-height:58px;height:58px;padding:7px 16px;box-sizing:border-box;background:#fff;border:1px solid #cbdced;border-radius:10px;box-shadow:none;color:#08345f;font-size:14px;line-height:1.2;white-space:nowrap}
 body>header .register-name{display:block;width:100%;text-align:left;font-weight:600}
 body>header .register-meta{display:flex;align-items:center;gap:4px;font-size:12px;color:#647c94;font-variant-numeric:tabular-nums}
 body>header .connection-status{font-weight:600}
 body>header .connection-status.is-online{color:#187844}
 body>header .connection-status.is-offline{color:#c62828}
 body>header .connection-status.is-checking{color:#647c94}
 body>header .cashier-box{display:flex;align-items:center;gap:12px;min-height:58px;height:auto;max-width:min(560px,calc(100vw - 760px));padding:7px 8px 7px 16px;background:#fff;border:1px solid #cbdced;border-radius:10px;box-shadow:none}
 body>header .cashier-name{flex:1 1 auto;min-width:0;font-size:14px;color:#08345f;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
 body>header .cashier-box>#logout{min-height:44px;padding:8px 18px;border:1px solid #e53935;border-radius:9px;background:#e53935;color:#fff}
 body>header .cashier-box>#logout:hover{background:#d32f2f;border-color:#d32f2f}

 #pos{height:calc(100vh - 98px);max-width:none;margin:0;padding:25px 30px 18px 36px;display:grid;grid-template-columns:minmax(0,1fr) clamp(420px,27.2vw,522px);grid-template-rows:128px minmax(0,1fr) 56px;column-gap:24px;row-gap:24px;align-items:stretch;overflow:hidden}
 #pos>.selling{display:contents}
 #pos .card{margin:0;border-radius:17px;border-color:#dbe7f3;box-shadow:none}

 .product-search-card{grid-column:1;grid-row:1;position:relative;height:128px;padding:22px 20px;background:#fff;z-index:4}
 .product-search-wrap{position:relative;width:100%}
 .product-search-card .search{width:100%;min-height:68px;height:68px;padding:12px 56px 12px 14px;font-size:23px;border-radius:9px}
 .product-search-clear{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:36px;min-width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;background:transparent;color:#647c94;font-size:28px;line-height:1;display:flex;align-items:center;justify-content:center;z-index:2}
 .product-search-clear:hover{background:#eef4fa;color:#10477c}
 .product-search-clear[hidden]{display:none}
 .product-search-card .product-results{position:absolute;left:20px;right:20px;top:101px;max-height:min(420px,48vh);overflow:auto;margin:0;padding:12px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));background:#fff;border:1px solid #dce7f3;border-radius:12px;box-shadow:0 12px 30px #173b621a;z-index:30}
 .product-search-card .product-results:empty{display:none}

 .customer.card{grid-column:2;grid-row:1;position:relative;height:128px;padding:11px 14px 12px;background:#fff;z-index:5;overflow:visible}
 #customer-current{min-height:65px;padding-right:158px;line-height:1.25}
 #customer-current>strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:18px;text-decoration:underline;text-underline-offset:2px;color:#063767}
 #customer-current p{margin:1px 0;line-height:18px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #customer-current .remove-customer{position:absolute;top:10px;right:87px;min-width:65px;min-height:44px;height:44px;margin:0;padding:6px 10px;border-color:#e53935;background:#e53935;color:#fff;border-radius:10px;font-size:14px;display:flex;align-items:center;justify-content:center}
 #customer-current .remove-customer:hover{background:#d32f2f;border-color:#d32f2f}
 .customer>.row{position:absolute;left:14px;right:14px;top:76px;bottom:auto;margin:0;display:flex;gap:8px;flex-wrap:nowrap}
 .customer>.row #customer-search{flex:1 1 auto;min-width:0;min-height:40px;height:40px;padding:8px 12px;border-radius:7px;font-size:14px}
 .customer>.row #customer-search:disabled{background:#f4f7fa;color:#7b8ea3;cursor:default}
 .customer>.row #public{flex:0 0 auto;min-height:40px;height:40px;padding:6px 12px;border-radius:7px;font-size:14px;white-space:nowrap}
 .customer>.row #new-customer{position:absolute;right:0;top:-66px;min-width:68px;min-height:44px;height:44px;padding:6px 10px;border-color:#0068e7;background:#0068e7;color:#fff;border-radius:10px;font-size:14px;display:flex;align-items:center;justify-content:center}
 .customer>.row #new-customer:hover{background:#0051ba;border-color:#0051ba}
 #customer-results{position:absolute;left:14px;right:14px;top:118px;max-height:300px;overflow:auto;padding:8px;background:#fff;border:1px solid #dce7f3;border-radius:10px;box-shadow:0 12px 30px #173b621a;z-index:35}
 #customer-results:empty{display:none}

 .sale-card{grid-column:1;grid-row:2;min-height:0;height:100%;padding:18px 20px 20px;display:flex;flex-direction:column;background:#fff;overflow:hidden}
 .sale-card>.row{flex:0 0 auto;min-height:50px;gap:10px;margin-bottom:8px}
 .sale-card>.row h2{margin:0;font-size:20px;line-height:1.2}
 .sale-card>.row #empty{min-height:50px;padding:8px 16px;font-size:16px;border-radius:10px}
 .sale-card #cart{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 4px 0 0;-webkit-overflow-scrolling:touch}
 .sale-card #cart:empty:after{padding:44px 20px}
 .cart-line{grid-template-columns:46px minmax(190px,1fr) 92px 156px 106px 88px;gap:8px;min-height:84px;padding:12px 0;border-bottom:1px solid #e6edf5}
 .cart-line img{width:40px;height:40px}
 .cart-line small{margin-top:3px;font-size:13px}
 .cart-line .unit-price,.cart-line .line-subtotal{font-size:16px}
 .quantity{justify-content:center;gap:4px}
 .quantity button{min-width:44px;min-height:52px;height:52px;padding:5px 10px}
 .quantity input{width:62px;min-height:52px;height:52px;padding:5px;text-align:center}
 .cart-line>button{min-height:52px;height:52px;padding:7px 11px}

 .totals{grid-column:2;grid-row:2;position:relative;top:auto;align-self:stretch;max-height:none;height:100%;overflow:hidden;padding:34px 30px 22px;border-radius:21px!important;box-shadow:none!important;background:#fff;display:flex;flex-direction:column;gap:0;justify-content:flex-start}
 .totals #messages:empty,.totals #issues:empty{display:none}
 .totals #messages,.totals #issues{margin:0 0 8px;min-height:0;font-size:13px;line-height:1.35}
 .totals>p{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;align-items:baseline;margin:0 0 14px;font-size:clamp(18px,1.4vw,22px);line-height:1.2}
 .totals>p[hidden]{display:none}
 .totals strong{font-size:clamp(18px,1.4vw,22px);justify-self:end;text-align:right;line-height:1.1}
 .totals .total-label{margin:14px 0 6px;font-size:clamp(18px,1.4vw,22px);line-height:1.15}
 .totals .grand{margin:0 0 18px;font-size:clamp(40px,3.6vw,54px);line-height:1;font-weight:800;letter-spacing:.01em;overflow-wrap:anywhere}
 .totals .charge{width:100%;min-height:82px;height:82px;margin:70px 0 0;font-size:clamp(24px,2vw,31px);font-weight:800;border-radius:13px}
 .totals #pause,.totals #paused{width:100%;min-height:56px;height:56px;margin-top:14px;font-size:clamp(18px,1.5vw,22px);font-weight:500;border-radius:12px;background:#fff}

 .pos-clock{grid-column:1 / -1;grid-row:3;align-self:stretch;justify-self:center;width:554px;height:56px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #cbdced;border-radius:10px;box-shadow:none;color:#10477c;font-size:24px;font-weight:400;letter-spacing:.025em;font-variant-numeric:tabular-nums;margin-top:0}
}

@media(min-width:901px) and (max-width:1350px){
 body>header{padding-right:24px}
 body>header .register-box{left:24px}
 #pos{grid-template-columns:minmax(0,1fr) 420px;padding-left:24px;padding-right:24px;column-gap:18px}
 .cart-line{grid-template-columns:42px minmax(130px,1fr) 88px 146px 98px 82px;font-size:14px}
 .totals{padding:28px 22px 18px}
}

@media(max-width:900px){
 body>header{height:auto;min-height:86px;position:relative;padding:12px 14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
 body>header .pos-title{display:none}
 body>header .register-box{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-height:54px;height:54px;padding:6px 12px;box-sizing:border-box;background:#fff;border:1px solid #cbdced;border-radius:10px;color:#08345f;font-size:14px;line-height:1.2;white-space:nowrap;order:1}
 body>header .logo{position:static;transform:none;width:min(240px,58vw);max-width:240px;max-height:62px;margin-right:auto;order:2}
 body>header .cashier-box{margin-left:auto;display:flex;align-items:center;gap:8px;min-height:54px;height:auto;max-width:min(100%,420px);padding:6px 7px 6px 12px;background:#fff;border:1px solid #cbdced;border-radius:10px;order:3}
 body>header .cashier-name{flex:1 1 auto;min-width:0;font-size:14px;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
 body>header .cashier-box>#logout{min-height:42px;padding:7px 12px}
 #pos{display:grid;grid-template-columns:1fr;height:auto;max-width:none;padding:14px;gap:14px;overflow:visible}
 #pos>.selling{display:block}
 .customer.card,.product-search-card,.sale-card,.totals{height:auto;min-height:0;position:static;display:block;margin-bottom:14px;padding:16px}
 .customer.card{overflow:visible}
 #customer-current{padding-right:0;min-height:0}
 #customer-current>strong{white-space:normal}
 #customer-current p{white-space:normal}
 #customer-current .remove-customer{position:static;height:auto;min-height:44px;margin:10px 0 0}
 .customer>.row{position:static;margin-top:12px;display:flex;flex-wrap:wrap}
 .customer>.row #customer-search{height:auto;min-height:46px;flex:1 1 180px}
 .customer>.row #public{height:auto;min-height:46px}
 .customer>.row #new-customer{position:static;height:auto;min-height:46px}
 #customer-results,.product-search-card .product-results{position:static;max-height:none;margin-top:8px;padding:0;border:0;box-shadow:none}
 .product-search-card .search{height:auto;min-height:58px;padding-right:50px;font-size:19px}
 .product-search-clear{right:9px;width:34px;min-width:34px;height:34px;min-height:34px;font-size:25px}
 .sale-card{display:flex;min-height:360px}
 .cart-line{grid-template-columns:42px minmax(100px,1fr) minmax(95px,max-content);min-height:0}
 .cart-line .quantity{grid-column:2}
 .cart-line .line-subtotal{grid-column:3}
 .cart-line>button{grid-column:3;justify-self:end}
 .unit-price{grid-column:3}
 .totals{display:flex;padding:24px 18px;overflow:visible}
 .totals>p,.totals strong,.totals .total-label{font-size:18px}
 .totals .grand{font-size:40px}
 .totals .charge{height:auto;min-height:70px;font-size:23px}
 .totals #pause,.totals #paused{height:auto;min-height:54px;font-size:18px;margin-top:12px}
 .pos-clock{width:min(100%,554px);height:60px;margin:0 auto 14px;font-size:20px}
}


/* v525: stock visibility and hard quantity limits in POS search/cart. */
.product-result .product-stock{display:block;margin-top:4px;font-size:12px;font-weight:700;color:#187844}
.product-result .product-stock.is-empty{color:#c62828}
.product-result.is-out-of-stock{opacity:.7;background:#f7f9fb;cursor:default}
.product-result.is-out-of-stock:hover{background:#f7f9fb}

/* v527: product result metadata starts on a new line below the product name. */
.product-result .product-name{display:block}
.product-result .product-meta{display:block;margin-top:2px}

/* v528: comprador presencial / compradores autorizados. */
.customer>.row #purchaser{flex:0 1 190px;min-width:120px;max-width:190px;min-height:40px;height:40px;padding:6px 10px;border-radius:7px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.authorized-purchaser-list{display:flex;flex-direction:column;gap:10px;margin:16px 0}
.authorized-purchaser-row{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(150px,1fr) auto auto;gap:8px;align-items:center;padding:10px;border:1px solid #dce7f3;border-radius:10px}
.authorized-purchaser-row input{width:100%}
.authorized-purchaser-active,.purchaser-verify{display:flex;align-items:center;gap:6px;color:#10375e}
.authorized-purchaser-active input,.purchaser-verify input{width:auto;min-height:0}
.purchaser-verify{margin:16px 0 4px}
@media(max-width:760px){.customer>.row #purchaser{height:auto;min-height:46px;max-width:none;flex:1 1 100%}.authorized-purchaser-row{grid-template-columns:1fr}.authorized-purchaser-row button{width:100%}}

/* v533: cobrar deshabilitado sin cursor de prohibido. */
#charge:disabled{cursor:default}

.purchaser-select-row{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.purchaser-select-row>select{margin-left:0}

/* v536: transferencia POS usa el número de pedido WooCommerce como referencia. */
.payment-submit,.transfer-confirm{display:flex;align-items:center;justify-content:center;text-align:center}
.transfer-reference-box{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;margin:14px 0;padding:16px 18px;background:#f3f7fb;border:1px solid #cbdced;border-radius:10px;text-align:center}
.transfer-reference-box span{font-size:14px;color:#647c94}
.transfer-reference-box strong{font-size:30px;line-height:1.1;color:#10375e;letter-spacing:.03em}
.transfer-actions .transfer-confirm{margin-left:auto}

/* v551: cotización PDF debajo de la lista de productos. */
.pos-quote-actions{flex:0 0 auto;display:flex;align-items:center;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid #e6edf5}
.pos-quote-actions button{min-height:48px}
.pos-quote-actions .muted{flex:1;min-width:0}
@media(max-width:760px){.pos-quote-actions{align-items:stretch;flex-direction:column}.pos-quote-actions .muted{min-height:20px}}

/* v552: saved quote lookup */
.quote-load-result{margin-top:14px;padding:14px 16px;background:#f6f9fd;border:1px solid #dce7f3;border-radius:12px}
.quote-load-result p{margin:5px 0}
.quote-code{font-size:20px;font-weight:800;letter-spacing:.02em;color:#063767}
.quote-original-total{font-size:22px;font-weight:800}

/* v554: cotizaciones guardadas dentro del POS. */
.quote-list-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 160px auto;gap:10px;margin:16px 0}
.quote-list{display:flex;flex-direction:column;gap:10px;max-height:58vh;overflow:auto;padding-right:2px}
.quote-list-item{border:1px solid #dce7f3;border-radius:12px;padding:14px 16px;background:#fff}
.quote-list-item__top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.quote-list-item__meta{display:grid;grid-template-columns:1fr 1.4fr auto auto;gap:8px;align-items:center;margin-top:8px;color:#647c94;font-size:13px}
.quote-list-item__meta strong{justify-self:end;color:#10375e;font-size:17px}
.quote-list-item__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;flex-wrap:wrap}
.quote-status{display:inline-flex;align-items:center;min-height:28px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:700;background:#eef4fa;color:#47647e}
.quote-status--vigente{background:#e9f7ef;color:#187844}
.quote-status--vencida{background:#fff3e6;color:#a15b16}
.quote-status--convertida{background:#eaf2ff;color:#145ca8}
.quote-status--cancelada{background:#fbecec;color:#a12f2f}
.quote-list-empty{padding:28px 16px;border:1px dashed #cbdced;border-radius:12px;text-align:center;color:#647c94}
.quote-detail-head{border-bottom:1px solid #e6edf5;padding-bottom:10px}
.quote-detail-head__code{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.quote-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0;padding:12px;background:#f6f9fd;border:1px solid #dce7f3;border-radius:12px;font-size:13px}
.quote-detail-items{display:flex;flex-direction:column;gap:0;border:1px solid #dce7f3;border-radius:12px;overflow:hidden}
.quote-detail-item{display:grid;grid-template-columns:minmax(0,1fr) 90px 110px;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #e6edf5}
.quote-detail-item:last-child{border-bottom:0}
.quote-detail-item__name{display:flex;flex-direction:column;gap:3px;min-width:0}
.quote-detail-item__name small{color:#647c94}
.quote-detail-notes{margin:14px 0 0;padding:12px;background:#f6f9fd;border-radius:10px}
@media(max-width:760px){.quote-list-toolbar{grid-template-columns:1fr}.quote-list-item__meta{grid-template-columns:1fr 1fr}.quote-list-item__meta strong{justify-self:start}.quote-detail-summary{grid-template-columns:1fr 1fr}.quote-detail-item{grid-template-columns:minmax(0,1fr) 78px}.quote-detail-item>strong{grid-column:2;grid-row:1}.quote-detail-item>span{grid-column:2;grid-row:1;align-self:end;margin-top:24px}.quote-list-item__actions{justify-content:stretch}.quote-list-item__actions button{flex:1 1 120px}}

/* v555: ergonomía táctil del POS.
 * Objetivo: controles principales con área de toque de 48–52 px, separación suficiente
 * y sin depender de objetivos pequeños como X, checkboxes o botones secundarios.
 */
#pos,
#modal,
.employee-login{
  -webkit-tap-highlight-color:transparent;
}

#pos button,
#modal button,
#modal a,
.employee-login button,
.employee-login input{
  touch-action:manipulation;
}

#pos button,
#modal .dialog-actions button,
#modal .dialog-actions a,
#modal form button,
.employee-login button{
  min-height:52px;
}

#pos input,
#pos select,
#pos textarea,
#modal input,
#modal select,
#modal textarea,
.employee-login input{
  min-height:52px;
}

#pos button,
#modal button,
.employee-login button{
  user-select:none;
  -webkit-user-select:none;
}

/* Búsqueda de productos: la X deja de ser un objetivo diminuto. */
#pos .product-search-clear{
  width:48px;
  min-width:48px;
  height:48px;
  min-height:48px;
  padding:0;
  right:7px;
  font-size:30px;
}

/* Resultados seleccionables: toda la tarjeta es un objetivo táctil amplio. */
#pos .product-result{
  min-height:72px;
  padding:10px 12px;
  border-radius:10px;
}
#pos .suggestions button{
  min-height:52px;
  padding:12px 14px;
}

/* Cliente y comprador: evitar controles de 40–44 px en la zona más usada. */
#pos .customer>.row #customer-search,
#pos .customer>.row #public,
#pos .customer>.row #purchaser,
#pos .customer>.row #new-customer,
#pos #customer-current .remove-customer{
  min-height:48px;
  height:48px;
}
#pos .customer>.row #customer-search,
#pos .customer>.row #public,
#pos .customer>.row #purchaser,
#pos .customer>.row #new-customer{
  padding-top:9px;
  padding-bottom:9px;
}
#pos .customer>.row #purchaser{
  min-width:150px;
  max-width:230px;
  font-size:14px;
}
#pos #customer-current .remove-customer{
  padding:7px 13px;
}

/* Controles de cantidad: conservar botones claramente distinguibles del campo. */
#pos .quantity{
  gap:6px;
}
#pos .quantity button,
#pos .quantity input,
#pos .cart-line>button{
  min-height:52px;
  height:52px;
}
#pos .quantity button{
  min-width:52px;
  padding:5px 12px;
  font-size:20px;
}
#pos .quantity input{
  width:68px;
  font-size:18px;
}
#pos .cart-line>button{
  min-width:76px;
}

/* Cotizaciones y acciones de la venta: botones cómodos incluso con guantes o dedo grande. */
#pos .pos-quote-actions{
  gap:12px;
}
#pos .pos-quote-actions button{
  min-height:52px;
  padding:10px 16px;
}

/* Métodos de pago: son objetivos primarios, no botones pequeños de formulario. */
#modal .payment-methods{
  gap:12px;
}
#modal .payment-method{
  min-height:58px;
  padding:12px 14px;
  font-size:16px;
}
#modal .payment-submit{
  min-height:68px;
}

/* Modales: cerrar, confirmar, cancelar y volver deben poder tocarse sin precisión fina. */
#modal .close{
  float:right;
  width:52px;
  min-width:52px;
  height:52px;
  min-height:52px;
  padding:0;
  font-size:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
}
#modal .dialog-actions{
  gap:12px;
}
#modal .dialog-actions button{
  min-height:52px;
  padding:10px 16px;
}

/* Verificación de identidad y administración de compradores. */
#modal .purchaser-select-row,
#modal .purchaser-verify,
#modal .purchaser-owner-present{
  min-height:48px;
}
#modal .purchaser-select-row>select{
  min-height:52px;
}
#modal .purchaser-verify,
#modal .purchaser-owner-present,
#modal .authorized-purchaser-active{
  gap:12px;
  padding:6px 0;
}
#modal .purchaser-verify input,
#modal .purchaser-owner-present input,
#modal .authorized-purchaser-active input{
  width:24px;
  min-width:24px;
  height:24px;
  min-height:24px;
  margin:0;
  accent-color:#0068e7;
}
#modal .authorized-purchaser-row{
  gap:10px;
  padding:12px;
}
#modal .authorized-purchaser-row button{
  min-height:52px;
}

/* Cotizaciones guardadas: búsqueda, filtros y acciones tienen el mismo tamaño táctil. */
#modal .quote-list-toolbar{
  gap:12px;
}
#modal .quote-list-toolbar input,
#modal .quote-list-toolbar select,
#modal .quote-list-toolbar button{
  min-height:52px;
}
#modal .quote-list-item__actions{
  gap:10px;
}
#modal .quote-list-item__actions button{
  min-height:52px;
  min-width:96px;
}
#modal #quote-list-more{
  width:100%;
  margin-top:12px;
}

/* Ventas pausadas: cada acción tiene una zona táctil completa. */
#modal .paused-sale .dialog-actions button{
  min-height:52px;
}

@media(max-width:900px){
  #pos .customer>.row{
    gap:10px;
  }
  #pos .customer>.row #customer-search,
  #pos .customer>.row #public,
  #pos .customer>.row #new-customer{
    min-height:52px;
    height:52px;
  }
  #pos .customer>.row #purchaser{
    min-height:52px;
    height:52px;
  }
  #pos #customer-current .remove-customer{
    min-height:48px;
    height:48px;
  }
  #pos .product-search-card .search{
    min-height:62px;
    height:62px;
  }
  #pos .product-search-clear{
    width:50px;
    min-width:50px;
    height:50px;
    min-height:50px;
    right:6px;
  }
}

@media(max-width:760px){
  #pos .pos-quote-actions button{
    width:100%;
    min-height:54px;
  }
  #pos .product-result{
    min-height:76px;
  }
  #modal .dialog-actions button{
    flex:1 1 160px;
  }
  #modal .quote-list-item__actions button{
    min-height:54px;
  }
}

/* Encabezado: cerrar sesión también debe ser un objetivo táctil claro. */
body>header #logout{
  min-height:52px;
  height:52px;
  padding:10px 18px;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
}


/* v556: selector de comprador optimizado para pantalla táctil.
 * Sustituye el select nativo pequeño por opciones grandes, claras y fáciles de tocar.
 */
.purchaser-menu-heading{
  margin:18px 0 10px;
  font-size:18px;
  font-weight:700;
  color:#10375e;
}
.purchaser-choice-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:18px;
}
.purchaser-choice{
  width:100%;
  min-height:76px !important;
  height:auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  text-align:left;
  border:2px solid #cbdced;
  border-radius:14px;
  background:#fff;
  color:#10375e;
  transition:border-color .12s ease,background .12s ease,box-shadow .12s ease;
}
.purchaser-choice:hover{
  background:#f6faff;
}
.purchaser-choice.is-selected{
  border-color:#0068e7;
  background:#eef6ff;
  box-shadow:0 0 0 2px #0068e71a;
}
.purchaser-choice-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.purchaser-choice-type{
  display:block;
  font-size:13px;
  line-height:1.2;
  color:#647c94;
}
.purchaser-choice-name{
  display:block;
  font-size:18px;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.purchaser-choice-check{
  flex:0 0 34px;
  width:34px;
  height:34px;
  border:2px solid #b9cce0;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  font-weight:800;
  color:#fff;
  background:#fff;
}
.purchaser-choice.is-selected .purchaser-choice-check{
  border-color:#0068e7;
  background:#0068e7;
}
/* v565: la verificación de identidad usa el mismo formato visual que las opciones de comprador. */
.purchaser-verify{
  width:100%;
  min-height:76px;
  margin:20px 0 8px;
  padding:12px 16px;
  border:2px solid #cbdced;
  border-radius:14px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  cursor:pointer;
  box-sizing:border-box;
}
.purchaser-verify-text{
  order:1;
  flex:1 1 auto;
  min-width:0;
  font-size:18px;
  line-height:1.25;
  font-weight:700;
  color:#10375e;
}
.purchaser-verify input{
  order:2;
  flex:0 0 34px;
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  margin:0;
  padding:0;
  appearance:none;
  -webkit-appearance:none;
  border:2px solid #b9cce0;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  accent-color:#0068e7;
  cursor:pointer;
  box-sizing:border-box;
}
.purchaser-verify input:checked{
  border-color:#0068e7;
  background:#0068e7 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 10 17l9-10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center/19px 19px no-repeat;
}
@media(max-width:760px){
  .purchaser-menu-heading{font-size:19px;margin-top:14px}
  .purchaser-choice{min-height:82px !important;padding:13px 15px}
  .purchaser-choice-name{font-size:18px}
  .purchaser-verify{min-height:82px;padding:13px 15px}
  .purchaser-verify input{width:36px;height:36px;min-width:36px;min-height:36px}
  .purchaser-verify-text{font-size:18px}
}


/* v558 — teclado virtual táctil del POS. */
.pos-virtual-keyboard{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  width:min(920px,calc(100vw - 24px));
  padding:12px;
  background:#fff;
  border:1px solid #cbdced;
  border-radius:16px;
  box-shadow:0 16px 45px #173b6240;
  z-index:10000;
}
.pos-virtual-keyboard[hidden]{display:none}
.pos-keyboard-head{display:flex;align-items:center;gap:12px;margin-bottom:8px;padding:0 2px}
.pos-keyboard-head strong{font-size:17px;flex:1}
.pos-keyboard-head button{width:48px;min-width:48px;height:48px;min-height:48px;padding:0;font-size:28px;border-radius:10px}
.pos-keyboard-mode{display:flex;gap:8px;margin-bottom:8px}
.pos-keyboard-mode button{min-width:74px;height:48px;min-height:48px;padding:8px 14px;font-weight:700}
.pos-keyboard-mode button.is-active{background:#0068e7;color:#fff;border-color:#0068e7}
.pos-keyboard-keys{display:flex;flex-direction:column;gap:7px}
.pos-keyboard-row{display:flex;gap:7px}
.pos-key{flex:1;min-width:0;height:56px;min-height:56px;padding:8px 6px;font-size:20px;font-weight:700;border-radius:10px;touch-action:manipulation}
.pos-key:active{transform:translateY(1px);background:#edf5ff}
.pos-key-wide{flex:1.15}
.pos-keyboard-bottom .pos-key-space{flex:3}
.pos-keyboard-bottom .pos-key-action{flex:1.25}
.pos-keyboard-bottom .pos-key-enter{flex:1.45;background:#0068e7;color:#fff;border-color:#0068e7}
@media(max-width:760px){
  .pos-virtual-keyboard{width:calc(100vw - 12px);padding:8px;border-radius:14px}
  .pos-keyboard-row{gap:5px}
  .pos-key{height:54px;min-height:54px;font-size:18px}
  .pos-keyboard-head button,.pos-keyboard-mode button{height:46px;min-height:46px}
}


/* v566: ajuste final del selector de comprador y de la zona de cliente. */
#pos .customer>.row{
  top:72px;
}

/* Mantener visible la barra de búsqueda de cliente mientras haya un cliente/comprador cargado.
 * Permanece deshabilitada hasta quitar el cliente para evitar reemplazar accidentalmente la cuenta. */
#pos .customer>.row #customer-search{
  visibility:visible;
  display:block;
}

/* La verificación usa exactamente el mismo patrón visual que las tarjetas de comprador. */
#modal .purchaser-verify{
  width:100%;
  min-height:76px;
  height:auto;
  margin:20px 0 8px;
  padding:12px 16px;
  border:2px solid #cbdced;
  border-radius:14px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  cursor:pointer;
  box-sizing:border-box;
}
#modal .purchaser-verify-text{
  order:1;
  flex:1 1 auto;
  min-width:0;
  font-size:18px;
  line-height:1.25;
  font-weight:700;
  color:#10375e;
}
#modal .purchaser-verify input{
  order:2;
  flex:0 0 34px;
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  margin:0;
  padding:0;
  appearance:none;
  -webkit-appearance:none;
  border:2px solid #b9cce0;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  accent-color:#0068e7;
  cursor:pointer;
  box-sizing:border-box;
}
#modal .purchaser-verify input:checked{
  border-color:#0068e7;
  background:#0068e7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 10 17l9-10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/19px 19px no-repeat;
}
#modal .purchaser-verify.is-selected{
  border-color:#0068e7;
  background:#eef6ff;
  box-shadow:0 0 0 2px #0068e71a;
}
@media(max-width:760px){
  #modal .purchaser-verify{
    min-height:82px;
    padding:13px 15px;
  }
  #modal .purchaser-verify input{
    width:36px;
    height:36px;
    min-width:36px;
    min-height:36px;
  }
  #modal .purchaser-verify-text{font-size:18px;}
}

/* v568: align the customer heading and its two actions without moving the search row. */
@media(min-width:761px){
 #pos .customer.card{padding-top:10px;}
 #pos .customer>.row #new-customer{top:-62px;}
 #pos #customer-current .remove-customer{top:10px;}
}

/* v569: equal top/bottom inset for the desktop customer content (128px card). */
@media(min-width:901px){
 #pos .customer.card{padding-top:8px;}
 #pos #customer-current .remove-customer{top:8px;}
 #pos .customer>.row{top:70px;}
 #pos .customer>.row #new-customer{top:-62px;}
}
@media(min-width:761px) and (max-width:900px){
 #pos .customer.card{padding-top:6px;}
 #pos #customer-current .remove-customer{top:6px;}
 #pos .customer>.row{top:68px;}
 #pos .customer>.row #new-customer{top:-62px;}
}

/* v570: compact customer controls; preserve the existing font sizes. */
#pos .customer>.row #customer-search,
#pos .customer>.row #public,
#pos .customer>.row #purchaser,
#pos .customer>.row #new-customer,
#pos #customer-current .remove-customer{
 min-height:40px;height:40px;padding:5px 8px;
}
#pos .customer>.row #new-customer{min-width:60px;}
#pos #customer-current .remove-customer{min-width:57px;}
#pos .customer>.row #purchaser{min-width:130px;max-width:210px;}
@media(min-width:761px){
 #pos .customer.card{padding-top:12px;}
 #pos #customer-current .remove-customer{top:12px;right:79px;}
 #pos .customer>.row{top:74px;}
 #pos .customer>.row #new-customer{top:-62px;}
}

/* v572: separate desktop unit prices from the decrease-quantity button. */
@media(min-width:761px){
 #pos .cart-line .unit-price{position:relative;left:-20px;}
}
