: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)}
.home-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.home-link{display:block;background:#fff;border:1px solid #d9e1ec;border-radius:8px;padding:16px;text-decoration:none;color:#172033}
.home-link:hover{border-color:#006fba}
.home-link b{display:block;font-size:18px;margin-bottom:6px}
.home-link span{display:block;color:#657386;line-height:1.35}
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 112px minmax(0,1fr);
  grid-template-rows:auto auto auto;
  column-gap:16px;
  row-gap:0;
  align-items:center;
}

/* Overrides finales de legibilidad para reposicion y administracion. */
.card.service-card{margin-bottom:20px;border:1px solid #d6e0eb;box-shadow:0 3px 12px rgba(20,35,59,.08)}
.repo-row{position:relative;margin:12px 0;box-shadow:0 1px 4px rgba(20,35,59,.05)}
.repo-row.open{box-shadow:0 3px 10px rgba(20,35,59,.09)}
.repo-row.reviewed::after{content:"Revisat";position:absolute;right:10px;top:-10px;padding:3px 8px;border-radius:999px;background:#dff5eb;color:#007a5f;border:1px solid #9ed9c4;font-size:12px;font-weight:700}
.repo-row.last-focus{outline:3px solid rgba(0,78,179,.35);box-shadow:0 0 0 6px rgba(0,78,179,.12),0 3px 12px rgba(20,35,59,.12)}
.last-article-bar{display:flex;justify-content:flex-end;padding:8px 0 2px}.last-article-btn{min-height:36px;padding:8px 12px;background:#eef4fa;color:#27476b;border:1px solid #cfdce9}.last-article-btn:disabled{opacity:.45;cursor:not-allowed}
.image-checker{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;margin:0 0 12px;padding:10px;border:1px solid #d8e2ef;border-radius:8px;background:#f8fafc}.image-check-report{flex:1 1 100%;max-height:260px;margin:4px 0 0;font-size:12px}

/* Ajustes de miniaturas y modales: evitan imagen rota y mantienen la ampliacion fuera de la tarjeta. */
.thumb-box.empty,
.row-thumb.empty,
.warehouse-box-image.empty,
.warehouse-article-image.empty{
  color:#718096;
  background:#f4f6f8;
  font-size:12px;
  font-weight:400;
  cursor:default;
}
.visual-product-image{
  display:block;
  width:100%;
  padding:0;
  border:0;
  background:transparent;
}
.image-modal-stage.image-missing::before{
  content:"Imatge no disponible";
  color:#607089;
  font-weight:700;
}
.image-modal-storage{
  display:block;
  margin:10px auto 0;
  padding:10px 16px;
  background:var(--vh-ok);
}
.image-modal-storage.hidden{
  display:none!important;
}
.image-modal-custom{width:100%;padding:10px}.image-modal-custom.hidden{display:none!important}.image-modal-stage.custom-image-stage{display:block;background:#fff}.image-modal-custom .storage-structure{min-height:420px}.image-modal-custom .subslot img,.image-modal-custom .pallet-slot img{width:88%;height:88%;max-width:none;max-height:none}
.card.service-card{
  margin-bottom:20px;
  border:1px solid #d6e0eb;
  box-shadow:0 3px 12px rgba(20,35,59,.08);
}
.repo-row{
  position:relative;
  margin:12px 0;
  box-shadow:0 1px 4px rgba(20,35,59,.05);
}
.repo-row.open{
  box-shadow:0 3px 10px rgba(20,35,59,.09);
}
.repo-row.reviewed::after{
  content:"Revisat";
  position:absolute;
  right:10px;
  top:-10px;
  padding:3px 8px;
  border-radius:999px;
  background:#dff5eb;
  color:#007a5f;
  border:1px solid #9ed9c4;
  font-size:12px;
  font-weight:700;
}
.repo-row.last-focus{
  outline:3px solid rgba(0,78,179,.35);
  box-shadow:0 0 0 6px rgba(0,78,179,.12),0 3px 12px rgba(20,35,59,.12);
}
.last-article-bar{
  display:flex;
  justify-content:flex-end;
  padding:8px 0 2px;
}
.last-article-btn{
  min-height:36px;
  padding:8px 12px;
  background:#eef4fa;
  color:#27476b;
  border:1px solid #cfdce9;
}
.last-article-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.image-checker{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:flex-start;
  margin:0 0 12px;
  padding:10px;
  border:1px solid #d8e2ef;
  border-radius:8px;
  background:#f8fafc;
}
.image-check-report{
  flex:1 1 100%;
  max-height:260px;
  margin:4px 0 0;
  font-size:12px;
}

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:none;
}

.brand-lockup{
  grid-column:1;
  grid-row:1 / span 2;
  width:100%;
  height:72px;
  padding-right:16px;
  display:grid;
  grid-template-columns:172px;
  align-items:center;
}

.brand-lockup img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.corporate-logo{
  width:172px;
  justify-self:start;
}

.app-logo-frame{
  grid-column:2;
  grid-row:1 / span 3;
  position:relative;
  width:108px;
  height:76px;
  justify-self:center;
  align-self:center;
  transform:translateY(4px);
  overflow:hidden;
}

.app-logo-frame .app-logo{
  position:absolute;
  inset:0;
  width:108px;
  height:76px;
  max-width:none;
  max-height:none;
  object-fit:contain;
  transform:translateY(6px) scale(2.02);
  transform-origin:center center;
  filter:drop-shadow(0 2px 3px rgba(0,28,74,.26));
}

.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:3;
  grid-row:1;
  align-self:end;
  font-size:22px;
  margin:0;
}

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

.active-service-header{
  display:block;
  margin-top:4px;
  color:#fff;
  font-size:13px;
  font-weight:700;
  line-height:1.25;
}

.active-service-header:empty{
  display:none;
}

.header-actions{
  grid-column:3;
  grid-row:3;
  justify-self:start;
  align-self:center;
  display:flex;
  gap:8px;
}

.home-button{
  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)}
.admin-button{background:rgba(255,255,255,.2)}
.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)}
.sync-flow{background:var(--vh-card);border:1px solid var(--vh-line);border-radius:9px;padding:14px;margin-bottom:12px;box-shadow:0 2px 8px rgba(24,40,70,.05)}
.sync-flow-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.sync-flow-head h2{margin:0 0 4px;font-size:22px}.sync-flow-head p{margin:0;color:var(--vh-muted);line-height:1.35}.sync-state{display:inline-flex;align-items:center;min-height:32px;padding:6px 10px;border-radius:999px;border:1px solid #cfdce9;background:#eef4fa;color:#27476b;font-weight:700;font-size:13px;white-space:nowrap}.sync-state.pending{border-color:#f2c078;background:#fff4dc;color:#8a4b00}.sync-state.ready{border-color:#9ed9c4;background:#dff5eb;color:#007a5f}.sync-state.error{border-color:#efb1a9;background:#fff0ee;color:#9e2d20}
.sync-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sync-step{display:grid;grid-template-columns:34px 1fr;gap:9px;min-width:0;padding:12px;border:1px solid #d8e2ef;border-radius:8px;background:#f8fafc}.sync-step-number{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:50%;background:var(--vh-blue);color:#fff;font-weight:800}.sync-step h3{margin:2px 0 5px;font-size:16px}.sync-step p{margin:0 0 9px;color:var(--vh-muted);font-size:13px;line-height:1.35}.sync-step input[type=file]{width:100%;min-height:36px;background:#fff}.sync-step button{width:100%;min-height:36px}.sync-step-edit{background:#fff}
.sync-log{min-height:44px;margin:10px 0 0;background:#111827;color:#e6edf7}
.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:disabled{opacity:.5;cursor:not-allowed}
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}
.all-services-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}.all-services-tools button{min-height:44px}
.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}

.warehouse-filter-panel{display:grid;gap:12px}.warehouse-filter-fields{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,420px) auto;gap:10px;align-items:end}.warehouse-filter-fields label{display:grid;gap:5px;color:#40556f;font-size:13px;font-weight:700}.warehouse-search-field{position:relative;min-width:0}.warehouse-search-suggestions{position:absolute;z-index:30;top:100%;left:0;right:0;max-height:320px;overflow:auto;margin-top:4px;border:1px solid #b9cce2;border-radius:8px;background:#fff;box-shadow:0 10px 28px rgba(20,35,59,.18)}.warehouse-search-suggestions button{display:grid;width:100%;gap:2px;padding:9px 10px;border-radius:0;border-bottom:1px solid #e8edf3;background:#fff;color:var(--vh-text);text-align:left;font-weight:400}.warehouse-search-suggestions button:hover{background:#eef6ff}.warehouse-search-suggestions button:last-child{border-bottom:0}.warehouse-search-suggestions b{color:var(--vh-blue)}.warehouse-search-suggestions span{line-height:1.25}.warehouse-search-suggestions small,.warehouse-search-empty{color:var(--vh-muted);font-size:12px}.warehouse-search-empty{padding:10px}.warehouse-filter-fields button{min-height:40px;white-space:nowrap}.warehouse-zone-filter{display:grid;gap:8px}.warehouse-zone-filter-head{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#40556f}.warehouse-zone-filter-head span{color:var(--vh-muted);font-size:13px;text-align:right}.zone-picker-map.warehouse-zone-map{width:min(100%,760px);margin:0 auto;border:1px solid #d8e2ef;border-radius:8px}.warehouse-zone-marker{cursor:pointer}.warehouse-zone-marker:hover{border-color:#e00000;background:rgba(255,0,0,.22);color:#8b0000}.warehouse-zone-marker.highlighted{border-color:#e00000;background:rgba(255,0,0,.38);color:#8b0000;box-shadow:0 0 0 3px rgba(255,255,255,.9),0 0 0 6px rgba(224,0,0,.18)}.warehouse-zone-marker.highlighted span{background:#fff;color:#8b0000}.warehouse-zone-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--vh-muted);background:#eef4f9}.warehouse-empty-results{grid-column:1/-1;text-align:center;color:var(--vh-muted);font-weight:700}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;align-items:start}.producto-card{background:#fff;border:1px solid #d8e2ef;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.08)}.producto-card.selected-product{outline:3px solid rgba(224,0,0,.32);outline-offset:2px}.producto-card.has-service-stock{background:#e8f7ef;border-color:#6fc293;box-shadow:0 3px 10px rgba(0,122,95,.18),inset 4px 0 0 #00a77f}.producto-card.has-service-stock .producto-info{background:linear-gradient(180deg,#eefbf4 0%,#f8fffb 78%)}.producto-card.has-service-stock .producto-ubicacion{background:#dff4ea;border-color:#9ed9bd}.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}
.producto-ubicacion{display:block}.producto-detalle{display:none;margin-top:12px}.product-card.open .producto-detalle{display:block}.producto-detalle .producto-foto-wrap{margin:0 -12px;border-top:1px solid #e2e9f1}.product-open:focus-visible{outline:3px solid rgba(0,78,179,.22);outline-offset:3px;border-radius:8px}
.warehouse-filter-fields{grid-template-columns:minmax(220px,1fr) minmax(260px,420px) auto auto auto}.warehouse-list{display:grid;gap:0;border:1px solid #d8e2ef;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06)}.warehouse-list-head,.warehouse-list-row{display:grid;grid-template-columns:92px minmax(280px,1fr) 120px minmax(150px,240px);gap:10px;align-items:center}.warehouse-list-head{padding:9px 12px;background:#f8fafc;border-bottom:1px solid #d8e2ef;color:#40556f;font-size:13px;font-weight:800}.warehouse-list-product-head{display:flex;gap:8px;align-items:center}.warehouse-list-sort{min-height:0;padding:0;background:transparent;color:inherit;text-align:left;font:inherit;font-weight:800}.warehouse-list-sort:hover,.warehouse-list-sort.active{background:transparent;color:var(--vh-blue)}.warehouse-list-row{padding:8px 12px;border-bottom:1px solid #e8edf3}.warehouse-list-row:last-child{border-bottom:0}.warehouse-list-row.selected-product{outline:3px solid rgba(224,0,0,.24);outline-offset:-3px;background:#fff8f8}.warehouse-list-row.has-service-stock{background:#eefbf4;box-shadow:inset 4px 0 0 #00a77f}.warehouse-list-image .thumb-box{width:78px;height:54px}.warehouse-list-product{display:grid;gap:3px;min-width:0;padding:0;background:transparent;color:var(--vh-text);text-align:left;font-weight:400}.warehouse-list-product b{color:var(--vh-blue);font-size:1rem}.warehouse-list-product span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.warehouse-list-units{color:#40556f;font-size:.9rem;font-weight:700;text-align:center}.warehouse-list-location{justify-self:stretch;padding:7px 9px;border:1px solid #cfdce9;border-radius:6px;background:#eef4fa;text-align:center;font-weight:700;color:#14233b}.warehouse-list-detail{display:none;grid-column:1/-1;border-top:1px solid #d8e2ef;margin-top:8px;padding-top:10px}.warehouse-list-row.open .warehouse-list-detail{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;align-items:start}.warehouse-list-detail .producto-plano-bloque,.warehouse-list-detail .producto-estructura-bloque{margin-top:0}.warehouse-list-detail .stock-services{display:block}
.warehouse-list-row.open .warehouse-list-detail{grid-template-columns:minmax(360px,42%) minmax(360px,1fr)}.warehouse-list-visuals{display:grid;gap:10px;align-content:start}.warehouse-list-services{min-width:0}.warehouse-list-detail .producto-plano-miniatura{height:150px}.warehouse-list-detail .zone-map-thumb{height:100%}.warehouse-list-detail .storage-thumb .storage-structure{height:150px}.warehouse-list-detail .stock-services{align-self:start;min-width:0;margin-top:0;border-top:0;padding-top:0}.warehouse-list-detail .stock-services ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:6px 12px}.warehouse-list-detail .stock-services li{padding:5px 0}

.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}.admin-sort-head{width:100%;min-height:0;padding:0;background:transparent;color:inherit;text-align:left;font:inherit;font-weight:700}.admin-sort-head:hover,.admin-sort-head.active{color:var(--vh-blue);background:transparent}.zones-head{grid-template-columns:70px 1fr 90px 90px 130px minmax(150px,1fr) 88px}.structures-head{grid-template-columns:150px 120px minmax(180px,1fr) 170px 78px minmax(260px,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}
.zone-picker-map{position:relative;width:100%;aspect-ratio:1211/778;overflow:hidden;background:#fff}.zone-picker-map>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.zone-select-marker{position:absolute;display:flex;align-items:center;justify-content:center;padding:0;border:2px solid rgba(0,78,179,.75);border-radius:4px;background:rgba(0,78,179,.15);color:#003f94;font-size:11px;font-weight:800}.zone-select-marker.active{border-color:#e00000;background:rgba(255,0,0,.28);color:#8b0000;box-shadow:0 0 0 2px rgba(255,255,255,.85)}.zone-select-marker span{display:block;padding:1px 3px;border-radius:3px;background:rgba(255,255,255,.82)}
.admin-zone-filter{display:grid;gap:8px;margin:10px 0 12px}.zone-picker-map.admin-product-zone-map{width:min(100%,760px);margin:0 auto;border:1px solid #d8e2ef;border-radius:8px}.admin-product-zone-marker{cursor:pointer}.admin-product-zone-marker:hover{border-color:#e00000;background:rgba(255,0,0,.22);color:#8b0000}
.product-filter-actions{justify-content:flex-end;margin:8px 0 2px}.product-filter-actions button{min-height:36px}
.producto-estructura-bloque{margin-top:10px;border:1px solid #d8e2ef;border-radius:8px;overflow:hidden;background:#f8fafc}.producto-estructura-bloque.compact{height:100%;margin-top:0}.storage-thumb{display:block;width:100%;padding:0;background:#f8fafc;color:var(--vh-text);border-radius:0}.storage-caption{padding:7px 9px;border-top:1px solid #d8e2ef;color:#40556f;font-size:.8rem;text-align:center}.storage-structure{position:relative;overflow:hidden;background:#fff}.storage-thumb .storage-structure{height:118px}.storage-modal-body .storage-structure{min-height:420px}.storage-shelf{padding:10px}.shelf-grid,.storage-shelf{display:grid;grid-template-columns:repeat(var(--shelf-cols,4),1fr);gap:5px}.shelf-cell{position:relative;min-height:38px;border:1px solid #cfdce9;border-radius:5px;background:#eef4fa;display:flex;align-items:center;justify-content:center;color:#40556f;font-size:12px;font-weight:700}.storage-modal-body .shelf-cell{min-height:64px;font-size:16px}.shelf-cell.active{border-color:rgba(255,0,0,.9);background:rgba(255,0,0,.08)}.subslots{position:absolute;inset:5px;display:grid;grid-template-columns:repeat(var(--subslots,4),1fr);gap:3px}.subslot{position:relative;overflow:hidden;border:1px dashed rgba(0,78,179,.45);background:rgba(255,255,255,.55);border-radius:3px}.subslot.active{background:rgba(255,0,0,.35);border:2px solid rgba(255,0,0,.9)}.subslot img,.pallet-slot img{display:block;width:100%;height:100%;object-fit:contain;background:rgba(255,255,255,.72);mix-blend-mode:normal}.storage-pallet{aspect-ratio:4/3;background:#eef4fa}.storage-pallet>img{display:block;width:100%;height:100%;object-fit:contain}.storage-pallet.no-image::before{content:"Sense imatge de palés";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#607089}.pallet-slot{position:absolute;overflow:hidden;background:rgba(0,78,179,.08);border:1px dashed rgba(0,78,179,.55);border-radius:4px}.pallet-slot.active{background:rgba(255,0,0,.35);border:2px solid rgba(255,0,0,.9)}.article-visual-structure{display:flex;flex-direction:column}.article-visual-structure .producto-estructura-bloque{height:100%}.article-visual-structure .storage-thumb{height:260px}.article-visual-structure .storage-thumb .storage-structure{height:100%}.storage-modal-panel{width:min(900px,96vw)}.storage-modal-body{padding-top:8px}.structure-params{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:7px}.structure-params textarea{min-height:90px;font:12px/1.35 Consolas,monospace}.visual-product-editor{margin-top:18px;padding-top:12px;border-top:1px solid var(--vh-line)}.visual-location-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:8px 0}.visual-preview{margin-top:10px;max-width:420px}
.visual-flow{display:grid;gap:16px}.visual-step{padding:14px;border:1px solid var(--vh-line);border-radius:10px;background:#fff;box-shadow:0 1px 4px rgba(20,35,59,.05)}.visual-step-title{display:flex;align-items:center;gap:9px;margin-bottom:12px;color:var(--vh-text)}.visual-step-title span{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:50%;background:var(--vh-blue);color:#fff;font-weight:800}.visual-step-title b{font-size:18px}.visual-select-grid{display:grid;grid-template-columns:minmax(260px,1fr) 220px;gap:10px;align-items:end}.visual-zone-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(260px,360px);gap:12px;margin-top:12px}.visual-plan-card,.visual-zone-card,.visual-preview-card,.visual-product-card{border:1px solid #d8e2ef;border-radius:9px;background:#f8fafc;overflow:hidden}.visual-zone-card,.visual-product-card{padding:12px;display:grid;gap:10px}.visual-zone-thumb{height:220px;border-radius:0}.empty-zone-preview,.empty-thumb{min-height:120px;display:flex;align-items:center;justify-content:center;color:#607089;background:#eef4f9;text-align:center}.visual-add-structure{display:grid;grid-template-columns:170px 150px auto 1fr;gap:10px;align-items:end;margin-bottom:12px}.visual-structure-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}.visual-structure-card{display:grid;grid-template-columns:160px 1fr;gap:10px;padding:10px;border:1px solid #d8e2ef;border-radius:9px;background:#f8fafc}.visual-structure-preview{border:1px solid #d8e2ef;border-radius:7px;overflow:hidden;background:#fff}.visual-structure-preview .storage-structure{height:148px}.visual-structure-fields{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:8px}.visual-structure-fields .warn{grid-column:1/-1}.visual-assignment-grid{display:grid;grid-template-columns:230px minmax(260px,1fr) minmax(260px,360px);gap:12px;align-items:start}.visual-product-card img{width:100%;height:138px;object-fit:contain;border:1px solid #d8e2ef;border-radius:7px;background:#eef4f9}.visual-product-card b{color:var(--vh-blue)}.visual-product-card span{font-size:14px;line-height:1.25}.visual-assignment-fields{display:grid;grid-template-columns:repeat(2,minmax(140px,1fr));gap:8px}.visual-assignment-fields .bar{grid-column:1/-1}.visual-preview-card .storage-structure{height:230px}.visual-preview-card p{padding:12px}.visual-preview-card>.producto-plano-titulo{border-radius:0}.visual-preview-card>.storage-structure{border-top:1px solid #d8e2ef}
.visual-zone-summary,.structure-type-note{display:grid;gap:8px;align-content:start;padding:12px;border:1px solid #d8e2ef;border-radius:9px;background:#f8fafc}.visual-zone-summary b{color:var(--vh-blue)}.visual-zone-summary span,.structure-type-note span{color:var(--vh-muted);line-height:1.35}.structure-type-note{min-height:40px;align-content:center}
.pallet-rack-bg{position:absolute;inset:0;z-index:0;display:grid;grid-template-columns:1fr;gap:0;align-items:stretch}
.storage-pallet.double-rack .pallet-rack-bg{grid-template-columns:1fr 1fr}
.pallet-rack-image{display:block;width:100%;height:100%;object-fit:contain}
.pallet-slot{z-index:2;display:flex;align-items:center;justify-content:center}
.subslot[data-pick-position],.pallet-slot[data-pick-position]{cursor:pointer}.subslot[data-pick-position]:hover,.pallet-slot[data-pick-position]:hover{outline:2px solid var(--vh-blue);background:rgba(0,78,179,.18)}
.subslot.active{display:flex;align-items:center;justify-content:center}
.subslot img,.pallet-slot img{width:86%;height:86%;max-width:150px;max-height:150px;object-fit:contain;background:rgba(255,255,255,.84);border:1px solid rgba(255,0,0,.38);border-radius:3px;box-sizing:border-box}
.storage-modal-body .subslot img,.storage-modal-body .pallet-slot img{width:88%;height:88%;max-width:none;max-height:none}
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-marker.clickable{cursor:pointer;box-shadow:0 0 0 3px rgba(255,255,255,.9),0 0 0 6px rgba(224,0,0,.2)}.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::after{
  grid-row:1 / span 4;
}

header{
  grid-template-columns:170px minmax(0,1fr);
  grid-template-rows:auto auto auto auto;
  column-gap:12px;
  row-gap:0;
  padding:10px 14px;
}

header::before{
  content:none;
}

.brand-lockup{
  width:100%;
  height:68px;
  padding-right:12px;
  grid-template-columns:150px;
}

.corporate-logo{
  width:150px;
}

.app-logo-frame{
  grid-column:2;
  grid-row:1;
  width:82px;
  height:60px;
  justify-self:start;
  align-self:end;
  transform:translateY(1px);
}

.app-logo-frame .app-logo{
  width:82px;
  height:60px;
  transform:translateY(5px) scale(1.95);
}

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

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

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

header h1{
  grid-column:2;
  grid-row:2;
  font-size:20px;
}

header p{
  grid-column:2;
  grid-row:3;
  font-size:14px;
  line-height:1.3;
}

.header-actions{
  grid-column:2;
  grid-row:4;
}

.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}.sync-flow{border-radius:0;border-left:0;border-right:0}.sync-flow-head{display:grid}.sync-steps{grid-template-columns:1fr}.sync-state{justify-content:center;white-space:normal;text-align:center}
  .start-toolbar,.finish-toolbar,.all-services-tools{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}
  .warehouse-filter-fields{grid-template-columns:1fr}.warehouse-filter-fields button{width:100%}.warehouse-zone-filter-head{display:grid;gap:4px}.warehouse-zone-filter-head span{text-align:left}.warehouse-zone-map{max-height:none}
  .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}
  .warehouse-list{display:block;border-left:0;border-right:0;border-radius:0}.warehouse-list-head{display:grid;grid-template-columns:1fr;gap:6px}.warehouse-list-head>span,.warehouse-list-head>b{display:none}.warehouse-list-product-head{display:grid;grid-template-columns:1fr 1fr;gap:6px}.warehouse-list-row{grid-template-columns:82px minmax(0,1fr);grid-template-rows:auto auto auto;gap:8px;padding:10px}.warehouse-list-units{grid-column:2;text-align:left}.warehouse-list-location{grid-column:1/-1;text-align:left}.warehouse-list-detail{grid-column:1/-1}.warehouse-list-row.open .warehouse-list-detail{grid-template-columns:1fr}.warehouse-list-detail .producto-plano-miniatura,.warehouse-list-detail .storage-thumb .storage-structure{height:140px}.warehouse-list-product span{white-space:normal}.warehouse-list-image .thumb-box{width:72px;height:54px}
  .admin-form,.product-head,.zones-head,.structures-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}
  .storage-thumb .storage-structure{height:130px}.article-visual-structure .storage-thumb{height:240px}.storage-modal-body .storage-structure{min-height:310px}.visual-preview{max-width:none}.structure-params{grid-template-columns:1fr}
  .visual-step{border-left:0;border-right:0;border-radius:0}.visual-select-grid,.visual-zone-layout,.visual-add-structure,.visual-assignment-grid{grid-template-columns:1fr}.visual-structure-grid{grid-template-columns:1fr}.visual-structure-card{grid-template-columns:1fr}.visual-structure-preview .storage-structure,.visual-preview-card .storage-structure{height:180px}.visual-structure-fields,.visual-assignment-fields{grid-template-columns:1fr}.visual-zone-thumb{height:170px}
  .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}


}

/* Ajust final: aquestes regles han de quedar al final per no ser trepitjades
   pels estils compactes de les llistes de reposicio. */
.card.service-card{margin-bottom:20px;border:1px solid #d4dfec;box-shadow:0 2px 8px rgba(20,35,59,.08)}
.repo-row{margin:12px 0;border:1px solid #d6e1ee;box-shadow:0 1px 4px rgba(20,35,59,.06)}
.repo-row.open{border-color:#9fc4ef;box-shadow:0 3px 12px rgba(0,78,179,.12)}
.repo-row.reviewed{background:#f3fbf7;border-color:#9bd7b5}
.repo-row.reviewed::after{content:"Revisat";position:absolute;right:10px;top:8px;padding:3px 8px;border-radius:999px;background:#dff5eb;color:#007a5f;border:1px solid #9ed9c4;font-size:12px;font-weight:800;line-height:1}
.repo-row.prepared{background:#eef6ff;border-color:#8ab9ee;box-shadow:inset 4px 0 0 var(--vh-blue)}
.repo-row.prepared::after{content:"Preparat";position:absolute;right:10px;top:8px;padding:3px 8px;border-radius:999px;background:#e1efff;color:#0057b8;border:1px solid #94bfef;font-size:12px;font-weight:800;line-height:1}
.repo-row.modified{background:#fff8e8;border-color:#f1c46c;box-shadow:inset 4px 0 0 #b86500}
.repo-row.modified::after{content:"Modificat";position:absolute;right:10px;top:8px;padding:3px 8px;border-radius:999px;background:#fff1cf;color:#9a5200;border:1px solid #e0ab49;font-size:12px;font-weight:800;line-height:1}
.repo-row.over{background:#fff1f1;border-color:#ef9a9a;box-shadow:inset 4px 0 0 #b42318}
.repo-row.over::after{content:"Excés";position:absolute;right:10px;top:8px;padding:3px 8px;border-radius:999px;background:#ffe0e0;color:#b42318;border:1px solid #ef9a9a;font-size:12px;font-weight:800;line-height:1}
.repo-row.over .desc b,.repo-row.over .units-out{color:#b42318}
.repo-row.last-focus{outline:3px solid rgba(0,78,179,.35);outline-offset:2px}
.all-services-card>.service-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}.all-services-card>.service-heading h2{min-width:0}.review-reset-btn{justify-self:end;align-self:start;min-height:30px;padding:5px 9px;font-size:12px;border-radius:999px;white-space:nowrap}
.all-zone-map{padding:8px}.all-zone-map .zone-picker-map{border:1px solid #d8e2ef;border-radius:8px}
.all-zone-marker{cursor:pointer}
.quick-zone-heading{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:10px;align-items:center}.quick-zone-mini{width:92px;padding:0;border:0;background:transparent}.quick-zone-mini:hover,.quick-zone-mini:focus{background:transparent;outline:2px solid rgba(0,78,179,.28);outline-offset:2px}.quick-zone-mini .zone-picker-map{border:1px solid #d8e2ef;border-radius:6px}
.quick-head,.quick-main{display:grid;grid-template-columns:minmax(0,1fr) 82px 74px;gap:8px;align-items:center}.quick-head{padding:9px 12px;background:#eef4fa;border-bottom:1px solid #d8e2ef;color:#40556f;font-size:13px}.quick-main{width:100%;padding:10px 12px;border:0;border-bottom:1px solid #e2e8f0;border-radius:0;background:#fff;color:#14233b;text-align:left}.quick-main:focus{outline:3px solid rgba(0,78,179,.28);outline-offset:-3px}.quick-row.reviewed .quick-main{background:#f3fbf7}.quick-row.prepared .quick-main{background:#eef6ff;box-shadow:inset 4px 0 0 var(--vh-blue)}.quick-row.modified .quick-main{background:#fff8e8;box-shadow:inset 4px 0 0 #b86500}.quick-row.over .quick-main{background:#fff1f1;box-shadow:inset 4px 0 0 #b42318}.quick-row.over .quick-main strong,.quick-row.over .quick-desc b{color:#b42318}.quick-desc{min-width:0}.quick-desc b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.2}.quick-main>span:nth-child(2){color:#40556f;font-weight:800;text-align:center}.quick-main strong{color:var(--vh-blue);font-size:18px;text-align:center}.quick-detail{display:none;grid-template-columns:96px minmax(92px,140px) minmax(0,1fr) 116px;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid #d8e2ef;background:#f8fafc}.quick-row.open .quick-detail{display:grid}.quick-thumb{display:flex;align-items:center;justify-content:center;width:96px;height:72px;padding:4px;border:1px solid #d8e2ef;border-radius:6px;background:#eef4f9}.quick-thumb img{max-width:100%;max-height:100%;object-fit:contain}.quick-qty-edit{display:grid;gap:4px;color:#40556f;font-size:12px;font-weight:800}.quick-qty{min-height:42px;padding:5px;text-align:center;font-size:20px;font-weight:800}.quick-meta-line{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px;gap:8px;align-items:center}.quick-meta-line span{display:grid;gap:2px;color:#14233b;font-weight:700}.quick-meta-line b{color:#40556f;font-size:12px}.quick-increment{min-height:42px;padding:4px;font-size:22px;line-height:1}.quick-confirm{min-height:42px;padding:7px 10px}.quick-detail div{display:grid;gap:2px}.quick-detail b{color:#40556f;font-size:12px}.quick-detail span{color:#14233b;font-weight:700}
.all-location-service{margin-top:14px;padding-top:12px;border-top:1px solid #d8e2ef}.all-location-service:first-of-type{margin-top:8px}.all-location-service h3{margin:0 0 3px;font-size:16px;color:#17365d}.all-location-service>p{margin:0 0 8px}
.last-article-bar{display:flex;justify-content:flex-end;margin:8px 0 12px}
.last-article-btn{min-height:34px;padding:7px 12px;background:#eef4fa;color:#0057b8;border:1px solid #b9cce2}
.last-article-btn:disabled{opacity:.45;cursor:not-allowed}
.thumb-box.empty,.row-thumb.empty,.warehouse-box-image.empty,.warehouse-article-image.empty{display:flex;align-items:center;justify-content:center;color:#607089;background:#eef4f9;text-align:center;font-size:12px}
.image-checker{margin:0 0 12px;padding:10px;border:1px solid #d8e2ef;border-radius:8px;background:#f8fafc}
.image-check-report{max-height:260px;margin:10px 0 0;font-size:12px}
.service-view-bar{display:none}
.service-view-context{display:none;gap:2px;margin:8px 0 8px;padding:8px 10px;border:1px solid #d8e2ef;border-radius:8px;background:#eef4fa;color:#14233b}.service-view-context b{font-size:15px;line-height:1.15}.service-view-context span{color:#40556f;font-size:12px;font-weight:700;line-height:1.25}
.service-view-switch{display:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 12px}.service-view-switch button{min-height:42px}
.wizard-panel{display:grid;gap:12px;padding:12px;border:1px solid #d8e2ef;border-radius:9px;background:#fff;box-shadow:0 2px 8px rgba(20,35,59,.06)}
.wizard-step-head{display:flex;justify-content:space-between;gap:12px;align-items:center;color:var(--vh-text)}.wizard-step-head b{font-size:18px}.wizard-step-head span{color:var(--vh-muted);font-weight:700}
.wizard-progress{height:9px;overflow:hidden;border-radius:999px;background:#d9ecff}.wizard-progress span{display:block;height:100%;border-radius:999px;background:var(--vh-blue)}
.wizard-product-image{display:flex;align-items:center;justify-content:center;width:100%;height:min(36vh,340px);min-height:220px;padding:10px;border:1px solid #d8e2ef;border-radius:8px;background:#eef4f9}.wizard-product-image img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.wizard-product-title{display:grid;gap:4px}.wizard-product-title b{font-size:22px;line-height:1.15;color:var(--vh-text)}.wizard-product-title small{color:var(--vh-muted);font-size:14px;line-height:1.3}
.wizard-stock-grid{display:grid;grid-template-columns:1fr 124px;gap:10px}.wizard-stock-card{min-width:0;padding:10px;border:1px solid #d8e2ef;border-radius:8px;background:#f8fafc;text-align:center}.wizard-stock-card span{display:block;color:#40556f;font-weight:700}.wizard-stock-card b{display:block;margin:3px 0 0;color:var(--vh-blue);font-size:36px;line-height:1}.wizard-stock-card small{display:block;color:var(--vh-muted);font-weight:700}.wizard-stock-warn,.wizard-stock-remaining{border-color:#f1c46c;background:#fff8e8}.wizard-stock-warn b,.wizard-stock-remaining b{color:var(--vh-warn)}.wizard-stock-remaining.over{border-color:#ef9a9a;background:#fff1f1}.wizard-stock-remaining.over span,.wizard-stock-remaining.over b{color:#b42318}
.wizard-boxes{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;margin-top:8px}.wizard-box{width:24px;height:24px;border:2px solid var(--vh-blue);border-radius:4px;background:#fff;box-shadow:inset -5px -5px 0 #d9ecff}.wizard-box.target{border-color:var(--vh-blue)}
.wizard-qty{display:grid;grid-template-columns:74px minmax(76px,1fr) 74px;gap:8px;align-items:center;padding:10px;border:1px solid #d8e2ef;border-radius:8px;background:#fff}.wizard-qty-label{grid-column:1/-1;color:#14233b;font-weight:800;text-align:center}.wizard-qty .qty{min-height:64px;padding:6px;text-align:center;font-size:34px;font-weight:800;color:#14233b;border-color:#9fc4ef}.wizard-qty .increment-target,.wizard-qty .decrement-target{min-height:64px;padding:4px;font-size:34px;line-height:1;background:var(--vh-blue)}.wizard-qty .decrement-target{background:#64758a}.wizard-qty .units-out{grid-column:1/-1;color:var(--vh-muted);font-size:13px;text-align:center}
.wizard-check{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;min-height:56px;padding:8px 10px;border:1px solid #9ed9c4;border-radius:8px;background:#f3fbf7;color:var(--vh-ok);font-size:18px;font-weight:800}.wizard-check input{width:34px;height:34px;min-height:34px;accent-color:var(--vh-ok)}
.wizard-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wizard-actions button{min-height:58px;font-size:22px}.wizard-actions .sec{background:#fff;color:#40556f;border:1px solid #aebdcd}.wizard-actions .wizard-next{background:var(--vh-blue)}.wizard-actions .wizard-next.ok{background:var(--vh-ok)}
.wizard-empty{padding:18px;text-align:center}

@media(max-width:760px){
  .all-services-tools{position:sticky;top:var(--celador-sticky-tools-top,0);z-index:5;margin:0 -2px 10px;padding:6px 0;background:#f8fafc;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;transition:top .18s ease}.all-services-tools button{min-height:40px;padding:7px 5px;font-size:13px}
  .quick-zone-heading{grid-template-columns:minmax(0,1fr) 74px;gap:8px}.quick-zone-mini{width:74px}
  .quick-head,.quick-main{grid-template-columns:minmax(0,1fr) 56px 52px;gap:6px}.quick-head{padding:8px;font-size:12px}.quick-main{padding:9px 8px}.quick-desc b{font-size:13px}.quick-main strong{font-size:17px}.quick-detail{grid-template-columns:80px minmax(0,1fr);padding:9px 10px}.quick-thumb{width:80px;height:62px}.quick-meta-line,.quick-confirm{grid-column:1/-1}.quick-qty-edit{align-self:stretch}.quick-qty{min-height:44px}.quick-meta-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px}.quick-meta-line .quick-increment{grid-column:3;grid-row:1;width:40px;min-width:40px;min-height:36px;height:36px;padding:0;font-size:20px;align-self:center}.quick-confirm{width:100%}
  .repo-row{margin:10px 0;border-radius:8px}
  .review-reset-btn{min-height:28px;padding:4px 8px;font-size:11px}
  .repo-row.reviewed::after,.repo-row.prepared::after,.repo-row.modified::after{right:8px;top:6px}
  .last-article-bar{justify-content:stretch}
  .last-article-btn{width:100%}
  .service-view-bar{display:block;position:sticky;top:0;z-index:3;margin:0 -2px 8px;padding:6px 0;background:#f8fafc}
  .service-view-context{display:grid;margin:0 0 6px;padding:6px 8px;border-radius:7px}.service-view-context b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.service-view-context span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
  .service-view-switch{display:grid;margin:0;gap:6px}.service-view-switch button{min-height:40px;font-size:14px}
  .service-card:not(.all-services-card):not(.all-location-card)>.service-heading{display:none}
  .service-card.wizard-mode{min-height:calc(100vh - 148px);padding:10px;background:#f8fafc}
  .wizard-panel{gap:10px;padding:10px;border-radius:8px}
  .wizard-step-head b{font-size:20px}.wizard-product-image{height:31vh;min-height:210px;padding:8px}
  .wizard-product-title b{font-size:21px}.wizard-product-title small{font-size:13px}
  .wizard-stock-grid{grid-template-columns:minmax(0,1fr) 112px;gap:8px}.wizard-stock-card{padding:9px 6px}.wizard-stock-card b{font-size:34px}.wizard-box{width:22px;height:22px}
  .wizard-qty{grid-template-columns:68px minmax(72px,1fr) 68px;padding:8px}.wizard-qty .qty,.wizard-qty .increment-target,.wizard-qty .decrement-target{min-height:62px}.wizard-qty .qty{font-size:34px}
  .wizard-check{min-height:54px;font-size:18px}
  .wizard-actions{position:sticky;bottom:0;margin:0 -10px -10px;padding:8px 10px;background:#fff;border-top:1px solid #d8e2ef}.wizard-actions button{min-height:58px}
}

/* Wizard: vista compacta de un solo articulo, aislada de la rejilla de lista. */
.wizard-product-main{display:grid;grid-template-columns:1fr;gap:8px;align-items:center}
.wizard-panel .wizard-qty{grid-column:auto;grid-row:auto;align-self:auto;display:grid;grid-template-columns:72px minmax(86px,1fr) 72px;gap:8px;padding:9px;border:1px solid #d8e2ef;border-radius:8px;background:#fff}
.wizard-panel .wizard-qty .decrement-target{grid-column:1;grid-row:2;min-height:58px;padding:4px;font-size:34px;line-height:1;background:#64758a}
.wizard-panel .wizard-qty .qty{grid-column:2;grid-row:2;min-height:58px;padding:6px;text-align:center;font-size:32px;font-weight:800;color:#14233b;border-color:#9fc4ef}
.wizard-panel .wizard-qty .increment-target{grid-column:3;grid-row:2;min-height:58px;padding:4px;font-size:34px;line-height:1;background:var(--vh-blue)}
.wizard-panel .wizard-qty .units-out{grid-column:1/-1;grid-row:3;color:var(--vh-muted);font-size:13px;text-align:center}
.wizard-panel .wizard-qty-label{grid-column:1/-1;grid-row:1;color:#14233b;font-weight:800;text-align:center}

@media(max-width:760px){
  header{transition:transform .18s ease,opacity .18s ease,box-shadow .18s ease}
  body.celador-list-header-collapsed header{transform:translateY(-100%);opacity:0;pointer-events:none}
  body.celador-wizard-active{background:#f8fafc}
  body.celador-wizard-active header{position:absolute;transform:translateY(-100%);pointer-events:none;opacity:0}
  body.celador-wizard-active.wizard-header-peek header{position:fixed;inset:0 0 auto 0;z-index:20;transform:none;pointer-events:auto;opacity:1;box-shadow:0 2px 12px rgba(0,50,115,.25)}
  body.celador-wizard-active .start-toolbar,
  body.celador-wizard-active .finish-toolbar{display:none}
  body.celador-wizard-active .wrap{margin:0}
  body.celador-wizard-active .service-card.wizard-mode{margin:0;padding:5px 7px 7px;border:0;box-shadow:none;background:#f8fafc}
  body.celador-wizard-active .service-card.wizard-mode>.service-heading{display:none}
  body.celador-wizard-active .service-view-bar{position:static;margin:0 0 5px;padding:0;background:#f8fafc}
  body.celador-wizard-active .service-view-context{margin:0 0 5px;padding:5px 8px}
  body.celador-wizard-active .service-view-switch{position:static;margin:0;padding:0;background:#f8fafc;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  body.celador-wizard-active .service-view-switch button{min-height:34px;padding:6px 7px;font-size:13px;border-radius:7px}
  body.celador-wizard-active .wizard-panel{gap:5px;padding:7px;border-radius:8px;box-shadow:0 1px 4px rgba(20,35,59,.05)}
  body.celador-wizard-active .wizard-step-head b{font-size:16px}
  body.celador-wizard-active .wizard-step-head span{font-size:12px}
  body.celador-wizard-active .wizard-progress{height:6px}
  body.celador-wizard-active .wizard-product-main{grid-template-columns:1fr;gap:5px}
  body.celador-wizard-active .wizard-product-image{grid-column:auto;grid-row:auto;width:100%;height:clamp(142px,25vh,205px);min-height:142px;padding:6px}
  body.celador-wizard-active .wizard-product-title{min-width:0}
  body.celador-wizard-active .wizard-product-title b{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:17px;line-height:1.06}
  body.celador-wizard-active .wizard-product-title small{font-size:11px;line-height:1.15}
  body.celador-wizard-active .wizard-stock-grid{grid-template-columns:1fr 94px;gap:6px}
  body.celador-wizard-active .wizard-stock-card{padding:6px 5px}
  body.celador-wizard-active .wizard-stock-card span{font-size:12px}
  body.celador-wizard-active .wizard-stock-card b{font-size:28px}
  body.celador-wizard-active .wizard-stock-card small{font-size:11px}
  body.celador-wizard-active .wizard-boxes{display:none}
  body.celador-wizard-active .wizard-panel .wizard-qty{grid-template-columns:54px minmax(86px,1fr) 54px;gap:6px;padding:6px}
  body.celador-wizard-active .wizard-panel .wizard-qty .qty,
  body.celador-wizard-active .wizard-panel .wizard-qty .increment-target,
  body.celador-wizard-active .wizard-panel .wizard-qty .decrement-target{min-height:50px}
  body.celador-wizard-active .wizard-panel .wizard-qty .qty{font-size:28px}
  body.celador-wizard-active .wizard-panel .wizard-qty .increment-target,
  body.celador-wizard-active .wizard-panel .wizard-qty .decrement-target{font-size:32px}
  body.celador-wizard-active .wizard-panel .wizard-qty-label{font-size:13px}
  body.celador-wizard-active .wizard-panel .wizard-qty .units-out{font-size:11px}
  body.celador-wizard-active .wizard-check{grid-template-columns:32px 1fr;gap:8px;min-height:42px;padding:5px 8px;font-size:16px}
  body.celador-wizard-active .wizard-check input{width:27px;height:27px;min-height:27px}
  body.celador-wizard-active .wizard-actions{position:static;margin:0;padding:0;border-top:0;background:transparent;gap:8px}
  body.celador-wizard-active .wizard-actions button{min-height:50px;font-size:19px}
}
