:root{--bg:#f5f7f5;--surface:#ffffff;--aside:#ecf3eb;--text:#1c2d28;--muted:#63756c;--primary:#2e6f43;--primarydark:#235632;--soft:#e7f2e7;--border:#dee7e0;--amber:#a76b11;--amberbg:#fff2da;--red:#c94545;--redbg:#fff0ef;--shadow:0 4px 22px #173c2010;--radius:17px;color-scheme:light}
body.dark{--bg:#101b15;--surface:#1b2a20;--aside:#18271d;--text:#e8f1e9;--muted:#abbcb0;--primary:#67b881;--primarydark:#41895d;--soft:#2a4130;--border:#334c3a;--amber:#f5c278;--amberbg:#513c26;--red:#ffa09e;--redbg:#483033;--shadow:0 6px 22px #02070348;color-scheme:dark}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);font-size:16px;line-height:1.4}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #79ad8c;outline-offset:2px}
.shell{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--aside);border-right:1px solid var(--border);padding:16px 14px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{text-align:center;min-height:160px;display:flex;align-items:center;justify-content:center}.brand img{max-width:160px;width:100%;height:140px;object-fit:contain}.nav{display:grid;gap:8px;margin-top:12px}.nav-link{display:flex;align-items:center;gap:14px;width:100%;text-align:left;border:none;background:transparent;border-radius:13px;padding:15px;font-size:18px;color:var(--text);font-weight:650}.nav-link:hover,.nav-link.selected{background:var(--soft);color:var(--primary)}.nav-symbol{font-size:27px;font-weight:900;line-height:1;width:30px;text-align:center}.sidebar-foot{margin-top:auto;border-top:1px solid var(--border);padding-top:14px;display:grid;gap:5px}.quiet-link{border:0;background:transparent;color:var(--muted);padding:9px;text-align:left;border-radius:8px;font-size:13px}.quiet-link:hover{background:var(--soft)}
.workspace{min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 30px;border-bottom:1px solid var(--border);background:var(--surface)}h1,h2,h3,p{margin-top:0}.topbar h1{font-size:32px;line-height:1.15;margin:0;letter-spacing:-.6px}.topbar p{margin:3px 0 0;color:var(--muted);font-size:15px}.theme-button{border:1px solid var(--border);border-radius:30px;background:var(--surface);color:var(--text);padding:8px 10px;display:flex;align-items:center;gap:8px;font-size:20px}.switch-dot{display:block;background:var(--primary);border-radius:12px;width:31px;height:20px;position:relative}.switch-dot:after{content:"";width:14px;height:14px;background:white;border-radius:50%;position:absolute;right:3px;top:3px}.dark .switch-dot:after{right:auto;left:3px}
.content{padding:22px 26px 32px;max-width:1850px;margin:auto}.app-footer{padding:5px 28px 20px;color:var(--muted);font-size:12px}.notice{padding:12px 16px;background:var(--amberbg);border:1px solid #edcb8a;color:var(--amber);border-radius:12px;font-size:13px;font-weight:650;margin-bottom:17px}.page-card,.panel{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}.page-card{padding:20px 22px}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.page-heading h2{font-size:28px;letter-spacing:-.5px;margin:0}.page-heading p{font-size:14px;color:var(--muted);margin:6px 0 0}.page-heading .actions{justify-content:flex-end}.heading-icon{background:var(--soft);color:var(--primary);width:52px;height:52px;display:grid;place-items:center;font-size:29px;border-radius:14px;flex-shrink:0}.titleblock{display:flex;align-items:center;gap:12px}
button.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 15px;font-size:14px;font-weight:750;border-radius:11px;border:1px solid transparent;background:var(--soft);color:var(--text);white-space:nowrap}button.btn.primary{background:var(--primary);color:white}button.btn.primary:hover{background:var(--primarydark)}button.btn.outline{background:var(--surface);border-color:var(--border)}button.btn.red{color:var(--red);background:var(--redbg)}button.btn.green-soft{color:var(--primary);background:var(--soft)}button.btn.large{font-size:17px;min-height:53px;padding:12px 19px}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.actions .btn{min-height:35px;padding:6px 11px;font-size:13px}.muted{color:var(--muted)}.small{font-size:13px}
.filters{display:flex;flex-wrap:wrap;align-items:end;gap:13px;background:var(--bg);padding:14px;border:1px solid var(--border);border-radius:13px;margin-bottom:18px}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field label{font-size:13px;font-weight:750}.field input,.field select,.field textarea,.field .file-control{min-width:0;width:100%;min-height:43px;padding:9px 12px;background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:10px;outline-offset:1px}.field input[type=file]{padding:6px;max-width:100%}.field textarea{min-height:76px;resize:vertical}.filters .field{flex:1;min-width:150px}.filters .searchfield{flex:1.75}.filters .btn{margin-bottom:1px}.filters .wide{flex:2.1}.form-grid{display:grid;grid-template-columns:1fr 1.5fr 1.2fr;gap:14px}.form-grid.two{grid-template-columns:1fr 1fr}.panel{padding:17px;margin-bottom:16px}.panel-title{font-size:18px;font-weight:800;margin-bottom:13px}
.table-wrap{width:100%;overflow-x:auto;border:1px solid var(--border);border-radius:13px}.table{width:100%;border-collapse:collapse;min-width:700px}.table th{background:var(--soft);text-transform:uppercase;letter-spacing:.1px;text-align:left;color:var(--text);font-size:12px;font-weight:800}.table th,.table td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:middle}.table tr:last-child td{border-bottom:0}.table td{font-size:14px}.table td strong{font-size:16px}.table tr:hover td{background:color-mix(in srgb,var(--soft) 26%,transparent)}.table .num{font-size:22px;font-weight:900;color:var(--primary)}.chip{border-radius:999px;font-size:12px;font-weight:800;padding:6px 10px;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}.chip.sent{color:#167739;background:#dff5e3}.chip.wait{color:var(--amber);background:var(--amberbg)}.chip.unit{color:var(--primary);background:var(--soft)}.empty{padding:35px;color:var(--muted);text-align:center}.table .actions{flex-wrap:nowrap}.table .actions .btn{min-height:34px}.table-break{white-space:normal}
.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.kpi{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:16px;box-shadow:var(--shadow)}.kpi span{font-size:14px;color:var(--muted)}.kpi strong{font-size:30px;display:block;margin-top:4px}.totals-bar{display:flex;flex-wrap:wrap;gap:8px}
.order-layout{display:grid;grid-template-columns:minmax(0,1fr) 315px;gap:16px;align-items:start}.sticky-summary{position:sticky;top:18px}.selector-search{display:flex;align-items:center;gap:14px;margin:12px 0 16px}.selector-search input{flex:1;min-width:0;border:1px solid var(--border);border-radius:11px;padding:11px;background:var(--surface);color:var(--text)}.root-group{margin-bottom:20px}.root-header{background:var(--soft);color:var(--primary);font-size:19px;font-weight:850;padding:10px 14px;border-radius:11px;margin:0 0 12px}.sub-header{font-size:14px;font-weight:850;color:var(--muted);margin:16px 0 9px;padding:0 3px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:10px}.product-tile{border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:11px 9px;text-align:center;min-width:0}.product-tile.selected{border:2px solid var(--primary);background:color-mix(in srgb,var(--soft) 30%,var(--surface))}.product-img{width:58px;height:58px;object-fit:contain;display:block;margin:0 auto 5px;border-radius:9px}.product-img.emoji{display:grid;place-items:center;font-size:42px}.product-name{font-size:13px;font-weight:800;line-height:1.2;min-height:31px;display:flex;align-items:center;justify-content:center}.product-full{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px}.qty-count{font-size:29px;line-height:1.2;font-weight:900;margin:5px auto 9px;cursor:pointer;display:block;border:0;background:transparent;color:var(--text);width:100%}.tile-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px}.tile-controls button{padding:6px 0;min-width:0;border:none;border-radius:8px;background:var(--soft);font-size:16px;font-weight:800;color:var(--primary)}.tile-controls .minus{background:var(--redbg);color:var(--red)}.tile-controls .plus{background:var(--primary);color:white}.tile-controls .exact{border:1px solid var(--border);background:var(--surface);color:var(--text)}.added-line{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border)}.added-line:last-child{border-bottom:0}.added-line img{width:38px;height:38px;object-fit:contain}.added-line .name{font-size:13px;font-weight:700}.added-line .unit{font-size:12px;color:var(--muted)}.added-line .qty{font-size:20px;font-weight:900;text-align:right}.added-line button{border:0;background:transparent;color:var(--red)}.summary-counter{color:var(--muted);font-size:13px;margin:8px 0}.summary-save{width:100%;margin-top:16px}.summary-save.btn{min-height:55px;font-size:17px}.summary-small{background:var(--bg);padding:13px;border-radius:12px}
.list-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px;border-bottom:1px solid var(--border)}.list-row:last-child{border-bottom:none}.mini-photo{width:42px;height:42px;object-fit:contain;vertical-align:middle;margin-right:7px}.danger-note{color:var(--red);font-size:13px}.feature-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:4px 0 17px}.feature-actions .btn{min-height:45px}
#dialog{border:none;background:var(--surface);color:var(--text);border-radius:18px;width:min(570px,92vw);max-height:90vh;box-shadow:0 20px 65px #0004;padding:0}#dialog::backdrop{background:#162b1bb2}.dialog-head{padding:17px 21px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}.dialog-head h3{font-size:21px;margin:0}.dialog-body{padding:20px 22px;max-height:65vh;overflow:auto}.dialog-actions{padding:13px 21px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:9px}.keypad-display{width:100%;min-height:65px;text-align:right;font-size:28px;font-weight:850;padding:12px 16px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);margin-bottom:13px}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.keypad button{font-size:23px;font-weight:700;background:var(--soft);color:var(--text);border:1px solid var(--border);border-radius:12px;height:53px}.toast{position:fixed;bottom:20px;right:20px;background:var(--primary);color:white;border-radius:12px;padding:12px 18px;box-shadow:var(--shadow);font-weight:700;z-index:99;display:none;max-width:430px}.toast.show{display:block}.loading{text-align:center;padding:60px;color:var(--muted)}
@media(max-width:1250px){.shell{grid-template-columns:205px 1fr}.sidebar{padding:12px}.order-layout{grid-template-columns:minmax(0,1fr) 280px}.product-grid{grid-template-columns:repeat(auto-fill,minmax(115px,1fr))}.table .actions{flex-wrap:wrap}}
@media(max-width:850px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:sticky;top:0;z-index:9;padding:7px 10px;flex-direction:row;align-items:center;box-shadow:0 2px 6px #0001}.brand{min-height:0;max-width:53px}.brand img{height:45px}.nav{display:flex;margin:0;justify-content:space-around;flex:1;gap:2px}.nav-link{font-size:12px;padding:8px 4px;display:grid;gap:2px;text-align:center;justify-items:center}.nav-symbol{font-size:21px}.sidebar-foot{display:none}.topbar{padding:13px 18px}.topbar h1{font-size:23px}.topbar p{font-size:12px}.content{padding:14px}.order-layout{grid-template-columns:1fr}.sticky-summary{position:static}.form-grid{grid-template-columns:1fr 1fr}.form-grid .full-mobile{grid-column:1/-1}.kpis{grid-template-columns:1fr 1fr}.page-heading h2{font-size:22px}.page-card{padding:14px}}
@media(max-width:480px){.form-grid,.form-grid.two,.kpis{grid-template-columns:1fr}.brand{max-width:45px}.nav-link{font-size:11px}.nav-symbol{font-size:18px}.product-grid{grid-template-columns:repeat(2,1fr)}.filters .field{min-width:120px}.page-heading{flex-wrap:wrap}.table th,.table td{padding:10px}.content{padding:9px}}

/* V3: controles grandes y accesibles para gestión de pedidos */
.customer-pick{display:flex;gap:8px;align-items:stretch;min-width:0}
.customer-pick select{min-width:0;flex:1}
.customer-pick .btn{flex-shrink:0}
@media(max-width:640px){.customer-pick{flex-wrap:wrap}.customer-pick .btn{width:100%;justify-content:center}}

/* V4: estado de datos compartidos, accesibilidad y mejor lectura */
.notice{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.notice.cloud-ok{background:var(--soft);border-color:var(--border);color:var(--primary)}
/* El estado correcto se sincroniza silenciosamente; avisos y errores siguen visibles. */
.notice.cloud-idle{display:none}
.notice.cloud-err{background:var(--redbg);border-color:var(--red);color:var(--red)}
.notice-buttons{display:flex;gap:8px;flex-wrap:wrap}.notice-buttons .btn{font-size:12px;min-height:34px;padding:5px 10px}
.root-group{scroll-margin-top:75px}.qty-count:focus-visible,.tile-controls button:focus-visible{outline:3px solid #52a16b}
@media(max-width:680px){.notice{font-size:12px}.table .actions{flex-wrap:wrap}.product-img{width:65px;height:65px}.product-name{font-size:14px}.tile-controls button{min-height:40px}}

/* V5: impresión exclusivamente del pedido/sumatorio y tamaño grande accesible. */
.topbar-tools{display:flex;gap:8px;align-items:center}
.large-font .nav-link{font-size:19px}.large-font .table td{font-size:18px}.large-font .table td strong{font-size:20px}
.large-font .btn{font-size:17px;min-height:44px}.large-font .product-name{font-size:19px}.large-font input,.large-font select{font-size:19px}
#printSheet{display:none}
@media print{
 @page{size:A4;margin:14mm}
 body.printing{background:white!important;color:black!important;font:12pt Arial,sans-serif}
 body.printing .shell,body.printing #dialog,body.printing #toast,body.printing #restoreInput{display:none!important}
 body.printing #printSheet{display:block!important;margin:0;padding:0}
 #printSheet h1{font-size:19pt;margin:0 0 6px}#printSheet h2{font-size:15pt;margin:0 0 18px}
 #printSheet table{width:100%;border-collapse:collapse;margin-top:12px}
 #printSheet td,#printSheet th{font-size:11pt;padding:7px;border-bottom:1px solid #bbb;text-align:left}
 #printSheet tr{break-inside:avoid}
}
@media(max-width:850px){.large-font .nav-link{font-size:13px}.topbar-tools{gap:4px}.topbar-tools .theme-button{padding:7px}}


/* V44 · Diseño aprobado. No mostrar de nuevo el indicador correcto de D1. */
:root{--bg:#f5f8f4;--aside:#eff7ee;--primary:#24733c;--primarydark:#175b31;--soft:#e6f4e8;--border:#e1eae2;--shadow:0 8px 35px #1a3a2310;--radius:20px}
body.dark{--bg:#101b16;--aside:#16261c;--primary:#79d699;--primarydark:#4ca96d;--soft:#243f2e;--border:#34503c;--shadow:0 8px 35px #0004}
.shell{grid-template-columns:235px minmax(0,1fr)}
.sidebar{padding:15px 15px 26px;background:linear-gradient(145deg,var(--aside) 0%,color-mix(in srgb,var(--aside),var(--surface) 15%) 100%);border-color:var(--border)}
.brand{min-height:162px;margin-bottom:16px}
.brand img{height:142px;max-width:180px}
.nav{gap:7px;margin-top:0}
.nav-link{border-radius:17px;padding:8px 9px;gap:12px;font-size:16px;font-weight:650;min-height:60px;transition:background .15s ease,transform .15s ease}
.nav-link:hover{background:color-mix(in srgb,var(--soft),transparent 18%)}
.nav-link.selected{background:#dbefd9;color:#174b2d}
.dark .nav-link.selected{background:#305840;color:#f4fff7}
.nav-symbol{width:47px;height:47px;flex:0 0 47px;border-radius:14px;display:grid;place-items:center;background:#e3f1e3;color:#256d3d;font-weight:600}
.nav-symbol svg{width:25px;height:25px}
.nav-symbol--pedidos{background:linear-gradient(140deg,#247e46,#12572b);color:#fff;box-shadow:0 4px 10px #0f6b3229}
.nav-symbol--sumatorio{background:#dceeff;color:#145bac}
.nav-symbol--primera-hora{background:#fff0d4;color:#d77c08}
.nav-symbol--categorias{background:#ebe1ff;color:#6942bd}
.nav-symbol--productos{background:#d9f6df;color:#21854e}
.nav-symbol--clientes{background:#ffe2e6;color:#c83e56}
.nav-link.selected .nav-symbol--pedidos{color:white}
.topbar{min-height:130px;padding:25px 30px;background:
 radial-gradient(ellipse 270px 105px at 98% 10%,#a1cf7a63 1%,transparent 100%),
 radial-gradient(ellipse 210px 110px at 85% 15%,#91bd7f4d 0%,transparent 100%),
 linear-gradient(110deg,var(--surface),color-mix(in srgb,var(--surface),#d7efd8 40%));border-bottom:1px solid var(--border)}
.topbar h1{font-size:clamp(24px,2.6vw,34px);font-weight:850;letter-spacing:-.9px;color:var(--text)}
.topbar p{color:var(--primary);font-size:17px;font-weight:600}
.topbar-tools{position:relative;z-index:1}
.theme-button{display:flex;border-radius:999px;background:var(--surface);padding:5px;gap:2px;border:1px solid var(--border);box-shadow:0 3px 14px #143f2418}
.theme-choice{width:42px;height:36px;display:grid;place-items:center;border-radius:999px;color:var(--muted);transition:background .16s ease,color .16s ease}
.theme-choice svg{width:19px;height:19px}
body:not(.dark) .theme-sun,body.dark .theme-moon{background:var(--primary);color:white}
.content{padding:23px 24px 34px}
.page-card{padding:22px 23px;border-color:var(--border);box-shadow:var(--shadow)}
.page-heading{align-items:center;margin-bottom:22px}
.page-heading h2{font-size:clamp(22px,2.2vw,29px);font-weight:850}
.heading-icon{border-radius:16px;background:#e9f5e9;color:#22683c}
.dark .heading-icon{background:#25402e;color:#a8f2bb}
button.btn{border-radius:12px}
button.btn.primary{background:linear-gradient(125deg,#278349,#185f36);color:#fff}
button.btn.primary:hover{background:#185f36}
.filters{background:color-mix(in srgb,var(--soft) 30%,var(--surface));padding:15px;gap:11px;border:0;border-radius:15px}
.filters .field label{font-weight:720}
.filters .field input,.filters .field select{border:1px solid var(--border);border-radius:10px}
.table-wrap{border-radius:15px}
.orders-table{min-width:820px}
.orders-table th{font-size:11px;text-align:left;letter-spacing:.15px;background:#e9f3e9;text-transform:none;color:#234634}
.dark .orders-table th{background:#263d2c;color:#eff8ee}
.orders-table th:nth-child(n+6),.orders-table td:nth-child(n+6){text-align:center;width:53px;min-width:53px;padding:9px 4px}
.orders-table th,.orders-table td{padding:11px 12px}
.orders-table td{font-size:13px}
.orders-table td strong{font-size:14px}
.orders-table .order-products-count{text-align:center;font-size:16px;font-weight:800}
.orders-table .order-date{white-space:nowrap;font-size:13px;color:var(--muted)}
.orders-table td:nth-child(5){min-width:130px}
.chip.preparing{background:#e4f0ff;color:#2168c4}
.dark .chip.preparing{background:#243a59;color:#a4caff}
.chip.sent{background:#e5f5e8;color:#247b43}
.dark .chip.sent{background:#23503a;color:#a8e9b3}
.order-group-label td{padding:9px 14px!important;font-size:13px!important;font-weight:850;letter-spacing:.05px;border-bottom:1px solid var(--border)!important}
.order-group-label small{font-size:12px;font-weight:550;margin-left:9px;color:var(--muted)}
.order-group-preparing td{background:#eaf3fe!important;color:#2463a8}
.order-group-expedited td{background:#eaf5eb!important;color:#287443}
.dark .order-group-preparing td{background:#1e3550!important;color:#a7cfff}
.dark .order-group-expedited td{background:#274432!important;color:#b3ecc0}
.order-group-dot{display:inline-block;width:9px;height:9px;background:currentColor;border-radius:50%;margin-right:9px}
.order-icon-button{width:38px;height:38px;padding:0;display:inline-grid;place-items:center;vertical-align:middle;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);transition:transform .12s ease,background .12s ease;cursor:pointer}
.order-icon-button:hover{background:var(--soft);transform:translateY(-1px)}
.order-icon-button svg{width:21px;height:21px}
.order-icon-truck,.order-icon-resend{background:#ecf7ed;color:#237740;border-color:transparent}
.order-icon-trash{background:#fff0f1;color:#d04146;border-color:transparent}
.dark .order-icon-truck,.dark .order-icon-resend{background:#2a4833;color:#9be7b3}
.dark .order-icon-trash{background:#482a30;color:#ff9ca8}
.order-icon-eye:hover{color:var(--primary)}
.order-icon-button:focus-visible{outline:3px solid #76b991;outline-offset:2px}
.orders-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:17px 3px 3px;color:var(--muted);font-size:13px}
.orders-load-more{margin:0 auto!important;min-height:44px!important;padding:9px 20px!important}
.order-drawer-backdrop{position:fixed;inset:0;background:#10251a4d;z-index:55}
.order-drawer{position:fixed;right:12px;top:12px;bottom:12px;width:min(375px,calc(100vw - 24px));border-radius:20px;box-shadow:0 20px 70px #0004;background:var(--surface);border:1px solid var(--border);z-index:56;display:flex;flex-direction:column;overflow:hidden;animation:drawer-enter .2s ease-out}
@keyframes drawer-enter{from{transform:translateX(24px);opacity:.85}to{transform:translateX(0);opacity:1}}
.order-drawer-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:19px 20px;border-bottom:1px solid var(--border)}
.order-drawer-head h3{font-size:20px;margin:0}
.order-drawer-content{padding:18px 21px;overflow:auto;flex:1}
.drawer-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted)}
.drawer-meta strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.drawer-customer{font-size:20px;font-weight:800;margin:14px 0 19px}
.drawer-facts{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;padding:11px 0;border-bottom:1px solid var(--border);font-size:13px}
.drawer-facts span{color:var(--muted)}
.drawer-facts strong{font-weight:650;overflow-wrap:anywhere}
.order-drawer h4{font-size:15px;margin:23px 0 11px}
.order-drawer h4 span{color:var(--muted);font-weight:500}
.drawer-products{border:1px solid var(--border);border-radius:11px;overflow:hidden}
.drawer-product{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px;border-bottom:1px solid var(--border);font-size:13px}
.drawer-product:last-child{border-bottom:0}
.drawer-product>span{overflow-wrap:anywhere}
.drawer-product strong{display:flex;gap:4px;align-items:baseline;text-align:right;white-space:nowrap;font-size:14px}
.drawer-product small{color:var(--muted);font-size:11px}
.order-drawer-actions{padding:13px 15px;display:flex;flex-wrap:wrap;gap:7px;border-top:1px solid var(--border)}
.order-drawer-actions .btn{flex:1;font-size:12px!important;min-height:43px}
.order-drawer-actions .btn.primary{flex-basis:100%;order:2}
@media(max-width:1250px){.shell{grid-template-columns:205px minmax(0,1fr)}.nav-link{font-size:14px;padding:8px 5px}.nav-symbol{width:42px;height:42px;flex-basis:42px}}
@media(max-width:800px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:relative;padding:12px}.brand{min-height:70px;margin:0}.brand img{height:75px}.nav{display:flex;overflow:auto;gap:6px;margin-top:3px}.nav-link{min-width:max-content;min-height:48px;padding:6px 11px;font-size:13px}.nav-symbol{width:34px;height:34px;flex-basis:34px;border-radius:9px}.nav-symbol svg{width:19px;height:19px}.topbar{min-height:90px;padding:17px}.content{padding:14px}.page-card{padding:14px}.order-drawer{right:0;top:0;bottom:0;width:min(400px,100vw);border-radius:16px 0 0 16px}}
@media(prefers-reduced-motion:reduce){.order-drawer{animation:none}.nav-link,.order-icon-button,.theme-choice{transition:none}}

/* V47 — Imagen N.º 2: composición proporcional, contrastes y panel integrado */
:root{
 --bg:#f8faf7;--surface:#fff;--aside:#eef7ed;--text:#101d2b;
 --muted:#647695;--primary:#197339;--primarydark:#075c2a;--soft:#eaf5eb;
 --border:#e5ebe8;--shadow:0 12px 34px rgba(37,67,47,.06);--radius:21px
}
body.dark{--bg:#121d18;--surface:#1a2921;--aside:#182b20;--text:#ecf6ef;
 --muted:#b0c4bb;--primary:#80cf91;--primarydark:#318754;--soft:#263c2c;
 --border:#385142;--shadow:0 15px 38px #0005}
body{font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;line-height:1.38}
.shell{grid-template-columns:235px minmax(0,1fr)}
.sidebar{
 padding:16px 13px 24px;overflow:hidden;position:sticky;isolation:isolate;
 background:linear-gradient(145deg,#f4faf2 0%,#eef9ed 60%,#dcefd9 100%);
 border-right:1px solid #e6efe7
}
.sidebar::after{
 content:"";position:absolute;pointer-events:none;z-index:-1;
 left:-30px;bottom:-2px;width:240px;height:340px;
 background:url('/decor-leaves.svg') left bottom/contain no-repeat;opacity:.94
}
.dark .sidebar{background:linear-gradient(140deg,#203b2b,#1d3426)}
.dark .sidebar::after{opacity:.30}
.brand{height:166px;min-height:166px;margin:0 0 18px;align-items:flex-start;padding-top:0}
.brand img{height:163px;width:205px;max-width:100%;object-fit:contain}
.nav{margin-top:0;gap:8px}
.nav-link{
 font-size:18px;min-height:72px;padding:8px 13px;gap:15px;border-radius:17px;
 color:#10283d;font-weight:630;background:transparent;position:relative
}
.nav-link:hover{background:#e3f2e4}
.nav-link.selected{background:linear-gradient(112deg,#cce9d1,#def2dd);color:#13472c}
.nav-link .nav-symbol{width:55px;height:55px;flex:0 0 55px;border-radius:15px}
.nav-symbol svg{height:29px;width:29px;stroke-width:2.1}
.nav-symbol--pedidos{background:linear-gradient(135deg,#278349,#116336);color:#fff}
.nav-symbol--sumatorio{background:#d8ebff;color:#1554af}
.nav-symbol--primera-hora{background:#ffead0;color:#f28b00}
.nav-symbol--categorias{background:#edddff;color:#6539bd}
.nav-symbol--productos{background:#cdf6d6;color:#087e39}
.nav-symbol--clientes{background:#ffdde0;color:#d8233b}
.topbar{
 min-height:122px;height:122px;padding:18px 33px 16px;
 isolation:isolate;position:relative;overflow:hidden;
 background:linear-gradient(90deg,var(--surface),#f8fdf7 59%,#edf8ea);
 border-bottom:0
}
.topbar::after{
 content:"";position:absolute;z-index:-1;top:0;right:0;
 width:min(620px,65%);height:100%;pointer-events:none;
 background:url('/decor-header.svg') right center/cover no-repeat;
 mask-image:linear-gradient(to right,transparent 0%,#000 35%,#000 100%)
}
.topbar h1{font-size:38px;font-weight:850;letter-spacing:-1.25px;line-height:1.08;color:#08151c}
.topbar p{font-size:24px;font-weight:500;color:#126b36;margin-top:4px}
.dark .topbar h1{color:#f6fff9}
.dark .topbar::after{opacity:.4}
.topbar-tools{align-self:flex-start;padding-top:17px}
.theme-button{width:146px;height:52px;padding:5px;border-radius:28px;gap:1px;justify-content:space-between;background:#fff;box-shadow:0 4px 18px #17341a14}
.theme-choice{width:65px;height:42px;border-radius:24px;color:#2f4261}
.theme-choice svg{width:23px;height:23px}
body:not(.dark) .theme-sun{background:linear-gradient(130deg,#197b3c,#08552a);color:#ffd515}
body.dark .theme-moon{background:linear-gradient(130deg,#165f39,#0c4328);color:#f8fff8}
.content{padding:8px 16px 34px;max-width:none;overflow:visible}
.connection-bar{
 min-height:62px;margin-bottom:18px;border-radius:16px;padding:8px 12px 8px 22px;
 border:1px solid #e4efeb;background:linear-gradient(110deg,#f7fdf8,#f5fcf4);
 display:flex;align-items:center;gap:24px;color:#164f31;box-shadow:0 3px 12px #24592f0b
}
.dark .connection-bar{background:#233a2a;color:#c0f5ca;border-color:var(--border)}
.connection-cloud{width:46px;height:43px;flex:0 0 46px;display:grid;place-items:center;color:#146a35}
.connection-cloud svg{width:41px;height:41px;stroke-width:2.2}
.connection-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.connection-copy strong{font-size:14px;font-weight:760;color:#164a2a}
.connection-copy small{font-size:13px;color:#637392}
.dark .connection-copy strong,.dark .connection-copy small{color:var(--text)}
.connection-tools{display:flex;align-items:center;gap:clamp(14px,5vw,75px);margin-left:auto}
.connection-live{display:inline-flex;align-items:center;gap:9px;font-size:13px;color:#175b35;white-space:nowrap}
.connection-live i{height:14px;width:14px;border-radius:50%;background:#0cb763}
.connection-working .connection-live i{background:#df9a36}
.connection-error .connection-live i{background:#d84c4c}
.connection-error .connection-live{color:#bc403b}
.connection-refresh{
 height:43px;min-width:163px;padding:7px 14px;display:inline-flex;align-items:center;justify-content:center;
 gap:10px;color:#142e3a;border:1px solid #e0e8e7;background:#fff;border-radius:12px;
 font-size:13px;font-weight:700;box-shadow:0 3px 11px #304b3210
}
.connection-refresh:hover{background:#f4f9f4}
.orders-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:stretch}
.orders-workspace.with-details{grid-template-columns:minmax(0,1fr) minmax(298px,314px)}
.orders-page{padding:19px 17px 20px;background:var(--surface);box-shadow:0 9px 32px #23462d0c}
.page-heading{align-items:center;min-height:73px;margin-bottom:19px}
.page-heading .titleblock{gap:15px}
.heading-icon{width:72px;height:70px;border-radius:20px;color:#0e6b34;background:#eaf6eb}
.heading-icon svg{width:38px;height:38px}
.page-heading h2{font-size:29px;letter-spacing:-.75px;font-weight:830;line-height:1.12;color:var(--text)}
.page-heading p{font-size:15px;margin-top:5px;color:var(--muted)}
button.btn.primary{background:linear-gradient(120deg,#278449,#09652e);box-shadow:0 5px 15px #26603a17}
button.btn.large{min-height:58px;font-size:18px;padding:12px 23px;border-radius:12px}
.orders-page .filters{
 min-height:94px;display:grid;grid-template-columns:1fr 1fr 1.25fr .9fr auto;
 align-items:end;column-gap:12px;row-gap:8px;margin-bottom:14px;padding:13px 14px;
 border-radius:15px;background:linear-gradient(120deg,#f4f8f6,#f6faf8)
}
.orders-page .filters .field{width:100%;min-width:0;flex:none}
.orders-page .filters .field label{font-size:13px;font-weight:760;color:#25364e}
.orders-page .filters .field input,.orders-page .filters .field select{
 height:43px;min-height:43px;padding:9px 10px;font-size:13px;border-radius:10px;color:#1d3050
}
.orders-page .filters .btn{height:43px;min-height:43px;padding:7px 11px;background:#fff;color:#104d29;font-size:13px}
.orders-page .searchfield{position:relative}
.orders-page .searchfield input{padding-left:33px}
.orders-page .searchfield::after{
 content:"";position:absolute;left:11px;bottom:15px;width:12px;height:12px;border:2px solid #697f9d;
 border-radius:50%;pointer-events:none;transform:scale(.7)
}
.orders-page .searchfield::before{
 content:"";position:absolute;left:25px;bottom:12px;height:7px;width:2px;background:#697f9d;
 transform:rotate(-45deg);pointer-events:none
}
.orders-page .table-wrap{border-radius:14px;overflow-x:auto;border-color:#e6ece9}
.orders-table{table-layout:fixed;min-width:800px;border-collapse:separate;border-spacing:0}
.orders-table th,.orders-table td{border-bottom:1px solid #e8edf1}
.orders-table th{
 height:40px;background:#e7f3e8;font-size:12px;font-weight:750;text-transform:none;
 color:#18362c;letter-spacing:0;white-space:nowrap;text-align:left
}
.orders-table td{font-size:13px;height:43px;padding:7px 9px;color:#526686}
.orders-table td strong{font-size:13px;font-weight:720;color:#122a42}
.orders-table .order-date{font-size:12.5px;white-space:nowrap;color:#536a8a}
.orders-table .order-products-count{text-align:center;font-size:14px;font-weight:650}
.orders-table th:nth-child(1){width:12%}
.orders-table th:nth-child(2){width:19%}
.orders-table th:nth-child(3){width:10%}
.orders-table th:nth-child(4){width:18%}
.orders-table th:nth-child(5){width:17%}
.orders-table th:nth-child(n+6){width:6%}
.orders-table td:nth-child(n+6),.orders-table th:nth-child(n+6){
 text-align:center;padding:4px 2px;min-width:0
}
.orders-table th:nth-child(3){text-align:center}
.orders-table td:nth-child(5){min-width:0}
.orders-table .table-break{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-group-label td{height:40px;font-size:13px!important;padding:9px 12px!important}
.order-group-preparing td{background:#e8f3ff!important;color:#086ccf}
.order-group-expedited td{background:#eaf7ec!important;color:#077435}
.order-group-dot{width:12px;height:12px}
.chip{font-size:12px;font-weight:650;padding:6px 9px}
.chip.preparing{color:#087ae7;background:#e6f2ff}
.chip.sent{color:#097a34;background:#e4f5e8}
.chip.preparing::before,.chip.sent::before{content:"";width:10px;height:10px;background:currentColor;border-radius:50%;flex:0 0 10px}
.order-icon-button{
 width:37px;height:36px;border-radius:10px;padding:0;display:inline-grid;place-items:center;
 border:1px solid #e4e8ee;background:#fff;color:#142644;box-shadow:0 1px 5px #1e3e2208
}
.order-icon-button svg{width:20px;height:20px}
.order-icon-truck,.order-icon-resend{background:#e8f8ea;color:#086d2e;border-color:transparent}
.order-icon-trash{background:#fff0f2;color:#f02c3a;border-color:transparent}
.orders-footer{min-height:50px;padding-top:14px;align-items:center}
.orders-load-more{margin:0 8px!important}
.orders-pager{display:flex;align-items:center;gap:5px;margin-left:auto}
.orders-pager button{min-width:35px;height:35px;border:1px solid #e5ece7;background:#fff;border-radius:10px;color:#627790}
.orders-pager button:disabled{opacity:.35}
.orders-pager .orders-pager-current{background:#126d33;color:#fff;font-weight:800;box-shadow:0 2px 7px #0a632a29}
.order-drawer-backdrop{display:none}
.order-drawer{
 position:relative;top:auto;right:auto;bottom:auto;z-index:1;
 width:100%;height:auto;max-height:none;min-height:820px;
 background:var(--surface);box-shadow:0 9px 32px #23462d0b;border-radius:21px;border:1px solid var(--border);
 animation:none
}
.order-drawer-head{height:61px;padding:13px 17px;justify-content:flex-start;gap:12px}
.order-drawer-head h3{font-size:19px;font-weight:830;color:var(--text)}
.drawer-close{width:25px;height:30px;background:transparent;border:0;display:grid;place-items:center;color:#173450}
.drawer-close svg{width:21px;height:21px}
.order-drawer-content{padding:12px 18px;overflow:visible}
.drawer-meta{font-size:12px;gap:8px;color:#213452;align-items:center;margin:1px 0 11px}
.drawer-meta strong{font-size:12px;max-width:56%;font-weight:730}
.drawer-meta .chip{font-size:11px;padding:6px 8px}
.drawer-info{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--border);font-size:13px}
.drawer-info-icon{width:35px;height:35px;flex:0 0 35px;background:#e8f5e8;color:#05702e;border-radius:10px;display:grid;place-items:center}
.drawer-info-icon svg{width:22px;height:22px}
.drawer-customer-info .drawer-info-icon{background:transparent}
.drawer-info>div{min-width:0;display:grid;gap:1px;overflow-wrap:anywhere}
.drawer-info small{color:#657b97;font-size:12px}
.drawer-info strong{color:#152e48;font-size:13px}
.order-drawer h4{margin:15px 0 11px;font-size:15px;color:#10243a}
.drawer-products{border-radius:12px;overflow:hidden;border:1px solid #e7eeeb}
.drawer-products-head{display:flex;justify-content:space-between;padding:11px 13px;background:#f2f7f4;color:#1b3650;font-size:12px}
.drawer-product{padding:8px 10px;min-height:39px;gap:8px;font-size:12px;color:#22364d}
.drawer-product span{flex:1}
.drawer-product-image{width:30px;height:30px;flex:0 0 30px;object-fit:cover;border-radius:7px}
.drawer-product strong{font-size:12px;color:#325276}
.drawer-product small{font-size:11px}
.drawer-optional-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:15px}
.drawer-optional-actions .btn{padding:5px 9px;font-size:12px}
.order-drawer-actions{padding:15px 17px;margin-top:auto}
.order-drawer-actions .btn.primary{order:unset;flex:1;min-height:54px;font-size:17px}
dialog{border-radius:17px!important;padding:0!important;border:1px solid #e8eeeb!important;box-shadow:0 17px 55px #213a2633!important;max-width:min(390px,92vw)}
dialog .dialog-head{padding:17px 20px 7px;gap:12px}
dialog .dialog-head h3{font-size:18px;color:var(--text)}
dialog .dialog-body{padding:5px 20px;font-size:13px;color:var(--muted)}
dialog .dialog-actions{padding:11px 20px 17px;gap:9px}
dialog .dialog-actions .btn{min-height:40px}
dialog::backdrop{background:#0e271a4d}
@media(max-width:1350px){
 .orders-workspace.with-details{grid-template-columns:minmax(0,1fr) minmax(280px,305px)}
 .orders-table{min-width:740px}
 .orders-page .filters{grid-template-columns:repeat(4,minmax(0,1fr))}
 .orders-page .filters .searchfield{grid-column:span 2}
}
@media(max-width:1110px){
 .orders-workspace.with-details{grid-template-columns:minmax(0,1fr)}
 .order-drawer{position:fixed;top:0;right:0;bottom:0;width:min(390px,95vw);z-index:56;
   border-radius:18px 0 0 18px;box-shadow:0 22px 70px #0005;max-height:100vh;min-height:0}
 .order-drawer-content{overflow-y:auto}
 .orders-page .table-wrap{overflow-x:auto}
}
@media(max-width:800px){
 .sidebar{position:relative;height:auto;padding:8px;overflow:hidden}
 .sidebar::after{display:none}
 .brand{height:74px;min-height:74px;margin:0}
 .brand img{width:110px;height:70px}
 .nav{display:flex;gap:5px}
 .nav-link{min-height:52px;font-size:13px;padding:5px 9px}
 .nav-link .nav-symbol{width:36px;height:36px;flex-basis:36px;border-radius:9px}
 .nav-symbol svg{width:22px;height:22px}
 .topbar{height:95px;min-height:95px;padding:12px 16px}
 .topbar h1{font-size:26px}
 .topbar p{font-size:17px}
 .topbar-tools{padding-top:7px}
 .theme-button{width:108px;height:45px}
 .theme-choice{width:46px;height:35px}
 .content{padding:10px}
 .connection-bar{padding:10px;gap:10px;flex-wrap:wrap}
 .connection-cloud{width:34px;height:34px;flex-basis:34px}
 .connection-cloud svg{width:33px;height:33px}
 .connection-tools{flex:1;justify-content:space-between}
 .connection-refresh{min-width:145px}
 .orders-page{padding:13px}
 .page-heading{gap:8px}
 .heading-icon{width:50px;height:50px;border-radius:12px}
 .page-heading h2{font-size:23px}
 button.btn.large{min-height:47px;font-size:14px;padding:8px 12px}
 .orders-page .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .orders-page .filters .searchfield{grid-column:span 2}
 .orders-page .filters>.btn{grid-column:span 2}
 .orders-table{min-width:760px}
 .orders-footer{gap:8px}
}
@media(max-width:420px){
 .topbar h1{font-size:21px}
 .topbar p{font-size:15px}
 .theme-button{width:90px}
 .theme-choice{width:38px}
 .page-heading{align-items:flex-start;flex-wrap:wrap}
 .orders-page .filters{padding:10px;gap:9px}
 .connection-tools{margin-left:0}
}

/* V47b — refinamiento tras comparación píxel y pruebas de Chrome. */
@media(min-width:1111px){
 .content{padding-right:46px}
 .orders-workspace{align-items:start}
 .order-drawer{height:min(850px,calc(100vh - 255px));min-height:0;max-height:min(850px,calc(100vh - 255px));position:sticky;top:14px}
 .order-drawer-content{overflow-y:auto}
}
.nav-link{font-size:16px;font-weight:660;gap:13px}
.orders-table th:nth-child(1){width:11%}
.orders-table th:nth-child(2){width:20%}
.orders-table th:nth-child(3){width:10%}
.orders-table th:nth-child(4){width:16%}
.orders-table th:nth-child(5){width:16%}
.orders-table th:nth-child(n+6){width:6.75%;font-size:10.5px;letter-spacing:-.2px}
.orders-table th:nth-child(n+6),.orders-table td:nth-child(n+6){padding-inline:2px}
.orders-table td{font-weight:430}
.orders-table td strong{font-weight:690}
.orders-date-field .date-control{
 height:43px;min-height:43px;border:1px solid var(--border);border-radius:10px;
 background:#fff;display:flex;align-items:center;position:relative
}
.orders-date-field .date-visual{
 position:absolute;top:50%;left:12px;transform:translateY(-50%);
 font-size:13px;color:#213b60;pointer-events:none
}
.orders-page .orders-date-field input[type="date"]{
 position:relative;z-index:1;border:none;box-shadow:none;width:100%;
 background:transparent;color:transparent;min-height:42px;height:42px;
}
.orders-date-field input[type="date"]::-webkit-datetime-edit{color:transparent}
.orders-date-field .date-control:focus-within .date-visual{display:none}
.orders-page .orders-date-field .date-control:focus-within input[type="date"]{
 background:#fff;color:#20344d
}
.orders-date-field .date-control:focus-within input[type="date"]::-webkit-datetime-edit{color:#20344d}
@media(max-width:800px){
 .workspace,.content,.orders-workspace,.orders-page{min-width:0;max-width:100%}
 .topbar{gap:5px}
 .topbar>div:first-child{flex:1;min-width:0}
 .topbar h1{line-height:1.1}
 .topbar-tools{flex:0 0 auto}
 .orders-page .filters{min-width:0}
 .orders-page .table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto}
 .order-drawer{position:fixed;top:0;right:0;bottom:0;width:min(390px,100vw);max-width:100vw;height:100vh;max-height:100vh;min-height:0}
 .order-drawer-content{overflow-y:auto}
}

/* V47c — detalles de la imagen n.º 2 y acciones conservadas */
@media(min-width:801px){
 .brand img{transform:scale(1.12) translateY(-2px)}
 .brand{margin-bottom:25px}
 .topbar{padding-left:33px;padding-top:23px}
 .connection-bar{margin-left:6px;margin-right:8px;margin-bottom:20px}
 .orders-page{padding-top:21px}
}
.orders-table th:nth-child(n+6){white-space:nowrap}
.orders-table td:nth-child(n+6) button{margin:0 auto}
.order-drawer .drawer-extras{margin-top:14px;border:0}
.drawer-extras summary{cursor:pointer;list-style:none;font-size:12px;color:var(--muted);padding:6px 0}
.drawer-extras summary::after{content:"⌄";margin-left:7px}
.drawer-extras[open] summary::after{content:"⌃"}
.drawer-extras summary::-webkit-details-marker{display:none}
.drawer-extras .drawer-optional-actions{padding:8px 0}
.dialog-confirm .dialog-head{display:flex;justify-content:flex-start;align-items:center;gap:11px}
.dialog-action-icon{width:43px;height:43px;flex:0 0 43px;border-radius:13px;background:#e4f5e6;color:#147939;display:grid;place-items:center}
.dialog-action-icon svg{width:25px;height:25px}
.dialog-danger .dialog-action-icon{background:#ffe8ea;color:#dc1934}
.dialog-confirm .dialog-head h3{flex:1;font-size:17px}
.dialog-confirm #dlgClose{min-height:30px;height:30px;padding:0 8px}
.dialog-confirm .dialog-body p{font-size:13px;margin:0}
dialog.dialog-confirm[open]{position:fixed;inset:unset;bottom:36px;left:50%;transform:translateX(-50%);margin:0;width:min(400px,95vw);max-height:calc(100vh - 35px);overflow:auto}
@media(max-width:800px){
 .dialog-confirm[open]{bottom:15px}
 .orders-pager{margin:0}
 .orders-footer>span{flex:1 1 100%}
}

/* V47d — limitar el carrusel del menú en móvil al propio lateral. */
@media(max-width:800px){
 html,body{width:100%;max-width:100%;overflow-x:clip}
 .shell{width:100%;max-width:100%;min-width:0;grid-template-columns:minmax(0,1fr)}
 .sidebar,.workspace,.content,.topbar{width:100%;max-width:100%;min-width:0}
 .nav{width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
 .nav .nav-link{flex:0 0 auto}
}

/* V47e — correspondencia final de bloques y lectura sin solapamientos. */
@media(min-width:801px){
 .nav-link{font-size:16px;font-weight:620;gap:9px;padding-right:2px;white-space:nowrap}
 .orders-page{padding-top:26px}
}
@media(min-width:1111px){
 .order-drawer{margin-top:-22px;height:min(853px,calc(100vh - 233px));
   max-height:min(853px,calc(100vh - 233px));min-height:0}
}
.orders-table th:nth-child(1){width:11%}
.orders-table th:nth-child(2){width:19%}
.orders-table th:nth-child(3){width:10%}
.orders-table th:nth-child(4){width:16%}
.orders-table th:nth-child(5){width:16%}
.orders-table th:nth-child(n+6){width:7%;font-size:10px;letter-spacing:-.3px}
.orders-table .chip{font-size:10.7px;padding:6px 7px;gap:5px}
.orders-table .chip::before{width:8px;height:8px;flex-basis:8px}
@media(max-width:800px){
 .orders-page{padding-top:14px}
 .nav-link{font-weight:650;white-space:nowrap}
}

/* V47f — última comparación: buscador, menú móvil e identidad del prototipo. */
.orders-page .filters .field.searchfield input{padding-left:36px}
.orders-page .filters .field.searchfield::after{left:11px;bottom:15px}
.orders-page .filters .field.searchfield::before{left:22px;bottom:12px}
.workspace:has(.orders-workspace)>.app-footer{display:none}
@media(min-width:1111px){
 .orders-page{min-height:min(826px,calc(100vh - 250px))}
}
@media(max-width:800px){
 .sidebar{display:flex!important;flex-direction:column!important;align-items:stretch;gap:0}
 .sidebar .brand{width:100%;max-width:none;height:81px;min-height:81px;align-items:center;justify-content:center;padding:0}
 .sidebar .brand img{width:170px;max-width:none;height:80px;transform:none}
 .sidebar .nav{display:flex;flex:0 0 auto;width:100%;max-width:100%;gap:7px;overflow-x:auto;justify-content:flex-start}
 .sidebar .nav-link{
   display:flex!important;flex-direction:row!important;flex:0 0 auto;width:auto;min-width:max-content;
   text-align:left;justify-content:center;align-items:center;gap:7px;padding:6px 10px;font-size:13px;font-weight:630;min-height:48px
 }
 .sidebar .nav-symbol{width:34px;height:34px;flex:0 0 34px}
 .sidebar .nav-symbol svg{width:19px;height:19px}
 .nav::-webkit-scrollbar{display:none}
}

/* V47g — garantizar que «Eliminar» quede completo y centrado. */
.orders-table th:nth-child(4){width:15%}
.orders-table th:nth-child(9){width:8%;font-size:10px;letter-spacing:-.2px}

/* Correspondencia visual con la captura de referencia (1448 × 1086).
   Cambios exclusivamente de presentación: sin afectar pedidos ni API D1. */
@media (min-width:801px) {
  /* Menú del prototipo: 235 px, entradas amplias y tipografía de 18 px. */
  .shell {grid-template-columns:235px minmax(0,1fr)}
  .sidebar {
    background:linear-gradient(145deg,#f4faf2 0%,#eff8ee 60%,#e1f2de 100%);
  }
  .sidebar .nav {gap:8px}
  .sidebar .nav-link {
    min-height:72px;
    gap:13px;
    padding:8px 13px;
    font-size:18px;
    font-weight:630;
  }
  .sidebar .nav-link .nav-symbol {
    width:55px;height:55px;flex-basis:55px;
  }
  /* La ilustración comienza DEBAJO de las seis opciones, nunca detrás de ellas. */
  .sidebar::after {
    top:720px;bottom:auto;left:-20px;
    width:240px;height:370px;
    background:url('/decor-leaves.svg') left top/240px 370px no-repeat;
    opacity:.94;
  }
  /* Tamaños de letra originales de la tabla del diseño de referencia. */
  .orders-table th {font-size:12px;letter-spacing:0}
  .orders-table td {font-size:13px}
}
/* Verde pálido alrededor de los paneles blancos, como en el prototipo. */
.workspace {background:linear-gradient(180deg,#f5faf6 0,#f8faf7 230px,#f8faf7 100%)}

/* Diseño final aprobado — VLM Consumo · monitor de referencia 1672 × 941.
   Solo presentación. No modifica D1, pedidos, formularios, filtros ni lógica.
   Una tabla continua, tipografía legible, seis accesos laterales y furgoneta reconocible. */
:root {
  --vlm-ref-ink:#0b173d;
  --vlm-ref-muted:#556c9a;
  --vlm-ref-mint:#eaf8ec;
}
html,body {background:#f5faf6}
body {font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif;color:var(--vlm-ref-ink)}
.shell {grid-template-columns:clamp(235px,16.55vw,278px) minmax(0,1fr)}
.sidebar {
  padding:16px 23px 24px;
  background:linear-gradient(146deg,#f5fcf5 0%,#eaf8eb 58%,#def3df 100%);
  border-right:1px solid #e7f0e7;
  isolation:isolate;
  overflow:hidden;
}
.sidebar::after {
  top:max(665px,calc(100vh - 270px));bottom:auto;left:-10px;
  width:260px;height:390px;opacity:1;
  background:url('/decor-leaves.svg') left top/260px 390px no-repeat;
  pointer-events:none;
}
.sidebar .brand {
  height:174px;min-height:174px;margin:0;
  padding:0;display:flex;justify-content:center;align-items:center;
}
.sidebar .brand img {
  width:209px;max-width:100%;height:170px;
  object-fit:contain;transform:none;
}
.sidebar .nav {margin-top:18px;gap:10px;position:relative;z-index:1}
.sidebar .nav .nav-link {
  height:66px;min-height:66px;padding:5px 8px;
  border-radius:17px;gap:17px;white-space:nowrap;
  font-size:20px;font-weight:640;color:#0c1b43;
}
.sidebar .nav .nav-link .nav-symbol {
  flex:0 0 60px;width:60px;height:60px;
  border-radius:15px;display:grid;place-items:center;
}
.sidebar .nav .nav-symbol svg {width:29px;height:29px;stroke-width:2.1}
.sidebar .nav .nav-link.selected {
  background:linear-gradient(115deg,#d3eed8,#def5df);
  color:#123e2b;
}
.workspace {min-width:0;background:linear-gradient(180deg,#f5faf6,#f8fbf8 230px,#f8fbf8)}
.topbar {height:123px;min-height:123px;padding:18px 32px 12px}
.topbar h1 {font-size:42px;font-weight:850;line-height:1.08;letter-spacing:-1.5px;color:#090d14}
.topbar p {font-size:25px;line-height:1.2;font-weight:500;color:#087d36;margin:4px 0 0}
.topbar::after {
  width:min(790px,69%);height:123px;
  background-position:right top;background-size:cover;
}
.content {padding:0 17px 28px 17px;max-width:none;margin:0;overflow:visible}
.orders-workspace {gap:12px;align-items:stretch}
.orders-page {
  min-height:max(680px,calc(100vh - 153px));
  padding:18px 19px 24px;border-radius:22px;
  background:#fff;
  box-shadow:0 6px 30px rgba(31,68,39,.045);
  display:flex;flex-direction:column;
}
 .orders-page .page-heading {
  min-height:82px;margin-bottom:12px;
  display:flex;align-items:center;gap:20px;
}
.orders-page .page-heading .titleblock {gap:33px;align-items:center}
.orders-page .heading-icon {
  width:80px;height:76px;flex:0 0 80px;
  border-radius:20px;background:#e9f8ed;color:#027731;
}
.orders-page .heading-icon svg {width:38px;height:38px}
.orders-page .page-heading h2 {
  font-size:35px;line-height:1.1;letter-spacing:-1px;
  font-weight:820;color:#0b143b;
}
.orders-page .page-heading p {font-size:20px;margin-top:4px;color:#6277a4}
.orders-page button.btn.primary.large {
  min-height:65px;padding:12px 27px;
  font-size:20px;font-weight:700;
  border-radius:13px;color:#fff;
  background:linear-gradient(130deg,#149a4a,#027538);
}
.orders-page .filters {
  min-height:90px;margin-bottom:12px;padding:9px 11px 11px;
  grid-template-columns:.95fr .95fr 1.15fr 1.23fr auto;
  column-gap:16px;row-gap:10px;align-items:end;
  background:linear-gradient(120deg,#fafcfa,#f9fcfa);
  border-radius:15px;
}
.orders-page .filters .field label {
  font-size:16px;line-height:1.1;font-weight:760;
  color:#0e1e49;margin-bottom:7px;
}
.orders-page .filters .field input,
.orders-page .filters .field select,
.orders-page .orders-date-field .date-control {
  height:49px;min-height:49px;
  border-radius:10px;font-size:17px;font-weight:530;color:#112655;
  background:#fff;border:1px solid #e2e9ef;
}
.orders-page .orders-date-field .date-visual {
  font-size:17px;color:#142551;font-weight:530;
}
.orders-page .filters .searchfield input {padding-left:38px}
.orders-page .filters .searchfield::after {bottom:19px;left:14px;transform:scale(.8)}
.orders-page .filters .searchfield::before {bottom:15px;left:28px}
.orders-page .filters .btn.orders-export-btn {
  height:49px;min-height:49px;
  padding:9px 15px;display:flex;align-items:center;justify-content:center;
  gap:10px;color:#10214a;
  font-size:17px;font-weight:680;
  border:1px solid #e2e9ef;border-radius:10px;
  box-shadow:0 2px 10px #17351a0a;white-space:nowrap;
}
.orders-page .filters .orders-export-btn svg {color:#07833a;flex:0 0 21px}
.orders-page .table-wrap {
  width:100%;min-width:0;border-radius:13px;
  border:1px solid #e6edf0;overflow-x:auto;
}
.orders-page .orders-table {
  width:100%;min-width:1080px;table-layout:fixed;
  border-collapse:separate;border-spacing:0;
}
.orders-page .orders-table th {
  height:40px;padding:7px 11px;
  font-size:16px;line-height:1.18;font-weight:760;
  text-align:left;letter-spacing:0;white-space:nowrap;
  color:#101e47;background:#e8f8ed;border-bottom:0;
}
.orders-page .orders-table td {
  height:49px;padding:7px 11px;
  font-size:16px;line-height:1.25;
  color:#23375f;border-bottom:1px solid #e8edf2;
}
.orders-page .orders-table tr:last-child td {border-bottom:0}
.orders-page .orders-table td strong {font-size:16px;font-weight:560;color:#0e1c43}
.orders-page .orders-table .order-date {font-size:16px;color:#445a93}
.orders-page .orders-table .order-products-count {font-size:17px;font-weight:550;text-align:center}
.orders-page .orders-table th:nth-child(1) {width:10%}
.orders-page .orders-table th:nth-child(2) {width:19%}
.orders-page .orders-table th:nth-child(3) {width:9%;text-align:center}
.orders-page .orders-table th:nth-child(4) {width:18%}
.orders-page .orders-table th:nth-child(5) {width:16%}
.orders-page .orders-table th:nth-child(6) {width:7%;text-align:center}
.orders-page .orders-table th:nth-child(7) {width:7%;text-align:center}
.orders-page .orders-table th:nth-child(8) {width:7%;text-align:center}
.orders-page .orders-table th:nth-child(9) {width:7%;text-align:center}
.orders-page .orders-table th:nth-child(n+6),.orders-page .orders-table td:nth-child(n+6) {padding-left:4px;padding-right:4px}
.orders-page .orders-table td:nth-child(5) {padding-left:3px;padding-right:3px}
.orders-page .orders-table .chip {
  min-height:35px;padding:7px 11px;gap:7px;
  border-radius:999px;font-size:15px;font-weight:660;
  white-space:nowrap;justify-content:center;
}
.orders-page .orders-table .chip.preparing {background:#e5f3ff;color:#0583ef}
.orders-page .orders-table .chip.sent {background:#e5f8eb;color:#05843a}
/* Único cambio: fondo de las filas de pedidos ya expedidos (PC, tablet y móvil). */
@media screen {
  .orders-page .orders-table tbody tr.is-expedited,
  .orders-page .orders-table tbody tr.is-expedited > td {background-color:#E5F8EB}
}
/* Únicamente PC/tablet: línea entre el último pedido en preparación y el primer expedido. */
@media screen {
  html:not(.vlm-phone) .orders-page .orders-table tbody tr.is-preparing + tr.is-expedited > td {
    box-shadow: inset 0 3px 0 #0F4601;
  }
}
.orders-page .orders-table .chip::before {width:11px;height:11px;flex:0 0 11px}
.orders-page .order-icon-button {
  width:45px;height:38px;
  border-radius:10px;background:#fff;
  border:1px solid #e6ebf2;
}
.orders-page .order-icon-button svg {height:22px;width:22px}
.orders-page .order-icon-truck {
  background:#e7f9ec;color:#078a37;border-color:transparent;
}
.orders-page .order-icon-truck svg {width:26px;height:26px;stroke-width:2}
.orders-page .order-icon-trash {background:#fff1f2;color:#ec1432;border-color:transparent}
.orders-page .orders-footer {
  margin-top:auto;min-height:62px;padding:25px 0 0;
  display:flex;justify-content:flex-end;align-items:center;
}
.orders-page .orders-load-more {
  margin:0!important;min-height:44px;padding:10px 22px;
  font-size:16px;font-weight:700;color:#096f39;
}
.orders-page .orders-pager {display:none!important}
@media (max-width:1600px) and (min-width:801px) {
 .sidebar {padding-left:13px;padding-right:12px}
 .sidebar .nav .nav-link {font-size:17px;gap:13px;padding:5px 9px}
 .sidebar .nav .nav-link .nav-symbol {width:54px;height:54px;flex-basis:54px}
}
@media (max-width:1350px) and (min-width:801px) {
 .sidebar {padding-left:12px;padding-right:12px}
 .sidebar .nav .nav-link {font-size:16px;gap:12px;padding:5px 9px}
 .sidebar .nav .nav-link .nav-symbol {width:53px;height:53px;flex-basis:53px}
 .orders-page .page-heading h2 {font-size:31px}
 .orders-page .page-heading p {font-size:16px}
 .orders-page .page-heading .titleblock {gap:18px}
 .orders-page .filters {grid-template-columns:repeat(4,minmax(0,1fr))}
 .orders-page .filters .orders-export-btn {grid-column:4}
 .orders-page .filters .field label {font-size:14px}
 .orders-page .filters .field input,.orders-page .filters .field select {font-size:15px}
}
@media(max-width:800px) {
 .shell {grid-template-columns:minmax(0,1fr)}
 .sidebar {height:auto;min-height:0;padding:8px;overflow:hidden}
 .sidebar::after {display:none}
 .sidebar .brand {height:82px;min-height:82px}
 .sidebar .brand img {width:165px;height:80px}
 .sidebar .nav {display:flex;gap:7px;margin-top:3px;overflow-x:auto}
 .sidebar .nav .nav-link {width:auto;min-width:max-content;height:48px;min-height:48px;font-size:13px;gap:8px;padding:5px 9px}
 .sidebar .nav .nav-link .nav-symbol {width:34px;height:34px;flex:0 0 34px;border-radius:9px}
 .sidebar .nav .nav-symbol svg {width:20px;height:20px}
 .topbar {height:95px;min-height:95px;padding:15px 16px}
 .topbar h1 {font-size:26px}
 .topbar p {font-size:16px}
 .topbar::after {height:95px;width:55%;opacity:.5}
 .content {padding:10px}
 .orders-page {min-height:calc(100vh - 225px);padding:14px;border-radius:17px}
 .orders-page .page-heading {min-height:0;flex-wrap:wrap;gap:14px}
 .orders-page .page-heading .titleblock {gap:12px}
 .orders-page .heading-icon {width:54px;height:54px;flex:0 0 54px;border-radius:13px}
 .orders-page .heading-icon svg {width:28px;height:28px}
 .orders-page .page-heading h2 {font-size:24px}
 .orders-page .page-heading p {font-size:14px}
 .orders-page button.btn.primary.large {min-height:48px;font-size:16px;padding:9px 18px}
 .orders-page .filters {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:9px}
 .orders-page .filters .field label {font-size:14px}
 .orders-page .filters .field input,.orders-page .filters .field select,.orders-page .orders-date-field .date-control {height:44px;min-height:44px;font-size:15px}
 .orders-page .orders-date-field .date-visual {font-size:15px}
 .orders-page .filters .searchfield {grid-column:span 2}
 .orders-page .filters .orders-export-btn {grid-column:span 2;font-size:15px;min-height:44px;height:44px}
 .orders-page .orders-table {min-width:1050px}
 .orders-page .orders-table th,.orders-page .orders-table td {font-size:15px}
 .orders-page .orders-table .order-date,.orders-page .orders-table td strong {font-size:15px}
 .orders-page .orders-table .chip {font-size:13px}
 .orders-page .orders-footer {min-height:55px}
}


/* Responsive VLM v2 — misma tabla de nueve columnas en ordenador y iPad.
   La referencia de escritorio se conserva a resolución grande, sin tarjetas.
   Solo cambia el tamaño y la posición del menú según el espacio disponible. */
html,body {max-width:100%}
.shell,.sidebar,.workspace,.content,.orders-workspace,.orders-page {min-width:0}
.orders-page .table-wrap {width:100%;max-width:100%;min-width:0}

/* Escritorios pequeños, portátiles e iPad: LAS NUEVE COLUMNAS siguen
   siendo una única tabla real, sin scroll horizontal ni tarjetas. */
@media (min-width:741px) and (max-width:1499px) {
  .orders-page .table-wrap {overflow-x:visible;overflow-y:visible}
  .orders-page .orders-table {
    display:table;table-layout:fixed;
    width:100%;max-width:100%;min-width:0!important;
    border-collapse:separate;border-spacing:0;
  }
  .orders-page .orders-table thead {display:table-header-group}
  .orders-page .orders-table tbody {display:table-row-group}
  .orders-page .orders-table tbody tr {display:table-row}
  .orders-page .orders-table tbody td {display:table-cell}
  .orders-page .orders-table th:nth-child(1){width:11%}
  .orders-page .orders-table th:nth-child(2){width:18%}
  .orders-page .orders-table th:nth-child(3){width:9%}
  .orders-page .orders-table th:nth-child(4){width:18%}
  .orders-page .orders-table th:nth-child(5){width:17%}
  .orders-page .orders-table th:nth-child(6),
  .orders-page .orders-table th:nth-child(7),
  .orders-page .orders-table th:nth-child(8),
  .orders-page .orders-table th:nth-child(9){width:6.75%}
  .orders-page .orders-table th {white-space:nowrap}
  .orders-page .orders-table th:nth-child(n+6),
  .orders-page .orders-table td:nth-child(n+6) {
    min-width:0;padding-inline:1px;text-align:center;
  }
  .orders-page .orders-table .table-break {
    min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .orders-page .orders-table .chip {
    white-space:nowrap;max-width:100%;
    padding:5px 6px;gap:5px;
  }
  .orders-page .orders-table .chip::before {
    flex:0 0 9px;width:9px;height:9px;
  }
  .orders-page .orders-table .order-icon-button {
    width:min(38px,calc(100% - 2px));height:35px;min-width:0;
    border-radius:9px;margin:0 auto;
  }
  .orders-page .orders-table .order-icon-button svg {width:19px;height:19px}
  .orders-page .orders-table .order-icon-truck svg {width:23px;height:23px}
  .orders-page .orders-table td strong {overflow-wrap:normal}
  .orders-page .filters {min-width:0}
  .orders-page .filters .field{min-width:0}
  .orders-workspace.with-details {grid-template-columns:minmax(0,1fr)}
  .order-drawer {
    position:fixed;z-index:56;top:0;right:0;bottom:0;
    width:min(390px,96vw);max-width:96vw;
    height:100dvh;max-height:100dvh;min-height:0;
    border-radius:18px 0 0 18px;
    box-shadow:0 18px 70px #0d261b45;
  }
  .order-drawer-content{overflow-y:auto}
}

/* Monitor de ordenador 1280–1499 px: misma composición original. */
@media (min-width:1280px) and (max-width:1499px) {
  .orders-page .orders-table th{font-size:clamp(12px,1.05vw,16px)}
  .orders-page .orders-table td,
  .orders-page .orders-table td strong,
  .orders-page .orders-table .order-date{font-size:clamp(13px,1.07vw,16px)}
  .orders-page .orders-table .chip{font-size:clamp(12px,.93vw,14px)}
  .orders-page .filters{grid-template-columns:1fr 1fr 1.2fr 1fr auto;gap:10px}
  .orders-page .filters .field.searchfield{grid-column:auto}
  .orders-page .filters .orders-export-btn{grid-column:auto}
}

/* iPad Pro vertical 1024px y horizontal 1194px, manteniendo menú lateral. */
@media (min-width:941px) and (max-width:1279px) {
  .shell{grid-template-columns:178px minmax(0,1fr)}
  .sidebar{padding:10px 9px 20px}
  .sidebar .brand{height:141px;min-height:141px;margin:0}
  .sidebar .brand img{height:137px;width:165px}
  .sidebar .nav{gap:7px;margin-top:9px}
  .sidebar .nav .nav-link{
    min-height:57px;height:57px;padding:5px 6px;gap:9px;
    font-size:14px;font-weight:650;white-space:nowrap;
  }
  .sidebar .nav .nav-link .nav-symbol {
    width:43px;height:43px;flex:0 0 43px;border-radius:11px
  }
  .sidebar .nav .nav-symbol svg{width:24px;height:24px}
  .sidebar::after{top:max(565px,calc(100vh - 265px));left:-18px}
  .topbar{min-height:104px;height:104px;padding:14px 20px 9px}
  .topbar h1{font-size:clamp(30px,3.1vw,38px)}
  .topbar p{font-size:clamp(18px,2vw,24px)}
  .topbar::after{height:104px;width:58%}
  .content{padding:7px 10px 22px}
  .orders-page{min-height:calc(100vh - 138px);padding:15px 13px 19px}
  .orders-page .page-heading{min-height:64px;gap:10px;margin-bottom:12px}
  .orders-page .page-heading .titleblock{gap:13px}
  .orders-page .heading-icon{width:56px;height:56px;flex-basis:56px;border-radius:14px}
  .orders-page .heading-icon svg{width:28px;height:28px}
  .orders-page .page-heading h2{font-size:clamp(23px,2.4vw,29px)}
  .orders-page .page-heading p{font-size:14px}
  .orders-page button.btn.primary.large{
    min-height:48px;padding:9px 13px;font-size:15px;white-space:nowrap
  }
  .orders-page .filters{
    grid-template-columns:1fr 1fr 1.3fr 1fr;gap:9px;
    padding:11px;margin-bottom:13px
  }
  .orders-page .filters .field.searchfield{grid-column:auto}
  .orders-page .filters .orders-export-btn{
    grid-column:4;height:43px;min-height:43px;font-size:14px
  }
  .orders-page .filters .field label{font-size:13px}
  .orders-page .filters .field input,
  .orders-page .filters .field select,
  .orders-page .orders-date-field .date-control{
    height:43px;min-height:43px;font-size:14px
  }
  .orders-page .orders-date-field .date-visual{font-size:14px}
  .orders-page .orders-table th{font-size:clamp(11px,1.15vw,14px);padding:7px 3px}
  .orders-page .orders-table td{
    font-size:clamp(12px,1.23vw,15px);
    padding:7px 4px;height:45px
  }
  .orders-page .orders-table td strong,
  .orders-page .orders-table .order-date{font-size:clamp(12px,1.23vw,15px)}
  .orders-page .orders-table .order-products-count{font-size:clamp(12px,1.23vw,15px)}
  .orders-page .orders-table .chip{font-size:clamp(11px,1.08vw,13px)}
}

/* iPad de 11 pulgadas en vertical (834px) y tablet más estrecha:
   navegación arriba para dedicar todo el ancho a la misma tabla de 9 columnas. */
@media (min-width:741px) and (max-width:940px) {
  .shell{grid-template-columns:minmax(0,1fr)}
  .sidebar{
    width:100%;height:auto;min-height:0;position:relative;
    display:flex!important;flex-direction:column!important;
    padding:7px 11px 10px;gap:3px;overflow:hidden;
  }
  .sidebar::after{display:none}
  .sidebar .brand{
    width:100%;max-width:none;min-height:61px;height:61px;
    padding:0;justify-content:center;align-items:center;margin:0
  }
  .sidebar .brand img{height:60px;width:125px;transform:none}
  .sidebar .nav{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;margin:0;width:100%;max-width:none;
    overflow:visible;justify-content:stretch
  }
  .sidebar .nav .nav-link{
    display:flex!important;min-width:0;width:100%;height:44px;min-height:44px;
    font-size:14px;font-weight:660;justify-content:flex-start;
    padding:3px 9px;gap:10px;border-radius:11px;white-space:nowrap
  }
  .sidebar .nav .nav-symbol {
    width:34px;height:34px;flex:0 0 34px;border-radius:9px
  }
  .sidebar .nav .nav-symbol svg{width:19px;height:19px}
  .topbar{height:88px;min-height:88px;padding:12px 17px}
  .topbar h1{font-size:clamp(25px,3.5vw,31px)}
  .topbar p{font-size:18px}
  .topbar::after{height:88px;width:55%;opacity:.7}
  .content{padding:7px 9px 20px}
  .orders-page{min-height:520px;padding:14px 12px 19px}
  .orders-page .page-heading{min-height:58px;margin-bottom:12px;gap:8px}
  .orders-page .page-heading .titleblock{gap:11px}
  .orders-page .heading-icon{width:53px;height:53px;flex:0 0 53px}
  .orders-page .heading-icon svg{width:27px;height:27px}
  .orders-page .page-heading h2{font-size:25px}
  .orders-page .page-heading p{font-size:13px}
  .orders-page button.btn.primary.large{
    min-height:46px;padding:8px 13px;font-size:15px;white-space:nowrap
  }
  .orders-page .filters{
    grid-template-columns:1fr 1fr 1.35fr 1fr;
    gap:8px;padding:9px;margin-bottom:12px
  }
  .orders-page .filters .field.searchfield{grid-column:auto}
  .orders-page .filters .orders-export-btn{
    grid-column:4;height:42px;min-height:42px;font-size:13px
  }
  .orders-page .filters .field label{font-size:13px}
  .orders-page .filters .field input,
  .orders-page .filters .field select,
  .orders-page .orders-date-field .date-control{
    height:42px;min-height:42px;font-size:13px;padding:6px
  }
  .orders-page .orders-date-field .date-visual{font-size:13px}
  .orders-page .orders-table th{font-size:12px;padding:6px 2px}
  .orders-page .orders-table td{font-size:12px;padding:6px 3px;height:43px}
  .orders-page .orders-table td strong,
  .orders-page .orders-table .order-date,
  .orders-page .orders-table .order-products-count{font-size:12px}
  .orders-page .orders-table .chip{font-size:11.5px;padding:5px 4px}
  .orders-page .orders-table .order-icon-button{height:34px;width:min(36px,calc(100% - 2px))}
  .orders-page .orders-table .order-icon-button svg{width:18px;height:18px}
  .orders-page .orders-table .order-icon-truck svg{width:22px;height:22px}
}

/* Teléfonos: priorizar acciones accesibles. Solo en móvil estrecho
   se usan tarjetas; NUNCA en un iPad o en escritorio. */
@media (max-width:740px) {
  .orders-page .table-wrap{overflow:visible;border:0;background:transparent}
  .orders-page .orders-table{display:block;width:100%;min-width:0!important}
  .orders-page .orders-table thead{
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;
    overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0
  }
  .orders-page .orders-table tbody{display:grid;gap:10px}
  .orders-page .orders-table tbody tr {
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px 4px;padding:12px;min-width:0;
    border:1px solid #e5eeea;border-radius:14px;
    background:#fff;box-shadow:0 3px 12px #153c190d
  }
  .orders-page .orders-table tbody tr td {
    display:block;min-width:0!important;width:auto!important;
    padding:0!important;border:0!important;height:auto;
    font-size:14px;white-space:normal
  }
  .orders-page .orders-table tbody tr td:nth-child(2) {
    grid-column:1/4;grid-row:1;overflow-wrap:anywhere
  }
  .orders-page .orders-table tbody tr td:nth-child(2) strong{font-size:15px}
  .orders-page .orders-table tbody tr td:nth-child(1) {
    grid-column:4;grid-row:1;text-align:right;font-size:12px
  }
  .orders-page .orders-table tbody tr td:nth-child(3) {
    grid-column:1/3;grid-row:2;display:flex;gap:5px;align-items:center
  }
  .orders-page .orders-table tbody tr td:nth-child(3)::before {
    content:"Productos:";font-size:12px;color:#637392
  }
  .orders-page .orders-table tbody tr td:nth-child(5) {
    grid-column:3/5;grid-row:2;display:flex;justify-content:flex-end
  }
  .orders-page .orders-table tbody tr td:nth-child(4) {
    grid-column:1/-1;grid-row:3;white-space:normal;
    overflow-wrap:anywhere;overflow:visible;
    border-bottom:1px solid #edf0f0!important;padding-bottom:7px!important
  }
  .orders-page .orders-table tbody tr td:nth-child(4)::before {
    content:"Observaciones: ";font-size:12px;color:#536a89;font-weight:700
  }
  .orders-page .orders-table tbody tr td:nth-child(n+6) {
    grid-row:4;display:flex;flex-direction:column;align-items:center;
    text-align:center;gap:4px
  }
  .orders-page .orders-table tbody tr td:nth-child(6){grid-column:1}
  .orders-page .orders-table tbody tr td:nth-child(7){grid-column:2}
  .orders-page .orders-table tbody tr td:nth-child(8){grid-column:3}
  .orders-page .orders-table tbody tr td:nth-child(9){grid-column:4}
  .orders-page .orders-table tbody tr td:nth-child(n+6)::before{
    content:attr(data-label);font-size:12px;color:#4b617a
  }
  .orders-page .orders-table .order-icon-button{width:44px;height:40px}
  .orders-page .table-wrap{max-width:100%}
  .orders-workspace.with-details{grid-template-columns:minmax(0,1fr)}
  .order-drawer {
    position:fixed;z-index:56;top:0;right:0;bottom:0;
    width:min(390px,100vw);max-width:100vw;
    height:100dvh;max-height:100dvh;min-height:0;
    border-radius:18px 0 0 18px
  }
  .order-drawer-content{overflow-y:auto}
}

/* La cabecera de botones conserva letra legible incluso con 9 columnas. */
@media (min-width:941px) and (max-width:1279px) {
  .orders-page .orders-table th:nth-child(n+6) {
    font-size:12px;letter-spacing:-.2px;white-space:nowrap;
  }
}
@media (min-width:741px) and (max-width:940px) {
  .orders-page .orders-table th:nth-child(n+6) {
    font-size:11px;letter-spacing:-.2px;white-space:nowrap;
  }
}


/* Campos de fecha idénticos al diseño aprobado: un único calendario SVG y
   fecha DD/MM/AAAA visible. Safari/iPad no puede superponer sus controles.
   El date input nativo sigue activo e interactivo, pero es transparente. */
.orders-page .filters .orders-date-field .date-control {
  position:relative;display:flex;align-items:center;
  width:100%;min-width:0;padding:0 43px 0 13px;
  border:1px solid #e2e9ef;border-radius:10px;
  background:#fff;color:#142551;
  box-shadow:0 1px 3px rgba(18,47,73,.035);
  cursor:pointer;
}
.orders-page .filters .orders-date-field .date-control:focus-within {
  outline:2px solid #79ad8c;outline-offset:1px;
}
.orders-page .filters .orders-date-field .date-visual,
.orders-page .filters .orders-date-field .date-control:focus-within .date-visual {
  display:block!important;position:relative;inset:auto;top:auto;left:auto;
  transform:none;pointer-events:none;z-index:1;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:inherit;font-weight:550;line-height:1.2;color:#142551;
}
.orders-page .filters .orders-date-field .date-calendar-icon {
  position:absolute;right:11px;top:50%;transform:translateY(-50%);
  display:block;width:21px;height:21px;stroke:#182b55;
  flex:0 0 21px;pointer-events:none;z-index:1;
}
.orders-page .filters .orders-date-field .date-control input[type="date"],
.orders-page .filters .orders-date-field .date-control:focus-within input[type="date"] {
  appearance:none;-webkit-appearance:none;
  position:absolute;inset:0;z-index:2;
  display:block;width:100%;height:100%;min-height:0;max-width:100%;
  padding:0;margin:0;border:0;border-radius:10px;
  background:transparent!important;box-shadow:none!important;
  color:transparent!important;opacity:0!important;
  cursor:pointer;
}
.orders-page .filters .orders-date-field input[type="date"]::-webkit-calendar-picker-indicator,
.orders-page .filters .orders-date-field input[type="date"]::-webkit-datetime-edit {
  opacity:0!important;color:transparent!important;
}
@media (max-width:940px) {
  .orders-page .filters .orders-date-field .date-control {padding-left:9px;padding-right:31px}
  .orders-page .filters .orders-date-field .date-calendar-icon {width:18px;height:18px;right:7px}
}


/* Encabezados: mismo SVG y colores que el icono del menú lateral.
   No cambiar el tamaño, la posición ni la tipografía de los títulos. */
.page-heading .heading-icon.heading-icon--nav.nav-symbol--pedidos {
  background:linear-gradient(135deg,#278349,#116336);color:#fff;
}
.page-heading .heading-icon.heading-icon--nav.nav-symbol--sumatorio {
  background:#d8ebff;color:#1554af;
}
.page-heading .heading-icon.heading-icon--nav.nav-symbol--primera-hora {
  background:#ffead0;color:#f28b00;
}
.page-heading .heading-icon.heading-icon--nav.nav-symbol--categorias {
  background:#edddff;color:#6539bd;
}
.page-heading .heading-icon.heading-icon--nav.nav-symbol--productos {
  background:#cdf6d6;color:#087e39;
}
.page-heading .heading-icon.heading-icon--nav.nav-symbol--clientes {
  background:#ffdde0;color:#d8233b;
}
.page-heading .heading-icon.heading-icon--nav svg {
  stroke:currentColor;stroke-width:2.1;
  fill:none;display:block;
}

/* Clientes: fondo rosa del icono de referencia aprobado; sin alterar otras secciones. */
.sidebar .nav-symbol--clientes,
.page-heading .heading-icon.heading-icon--nav.nav-symbol--clientes{background:#fce8e9}


/* Fondos botánicos: conservar proporciones originales sin ampliar ni deformar. */
.topbar::after {
  top:0;right:0;width:min(560px,58%);height:100%;
  background-image:url('/decor-header.svg?v=hortalizas-premium-v1');
  background-repeat:no-repeat;
  background-size:contain;
  background-position:right center;
}
.sidebar::after {
  left:-7px;top:max(650px,calc(100vh - 310px));bottom:auto;
  width:min(198px,85%);height:317px;
  background-image:url('/decor-leaves.svg?v=fondos-vectoriales-v3');
  background-repeat:no-repeat;
  background-size:contain;
  background-position:left top;
  opacity:.8;
}
@media (min-width:941px) and (max-width:1279px) {
  .sidebar::after {
    top:max(530px,calc(100vh - 275px));
    left:-8px;width:min(165px,90%);height:264px;opacity:.75;
  }
}
@media (max-width:940px) {
  .sidebar::after {display:none}
  .topbar::after {width:52%;opacity:.55}
}
@media (max-width:600px) {
  .topbar::after {width:46%;opacity:.35}
}

/* Ajuste exclusivo de la navegación lateral en PC y tablet.
   Conserva los seis botones, los SVG originales, colores y logotipo.
   Los tamaños se limitan solo cuando falta altura de pantalla. */
@media (min-width:1280px) {
  .sidebar .nav {
    --vlm-menu-row:clamp(42px,calc((100dvh - 270px)/6),66px);
    margin-top:clamp(6px,1.8dvh,18px);
    gap:clamp(4px,1dvh,10px);
  }
  .sidebar .nav .nav-link {
    height:var(--vlm-menu-row);min-height:var(--vlm-menu-row);
    padding-top:2px;padding-bottom:2px;
  }
  .sidebar .nav .nav-link .nav-symbol {
    flex:0 0 min(60px,calc(var(--vlm-menu-row) - 6px));
    width:min(60px,calc(var(--vlm-menu-row) - 6px));
    height:min(60px,calc(var(--vlm-menu-row) - 6px));
  }
  .sidebar .nav .nav-symbol svg {
    width:min(29px,calc(var(--vlm-menu-row) - 16px));
    height:min(29px,calc(var(--vlm-menu-row) - 16px));
  }
}
@media (min-width:941px) and (max-width:1279px) {
  .sidebar .nav {
    --vlm-menu-row:clamp(40px,calc((100dvh - 208px)/6),57px);
    margin-top:clamp(4px,1dvh,9px);
    gap:clamp(3px,.7dvh,7px);
  }
  .sidebar .nav .nav-link {
    height:var(--vlm-menu-row);min-height:var(--vlm-menu-row);
    padding-top:2px;padding-bottom:2px;
  }
  .sidebar .nav .nav-link .nav-symbol {
    flex:0 0 min(43px,calc(var(--vlm-menu-row) - 6px));
    width:min(43px,calc(var(--vlm-menu-row) - 6px));
    height:min(43px,calc(var(--vlm-menu-row) - 6px));
  }
  .sidebar .nav .nav-symbol svg {
    width:min(24px,calc(var(--vlm-menu-row) - 16px));
    height:min(24px,calc(var(--vlm-menu-row) - 16px));
  }
}

/* PRIMERA HORA: aislamiento estricto al contenido de esta sección. */
.first-hour-page .ph-title-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:clamp(12px,2.5vw,30px);min-width:0}
.first-hour-page .ph-title-row .ph-today{font-size:clamp(22px,2.2vw,29px);line-height:1.12;font-weight:800;letter-spacing:-.6px;color:var(--text);white-space:nowrap;font-variant-numeric:tabular-nums}
.first-hour-page .page-heading .actions .btn{min-height:48px;font-size:15px;padding:10px 16px}

.first-hour-page .page-heading{flex-wrap:wrap;gap:14px}
.first-hour-page .page-heading .actions{gap:12px;align-items:center;flex-wrap:wrap}
.first-hour-page .ph-section{margin:15px 0 23px}
.first-hour-page .ph-section h3{font-size:23px;line-height:1.2;font-weight:860;color:#103a38;margin:0 0 10px;display:flex;align-items:center;gap:12px}
.first-hour-page .ph-section-icon{width:48px;height:48px;flex:0 0 48px;border-radius:50%;background:#e2f5e6;display:grid;place-items:center;font-size:25px}
.first-hour-page .ph-section--pepper .ph-section-icon{background:#ffe7ea}
.first-hour-page .ph-section--other .ph-section-icon{background:#e3f1fe}
.first-hour-page .ph-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,226px),1fr));gap:12px}
.first-hour-page .ph-card{position:relative;min-width:0;min-height:136px;padding:11px 13px 12px;border:1px solid #cae8d4;border-radius:14px;background:linear-gradient(120deg,#f6fcf7,#f2faf4);display:flex;flex-direction:column;justify-content:space-between}
.first-hour-page .ph-card--pepper{border-color:#f9dbe0;background:linear-gradient(120deg,#fffafa,#fff1f4)}
.first-hour-page .ph-card--other{border-color:#cbe5ff;background:linear-gradient(120deg,#f8fbff,#eef7ff)}
.first-hour-page .ph-card-head{min-width:0;display:flex;align-items:center;gap:12px}
.first-hour-page .ph-image{width:64px;height:64px;flex:0 0 64px;object-fit:contain;border-radius:10px}
.first-hour-page .ph-image.emoji,.first-hour-page .ph-missing-icon{display:grid;place-items:center;font-size:42px;line-height:1}
.first-hour-page .ph-product{min-width:0;font-size:15px;line-height:1.24;font-weight:750;color:#122c40;overflow-wrap:break-word}
.first-hour-page .ph-value{display:flex;align-items:baseline;justify-content:center;gap:8px;margin-top:5px;color:#075b36;font-size:32px;font-weight:900;line-height:1.1;letter-spacing:-.5px;font-variant-numeric:tabular-nums;white-space:nowrap}
.first-hour-page .ph-value>span{font:inherit;color:inherit;letter-spacing:inherit;white-space:nowrap}
.first-hour-page .ph-missing{margin:7px 0 0;color:#60778a;text-align:center;font-size:13px;font-weight:700;line-height:1.25}
.first-hour-page .ph-remove{position:absolute;top:4px;right:5px;border:0;border-radius:8px;background:transparent;color:#7b8694;cursor:pointer;font-size:23px;line-height:1;width:30px;height:30px}
.first-hour-page .ph-remove:hover{background:#ffe6e6;color:#ad3030}
.first-hour-page .ph-card:has(.ph-remove) .ph-product{padding-right:12px}
.first-hour-page .ph-picker{margin:0 0 14px;padding:14px 16px;background:#f7fcf8;border:1px solid #c7e1ce;border-radius:13px}
.first-hour-page .ph-picker label{display:block;font-size:15px;font-weight:800;margin-bottom:10px;color:#173a40}
.first-hour-page .ph-picker-row{display:flex;flex-wrap:wrap;gap:9px}
.first-hour-page .ph-picker-row select{flex:1;min-width:min(100%,220px);padding:11px 12px;border:1px solid #d2dfe3;border-radius:10px;background:#fff;color:#162f44;font-size:15px}
.first-hour-page .ph-picker p{color:#627589;font-size:13px;margin:9px 0 0}
@media(max-width:1100px){
 .first-hour-page .ph-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr))}
 .first-hour-page .ph-value{font-size:30px}
}
@media(max-width:600px){
 .first-hour-page .ph-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,156px),1fr))}
 .first-hour-page .ph-card{padding:9px 10px;min-height:132px}
 .first-hour-page .ph-image{width:49px;height:49px;flex-basis:49px}
 .first-hour-page .ph-card-head{gap:7px}
 .first-hour-page .ph-product{font-size:13px}
 .first-hour-page .ph-value{font-size:clamp(22px,5.7vw,30px);gap:5px}
 .first-hour-page .page-heading .actions{justify-content:flex-start}
}


/* NUEVO PEDIDO 2026-10-14: diseño aislado; no afecta a editar/consultar pedidos ni a otros menús. */
.new-order-page .new-order-data {margin-bottom:14px}
.new-order-page .new-order-layout {
 display:grid;grid-template-columns:minmax(0,1fr) clamp(245px,25vw,310px);
 gap:14px;align-items:start;
}
.new-order-page .new-order-catalog-panel {min-width:0;padding:13px 14px 15px;container:order-catalog / inline-size}
.new-order-page .new-order-tabs {
 display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;
 padding:1px 1px 11px;scrollbar-width:thin;scroll-snap-type:x proximity;
}
.new-order-page .new-order-tab {
 min-height:52px;display:flex;align-items:center;justify-content:center;
 flex:0 0 auto;gap:9px;padding:8px 11px;max-width:235px;
 border:1px solid var(--border);background:var(--surface);color:var(--text);
 border-radius:11px;font-size:14px;font-weight:800;white-space:nowrap;scroll-snap-align:start;
}
.new-order-page .new-order-tab.active {background:var(--primary);color:#fff;border-color:var(--primary)}
.new-order-page .new-order-tab small {
 display:inline-block;font-size:12px;color:inherit;opacity:.75;font-variant-numeric:tabular-nums;
}
.new-order-page .new-order-cat-image {width:35px;height:35px;flex:0 0 35px;object-fit:contain}
.new-order-page .new-order-catalog-head {
 display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:10px 2px 8px;flex-wrap:wrap;
}
.new-order-page .new-order-catalog-head h3 {font-size:18px;margin:0;font-weight:850}
.new-order-page #orderProductSearch {
 width:clamp(170px,39%,290px);min-width:160px;min-height:42px;padding:8px 12px;
 border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);
}
.new-order-page .new-order-hint {
 margin:2px 0 11px;padding:8px 11px;font-size:12px;font-weight:650;color:var(--primary);
 background:var(--soft);border-radius:9px;
}
.new-order-page .new-order-catalog-scroll {
 max-height:none;overflow-y:visible;overscroll-behavior-y:auto;
 scrollbar-width:auto;padding-right:0;
}
.new-order-page .new-order-subtabs {display:flex;gap:7px;flex-wrap:wrap;margin:0 0 10px}
.new-order-page .new-order-subtabs button {
 display:inline-flex;align-items:center;gap:6px;min-height:36px;
 padding:5px 10px;border:1px solid var(--border);background:var(--surface);
 color:var(--text);border-radius:9px;font-size:12px;font-weight:750;
}
.new-order-page .new-order-subtabs button.active {background:var(--soft);border-color:var(--primary);color:var(--primary)}
.new-order-page .new-order-sub-image {width:24px;height:24px;object-fit:contain}
.new-order-page .new-order-result-heading {
 display:flex;align-items:center;justify-content:space-between;
 gap:8px;padding:0 2px;margin:0 0 10px;color:var(--text);font-size:13px;
}
.new-order-page .new-order-result-heading small {color:var(--muted);font-size:12px;white-space:nowrap}
.new-order-page .new-order-product-grid {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.new-order-page .new-order-tile {
 min-width:0;min-height:191px;display:flex;flex-direction:column;align-items:center;
 padding:10px 8px 11px;border:1px solid var(--border);border-radius:12px;
 background:var(--surface);text-align:center;
}
.new-order-page .new-order-tile.is-selected {border-color:var(--primary);background:color-mix(in srgb,var(--soft) 23%,var(--surface))}
.new-order-page .new-order-tile-image {
 width:88px;height:88px;max-width:100%;object-fit:contain;display:block;
 margin:0 auto 6px;border-radius:0;
}
.new-order-page .new-order-tile-image.emoji {display:grid;place-items:center;font-size:54px}
.new-order-page .new-order-tile-info {
 flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;
 justify-content:center;gap:1px;margin:0 0 7px;
}
.new-order-page .new-order-tile-info strong {font-size:13px;line-height:1.23;overflow-wrap:anywhere;font-weight:800}
.new-order-page .new-order-tile-info small {font-size:13px;line-height:1.23;font-weight:400;color:var(--text)}
.new-order-page .new-order-qty-controls {
 display:grid;grid-template-columns:40px minmax(44px,1fr) 40px;gap:5px;
 align-items:center;width:min(100%,180px);margin:0 auto;
}
.new-order-page .new-order-qty-controls button {
 height:41px;min-width:0;padding:0 3px;border:1px solid var(--border);
 border-radius:9px;font-weight:850;font-size:24px;line-height:1;
}
.new-order-page .new-order-minus {color:var(--text);background:var(--bg)}
.new-order-page .new-order-qty-value {
 color:var(--text);background:var(--surface);font-size:20px!important;
 font-variant-numeric:tabular-nums;cursor:text;
}
.new-order-page .new-order-plus {color:var(--primary);background:var(--soft)}
.new-order-page .new-order-summary-panel {
 min-width:0;position:sticky;top:15px;margin-bottom:16px;padding:13px;
 display:flex;flex-direction:column;max-height:none;
}
.new-order-page .new-order-summary-heading {
 display:flex;align-items:center;justify-content:space-between;gap:7px;
 font-size:17px;font-weight:850;margin:0 0 11px;
}
.new-order-page .new-order-summary-heading strong {
 display:inline-flex;justify-content:center;align-items:center;min-width:29px;height:29px;
 border-radius:99px;padding:3px 8px;background:var(--soft);color:var(--primary);font-size:13px;
}
.new-order-page .new-order-summary-list {
 flex:1;min-height:0;overflow-y:visible;overscroll-behavior:auto;scrollbar-width:auto;
}
.new-order-page .new-order-empty {padding:24px 7px;text-align:center;color:var(--muted);font-size:13px}
.new-order-page .new-order-summary-item {
 display:grid;grid-template-columns:47px minmax(0,1fr) 23px;gap:8px;
 align-items:center;padding:9px 0;border-bottom:1px solid var(--border);
}
.new-order-page .new-order-summary-image {
 display:block;width:47px;height:47px;object-fit:contain;margin:0;border-radius:0;
}
.new-order-page .new-order-summary-image.emoji {display:grid;place-items:center;font-size:32px}
.new-order-page .new-order-summary-detail {min-width:0}
.new-order-page .new-order-summary-detail strong {
 display:block;font-size:12px;line-height:1.25;font-weight:750;overflow-wrap:anywhere;
}
.new-order-page .new-order-summary-detail small {display:block;font-size:11px;color:var(--muted);margin:2px 0 5px}
.new-order-page .new-order-summary-detail .new-order-qty-controls {
 grid-template-columns:32px minmax(36px,54px) 32px;gap:4px;width:max-content;margin:0;
}
.new-order-page .new-order-summary-detail .new-order-qty-controls button {
 height:34px;font-size:19px;border-radius:8px;
}
.new-order-page .new-order-summary-detail .new-order-qty-value {font-size:15px!important}
.new-order-page .new-order-remove {
 width:23px;height:27px;border:0;background:transparent;color:var(--muted);
 font-size:23px;line-height:1;padding:0;
}
.new-order-page .new-order-remove:hover {color:var(--red)}
.new-order-page .new-order-summary-actions {
 flex:0 0 auto;display:grid;gap:8px;padding-top:13px;
}
.new-order-page .new-order-summary-actions .btn {width:100%;min-height:48px;font-size:15px}
@media(max-width:1150px){
 .new-order-page .new-order-layout {grid-template-columns:minmax(0,1fr) 245px;gap:10px}
 .new-order-page .new-order-tile-image {width:72px;height:72px}
 .new-order-page .new-order-tile {min-height:176px}
 .new-order-page .new-order-qty-controls {grid-template-columns:33px minmax(38px,1fr) 33px}
}
@media(max-width:900px){
 .new-order-page .new-order-layout {grid-template-columns:minmax(0,1fr)}
 .new-order-page .new-order-summary-panel {position:static;max-height:none}
  .new-order-page .new-order-summary-list {max-height:none}
 .new-order-page .new-order-catalog-scroll {max-height:none}
 .new-order-page .new-order-tile-image {width:88px;height:88px}
 .new-order-page .new-order-tile {min-height:191px}
}
/* Nuevo pedido: siempre cinco columnas en tablet y ordenador.
   Controles flexibles: ninguna de las 3 celdas puede forzar el ancho de la tarjeta. */
@media(min-width:601px){
 .new-order-page .new-order-product-grid {grid-template-columns:repeat(5,minmax(0,1fr))}
}
.new-order-page .new-order-tile .new-order-qty-controls {
 box-sizing:border-box;width:100%;max-width:100%;min-width:0;
 grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;
}
.new-order-page .new-order-tile .new-order-qty-controls button {
 box-sizing:border-box;width:100%;min-width:0;max-width:100%;
 padding-inline:1px;overflow:hidden;
}
/* En tablets compactas el resumen pasa debajo para dar ancho al catálogo. */
@media(min-width:601px) and (max-width:1250px){
 .new-order-page .new-order-layout {grid-template-columns:minmax(0,1fr)}
 .new-order-page .new-order-summary-panel {position:static;max-height:none}
}
/* Reducir solo espacios interiores cuando el catálogo se estrecha. */
@container order-catalog (max-width:700px){
 .new-order-page .new-order-product-grid {gap:7px}
 .new-order-page .new-order-tile {padding:8px 5px 9px}
 .new-order-page .new-order-tile .new-order-qty-controls {gap:3px}
 .new-order-page .new-order-tile .new-order-qty-controls button {font-size:21px;height:39px}
 .new-order-page .new-order-tile .new-order-qty-value {font-size:17px!important}
}
@container order-catalog (max-width:550px){
 .new-order-page .new-order-product-grid {gap:5px}
 .new-order-page .new-order-tile {padding:7px 3px 8px}
 .new-order-page .new-order-tile-image {width:60px;height:60px}
 .new-order-page .new-order-tile .new-order-qty-controls {gap:2px}
 .new-order-page .new-order-tile .new-order-qty-controls button {font-size:19px;height:37px}
 .new-order-page .new-order-tile .new-order-qty-value {font-size:15px!important}
}
@media(max-width:600px){
 .new-order-page .new-order-product-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 .new-order-page .new-order-catalog-head {align-items:stretch}
 .new-order-page #orderProductSearch {width:100%}
 .new-order-page .new-order-catalog-panel {padding:11px}
 .new-order-page .new-order-tile-image {width:72px;height:72px}
 .new-order-page .new-order-tile {min-height:181px}
 .new-order-page .new-order-qty-controls {grid-template-columns:35px minmax(39px,1fr) 35px}
}
@media(max-width:390px){
 .new-order-page .new-order-product-grid {grid-template-columns:1fr}
}

/* Clientes: barra de búsqueda y acciones, sin alterar otras secciones. */
.clients-page .clients-toolbar{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:4px 0 20px;padding:15px;border:1px solid var(--border);border-radius:14px;background:var(--bg)}
.clients-page .clients-search{flex:1 1 280px;min-width:180px;max-width:650px}
.clients-page .clients-search label{display:block;margin-bottom:7px;font-size:13px;font-weight:800;color:var(--text)}
.clients-page .clients-search-input{display:flex;align-items:center;gap:9px;padding:0 12px;min-height:46px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}
.clients-page .clients-search-input span{font-size:25px;line-height:1;color:var(--muted)}
.clients-page .clients-search-input input{width:100%;min-width:0;min-height:43px;border:0;outline:0;background:transparent;color:var(--text)}
.clients-page .clients-toolbar-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.clients-page .clients-toolbar-actions .btn{min-height:46px}
@media(max-width:600px){.clients-page .clients-search{flex-basis:100%;max-width:none}.clients-page .clients-toolbar-actions{width:100%}.clients-page .clients-toolbar-actions .btn{flex:1}}

/* Productos: mismo estilo de barra de herramientas que Clientes. */
.products-page .clients-toolbar{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:4px 0 20px;padding:15px;border:1px solid var(--border);border-radius:14px;background:var(--bg)}
.products-page .clients-search{flex:1 1 280px;min-width:180px;max-width:650px}
.products-page .clients-search label{display:block;margin-bottom:7px;font-size:13px;font-weight:800;color:var(--text)}
.products-page .clients-search-input{display:flex;align-items:center;gap:9px;padding:0 12px;min-height:46px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}
.products-page .clients-search-input span{font-size:25px;line-height:1;color:var(--muted)}
.products-page .clients-search-input input{width:100%;min-width:0;min-height:43px;border:0;outline:0;background:transparent;color:var(--text)}
.products-page .clients-toolbar-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.products-page .clients-toolbar-actions .btn{min-height:46px}
@media(max-width:600px){.products-page .clients-search{flex-basis:100%;max-width:none}.products-page .clients-toolbar-actions{width:100%}.products-page .clients-toolbar-actions .btn{flex:1}}


/* Detalle del pedido - estilo 3: lista compacta y minimalista.
   Estilos exclusivamente del panel de consulta (no modifican el histórico). */
.order-drawer.order-drawer--minimal{
 color:var(--text);min-width:0;
}
.order-drawer--minimal .order-drawer-head{
 display:flex;align-items:center;justify-content:space-between;
 flex:0 0 auto;gap:12px;height:auto;min-height:60px;padding:14px 17px;
 border-bottom:1px solid var(--border);
}
.order-drawer--minimal .order-drawer-head h3{
 margin:0;min-width:0;color:var(--text);font-size:19px;line-height:1.2;font-weight:800;
}
.order-drawer--minimal .drawer-close{
 margin-left:auto;flex:0 0 32px;width:32px;height:32px;min-width:32px;
 border:0;border-radius:9px;display:grid;place-items:center;
 background:transparent;color:var(--muted);
}
.order-drawer--minimal .drawer-close:hover{background:var(--bg);color:var(--text)}
.order-drawer--minimal .order-drawer-content{
 flex:1 1 auto;min-height:0;padding:14px 16px 8px;
 overflow-y:auto;overscroll-behavior-y:contain;
}
.order-drawer--minimal .drawer-quick-status{display:flex;align-items:center;margin:0 0 13px}
.order-drawer--minimal .drawer-quick-status .chip{
 font-size:12px;font-weight:700;padding:6px 10px;
}
.order-drawer--minimal .drawer-quick-facts{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
 gap:0;padding:13px 0;margin-bottom:12px;
 background:color-mix(in srgb,var(--bg) 74%,var(--surface));
 border-radius:13px;border:1px solid var(--border);
}
.order-drawer--minimal .drawer-quick-fact{
 display:flex;flex-direction:column;justify-content:center;
 gap:4px;min-width:0;padding:0 12px;
}
.order-drawer--minimal .drawer-quick-fact+ .drawer-quick-fact{
 border-left:1px solid var(--border);
}
.order-drawer--minimal .drawer-quick-fact>span,
.order-drawer--minimal .drawer-quick-notes>span{
 color:var(--muted);font-size:12px;font-weight:500;line-height:1.25;
}
.order-drawer--minimal .drawer-quick-fact strong{
 display:block;min-width:0;color:var(--text);font-size:14px;
 line-height:1.35;font-weight:800;overflow-wrap:anywhere;
}
.order-drawer--minimal .drawer-quick-fact small{
 color:var(--muted);font-size:11px;line-height:1.25;overflow-wrap:anywhere;
}
.order-drawer--minimal .drawer-quick-notes{
 padding:13px 14px;margin:0 0 17px;border-radius:13px;
 background:color-mix(in srgb,var(--bg) 74%,var(--surface));
 border:1px solid var(--border);min-width:0;
}
.order-drawer--minimal .drawer-quick-notes p{
 margin:5px 0 0;font-size:13px;font-weight:650;line-height:1.5;
 white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);
}
.order-drawer--minimal h4{
 margin:0 0 10px;font-size:15px;line-height:1.35;font-weight:800;color:var(--text);
}
.order-drawer--minimal .drawer-quick-products{
 border:1px solid var(--border);border-radius:13px;
 overflow:hidden;background:var(--surface);
}
.order-drawer--minimal .drawer-quick-item{
 display:grid;grid-template-columns:39px minmax(0,1fr) auto;
 align-items:center;gap:8px;padding:8px 10px;min-height:56px;
 border-bottom:1px solid var(--border);min-width:0;
}
.order-drawer--minimal .drawer-quick-item:last-child{border-bottom:0}
.order-drawer--minimal .drawer-quick-img{
 display:block;flex:none;width:39px;height:39px;
 object-fit:contain;border-radius:7px;
}
.order-drawer--minimal .drawer-quick-img--empty{background:var(--bg)}
.order-drawer--minimal .drawer-quick-name{
 min-width:0;overflow-wrap:anywhere;color:var(--text);
 font-size:12.5px;line-height:1.3;font-weight:680;
}
.order-drawer--minimal .drawer-quick-amount{
 display:inline-flex;flex-wrap:wrap;align-items:baseline;justify-content:flex-end;
 gap:4px;text-align:right;color:var(--muted);max-width:112px;
}
.order-drawer--minimal .drawer-quick-amount strong{
 display:inline;color:var(--text);font-size:13px;font-weight:800;white-space:nowrap;
}
.order-drawer--minimal .drawer-quick-amount small{
 font-size:11px;font-weight:750;color:var(--muted);overflow-wrap:anywhere;
}
.order-drawer--minimal .drawer-quick-empty{
 padding:15px;margin:0;color:var(--muted);font-size:13px;
}
.order-drawer--minimal .drawer-extras{margin:9px 0 0;padding:0;border:0}
.order-drawer--minimal .drawer-extras summary{
 padding:7px 2px;font-size:12px;color:var(--muted);
}
.order-drawer--minimal .order-drawer-actions{
 flex:0 0 auto;margin-top:auto;padding:12px 15px 15px;
 border-top:1px solid var(--border);background:var(--surface);
}
.order-drawer--minimal .order-drawer-actions .btn.primary{
 display:flex;align-items:center;justify-content:center;gap:9px;
 width:100%;min-width:0;min-height:49px;
 font-size:15px!important;font-weight:750;
 border-radius:11px;
}
/* PC: integrado en el panel derecho sin desbordar el histórico. */
@media(min-width:1500px){
 .orders-workspace.with-details:has(.order-drawer--minimal){
  grid-template-columns:minmax(0,1fr) minmax(335px,365px);
 }
}
/* Tablet: panel algo más ancho para que cliente y fecha respiren. */
@media(min-width:801px) and (max-width:1110px){
 .order-drawer.order-drawer--minimal{
  width:min(435px,96vw);max-width:96vw;
 }
}
/* Pantallas pequeñas: mantiene las dos columnas y compacta las filas. */
@media(max-width:800px){
 .order-drawer.order-drawer--minimal{
  width:min(420px,100vw);max-width:100vw;
 }
}
@media(max-width:380px){
 .order-drawer--minimal .order-drawer-content{padding:12px 11px 8px}
 .order-drawer--minimal .drawer-quick-fact{padding:0 9px}
 .order-drawer--minimal .drawer-quick-fact strong{font-size:12.5px}
 .order-drawer--minimal .drawer-quick-item{grid-template-columns:33px minmax(0,1fr) auto;gap:6px;padding:7px}
 .order-drawer--minimal .drawer-quick-img{width:33px;height:33px}
 .order-drawer--minimal .drawer-quick-amount{max-width:84px}
 .order-drawer--minimal .drawer-quick-amount small{font-size:10px}
}


/* Detalle del pedido: modal centrado y horizontal en PC/tablet.
   Todas las reglas quedan aisladas del listado, edición y Nuevo pedido. */
.orders-workspace.with-details:has(.order-drawer--centered){
 grid-template-columns:minmax(0,1fr);
}
body:has(.order-drawer--centered){overflow:hidden}
.order-quick-backdrop{
 position:fixed;inset:0;z-index:1000;
 background:rgba(12,29,22,.42);
 backdrop-filter:blur(2px);
}
.order-drawer.order-drawer--minimal.order-drawer--centered{
 position:fixed;z-index:1001;top:50%;left:50%;right:auto;bottom:auto;
 transform:translate(-50%,-50%);margin:0;
 width:min(960px,calc(100vw - 44px));max-width:calc(100vw - 24px);
 height:auto;min-height:0;max-height:min(900px,calc(100dvh - 40px));
 display:flex;flex-direction:column;
 border-radius:19px;overflow:hidden;
 box-shadow:0 24px 90px rgba(12,35,23,.3);
 animation:none;
}
.order-drawer--centered .order-drawer-head{
 gap:12px;padding:13px 22px;min-height:60px;
}
.order-drawer--centered .order-drawer-head h3{
 font-size:20px;flex:0 1 auto;
}
.order-drawer--centered .drawer-quick-status{
 display:flex;align-items:center;justify-content:flex-end;
 margin:0 0 0 auto;flex:0 0 auto;
}
.order-drawer--centered .drawer-quick-status .chip{
 white-space:nowrap;padding:6px 10px;
}
.order-drawer--centered .drawer-close{
 flex:0 0 32px;margin:0;
}
.order-drawer--centered .order-drawer-content{
 flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
 padding:14px 22px 10px;overscroll-behavior-y:contain;
}
.order-drawer--centered .drawer-quick-facts{
 padding:10px 0;margin:0 0 10px;
}
.order-drawer--centered .drawer-quick-fact{
 padding:2px 16px;gap:3px;
}
.order-drawer--centered .drawer-quick-notes{
 padding:10px 15px;margin:0 0 13px;
}
.order-drawer--centered .drawer-quick-notes p{
 margin-top:4px;line-height:1.4;
}
.order-drawer--centered h4{
 margin:0 0 9px;font-size:15px;
}
.order-drawer--centered .drawer-quick-products{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px;overflow:visible;
 border:none;border-radius:0;background:transparent;
}
.order-drawer--centered .drawer-quick-item{
 display:grid;grid-template-columns:34px minmax(0,1fr) auto;
 min-width:0;min-height:51px;gap:8px;
 padding:6px 9px;border:1px solid var(--border);
 border-radius:10px;background:var(--surface);
}
.order-drawer--centered .drawer-quick-item:last-child{
 border-bottom:1px solid var(--border);
}
.order-drawer--centered .drawer-quick-img{
 width:34px;height:34px;
}
.order-drawer--centered .drawer-quick-name{
 font-size:12px;line-height:1.28;
}
.order-drawer--centered .drawer-quick-amount{
 max-width:102px;gap:3px;
}
.order-drawer--centered .drawer-quick-amount strong{
 font-size:13px;
}
.order-drawer--centered .drawer-quick-amount small{
 font-size:10.5px;
}
.order-drawer--centered .drawer-quick-empty{
 grid-column:1/-1;
}
.order-drawer--centered .drawer-extras{
 margin:8px 0 0;
}
.order-drawer--centered .order-drawer-actions{
 flex:0 0 auto;margin:0;padding:10px 22px 13px;
}
.order-drawer--centered .order-drawer-actions .btn.primary{
 min-height:46px;font-size:15px!important;
}
@media(max-width:830px){
 .order-drawer--centered .drawer-quick-products{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
 .order-drawer.order-drawer--minimal.order-drawer--centered{
  width:calc(100vw - 34px);
  max-height:calc(100dvh - 32px);
 }
}
@media(max-width:600px){
 .order-drawer--centered .order-drawer-head{
  padding:11px 13px;gap:8px;min-height:55px;
 }
 .order-drawer--centered .order-drawer-head h3{
  font-size:16px;
 }
 .order-drawer--centered .drawer-quick-status .chip{
  padding:5px 7px;font-size:10px;
 }
 .order-drawer--centered .order-drawer-content{
  padding:11px 13px 7px;
 }
 .order-drawer--centered .drawer-quick-fact{
  padding:2px 9px;
 }
 .order-drawer--centered .drawer-quick-fact strong{
  font-size:12px;
 }
 .order-drawer--centered .drawer-quick-products{
  grid-template-columns:1fr;
  gap:5px;
 }
 .order-drawer--centered .drawer-quick-item{
  min-height:45px;
 }
 .order-drawer--centered .order-drawer-actions{
  padding:9px 13px 12px;
 }
}
@media(max-height:700px) and (min-width:601px){
 .order-drawer--centered .order-drawer-content{
  padding-top:9px;
 }
 .order-drawer--centered .drawer-quick-facts{
  padding:7px 0;margin-bottom:8px;
 }
 .order-drawer--centered .drawer-quick-notes{
  padding:8px 12px;margin-bottom:9px;
 }
 .order-drawer--centered .drawer-quick-item{
  min-height:45px;padding:4px 8px;
 }
 .order-drawer--centered .drawer-quick-img{
  width:30px;height:30px;
 }
}


/* SUMATORIOS · asistente de cuatro pasos. Estilos aislados a esta vista. */
.sum-wizard{min-width:0;padding-bottom:22px}
.sum-wizard .page-heading{margin-bottom:18px}
.sum-progress{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;
 max-width:970px;margin:8px auto 22px;align-items:start;
}
.sum-progress-step{
 display:flex;flex-direction:column;align-items:center;gap:7px;
 border:0;background:transparent;color:var(--muted);
 padding:2px;min-width:0;font-size:13px;font-weight:700;
}
.sum-progress-step:disabled{opacity:1;cursor:default}
.sum-step-number{
 width:43px;height:43px;border-radius:50%;
 display:grid;place-items:center;background:color-mix(in srgb,var(--border) 65%,var(--surface));
 color:var(--muted);font-size:17px;font-weight:850;
 border:2px solid transparent;
}
.sum-progress-step.active,.sum-progress-step.done{color:var(--text)}
.sum-progress-step.active .sum-step-number,
.sum-progress-step.done .sum-step-number{
 color:#fff;background:linear-gradient(145deg,#1f9850,#096432);
 box-shadow:0 2px 6px #1d70301f;
}
.sum-progress-step.done{cursor:pointer}
.sum-progress-step.done:hover .sum-step-number{transform:translateY(-1px)}
.sum-stage{
 min-width:0;border:1px solid #cfe7d5;
 background:linear-gradient(145deg,color-mix(in srgb,var(--soft) 24%,var(--surface)),var(--surface));
 border-radius:15px;padding:20px;
}
.sum-stage-title{
 display:flex;align-items:center;gap:14px;min-width:0;
 margin-bottom:17px;
}
.sum-stage-icon{
 display:grid;place-items:center;flex:0 0 55px;width:55px;height:55px;
 border-radius:13px;background:var(--soft);color:var(--primary);
 font-size:29px;font-weight:750;
}
.sum-stage-title>div{min-width:0}
.sum-stage-title h3{margin:0 0 4px;color:var(--text);font-size:19px;line-height:1.25;font-weight:850}
.sum-stage-title p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}
.sum-date-fields{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;
}
.sum-date-fields .field{min-width:0}
.sum-date-fields label{display:block;font-size:14px;font-weight:750;margin-bottom:7px}
.sum-date-fields input[type=date]{
 display:block;width:100%;max-width:100%;min-width:0;
 height:54px;padding:11px 13px;border-radius:11px;
 border:1px solid var(--border);background:var(--surface);
 color:var(--text);font-size:16px;
}
.sum-date-fields input[type=date]:focus{outline:2px solid var(--primary);outline-offset:2px}
.sum-warning{color:var(--red);font-weight:750;font-size:13px;margin:12px 0 0}
.sum-upcoming{
 display:flex;align-items:center;justify-content:space-between;
 gap:10px;margin-top:12px;padding:17px 19px;
 border:1px solid var(--border);border-radius:13px;
 color:var(--muted);background:var(--bg);
}
.sum-upcoming span{font-weight:750;font-size:15px}
.sum-upcoming small{font-size:12px}
.sum-footer{
 margin-top:16px;padding-top:17px;border-top:1px solid var(--border);
 display:flex;justify-content:flex-end;
}
.sum-wizard .sum-next,.sum-wizard .sum-generate-btn,.sum-wizard .sum-print-btn{
 min-height:49px;font-size:15px;font-weight:800;border-radius:11px;
 padding:11px 24px;
}
.sum-next{min-width:180px}
.sum-overview{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;
 margin:0 0 18px;
}
.sum-overview-item{
 min-width:0;padding:12px 14px;
 border:1px solid var(--border);border-radius:12px;
 background:var(--surface);
}
.sum-overview-item small{
 display:block;color:var(--muted);font-size:12px;margin-bottom:4px;
}
.sum-overview-item strong{
 display:block;color:var(--text);font-size:14px;
 font-weight:800;line-height:1.3;overflow-wrap:anywhere;
}
.sum-manage-actions{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 15px}
.sum-manage-actions .btn{min-height:41px;padding:8px 13px;font-size:13px}
.sum-manage-panel{
 background:var(--surface);border:1px solid var(--border);
 padding:13px;border-radius:12px;margin-bottom:12px;
}
.sum-manage-panel label{
 display:block;font-size:13px;font-weight:800;margin-bottom:8px;color:var(--text);
}
.sum-manage-row{display:flex;align-items:stretch;gap:10px;flex-wrap:wrap}
.sum-manage-row select{
 flex:1 1 240px;min-width:0;min-height:43px;padding:9px 11px;
 color:var(--text);background:var(--surface);
 border:1px solid var(--border);border-radius:9px;
}
.sum-manage-row .btn{min-height:43px}
.sum-products{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
 gap:12px;min-width:0;
}
.sum-group-card{
 position:relative;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:10px;
 min-width:0;min-height:164px;padding:13px 9px;
 border:1px solid var(--border);border-radius:13px;
 background:var(--surface);color:var(--text);
 text-align:center;cursor:pointer;transition:border-color .15s ease,background .15s ease;
}
.sum-group-card:hover{border-color:var(--primary)}
.sum-group-card.selected{
 border:2px solid var(--primary);background:color-mix(in srgb,var(--soft) 38%,var(--surface));
}
.sum-group-card strong{
 font-size:14px;line-height:1.3;font-weight:800;overflow-wrap:anywhere;
}
.sum-group-img{
 display:grid;place-items:center;width:82px;height:82px;
 max-width:100%;flex:0 0 auto;
}
.sum-group-img img{width:100%;height:100%;object-fit:contain}
.sum-group-emoji{font-size:56px;line-height:1}
.sum-group-check{
 display:none;position:absolute;top:8px;right:8px;
 width:22px;height:22px;border-radius:50%;
 background:var(--primary);color:#fff;
 font-size:14px;font-weight:800;place-items:center;
}
.sum-group-card.selected .sum-group-check{display:grid}
.sum-empty{
 padding:18px;margin:0;border:1px dashed var(--border);
 border-radius:11px;background:var(--surface);
 color:var(--muted);font-size:13px;line-height:1.45;
}
.sum-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sum-type-card{
 min-width:0;min-height:117px;display:grid;
 grid-template-columns:minmax(0,1fr) 22px;
 align-items:center;gap:12px;padding:13px;
 border:1px solid var(--border);border-radius:13px;
 background:var(--surface);color:var(--text);
 text-align:left;cursor:pointer;
}
.sum-type-card.selected{
 border:2px solid var(--primary);
 background:color-mix(in srgb,var(--soft) 34%,var(--surface));
}
.sum-type-card>span:first-child{min-width:0}
.sum-type-card strong{
 display:block;font-size:17px;font-weight:850;margin-bottom:5px;
}
.sum-type-card small{
 display:block;font-size:12px;color:var(--muted);
 line-height:1.45;
}
.sum-type-icon{
 width:51px;height:51px;border-radius:12px;background:var(--soft);
 color:var(--primary);display:grid;place-items:center;
 font-size:30px;font-weight:750;
}
.sum-type-icon.sum-type-blue{color:#1674b5;background:#e7f3ff}
.sum-radio{
 width:20px;height:20px;border-radius:50%;border:2px solid #adb9c6;
 align-self:start;margin-top:1px;
}
.sum-type-card.selected .sum-radio{
 border:6px solid var(--primary);
}
.sum-generate-actions{
 display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:16px 0 4px;
}
.sum-generate-btn{min-width:218px}
.sum-print-btn{min-width:150px}
.sum-result{
 background:var(--surface);border:1px solid var(--border);
 border-radius:14px;margin-top:17px;padding:15px;
}
.sum-result h3{margin:0 0 4px;color:var(--text);font-size:17px}
.sum-result p{margin:0 0 13px;color:var(--muted);font-size:13px}
.sum-result-table-wrap{width:100%;min-width:0;overflow-x:auto;border:1px solid var(--border);border-radius:11px}
.sum-result-table{
 width:100%;border-collapse:collapse;font-size:13px;color:var(--text);
}
.sum-result-table thead{
 background:color-mix(in srgb,var(--soft) 40%,var(--surface));
}
.sum-result-table th{
 font-weight:800;font-size:13px;text-align:left;padding:11px 12px;
}
.sum-result-table th:last-child{text-align:right}
.sum-result-table td{
 padding:10px 12px;border-top:1px solid var(--border);
 overflow-wrap:anywhere;vertical-align:middle;
}
.sum-result-table tr{break-inside:avoid}
.sum-result-table td.sum-qty-cell{text-align:right;white-space:nowrap;font-weight:650}
.sum-result-table td.sum-client-cell{font-weight:800}
.sum-result-table td.sum-qty-cell strong{font-size:14px;color:var(--primary)}
@media(max-width:1160px){
 .sum-wizard .page-heading{gap:11px}
 .sum-stage{padding:17px}
 .sum-products{gap:9px}
 .sum-group-card{min-height:155px}
}
@media(max-width:1050px){
 .sum-products{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sum-types{grid-template-columns:minmax(0,1fr)}
 .sum-type-card{min-height:100px}
}
@media(max-width:650px){
 .sum-wizard{padding-left:11px;padding-right:11px}
 .sum-stage{padding:12px}
 .sum-stage-title{gap:9px}
 .sum-stage-icon{width:42px;height:42px;flex-basis:42px;font-size:23px}
 .sum-stage-title h3{font-size:16px}
 .sum-progress{gap:2px}
 .sum-progress-step{font-size:11px;gap:5px}
 .sum-step-number{width:33px;height:33px;font-size:14px}
 .sum-date-fields{grid-template-columns:minmax(0,1fr);gap:10px}
 .sum-date-fields input[type=date]{height:47px;font-size:14px}
 .sum-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .sum-overview-item{padding:9px}
 .sum-overview-item strong{font-size:12px}
 .sum-group-img{width:64px;height:64px}
 .sum-group-card{min-height:133px;padding:10px 5px;gap:6px}
 .sum-group-card strong{font-size:12px}
 .sum-types{gap:8px}
 .sum-type-card{grid-template-columns:minmax(0,1fr) 19px;padding:9px;gap:9px}
 .sum-type-icon{width:42px;height:42px;font-size:23px}
 .sum-type-card strong{font-size:15px}
 .sum-footer .sum-next{width:100%}
 .sum-generate-actions .btn{flex:1 1 180px;min-width:0}
 .sum-result{padding:10px}
 .sum-result-table th,.sum-result-table td{padding:9px 7px;font-size:11px}
 .sum-result-table td.sum-qty-cell strong{font-size:12px}
}
/* Ticket térmico aprobado · únicamente impresión de sumatorios, sin alterar la interfaz. */
/* Tamaño ajustado al rollo de 110 mm (104 mm útiles), con páginas de 20 cm;
   si hay más artículos, el navegador continúa sin cortar filas de productos. */
@page sum-ticket-roll{size:110mm 200mm;margin:3mm}
@media print{
 body.printing:has(#printSheet .sum-thermal-ticket) #printSheet{
  page:sum-ticket-roll;
  width:104mm;max-width:104mm;
  margin:0!important;padding:0!important;
  color:#000!important;background:#fff!important;
  font-family:Arial,Helvetica,sans-serif!important;
 }
 #printSheet .sum-thermal-ticket,
 #printSheet .sum-thermal-ticket *{box-sizing:border-box}
 #printSheet .sum-thermal-ticket{
  width:100%;max-width:104mm;min-width:0;
  font-family:Arial,Helvetica,sans-serif;color:#000;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
 }
 #printSheet .sum-tk-brand{
  display:flex;align-items:center;justify-content:center;gap:2mm;
  font-size:12.5pt;font-weight:900;letter-spacing:.055em;
  text-align:center;white-space:nowrap;margin:1mm 0 3mm;
 }
 #printSheet .sum-tk-brand::before,
 #printSheet .sum-tk-brand::after{
  content:"";display:block;flex:1 1 auto;min-width:2mm;
  border-top:.45mm solid #000;
 }
 #printSheet .sum-tk-banner{
  background:#000!important;color:#fff!important;
  border:.45mm solid #000;border-radius:2mm;
  text-align:center;font-size:21pt;font-weight:900;
  line-height:1.08;letter-spacing:.015em;
  padding:2mm 1.5mm;margin:0 0 1.8mm;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
 }
 #printSheet .sum-tk-items{
  display:flex;flex-direction:column;gap:1.3mm;
 }
 #printSheet .sum-tk-line{
  display:grid;grid-template-columns:minmax(0,1fr) 39mm;
  min-height:11mm;border:.4mm solid #000;border-radius:1.9mm;
  overflow:hidden;break-inside:avoid;page-break-inside:avoid;
  background:#fff;color:#000;
 }
 #printSheet .sum-tk-name{
  min-width:0;display:flex;align-items:center;
  padding:1.65mm 2mm;
  font-size:12pt;line-height:1.08;font-weight:800;
  overflow-wrap:anywhere;
 }
 #printSheet .sum-tk-value{
  display:grid;grid-template-columns:14.5mm minmax(0,1fr);
  gap:1.5mm;align-items:center;min-width:0;
  border-left:.25mm solid #000;padding:1mm 1.4mm;
 }
 #printSheet .sum-tk-number{
  display:block;text-align:right;font-size:19pt;
  line-height:1;font-weight:900;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
 }
 /* Una sola tipografía y tamaño fijo para TODAS las unidades.
    No comprimir «MANOJOS» ni aumentar «CAJAS». */
 #printSheet .sum-tk-unit{
  display:block;font-size:9.5pt;font-weight:800;
  line-height:1;white-space:nowrap;letter-spacing:0;
  font-stretch:normal;text-align:left;
 }
 /* Separar solo pedidos de distintos clientes, no sus productos. */
 #printSheet .sum-tk-client{
  border:.4mm solid #000;border-radius:1.9mm;
  overflow:hidden;margin:0 0 3mm;
  break-inside:avoid;page-break-inside:avoid;
  background:#fff;
 }
 #printSheet .sum-tk-client:last-child{margin-bottom:0}
 #printSheet .sum-tk-client-name{
  background:#ececec!important;color:#000!important;
  margin:0;padding:1.8mm 2mm;
  font-family:Arial,Helvetica,sans-serif;
  font-size:11.5pt;font-weight:900;line-height:1.15;
  border-bottom:.25mm solid #000;
  overflow-wrap:anywhere;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
 }
 #printSheet .sum-tk-client-lines .sum-tk-line{
  border:0;border-radius:0;min-height:10mm;
 }
 #printSheet .sum-tk-client-lines .sum-tk-line + .sum-tk-line{
  border-top:.23mm solid #000;
 }
 #printSheet .sum-tk-client-lines .sum-tk-name{
  font-size:11pt;padding:1.5mm 2mm;
 }
 #printSheet .sum-tk-client-lines .sum-tk-number{font-size:18pt}
 #printSheet .sum-tk-empty{
  font-size:11pt;padding:4mm 2mm;text-align:center;
 }
}
