
:root{--bg:#f6f5f3;--surface:#fff;--surface2:#fbfaf9;--text:#241f21;--muted:#777074;--line:#e8e2e4;--red:#8f0d2c;--red2:#b41642;--green:#117a4d;--orange:#a65b00;--blue:#2c5f9e;--shadow:0 12px 35px rgba(57,31,40,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}.app{min-height:100vh}.top{height:70px;background:#191416;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:30}.brand{font-weight:900;letter-spacing:.04em}.version{font-size:11px;color:#d7c8cd;margin-left:8px}.top-actions{display:flex;gap:10px;align-items:center}.layout{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:calc(100vh - 70px)}.side{background:#241b1e;color:#e9dde1;padding:20px 12px;position:sticky;top:70px;height:calc(100vh - 70px);overflow:auto}.side h3{font-size:10px;letter-spacing:.14em;color:#a99098;margin:18px 10px 8px}.nav{width:100%;border:0;background:transparent;color:#e9dde1;text-align:left;padding:11px 12px;border-radius:10px;cursor:pointer;margin:2px 0}.nav:hover,.nav.active{background:#8f0d2c;color:#fff}.main{padding:26px;min-width:0}.head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.head h1{margin:0;font-size:28px}.head p{margin:6px 0 0;color:var(--muted)}.head-actions{display:flex;gap:8px;flex-wrap:wrap}.card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow)}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.kpi span{display:block;color:var(--muted);font-size:12px}.kpi b{display:block;font-size:26px;margin:8px 0}.kpi small{color:var(--muted)}.btn{border:0;border-radius:11px;padding:10px 14px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;gap:7px}.btn.primary{background:var(--red);color:white}.btn.primary:hover{background:var(--red2)}.btn.soft{background:#f0ecee;color:#4e4347}.btn.light{background:white;color:#2a2225}.btn.danger{background:#ffe8eb;color:#a31635}.btn.green{background:#e7f6ef;color:#0e7549}.btn:disabled{opacity:.5;cursor:not-allowed}.full{width:100%}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0}.input{border:1px solid #dcd4d7;background:#fff;border-radius:11px;padding:10px 12px;min-height:42px;outline:none}.input:focus{border-color:#b4536d;box-shadow:0 0 0 3px rgba(143,13,44,.08)}.toolbar .input{min-width:190px;flex:1}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px}.table{width:100%;border-collapse:collapse;min-width:780px}.table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#71676b;background:#faf8f8;padding:11px;text-align:left;white-space:nowrap}.table td{padding:11px;border-top:1px solid #eee8ea;vertical-align:middle}.table tr:hover td{background:#fffbfc}.pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eee9eb;color:#675d61;font-size:11px;font-weight:800}.pill.green{background:#e4f5ec;color:#0f7649}.pill.red{background:#ffe7eb;color:#a21434}.pill.warning{background:#fff1d8;color:#975900}.pill.blue{background:#e9f1ff;color:#2b5c9a}.actions{display:flex;gap:6px;flex-wrap:wrap}.notice{padding:12px 14px;border-radius:12px;margin:12px 0;font-size:13px}.notice.danger{background:#ffe8eb;color:#971530}.notice.success{background:#e8f7ef;color:#0c7548}.notice.info{background:#edf4ff;color:#28578d}.muted{color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.field{display:flex;flex-direction:column;gap:6px}.field span{font-size:12px;font-weight:800;color:#5e5558}.field.full{grid-column:1/-1}.field textarea{min-height:90px;resize:vertical}.modal-back{position:fixed;inset:0;background:rgba(19,11,14,.55);display:grid;place-items:center;padding:20px;z-index:100;overflow:auto}.modal{width:min(980px,100%);max-height:94vh;overflow:auto;background:#fff;border-radius:20px;padding:22px;box-shadow:0 30px 80px rgba(0,0,0,.25)}.modal .head{position:sticky;top:-22px;background:white;padding:5px 0 12px;z-index:3}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#5d1027,#1a1315 55%);padding:20px}.login-card{width:min(430px,100%)}.login-mark{width:58px;height:58px;background:var(--red);color:#fff;border-radius:16px;display:grid;place-items:center;font-weight:900;font-size:20px}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}.split.wide{grid-template-columns:1.35fr .65fr}.price-rule{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fff7f9;border:1px solid #efd2da;padding:14px;border-radius:15px}.price-rule b,.price-rule span{display:block}.price-rule span{font-size:12px;color:#74656a;margin-top:3px}.summary{display:grid;gap:6px}.summary-line,.summary-total{display:flex;justify-content:space-between;gap:20px;padding:8px 0;border-bottom:1px solid #eee8ea}.summary-total{font-size:18px;font-weight:900}.line-editor{border:1px solid #eee5e8;border-radius:14px;padding:12px;margin:10px 0}.line-grid{display:grid;grid-template-columns:2fr 90px 130px 100px 110px auto;gap:8px;align-items:end}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#181417;color:#f3e9ed;padding:12px;border-radius:12px;overflow:auto;max-height:350px}.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}.tab{border:0;background:#eee9eb;border-radius:999px;padding:8px 12px;font-weight:800;cursor:pointer}.tab.active{background:var(--red);color:white}.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.right{text-align:right}.nowrap{white-space:nowrap}.mini{font-size:11px}.danger-zone{border:1px solid #f3c6ce;background:#fff7f8;border-radius:14px;padding:14px}.badge-num{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:999px;background:#eee5e8;font-size:11px;font-weight:900}.receipt{max-width:760px;margin:auto}.receipt h2{text-align:center}.receipt-items{margin:15px 0}.receipt-footer{margin-top:20px;color:#5e5558;font-size:12px}.sticky-actions{position:sticky;bottom:-22px;background:#fff;padding:12px 0 2px;margin-top:16px;border-top:1px solid #eee}.low{color:#a65b00;font-weight:800}
@media(max-width:1100px){.grid4{grid-template-columns:repeat(2,1fr)}.line-grid{grid-template-columns:1fr 90px 110px;}.line-grid>*:nth-child(n+4){grid-column:auto}.split,.split.wide{grid-template-columns:1fr}}
@media(max-width:800px){.layout{grid-template-columns:1fr}.side{position:static;height:auto;display:flex;overflow:auto;gap:5px;padding:9px}.side h3{display:none}.nav{width:auto;white-space:nowrap}.main{padding:16px}.top{padding:0 14px}.top-actions .light{display:none}.grid4,.grid3,.form-grid,.price-rule,.export-grid{grid-template-columns:1fr}.head{flex-direction:column}.line-grid{grid-template-columns:1fr 80px}.table{min-width:700px}}
.price-preview{grid-column:1/-1;margin-top:18px;border:1px solid #d8e5ee;background:linear-gradient(180deg,#f4fbff 0%,#eef7fb 100%);border-radius:16px;padding:16px}.price-preview-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.price-preview-title b{display:block;font-size:14px}.price-preview-title span:not(.pill){display:block;color:var(--muted);font-size:11px;margin-top:3px}.price-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.price-preview-grid>div,.price-preview-wholesale>div{background:rgba(255,255,255,.78);border:1px solid #dbe8ef;border-radius:12px;padding:11px}.price-preview-grid span,.price-preview-wholesale span,.price-preview-final span{display:block;font-size:10px;letter-spacing:.05em;color:#6b7880;font-weight:800;text-transform:uppercase;margin-bottom:5px}.price-preview-grid b{font-size:15px}.price-preview-conversion{font-size:12px;color:#5e6d76;margin:12px 2px 8px}.price-preview-final{background:#dff0f7;border-radius:13px;padding:13px 15px;margin-top:8px}.price-preview-final strong{display:block;font-size:28px;color:#285f9b;margin-top:3px}.price-preview-wholesale{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.price-preview-wholesale strong{font-size:21px;color:#7c0a23}.price-preview-offer{font-size:11px;color:#6a5d62;margin-top:10px}.price-preview-offer span{font-weight:900;color:#8f0d2c}@media(max-width:760px){.price-preview-grid{grid-template-columns:1fr 1fr}.price-preview-wholesale{grid-template-columns:1fr}.price-preview-final strong{font-size:22px}}

/* v5 · Paridad visual/funcional con escritorio */
.product-modal{width:min(1220px,97vw)!important;padding:24px!important}
.product-modal .sticky-actions{display:none}
.product-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:18px;align-items:stretch}
.product-editor-card{border:1px solid var(--line);border-radius:18px;padding:22px;background:#fff;min-width:0}
.product-editor-card h2{font-size:17px;margin:0 0 6px}.price-formula{font-size:12px;color:var(--muted);margin:0 0 18px}
.product-info-grid{grid-template-columns:1fr}.product-editor-card .form-grid{gap:12px}
.field-help{font-size:10px!important;font-weight:500!important;color:var(--muted)!important;margin-top:-2px}
.photo-section{margin-top:18px}.section-label{display:block;font-size:12px;font-weight:800;color:#5e5558;margin-bottom:8px}.photo-editor-row{display:flex;align-items:center;gap:16px}.photo-preview{width:126px;height:126px;border:1px solid #dcd4d7;border-radius:13px;background:#faf9f8;display:grid;place-items:center;overflow:hidden;flex:0 0 auto}.photo-preview img{width:100%;height:100%;object-fit:contain;background:white}.photo-empty{font-size:12px;color:var(--muted);text-align:center;padding:10px}.photo-actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.file-btn{position:relative;overflow:hidden}
.price-live-card{position:relative;margin-top:20px;background:#eef7f7;border-radius:14px;padding:18px 18px 16px;min-height:190px}.price-live-grid{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:14px}.price-live-grid span,.price-live-label,.wholesale-live-row span{display:block;font-size:10px;letter-spacing:.04em;color:#6e7777;font-weight:800}.price-live-grid b{display:block;font-size:16px;margin-top:5px}.conversion-line{font-size:11px;color:#5f6969;margin:17px 0 3px}.price-live-total{display:block;font-size:28px;color:#2567c9;margin:4px 0 10px}.wholesale-live-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:9px;border-top:1px solid rgba(60,100,100,.13)}.wholesale-live-row b{color:#7c0a23}.product-save-inline{position:absolute;right:18px;bottom:16px;min-width:165px}
.order-modal{width:min(1180px,97vw)!important}.desktop-product-picker{margin:14px 0 10px;border:1px solid #e9e2e4;border-radius:14px;padding:14px;background:#faf9f8}.product-search-results{display:grid;gap:6px;margin-top:8px;max-height:250px;overflow:auto}.product-result{width:100%;border:1px solid #e7e1e3;background:white;border-radius:11px;padding:10px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;text-align:left;cursor:pointer}.product-result:hover{border-color:#b4536d;background:#fff7f9}.product-result span:first-child{display:flex;flex-direction:column;gap:2px}.product-result small{color:var(--muted)}.product-result-meta{font-size:11px;color:#5e5558;white-space:nowrap}.product-result strong{color:var(--red);font-size:12px}.order-lines-head,.order-line-row{display:grid;grid-template-columns:minmax(230px,2fr) 90px 95px 125px 105px 125px auto;gap:8px;align-items:center}.order-lines-head{padding:7px 10px;font-size:10px;font-weight:900;letter-spacing:.05em;color:#71676b;text-transform:uppercase}.order-line-row{border:1px solid #eee5e8;border-radius:12px;padding:9px 10px;margin:7px 0;background:#fff}.order-product-name{display:flex;flex-direction:column;min-width:0}.order-product-name b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-product-name small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-stock{text-align:center;font-weight:800}.input.compact{min-height:38px;padding:8px}.compact-btn{padding:9px 10px}.order-subtotal{text-align:right}.empty-lines{padding:20px;border:1px dashed #d9d0d3;border-radius:12px;color:var(--muted);text-align:center}
@media(max-width:980px){.product-editor-layout{grid-template-columns:1fr}.product-save-inline{position:static;margin-top:12px;width:100%}.price-live-card{padding-bottom:18px}.order-lines-head{display:none}.order-line-row{grid-template-columns:1fr 1fr}.order-product-name{grid-column:1/-1}.product-result{grid-template-columns:1fr}.product-result-meta{white-space:normal}}

/* v6 · Comprobantes y experiencia profesional para local de repuestos */
.receipt-modal{width:min(1080px,98vw);padding:0;overflow:hidden;background:#efeded}.receipt-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 18px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}.receipt-toolbar>div:first-child b,.receipt-toolbar>div:first-child span{display:block}.receipt-toolbar>div:first-child span{font-size:11px;color:var(--muted);margin-top:2px}.receipt-paper{padding:24px;overflow:auto;max-height:calc(94vh - 72px)}.pro-receipt{max-width:920px;margin:auto;background:#fff;border:1px solid #ddd5d8;border-radius:14px;padding:30px;box-shadow:0 12px 35px rgba(0,0,0,.08)}.pro-receipt-header{display:flex;justify-content:space-between;gap:25px;padding-bottom:18px;border-bottom:2px solid var(--red)}.receipt-brand{display:flex;gap:15px;align-items:center;min-width:0}.receipt-logo{width:62px;height:62px;display:grid;place-items:center;border-radius:15px;background:var(--red);color:#fff;font-size:20px;font-weight:950;letter-spacing:.04em;flex:0 0 auto}.receipt-brand h2{margin:0;font-size:23px}.receipt-brand span,.receipt-brand small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.receipt-doc{text-align:right;min-width:190px}.receipt-doc>span{display:block;color:var(--red);font-size:10px;text-transform:uppercase;font-weight:900;letter-spacing:.13em}.receipt-doc strong{display:block;font-size:27px;margin:4px 0}.receipt-doc small{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.receipt-banner{padding:10px 13px;background:#fff4f7;border:1px solid #f1d6dd;border-radius:10px;margin:14px 0;font-size:12px}.receipt-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:20px 0}.receipt-section-label{display:block;color:var(--red);font-size:10px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;margin-bottom:6px}.receipt-meta-row{display:flex;justify-content:space-between;gap:15px;padding:7px 0;border-bottom:1px solid #eee8ea;font-size:11px}.receipt-meta-row span{color:var(--muted)}.receipt-meta-row b{text-align:right}.receipt-table-wrap{overflow:auto;border:1px solid #e8e2e4;border-radius:11px}.receipt-table{width:100%;border-collapse:collapse;min-width:680px}.receipt-table th{background:#f8f5f6;text-transform:uppercase;letter-spacing:.06em;color:#756a6e;font-size:10px;padding:10px;text-align:left}.receipt-table td{font-size:11px;padding:11px 10px;border-top:1px solid #eee8ea}.receipt-table .right{text-align:right}.mono-cell{font-family:ui-monospace,Consolas,monospace;font-size:10px!important}.receipt-bottom{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:30px;margin-top:22px}.receipt-payment-row{display:grid;grid-template-columns:1fr auto;gap:4px 14px;padding:7px 0;border-bottom:1px solid #eee8ea;font-size:11px}.receipt-payment-row small{grid-column:1/-1;color:var(--muted)}.receipt-total-box{background:linear-gradient(135deg,#701027,#a11035);color:#fff;border-radius:14px;padding:20px;text-align:right;box-shadow:0 10px 24px rgba(143,13,44,.18)}.receipt-total-box span{font-size:10px;font-weight:800;letter-spacing:.12em}.receipt-total-box strong{display:block;font-size:29px;margin-top:5px}.receipt-notes{margin-top:14px;padding:10px 12px;background:#faf8f8;border-radius:10px}.receipt-notes b,.receipt-notes span{display:block;font-size:11px}.receipt-notes span{color:var(--muted);margin-top:4px}.pro-receipt-footer{margin-top:26px;padding-top:13px;border-top:1px solid #ddd7d9;text-align:center}.pro-receipt-footer span{display:block;font-size:11px;color:#554b4f}.pro-receipt-footer small{display:block;font-size:9px;color:#a2969a;margin-top:3px}
@media(max-width:760px){.receipt-toolbar{align-items:flex-start;flex-direction:column}.receipt-toolbar .actions{width:100%}.receipt-toolbar .btn{flex:1}.receipt-paper{padding:10px}.pro-receipt{padding:17px}.pro-receipt-header{flex-direction:column}.receipt-doc{text-align:left}.receipt-info-grid,.receipt-bottom{grid-template-columns:1fr}.receipt-total-box{text-align:left}.receipt-brand h2{font-size:19px}}

.order-notes-cell{max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#51474b}.order-notes-cell:hover{white-space:normal;overflow:visible}

/* v7 · Usuarios, avatares e Importar/Exportar con paridad escritorio */
.user-chip{display:flex;align-items:center;gap:10px;padding:5px 8px;border-radius:14px}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#8f0d2c,#d12b55);color:#fff;font-size:12px;font-weight:900;letter-spacing:.04em;box-shadow:0 5px 14px rgba(143,13,44,.24);overflow:hidden;flex:0 0 auto}.avatar img{width:100%;height:100%;object-fit:cover}.avatar.sm{width:31px;height:31px;font-size:10px}.user-row{display:flex;align-items:center;gap:10px}.user-row b,.user-row span{display:block}.user-row span{font-size:10px;color:var(--muted);margin-top:2px}.first-login-banner{margin:0 0 18px;padding:13px 16px;border:1px solid #f1c8d3;background:#fff2f5;border-radius:14px;display:flex;justify-content:space-between;align-items:center;gap:15px}.first-login-banner b{color:#7c0a23}.io-tabs{display:flex;gap:8px;margin:0 0 16px}.io-tabs button.active{background:var(--red);color:#fff}.export-pro-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.export-section{border:1px solid var(--line);background:#fff;border-radius:18px;padding:18px;margin-bottom:16px}.export-section h3{margin:0 0 13px;font-size:15px}.check-grid{display:flex;flex-wrap:wrap;gap:8px 18px}.check-line{display:flex;align-items:center;gap:7px;font-size:12px}.multi-select{min-height:120px}.import-drop{border:2px dashed #dbcdd2;border-radius:16px;padding:22px;text-align:center;background:#fcfafb}.import-summary{display:flex;gap:14px;flex-wrap:wrap;margin:14px 0}.import-summary span{padding:8px 11px;border-radius:999px;background:#f3eff0;font-size:11px;font-weight:800}.preview-table-wrap{max-height:350px;overflow:auto;border:1px solid var(--line);border-radius:14px}.preview-ok{color:#148047;font-weight:800}.preview-error{color:#b31b36;font-weight:800}.user-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.user-card{border:1px solid var(--line);border-radius:18px;background:#fff;padding:18px;box-shadow:0 7px 22px rgba(45,26,32,.05)}.user-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.user-card-main{display:flex;align-items:center;gap:12px}.user-card .avatar{width:48px;height:48px}.user-card-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.user-card-meta div{background:#faf7f8;border-radius:10px;padding:9px}.user-card-meta span{display:block;font-size:9px;text-transform:uppercase;color:var(--muted);font-weight:900}.user-card-meta b{font-size:11px;margin-top:4px;display:block}.default-pass-box{padding:11px 13px;border-radius:12px;background:#fff6db;border:1px solid #f0d98d;color:#765a00;font-size:12px}.side .nav{position:relative;padding-left:38px}.side .nav::before{content:'•';position:absolute;left:18px;top:50%;transform:translateY(-50%);font-size:20px;color:#967c84}.side .nav.active::before{color:#fff}.top{box-shadow:0 4px 20px rgba(20,10,13,.12)}
@media(max-width:980px){.export-pro-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.export-pro-grid{grid-template-columns:1fr}.first-login-banner{align-items:flex-start;flex-direction:column}}


/* v7.2 · Importar / Exportar — rediseño profesional */
#ioBody{max-width:1180px;margin:0 auto}
.io-tabs{display:inline-flex;gap:6px;margin:0 0 22px;padding:5px;background:#eee8ea;border:1px solid #e1d8db;border-radius:14px;box-shadow:0 4px 14px rgba(45,25,32,.05)}
.io-tabs .btn{min-width:170px;border-radius:10px;padding:11px 18px;box-shadow:none}
.io-tabs .btn.soft{background:transparent;color:#62575b}.io-tabs .btn.soft:hover{background:#fff}
.io-tabs .btn.primary.active{box-shadow:0 7px 18px rgba(143,13,44,.20)}
.export-section{position:relative;border:1px solid #e7dfe2;background:linear-gradient(180deg,#fff 0%,#fffdfd 100%);border-radius:22px;padding:22px 22px 20px;margin-bottom:18px;box-shadow:0 10px 32px rgba(51,28,36,.06);overflow:hidden}
.export-section::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,var(--red),#d84b6e)}
.export-section h3{margin:0 0 18px;padding-left:2px;font-size:18px;letter-spacing:-.01em;color:#2c2226;display:flex;align-items:center;gap:9px}
.export-section h3::before{content:'';width:9px;height:9px;border-radius:50%;background:var(--red);box-shadow:0 0 0 5px #f9e9ee}
.export-pro-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.export-pro-grid .field{gap:7px}.export-pro-grid .field span{font-size:11px;color:#72666a;text-transform:uppercase;letter-spacing:.045em}
.export-pro-grid .input,.export-pro-grid select{width:100%;min-height:46px;border-radius:13px;border-color:#ddd3d7;background:#fff;padding:11px 13px;transition:.18s ease}
.export-pro-grid .input:focus,.export-pro-grid select:focus{border-color:#a53654;box-shadow:0 0 0 4px rgba(143,13,44,.08)}
.check-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.check-line{position:relative;display:flex;align-items:center;gap:9px;min-height:42px;padding:10px 12px;border:1px solid #e6dfe1;border-radius:12px;background:#faf8f9;font-size:11px;font-weight:750;color:#4e4448;cursor:pointer;transition:.16s ease}
.check-line:hover{background:#fff5f8;border-color:#e0b7c3;transform:translateY(-1px)}
.check-line input{width:17px;height:17px;accent-color:var(--red);flex:0 0 auto}
.multi-select{min-height:150px!important;padding:8px!important;background:#fff!important}.multi-select option{padding:7px 9px;border-radius:7px;margin:1px 0}.multi-select option:checked{background:#f2dce3 linear-gradient(0deg,#f2dce3,#f2dce3);color:#7f0b29}
.export-section>.toolbar{margin:20px 0 4px;padding-top:16px;border-top:1px solid #eee7e9}
.export-section>.toolbar .btn{min-height:44px;border-radius:12px;padding:11px 17px}
.export-section>.toolbar .btn.primary{min-width:150px;box-shadow:0 8px 20px rgba(143,13,44,.16)}
#quickMinor,#quickMayor,#quickBoth{background:#f6f1f3;color:#5b4c51;border:1px solid #e8dfe2}
#quickMinor:hover,#quickMayor:hover,#quickBoth:hover{background:#fff;border-color:#d8c3ca}
.import-drop{position:relative;border:1.5px dashed #cdb9c0;border-radius:18px;padding:28px;text-align:center;background:linear-gradient(180deg,#fdfbfc,#faf6f8);transition:.18s ease}
.import-drop:hover{border-color:#a84a66;background:#fff8fa}.import-drop input[type=file]{display:block;width:min(560px,100%);margin:0 auto 10px;padding:10px;border:1px solid #dfd5d8;border-radius:12px;background:#fff}.import-drop .muted{margin:3px 0 0;font-size:11px}
.import-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.import-summary span{display:flex;align-items:center;justify-content:center;min-height:46px;padding:10px 12px;border-radius:12px;background:#f5f1f2;border:1px solid #e8e0e2;font-size:12px;font-weight:850}.import-summary .preview-ok{background:#ecf9f2;border-color:#c9ecd9}.import-summary .preview-error{background:#fff0f2;border-color:#f2d0d6}
.preview-table-wrap{max-height:410px;overflow:auto;border:1px solid #e4dcdf;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(38,23,28,.05)}
.preview-table-wrap .table th{position:sticky;top:0;z-index:2;background:#f7f3f4}.preview-table-wrap .table tr:nth-child(even) td{background:#fcfafb}
#exportMsg,#importMsg{margin-top:14px}
#exportMsg .notice,#importMsg .notice{border:1px solid transparent;box-shadow:0 5px 14px rgba(0,0,0,.04)}
@media(max-width:1150px){.check-grid{grid-template-columns:repeat(3,1fr)}.export-pro-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.io-tabs{display:flex;width:100%}.io-tabs .btn{flex:1;min-width:0}.check-grid,.export-pro-grid,.import-summary{grid-template-columns:1fr}.export-section{padding:18px}.export-section>.toolbar .btn{width:100%}}


/* v8 · consolidación visual profesional */
.top{height:76px;padding:0 28px;background:linear-gradient(90deg,#171114 0%,#21171b 60%,#171114 100%);border-bottom:1px solid rgba(255,255,255,.07)}
.brand-pro{display:flex;align-items:center;gap:10px;font-size:15px}.brand-dot{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#8f0d2c,#c91d4a);display:grid;place-items:center;color:#fff;font-size:11px;letter-spacing:.08em;box-shadow:0 8px 22px rgba(143,13,44,.30)}
.brand-pro .version{padding:5px 9px;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:rgba(255,255,255,.05);font-size:9px;color:#d9cbd0;margin-left:2px}
.user-chip-pro{padding:7px 12px 7px 8px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.055);border-radius:16px;min-width:190px}.user-chip-copy{min-width:0}.user-chip-copy b{display:block;font-size:12px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-chip-copy span{display:inline-flex;margin-top:3px;padding:2px 6px;border-radius:999px;background:rgba(255,255,255,.08);color:#cdbdc3;font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.top-actions>.btn{min-height:44px;padding:10px 16px;border-radius:13px}.top-actions>.btn.light{box-shadow:0 5px 16px rgba(0,0,0,.14)}
.side{top:76px;height:calc(100vh - 76px);background:linear-gradient(180deg,#241b1e 0%,#1e1719 100%);border-right:1px solid rgba(255,255,255,.04)}
.layout{min-height:calc(100vh - 76px)}.main{padding:30px 32px}.head{padding-bottom:8px}.head h1{font-size:30px;letter-spacing:-.025em}.card{box-shadow:0 10px 34px rgba(46,28,34,.065)}
.table-wrap{box-shadow:0 7px 26px rgba(45,28,34,.045)}.table th{height:44px}.table td{height:52px}
.modal{border:1px solid rgba(143,13,44,.08)}
.default-pass-box{display:flex;align-items:center;gap:8px;min-height:44px}
.price-preview-final strong{letter-spacing:-.035em}.price-preview-final::after{content:'Precio minorista redondeado automáticamente';display:block;font-size:9px;color:#5f6d75;margin-top:5px;font-weight:700}
@media(max-width:900px){.user-chip-pro{min-width:0}.user-chip-copy{display:none}.top{padding:0 14px}.main{padding:18px}}

/* v8.1 · Responsive mobile-first para uso operativo desde celular */
.top-left{display:flex;align-items:center;gap:10px;min-width:0}.mobile-menu-btn,.mobile-side-head,.mobile-side-actions,.side-overlay{display:none}
.mobile-menu-btn{width:42px;height:42px;border:0;border-radius:12px;background:#33282c;color:#fff;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:0;cursor:pointer;flex:0 0 auto}.mobile-menu-btn span{display:block;width:19px;height:2px;border-radius:99px;background:#fff}.mobile-side-head{align-items:center;justify-content:space-between;padding:4px 4px 14px;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:8px}.mobile-side-head b,.mobile-side-head span{display:block}.mobile-side-head span{font-size:11px;color:#bdaab1;margin-top:2px}.mobile-close-btn{width:38px;height:38px;border:0;border-radius:10px;background:#382b30;color:#fff;font-size:26px;line-height:1;cursor:pointer}.mobile-side-actions{padding:14px 4px 6px;gap:8px;flex-direction:column}.side-overlay{position:fixed;inset:70px 0 0;background:rgba(16,10,12,.48);z-index:39;backdrop-filter:blur(2px)}

@media(max-width:800px){
  html,body{max-width:100%;overflow-x:hidden}.app{min-height:100dvh}.top{height:64px;padding:0 10px;gap:8px}.mobile-menu-btn{display:flex}.brand{display:flex;align-items:center;gap:7px;min-width:0}.brand-dot{flex:0 0 auto}.brand-name{font-size:13px;white-space:nowrap}.version{display:none}.top-actions{gap:6px;min-width:0}.user-chip-pro{padding:4px!important;background:transparent!important;border:0!important;box-shadow:none!important}.user-chip-pro .avatar,.user-chip-pro .user-avatar{width:36px!important;height:36px!important}.user-chip-copy{display:none!important}.store-btn{display:none!important}.logout-btn{display:none!important}
  .layout{display:block;min-height:calc(100dvh - 64px)}.side{position:fixed!important;top:64px;left:0;bottom:0;width:min(310px,86vw);height:auto!important;z-index:40;display:block!important;padding:14px 10px 18px;overflow-y:auto;transform:translateX(-104%);transition:transform .22s ease;box-shadow:16px 0 45px rgba(0,0,0,.22)}body.mobile-nav-open .side{transform:translateX(0)}body.mobile-nav-open .side-overlay{display:block}body.mobile-nav-open{overflow:hidden}.mobile-side-head,.mobile-side-actions{display:flex}.side h3{display:block;margin:14px 8px 6px}.nav{width:100%!important;display:block;white-space:normal!important;padding:13px 12px;margin:3px 0;font-size:14px;border-radius:11px}.main{padding:14px 12px 84px;width:100%;max-width:100vw;overflow:hidden}.head{gap:12px;margin-bottom:16px}.head h1{font-size:24px;line-height:1.1}.head p{font-size:13px;line-height:1.4}.head-actions{width:100%;display:grid;grid-template-columns:1fr;gap:8px}.head-actions .btn{width:100%;min-height:46px}.card{padding:15px;border-radius:15px}.grid4,.grid3{grid-template-columns:1fr 1fr!important;gap:10px}.kpi b{font-size:21px;word-break:break-word}.toolbar{display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0}.toolbar .input,.toolbar select,.toolbar .btn{width:100%!important;min-width:0!important}.input{width:100%;min-width:0;min-height:46px;font-size:16px}.btn{min-height:44px;padding:10px 13px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%}.actions .btn{width:100%;padding:9px 8px;font-size:12px}.tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px;margin-inline:-2px}.tab{white-space:nowrap;flex:0 0 auto;min-height:42px}.form-grid,.split,.split.wide,.price-rule,.export-grid,.product-editor-layout{grid-template-columns:1fr!important}.field.full{grid-column:auto}.product-modal,.order-modal{width:100%!important;max-width:none!important;padding:14px!important;border-radius:16px!important;max-height:calc(100dvh - 16px)!important}.modal-back{padding:8px;place-items:stretch}.modal{width:100%;max-width:none;max-height:calc(100dvh - 16px);border-radius:16px;padding:14px}.modal .head{top:-14px;padding:7px 0 10px}.product-editor-card{padding:14px}.product-editor-card h2{font-size:16px}.photo-editor-row{align-items:flex-start}.photo-preview{width:104px;height:104px}.photo-actions{gap:6px}.price-preview{padding:12px}.price-preview-grid{grid-template-columns:1fr 1fr!important}.price-preview-final strong{font-size:25px}.price-preview-wholesale{grid-template-columns:1fr!important}.sticky-actions{bottom:-14px;padding:10px 0 0}.sticky-actions .btn,.product-save-btn{width:100%!important;min-height:48px}.desktop-product-picker{padding:11px}.product-result{grid-template-columns:minmax(0,1fr) auto!important;gap:7px}.product-result-meta{grid-column:1/2;white-space:normal}.order-lines-head{display:none!important}.order-line-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px;padding:12px}.order-product-name{grid-column:1/-1}.order-stock{display:flex;justify-content:space-between;text-align:left}.order-stock:before{content:'Stock';font-size:10px;color:var(--muted);text-transform:uppercase;font-weight:900}.order-subtotal{grid-column:1/-1;display:flex;justify-content:space-between;text-align:left;font-weight:900}.order-subtotal:before{content:'Subtotal';font-size:10px;color:var(--muted);text-transform:uppercase}.compact-btn{grid-column:1/-1;width:100%}.receipt-modal{width:100%!important;max-width:none!important}.receipt-toolbar{padding:10px;align-items:flex-start;flex-direction:column}.receipt-toolbar .actions{width:100%}.receipt-paper{padding:8px;max-height:calc(100dvh - 145px)}.pro-receipt{padding:16px;border-radius:10px}.pro-receipt-header{flex-direction:column;gap:14px}.receipt-doc{text-align:left!important;min-width:0!important}.receipt-items{overflow:auto}.receipt-items table{min-width:620px}.summary-line,.summary-total{gap:12px}.summary-line span:first-child,.summary-total span:first-child{min-width:0}.first-login-banner{flex-direction:column;align-items:stretch!important;gap:10px!important}.first-login-banner .btn{width:100%}.user-cards{grid-template-columns:1fr!important}.user-card{padding:14px!important}.user-card-head{align-items:flex-start!important}.user-card-meta{grid-template-columns:1fr 1fr!important}.default-pass-box{font-size:12px}.import-export-hero,.ie-hero{padding:16px!important}.ie-grid,.export-layout,.import-layout{grid-template-columns:1fr!important}
  .table-wrap{border:0;background:transparent;overflow:visible}.table{min-width:0!important;width:100%;border-collapse:separate;border-spacing:0 10px}.table thead{display:none}.table tbody,.table tr,.table td{display:block;width:100%}.table tr{background:#fff;border:1px solid var(--line);border-radius:15px;padding:10px 12px;box-shadow:0 6px 18px rgba(57,31,40,.05);overflow:hidden}.table tr.empty-row{padding:15px}.table td{border:0!important;padding:7px 0!important;display:grid;grid-template-columns:minmax(92px,34%) minmax(0,1fr);gap:10px;align-items:start;background:transparent!important;word-break:break-word}.table td:before{content:attr(data-label);font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#81767a;padding-top:2px}.table td[colspan]:before{display:none}.table td .actions{grid-column:2}.table tr:hover td{background:transparent}.nowrap{white-space:normal}.right{text-align:left}.mono{font-size:11px}.danger-zone{padding:12px}
}
@media(max-width:480px){.brand-name{display:none}.grid4,.grid3{grid-template-columns:1fr!important}.main{padding-inline:10px}.head h1{font-size:22px}.card{padding:13px}.actions{grid-template-columns:1fr}.user-card-meta{grid-template-columns:1fr!important}.price-preview-grid{grid-template-columns:1fr!important}.photo-editor-row{flex-direction:column}.photo-preview{width:118px;height:118px}.order-line-row{grid-template-columns:1fr!important}.order-product-name,.order-subtotal,.compact-btn{grid-column:1}.table td{grid-template-columns:88px minmax(0,1fr)}.top{padding-inline:8px}.btn{font-size:13px}.modal-back{padding:4px}.modal,.product-modal,.order-modal{border-radius:12px!important;max-height:calc(100dvh - 8px)!important}}

/* v8.4 - Pedido compacto + selección múltiple persistente */
.order-modal .form-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px 10px}
.order-modal .field{gap:4px}
.order-modal .field span{font-size:11px}
.order-modal .input{min-height:36px;padding:7px 9px}
.order-modal .field textarea{min-height:54px;max-height:72px}
.order-modal h3{margin:12px 0 8px}
.order-modal .desktop-product-picker{margin:6px 0 10px;padding:10px}
.product-picker-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.product-picker-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.product-picker-actions .btn{min-height:38px;padding:8px 11px}
#selectedProductsCount{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:rgba(255,255,255,.22);font-size:11px}
.selected-products-tray{margin-top:8px;padding:9px 10px;border:1px dashed #d9cdd1;border-radius:11px;background:#fff;min-height:42px}
.selected-products-summary{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:7px}.selected-products-summary b{font-size:12px}.selected-products-summary span{font-size:10px;color:var(--muted)}
.selected-product-chips{display:flex;gap:6px;flex-wrap:wrap}.selected-product-chip{border:1px solid #ead9df;background:#fff5f8;color:#5b2938;border-radius:999px;padding:5px 8px;font-size:10px;cursor:pointer;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-product-chip span{font-family:ui-monospace,Consolas,monospace;color:#8f0d2c;margin-right:5px}.selected-product-chip b{margin-left:5px;color:#8f0d2c}
.product-search-results-large{max-height:360px!important;min-height:180px}
.selectable-product-result{grid-template-columns:auto minmax(0,1fr) auto auto!important;cursor:pointer}.selectable-product-result.selected{border-color:#a93251;background:#fff1f5}.product-select-check{width:19px;height:19px;accent-color:#8f0d2c}.product-result-main{display:flex!important;flex-direction:column;gap:2px;min-width:0}.product-result-main b,.product-result-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-lines-editor{margin-top:10px;max-height:300px;overflow:auto;padding-right:3px}.order-lines-title{position:sticky;top:0;z-index:2;background:#fff;padding:7px 4px;border-bottom:1px solid #eee5e8}.order-lines-title>div{display:flex;justify-content:space-between;gap:10px}.order-lines-title b{font-size:12px}.order-lines-title span{font-size:10px;color:var(--muted)}
@media(max-width:1100px){.order-modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-picker-top{grid-template-columns:1fr}.product-picker-actions{width:100%}.product-picker-actions .btn{flex:1}.selectable-product-result{grid-template-columns:auto minmax(0,1fr) auto!important}.selectable-product-result .product-result-meta{grid-column:2}.selectable-product-result strong{grid-column:3;grid-row:1/3}}
@media(max-width:700px){.order-modal .form-grid{grid-template-columns:1fr!important}.order-modal .field.full{grid-column:1}.product-search-results-large{max-height:44vh!important;min-height:220px}.selected-products-summary{align-items:flex-start;flex-direction:column}.selectable-product-result{grid-template-columns:auto minmax(0,1fr)!important}.selectable-product-result .product-result-meta,.selectable-product-result strong{grid-column:2!important;grid-row:auto!important}.order-lines-editor{max-height:none;overflow:visible}}

/* v8.5 — resumen total del pedido */
.order-summary-box{position:sticky;bottom:0;margin-top:12px;margin-left:auto;width:min(440px,100%);background:#fff;border:1px solid #e8dde1;border-radius:16px;padding:14px 16px;box-shadow:0 10px 28px rgba(58,20,30,.08);z-index:3}.order-summary-row,.order-summary-total{display:flex;align-items:center;justify-content:space-between;gap:18px}.order-summary-row{font-size:13px;color:#655b5f;padding:5px 0}.order-summary-row b{color:#221b1e}.order-summary-row.discount b{color:#0a7b45}.order-summary-total{margin-top:8px;padding-top:10px;border-top:1px solid #eadfe3}.order-summary-total span{font-size:13px;font-weight:900;letter-spacing:.08em;color:#6f6266}.order-summary-total strong{font-size:26px;color:var(--red)}
@media(max-width:700px){.order-summary-box{position:static;width:100%;padding:13px}.order-summary-total strong{font-size:23px}}


/* v8.7 — totales integrados dentro de la grilla del pedido */
.order-grid-totals{border:1px solid #e7dce0;border-top:0;border-radius:0 0 14px 14px;overflow:hidden;background:#fff}
.order-grid-total-row{display:grid;grid-template-columns:minmax(0,1fr) 180px;align-items:center;min-height:42px;padding:8px 14px;border-top:1px solid #eee5e8;gap:16px}
.order-grid-total-row span{text-align:right;color:#6b6064;font-size:12px;font-weight:800}
.order-grid-total-row b,.order-grid-total-row strong{text-align:right;font-variant-numeric:tabular-nums}
.order-grid-total-row.discount b{color:#0a7b45}
.order-grid-total-row.grand-total{min-height:54px;background:#faf4f6;border-top:2px solid #dac6cd}
.order-grid-total-row.grand-total span{font-size:13px;letter-spacing:.08em;color:#5f1b30;font-weight:950}
.order-grid-total-row.grand-total strong{font-size:25px;color:var(--red);font-weight:950}
@media(max-width:700px){.order-grid-totals{border-radius:12px;margin-top:8px}.order-grid-total-row{grid-template-columns:1fr auto;padding:9px 12px}.order-grid-total-row span{text-align:left}.order-grid-total-row.grand-total strong{font-size:22px}}
.discount-live-row{background:rgba(124,10,35,.035);margin:8px -8px -6px;padding:10px 8px;border-radius:10px;border-top:1px solid rgba(124,10,35,.12)!important}.discount-live-row b{color:#0a7b45!important;font-size:17px}.discount-product-tag{color:#0a7b45;font-weight:800;margin-top:3px}
