/* // cod- 13-08-2026: Diseño responsive del registro e historial de Compras v1. */
/* cod- 27-08-2026: selector de porcentaje con el mismo estilo y ancho del campo anterior. */
.purchase-bottom select{box-sizing:border-box;width:100%;min-height:42px;padding:.55rem .7rem;border:1px solid #d6dfe8;border-radius:9px;color:#21364f;background:#fbfcfd}
.purchases-page{width:100%;color:#172d47}.purchases-header{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.purchases-header p,.purchase-editor header p,.purchase-history header p,.purchase-modal header p{margin:0;color:#d62839;font-size:.64rem;font-weight:850;letter-spacing:.15em;text-transform:uppercase}.purchases-header h1{margin:.15rem 0;color:#102743;font-size:clamp(1.8rem,3vw,2.45rem)}.purchases-header span{color:#768499;font-size:.82rem}.purchase-button{min-height:40px;padding:.6rem 1rem;border:1px solid transparent;border-radius:9px;font-size:.74rem;font-weight:800;cursor:pointer}.purchase-button.primary{color:#fff;background:#d62839}.purchase-button.secondary{border-color:#dbe3eb;color:#294762;background:#fff}.purchase-button:disabled{opacity:.55;cursor:not-allowed}.purchase-notice,.purchase-form-error{margin-bottom:1rem;padding:.75rem 1rem;border:1px solid #cae8d8;border-radius:10px;color:#176646;background:#eff9f4;font-size:.75rem}.purchase-notice.error,.purchase-form-error{border-color:#efcbd0;color:#902a36;background:#fff3f4}.purchase-notice.warning{border-color:#f0dfb4;color:#71571b;background:#fffaeb}.purchase-editor,.purchase-history{margin-bottom:1.25rem;border:1px solid #dfe6ee;border-radius:15px;background:#fff;box-shadow:0 8px 24px rgba(13,39,67,.05)}.purchase-editor>header,.purchase-history>header,.purchase-modal>header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem 1.2rem;border-bottom:1px solid #e8edf2}.purchase-editor h2,.purchase-history h2,.purchase-modal h2{margin:.15rem 0 0;color:#19314c;font-size:1.15rem}.purchase-editor>header>button,.purchase-modal>header>button{width:32px;height:32px;padding:0;border:0;border-radius:8px;color:#65758a;background:#f0f3f7;font-size:1.2rem}.purchase-form-error{margin:1rem 1.2rem 0}.purchase-head-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;padding:1.2rem}.purchase-head-grid label,.purchase-bottom>label,.purchase-search-area>label{display:grid;gap:.4rem;color:#405269;font-size:.7rem;font-weight:800}.purchase-head-grid label span{color:#d62839}.purchase-head-grid input,.purchase-head-grid select,.purchase-bottom input,.purchase-search-row input{width:100%;min-height:42px;padding:.55rem .7rem;border:1px solid #d6dfe8;border-radius:9px;color:#21364f;background:#fbfcfd}.purchase-search-area{padding:0 1.2rem 1.2rem}.purchase-search-row{display:flex;gap:.5rem;margin-top:.4rem}.purchase-search-state{padding:.8rem;color:#7b8797;font-size:.72rem}.purchase-results{display:grid;max-height:230px;margin-top:.55rem;overflow-y:auto;border:1px solid #e1e7ed;border-radius:10px}.purchase-results article{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .8rem;border-bottom:1px solid #edf1f4}.purchase-results article:last-child{border:0}.purchase-results article div{display:grid;gap:.1rem}.purchase-results span,.purchase-results small{color:#7c8999;font-size:.67rem}.purchase-results button,.purchase-history td button{padding:.45rem .7rem;border:0;border-radius:7px;color:#214f77;background:#edf5fb;font-size:.68rem;font-weight:800}.purchase-lines-wrap{margin:0 1.2rem;border:1px solid #e0e6ed;border-radius:11px;overflow-x:auto}.purchase-lines{width:100%;border-collapse:collapse}.purchase-lines th,.purchase-history th{padding:.7rem .8rem;color:#718095;background:#f7f9fb;font-size:.63rem;text-align:left;text-transform:uppercase;white-space:nowrap}.purchase-lines td,.purchase-history td{padding:.75rem .8rem;border-top:1px solid #edf1f4;color:#3d4f64;font-size:.72rem}.purchase-lines td:first-child{display:grid;gap:.15rem}.purchase-lines td small{color:#8995a4}.purchase-lines input{width:110px;min-height:38px;padding:.45rem .55rem;border:1px solid #d5dee7;border-radius:8px}.purchase-lines .remove{border:0;color:#a52635;background:transparent;font-size:.68rem;font-weight:800}.money{color:#17456e!important;font-weight:800;white-space:nowrap}.purchase-empty,.purchases-state{display:grid;min-height:150px;place-items:center;align-content:center;gap:.4rem;padding:1.5rem;color:#7e8b9c;font-size:.76rem;text-align:center}.purchases-state.denied{min-height:calc(100vh - 150px);border:1px solid #e4e8ed;border-radius:15px;background:#fff}.purchases-state strong{color:#344a62}.purchases-state span{font-size:.68rem}.purchase-bottom{display:flex;align-items:flex-start;justify-content:flex-end;gap:2rem;padding:1.2rem}.purchase-bottom>label{width:190px}.purchase-totals{display:grid;min-width:240px;gap:.45rem}.purchase-totals span,.purchase-totals strong{display:flex;justify-content:space-between;gap:2rem}.purchase-totals span{color:#6f7e90;font-size:.75rem}.purchase-totals strong{padding-top:.5rem;border-top:1px solid #dfe5eb;color:#173654;font-size:.9rem}.purchase-editor>footer,.purchase-modal>footer{display:flex;justify-content:flex-end;gap:.5rem;padding:1rem 1.2rem;border-top:1px solid #e8edf2}.purchase-history>header{align-items:center}.purchase-history>header>span{color:#8793a2;font-size:.7rem}.purchase-table-wrap{overflow-x:auto}.purchase-history table{width:100%;border-collapse:collapse}.purchase-status{display:inline-flex;padding:.3rem .5rem;border-radius:99px;color:#176b4b;background:#e9f7f0;font-size:.64rem;font-weight:800}.purchase-modal-bg{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:1rem;background:rgba(7,24,43,.58)}.purchase-modal{display:flex;width:min(720px,100%);max-height:calc(100dvh - 2rem);flex-direction:column;overflow:hidden;border-radius:15px;background:#fff}.purchase-modal-body{min-height:0;padding:1.2rem;overflow-y:auto}.purchase-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin-bottom:1rem}.purchase-detail-grid span{display:grid;gap:.2rem;padding:.65rem;border-radius:8px;color:#8290a1;background:#f6f8fa;font-size:.66rem}.purchase-detail-grid b{color:#30475f;font-size:.73rem}.purchase-detail-lines{display:grid;margin-bottom:1rem;border:1px solid #e2e7ed;border-radius:10px}.purchase-detail-lines article{display:flex;justify-content:space-between;gap:1rem;padding:.7rem;border-bottom:1px solid #edf0f4}.purchase-detail-lines article:last-child{border:0}.purchase-detail-lines article>div{display:grid;gap:.15rem}.purchase-detail-lines span{color:#7b8999;font-size:.67rem}.purchase-detail-lines article>div:last-child{text-align:right}
@media(max-width:900px){.purchase-head-grid{grid-template-columns:1fr 1fr}.purchase-lines-wrap{overflow:visible}.purchase-lines,.purchase-lines tbody,.purchase-lines tr,.purchase-lines td{display:block;width:100%}.purchase-lines thead{display:none}.purchase-lines tr{padding:.7rem;border-bottom:1px solid #e6ebf0}.purchase-lines tr:last-child{border:0}.purchase-lines td{display:flex!important;align-items:center;justify-content:space-between;gap:1rem;padding:.35rem 0;border:0;text-align:right}.purchase-lines td:before{color:#8390a0;content:attr(data-label);font-size:.62rem;font-weight:800;text-transform:uppercase}.purchase-lines td:first-child>small{display:none}}
@media(max-width:650px){.purchases-header{align-items:stretch;flex-direction:column}.purchases-header .purchase-button{width:100%}.purchase-head-grid{grid-template-columns:1fr}.purchase-search-row{align-items:stretch;flex-direction:column}.purchase-results article{align-items:flex-start}.purchase-bottom{align-items:stretch;flex-direction:column}.purchase-bottom>label,.purchase-totals{width:100%;min-width:0}.purchase-history table,.purchase-history tbody,.purchase-history tr,.purchase-history td{display:block;width:100%}.purchase-history thead{display:none}.purchase-history tbody{display:grid;gap:.65rem;padding:.7rem}.purchase-history tr{padding:.65rem;border:1px solid #e4e9ef;border-radius:10px}.purchase-history td{display:flex;justify-content:space-between;gap:1rem;padding:.35rem 0;border:0;text-align:right}.purchase-history td:before{color:#8290a1;content:attr(data-label);font-size:.62rem;font-weight:800;text-align:left;text-transform:uppercase}.purchase-editor>footer{flex-direction:column-reverse}.purchase-editor>footer .purchase-button{width:100%}.purchase-detail-grid{grid-template-columns:1fr}.purchase-modal{max-height:calc(100dvh - 1rem)}.purchase-modal-bg{padding:.5rem}}
