/* Vending only — shared Aveltrim tokens, no changes to OCPP views. */
.av-admin .page.vm-page{max-width:none;width:100%;min-width:0;margin:0;padding-top:24px}
.vm-page,.vm-page *,.vm-dialog,.vm-dialog *{box-sizing:border-box}
.vm-page .vm-toolbar{align-items:center;gap:16px;margin-bottom:20px}
.vm-page .vm-toolbar p{margin:0;font-size:14px;line-height:1.55}
.vm-page .vm-head{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:16px;margin-bottom:20px}
.vm-page .vm-head>button{justify-self:start}
.vm-page .vm-field{display:grid;gap:7px;min-width:0;align-content:start;font-size:14px;line-height:1.4}
.vm-page .vm-field select{display:block;width:100%;min-width:0;max-width:100%;margin:0;min-height:44px;font-size:14px;padding-right:38px}
.vm-page .vm-head>.vm-field{width:min(100%,360px)}
.vm-page .vm-help{font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.vm-page .card{padding:24px;min-width:0}
.vm-page .vm-kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,115px),1fr));gap:10px}
.vm-page .vm-kpis div{padding:12px;min-width:0}
.vm-page .vm-kpis small{font-size:12px;line-height:1.4;margin-bottom:6px}
.vm-page .vm-kpis strong{font-size:18px;overflow-wrap:anywhere}
.vm-page .vm-sales-kpis{min-width:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.vm-page button.action,.vm-page [data-reload]{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 15px;border:1px solid var(--av-line,#dde4e0);border-radius:var(--av-r-sm,8px);background:#fff;color:var(--av-ink,#121a1d);font-size:14px;font-weight:650;cursor:pointer;white-space:normal}
.vm-page button.action:hover,.vm-page [data-reload]:hover{background:var(--av-paper,#f4f6f5);border-color:var(--av-field,#8b9a94)}
.vm-page button.action.danger{color:var(--av-red,#b42318);background:var(--av-red-wash,#fdecea)}
.vm-page .table{overflow-x:auto;max-width:100%;margin-top:12px}
.vm-page .table th{font-size:12px;line-height:1.4;padding:12px;text-align:left}
.vm-page .table td{font-size:14px;line-height:1.5;padding:14px 12px;vertical-align:middle;overflow-wrap:anywhere}
.vm-page .table td.empty{text-align:center;padding:38px 16px;color:var(--av-muted,#5d6b66)}
.vm-page .vm-stock{min-width:1050px}
.vm-page .vm-stock select{min-width:210px;max-width:320px;margin:0;padding-right:38px}
.vm-page .vm-stock input{min-height:44px;font-size:14px}
.vm-page .vm-stock td:last-child{white-space:nowrap}
.vm-page .vm-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr))}
.vm-page .vm-card{min-width:0;padding:22px;gap:14px}
.vm-page .vm-card h3{overflow-wrap:anywhere}
.vm-page .vm-card p{font-size:14px;line-height:1.5}
.vm-page .vm-empty{display:grid;justify-items:center;text-align:center;gap:10px;padding:28px 16px;color:var(--av-muted,#5d6b66)}
.vm-page .vm-empty svg{width:42px;height:42px;color:var(--av-leaf-deep,#1f7f31)}
.vm-page .vm-empty strong{font-size:16px;color:var(--av-ink,#121a1d)}
.vm-page .vm-empty p{margin:0;max-width:440px;font-size:14px;line-height:1.6}
.vm-page .vm-doc{margin-top:24px;border-top:1px solid var(--av-line,#dde4e0);padding-top:16px}
.vm-page .vm-doc summary{cursor:pointer;font-weight:650;padding:8px 0}
.vm-page .vm-code{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;padding:16px}
.vm-page .avvmdb-head{align-items:end;gap:20px}
.vm-page .avvmdb-tools{display:grid;grid-template-columns:minmax(190px,1fr) minmax(165px,1fr) auto;align-items:end;gap:12px}
.vm-page .avvmdb-tools select{min-width:0;width:100%}
.vm-page .avvmdb-kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr))}
.vm-page .avvmdb-kpi{padding:20px;display:flex;flex-direction:column;gap:6px}
.vm-page .avvmdb-kpi strong{font-size:clamp(21px,2vw,28px);overflow-wrap:anywhere;margin:0}
.vm-page .avvmdb-kpi>span{font-size:12px;line-height:1.4;min-height:2.8em}
.vm-page .avvmdb-kpi small{margin-top:auto}
.vm-page .vm-env{padding:16px 20px;border-left:4px solid var(--av-leaf,#279a34);display:grid;gap:5px}
.vm-page .vm-env .sub{margin:0;line-height:1.5}
.vm-page .vm-env [data-state]{font-size:13px;color:var(--av-muted,#5d6b66)}
.vm-page .vm-chart-empty{min-height:210px;align-content:center}
.vm-page .avvmdb-last .vm-empty{display:grid;grid-template-columns:1fr;justify-items:center;border:0}
.av-ui .av-form-dialog.vm-dialog{width:min(600px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto}
.av-ui .vm-dialog .av-form{padding:28px;gap:20px}
.av-ui .vm-dialog .av-form-fields{gap:16px;min-width:0}
.av-ui .vm-dialog .av-form-fields>label{min-width:0;display:grid;gap:8px;font-size:14px}
.av-ui .vm-dialog .av-form-fields select{min-width:0;max-width:100%;padding-right:38px}
.av-ui .vm-dialog .av-form-help{font-size:13px;line-height:1.55;margin-top:-8px}
.av-ui .vm-dialog .av-form-copy input{min-width:0;flex:1}
@media(max-width:900px){.vm-page .avvmdb-tools{width:100%}.vm-page .avvmdb-row{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.vm-page .avvmdb-tools{grid-template-columns:minmax(0,1fr)}.vm-page .card,.vm-page .avvmdb-card{padding:16px}.vm-page .vm-toolbar{align-items:stretch}.av-ui .vm-dialog .av-form{padding:18px}.vm-page .vm-card{padding:16px}}
.vm-page .vm-machine-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 18px}.vm-machine-toolbar h3{margin:0;font-size:20px}.vm-page .vm-machine-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin-bottom:20px}.vm-machine-totals>div{background:#fff;border:1px solid var(--av-line,#dde4e0);border-radius:14px;padding:18px}.vm-machine-totals small{display:block;color:#5d6b66;font-size:13px}.vm-machine-totals strong{display:block;font-size:26px;margin-top:5px}.vm-page .vm-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,390px),1fr));align-items:start}.vm-page .vm-machine-card{max-width:640px;width:100%}.vm-machine-summary{display:grid;grid-template-columns:84px minmax(0,1fr);gap:18px;align-items:center}.vm-machine-art{background:#f4f6f5;border-radius:12px;padding:8px}.vm-machine-art svg{display:block;width:100%;height:auto}.vm-machine-info{display:grid;gap:6px;min-width:0}.vm-machine-info h3{font-size:20px}.vm-machine-tags{display:flex;gap:6px;flex-wrap:wrap}.vm-machine-tags .status{display:inline-flex;width:auto;max-width:100%;align-self:start}.vm-page .vm-machine-state{border-top:1px solid #dde4e0;padding-top:12px}.vm-qr-dialog{border:1px solid #dde4e0;border-radius:18px;width:min(440px,calc(100% - 28px));padding:24px;color:#121a1d;background:white}.vm-qr-dialog::backdrop{background:#121a1d88}.vm-qr-content{display:grid;gap:14px}.vm-qr-content h3,.vm-qr-content p{margin:0}.vm-qr-content p{color:#5d6b66;line-height:1.5}.vm-qr-content img{display:block;max-width:100%;height:auto;justify-self:center}.vm-qr-content label{display:grid;gap:6px}.vm-qr-content input{width:100%;min-width:0}.vm-qr-content form{text-align:right}

/* 18.4 — controles exclusivos do módulo Vending */
.vm-page .vm-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px}.vm-icon{width:17px;height:17px;flex:none}.vm-machine-card .vm-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.vm-machine-card .vm-actions [data-vm="localcontrol"]{grid-column:1/-1}.vm-control-status{display:grid;gap:16px}.vm-control-connection{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid #dde4e0;border-radius:12px;background:#f4f6f5}.vm-control-connection small{display:block;color:#5d6b66;margin-top:4px}.vm-signal{width:12px;height:12px;background:#8a9893;border-radius:50%;flex:none}.vm-signal.live{background:#279a34;animation:vm-pulse 2s infinite}.vm-control-status dl{margin:0;display:grid;gap:0}.vm-control-status dl>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #dde4e0}.vm-control-status dt{color:#5d6b66}.vm-control-status dd{margin:0;font-weight:600;text-align:right}.vm-control-status p{margin:0;padding:12px;background:#f4f6f5;border-radius:8px;color:#5d6b66;line-height:1.5;font-size:13px}@keyframes vm-pulse{0%,100%{box-shadow:0 0 0 0 #279a3440}50%{box-shadow:0 0 0 6px #279a3400}}@media(prefers-reduced-motion:reduce){.vm-signal.live{animation:none}}
/* 19.1 — estoque comercial */
.vm-stock-commercial .vm-machine-toolbar{align-items:end}.vm-stock-commercial h3{margin:18px 0 12px}.vm-cs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:14px}.vm-cs-slot{border:1px solid var(--av-line,#dde4e0);border-radius:12px;padding:16px;display:grid;gap:12px;min-width:0}.vm-cs-top{display:flex;align-items:center;gap:12px;min-width:0}.vm-cs-top>span{background:#edf2ef;border-radius:9px;padding:14px;font-weight:700}.vm-cs-top>div{min-width:0;overflow-wrap:anywhere}.vm-cs-top small,.vm-cs-slot>small{display:block;color:#5d6b66;margin-top:4px}.vm-cs-slot button{width:100%}.vm-stock-commercial .vm-field{min-width:min(100%,250px)}.vm-stock-commercial .table{overflow:auto}

/* Estoque 2.0 — escopo comercial */
.vm2 .vm2-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}.vm2 .vm2-toolbar h3{margin:0 0 4px}.vm2 .vm2-toolbar small{color:#61716a}.vm2-toggle{display:flex;gap:6px}.vm2-toggle button[aria-pressed=true]{background:#e5f3e8;color:#17682b;border-color:#75ac80}.vm2-map{background:#172528;border-radius:16px;padding:18px;display:grid;gap:18px}.vm2-shelf h4{color:#dce8e2;margin:0 0 10px;font-size:13px;letter-spacing:.04em}.vm2-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,185px),1fr));gap:12px}.vm2-slot{background:#fff;border-radius:12px;padding:12px;display:grid;gap:8px;min-width:0;color:#172528;border-top:4px solid #299a42}.vm2-slot.low{border-top-color:#d79b20}.vm2-slot.empty{border-top-color:#c85349}.vm2-slot-head{display:flex;justify-content:space-between;align-items:center;gap:6px}.vm2-slot-head span{font-size:11px;color:#51645a}.vm2-slot strong{overflow-wrap:anywhere}.vm2-slot small{color:#61716a;font-size:12px}.vm2-photo{height:108px;background:#f5f8f6;border-radius:8px;display:grid;place-items:center;overflow:hidden}.vm2-photo img{width:100%;height:108px;object-fit:contain}.vm2-placeholder{color:#8da099}.vm2-placeholder svg{width:38px;height:38px}.vm2-actions{display:flex;gap:6px;align-items:stretch}.vm2-actions button:first-child{flex:1;min-width:0}.vm2-actions button{margin:0}.vm2-slot.low .vm-bar i{background:#d79b20}.vm2-list .vm2-map{background:#f2f5f3}.vm2-list .vm2-shelf h4{color:#344840}.vm2-list .vm2-grid{grid-template-columns:1fr}.vm2-list .vm2-slot{grid-template-columns:100px 65px minmax(100px,1fr) minmax(100px,1fr);align-items:center}.vm2-list .vm2-photo,.vm2-list .vm2-photo img{height:58px}.vm2-list .vm2-actions{grid-column:3/5}.vm2-list .vm2-slot-head{flex-direction:column;align-items:start}@media(max-width:600px){.vm2-map{padding:10px}.vm2-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.vm2-slot{padding:9px}.vm2-actions{flex-wrap:wrap}.vm2-actions button:first-child{flex-basis:100%}.vm2-list .vm2-slot{grid-template-columns:65px minmax(0,1fr)}.vm2-list .vm2-actions{grid-column:1/-1}.vm2-list .vm2-slot-head{grid-column:1/-1;flex-direction:row}.vm2-slot-head{flex-wrap:wrap}.vm2 .vm-machine-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.vm2 .vm-machine-totals>div{padding:12px}.vm2 .vm-machine-totals strong{font-size:20px;overflow-wrap:anywhere}}
/* 20.5 — gabinete lógico, limitado ao módulo comercial */
.vm2 .vm2-map{width:fit-content;max-width:100%;margin:12px auto 24px;border:7px solid #263638;box-shadow:0 8px 20px #17252820;overflow:auto}.vm2 .vm2-grid{grid-template-columns:repeat(auto-fit,minmax(150px,180px));display:flex;flex-wrap:wrap;gap:10px}.vm2 .vm2-slot,.vm2-empty-position{width:175px;max-width:100%;flex:none}.vm2 .vm2-shelf{border-bottom:5px solid #536563;padding-bottom:10px}.vm2-machine-header{display:flex;align-items:center;justify-content:space-between;gap:20px;color:white;background:#294043;padding:12px;border-radius:8px}.vm2-machine-header small{color:#c4ddd1}.vm2-pickup{color:#b7ccca;text-align:center;border:2px solid #526563;background:#0b1517;padding:12px;border-radius:9px;margin:4px auto;width:70%;font-size:11px;letter-spacing:1px}.vm2-empty-position{min-height:180px;background:#26383a;color:#c0d1ce;border:1px dashed #708986;border-radius:10px;display:grid;place-items:center;align-content:center;gap:12px}.vm2-empty-position:hover{background:#34524b}.vm2-filters{display:flex;gap:10px;flex-wrap:wrap}.vm2-filters input{flex:1;min-width:140px}.vm2-filters select{width:auto}.vm2 [hidden]{display:none!important}.vm2-list .vm2-map{width:100%;border:0;box-shadow:none}.vm2-list .vm2-grid{display:grid;grid-template-columns:1fr}.vm2-list .vm2-slot{width:100%}.vm2-list .vm2-machine-header,.vm2-list .vm2-pickup{display:none}.vm2-list .vm2-empty-position{width:100%;min-height:60px}.vm2-list .vm2-shelf{border:0}.vm2 .vm2-actions button{padding:7px;min-width:0}.vm2 .vm2-actions button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:600px){.vm2 .vm2-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.vm2 .vm2-slot,.vm2-empty-position{width:100%}.vm2-list .vm2-grid{grid-template-columns:1fr}.vm2 .vm2-map{width:100%;border-width:4px}.vm2-machine-header{flex-wrap:wrap}}
/* 20.6 Stock Studio — scoped to commercial stock */
.vm-studio{--studio-green:#21843c;--studio-line:#dce5df}.vm-studio .vm-machine-totals{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.vm-studio .vm-machine-totals>div{padding:14px;border-radius:12px}.vm-studio .vm-machine-totals strong{font-size:22px;overflow-wrap:anywhere}.vm-studio .primary,.vm-studio-dialog .primary{background:#21843c!important;color:white!important;border:1px solid #21843c!important}.vm-studio-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(235px,290px);gap:18px;align-items:start;margin:16px 0 24px}.vm-studio .vm2-map{width:100%;margin:0;box-sizing:border-box;border:1px solid #263638;border-radius:15px;padding:16px;box-shadow:none;gap:14px}.vm-studio .vm2-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr));gap:9px}.vm-studio .vm2-slot,.vm-studio .vm2-empty-position{width:100%;min-height:155px;height:100%;box-sizing:border-box;padding:10px;transition:background .18s,border-color .18s,box-shadow .18s;text-align:left}.vm-studio .vm2-slot{border:2px solid transparent;align-content:start;gap:5px;position:relative}.vm-studio .vm2-slot[aria-pressed=true]{border-color:#2e6cf6;box-shadow:0 0 0 3px #2e6cf633;background:#f6f8ff}.vm-studio .vm2-slot[aria-pressed=true]::after{content:'Selecionada';position:absolute;top:8px;right:8px;padding:3px 8px;border-radius:999px;background:#2e6cf6;color:#fff;font-size:10px;font-weight:700;letter-spacing:.02em}.vm-studio .vm2-slot:hover{border-color:#9eb7f8}.vm-studio .vm2-slot strong{font-size:12px;line-height:1.3}.vm-studio .vm2-photo,.vm-studio .vm2-photo img{height:64px}.vm-studio .vm2-empty-position{align-content:center;text-align:center;gap:6px}.vm-studio .vm2-shelf{border-bottom:2px solid #536563;padding-bottom:12px}.vm-studio .vm2-pickup{padding:8px}.vm-studio-detail{border:1px solid #dce5df;background:white;border-radius:14px;padding:18px;min-width:0}.vm-studio-detail>small,.vm-studio-selected-label{font-weight:700;font-size:11px;letter-spacing:.07em;color:#527061}.vm-studio-selected-slot{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 12px;margin-top:8px;border-radius:999px;background:#ebf1ff;color:#1f4fd1;font-weight:800;font-size:15px}.vm-studio-product-photo{height:145px;display:grid;place-items:center;background:#f3f6f4;border-radius:10px;margin:14px 0}.vm-studio-product-photo img{max-width:100%;height:135px;object-fit:contain}.vm-studio-detail h3{margin:10px 0 5px;overflow-wrap:anywhere}.vm-studio-detail p{color:#52665c}.vm-studio-detail dl{margin:14px 0}.vm-studio-detail dl div{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #edf1ee;padding:10px 0}.vm-studio-detail dd{margin:0;font-weight:700}.vm-studio-buttons{display:grid;gap:8px}.vm-studio-buttons button{min-height:42px;display:flex;align-items:center;justify-content:center;gap:6px}.vm-studio.vm2-list .vm2-grid{grid-template-columns:1fr}.vm-studio.vm2-list .vm2-slot{grid-template-columns:68px 64px minmax(80px,1fr) 70px;min-height:80px;align-items:center}.vm-studio.vm2-list .vm2-slot small{grid-column:3/5}.vm-studio.vm2-list .vm2-empty-position{min-height:54px}.vm-studio-dialog{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:100dvh;width:min(580px,100vw);max-width:100vw;box-sizing:border-box;border:0;border-left:1px solid #dce5df;background:#fff;color:#172528;padding:0;box-shadow:-15px 0 50px #17252822;overflow:auto}.vm-studio-dialog[open]{animation:studio-in .2s ease-out}.vm-studio-dialog::backdrop{background:#17252865}.vm-studio-dialog header{display:flex;justify-content:space-between;align-items:start;gap:15px;padding:24px;border-bottom:1px solid #dce5df;background:white;position:sticky;top:0;z-index:1}.vm-studio-dialog header small{color:#21843c;font-size:11px;font-weight:700;letter-spacing:.08em}.vm-studio-dialog h2{margin:6px 0;font-size:23px}.vm-studio-dialog header p{margin:0;color:#586b61;font-size:13px;line-height:1.5}.vm-studio-content{padding:22px;display:grid;gap:16px}.vm-studio-dialog button,.vm-studio-dialog input{font:inherit;border:1px solid #dce5df;border-radius:8px;background:#fff;padding:10px;color:#172528;min-width:0}.vm-studio-dialog button{cursor:pointer}.vm-studio-dialog button:disabled{opacity:.45;cursor:not-allowed}.vm-studio-dialog button:hover:not(:disabled){border-color:#21843c}.vm-studio-dialog :focus-visible,.vm-studio :focus-visible{outline:2px solid #21843c;outline-offset:2px}.vm-studio-note{background:#eef6f0;border:1px solid #dae9dd;border-radius:10px;padding:13px;color:#305d3c;font-size:13px}.vm-studio-shelf{border:1px solid #dce5df;border-radius:12px;padding:13px}.vm-studio-shelf>div:first-child{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.vm-studio-shelf b{margin-right:auto}.vm-studio-edit-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:8px;margin-top:12px}.vm-studio-edit-grid>div{display:flex;min-width:0}.vm-studio-edit-grid input{width:100%;box-sizing:border-box}.vm-studio-edit-grid input[readonly]{background:#eaf5ed;color:#236837}.vm-studio-dialog footer{display:flex;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid #dce5df}.vm-studio-error{color:#ac322c;margin:0;font-size:13px}.vm-studio-batch{display:grid;grid-template-columns:50px minmax(0,1fr) 80px;align-items:center;gap:12px;padding:12px;border:1px solid #dce5df;border-radius:10px}.vm-studio-batch img{width:50px;height:60px;object-fit:contain}.vm-studio-batch small,.vm-studio-catalog small{display:block;color:#586b61;margin-top:5px}.vm-studio-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px}.vm-studio-catalog button{display:grid;gap:8px;text-align:left;align-content:start}.vm-studio-catalog img,.vm-studio-catalog .vm2-placeholder{width:100%;height:105px;object-fit:contain;display:grid;place-items:center}.vm-studio-dialog [hidden]{display:none!important}@keyframes studio-in{from{transform:translateX(30px);opacity:.4}to{transform:none;opacity:1}}@media(max-width:1050px){.vm-studio-workspace{grid-template-columns:1fr}}@media(max-width:600px){.vm-studio .vm2-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.vm-studio.vm2-list .vm2-slot{grid-template-columns:60px minmax(0,1fr)}.vm-studio.vm2-list .vm2-slot small{grid-column:1/-1}.vm-studio-dialog header,.vm-studio-content{padding:16px}}@media(prefers-reduced-motion:reduce){.vm-studio-dialog[open]{animation:none}.vm-studio *{transition:none!important}}

/* 20.7 — isolate stock studio from global admin sidebar and constrain layout. */
.vm-page .vm-studio .vm-studio-workspace{grid-template-columns:minmax(0,1fr) minmax(0,300px);align-items:start;gap:20px;max-width:1200px;margin:16px auto 24px}
.vm-page .vm-studio .vm-studio-detail{position:static;inset:auto;transform:none;display:block;height:auto;min-height:0;max-height:none;width:100%;align-self:start;background:#fff;color:#172528;padding:18px;overflow:visible;box-shadow:0 2px 10px #17252809}
.vm-page .vm-studio .vm-studio-detail p{color:#52665c;margin:6px 0 14px}
.vm-page .vm-studio .vm-studio-detail h3{font-size:17px;line-height:1.4}
.vm-page .vm-studio .vm2-map{max-width:100%;min-width:0;overflow:hidden;align-content:start;background:#172528;padding:14px}
.vm-page .vm-studio .vm2-shelf{min-width:0;overflow-x:auto;padding-bottom:10px}
.vm-page .vm-studio .vm2-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(112px,148px);grid-template-columns:none;justify-content:start;gap:8px;align-items:stretch}
.vm-page .vm-studio .vm2-slot,.vm-page .vm-studio .vm2-empty-position{height:162px;min-height:162px;width:100%;max-width:none;margin:0;padding:9px;min-width:0;overflow:hidden}
.vm-page .vm-studio .vm2-slot{display:grid;grid-template-rows:auto 76px minmax(15px,1fr) 5px auto;gap:5px}
.vm-page .vm-studio .vm2-slot strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px}
.vm-page .vm-studio .vm2-photo,.vm-page .vm-studio .vm2-photo img{height:76px;width:100%;object-fit:contain}
.vm-page .vm-studio .vm2-empty-position{display:grid;place-content:center;background:#26383a;color:#d7e4de}
.vm-page .vm-studio .vm-machine-totals{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));max-width:1200px;margin:0 auto 20px}
.vm-page .vm-studio .vm-machine-totals>div{padding:12px 14px}
.vm-page .vm-studio .vm-machine-totals strong{font-size:20px}
.vm-page .vm-studio .vm-studio-product-photo{height:160px}
.vm-page .vm-studio .vm-studio-product-photo img{height:150px;width:100%;object-fit:contain}
.vm-page .vm-studio.vm2-list .vm2-grid{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:minmax(0,1fr)}
.vm-page .vm-studio.vm2-list .vm2-slot{height:auto;min-height:82px;grid-template-rows:auto auto;grid-template-columns:60px 76px minmax(0,1fr) 65px;align-items:center}
.vm-page .vm-studio.vm2-list .vm2-empty-position{height:auto;min-height:52px}
.vm-page .vm-studio [hidden]{display:none!important}
@media(max-width:1100px){.vm-page .vm-studio .vm-studio-workspace{grid-template-columns:minmax(0,1fr)}.vm-page .vm-studio .vm-studio-detail{max-width:none}}
@media(max-width:600px){.vm-page .vm-studio .vm-machine-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.vm-page .vm-studio.vm2-list .vm2-slot{grid-template-columns:60px minmax(0,1fr);grid-template-rows:auto}.vm-page .vm-studio.vm2-list .vm2-slot small{grid-column:1/-1}}

/* 20.8 — balanced metrics, non-clipping slots and accessible status legend */
.vm-page .vm-studio{container-type:inline-size}
.vm-page .vm-studio .vm-machine-totals{grid-template-columns:repeat(3,minmax(0,1fr));max-width:none;margin:16px 0;gap:8px}
.vm-page .vm-studio .vm-machine-totals>div{padding:9px 12px;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px}
.vm-page .vm-studio .vm-machine-totals small{margin:0;line-height:1.3}
.vm-page .vm-studio .vm-machine-totals strong{font-size:18px;white-space:nowrap}
.vm-page .vm-studio .vm-studio-workspace{max-width:none;margin:12px 0 20px;grid-template-columns:minmax(0,1fr) minmax(240px,280px);gap:14px}
.vm-page .vm-studio .vm2-grid{grid-auto-columns:minmax(112px,148px);gap:8px;align-items:stretch}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot,.vm-page .vm-studio:not(.vm2-list) .vm2-empty-position{height:auto;min-height:174px;overflow:visible}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot{grid-template-rows:auto 78px minmax(30px,auto) 5px auto;align-content:start;gap:5px}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot small{font-size:11px;line-height:1.3;white-space:normal;margin:0}
.vm-page .vm-studio:not(.vm2-list) .vm2-photo,.vm-page .vm-studio:not(.vm2-list) .vm2-photo img{height:78px;background:#fff}
.vm-page .vm-studio .vm2-slot.ok{border-top:3px solid #319847}.vm-page .vm-studio .vm2-slot.low{border-top:3px solid #d69b25}.vm-page .vm-studio .vm2-slot.empty{border-top:3px solid #c44a48}
.vm-page .vm-studio .vm2-map{gap:10px;padding:12px}.vm-page .vm-studio .vm2-shelf{padding-bottom:8px}.vm-page .vm-studio .vm2-shelf h4{margin-bottom:7px}
.vm-page .vm-studio .vm-studio-product-photo{height:136px;background:#fff;margin:10px 0}.vm-page .vm-studio .vm-studio-product-photo img{height:130px}
.vm-page .vm-studio .vm-studio-buttons .primary:disabled{background:#edf2ee!important;color:#53675a!important;border-color:#dce5df!important;opacity:1}
.vm-stock-legend{display:flex;align-items:center;gap:8px 15px;flex-wrap:wrap;margin:12px 0 0;color:#52665c;font-size:12px}.vm-stock-legend span{display:inline-flex;align-items:center;gap:5px}.vm-stock-legend i{width:9px;height:9px;border-radius:50%;background:#319847}.vm-stock-legend span:nth-child(2) i{background:#d69b25}.vm-stock-legend span:nth-child(3) i{background:#c44a48}.vm-stock-legend span:nth-child(4) i{background:#85958e}.vm-stock-legend small{margin-left:auto;font-size:11px}
@container (max-width:900px){.vm-page .vm-studio .vm-studio-workspace{grid-template-columns:minmax(0,1fr)}.vm-page .vm-studio .vm-machine-totals{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container (max-width:640px){.vm-page .vm-studio .vm-machine-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.vm-page .vm-studio .vm-machine-totals>div{display:grid;gap:4px}.vm-page .vm-studio .vm-machine-totals strong{white-space:normal}.vm-stock-legend small{margin-left:0}}

/* 20.9 — compact workspace and grouped metrics; commercial stock only */
.vm-page:has(.vm-studio) > .vm-toolbar{display:none}
.vm-page .vm-studio .vm-stock-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 20px}
.vm-page .vm-studio .vm-stock-summary>.vm-summary-card{display:block;padding:14px;min-width:0}
.vm-summary-card h4{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:#21683c;font-size:14px}.vm-summary-card dl{margin:0;display:grid;gap:6px}.vm-summary-card dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.vm-summary-card dt{color:#52665c;font-size:12px;overflow-wrap:anywhere}.vm-summary-card dd{margin:0;text-align:right;font-weight:650;font-size:13px;overflow-wrap:anywhere}.vm-summary-card dl>div:first-child dd{font-size:19px;color:#172528}
.vm-stock-nav{display:flex;gap:8px;border-bottom:1px solid #dce5df;padding-bottom:10px}.vm-stock-nav button{display:inline-flex;align-items:center;gap:7px}.vm-stock-nav button[aria-pressed=true]{background:#e5f3e8;color:#17682b;border-color:#75ac80}
.vm-page .vm-studio .vm-studio-workspace{width:100%;max-width:1120px;margin:12px auto 20px;grid-template-columns:minmax(0,1fr) minmax(220px,265px);align-items:start;gap:16px}
.vm-page .vm-studio:not(.vm2-list) .vm2-grid{grid-auto-columns:minmax(104px,1fr);justify-content:start;gap:8px}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot,.vm-page .vm-studio:not(.vm2-list) .vm2-empty-position{min-height:160px;box-sizing:border-box}.vm-page .vm-studio:not(.vm2-list) .vm2-slot{grid-template-rows:auto 66px minmax(30px,auto) 5px auto}.vm-page .vm-studio:not(.vm2-list) .vm2-photo,.vm-page .vm-studio:not(.vm2-list) .vm2-photo img{height:66px}
.vm-page .vm-studio .vm2-shelf{overflow-x:auto}.vm-page .vm-studio .vm-studio-detail{box-sizing:border-box}
@container (max-width:850px){.vm-page .vm-studio .vm-studio-workspace{grid-template-columns:minmax(0,1fr);max-width:760px}}
@container (max-width:650px){.vm-page .vm-studio .vm-stock-summary{grid-template-columns:minmax(0,1fr)}.vm-page .vm-studio .vm-stock-summary>.vm-summary-card{padding:12px}.vm-stock-nav{flex-wrap:wrap}}

/* 25.2: preset chooser and safe slot removal */
.vm-layout-templates h3{margin:0 0 5px;font-size:16px}.vm-layout-templates p,.vm-layout-templates small{color:#586b61;font-size:12px;line-height:1.5}.vm-layout-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.vm-layout-choices button{display:grid;gap:6px;text-align:left;align-content:start;padding:14px;background:#f7faf8}.vm-layout-choices button b{font-size:13px}.vm-layout-choices button span{font-size:11px;color:#536b5a}.vm-layout-mini{padding:8px;background:#203731;border-radius:7px;display:grid;gap:3px;margin-top:4px}.vm-layout-mini i{display:flex;gap:3px}.vm-layout-mini em{height:9px;background:#b6d1bf;border-radius:2px;flex:1}.vm-studio .vm-remove-product{color:#a43a34;border-color:#e7c9c6}.vm-studio .vm-remove-product:hover{background:#fff3f1}.vm-studio .vm2-grid{min-width:0}

.vm-layout-choices button[aria-pressed=true]{border-color:#21843c;background:#eaf5ed;box-shadow:0 0 0 1px #21843c}.vm-page .vm-studio:not(.vm2-list) .vm2-grid{grid-auto-columns:minmax(104px,1fr)}

/* Stock workspace: fluid shelf map, scoped to commercial stock. */
.vm-page .vm-studio .vm-studio-workspace{width:100%;max-width:none;margin:16px 0 24px;grid-template-columns:minmax(0,1fr) minmax(240px,300px);gap:20px}
.vm-page .vm-studio .vm2-map{width:100%;min-width:0;max-width:none;overflow:visible;margin:0;padding:16px;gap:12px;border:1px solid #263638;box-sizing:border-box}
.vm-page .vm-studio .vm2-shelf{min-width:0;overflow:visible;border-bottom:1px solid #536563;padding:0 0 12px}
.vm-page .vm-studio:not(.vm2-list) .vm2-grid{display:grid;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(auto-fit,minmax(min(100%,96px),1fr));gap:8px;justify-content:stretch}
.vm-page .vm-studio:not(.vm2-list) .vm2-grid:has(> :nth-child(8)){grid-template-columns:repeat(auto-fit,minmax(min(100%,82px),1fr))}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot,.vm-page .vm-studio:not(.vm2-list) .vm2-empty-position{min-height:144px;height:100%;padding:8px;border-radius:9px;box-sizing:border-box;min-width:0}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot{grid-template-rows:auto 54px minmax(30px,auto) 5px auto;gap:5px}
.vm-page .vm-studio:not(.vm2-list) .vm2-photo,.vm-page .vm-studio:not(.vm2-list) .vm2-photo img{height:54px;min-width:0}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot-head{flex-wrap:wrap;gap:2px 5px;min-width:0}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot-head span{font-size:10px;overflow-wrap:anywhere}
.vm-page .vm-studio:not(.vm2-list) .vm2-slot strong{overflow-wrap:anywhere}
.vm-page .vm-studio .vm2-empty-position svg{width:18px;height:18px;margin:auto}
.vm-page .vm-studio .vm2-empty-position small{font-size:11px}
.vm-page .vm-studio .vm-studio-detail{position:sticky;top:16px;padding:18px;min-width:0}
.vm-page .vm-studio .vm-stock-reservations{border-bottom:1px solid #edf1ee;padding:0 0 10px;margin:0 0 14px;color:#52665c;font-size:12px}
.vm-page .vm-studio .vm-stock-reservations summary{cursor:pointer;font-weight:600}
.vm-page .vm-studio .vm-stock-reservations dl{margin:6px 0 0}
.vm-page .vm-studio.vm2-list .vm2-map{background:#f4f7f5;border-color:#dce5df}
.vm-page .vm-studio.vm2-list .vm2-shelf h4{color:#52665c}
@container (max-width:1050px){.vm-page .vm-studio .vm-studio-workspace{grid-template-columns:minmax(0,1fr)}.vm-page .vm-studio .vm-studio-detail{position:static}}
@media(max-width:1100px){.vm-page .vm-studio .vm-studio-workspace{grid-template-columns:minmax(0,1fr)}.vm-page .vm-studio .vm-studio-detail{position:static}}
@media(max-width:600px){.vm-page .vm-studio .vm2-map{padding:10px}.vm-page .vm-studio .vm-studio-workspace{gap:12px}}

/* 25.3: selection is distinct from stock status, without overlay labels. */
.vm-page .vm-studio .vm2-slot[aria-pressed="true"]{
  border:2px solid #4b78dd!important;
  border-top:3px solid #4b78dd!important;
  background:#fff!important;
  box-shadow:0 0 0 2px rgba(75,120,221,.24)!important;
  transform:translateY(-1px);
}
.vm-page .vm-studio .vm2-slot[aria-pressed="true"]::after{display:none!important;content:none!important}
.vm-page .vm-studio .vm2-slot[aria-pressed="true"] .vm2-slot-head b{color:#244fa8}
.vm-page .vm-studio .vm-studio-selection-head{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;
  margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #e4eae6;
}
.vm-page .vm-studio .vm-studio-selected-label{
  display:block;color:#51685d;font-size:11px;font-weight:700;
  letter-spacing:.04em;line-height:1.5;text-transform:uppercase;
}
.vm-page .vm-studio .vm-studio-selected-slot{
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:800;font-size:13px;line-height:1.2;min-height:28px;
  margin:0;padding:5px 12px;border-radius:7px;
  color:#2456b7;background:#edf3ff;border:1px solid #d2dfff;
}
.vm-page .vm-studio .vm-studio-detail .vm-studio-product-photo{margin-top:8px}
@media(max-width:600px){.vm-page .vm-studio .vm-studio-selection-head{gap:8px}}

/* 26.4 — compact alerts and shared filter layout */
.vm-stock-alert{margin:0 0 16px;padding:12px 16px;background:#fffaf0;border:1px solid #ead9af;border-radius:10px;color:#805a17}.vm-stock-alert summary{display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;list-style:none;font-size:12px}.vm-stock-alert summary::-webkit-details-marker{display:none}.vm-stock-alert summary>span:first-child{display:grid;gap:4px}.vm-stock-alert summary small{font-weight:400;color:#846d45}.vm-stock-alert summary>span:last-child{white-space:nowrap;font-weight:600}.vm-stock-alert-list{max-height:260px;overflow:auto;margin-top:10px}.vm-stock-alert-list>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid #efdfbd;font-size:12px}.vm-stock-alert-list small{display:block;color:#846d45}.vm-stock-alert>button{margin-top:8px}.vm-page .vm-order-filters{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px}.vm-order-filters h3{margin:0 0 5px}.vm-order-filter-fields{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.vm-order-filter-fields label{min-width:140px}.vm-order-filter-fields select{width:100%;height:42px}.vm-page .vm-test-orders .vm-machine-toolbar{margin-bottom:18px}.vm-page .vm-test-orders .table{border:1px solid var(--av-line,#dce5de);border-radius:10px;overflow:auto}.vm-page .vm-test-orders .vm-kpis{margin:12px 0 18px}.vm-page .vm-test-orders td{vertical-align:middle}.vm-page .vm-test-orders td:nth-child(3),.vm-page .vm-test-orders td:nth-child(4),.vm-page .vm-test-orders td:nth-child(5){font-variant-numeric:tabular-nums;white-space:nowrap}@media(max-width:900px){.vm-page .vm-order-filters{align-items:flex-start;flex-direction:column}.vm-order-filter-fields{width:100%}.vm-order-filter-fields label{flex:1}}

.vm-reset-test{display:grid;gap:6px;padding-top:12px;border-top:1px solid var(--av-line,#dce5df);margin-top:12px}.vm-reset-test button{justify-self:start;color:#a12c2b}.vm-reset-test small{font-size:11px;color:var(--av-muted,#5d7166)}
