/* Lectura y operación táctil; escritorio conserva sus tablas completas. */
.mobile-menu-toggle,.mobile-shortcuts,.mobile-product-code{display:none}
.doc-narrow{display:none}
@media(max-width:980px){html,body{overflow-x:clip}}
@media(max-width:600px){.doc-wide{display:none}.doc-narrow{display:inline}}
@media print{.doc-wide{display:inline!important}.doc-narrow,.mobile-product-code{display:none!important}}
.modal-shade{z-index:10010}#toast{z-index:10020}
@media(max-width:600px){.mobile-product-code{display:block;font-size:10px;color:#5a7184;margin-top:4px}}
@media(max-width:600px){.sale-grid .section-head input{width:100%;max-width:none!important;flex:1 1 100%}}
@media(max-width:600px){.modal,.modal>form,.modal .form-grid,.modal .field{min-width:0;max-width:100%}.business-document{width:100%;min-width:0;max-width:100%;overflow-wrap:anywhere}.document-head>div{min-width:0}.document-head strong{overflow-wrap:anywhere}.document-items{width:100%;min-width:0;overflow:visible}.document-items table{table-layout:fixed;width:100%;min-width:0}.document-items th,.document-items td{overflow-wrap:anywhere;word-break:normal}.document-totals{min-width:0}.document-totals strong{white-space:nowrap}}
@media(max-width:980px){
 html{scroll-padding-bottom:90px}body{padding-bottom:calc(78px + env(safe-area-inset-bottom))}.layout{display:block;min-height:calc(100dvh - 80px)}.side{padding:12px 16px;gap:0}.side .brand{padding:0;border-bottom:0;min-height:52px;gap:12px}.brand img{width:46px;height:46px}.brand strong{font-size:16px}.brand small{font-size:12px}.mobile-menu-toggle{display:block;margin-left:auto;white-space:nowrap;background:#ffffff12;border:1px solid #ffffff50;color:white;padding:10px 12px;min-height:44px;border-radius:10px;font-size:15px}.side .nav{display:none;overflow:visible}.side.nav-open .nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px;max-height:65dvh;overflow-y:auto;padding:2px 0 10px}.side .nav button{width:100%;white-space:normal;min-height:48px;font-size:14px;background:#ffffff0c;padding:12px}.side .nav button.active{background:#087b9f}.side .nav button:focus-visible{outline:2px solid #66e6df;outline-offset:-2px}.side-foot{display:none}.mobile-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;inset:auto 0 0;background:#fff;border-top:1px solid #d7e5ef;box-shadow:0 -6px 25px #102e4814;z-index:6;padding:6px max(8px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));gap:4px}.mobile-shortcuts button{border:0;background:transparent;color:#5a7184;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:55px;font-size:12px;font-weight:600;gap:4px}.mobile-shortcuts button span{font-size:22px;line-height:22px}.mobile-shortcuts button.active{color:#006c96;background:#e9f5fa}.main{padding:20px 16px 30px}.topline{gap:10px;margin-bottom:18px}.welcome-greeting{font-size:15px;overflow-wrap:anywhere}.welcome-username{font-size:13px;overflow-wrap:anywhere}.subtitle{font-size:13px}.top-actions{gap:8px}.top-actions .btn{min-height:42px}.side.nav-open+.main{padding-top:16px}.btn,input,select,textarea{touch-action:manipulation}.btn{min-height:44px}.field input,.field select,.field textarea{font-size:16px;min-height:46px}.field textarea{min-height:100px}.field label{font-size:14px;line-height:1.4}.form-grid{gap:16px}.toolbar .btn{white-space:normal;text-align:center}.sale-grid{gap:16px}.products-list{max-height:420px;max-height:50dvh}.checkout-card{position:static}.qty{width:86px!important;min-height:44px;font-size:16px}.product-select .top-actions{flex-wrap:nowrap}.chart-card{overflow:hidden}.chart-row{grid-template-columns:90px minmax(25px,1fr) 104px}.period-form .btn{min-height:46px}.modal-shade{padding:10px;align-items:center}.modal{max-height:calc(100dvh - 24px);width:100%;padding:18px;border-radius:16px;overscroll-behavior:contain}.modal h2{font-size:19px;overflow-wrap:anywhere}.modal .section-head{gap:8px}.modal .actions{position:sticky;bottom:-18px;z-index:2;background:#fff;border-top:1px solid #e0e8ef;margin:18px -18px -18px;padding:14px 18px;gap:10px}.modal .actions>.btn{flex:1}.modal .field.span2{min-width:0}.modal .form-grid{min-width:0}#toast{bottom:calc(85px + env(safe-area-inset-bottom));right:12px;left:12px;max-width:none;pointer-events:none}.toast{max-width:100%;font-size:14px;padding:12px 15px}.sc-sync-banner{font-size:12px;line-height:1.4;padding:8px 12px}.section-head>.field{width:100%}.section-head select{width:100%;min-width:0}.period-form{display:grid;grid-template-columns:1fr 1fr;align-items:end;padding:0 0 20px}.period-form .field{max-width:none;min-width:0}.period-form .btn{grid-column:1/-1}.table-search{font-size:16px;min-height:46px}.business-document .document-totals{width:100%;max-width:340px}.business-document footer{overflow-wrap:anywhere}.document-items td{overflow-wrap:anywhere}.document-items table{min-width:0}.document-head h2{overflow-wrap:anywhere}.auth-left h1{font-size:30px}.auth-card{max-width:none}
}
@media(max-width:600px){
 .topline{display:block}.top-actions{margin-top:14px}.top-actions .badge{font-size:12px}.top-actions .btn{font-size:13px;padding:9px 11px}.main{padding:18px 12px 24px}.card{padding:18px;border-radius:16px}.grid.cols4{gap:10px}.grid.cols4>.card{padding:14px;min-height:125px}.stat{font-size:clamp(19px,5.5vw,25px);line-height:1.25;overflow-wrap:anywhere;letter-spacing:-.4px}.stat-label{font-size:13px;line-height:1.3;margin-bottom:10px}.grid.cols4 .card small{font-size:12px;line-height:1.45;display:block;margin-top:10px}.executive-banner{padding:22px 18px}.executive-banner h2{font-size:25px;line-height:1.2}.executive-banner p{font-size:14px}.executive-date{font-size:13px}.eyebrow{font-size:11px;letter-spacing:1.5px}.grid.cols2{gap:12px}.chart-row{grid-template-columns:72px minmax(20px,1fr) 90px;font-size:12px;gap:6px}.chart-card h3{font-size:16px}.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.toolbar .btn{width:100%;font-size:13px;padding:10px 8px}.toolbar .table-search{grid-column:1/-1;width:100%;max-width:none}.form-grid{grid-template-columns:minmax(0,1fr)}.field.span2{grid-column:1}.form-grid input,.form-grid select,.form-grid textarea{max-width:100%;min-width:0}.side .nav button{font-size:13px}.modal .section-head h2{max-width:calc(100% - 85px)}.modal .section-head .btn{min-width:75px}.document-head{display:flex;align-items:start;gap:10px}.document-head>img{width:105px;height:65px}.document-head>div{text-align:right;margin-top:0}.document-head h2{font-size:16px;line-height:1.25}.document-head strong{font-size:13px}.document-head p{font-size:12px}.business-document{padding:4px}.document-customer{padding:12px;font-size:14px}.document-items th,.document-items td{font-size:11px;padding:9px 4px}.document-items table th:first-child,.document-items table td:first-child{display:none}.document-items table th:nth-child(2){width:34%}.document-totals p{font-size:14px}.document-totals .grand-total{font-size:21px}.business-document footer{font-size:12px}.document-watermark{left:5%;width:90%}.table-wrap{padding:10px;overflow:visible}.table-wrap table,.table-wrap tbody{display:block;width:100%;min-width:0}.table-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.table-wrap tbody tr{display:block;border:1px solid #e0e9f1;border-radius:12px;margin:8px 0 12px;background:white;overflow:hidden}.table-wrap tbody tr:last-child{margin-bottom:0}.table-wrap tbody td{display:block;position:relative;width:auto;max-width:none;border-bottom:1px solid #edf2f7;min-height:44px;white-space:normal!important;overflow-wrap:anywhere;padding:11px 10px 11px 42%;font-size:14px;text-align:left!important}.table-wrap tbody td[data-label]::before{content:attr(data-label);position:absolute;left:10px;top:12px;width:34%;color:#647c91;font-size:12px;font-weight:600;line-height:1.45;overflow-wrap:anywhere}.table-wrap tbody td[colspan]{padding:8px}.table-wrap td .btn{display:inline-flex;align-items:center;justify-content:center;margin:2px 3px 2px 0;min-height:44px;font-size:13px}.table-wrap td small{font-size:12px}.table-wrap td .badge{font-size:12px;white-space:normal}.table-wrap td:last-child{border-bottom:0}.table-wrap .empty{padding:12px;font-size:14px}.mobile-shortcuts:has(button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}.sale-grid .card{padding:15px}.pos-document-brand{gap:12px}.pos-document-brand img{width:90px}.pos-document-brand h2{font-size:19px}.product-select{align-items:start;gap:8px}.product-select b{font-size:14px;overflow-wrap:anywhere}.product-select small{font-size:12px}.product-select .qty{width:74px!important}.product-select>div:first-child{min-width:0}.product-select button{padding:8px 10px}.note{line-height:1.5}.auth-left{min-height:190px;padding:26px}.auth-left h1{font-size:27px}.auth-left img{width:105px;margin-bottom:14px}.auth-right{padding:14px}.auth-card{padding:22px}.auth-card input{font-size:16px;min-height:48px}.auth-card .btn{min-height:48px}.auth-card p{font-size:14px}
}
@media(max-width:350px){.side{padding:10px 12px}.brand strong{font-size:14px}.brand small{font-size:11px}.brand img{width:38px;height:38px}.mobile-menu-toggle{padding:8px;font-size:13px}.side.nav-open .nav{grid-template-columns:1fr}.executive-banner h2{font-size:23px}.chart-row{grid-template-columns:60px minmax(15px,1fr) 82px;font-size:11px}.modal{padding:14px}.modal .actions{bottom:-14px;margin:16px -14px -14px;padding:12px 14px}.document-head>img{width:85px}.document-head h2{font-size:14px}.top-actions{gap:5px}.top-actions .btn{padding:8px;font-size:12px}}
@media print{body{padding-bottom:0!important}.mobile-menu-toggle,.mobile-shortcuts{display:none!important}.document-items table th:first-child,.document-items table td:first-child{display:table-cell!important}.table-wrap table{display:table!important}.table-wrap thead{display:table-header-group!important;position:static!important;width:auto!important;height:auto!important;clip-path:none!important}.table-wrap tbody{display:table-row-group!important}.table-wrap tbody tr{display:table-row!important}.table-wrap tbody td{display:table-cell!important;padding:8px!important}.table-wrap td[data-label]::before{display:none!important}.modal .actions{display:none!important}.document-head>img{width:170px!important;height:95px!important}.document-head h2{font-size:22px!important}}
