
:root{
  --bg:#f7f7f2;
  --panel:#ffffff;
  --ink:#142019;
  --muted:#68736c;
  --green:#0e8a4b;
  --green2:#11a35c;
  --lime:#dff5e7;
  --yellow:#ffc72c;
  --red:#dd3b3b;
  --line:#e5e8e6;
  --shadow:0 14px 35px rgba(18,32,25,.08);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,#eef7f1 0,#f8f8f3 25%,#f7f7f2 100%);
  color:var(--ink);
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.topbar{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 22px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line)
}
.brand{display:flex;align-items:center;gap:11px}
.brand-mark{
  width:45px;height:45px;border-radius:14px;
  display:grid;place-items:center;background:var(--green);color:#fff;font-weight:900;
  box-shadow:0 8px 20px rgba(14,138,75,.24)
}
.brand h1{font-size:21px;margin:0}
.brand small{color:var(--muted)}
.top-actions{display:flex;gap:8px}
.ghost,.cart-btn,.btn,.secondary,.danger,.mini{
  border:0;border-radius:12px;padding:11px 15px;font-weight:800
}
.ghost{background:#eef2ef;color:var(--ink)}
.cart-btn{background:#19241e;color:white}
#app{max-width:1200px;margin:0 auto;padding:26px}
.hero{
  display:grid;grid-template-columns:1.25fr .75fr;gap:24px;align-items:stretch;margin-bottom:26px
}
.hero-main{
  padding:34px;border-radius:28px;color:white;min-height:290px;
  background:linear-gradient(135deg,#0c6c3c,#0fa65a);
  box-shadow:0 24px 60px rgba(14,138,75,.22);position:relative;overflow:hidden
}
.hero-main:after{
  content:"";position:absolute;right:-70px;bottom:-90px;width:260px;height:260px;border-radius:50%;
  background:rgba(255,255,255,.11)
}
.hero-main h2{font-size:clamp(32px,5vw,62px);line-height:.95;margin:10px 0 16px;max-width:700px}
.hero-main p{font-size:18px;max-width:650px;color:#e9fff2}
.pill{display:inline-flex;background:rgba(255,255,255,.14);padding:8px 12px;border-radius:999px;font-weight:800}
.hero-side{
  background:var(--panel);border:1px solid var(--line);border-radius:28px;padding:26px;box-shadow:var(--shadow)
}
.hero-side h3{margin-top:0;font-size:22px}
.role-grid{display:grid;grid-template-columns:1fr;gap:12px}
.role{
  text-align:left;border:1px solid var(--line);background:#fff;border-radius:18px;padding:17px;
  display:flex;gap:14px;align-items:center;transition:.2s
}
.role:hover{transform:translateY(-2px);border-color:#b9dcca;box-shadow:var(--shadow)}
.role-icon{font-size:28px}
.role b{display:block}
.role span{font-size:13px;color:var(--muted)}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin:22px 0 14px}
.section-head h2,.section-head h3{margin:0}
.section-head p{margin:4px 0 0;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:0 6px 18px rgba(18,32,25,.04)}
.kpi strong{font-size:28px;display:block;margin-top:8px}
.kpi small{color:var(--muted)}
.product{display:flex;flex-direction:column;min-height:250px}
.product-emoji{font-size:48px;background:#f5f7f5;border-radius:16px;display:grid;place-items:center;height:95px;margin-bottom:14px}
.product h4{margin:0 0 4px}
.product p{margin:0;color:var(--muted);font-size:13px}
.product-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:16px}
.price{font-size:20px;font-weight:900}
.btn{background:var(--green);color:white}
.secondary{background:#eff3f0;color:var(--ink)}
.danger{background:#ffe7e7;color:#a41d1d}
.mini{padding:8px 10px;background:#edf3ef}
.toolbar{display:flex;gap:10px;flex-wrap:wrap}
.search{flex:1;min-width:220px;border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:white}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px}
.chip{border:1px solid var(--line);background:white;border-radius:999px;padding:9px 13px;font-weight:700}
.chip.active{background:var(--green);color:white;border-color:var(--green)}
.dashboard-layout{display:grid;grid-template-columns:240px 1fr;gap:18px}
.sidebar{background:#122018;color:#fff;border-radius:22px;padding:16px;height:max-content;position:sticky;top:86px}
.sidebar h3{margin:8px 10px 14px}
.navbtn{width:100%;text-align:left;border:0;background:transparent;color:#dce8e0;padding:12px;border-radius:11px;font-weight:700}
.navbtn.active,.navbtn:hover{background:#20342a;color:white}
.table-wrap{overflow:auto;background:white;border-radius:18px;border:1px solid var(--line)}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:13px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:12px;text-transform:uppercase;color:var(--muted);background:#fafbfa}
.badge{display:inline-block;padding:6px 9px;border-radius:999px;font-size:12px;font-weight:900}
.badge.green{background:#dff5e7;color:#08703d}
.badge.yellow{background:#fff1bd;color:#7c5b00}
.badge.red{background:#ffe4e4;color:#a22020}
.badge.gray{background:#eef0ef;color:#56605a}
.badge.blue{background:#e0efff;color:#155b9b}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.field label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}
.field input,.field select,.field textarea{
  width:100%;border:1px solid var(--line);border-radius:12px;padding:11px;background:white
}
.full{grid-column:1/-1}
.modal{
  position:fixed;inset:0;background:rgba(10,20,15,.48);display:grid;place-items:center;z-index:50;padding:20px
}
.hidden{display:none!important}
.modal-card{position:relative;background:white;border-radius:24px;padding:25px;max-width:640px;width:100%;max-height:90vh;overflow:auto}
.modal-close{position:absolute;right:14px;top:12px;border:0;background:#f1f3f1;border-radius:50%;width:36px;height:36px;font-size:22px}
.cart-item{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid var(--line)}
.qty{display:flex;align-items:center;gap:8px}
.qty button{border:0;border-radius:8px;width:28px;height:28px}
.total-box{margin-top:16px;background:#f4f8f5;border-radius:16px;padding:16px}
.total-line{display:flex;justify-content:space-between;margin:7px 0}
.total-line.big{font-size:22px;font-weight:900}
.toast{
  position:fixed;right:18px;bottom:18px;background:#13221a;color:white;padding:13px 16px;border-radius:12px;
  z-index:100;opacity:0;transform:translateY(10px);transition:.25s;pointer-events:none
}
.toast.show{opacity:1;transform:none}
.empty{text-align:center;padding:35px;color:var(--muted)}
.banner{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  background:linear-gradient(90deg,#fff6cf,#fff);border:1px solid #f2df8b;border-radius:18px;padding:18px;margin:18px 0
}
@media(max-width:900px){
  .hero{grid-template-columns:1fr}
  .grid{grid-template-columns:repeat(2,1fr)}
  .dashboard-layout{grid-template-columns:1fr}
  .sidebar{position:static;display:flex;overflow:auto;gap:5px}
  .sidebar h3{display:none}
  .navbtn{white-space:nowrap;width:auto}
}
@media(max-width:600px){
  .topbar{padding:11px 12px}
  .brand small{display:none}
  #app{padding:14px}
  .hero-main{padding:24px;min-height:240px}
  .grid{grid-template-columns:1fr 1fr;gap:10px}
  .product{min-height:220px;padding:13px}
  .product-emoji{height:80px;font-size:40px}
  .form-grid{grid-template-columns:1fr}
  .full{grid-column:auto}
}


.product-thumb{
  width:100%;
  height:130px;
  object-fit:cover;
  border-radius:18px;
  margin-bottom:14px;
  border:1px solid var(--line);
  background:#f7f9fb;
  box-shadow:0 10px 20px rgba(18,32,25,.08);
}
.owner-product-thumb{
  width:86px;
  height:86px;
  object-fit:cover;
  border-radius:18px;
  border:1px solid var(--line);
  background:#f7f9fb;
  box-shadow:0 10px 20px rgba(18,32,25,.08);
}
.mini-thumb{
  width:54px;
  height:54px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--line);
  background:#f7f9fb;
  flex-shrink:0;
}


.product{
  padding:16px;
  border-radius:24px;
  box-shadow:0 12px 30px rgba(18,32,25,.07);
}
.product h4{
  font-size:17px;
  margin:0 0 6px;
}
.product p{
  min-height:34px;
}
.product-thumb{
  width:100%;
  height:180px;
  object-fit:contain;
  border-radius:20px;
  margin-bottom:14px;
  border:1px solid #e7ecef;
  background:linear-gradient(180deg,#ffffff 0%,#f6f9fb 100%);
  padding:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 10px 24px rgba(18,32,25,.06);
}
.owner-product-thumb{
  width:96px;
  height:96px;
  object-fit:contain;
  border-radius:20px;
  border:1px solid #e7ecef;
  background:linear-gradient(180deg,#ffffff 0%,#f6f9fb 100%);
  padding:10px;
  box-shadow:0 10px 24px rgba(18,32,25,.06);
}
.mini-thumb{
  width:58px;
  height:58px;
  object-fit:contain;
  border-radius:14px;
  border:1px solid #e7ecef;
  background:linear-gradient(180deg,#ffffff 0%,#f6f9fb 100%);
  padding:6px;
  flex-shrink:0;
}
.product-footer{
  gap:12px;
}
.price{
  font-size:22px;
}


.admin-product-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.admin-product-card{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.admin-product-image{
  width:100%;
  height:180px;
  object-fit:contain;
  border-radius:18px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fff 0%,#f6f9fb 100%);
  padding:12px;
}
.admin-product-info h3{
  margin:0 0 4px;
}
.admin-product-info p{
  margin:0 0 12px;
  color:var(--muted);
  font-size:13px;
}
@media(max-width:900px){
  .admin-product-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .admin-product-grid{grid-template-columns:1fr}
}


.admin-images-panel{
  margin-top:28px;
  padding-top:22px;
  border-top:2px solid var(--line);
}
.admin-images-panel .section-head{
  margin-top:0;
}


.admin-product-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:10px;
}
.admin-delete-product{
  width:100%;
  padding:12px 14px;
  font-weight:900;
  border:2px solid #e8b5b5;
}
.admin-action-label{
  margin-top:6px;
  margin-bottom:2px;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}


.client-preview-banner{
  background:#f4fbff;
  border-color:#cfe8f6;
}
.pending-price{
  font-size:14px !important;
  color:var(--muted);
}
.client-product-card .product-thumb{
  width:100%;
  height:170px;
  object-fit:contain;
}
@media(max-width:560px){
  .client-product-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:10px;
  }
  .client-product-card{
    min-width:0;
    padding:11px;
  }
  .client-product-card .product-thumb{
    height:135px;
  }
  .client-product-card h4{
    font-size:14px;
    line-height:1.2;
  }
  .client-product-card .product-footer{
    align-items:flex-start;
    flex-direction:column;
  }
  .client-product-card .product-footer button{
    width:100%;
  }
}


.client-product-grid{
  grid-template-columns:1fr !important;
  gap:18px !important;
  max-width:760px;
  margin:0 auto;
}
.client-product-card{
  max-width:640px;
  margin:0 auto;
  width:100%;
}
.client-product-card .product-thumb{
  width:100%;
  max-width:500px;
  height:500px;
  object-fit:contain;
  display:block;
  margin:0 auto 16px auto;
  background:linear-gradient(180deg,#ffffff 0%,#f6f9fb 100%);
  border:1px solid #e7ecef;
  border-radius:22px;
  padding:14px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 10px 24px rgba(18,32,25,.06);
}
.client-product-card h4{
  font-size:20px;
  margin-bottom:8px;
}
.client-product-card p{
  font-size:15px;
}
.client-product-card .price{
  font-size:24px;
}
@media(max-width:560px){
  .client-product-grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
    max-width:100%;
  }
  .client-product-card{
    max-width:100%;
  }
  .client-product-card .product-thumb{
    width:100%;
    max-width:500px;
    height:500px;
  }
}


/* =========================================================
   ELCOLMA2 v0.34 - AJUSTE REAL PARA CELULAR
   ========================================================= */

body{
  overflow-x:hidden;
}

.client-product-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:16px !important;
  width:100%;
  max-width:760px;
  margin:0 auto;
}

.client-product-card{
  width:100%;
  max-width:680px;
  margin:0 auto;
  padding:16px !important;
  border-radius:24px;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  text-align:center !important;
  overflow:hidden;
}

.client-product-card .product-thumb{
  display:block !important;
  width:min(100%, 500px) !important;
  max-width:500px !important;
  aspect-ratio:1 / 1 !important;
  height:auto !important;
  min-height:0 !important;
  object-fit:contain !important;
  margin:0 auto 16px auto !important;
  padding:14px !important;
  border-radius:24px !important;
  background:linear-gradient(180deg,#ffffff 0%,#f6f9fb 100%) !important;
  border:1px solid #e7ecef !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82), 0 12px 26px rgba(18,32,25,.07) !important;
}

.client-product-card h4{
  width:100%;
  margin:0 0 8px 0 !important;
  text-align:center !important;
  font-size:22px !important;
  line-height:1.2 !important;
  word-break:break-word;
}

.client-product-card p{
  width:100%;
  min-height:auto !important;
  margin:0 0 10px 0 !important;
  text-align:center !important;
  font-size:15px !important;
  line-height:1.35 !important;
  color:var(--muted);
}

.client-product-card .product-footer{
  width:100% !important;
  margin-top:6px !important;
  padding-top:10px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:12px !important;
}

.client-product-card .price{
  font-size:24px !important;
  line-height:1.1 !important;
  text-align:center !important;
}

.client-product-card .pending-price{
  font-size:16px !important;
}

.client-product-card .btn,
.client-product-card .secondary,
.client-product-card .danger,
.client-product-card .mini{
  width:min(100%, 280px) !important;
  justify-content:center;
}

.client-preview-banner{
  align-items:flex-start;
  flex-direction:column;
}

@media(max-width:700px){
  #app{
    padding:12px !important;
  }

  .client-product-grid{
    gap:14px !important;
    max-width:100%;
  }

  .client-product-card{
    max-width:100%;
    padding:14px !important;
    border-radius:20px;
  }

  .client-product-card .product-thumb{
    width:min(100%, 500px) !important;
    max-width:500px !important;
    aspect-ratio:1 / 1 !important;
    height:auto !important;
    padding:12px !important;
    border-radius:20px !important;
  }

  .client-product-card h4{
    font-size:19px !important;
  }

  .client-product-card p{
    font-size:14px !important;
  }

  .client-product-card .price{
    font-size:22px !important;
  }
}

@media(max-width:430px){
  .topbar{
    gap:10px;
    align-items:flex-start;
  }

  .top-actions{
    width:100%;
    justify-content:flex-end;
  }

  .client-product-card{
    padding:12px !important;
  }

  .client-product-card .product-thumb{
    width:100% !important;
    max-width:500px !important;
    aspect-ratio:1 / 1 !important;
    height:auto !important;
    padding:10px !important;
    margin:0 auto 14px auto !important;
  }

  .client-product-card h4{
    font-size:18px !important;
  }

  .client-product-card p{
    font-size:14px !important;
  }

  .client-product-card .price{
    font-size:21px !important;
  }

  .client-product-card .btn,
  .client-product-card .secondary,
  .client-product-card .danger,
  .client-product-card .mini{
    width:100% !important;
  }

  .client-preview-banner .secondary,
  .banner .secondary,
  .banner .btn{
    width:100%;
  }
}


/* v0.36 - selector de cantidad / libras para Cliente */
.client-add-modal{
  text-align:center;
}
.client-add-image{
  display:block;
  width:min(100%,280px);
  aspect-ratio:1/1;
  object-fit:contain;
  margin:0 auto 12px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  padding:10px;
}
.client-option-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}
.client-choice-card{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:12px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
}
.client-choice-text{
  display:flex;
  flex-direction:column;
  gap:3px;
  flex:1;
}
.client-choice-text span{
  color:var(--muted);
  font-size:13px;
}
.weight-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}
.weight-option{
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:16px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}
.weight-option b{
  font-size:18px;
}
.weight-option span{
  font-size:13px;
  color:var(--muted);
}
.quantity-picker{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:18px auto 8px;
}
.quantity-picker button{
  width:52px;
  height:52px;
  border:0;
  border-radius:14px;
  background:#edf3ef;
  font-size:26px;
  font-weight:900;
}
.quantity-picker input{
  width:90px;
  height:52px;
  border:1px solid var(--line);
  border-radius:14px;
  text-align:center;
  font-size:22px;
  font-weight:900;
}
.client-unit-label{
  color:var(--muted);
  font-size:14px;
  margin-top:6px;
}
.client-selected-total{
  font-size:25px;
  font-weight:900;
  margin:14px 0;
}
.client-add-confirm{
  width:100%;
  max-width:320px;
}
.client-cart-row{
  align-items:center;
}
@media(max-width:520px){
  .weight-options{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .modal{
    padding:10px;
  }
  .modal-card{
    padding:20px 14px;
    border-radius:20px;
  }
  .client-add-image{
    width:min(100%,240px);
  }
}


/* v0.37 - selector de libras con menos / más */
.pound-picker button{
  width:58px;
  height:58px;
  font-size:28px;
}
.pound-picker input{
  width:110px;
  height:58px;
  font-size:22px;
}


/* v0.39 - buscador de productos más atractivo */
.client-search-wrap{
  max-width:760px;
  margin:0 auto 16px auto;
}
.client-search-box{
  display:flex;
  align-items:center;
  gap:10px;
  background:linear-gradient(180deg,#ffffff 0%,#f7fbf8 100%);
  border:2px solid #dfe9e2;
  border-radius:20px;
  padding:10px 12px;
  box-shadow:0 10px 24px rgba(18,32,25,.06);
}
.client-search-box:focus-within{
  border-color:#4aa66a;
  box-shadow:0 0 0 4px rgba(74,166,106,.12), 0 10px 24px rgba(18,32,25,.06);
}
.client-search-icon{
  font-size:22px;
  line-height:1;
  flex-shrink:0;
}
.client-search-input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  font-size:17px;
  font-weight:700;
  color:var(--ink);
}
.client-search-input::placeholder{
  color:#93a39a;
  font-weight:600;
}
.client-search-clear{
  width:38px;
  height:38px;
  border:0;
  border-radius:12px;
  background:#edf3ef;
  color:#55685d;
  font-size:17px;
  font-weight:900;
  flex-shrink:0;
  visibility:hidden;
  opacity:.45;
}
.client-search-hint{
  margin-top:8px;
  padding-left:4px;
  color:var(--muted);
  font-size:13px;
}
@media(max-width:520px){
  .client-search-wrap{
    margin-bottom:14px;
  }
  .client-search-box{
    padding:9px 10px;
    border-radius:18px;
  }
  .client-search-icon{
    font-size:20px;
  }
  .client-search-input{
    font-size:16px;
  }
  .client-search-clear{
    width:34px;
    height:34px;
    border-radius:10px;
  }
  .client-search-hint{
    font-size:12px;
  }
}


/* v0.40 - buscador reparado y rediseñado */
.client-search-hero{
  max-width:760px;
  margin:0 auto 20px auto;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(135deg,#0e8a4b 0%,#12a85e 100%);
  box-shadow:0 16px 34px rgba(14,138,75,.18);
}
.client-search-title{
  color:#fff;
  font-size:20px;
  font-weight:900;
  margin-bottom:12px;
}
.client-search-hero .client-search-box{
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:0;
  border-radius:18px;
  padding:8px;
  box-shadow:none;
}
.client-search-hero .client-search-input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  padding:11px 12px;
  font-size:17px;
  font-weight:800;
  color:var(--ink);
}
.client-search-hero .client-search-input::placeholder{
  color:#9aa8a0;
  font-weight:650;
}
.client-search-hero .client-search-clear{
  display:none;
  align-items:center;
  justify-content:center;
  width:auto;
  height:40px;
  padding:0 14px;
  border:0;
  border-radius:12px;
  background:#eef3ef;
  color:#304238;
  font-size:13px;
  font-weight:900;
  visibility:visible;
  opacity:1;
}
.client-search-message{
  margin-top:10px;
  color:#eafff1;
  font-size:13px;
  font-weight:700;
}
.client-product-hidden{
  display:none !important;
}
.client-no-results{
  max-width:760px;
  margin:20px auto;
  text-align:center;
  padding:30px 18px;
  border-radius:22px;
  background:#fff;
  border:1px solid var(--line);
}
.client-no-results-icon{
  font-size:42px;
  margin-bottom:6px;
}
.client-no-results h3{
  margin:0 0 6px;
}
.client-no-results p{
  margin:0;
  color:var(--muted);
}
@media(max-width:520px){
  .client-search-hero{
    padding:14px;
    border-radius:20px;
    margin-bottom:16px;
  }
  .client-search-title{
    font-size:18px;
  }
  .client-search-hero .client-search-input{
    font-size:16px;
    padding:10px;
  }
  .client-search-hero .client-search-clear{
    height:38px;
    padding:0 11px;
  }
}


/* v0.41 - más opciones rápidas de libra */
.pound-quick-options{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:14px 0 16px;
}
.pound-quick-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  border-radius:14px;
  padding:11px 6px;
  font-weight:900;
  font-size:14px;
}
.pound-quick-btn:hover,
.pound-quick-btn:active{
  background:#e7f6ed;
  border-color:#a9d8ba;
}
@media(max-width:520px){
  .pound-quick-options{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
  }
  .pound-quick-btn{
    padding:10px 4px;
    font-size:13px;
  }
}


/* v0.42 - sin zoom en toda la app */
html, body{
  touch-action:manipulation;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
input,
select,
textarea,
button{
  font-size:16px;
}
img{
  touch-action:manipulation;
  -webkit-user-drag:none;
  user-select:none;
}


/* v0.43 - presentación principal en Cliente */
.client-hero-banner{
  max-width:900px;
  margin:0 auto 22px auto;
  padding:24px;
  border-radius:26px;
  background:linear-gradient(135deg,#0c6c3c 0%,#0fa65a 100%);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  box-shadow:0 18px 42px rgba(14,138,75,.20);
}
.client-hero-copy{
  min-width:0;
}
.client-hero-kicker{
  display:inline-flex;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.15);
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.client-hero-banner h2{
  margin:0 0 14px 0;
  font-size:clamp(26px,5vw,42px);
  line-height:1.02;
  max-width:620px;
}
.client-hero-features{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.client-hero-features span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:8px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:13px;
  font-weight:800;
}
.client-hero-exit{
  flex-shrink:0;
  border:0;
  border-radius:14px;
  padding:11px 14px;
  background:#fff;
  color:#17452b;
  font-weight:900;
}
@media(max-width:600px){
  .client-hero-banner{
    flex-direction:column;
    align-items:stretch;
    padding:18px;
    border-radius:22px;
  }
  .client-hero-banner h2{
    font-size:30px;
  }
  .client-hero-exit{
    width:100%;
  }
}


/* v0.47 - SIN ZOOM PERO CON SCROLL VERTICAL */
html,
body,
#app,
.dashboard-layout,
.sidebar,
.card,
.modal,
.modal-card,
.banner,
.client-hero-banner,
.client-search-hero{
  touch-action:pan-y !important;
  -webkit-text-size-adjust:100% !important;
  text-size-adjust:100% !important;
}

input,
select,
textarea,
button{
  font-size:16px !important;
  touch-action:manipulation !important;
}

img,
.product-thumb,
.owner-product-thumb,
.admin-product-image,
.client-add-image{
  touch-action:pan-y !important;
  -webkit-user-drag:none !important;
  user-select:none !important;
}

*{
  -webkit-tap-highlight-color:transparent;
}


/* =========================================================
   v0.48 - PANEL COLMADO OPTIMIZADO PARA CELULAR
   ========================================================= */

.owner-order-cards,
.owner-customer-cards{
  display:none;
}

@media(max-width:700px){
  .owner-dashboard{
    display:block !important;
    width:100%;
    min-width:0;
  }

  .owner-dashboard > section{
    width:100%;
    min-width:0;
    overflow:hidden;
  }

  .owner-sidebar{
    position:sticky !important;
    top:68px !important;
    z-index:15;
    display:flex !important;
    gap:7px !important;
    width:calc(100vw - 24px);
    max-width:100%;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:9px !important;
    margin:0 0 14px 0 !important;
    border-radius:16px !important;
    background:#122018 !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .owner-sidebar::-webkit-scrollbar{
    display:none;
  }

  .owner-sidebar h3{
    display:none !important;
  }

  .owner-sidebar .navbtn{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:max-content;
    padding:10px 12px !important;
    border-radius:11px !important;
    font-size:13px !important;
    white-space:nowrap !important;
  }

  .owner-dashboard .section-head{
    align-items:stretch !important;
    flex-direction:column !important;
    gap:10px !important;
    margin:14px 0 12px !important;
  }

  .owner-dashboard .section-head h2{
    font-size:24px;
    line-height:1.08;
  }

  .owner-dashboard .section-head h3{
    font-size:20px;
  }

  .owner-dashboard .section-head .toolbar{
    width:100%;
    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:8px !important;
  }

  .owner-dashboard .section-head .toolbar > button{
    width:100% !important;
    min-width:0;
    padding:11px 9px !important;
  }

  .owner-dashboard .grid{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .owner-dashboard .kpi{
    min-height:auto !important;
    padding:15px !important;
  }

  .owner-dashboard .kpi strong{
    font-size:25px !important;
  }

  .owner-dashboard .banner{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:14px !important;
  }

  .owner-dashboard .banner button{
    width:100% !important;
  }

  /* Mi link */
  .owner-dashboard .field input{
    font-size:16px !important;
    width:100%;
  }

  .owner-dashboard .card .toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100%;
  }

  .owner-dashboard .card .toolbar button{
    width:100% !important;
  }

  /* Pedidos */
  .owner-orders-table{
    display:none !important;
  }

  .owner-order-cards{
    display:flex !important;
    flex-direction:column;
    gap:10px;
  }

  .owner-order-card{
    padding:14px !important;
  }

  .owner-order-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
  }

  .owner-order-top > div:first-child{
    display:flex;
    flex-direction:column;
    gap:3px;
  }

  .owner-order-top small{
    color:var(--muted);
  }

  .owner-order-customer{
    margin:12px 0;
    font-size:17px;
    font-weight:900;
  }

  .owner-order-details{
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
    background:#f7f9f7;
    border-radius:14px;
    padding:10px;
  }

  .owner-order-details > div{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
  }

  .owner-order-details span{
    color:var(--muted);
    font-size:13px;
  }

  .owner-order-action{
    margin-top:10px;
  }

  .owner-order-action button,
  .owner-order-action .badge{
    width:100%;
    text-align:center;
    display:block;
    padding:11px 10px;
  }

  /* Productos */
  .owner-dashboard .owner-product-thumb{
    width:120px !important;
    height:120px !important;
    display:block;
    margin:0 auto 10px auto;
  }

  .owner-dashboard .card > div:first-child{
    min-width:0;
  }

  .owner-dashboard .card > div[style*="justify-content:space-between"]{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .owner-dashboard .card > div[style*="justify-content:space-between"] > div:first-child{
    text-align:center;
  }

  .owner-dashboard .card > div[style*="justify-content:space-between"] .toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100%;
  }

  .owner-dashboard .card > div[style*="justify-content:space-between"] .toolbar button{
    width:100% !important;
  }

  .owner-dashboard .table-wrap{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    border-radius:14px;
  }

  .owner-dashboard .table-wrap table{
    min-width:620px;
  }

  /* Clientes */
  .owner-customers-table{
    display:none !important;
  }

  .owner-customer-cards{
    display:flex !important;
    flex-direction:column;
    gap:9px;
  }

  .owner-customer-card{
    display:flex;
    flex-direction:column;
    gap:5px;
    padding:14px !important;
  }

  .owner-customer-card b{
    font-size:17px;
  }

  .owner-customer-card span{
    color:var(--muted);
    font-size:14px;
  }

  /* Notificaciones */
  .owner-dashboard .cart-item{
    align-items:flex-start !important;
    flex-direction:column !important;
  }

  /* Modales usados desde Colmado */
  .modal-card{
    width:calc(100vw - 20px) !important;
    max-width:100% !important;
    padding:20px 14px !important;
  }

  .modal-card .form-grid{
    grid-template-columns:1fr !important;
  }

  .modal-card .full{
    grid-column:auto !important;
  }

  .modal-card .toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .modal-card .toolbar button{
    width:100% !important;
  }
}

@media(max-width:430px){
  .owner-sidebar{
    top:64px !important;
  }

  .owner-sidebar .navbtn{
    font-size:12px !important;
    padding:9px 10px !important;
  }

  .owner-dashboard .section-head .toolbar{
    grid-template-columns:1fr !important;
  }

  .owner-dashboard .section-head h2{
    font-size:22px;
  }
}


/* v0.49 - menú Colmado verde con E2 */
.owner-sidebar{
  background:linear-gradient(135deg,#0c6c3c 0%,#0fa65a 100%) !important;
  color:#fff !important;
  box-shadow:0 14px 32px rgba(14,138,75,.20);
}
.owner-sidebar-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 8px 14px;
  margin-bottom:6px;
  border-bottom:1px solid rgba(255,255,255,.18);
}
.owner-sidebar-logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:#fff;
  color:#0e8a4b;
  display:grid;
  place-items:center;
  font-weight:1000;
  font-size:18px;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  flex:0 0 auto;
}
.owner-sidebar-title b{
  display:block;
  color:#fff;
  font-size:16px;
}
.owner-sidebar-title span{
  display:block;
  color:#ddf8e8;
  font-size:12px;
  margin-top:2px;
}
.owner-sidebar .navbtn{
  color:#ecfff3 !important;
}
.owner-sidebar .navbtn.active,
.owner-sidebar .navbtn:hover{
  background:rgba(255,255,255,.18) !important;
  color:#fff !important;
}

@media(max-width:700px){
  .owner-sidebar{
    align-items:center !important;
  }
  .owner-sidebar-brand{
    flex:0 0 auto;
    padding:0 5px 0 0;
    margin:0;
    border-bottom:0;
  }
  .owner-sidebar-title{
    display:none;
  }
  .owner-sidebar-logo{
    width:36px;
    height:36px;
    border-radius:11px;
    font-size:15px;
  }
}


/* =========================================================
   v0.50 - Productos del Colmado con la misma vista de Cliente
   ========================================================= */
.owner-clientstyle-products{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  max-width:760px;
  margin:0 auto;
}

.owner-clientstyle-card{
  width:100%;
  max-width:680px;
  margin:0 auto;
  padding:16px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  text-align:center !important;
  overflow:hidden;
}

.owner-clientstyle-status{
  width:100%;
  display:flex;
  justify-content:flex-end;
  margin-bottom:10px;
}

.owner-clientstyle-image{
  width:min(100%,500px) !important;
  max-width:500px !important;
  aspect-ratio:1 / 1 !important;
  height:auto !important;
  object-fit:contain !important;
  display:block !important;
  margin:0 auto 16px !important;
  padding:14px !important;
}

.owner-clientstyle-card h4{
  width:100%;
  text-align:center !important;
  font-size:22px !important;
  margin:0 0 8px !important;
}

.owner-clientstyle-card > p{
  width:100%;
  text-align:center !important;
  margin:0 0 8px !important;
  font-size:15px !important;
  min-height:0 !important;
}

.owner-clientstyle-price{
  width:100%;
  text-align:center;
  font-size:24px;
  font-weight:900;
  margin:2px 0 14px;
}

.owner-clientstyle-actions{
  width:100%;
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:4px;
}

.owner-clientstyle-actions button{
  width:100% !important;
}

.owner-variants-box{
  width:100%;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
  text-align:left;
}

.owner-variants-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.owner-variants-title span{
  display:grid;
  place-items:center;
  min-width:30px;
  height:30px;
  border-radius:999px;
  background:#edf3ef;
  color:var(--ink);
  font-size:13px;
  font-weight:900;
}

.owner-variant-list{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.owner-variant-card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#fafcfb;
}

.owner-variant-main{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.owner-variant-main b{
  font-size:16px;
}

.owner-variant-main span{
  color:var(--muted);
  font-size:13px;
}

.owner-variant-state{
  margin:9px 0;
}

.owner-variant-actions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:7px;
}

.owner-variant-actions button{
  width:100% !important;
  min-width:0;
  padding:9px 6px !important;
}

.owner-no-variants{
  padding:14px !important;
  background:#f8faf8;
  border-radius:14px;
}

@media(max-width:700px){
  .owner-clientstyle-products{
    max-width:100%;
    gap:14px;
  }

  .owner-clientstyle-card{
    max-width:100%;
    padding:12px !important;
  }

  .owner-clientstyle-image{
    width:100% !important;
    max-width:500px !important;
    aspect-ratio:1 / 1 !important;
    height:auto !important;
    padding:10px !important;
  }

  .owner-clientstyle-card h4{
    font-size:19px !important;
  }

  .owner-clientstyle-price{
    font-size:22px;
  }

  .owner-variant-actions{
    grid-template-columns:1fr;
  }
}


/* v0.52 - Inventario del Colmado */
.owner-stock-box{
  width:100%;
  margin:4px 0 14px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f7fbf8;
  text-align:center;
}
.owner-stock-label{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  margin-bottom:4px;
}
.owner-stock-value{
  font-size:24px;
  font-weight:1000;
  color:#0e8a4b;
  margin-bottom:10px;
}
.owner-stock-value.stock-low{color:#b67a00;}
.owner-stock-value.stock-empty{color:#b42318;}
.owner-stock-controls{
  display:grid;
  grid-template-columns:56px 1fr 56px;
  gap:8px;
}
.owner-stock-controls button{width:100% !important;}
.owner-stock-warning{
  margin-top:9px;
  font-size:13px;
  font-weight:900;
  color:#b42318;
}
@media(max-width:700px){
  .owner-stock-box{padding:12px;}
  .owner-stock-controls{grid-template-columns:52px 1fr 52px;}
}


/* v0.53 - INVENTARIO MUY VISIBLE EN COLMADO > PRODUCTOS */
.inventory-panel{
  width:100%;
  border:2px solid #0f9b55;
  background:#eefaf3;
  border-radius:18px;
  padding:16px;
  margin:8px 0 16px;
  text-align:center;
}
.inventory-title{
  font-size:16px;
  font-weight:900;
  color:#0c6c3c;
  margin-bottom:4px;
}
.inventory-count{
  font-size:36px;
  line-height:1;
  font-weight:1000;
  color:#0c6c3c;
  margin:6px 0;
}
.inventory-unit{
  color:var(--muted);
  font-size:13px;
  margin-bottom:12px;
}
.inventory-controls{
  display:grid;
  grid-template-columns:54px 1fr 54px;
  gap:8px;
}
.inventory-controls button{
  width:100% !important;
}
.inventory-step{
  border:none;
  border-radius:13px;
  background:#0f9b55;
  color:#fff;
  font-size:22px !important;
  font-weight:1000;
}
.inventory-edit{
  border:1px solid #0f9b55;
  border-radius:13px;
  background:#fff;
  color:#0c6c3c;
  font-weight:900;
}
.inventory-alert{
  margin-top:10px;
  padding:8px 10px;
  border-radius:10px;
  font-weight:900;
  background:#fff3f0;
  color:#b42318;
}
.inventory-low{
  border-color:#d99b00;
  background:#fff9e8;
}
.inventory-low .inventory-title,
.inventory-low .inventory-count{
  color:#a36d00;
}
.inventory-empty{
  border-color:#c63c2f;
  background:#fff3f0;
}
.inventory-empty .inventory-title,
.inventory-empty .inventory-count{
  color:#b42318;
}
@media(max-width:700px){
  .inventory-panel{
    padding:14px;
  }
  .inventory-count{
    font-size:34px;
  }
}


/* v0.56 - INVENTARIO SEPARADO ESTABLE */
.inventory-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:14px;
}
.inventory-summary-card{
  padding:14px !important;
  text-align:center;
}
.inventory-summary-card span{
  display:block;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}
.inventory-summary-card strong{
  display:block;
  margin-top:4px;
  font-size:28px;
  color:#0c6c3c;
}
.inventory-summary-low strong{color:#a36d00;}
.inventory-summary-empty strong{color:#b42318;}

.inventory-search-box{
  margin-bottom:14px;
}
.inventory-search-box input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px 14px;
  background:#fff;
}

.supermarket-inventory-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.supermarket-inventory-card{
  display:grid !important;
  grid-template-columns:78px minmax(0,1fr) 88px 235px;
  align-items:center !important;
  gap:12px;
  padding:12px !important;
  text-align:left !important;
}

.inventory-product-image{
  width:78px !important;
  height:78px !important;
  object-fit:contain;
  border-radius:14px;
  background:#f8faf8;
  padding:6px;
}

.inventory-product-info h4{
  margin:0 0 4px !important;
  font-size:17px !important;
  text-align:left !important;
}
.inventory-product-meta{
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}

.inventory-chip{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}
.inventory-chip.ok{background:#e8f7ee;color:#0c6c3c;}
.inventory-chip.low{background:#fff5d8;color:#9a6700;}
.inventory-chip.empty{background:#fff0ed;color:#b42318;}

.inventory-stock-column{
  text-align:center;
}
.inventory-stock-number{
  font-size:29px;
  line-height:1;
  font-weight:1000;
  color:#0c6c3c;
}
.inventory-stock-unit{
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}

.inventory-stock-actions{
  display:grid;
  grid-template-columns:48px 1fr 48px;
  gap:7px;
}
.inventory-stock-actions button{
  width:100% !important;
}
.inventory-step{
  border:0;
  border-radius:12px;
  background:#0f9b55;
  color:#fff;
  font-size:21px !important;
  font-weight:1000;
}
.inventory-edit{
  border:1px solid #0f9b55;
  border-radius:12px;
  background:#fff;
  color:#0c6c3c;
  font-weight:900;
}

@media(max-width:700px){
  .inventory-summary-grid{
    grid-template-columns:repeat(3,1fr) !important;
    gap:7px;
  }
  .inventory-summary-card{
    padding:10px 5px !important;
  }
  .inventory-summary-card strong{
    font-size:23px;
  }
  .supermarket-inventory-card{
    grid-template-columns:70px minmax(0,1fr) 70px !important;
    gap:9px !important;
  }
  .inventory-product-image{
    width:70px !important;
    height:70px !important;
  }
  .inventory-stock-actions{
    grid-column:1 / -1;
    grid-template-columns:52px 1fr 52px;
  }
}


/* v0.57 - Nueva venta e historial */
.sale-search-box{
  margin-bottom:14px;
}
.sale-search-box input{
  width:100%;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

.sale-layout{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(320px,.8fr);
  gap:14px;
  align-items:start;
}

.sale-products{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.sale-product-card{
  display:grid !important;
  grid-template-columns:72px minmax(0,1fr) 110px;
  align-items:center !important;
  gap:12px;
  padding:10px !important;
  text-align:left !important;
}

.sale-product-card img{
  width:72px !important;
  height:72px !important;
  object-fit:contain;
  border-radius:12px;
  background:#f8faf8;
  padding:5px;
}

.sale-product-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.sale-product-info h4{
  margin:0 !important;
  text-align:left !important;
  font-size:16px !important;
}

.sale-product-info span{
  font-weight:800;
}

.sale-product-info small{
  color:var(--muted);
}

.sale-cart{
  position:sticky;
  top:82px;
  padding:14px !important;
}

.sale-cart h3{
  margin-top:0;
}

.sale-cart-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:8px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}

.sale-cart-row > div:first-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.sale-cart-row span{
  color:var(--muted);
  font-size:12px;
}

.sale-cart-qty{
  display:grid;
  grid-template-columns:36px 30px 36px;
  align-items:center;
  gap:4px;
}

.sale-cart-qty button{
  padding:6px !important;
  min-width:0;
}

.sale-cart-qty b{
  text-align:center;
}

.sale-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:14px;
  padding-top:12px;
  border-top:2px solid var(--line);
}

.sale-total strong{
  font-size:24px;
  color:#0c6c3c;
}

.sale-complete-btn{
  width:100% !important;
  margin-top:12px;
}

.sales-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:14px;
}

.sales-summary .card{
  text-align:center;
  padding:14px !important;
}

.sales-summary span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.sales-summary strong{
  display:block;
  margin-top:4px;
  font-size:26px;
  color:#0c6c3c;
}

.sales-history-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sale-history-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.sale-history-head > div{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.sale-history-head span{
  color:var(--muted);
  font-size:12px;
}

.sale-history-head > strong{
  color:#0c6c3c;
  font-size:19px;
}

.sale-history-items{
  margin-top:10px;
  padding-top:8px;
  border-top:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sale-history-items > div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
}

@media(max-width:700px){
  .sale-layout{
    grid-template-columns:1fr;
  }

  .sale-cart{
    position:static;
  }

  .sale-product-card{
    grid-template-columns:64px minmax(0,1fr);
  }

  .sale-product-card img{
    width:64px !important;
    height:64px !important;
  }

  .sale-product-card > button{
    grid-column:1 / -1;
    width:100% !important;
  }

  .sales-summary{
    grid-template-columns:1fr 1fr;
  }

  .sale-cart-row{
    grid-template-columns:1fr;
    gap:6px;
  }

  .sale-cart-qty{
    width:max-content;
  }
}

/* v0.60: venta presencial con el catálogo y selectores de Cliente. */
.counter-sale { min-width:0; padding-bottom:70px; }
.counter-sale-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,350px); gap:18px; align-items:start; }
.counter-sale .counter-sale-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; max-width:none; gap:12px !important; }
.counter-sale .counter-product .product-thumb { width:100% !important; max-width:220px !important; padding:8px !important; }
.counter-sale .counter-product { border-radius:18px; padding:14px !important; }
.counter-sale .counter-product h4 { font-size:18px !important; }
.counter-sale .counter-product .product-footer { width:100%; flex-wrap:wrap; gap:8px; }
.counter-sale .counter-product[hidden], .counter-sale [hidden] { display:none !important; }
.counter-cart-item { display:flex; flex-direction:column; gap:8px; padding:14px 0; border-bottom:1px solid var(--line); }
.counter-cart-item > span { color:var(--muted); font-size:13px; }
.counter-cart-controls { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.counter-cart-controls button { min-height:40px; padding:6px 10px; }
.counter-cart-shortcut { display:none; }
.counter-sale button:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:1100px){
 .counter-sale-layout { grid-template-columns:minmax(0,1fr); }
 .counter-sale-cart { position:static; }
 .counter-cart-shortcut { display:block; position:fixed; bottom:14px; left:50%; transform:translateX(-50%); z-index:30; width:min(90%,440px); box-shadow:0 5px 20px #0003; }
}
@media(max-width:480px){
 .counter-sale .counter-sale-grid { grid-template-columns:1fr !important; }
}

/* v0.63: controles grandes y rápidos, limitados a Nueva venta. */
.counter-sale button, .counter-sale-dialog button { min-height:56px; font-size:18px !important; font-weight:700; touch-action:manipulation; }
.counter-sale .counter-sale-search { position:sticky; top:0; z-index:20; padding:16px; margin-bottom:18px; border:2px solid #b8dfc5; box-shadow:0 4px 12px #0001; }
.counter-sale .client-search-input { min-height:64px; font-size:22px !important; padding:16px !important; }
.counter-sale .client-search-title { font-size:21px !important; }
.counter-sale .client-search-clear { min-width:100px; }
.counter-sale .counter-product .product-footer { display:flex; flex-direction:column; align-items:stretch; gap:10px; }
.counter-sale .counter-product .product-footer .btn { width:100%; min-height:58px; font-size:19px !important; }
.counter-sale .counter-product .price { font-size:23px !important; }
.counter-sale .counter-product .product-thumb { max-width:145px !important; }
.counter-cart-controls { display:grid; grid-template-columns:58px minmax(100px,1fr) 58px; gap:8px; }
.counter-cart-controls > button:first-child, .counter-cart-controls > button:nth-child(3) { font-size:30px !important; min-height:58px; }
.counter-cart-controls > button:nth-child(2) { font-size:20px !important; padding:8px; }
.counter-cart-controls > button:last-child { grid-column:1/-1; min-height:48px; font-size:17px !important; color:#a12d2d; }
.counter-cart-item > b { font-size:20px !important; }
.counter-sale .sale-complete-btn, .counter-sale-dialog .sale-complete-btn { min-height:66px; font-size:23px !important; width:100%; }
.modal-card:has(.counter-sale-dialog) { width:min(680px,96vw); max-height:92dvh; overflow-y:auto; padding:52px 22px 22px !important; }
.modal-card:has(.counter-sale-dialog) .modal-close { width:48px; height:48px; font-size:28px !important; }
.counter-sale-dialog .client-add-image { width:90px; height:90px; object-fit:contain; margin:0 auto 8px; }
.counter-sale-dialog .client-add-modal h2 { font-size:25px !important; margin:8px 0; }
.counter-sale-dialog .pound-quick-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0; }
.counter-sale-dialog .pound-quick-btn { min-height:64px; border:2px solid #94c6a4; background:#f1faf4; color:#14552d; border-radius:12px; font-size:23px !important; }
.counter-sale-dialog .pound-quick-btn:focus { outline:3px solid #208b4e; }
.counter-sale-dialog .quantity-picker { display:grid; grid-template-columns:68px minmax(80px,1fr) 68px; gap:10px; width:100%; max-width:440px; margin:12px auto; }
.counter-sale-dialog .quantity-picker button { width:68px; min-height:68px; font-size:36px !important; }
.counter-sale-dialog .quantity-picker input { width:100%; min-width:0; height:68px; font-size:30px !important; text-align:center; border:2px solid #87b699; border-radius:12px; }
.counter-quantity-label { display:block; font-size:17px !important; font-weight:700; margin-top:16px; }
.counter-sale-dialog .client-add-confirm { width:100%; min-height:66px; font-size:22px !important; position:sticky; bottom:0; box-shadow:0 -5px 12px #fff; }
.counter-sale-dialog .client-choice-card { width:100%; min-height:86px; padding:14px; margin:8px 0; text-align:left; }
.counter-sale-dialog .client-choice-text b { font-size:21px !important; }
.counter-sale-dialog .client-choice-text span { font-size:18px !important; }
.counter-sale-dialog select { min-height:60px; font-size:22px !important; width:100%; }
.counter-keep-shopping { width:100%; margin-top:14px; }
.counter-sale-dialog button:disabled { opacity:.4; cursor:not-allowed; }
.counter-sale .counter-cart-shortcut { min-height:62px; font-size:21px !important; }
@media(min-width:1500px){ .counter-sale .counter-sale-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; } }
@media(max-width:480px){
 .counter-sale .client-search-box { display:flex; gap:8px; flex-wrap:wrap; }
 .counter-sale .client-search-input { flex:1 1 200px; width:100%; }
 .counter-sale .client-search-clear { flex:1 1 80px; }
 .counter-sale-dialog .pound-quick-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .modal-card:has(.counter-sale-dialog) { padding:52px 14px 16px !important; }
}


/* =========================================================
   v0.65 - ESCÁNER + LOTES + CANCELACIÓN DE VENTAS
   ========================================================= */

.scanner-action-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.scanner-action-row button{
  min-height:46px;
}
.scanner-main-button{
  font-weight:1000;
}

.inventory-scanner-panel{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:18px;
  background:linear-gradient(135deg,#eaf8f0,#f8fffb);
  border:1px solid #bfe8cf;
  margin-bottom:14px;
}
.inventory-scanner-panel > div:first-child{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.inventory-scanner-panel span{
  color:var(--muted);
  font-size:13px;
}

.lot-inventory-card{
  grid-template-columns:78px minmax(0,1fr) 86px 310px !important;
}

.product-code-line{
  margin-top:7px;
  font-size:12px;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.lot-summary{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:8px;
}
.lot-chip{
  padding:5px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}
.lot-chip.active{
  background:#e6f7ed;
  color:#0b6d3a;
}
.lot-chip.closed{
  background:#eef0ef;
  color:#758079;
  text-decoration:line-through;
}

.oldest-lot-note{
  margin-top:8px;
  padding:7px 9px;
  border-radius:10px;
  background:#fff5d8;
  color:#835900;
  font-size:12px;
}

.lot-stock-actions{
  grid-template-columns:1fr !important;
}

.receive-lot-banner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:16px;
  background:#eaf8f0;
  padding:14px;
  margin:10px 0 14px;
  font-size:18px;
}
.receive-lot-banner strong{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:14px;
  background:#0f9b55;
  color:#fff;
  font-size:25px;
}

.lot-letter-picker{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin:16px 0;
}
.lot-letter-button{
  min-height:64px;
  border:2px solid #0f9b55;
  border-radius:16px;
  background:#fff;
  color:#0c6c3c;
  font-size:25px !important;
  font-weight:1000;
}

.internal-code-label{
  border:2px dashed #1b2720;
  border-radius:16px;
  background:#fff;
  padding:16px;
  text-align:center;
  margin:12px 0 16px;
}
.internal-code-label svg{
  width:100%;
  max-height:150px;
}
.lot-handwrite-space{
  margin-top:14px;
  font-size:25px;
  font-weight:1000;
  letter-spacing:.06em;
}

.sale-cancelled{
  opacity:.78;
  border-style:dashed !important;
}
.sale-cancelled .sale-history-head > strong{
  text-decoration:line-through;
  color:var(--muted) !important;
}
.sale-cancel-button{
  width:100% !important;
  margin-top:12px;
}
.sale-cancel-record{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px;
  margin-top:10px;
  border-radius:12px;
  background:#f3f4f3;
}
.sale-locked-note{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  text-align:center;
}
.sale-history-item-block{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.sale-history-item-block > div{
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.sale-history-item-block small{
  color:var(--muted);
}

@media(max-width:700px){
  .inventory-scanner-panel{
    flex-direction:column;
    align-items:stretch;
  }
  .scanner-action-row{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .lot-inventory-card{
    grid-template-columns:70px minmax(0,1fr) 70px !important;
  }
  .lot-stock-actions{
    grid-column:1 / -1;
  }
  .lot-letter-picker{
    grid-template-columns:repeat(4,1fr);
  }
}

@media(max-width:430px){
  .scanner-action-row{
    grid-template-columns:1fr;
  }
}


/* v0.71 - escáner continuo tipo supermercado */
.barcode-live-frame{
  position:relative;
  width:100%;
  min-height:270px;
  background:#080c09;
  border:3px solid #1b2b21;
  border-radius:18px;
  overflow:hidden;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.barcode-live-frame video{
  display:block;
  width:100%;
  height:42vh;
  min-height:270px;
  max-height:520px;
  object-fit:cover;
  background:#050505;
}
.barcode-target{
  position:absolute;
  left:8%;
  right:8%;
  top:34%;
  height:30%;
  border:3px solid #28d66d;
  border-radius:14px;
  pointer-events:none;
  box-shadow:0 0 0 9999px rgba(0,0,0,.14);
}
.barcode-target span{
  position:absolute;
  left:8%;
  right:8%;
  top:50%;
  height:2px;
  background:#28d66d;
  box-shadow:0 0 10px rgba(40,214,109,.9);
}
.barcode-live-frame.scan-good{
  border-color:#18bb5a;
  box-shadow:0 0 0 4px rgba(24,187,90,.20);
}
.barcode-live-frame.scan-bad{
  border-color:#d52c2c;
  box-shadow:0 0 0 4px rgba(213,44,44,.18);
}
.camera-last-read{
  margin-top:10px;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px 12px;
  border-radius:12px;
  background:#f1f3f1;
  color:#425147;
  font-weight:900;
}
.camera-last-read.good{
  background:#e5f8ec;
  color:#08763b;
}
.camera-last-read.bad{
  background:#fde9e9;
  color:#a91e1e;
}
.camera-sale-help{
  margin-top:9px;
  color:var(--muted);
  font-size:13px;
  text-align:center;
}


/* v0.72 - mayor sensibilidad del escáner */
.scanner-tip{
  margin:-2px 0 10px;
  padding:8px 10px;
  border-radius:10px;
  background:#eef8f2;
  color:#31513e;
  font-size:12px;
  font-weight:800;
  text-align:center;
}
.barcode-target{
  left:4%;
  right:4%;
  top:29%;
  height:40%;
  border-width:4px;
}
.barcode-target span{
  left:3%;
  right:3%;
}


/* v0.73 - diagnóstico visible del escáner */
.camera-debug-status{
  margin-top:8px;
  padding:7px 10px;
  border-radius:9px;
  background:#121a15;
  color:#c8f5d7;
  font-family:monospace;
  font-size:11px;
  text-align:center;
}
.barcode-target{
  left:3%;
  right:3%;
  top:27%;
  height:45%;
}


/* v0.80 - Inventario Colmado */
.inventory-add-product-btn{
  min-height:48px;
  font-weight:1000;
}
.owner-inventory-simple-list{
  display:grid;
  gap:10px;
}
.owner-inventory-simple-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}
.owner-inventory-simple-main{
  min-width:0;
  flex:1;
}
.owner-inventory-simple-main h3{
  margin:0 0 6px;
}
.owner-inventory-code{
  color:var(--muted);
  font-size:13px;
  overflow-wrap:anywhere;
}
.owner-inventory-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:9px;
}
.owner-inventory-meta span{
  background:#f2f5f3;
  border-radius:999px;
  padding:6px 9px;
  font-size:12px;
}
.inventory-barcode-entry{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.inventory-barcode-entry button{
  min-height:44px;
}

@media(max-width:700px){
  .owner-inventory-simple-card{
    flex-direction:column;
    align-items:stretch;
  }
  .owner-inventory-simple-card > button{
    width:100%;
  }
  .inventory-barcode-entry{
    grid-template-columns:1fr;
  }
}


/* v0.84 - Venta Colmado sin catálogo visible */
.sale-search-only{
  margin-bottom:100px;
}
.sale-compact-results{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.sale-search-result{
  width:100%;
  border:1px solid #dfe6e2;
  background:#fff;
  border-radius:14px;
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  text-align:left;
  cursor:pointer;
}
.sale-search-result-main{
  display:grid;
  gap:3px;
  min-width:0;
}
.sale-search-result-main b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sale-search-result-main small{
  color:var(--muted);
}
.sale-search-result strong{
  white-space:nowrap;
}
.sale-search-empty{
  padding:14px;
}


/* v0.85 - Botones compactos en Venta actual */
.compact-sale-controls{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  margin-top:6px;
}

.compact-sale-controls .sale-mini-btn{
  min-height:30px !important;
  height:30px;
  padding:3px 9px !important;
  border-radius:8px;
  font-size:12px !important;
  line-height:1;
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
}

.compact-sale-controls .sale-step-btn{
  width:30px !important;
  padding:0 !important;
  font-size:17px !important;
  font-weight:900;
}

.compact-sale-controls .sale-qty-btn{
  min-width:62px !important;
  max-width:110px;
  padding-left:8px !important;
  padding-right:8px !important;
}

.compact-sale-controls .sale-remove-btn{
  padding-left:8px !important;
  padding-right:8px !important;
}

@media(max-width:700px){
  .compact-sale-controls{
    gap:4px;
  }
  .compact-sale-controls .sale-mini-btn{
    min-height:28px !important;
    height:28px;
    font-size:11px !important;
  }
  .compact-sale-controls .sale-step-btn{
    width:28px !important;
    font-size:16px !important;
  }
}


/* v0.86 - Historial de Colmado */
.owner-sidebar-brand{
  gap:0 !important;
}
.owner-sidebar-title{
  margin-left:0 !important;
}

.history-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:20px;
}
.history-summary-card{
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.history-summary-card small{
  color:var(--muted);
  font-weight:800;
}
.history-summary-card strong{
  font-size:30px;
  margin-top:8px;
}
.history-list-title{
  margin-top:6px;
}
.owner-sales-history-list{
  display:grid;
  gap:12px;
}
.history-sale-card{
  display:grid;
  gap:10px;
}
.history-sale-cancelled{
  opacity:.72;
}
.history-sale-head,
.history-sale-footer,
.history-sale-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.history-sale-head small{
  display:block;
  color:var(--muted);
  margin-top:3px;
}
.history-sale-total{
  text-align:right;
}
.history-sale-total strong{
  display:block;
  font-size:18px;
}
.history-sale-total span{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-top:3px;
}
.history-sale-items{
  border-top:1px solid #e7ece9;
  border-bottom:1px solid #e7ece9;
  padding:7px 0;
  display:grid;
  gap:6px;
}
.history-sale-item{
  font-size:13px;
}

@media(max-width:700px){
  .history-summary-grid{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .history-summary-card{
    min-height:92px;
    padding:12px;
  }
  .history-summary-card strong{
    font-size:22px;
  }
}


/* =========================================================
   v0.90 - ADMIN ORDENADO PARA CELULAR
   Solo afecta .admin-dashboard
   ========================================================= */

.admin-dashboard{
  min-width:0;
}

.admin-dashboard > section{
  min-width:0;
  width:100%;
  overflow-x:hidden;
}

.admin-store-cards-mobile{
  display:none;
}

@media(max-width:760px){

  /* Evitar cualquier comportamiento tipo zoom dentro de Admin */
  .admin-dashboard,
  .admin-dashboard *,
  .admin-sidebar,
  .admin-sidebar *{
    touch-action:manipulation;
  }

  /* Estructura general */
  .admin-dashboard{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  .admin-dashboard > section{
    width:100% !important;
    max-width:100% !important;
    padding:14px 12px 92px !important;
    margin:0 !important;
    box-sizing:border-box;
  }

  /* Menú Admin limpio arriba */
  .admin-dashboard .admin-sidebar{
    position:sticky !important;
    top:0;
    z-index:60;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:auto !important;
    padding:9px 10px !important;
    margin:0 !important;
    border-radius:0 !important;
    display:flex !important;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    overflow-y:hidden;
    white-space:nowrap;
    -webkit-overflow-scrolling:touch;
  }

  .admin-dashboard .admin-sidebar h3{
    margin:0 8px 0 0 !important;
    flex:0 0 auto;
    font-size:14px;
  }

  .admin-dashboard .admin-sidebar .navbtn{
    flex:0 0 auto;
    width:auto !important;
    min-width:118px;
    min-height:40px;
    margin:0 !important;
    padding:9px 12px !important;
    font-size:13px !important;
  }

  /* Encabezados */
  .admin-dashboard .section-head{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    width:100%;
  }

  .admin-dashboard .section-head > div{
    min-width:0;
    width:100%;
  }

  .admin-dashboard .section-head h2,
  .admin-dashboard .section-head h3{
    margin-bottom:4px;
    overflow-wrap:anywhere;
  }

  .admin-dashboard .section-head > button,
  .admin-dashboard .section-head .btn,
  .admin-dashboard .section-head .secondary{
    width:100% !important;
    min-height:46px;
  }

  /* Tarjetas de resumen */
  .admin-dashboard .grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .admin-dashboard .kpi{
    min-width:0;
    padding:12px !important;
  }

  .admin-dashboard .kpi small{
    font-size:11px;
    line-height:1.25;
  }

  .admin-dashboard .kpi strong{
    font-size:22px;
    overflow-wrap:anywhere;
  }

  /* En móvil, tabla fuera; tarjetas ordenadas dentro */
  .admin-dashboard .admin-store-table-desktop{
    display:none !important;
  }

  .admin-dashboard .admin-store-cards-mobile{
    display:grid !important;
    grid-template-columns:1fr;
    gap:10px;
    width:100%;
  }

  .admin-dashboard .admin-store-mobile-card{
    width:100%;
    min-width:0;
    padding:14px !important;
    box-sizing:border-box;
  }

  .admin-dashboard .admin-store-mobile-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
  }

  .admin-dashboard .admin-store-mobile-head > div{
    min-width:0;
  }

  .admin-dashboard .admin-store-mobile-head h3{
    margin:0;
    overflow-wrap:anywhere;
  }

  .admin-dashboard .admin-store-mobile-head p{
    margin:4px 0 0;
    color:var(--muted);
    overflow-wrap:anywhere;
  }

  .admin-dashboard .admin-store-mobile-info{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:12px 0;
  }

  .admin-dashboard .admin-store-mobile-info > div{
    background:#f4f7f5;
    border-radius:12px;
    padding:9px;
    min-width:0;
  }

  .admin-dashboard .admin-store-mobile-info span,
  .admin-dashboard .admin-store-mobile-info b{
    display:block;
    overflow-wrap:anywhere;
  }

  .admin-dashboard .admin-store-mobile-info span{
    color:var(--muted);
    font-size:11px;
    margin-bottom:3px;
  }

  .admin-dashboard .admin-store-mobile-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
  }

  .admin-dashboard .admin-store-mobile-actions button{
    width:100% !important;
    min-width:0 !important;
    min-height:42px;
    padding:8px 7px !important;
    font-size:12px !important;
    white-space:normal;
    line-height:1.15;
  }

  /* Panel de imágenes/productos */
  .admin-dashboard .admin-images-panel{
    margin-top:22px !important;
    padding-top:18px !important;
    width:100%;
    min-width:0;
  }

  .admin-dashboard .admin-images-panel .toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
    width:100%;
  }

  .admin-dashboard .admin-images-panel .toolbar > *{
    width:100% !important;
    min-width:0 !important;
  }

  .admin-dashboard #adminProductSearch{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
  }

  .admin-dashboard .admin-product-grid{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .admin-dashboard .admin-product-card{
    width:100%;
    min-width:0;
    padding:12px !important;
  }

  .admin-dashboard .admin-product-image{
    height:160px !important;
    max-width:100% !important;
  }

  .admin-dashboard .admin-product-info{
    min-width:0;
  }

  .admin-dashboard .admin-product-info h3,
  .admin-dashboard .admin-product-info p{
    overflow-wrap:anywhere;
  }

  .admin-dashboard .admin-product-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:7px !important;
    width:100%;
  }

  .admin-dashboard .admin-product-actions button{
    width:100% !important;
    min-height:42px;
    white-space:normal;
  }

  /* Formularios/modales de Admin */
  body:has(.admin-dashboard) .modal-card,
  body:has(.admin-dashboard) .modal-content{
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
    max-height:88vh;
    overflow-y:auto;
    overflow-x:hidden;
    box-sizing:border-box;
  }

  body:has(.admin-dashboard) .form-grid{
    grid-template-columns:1fr !important;
  }

  body:has(.admin-dashboard) input,
  body:has(.admin-dashboard) select,
  body:has(.admin-dashboard) textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
    font-size:16px !important; /* evita auto-zoom de iPhone al enfocar */
  }
}

@media(max-width:390px){
  .admin-dashboard .grid{
    grid-template-columns:1fr !important;
  }

  .admin-dashboard .admin-store-mobile-info,
  .admin-dashboard .admin-store-mobile-actions{
    grid-template-columns:1fr !important;
  }
}


/* v0.92 - Acciones de producto en Inventario */
.owner-inventory-card-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.owner-inventory-card-actions button{
  min-height:38px;
}

@media(max-width:700px){
  .owner-inventory-card-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }

  .owner-inventory-card-actions button{
    width:100% !important;
  }
}

@media(max-width:390px){
  .owner-inventory-card-actions{
    grid-template-columns:1fr;
  }
}


/* v0.94 - Más separación entre controles de Venta actual */
.compact-sale-controls{
  gap:12px !important;
}

@media(max-width:700px){
  .compact-sale-controls{
    gap:10px !important;
  }
}

@media(max-width:390px){
  .compact-sale-controls{
    gap:8px !important;
  }
}


/* =========================================================
   v0.95 - Venta actual más atractiva y controles más separados
   ========================================================= */

.counter-sale-cart{
  border:1px solid rgba(22,119,76,.12) !important;
  border-radius:24px !important;
  padding:18px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,252,248,.98)) !important;
  box-shadow:
    0 14px 34px rgba(6,38,22,.10),
    0 2px 10px rgba(6,38,22,.05) !important;
}

.counter-sale-cart h3{
  margin:0 0 4px 0;
  font-size:24px;
  letter-spacing:-.02em;
}

.counter-sale-cart > p{
  margin:0 0 14px 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

.counter-cart-item{
  background:linear-gradient(180deg,#ffffff,#f7fbf8) !important;
  border:1px solid rgba(19,118,74,.10) !important;
  border-radius:20px !important;
  padding:14px !important;
  margin:0 0 12px 0 !important;
  box-shadow:0 6px 18px rgba(11,32,20,.05) !important;
}

.counter-cart-item:last-of-type{
  margin-bottom:14px !important;
}

.counter-cart-item > b{
  font-size:18px !important;
  line-height:1.25;
}

.counter-cart-item > span{
  font-size:13px !important;
  color:#557565 !important;
}

.counter-cart-item > strong{
  font-size:22px !important;
  color:#0c6c3c;
  margin-top:2px;
}

/* Controles realmente más separados */
.compact-sale-controls{
  display:grid !important;
  grid-template-columns:44px minmax(108px,max-content) 44px max-content;
  align-items:center;
  justify-content:start;
  column-gap:18px !important;
  row-gap:10px !important;
  margin-top:8px;
}

.compact-sale-controls .sale-mini-btn{
  border-radius:12px !important;
  min-height:34px !important;
  height:34px !important;
  font-size:13px !important;
  box-shadow:none !important;
}

.compact-sale-controls .sale-step-btn{
  width:44px !important;
  min-width:44px !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 !important;
  font-size:20px !important;
  font-weight:900 !important;
}

.compact-sale-controls .sale-qty-btn{
  min-width:108px !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 12px !important;
  font-size:13px !important;
  font-weight:800 !important;
  justify-self:start;
}

.compact-sale-controls .sale-remove-btn{
  height:36px !important;
  min-height:36px !important;
  padding:0 14px !important;
  font-size:13px !important;
  font-weight:700 !important;
  justify-self:start;
}

.sale-total{
  background:linear-gradient(180deg,#f8fcf9,#eef8f1);
  border:1px solid rgba(17,117,73,.10);
  border-radius:18px;
  padding:14px 16px !important;
  margin-top:10px !important;
}

.sale-total span{
  font-weight:700;
  color:#446356;
}

.sale-total strong{
  font-size:28px !important;
  letter-spacing:-.03em;
}

.counter-sale .sale-complete-btn,
.counter-sale-dialog .sale-complete-btn{
  min-height:58px !important;
  border-radius:16px !important;
  font-size:20px !important;
  box-shadow:0 10px 20px rgba(15,102,63,.18) !important;
}

.counter-cart-shortcut{
  border-radius:18px !important;
  min-height:58px !important;
  font-size:17px !important;
  box-shadow:0 14px 28px rgba(5,31,18,.22) !important;
}

@media(max-width:700px){
  .counter-sale-cart{
    padding:14px !important;
    border-radius:20px !important;
  }

  .counter-sale-cart h3{
    font-size:21px;
  }

  .counter-cart-item{
    border-radius:18px !important;
    padding:12px !important;
  }

  .compact-sale-controls{
    grid-template-columns:40px minmax(100px,1fr) 40px auto;
    column-gap:16px !important;
    row-gap:10px !important;
  }

  .compact-sale-controls .sale-step-btn{
    width:40px !important;
    min-width:40px !important;
    height:34px !important;
    min-height:34px !important;
    font-size:18px !important;
  }

  .compact-sale-controls .sale-qty-btn{
    min-width:100px !important;
    height:34px !important;
    min-height:34px !important;
  }

  .compact-sale-controls .sale-remove-btn{
    height:34px !important;
    min-height:34px !important;
    padding:0 12px !important;
  }
}

@media(max-width:390px){
  .compact-sale-controls{
    grid-template-columns:40px 1fr 40px;
    column-gap:14px !important;
  }

  .compact-sale-controls .sale-remove-btn{
    grid-column:1/-1;
    justify-self:stretch;
    width:100% !important;
  }
}


/* v0.96 - Ajuste fino: acercar + a "1 unidad" */
.compact-sale-controls{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin-top:8px;
}

.compact-sale-controls .sale-step-btn:first-child{
  margin-right:4px !important;
}

.compact-sale-controls .sale-qty-btn{
  margin-right:2px !important;
}

.compact-sale-controls .sale-step-btn:nth-child(3){
  margin-left:0 !important;
}

.compact-sale-controls .sale-remove-btn{
  margin-left:12px !important;
}

@media(max-width:700px){
  .compact-sale-controls{
    gap:7px !important;
  }

  .compact-sale-controls .sale-step-btn:first-child{
    margin-right:3px !important;
  }

  .compact-sale-controls .sale-qty-btn{
    margin-right:1px !important;
  }

  .compact-sale-controls .sale-remove-btn{
    margin-left:10px !important;
  }
}

@media(max-width:390px){
  .compact-sale-controls{
    gap:6px !important;
  }

  .compact-sale-controls .sale-remove-btn{
    margin-left:0 !important;
    width:100% !important;
  }
}


/* v0.98 - Configuración de Colmado */
.owner-settings-grid{
  display:grid;
  grid-template-columns:minmax(0,560px);
  gap:14px;
}

.owner-settings-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  border-radius:20px !important;
}

.owner-settings-icon{
  width:48px;
  height:48px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-size:24px;
  background:#f1f8f4;
}

.owner-settings-content{
  min-width:0;
}

.owner-settings-content h3{
  margin:0 0 4px;
}

.owner-settings-content p{
  margin:0 0 8px;
  color:var(--muted);
  line-height:1.4;
}

@media(max-width:700px){
  .owner-settings-card{
    grid-template-columns:auto minmax(0,1fr);
  }

  .owner-settings-card > button{
    grid-column:1/-1;
    width:100% !important;
  }
}


/* =========================================================
   Mi Colma2 v1.00 - Barra de Colmado más clara y legible
   ========================================================= */

.owner-sidebar{
  min-width:0;
}

.owner-sidebar .navbtn{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  line-height:1.15 !important;
  text-align:center !important;
}

@media(max-width:900px){
  .owner-sidebar{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:6px !important;
    width:100% !important;
    padding:8px !important;
    overflow:visible !important;
  }

  .owner-sidebar-brand{
    grid-column:1/-1;
    margin-bottom:2px;
  }

  .owner-sidebar .navbtn{
    width:100% !important;
    min-width:0 !important;
    min-height:44px !important;
    padding:8px 5px !important;
    font-size:12px !important;
    border-radius:11px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    word-break:normal !important;
    overflow-wrap:anywhere !important;
  }
}

@media(max-width:560px){
  .owner-sidebar{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:7px !important;
  }

  .owner-sidebar .navbtn{
    min-height:46px !important;
    padding:8px 6px !important;
    font-size:12px !important;
  }
}

@media(max-width:360px){
  .owner-sidebar{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .owner-sidebar .navbtn{
    font-size:11.5px !important;
  }
}


/* Mi Colma2 v1.08 - Productos eliminados de Admin */
.admin-dashboard .admin-products,
.admin-dashboard .admin-product-grid,
.admin-dashboard .admin-products-grid,
.admin-dashboard .admin-global-products,
.admin-dashboard [data-admin-products]{
  display:none !important;
}


/* Mi Colma2 v1.09 - Acciones administrativas por colmado */
.admin-store-status-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
}

.admin-expiry-badge{
  margin-left:6px;
}

.admin-store-mobile-actions{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px !important;
}

.admin-store-mobile-actions button{
  width:100% !important;
  min-width:0 !important;
}

.admin-expiry-action,
.admin-delete-store{
  grid-column:span 1;
}

.danger-banner{
  border:1px solid rgba(176,38,38,.18);
  background:rgba(176,38,38,.06);
  color:#8e2424;
}

@media(max-width:420px){
  .admin-store-mobile-actions{
    grid-template-columns:1fr !important;
  }
}


/* Mi Colma2 v1.11 - Admin exclusivamente para colmados */
.admin-dashboard .admin-images-panel,
.admin-dashboard .admin-product-grid,
.admin-dashboard .admin-product-card,
.admin-dashboard .admin-product-actions,
.admin-dashboard .admin-products,
.admin-dashboard .admin-global-products,
.admin-dashboard [data-admin-products]{
  display:none !important;
}


/* Mi Colma2 v1.12 - Admin: tiempo real, conteo y fechas de pago */
.admin-live-kpis{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

.admin-realtime-card strong{
  font-size:17px !important;
  line-height:1.35;
  color:var(--text) !important;
}

.admin-store-mobile-info{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

@media(max-width:900px){
  .admin-live-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:560px){
  .admin-live-kpis,
  .admin-store-mobile-info{
    grid-template-columns:1fr !important;
  }
}


/* Mi Colma2 v1.13 - Personas en línea */
.admin-realtime-card{
  position:relative;
}

.admin-realtime-card::after{
  content:"";
  width:9px;
  height:9px;
  border-radius:50%;
  background:#20a464;
  position:absolute;
  top:14px;
  right:14px;
  box-shadow:0 0 0 5px rgba(32,164,100,.10);
}

.admin-realtime-card #adminOnlinePeople{
  font-size:32px !important;
  color:#0c6c3c !important;
  line-height:1 !important;
}


/* Mi Colma2 v1.14 - Aviso persistente de cuenta próxima a vencer */
.owner-expiry-warning{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  margin:0 0 16px 0;
  padding:14px 16px;
  border:1px solid rgba(194,121,0,.28);
  border-radius:14px;
  background:#fff6db;
  color:#6f4700;
  box-shadow:0 8px 24px rgba(96,64,0,.08);
}

.owner-expiry-warning-icon{
  font-size:24px;
  line-height:1;
  flex:0 0 auto;
}

.owner-expiry-warning b{
  display:block;
  font-size:16px;
  margin-bottom:4px;
}

.owner-expiry-warning p{
  margin:0;
  font-size:14px;
  line-height:1.4;
}

@media(max-width:560px){
  .owner-expiry-warning{
    border-radius:12px;
    padding:12px;
  }
}


/* Mi Colma2 v1.15 - Contacto de pago por WhatsApp */
.owner-expiry-warning-content{
  flex:1;
  min-width:0;
}

.owner-expiry-whatsapp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
  padding:10px 14px;
  border-radius:10px;
  background:#25D366;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:700;
  font-size:14px;
  box-shadow:0 5px 14px rgba(37,211,102,.18);
}

.owner-expiry-whatsapp:active{
  transform:translateY(1px);
}


/* Mi Colma2 v1.16 - Colmado suspendido: solo Venta */
.owner-suspended-banner{
  position:sticky;
  top:0;
  z-index:45;
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  margin:0 0 16px 0;
  padding:14px 16px;
  border:1px solid rgba(178,42,42,.28);
  border-radius:14px;
  background:#fff0f0;
  color:#7b1f1f;
  box-shadow:0 8px 24px rgba(120,20,20,.08);
}

.owner-suspended-banner-icon{
  font-size:24px;
  line-height:1;
  flex:0 0 auto;
}

.owner-suspended-banner-content{
  flex:1;
  min-width:0;
}

.owner-suspended-banner-content b{
  display:block;
  font-size:16px;
  margin-bottom:4px;
}

.owner-suspended-banner-content p{
  margin:2px 0;
  font-size:14px;
  line-height:1.4;
}

.owner-suspended-banner-whatsapp,
.owner-suspended-whatsapp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
  padding:10px 14px;
  border-radius:10px;
  background:#25D366;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:700;
  font-size:14px;
}

.owner-suspended-notice{
  text-align:center;
  padding:8px 2px;
}

.owner-suspended-icon{
  font-size:52px;
  line-height:1;
  margin-bottom:10px;
}

.owner-suspended-notice h2{
  margin:8px 0 10px;
}

.owner-suspended-notice p{
  margin:6px 0;
  line-height:1.45;
}

.owner-suspended-back{
  width:100%;
  margin-top:10px;
}

@media(max-width:560px){
  .owner-suspended-banner{
    border-radius:12px;
    padding:12px;
  }
}


/* Mi Colma2 v1.17 - Acceso Admin dentro del colmado */
.admin-inside-store-banner{
  margin:0 0 12px 0;
  padding:9px 12px;
  border-radius:10px;
  background:#eef5ff;
  border:1px solid rgba(40,94,180,.18);
  color:#244c88;
  font-size:13px;
}


/* Mi Colma2 v1.19 - Productos solo muestra estado */
.owner-products-status-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.owner-product-status-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 16px;
}

.owner-product-status-main{
  min-width:0;
}

.owner-product-status-main h3{
  margin:0 0 6px;
}

.owner-product-stock{
  font-size:14px;
  color:var(--muted);
}

.owner-product-status-card.is-out{
  opacity:.82;
}

@media(max-width:560px){
  .owner-product-status-card{
    align-items:flex-start;
  }
}


/* ==========================================================
   Mi Colma2 v1.23 - Mejor legibilidad / vista
   ========================================================== */

html{
  font-size:18px;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  font-size:18px;
  line-height:1.55;
}

button,
input,
select,
textarea{
  font-size:17px !important;
  line-height:1.35;
}

button,
.btn,
.secondary,
.danger,
.ghost,
.mini{
  min-height:46px;
  padding-top:11px;
  padding-bottom:11px;
}

label{
  font-size:16px !important;
  line-height:1.4;
  font-weight:700;
}

small,
.small,
.muted,
[class*="meta"],
[class*="subtitle"],
[class*="description"]{
  font-size:15px !important;
  line-height:1.45;
}

p{
  font-size:16px;
  line-height:1.55;
}

h1{
  font-size:2rem;
  line-height:1.2;
}

h2{
  font-size:1.6rem;
  line-height:1.25;
}

h3{
  font-size:1.25rem;
  line-height:1.3;
}

.badge,
.pill{
  font-size:14px !important;
  line-height:1.3;
  padding:7px 10px;
}

input,
select,
textarea{
  min-height:48px;
  padding:11px 13px;
}

input::placeholder,
textarea::placeholder{
  font-size:16px;
  opacity:.78;
}

.card{
  line-height:1.5;
}

/* Navegación del Colmado y Admin */
.owner-sidebar button,
.admin-dashboard button,
.sidebar button,
nav button{
  font-size:16px !important;
  line-height:1.3;
}

/* Venta */
.sale-search-result b,
.counter-cart-item b,
.owner-product-status-main h3,
.owner-inventory-simple-main h3{
  font-size:18px;
}

.sale-search-result small,
.owner-inventory-code,
.owner-inventory-meta,
.owner-product-stock,
.history-sale-item,
.history-sale-head small{
  font-size:15px !important;
}

/* Historial */
.history-summary-card small{
  font-size:15px !important;
}

.history-summary-card strong{
  font-size:1.65rem;
}

/* Avisos importantes */
.owner-expiry-warning,
.owner-suspended-banner,
.owner-suspended-notice{
  font-size:17px;
}

.owner-expiry-warning p,
.owner-suspended-banner-content p,
.owner-suspended-notice p{
  font-size:16px !important;
}

/* Admin */
.admin-live-kpis .kpi small{
  font-size:15px !important;
}

.admin-live-kpis .kpi strong{
  font-size:1.7rem;
}

/* Formularios y modales */
.modal,
.modal-content,
.dialog,
[role="dialog"]{
  font-size:17px;
}

.form-grid .field{
  gap:7px;
}

/* Móvil: conservar texto legible sin reducirlo demasiado */
@media(max-width:560px){
  html{
    font-size:17px;
  }

  body{
    font-size:17px;
  }

  button,
  input,
  select,
  textarea{
    font-size:16px !important;
  }

  small,
  .small,
  .muted,
  [class*="meta"]{
    font-size:14px !important;
  }

  h1{
    font-size:1.75rem;
  }

  h2{
    font-size:1.45rem;
  }

  h3{
    font-size:1.18rem;
  }

  .badge,
  .pill{
    font-size:13px !important;
  }
}


/* Mi Colma2 v1.24 - Cobro presencial: efectivo y devolución */
.cash-sale-dialog{
  max-width:520px;
  margin:0 auto;
}

.cash-sale-total,
.cash-sale-change{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-radius:12px;
  margin:12px 0;
}

.cash-sale-total{
  background:#f5f7fa;
}

.cash-sale-change{
  background:#eefaf3;
  border:1px solid rgba(31,150,83,.16);
}

.cash-sale-total span,
.cash-sale-change span{
  font-size:16px;
  font-weight:700;
}

.cash-sale-total strong,
.cash-sale-change strong{
  font-size:1.5rem;
}

.cash-sale-warning{
  padding:10px 12px;
  border-radius:10px;
  background:#fff0f0;
  color:#8a2525;
  font-weight:700;
  margin-top:8px;
}


/* Mi Colma2 v1.25 - Estadísticas tipo analítica */
.stats-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.stats-summary-card{
  padding:16px;
}

.stats-summary-card small{
  display:block;
  margin-bottom:6px;
}

.stats-summary-card strong{
  font-size:1.55rem;
}

.stats-tabs{
  display:flex;
  gap:8px;
  margin:0 0 14px;
  overflow-x:auto;
}

.stats-tabs button{
  flex:0 0 auto;
  min-width:105px;
  border-radius:999px;
  padding:9px 15px;
}

.stats-tabs button.active{
  background:#111827;
  color:#fff;
}

.stats-chart-card{
  padding:16px;
}

.stats-chart-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.stats-chart-head small{
  display:block;
}

.stats-chart-head strong{
  display:block;
  font-size:1.65rem;
  margin-top:3px;
}

.stats-chart-head span{
  font-size:14px;
  color:var(--muted);
}

.stats-chart-scroll{
  width:100%;
  overflow-x:auto;
  padding:8px 2px 4px;
}

.stats-chart{
  height:300px;
  display:flex;
  align-items:stretch;
  gap:8px;
  min-width:max-content;
}

.stats-chart.day .stats-bar-wrap{
  width:42px;
}

.stats-chart.week .stats-bar-wrap{
  width:78px;
}

.stats-chart.month .stats-bar-wrap{
  width:130px;
}

.stats-bar-wrap{
  height:100%;
  display:grid;
  grid-template-rows:40px 1fr 42px;
  gap:5px;
  text-align:center;
}

.stats-bar-value{
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  align-self:end;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stats-bar-track{
  position:relative;
  height:100%;
  min-height:150px;
  border-bottom:1px solid rgba(0,0,0,.12);
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.stats-bar{
  width:72%;
  min-height:3px;
  border-radius:7px 7px 2px 2px;
  background:linear-gradient(180deg,#4b8cff,#2563eb);
}

.stats-bar-label{
  font-size:11px;
  line-height:1.25;
  color:var(--muted);
  overflow:hidden;
}

.stats-note{
  margin-top:14px;
  font-size:14px;
  color:var(--muted);
}

@media(max-width:700px){
  .stats-summary-grid{
    grid-template-columns:1fr;
  }

  .stats-chart{
    height:270px;
  }
}

/* Mi Colma2 v1.28 - Cloudflare */
.cloud-sync-card{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px}
.cloud-sync-card h3{margin:0 0 4px}.cloud-sync-card p{margin:0}
@media(max-width:600px){.cloud-sync-card{flex-direction:column;align-items:stretch}}
