:root{--vh-blue:#004eb3;--vh-blue-dark:#003f94;--vh-blue-soft:#d9ecff;--vh-bg:#f1f2f5;--vh-line:#d8e1ea;--vh-text:#14233b;--vh-muted:#526173;--vh-ok:#008567;--vh-warn:#b45a00;--vh-card:#fff}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--vh-bg);color:var(--vh-text)}
header{
  background:var(--vh-blue);
  color:#fff;
  padding:12px 22px;
  position:sticky;
  top:0;
  z-index:2;
  box-shadow:0 2px 10px rgba(0,50,115,.18);

  display:grid;
  grid-template-columns:188px 1fr;
  grid-template-rows:auto auto auto;
  column-gap:16px;
  row-gap:0;
  align-items:center;
}

header::after{
  content:"";
  grid-column:1;
  grid-row:1 / span 3;
  justify-self:end;
  width:1px;
  height:100%;
  background:rgba(255,255,255,.35);
}

header::before{
  content:"";
  grid-column:1;
  grid-row:1 / span 2;
  width:172px;
  height:72px;
  background:url("img/LogoVH.jpg") left center/contain no-repeat;
  padding-right:16px;
  border-right:none;
  align-self:center;
}

.header-clock{
  grid-column:1;
  grid-row:3;
  width:172px;
  padding-right:16px;
  border-right:none;
  text-align:center;
  color:#fff;
  line-height:1.15;
  margin-top:0;
  padding-top:6px;
}

.header-date{
  font-size:13px;
  opacity:.9;
}

.header-time{
  font-size:16px;
  font-weight:700;
  letter-spacing:.5px;
}

header h1{
  grid-column:2;
  grid-row:1;
  align-self:end;
  font-size:22px;
  margin:0;
}

header p{
  grid-column:2;
  grid-row:2;
  align-self:start;
  margin:4px 0 0;
  color:#d8ebff;
}

.home-button{
  grid-column:2;
  grid-row:3;
  justify-self:start;
  align-self:center;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:6px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.4);
  border-radius:8px;
  transition:background .15s ease;
}
.home-button:hover{background:rgba(255,255,255,.26)}
.home-button:active{background:rgba(255,255,255,.34)}
.home-button img,
.home-button svg{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  filter:brightness(0) invert(1);
}

h1{font-size:22px;margin:0}h2{margin:10px 0 4px}h3{margin:12px 0 8px}
header p{margin:4px 0 0;color:#d8ebff}
.wrap{width:min(1220px,96vw);margin:14px auto 36px}
.toolbar,.card{background:var(--vh-card);border:1px solid var(--vh-line);border-radius:9px;padding:12px;margin-bottom:12px;box-shadow:0 2px 8px rgba(24,40,70,.05)}
.muted{color:var(--vh-muted);font-size:13px}.turn-summary{margin:0 0 8px;padding:8px 10px;border:1px solid #a9d2ff;border-radius:6px;background:#edf6ff;color:#123}.pill{background:#eef4f9;border:1px solid var(--vh-line);border-radius:6px;padding:7px;text-align:center}
input,select,textarea{width:100%;min-height:40px;border:1px solid #b6c6d6;border-radius:7px;padding:8px;font:inherit;background:#fff}
textarea{min-height:120px}
button{border:0;border-radius:7px;background:var(--vh-blue);color:#fff;font-weight:700;padding:10px 12px;cursor:pointer}
button.sec{background:#5f7187}button.ok{background:var(--vh-ok)}button.warn{background:var(--vh-warn)}
button.active-filter{background:var(--vh-blue)}
.bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.grid{display:grid;grid-template-columns:320px 1fr;gap:12px}
.start-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}.start-toolbar .day-field,.start-toolbar .service-field{grid-column:1/-1}.start-toolbar button{min-height:48px}
.finish-toolbar{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-items:stretch}.finish-toolbar button{min-height:48px}.finish-toolbar #txt{grid-column:1/-1;margin-top:18px}
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.tab{background:#fff;color:var(--vh-text);border:1px solid #b9c5d4}.tab.active{background:var(--vh-blue);color:#fff}
.tabpage{display:none}.tabpage.active{display:block}.status{color:#657386;margin-top:8px}

.repo-head,.repo-row{display:grid;grid-template-columns:1fr 110px 120px 220px;gap:8px;align-items:center}
.repo-head{padding:8px 10px;color:var(--vh-muted);font-size:13px;border-bottom:1px solid var(--vh-line)}
.repo-row{border:1px solid var(--vh-line);border-radius:9px;background:#fff;padding:10px;margin:8px 0}.repo-row.reviewed{background:#eef9f5;border-color:#7bc7ae;box-shadow:inset 4px 0 0 var(--vh-ok)}
.service-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.service-heading h2{margin-top:0}.service-heading p{margin:4px 0}.service-progress{align-self:center;color:var(--vh-ok);font-size:14px;white-space:nowrap}.service-finish{display:flex;justify-content:flex-end;margin-top:12px}.finish-service{min-width:180px;min-height:48px;font-size:16px}
.article-cell{display:grid;grid-template-columns:58px 1fr;gap:8px;align-items:center;min-width:0}.row-thumb{width:58px;height:46px;padding:0;background:#eef4f9;border:1px solid var(--vh-line);border-radius:6px;display:flex;align-items:center;justify-content:center}.row-thumb img{max-width:100%;max-height:100%;object-fit:contain}.row-thumb.empty{display:flex;color:#718096;background:#f4f6f8;font-size:11px;font-weight:400;cursor:default}.article-title{display:block;text-align:left;color:var(--vh-text);background:transparent;padding:0;font-weight:400;min-width:0}
.article-title:hover .desc b{text-decoration:underline}.desc{line-height:1.25}.desc b{display:block}.desc small{display:block;color:var(--vh-muted);margin-top:3px}
.export-box{display:grid;grid-template-columns:minmax(58px,1fr) 42px 42px 52px;gap:6px;align-items:center}.increment-target{min-height:40px;padding:8px;background:var(--vh-blue);font-size:18px}.next-target{min-height:40px;padding:8px;background:#5f7187}.qty{text-align:center;font-weight:700;border-color:#6ea8e8;font-size:18px;min-width:58px}.export-box small{color:var(--vh-muted);font-size:12px;white-space:nowrap;text-align:center}
.article-media{display:none;grid-column:1/-1;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;border-top:1px solid var(--vh-line);padding-top:10px}
.repo-row.open .article-media{display:grid}.article-media figure{margin:0}.article-media-image{display:flex;width:100%;height:260px;padding:0;align-items:center;justify-content:center;overflow:hidden;background:#eef4f9;border:1px solid var(--vh-line);border-radius:6px}.article-media-image>img{width:100%;height:100%;object-fit:contain}.article-media figcaption{text-align:center;color:var(--vh-muted);font-size:13px;margin-top:4px}.article-zone-plan{position:relative;height:auto;min-height:0;background:#fff}.article-zone-stage{position:relative;display:block;width:100%;aspect-ratio:1211/778;margin:auto;line-height:0}.article-zone-stage img{position:absolute;inset:0;display:block;width:100%;height:100%;max-height:none;object-fit:fill}

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}.producto-card{background:#fff;border:1px solid #d8e2ef;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.08)}.producto-foto-wrap{border-bottom:1px solid #e2e9f1;background:#eef4f9}.warehouse-images{position:relative;height:205px;background:#eef4f9}.warehouse-images button{padding:0;border:0;border-radius:0;display:flex;align-items:center;justify-content:center;overflow:hidden}.warehouse-images img{width:100%;height:100%;object-fit:contain}.warehouse-box-image{width:100%;height:100%;background:#eef4f9}.warehouse-article-image{position:absolute;right:10px;bottom:10px;width:76px;height:76px;background:#fff;border:2px solid #fff!important;border-radius:7px!important;box-shadow:0 2px 8px rgba(20,35,59,.28)}.warehouse-images button.empty{color:#718096;background:#f4f6f8;font-size:11px;font-weight:400}.warehouse-article-image.empty{padding:5px}.producto-info{padding:12px}.product-open{display:block;width:100%;padding:0;background:transparent;color:var(--vh-text);text-align:left}.producto-codigo{display:block;color:var(--vh-blue);font-weight:700;font-size:1.1rem;line-height:1.2}.producto-descripcion{display:block;margin-top:5px;font-size:.95rem;line-height:1.3;font-weight:400}.producto-ubicacion{margin-top:12px;padding:8px;background:#eef4fa;border:1px solid #cfdce9;border-radius:6px;text-align:center;font-weight:600}.producto-plano-bloque{margin-top:10px;border:1px solid #d8e2ef;border-radius:8px;overflow:hidden;background:#f8fafc}.producto-plano-titulo{padding:7px 9px;font-size:.8rem;font-weight:700;color:#40556f;background:#eef4fa;border-bottom:1px solid #d8e2ef}.producto-plano-miniatura{height:95px;position:relative;overflow:hidden}.loc-thumb{width:100%;margin:0;padding:0;display:flex;align-items:center;justify-content:center;border:0;border-radius:0}.producto-plano-miniatura .loc-thumb{height:100%;margin:0;border:0;border-radius:0}.producto-unidades{margin-top:10px;padding-top:10px;border-top:1px solid #e2e9f1;font-size:.85rem;color:#40556f}.producto-alternativas{margin:10px 0 0;font-size:.85rem}.stock-services{display:none;border-top:1px solid var(--vh-line);margin-top:10px;padding-top:10px}.product-card.open .stock-services{display:block}.stock-services ul{list-style:none;margin:6px 0 0;padding:0}.stock-services li{display:grid;gap:2px;border-bottom:1px solid #e8edf3;padding:6px 0}.stock-services li:last-child{border-bottom:0}.stock-services small{color:var(--vh-muted)}.stock-services span{font-weight:700}

.admin-head,.admin-row{display:grid;gap:8px;align-items:center}.admin-head{color:var(--vh-muted);font-size:13px;font-weight:700;margin:8px 0}.admin-row{border:1px solid var(--vh-line);border-radius:8px;padding:8px;margin:8px 0;background:#fff}
.product-head{grid-template-columns:100px minmax(260px,1fr) 88px 110px 120px 112px 140px 88px}.zones-head{grid-template-columns:70px 1fr 90px 90px minmax(150px,1fr) 88px}.admin-form{display:grid;grid-template-columns:160px 160px 1fr auto auto;gap:8px;align-items:end;margin-bottom:12px}.check-list{display:grid;gap:6px;max-height:520px;overflow:auto;border:1px solid var(--vh-line);border-radius:8px;padding:8px}.check-row{display:grid;grid-template-columns:28px 1fr 110px 118px;gap:8px;align-items:center;border-bottom:1px solid #e8edf3;padding:6px}.check-row:last-child{border-bottom:0}.check-row input[type=checkbox]{width:auto;min-height:auto}.check-row small{color:var(--vh-muted)}.order-buttons{display:flex;gap:4px}.order-buttons button{padding:8px 7px;font-size:12px}.order-buttons button:disabled{opacity:.35;cursor:not-allowed}
.image-picker{display:block;min-width:0}.image-picker button{width:100%;min-width:0}
.service-products{display:grid;gap:0;max-height:560px;overflow:auto;border:1px solid var(--vh-line);border-radius:8px}
.service-product-head,.service-product-row{display:grid;grid-template-columns:174px minmax(280px,1fr) 90px 120px 120px 120px;gap:10px;align-items:center;padding:8px 10px;border-bottom:1px solid #edf1f6}
.service-product-head{position:sticky;top:0;z-index:1;background:#f8fafc;color:var(--vh-muted);font-size:13px;font-weight:700}
.service-product-row:last-child{border-bottom:0}.service-product-row.unassigned{background:#f1f5f9;color:#64748b}.service-product-row.unassigned .pill,.service-product-row.unassigned .thumb-box{opacity:.55}.service-product-row input:disabled{background:#e5eaf0;color:#94a3b8;cursor:not-allowed}.service-desc{display:grid;grid-template-columns:24px 1fr;gap:8px;align-items:center;min-width:0}.service-desc input[type=checkbox]{width:auto;min-height:auto}.service-desc span{min-width:0}.order-cell{display:grid;grid-template-columns:48px 54px 48px;gap:4px}.order-cell button{padding:7px 5px;font-size:12px}.order-cell button:disabled{opacity:.35;cursor:not-allowed}.order-cell input{text-align:center;padding:6px}.thumb-box{width:110px;height:64px;padding:0;background:#eef3f8;border:1px solid #d9e1ec;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center}.thumb-box img{max-width:100%;max-height:100%;object-fit:contain}
.zone-plan{display:block;width:100%;margin:10px 0 16px;padding:8px;border:1px solid var(--vh-line);border-radius:8px;background:#f8fafc}.zone-plan img{display:block;width:100%;max-height:360px;object-fit:contain}
.zone-admin-preview{width:100%;aspect-ratio:1211/778;padding:0;overflow:hidden;border:1px solid var(--vh-line);border-radius:6px;background:#fff}.zone-admin-preview-stage{position:relative;display:block;width:100%;height:100%;line-height:0}.zone-admin-preview-stage img{display:block;width:100%;height:100%;object-fit:fill}.zone-admin-preview .zone-marker{border-width:1px}
.zone-calibrator{margin:14px 0 20px;padding:14px;border:1px solid var(--vh-line);border-radius:8px;background:#f8fafc}.zone-calibrator-heading{display:flex;justify-content:space-between;gap:16px;align-items:end;margin-bottom:10px}.zone-calibrator-heading h3,.zone-calibrator-heading p{margin:0 0 5px}.zone-calibrator-heading label{width:150px;flex:0 0 150px}.zone-calibration-canvas{position:relative;width:100%;line-height:0;overflow:hidden;border:1px solid #aebdcd;border-radius:7px;background:#fff;cursor:crosshair;touch-action:none;user-select:none}.zone-calibration-canvas img{display:block;width:100%;height:auto;pointer-events:none}.zone-calibration-canvas .zone-marker{z-index:2}.zone-calibration-json{min-height:240px;margin:8px 0;font:12px/1.4 Consolas,monospace;background:#111827;color:#e6edf7}.zone-calibration-actions{margin-top:2px}.zone-calibration-actions button{flex:1 1 180px}
.zone-map-thumb{position:relative;height:88px;overflow:hidden;background:#eef4f9}.zone-map-stage{position:absolute;display:block;overflow:visible}.zone-map-stage img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:fill}.zone-marker{position:absolute;display:block;background:rgba(255,0,0,.35);border:2px solid rgba(255,0,0,.9);box-shadow:0 0 0 1px rgba(255,255,255,.8);pointer-events:none}.loc-thumb.no-zone{color:var(--vh-muted);font-size:13px}
body.modal-open{overflow:hidden}.zone-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.82)}.zone-modal-panel{position:relative;width:min(1180px,96vw);max-height:94vh;padding:14px;background:#fff;border-radius:8px;box-shadow:0 18px 60px rgba(0,0,0,.45);overflow:auto}.zone-modal-panel h2{margin:0 48px 4px 0;color:var(--vh-blue)}.zone-modal-meta{margin:0 52px 12px 0;color:var(--vh-text);font-size:1rem;font-weight:600;line-height:1.35}.zone-modal-close{position:absolute;right:10px;top:8px;width:42px;height:42px;padding:0;border-radius:50%;font-size:28px;line-height:1;background:var(--vh-blue)}.zone-modal-plan{position:relative;width:100%;line-height:0}.zone-modal-plan img{display:block;width:100%;height:auto}.image-modal-panel{width:min(1000px,96vw)}.image-modal-stage{display:flex;min-height:180px;align-items:center;justify-content:center;background:#eef4f9}.image-modal-stage img{width:auto;max-width:100%;max-height:82vh;object-fit:contain}.image-modal-stage .zone-marker{position:absolute}.image-modal-stage.zone-image-stage{display:block;width:min(100%,calc(82vh * 1211 / 778));min-height:0;aspect-ratio:1211/778;margin:auto}.image-modal-stage.zone-image-stage img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:fill}.image-modal-nav{position:absolute;z-index:4;top:50%;width:48px;height:58px;padding:0;transform:translateY(-50%);border-radius:8px;background:rgba(0,78,179,.92);font-size:34px;line-height:1;box-shadow:0 3px 12px rgba(0,0,0,.25)}.image-modal-prev{left:10px}.image-modal-next{right:10px}.image-modal-counter{text-align:center;padding:8px 0 0;color:var(--vh-muted);font-weight:700}.blinking{animation:parpadeoZona 1s ease-in-out infinite}@keyframes parpadeoZona{0%,100%{opacity:1}50%{opacity:.18}}
pre{white-space:pre-wrap;background:#111827;color:#e6edf7;border-radius:8px;padding:12px;overflow:auto}
.hidden{display:none!important}

@media(max-width:760px){
header{
  grid-template-columns:170px 1fr;
  grid-template-rows:auto auto auto;
  column-gap:12px;
  row-gap:0;
  padding:10px 14px;
}

header::before{
  width:158px;
  height:68px;
  padding-right:12px;
}

.header-clock{
  width:158px;
  padding-right:12px;
}

.header-date{
  font-size:12px;
}

.header-time{
  font-size:15px;
}

header h1{
  font-size:20px;
}

header p{
  font-size:14px;
  line-height:1.3;
}

.home-button{
  width:30px;
  height:30px;
  padding:5px;
}

.wrap{width:100%;margin:0}.grid{grid-template-columns:1fr}.toolbar,.card{border-radius:0;border-left:0;border-right:0}.bar button{flex:1 1 130px}
  .start-toolbar,.finish-toolbar{grid-template-columns:1fr}.start-toolbar .day-field,.start-toolbar .service-field,.finish-toolbar #txt{grid-column:auto}.finish-toolbar #txt{margin-top:22px}
  .repo-head{grid-template-columns:1fr 128px;gap:8px;padding:8px}.repo-head b:nth-child(2),.repo-head b:nth-child(3){display:none}.repo-head b:nth-child(4){font-size:0;text-align:center}.repo-head b:nth-child(4)::after{content:"Accion";font-size:13px}
  .repo-row{grid-template-columns:128px minmax(0,1fr);grid-template-rows:auto auto auto;gap:8px;align-items:stretch;padding:8px}
  .repo-row>.pill:nth-child(2){display:none!important}
  .repo-row>.pill:nth-child(3){grid-column:2;grid-row:3;min-height:38px;padding:8px 5px;font-size:15px}
  .article-cell{display:contents}
  .article-title{grid-column:1/-1;grid-row:1}.desc b{font-size:15px;line-height:1.16}.desc small{font-size:12px}
  .row-thumb{grid-column:2;grid-row:2;width:min(184px,96%);height:138px;margin:0 auto}
  .export-box{grid-column:1;grid-row:2 / span 2;align-self:end;display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-right:6px;border-right:1px solid #e2e8f0}
  .export-box .qty{grid-column:1/-1;grid-row:1;min-height:52px;font-size:22px;padding:6px}
  .export-box small{grid-column:1/-1;grid-row:2;text-align:center;font-size:12px}
  .increment-target,.next-target{grid-row:3;min-height:48px;padding:6px;font-size:18px}
  .service-heading{display:block}.service-progress{display:block;margin:8px 0 2px}.service-finish{justify-content:stretch}.finish-service{width:100%}
  .article-media{grid-column:1/-1}
  .cards{display:block;padding:12px}.producto-card{margin:0 0 18px;border-radius:10px;box-shadow:0 3px 10px rgba(20,35,59,.11)}.producto-card:last-child{margin-bottom:4px}.warehouse-images{height:220px}.producto-info{padding:12px}.producto-plano-miniatura{height:105px}.producto-codigo{font-size:1.12rem}.producto-descripcion{font-size:.96rem}
  .admin-form,.product-head,.zones-head{grid-template-columns:1fr}.admin-head{display:none}.check-row{grid-template-columns:28px 1fr}.check-row input[type=number],.check-row .order-buttons{grid-column:2}.order-buttons button{flex:1}
  .service-products{max-height:none;border-left:0;border-right:0;border-radius:0}.service-product-head{display:none}.service-product-row{grid-template-columns:1fr 84px;gap:8px}.order-cell,.service-desc,.thumb-box,.service-product-row>.pill,.service-product-row>input{grid-column:1/-1}.thumb-box{width:100%;height:110px}.order-cell{grid-template-columns:1fr 70px 1fr}
  .zone-calibrator{padding:10px;border-left:0;border-right:0;border-radius:0}.zone-calibrator-heading{display:grid;grid-template-columns:1fr}.zone-calibrator-heading label{width:100%;flex-basis:auto}.zone-calibration-json{min-height:200px}.zone-calibration-actions button{flex-basis:100%}
  .zone-modal{padding:6px}.zone-modal-panel{width:100%;padding:8px;border-radius:5px}.zone-modal-panel h2{font-size:18px;margin:4px 48px 3px 4px}.zone-modal-meta{margin:0 48px 9px 4px;font-size:.9rem}.zone-modal-close{right:6px;top:5px}.image-modal-nav{width:44px;height:54px;font-size:30px}.image-modal-prev{left:5px}.image-modal-next{right:5px}


}