/* Comercio web: tema claro aislado de admin/cliente. Geometría compatible con los componentes existentes. */
:root:has(body.comercio-app){color-scheme:light;--bg:#f5f6f8;--surface:#fff;--surface-2:#f8fafc;--card:#fff;--text:#172033;--muted:#6c7685;--line:#e5e9ef;--orange:#ff8700;--orange-2:#ad5709;--green:#17835c;--green-2:#14744f;--shadow:0 4px 20px #1720330a}
/* ShipXpress Comercio Pro */
.comercio-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.comercio-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.comercio-tabs a{
  padding:10px 13px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid var(--line);
  color:#172033;
  font-weight:900;
}
.comercio-tabs a.active,
.comercio-tabs a:hover{
  background:rgba(255,140,0,.16);
  color:#172033;
}
.comercio-search{
  min-width:min(380px,100%);
  background:#ffffff;
  color:#172033;
  border:1px solid var(--line);
  border-radius:15px;
  padding:13px 14px;
  outline:none;
}
.comercio-search:focus{
  border-color:rgba(255,140,0,.65);
  box-shadow:0 4px 18px rgba(23,32,51,.05);
}
.comercio-form-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
.comercio-form-grid .full{grid-column:1/-1}
.comercio-form-grid input,
.comercio-form-grid select,
.comercio-form-grid textarea{
  width:100%;
  background:#ffffff;
  color:#172033;
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px 14px;
  outline:none;
}
.comercio-form-grid input:focus,
.comercio-form-grid select:focus,
.comercio-form-grid textarea:focus{
  border-color:rgba(255,140,0,.65);
  box-shadow:0 4px 18px rgba(23,32,51,.05);
}
.horario-editor{
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
}
.horario-editor-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:12px;
}
.horario-editor-head strong{
  display:block;
  color:#172033;
  font-size:16px;
}
.horario-editor-head p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.horario-row{
  display:grid;
  grid-template-columns:minmax(130px,1fr) 130px 130px;
  gap:10px;
  align-items:end;
  padding:10px 0;
  border-top:1px solid #e5e9ef;
}
.horario-row:first-of-type{border-top:0}
.horario-row label{
  color:#172033;
  font-weight:900;
  font-size:13px;
}
.horario-row label span{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-bottom:4px;
}
.horario-row input[type="checkbox"]{
  width:auto;
  margin-right:8px;
}
.horario-row input[type="time"]{
  padding:10px 11px;
}
.comercio-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.btn-mini{
  border:0;
  cursor:pointer;
  border-radius:12px;
  padding:8px 10px;
  font-weight:1000;
  font-size:12px;
  color:#172033;
  background:#f8fafc;
  border:1px solid var(--line);
}
.btn-mini.ok{background:rgba(57,255,20,.13);color:#d4ffcf;border-color:rgba(57,255,20,.25)}
.btn-mini.warn{background:rgba(255,140,0,.13);color:#a85108;border-color:rgba(255,140,0,.25)}
.btn-mini.bad{background:rgba(255,77,77,.13);color:#ffd0d0;border-color:rgba(255,77,77,.25)}
.btn-mini:hover{transform:translateY(-1px)}
.comercio-profile{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:22px;
  align-items:start;
}
.comercio-logo-box{
  border-radius:26px;
  background:#f8fafc;
  border:1px solid var(--line);
  min-height:180px;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.comercio-logo-box img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.product-img{
  width:58px;
  height:58px;
  border-radius:16px;
  object-fit:contain;
  background:#ffffff;
  padding:4px;
  border:1px solid var(--line);
  display:block;
}
.store-status-shell{margin-bottom:18px}
.store-status-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:18px;
  padding:22px;
  border-radius:30px;
  background:linear-gradient(135deg,rgba(255,140,0,.18),rgba(57,255,20,.08));
  border:1px solid rgba(255,140,0,.23);
  box-shadow:0 4px 18px rgba(23,32,51,.05);
}
.store-status-card.offline{
  background:linear-gradient(135deg,rgba(255,77,77,.12),rgba(255,140,0,.08));
  border-color:rgba(255,77,77,.22);
}
.store-status-logo{
  width:86px;
  height:86px;
  border-radius:28px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#ffffff;
  border:1px solid var(--line);
  color:#a85108;
  font-weight:1000;
  font-size:24px;
}
.store-status-logo img{width:100%;height:100%;object-fit:contain;padding:5px}
.store-status-main small{
  display:block;
  color:#a85108;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:5px;
}
.store-status-main h2{font-size:28px;color:#172033;margin-bottom:5px}
.store-status-main p{color:var(--muted);font-weight:800;line-height:1.45}
.store-alert{
  margin-top:10px;
  padding:10px 12px;
  border-radius:15px;
  color:#ffd1d1;
  background:rgba(255,77,77,.12);
  border:1px solid rgba(255,77,77,.22);
  font-weight:900;
}
.store-status-actions{display:grid;gap:10px;justify-items:end}
.store-state-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:112px;
  padding:9px 13px;
  border-radius:999px;
  font-weight:1000;
  border:1px solid var(--line);
}
.store-state-pill.online{color:#c7ffc0;background:rgba(57,255,20,.12);border-color:rgba(57,255,20,.25)}
.store-state-pill.offline{color:#ffc4c4;background:rgba(255,77,77,.12);border-color:rgba(255,77,77,.24)}
.delivery-chip{
  display:inline-flex;
  margin-top:7px;
  padding:6px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:1000;
  border:1px solid var(--line);
}
.delivery-chip.delivery{color:#c7ffc0;background:rgba(57,255,20,.11);border-color:rgba(57,255,20,.22)}
.delivery-chip.pickup{color:#bfdbfe;background:rgba(59,130,246,.14);border-color:rgba(59,130,246,.28)}
.order-money-card{
  min-width:210px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.order-money-card div{
  padding:8px 9px;
  border-radius:13px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.order-money-card small{display:block;color:var(--muted);font-weight:900;font-size:11px;margin-bottom:3px}
.order-money-card strong{font-size:13px;color:#fff}
.order-money-card strong.ok{color:#c7ffc0}
.order-money-card strong.bad{color:#ffc4c4}
.price-old{
  color:#8ea0b4;
  text-decoration:line-through;
  font-weight:850;
  margin-right:6px;
}
.price-offer{color:#ff4d4d}
.liquidacion-card{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:22px;border-radius:28px;background:linear-gradient(135deg,rgba(255,140,0,.15),rgba(57,255,20,.08));border:1px solid rgba(255,140,0,.22);box-shadow:var(--shadow)}
.liquidacion-card small{display:block;color:#a85108;font-weight:1000;margin-bottom:5px;text-transform:uppercase;letter-spacing:.04em}
.liquidacion-card h2{color:#172033;font-size:26px;margin-bottom:6px}
.liquidacion-card p{color:var(--muted);font-weight:800;max-width:720px;line-height:1.45}
.liquidacion-actions{display:grid;gap:10px;justify-items:end;min-width:230px}
.liquidacion-actions strong{font-size:34px;color:#fff}
.liquidacion-form{display:grid;grid-template-columns:160px 1fr auto;gap:10px;min-width:min(560px,100%)}
.liquidacion-form input{background:#ffffff;color:#172033;border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.chat-box{
  display:grid;
  gap:10px;
  max-height:360px;
  overflow:auto;
  padding:12px;
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:18px;
}
.chat-msg{
  padding:11px 13px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.chat-msg b{color:#ffb23f}
.comercio-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.62);
  z-index:300;
}
.comercio-modal.open{display:flex}
.comercio-modal-card{
  width:min(760px,100%);
  max-height:88vh;
  overflow:auto;
  border-radius:28px;
  background:#ffffff;
  border:1px solid var(--line);
  box-shadow:0 4px 18px rgba(23,32,51,.05);
  padding:24px;
}
.comercio-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:15px;
}
.comercio-proof-card{width:min(920px,100%)}
.comercio-proof-meta{
  margin:6px 0 0;
  color:var(--muted);
  font-weight:800;
}
.comercio-proof-summary{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:14px;
}
.comercio-proof-summary div{
  padding:12px 14px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.comercio-proof-summary small{
  display:block;
  color:var(--muted);
  font-weight:900;
  margin-bottom:4px;
}
.comercio-proof-summary strong{
  color:#172033;
  font-size:15px;
}
.comercio-proof-view{
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  background:#ffffff;
  min-height:260px;
  display:grid;
  place-items:center;
}
.comercio-proof-img{
  display:block;
  width:100%;
  max-height:68vh;
  object-fit:contain;
  background:#ffffff;
}
.comercio-proof-frame{
  width:100%;
  height:min(68vh,720px);
  min-height:420px;
  border:0;
  background:#fff;
}
.comercio-proof-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  margin-top:14px;
}
.pedido-panel-grid,
.producto-panel-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
.pedido-panel-grid .wide,
.producto-panel-grid .wide{grid-column:1/-1}
.info-tile{
  padding:14px 15px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.info-tile small{
  display:block;
  color:var(--muted);
  font-weight:900;
  margin-bottom:5px;
}
.info-tile strong{color:#172033;line-height:1.35}
.option-group-card{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,140,0,.22);
  background:rgba(255,140,0,.08);
  margin-top:12px;
}
.option-group-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}
.option-items{
  display:grid;
  gap:8px;
}
.option-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.mini-form{
  display:grid;
  grid-template-columns:1fr 130px auto;
  gap:8px;
  margin-top:10px;
}
.mini-form input{
  background:#ffffff;
  color:#172033;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
}
.muted{color:var(--muted);font-weight:800}
.comercio-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  max-width:420px;
  z-index:350;
  padding:14px 16px;
  border-radius:18px;
  background:#111b25;
  color:#172033;
  border:1px solid var(--line);
  box-shadow:0 4px 18px rgba(23,32,51,.05);
  display:none;
}
.comercio-toast.show{display:block}
.comercio-toast.ok{border-color:rgba(57,255,20,.25)}
.comercio-toast.bad{border-color:rgba(255,77,77,.25)}
.link-file{color:#a85108;font-weight:900;text-decoration:underline}
.discount-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background:#ef4444;
  color:#172033;
  font-size:12px;
  font-weight:950;
  margin-left:6px;
  box-shadow:0 4px 18px rgba(23,32,51,.05);
}
@media(max-width:900px){
  .comercio-form-grid,
  .comercio-profile,
  .pedido-panel-grid,
  .producto-panel-grid,
  .mini-form{grid-template-columns:1fr}
  .comercio-proof-summary{grid-template-columns:1fr}
  .comercio-proof-actions{justify-content:stretch}
  .comercio-proof-actions .btn{width:100%;justify-content:center}
  .liquidacion-card{display:grid}
  .liquidacion-actions{justify-items:stretch}
  .liquidacion-form{grid-template-columns:1fr}
  .store-status-card{grid-template-columns:1fr}
  .store-status-actions{justify-items:stretch}
  .store-status-logo{width:74px;height:74px}
  .order-money-card{grid-template-columns:1fr;min-width:170px}
  .horario-row{grid-template-columns:1fr}
}

/* ShipXpress realtime / preparación */
.sx-prep-card{display:flex;flex-direction:column;gap:4px;min-width:150px;padding:12px 14px;border-radius:16px;border:1px solid #f59e0b;background:#fef3c7;color:#92400e;font-weight:800;line-height:1.2;white-space:normal;box-sizing:border-box}
.sx-prep-card strong{font-size:15px;line-height:1.2;display:block;white-space:normal}
.sx-prep-card span{font-size:12px;opacity:.9;white-space:normal}
.sx-prep-card.sx-ready,.sx-prep-card.sx-ok{background:#dcfce7;border-color:#22c55e;color:#166534}
.sx-prep-card.sx-late{background:#fee2e2;border-color:#ef4444;color:#991b1b}
.sx-prep-card.sx-warn{background:#fef3c7;border-color:#f59e0b;color:#92400e}
.sx-team-card{margin-top:10px;padding:12px 14px;border-radius:16px;background:#eff6ff;border:1px solid #bfdbfe;color:#111827;font-size:13px;line-height:1.45}

/* Dashboard cards with compact operational icons */
.stats-grid .stat-card{
  position:relative;
  padding-top:54px;
}
.stats-grid .stat-card::before{
  content:"";
  position:absolute;
  top:16px;
  left:16px;
  width:34px;
  height:34px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(255,140,0,.13);
  color:#ff8c00;
  font-size:15px;
  font-weight:1000;
}
.stats-grid .stat-card:nth-child(1)::before{content:"N"}
.stats-grid .stat-card:nth-child(2)::before{content:"P"}
.stats-grid .stat-card:nth-child(3)::before{content:"OK"}
.stats-grid .stat-card:nth-child(4)::before{content:"$"}
.stats-grid .stat-card:nth-child(5)::before{content:"S"}
.stats-grid .stat-card:nth-child(6)::before{content:"C"}
.stats-grid .stat-card:nth-child(7)::before{content:"!"}
.stats-grid .stat-card:nth-child(8)::before{content:"T"}
.stats-grid .stat-card:nth-child(9)::before{content:"ON"}

/* === ShipXpress Comercio App V1 segura === */
.content{max-width:1480px;margin:0 auto;width:100%}
.comercio-tabs{overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.comercio-tabs::-webkit-scrollbar{display:none}
.comercio-tabs a{white-space:nowrap}
.comercio-app-shell{display:grid;gap:18px}
.commerce-dashboard-hero{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:18px;align-items:stretch;margin-bottom:18px}
.commerce-dashboard-hero .store-status-shell{margin:0}
.commerce-dashboard-hero .store-status-card{height:100%;min-height:238px;align-items:center}
.commerce-command-card{position:relative;overflow:hidden;border-radius:30px;padding:24px;background:#ffffff;border:1px solid rgba(255,140,0,.24);box-shadow:var(--shadow)}
.commerce-command-card::after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;right:-70px;bottom:-90px;background:rgba(255,140,0,.16)}
.command-kicker{display:inline-flex;padding:8px 11px;border-radius:999px;background:rgba(255,140,0,.15);border:1px solid rgba(255,140,0,.24);color:#a85108;font-weight:1000;font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px}
.commerce-command-card h2{font-size:32px;line-height:1.05;margin:0 0 8px;color:#172033;letter-spacing:-.8px}
.commerce-command-card p{color:var(--muted);font-weight:850;line-height:1.45;margin-bottom:18px}
.command-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px;position:relative;z-index:1}
.command-stats div{min-height:84px;padding:12px;border-radius:18px;background:#f8fafc;border:1px solid rgba(255,255,255,.11)}
.command-stats small{display:block;color:#aebccd;font-size:11px;font-weight:1000;text-transform:uppercase;margin-bottom:6px}
.command-stats strong{display:block;font-size:24px;line-height:1;color:#172033;word-break:break-word}
.command-actions{display:flex;gap:10px;flex-wrap:wrap;position:relative;z-index:1}
.command-actions .btn{min-height:46px}
.commerce-stats-secondary{grid-template-columns:repeat(5,minmax(0,1fr))}
.commerce-section-card{border-radius:28px;background:#ffffff;border:1px solid var(--line);box-shadow:0 4px 18px rgba(23,32,51,.05);padding:18px;margin-bottom:18px;overflow:hidden}
.commerce-section-card .table-head{padding:0 0 14px;border-bottom:1px solid #e5e9ef;margin-bottom:14px}
.commerce-order-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(318px,1fr));gap:14px}
.commerce-order-board.compact{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
.commerce-order-card{position:relative;overflow:hidden;border-radius:24px;padding:16px;background:#ffffff;border:1px solid #e5e9ef;box-shadow:0 12px 32px rgba(0,0,0,.20)}
.commerce-order-card::before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:#ff8c00}
.commerce-order-card.estado-listo::before{background:#39ff14}.commerce-order-card.estado-preparando::before{background:#ffd166}.commerce-order-card.estado-cancelado::before{background:#ff4d4d}
.order-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px;padding-left:4px}
.order-card-top small{display:block;color:#a85108;font-weight:1000;text-transform:uppercase;margin-bottom:4px}
.order-card-top h3{font-size:20px;color:#172033;margin:0;line-height:1.15}
.order-phone{display:inline-flex;margin-top:5px;color:#bfdbfe;font-size:13px;font-weight:900;text-decoration:underline}
.order-card-products{min-height:58px;padding:12px;border-radius:17px;background:#f8fafc;border:1px solid #e5e9ef;color:#172033;font-weight:800;line-height:1.38;margin-bottom:12px}
.order-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px;color:#172033;font-size:12px;font-weight:900}
.order-card-meta > span{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.order-progress{display:grid;gap:3px;padding:12px 14px;border-radius:18px;margin-bottom:12px;border:1px solid rgba(255,140,0,.26);background:rgba(255,140,0,.10);color:#ffd7a7}
.order-progress strong{font-size:14px}.order-progress span{font-size:12px;font-weight:850;color:inherit;opacity:.95}
.order-progress.sx-ready,.order-progress.sx-ok{background:rgba(57,255,20,.10);border-color:rgba(57,255,20,.24);color:#c7ffc0}.order-progress.sx-late{background:rgba(255,77,77,.12);border-color:rgba(255,77,77,.26);color:#ffc4c4}
.order-card-money .order-money-card{min-width:0;width:100%;grid-template-columns:repeat(4,1fr);margin-bottom:12px}
.order-card-money .order-money-card div{padding:8px;border-radius:13px}.order-card-money .order-money-card strong{font-size:12px}
.order-card-date{color:var(--muted);font-size:12px;font-weight:900;margin-bottom:12px}
.order-card-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.order-main-action{background:linear-gradient(135deg,#ff8c00,#ffb23f)!important;color:#071019!important;border-color:transparent!important;box-shadow:0 10px 20px rgba(255,140,0,.18)}
.commerce-empty-state{grid-column:1/-1;text-align:center;padding:28px 18px;border-radius:22px;background:#f8fafc;border:1px dashed #e5e9ef;color:#d7e5f4}.commerce-empty-state strong{display:block;color:#172033;font-size:18px}.commerce-empty-state span{display:block;color:var(--muted);font-weight:850;margin-top:5px}
.commerce-product-layout{display:grid;grid-template-columns:minmax(300px,430px) 1fr;gap:18px;align-items:start}.commerce-create-card{position:sticky;top:92px}.commerce-create-card h2{font-size:25px;margin-bottom:4px}.commerce-create-card p{color:var(--muted);font-weight:850;line-height:1.45;margin-bottom:14px}.commerce-product-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}.commerce-product-tools .comercio-search{min-width:min(300px,100%);flex:1}.commerce-product-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}.commerce-product-metrics div{padding:13px;border-radius:18px;background:#f8fafc;border:1px solid var(--line)}.commerce-product-metrics small{display:block;color:var(--muted);font-weight:1000;font-size:11px;text-transform:uppercase}.commerce-product-metrics strong{display:block;color:#172033;font-size:24px;line-height:1;margin-top:6px}
.commerce-product-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.commerce-product-card{overflow:hidden;border-radius:24px;background:#ffffff;border:1px solid #e5e9ef;box-shadow:0 4px 18px rgba(23,32,51,.05);display:flex;flex-direction:column}.commerce-product-card.is-hidden{opacity:.72}.commerce-product-photo{height:176px;background:#fff;display:grid;place-items:center;position:relative;overflow:hidden}.commerce-product-photo img{width:100%;height:100%;object-fit:contain;padding:12px}.commerce-product-photo span{font-size:46px}.commerce-product-photo .discount-badge{position:absolute;top:12px;right:12px;margin:0}.commerce-product-info{padding:15px;display:grid;gap:10px;flex:1}.commerce-product-title{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.commerce-product-title h3{font-size:19px;line-height:1.15;margin:0;color:#fff}.commerce-product-info p{color:var(--muted);font-weight:800;line-height:1.35;min-height:36px}.commerce-product-tags{display:flex;gap:7px;flex-wrap:wrap}.commerce-product-tags span{padding:7px 9px;border-radius:999px;background:#f8fafc;border:1px solid var(--line);color:#172033;font-size:11px;font-weight:1000}.commerce-product-bottom{margin-top:auto;display:grid;gap:12px}.commerce-product-bottom>strong{font-size:20px;color:#ffb23f}.commerce-product-actions{display:flex;gap:8px;flex-wrap:wrap}
.commerce-page-hero{display:flex;justify-content:space-between;gap:16px;align-items:center;border-radius:28px;padding:20px 22px;margin-bottom:18px;background:#ffffff;border:1px solid var(--line);box-shadow:0 16px 42px rgba(0,0,0,.20)}.commerce-page-hero small{display:inline-flex;color:#a85108;font-weight:1000;text-transform:uppercase;margin-bottom:5px}.commerce-page-hero h2{color:#172033;font-size:28px;line-height:1.1;margin:0}.commerce-page-hero p{color:var(--muted);font-weight:850;line-height:1.45;margin-top:6px}.commerce-page-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.commerce-bottom-nav{display:none}
@media(max-width:1100px){.commerce-dashboard-hero,.commerce-product-layout{grid-template-columns:1fr}.commerce-create-card{position:static}.commerce-stats-secondary{grid-template-columns:repeat(2,1fr)}.command-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){body.dashboard-body{padding-bottom:78px}.content{padding:14px!important}.topbar h1{font-size:26px}.topbar p{font-size:13px}.user-chip{display:none}.comercio-toolbar{gap:10px;margin-bottom:14px}.comercio-tabs{flex-wrap:nowrap;margin-inline:-2px;padding:2px 0 8px}.comercio-tabs a{padding:10px 12px;font-size:13px}.commerce-dashboard-hero{gap:14px}.commerce-dashboard-hero .store-status-card{min-height:auto;padding:18px;border-radius:24px}.commerce-command-card{border-radius:24px;padding:18px}.commerce-command-card h2{font-size:26px}.command-stats{grid-template-columns:repeat(2,1fr)}.command-stats div{min-height:74px}.command-actions{display:grid;grid-template-columns:1fr 1fr}.command-actions .btn{width:100%;padding:12px 10px}.commerce-stats-secondary{grid-template-columns:1fr}.commerce-order-board,.commerce-order-board.compact{grid-template-columns:1fr}.commerce-order-card{border-radius:22px;padding:14px}.order-card-money .order-money-card{grid-template-columns:repeat(2,1fr)}.order-card-actions{display:grid;grid-template-columns:1fr 1fr}.order-card-actions .btn-mini{width:100%;min-height:40px}.commerce-product-metrics{grid-template-columns:repeat(2,1fr)}.commerce-product-grid{grid-template-columns:1fr}.commerce-product-photo{height:190px}.commerce-product-tools{display:grid;grid-template-columns:1fr}.commerce-form-grid,.comercio-form-grid{grid-template-columns:1fr}.commerce-page-hero{display:grid;padding:18px;border-radius:24px}.commerce-page-hero h2{font-size:24px}.commerce-page-actions{justify-content:stretch;display:grid;grid-template-columns:1fr 1fr}.commerce-page-actions .btn{width:100%;padding:12px 10px}.commerce-bottom-nav{position:fixed;left:10px;right:10px;bottom:10px;z-index:220;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;padding:8px;border-radius:24px;background:rgba(7,10,15,.90);backdrop-filter:blur(18px);border:1px solid var(--line);box-shadow:0 14px 45px rgba(0,0,0,.45)}.commerce-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;border-radius:18px;color:#172033;font-size:10px;font-weight:1000}.commerce-bottom-nav a span{font-size:17px}.commerce-bottom-nav a.active{background:linear-gradient(135deg,#ff8c00,#ffb23f);color:#071019}.liquidacion-card{border-radius:24px;padding:18px}.table-card{border-radius:22px}.table-wrap table{min-width:800px}.comercio-modal{padding:10px}.comercio-modal-card{padding:18px;border-radius:24px}.sx-notif{right:14px;top:14px}}
@media(max-width:420px){.command-actions,.commerce-page-actions,.order-card-actions{grid-template-columns:1fr}.commerce-product-metrics{grid-template-columns:1fr}.order-card-money .order-money-card{grid-template-columns:1fr}.commerce-bottom-nav{left:6px;right:6px;bottom:6px;border-radius:20px}.commerce-bottom-nav a{font-size:9px}.commerce-bottom-nav a span{font-size:16px}}


/* === ShipXpress Comercio App V2: flujo, historial, extras y realtime === */
.order-products-list{display:grid;gap:9px}
.order-product-item{padding:10px 11px;border-radius:14px;background:#f8fafc;border:1px solid rgba(255,255,255,.08)}
.order-product-main{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;color:#fff}
.order-product-main strong{font-size:14px;line-height:1.25}.order-product-main em{font-style:normal;color:#a85108;font-size:12px;font-weight:1000;white-space:nowrap}
.order-item-extras{margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.07)}
.order-item-extras small{display:block;color:#a85108;font-weight:1000;font-size:10px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}
.order-item-extras div{display:flex;gap:6px;flex-wrap:wrap}.order-item-extras span{display:inline-flex;padding:6px 8px;border-radius:999px;background:rgba(255,140,0,.12);border:1px solid rgba(255,140,0,.22);color:#a85108;font-size:11px;font-weight:900}.order-item-extras p{margin:7px 0 0;color:#172033;font-size:12px;font-weight:850}.order-products-fallback{font-weight:850;color:#dfeaff}
.commerce-history-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.commerce-history-summary div{padding:16px;border-radius:22px;background:#ffffff;border:1px solid var(--line);box-shadow:0 10px 28px rgba(0,0,0,.18)}.commerce-history-summary small{display:block;color:var(--muted);font-size:11px;font-weight:1000;text-transform:uppercase;margin-bottom:7px}.commerce-history-summary strong{font-size:26px;color:#172033;line-height:1;word-break:break-word}.history-tools{align-items:stretch}.commerce-history-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:14px}.commerce-history-card{position:relative;overflow:hidden;border-radius:24px;padding:16px;background:#ffffff;border:1px solid #e5e9ef;box-shadow:0 12px 32px rgba(0,0,0,.20)}.commerce-history-card::before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:#39ff14}.commerce-history-card.estado-cancelado::before,.commerce-history-card.estado-rechazado::before,.commerce-history-card.estado-anulado::before{background:#ff4d4d}.history-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px;padding-left:4px}.history-card-head small{display:block;color:#a85108;font-weight:1000;text-transform:uppercase;margin-bottom:4px}.history-card-head h3{font-size:19px;margin:0;color:#fff}.history-card-products{padding:12px;border-radius:17px;background:#f8fafc;border:1px solid #e5e9ef;margin-bottom:12px}.history-money .order-money-card{width:100%;min-width:0;grid-template-columns:repeat(2,1fr);margin-bottom:12px}.history-card-meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;color:#aebccd;font-size:12px;font-weight:900;margin-bottom:12px}.history-actions{display:flex;gap:8px;flex-wrap:wrap}.chat-modal-card{width:min(720px,100%)}.chat-msg.mine{background:rgba(255,140,0,.11);border-color:rgba(255,140,0,.22);margin-left:22px}.chat-msg.other{background:#f8fafc;margin-right:22px}.chat-msg p{margin:5px 0;color:#172033;line-height:1.35}.chat-msg small{color:var(--muted);font-weight:800}.sx-notif.show{animation:sxPop .22s ease-out}
@keyframes sxPop{from{transform:translateY(-8px);opacity:.5}to{transform:translateY(0);opacity:1}}
@media(max-width:900px){.commerce-history-summary{grid-template-columns:repeat(2,1fr)}.commerce-history-list{grid-template-columns:1fr}.history-tools{display:grid;grid-template-columns:1fr}.history-money .order-money-card{grid-template-columns:repeat(2,1fr)}}
@media(max-width:420px){.commerce-history-summary{grid-template-columns:1fr}.history-money .order-money-card{grid-template-columns:1fr}.order-product-main{display:grid}.chat-msg.mine,.chat-msg.other{margin-left:0;margin-right:0}}


/* V2.1: detalles de opciones / ingredientes en pedidos */
.order-detail-products .order-products-list,
.info-tile .order-products-list{margin-top:8px}
.order-detail-products .order-product-item,
.info-tile .order-product-item{background:#f8fafc;border:1px solid #e5e9ef;border-radius:16px;padding:12px;margin-top:8px}
.order-detail-products .order-product-main{display:flex;justify-content:space-between;gap:10px;align-items:center}
.order-item-extras span{white-space:normal;line-height:1.25}
.order-products-fallback{white-space:normal;line-height:1.45}
@media(max-width:760px){
  .order-detail-products .order-product-main,
  .info-tile .order-product-main{display:grid;gap:4px}
  .order-item-extras div{display:grid;grid-template-columns:1fr;gap:6px}
}

/* Reutilización de opciones: diálogo común para comercio y administración */
.copiar-opciones-invitar{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.copiar-opciones-dialog{box-sizing:border-box;margin:auto;width:min(610px,94vw);max-height:90dvh;overflow:auto;background:#fff;color:#172c3d;border:0;border-radius:26px;padding:26px;box-shadow:0 4px 18px rgba(23,32,51,.05);font-family:inherit}.copiar-opciones-dialog::backdrop{background:#14283e77;backdrop-filter:blur(4px)}
.copiar-opciones-dialog header>span{color:#bb5700;font-size:11px;letter-spacing:1px;font-weight:800}.copiar-opciones-dialog h2{color:#172c3d;margin:8px 0;font-size:26px}.copiar-opciones-dialog p{color:#637587;line-height:1.5}.copiar-origen-label{display:block;color:#405468;font-weight:800;margin:18px 0}.copiar-origen-label select{box-sizing:border-box;width:100%;margin-top:8px;padding:13px;border:1px solid #dbe3ed;border-radius:14px;background:#f8fafc;color:#172c3d;font:inherit}.copiar-opciones-list{max-height:42dvh;overflow:auto}.copiar-opciones-list h3{font-size:17px;color:#172c3d;margin:16px 0 8px}.copiar-seleccion-card{padding:14px;background:#f8fafc;border:1px solid #e1e8f0;border-radius:16px;margin:10px 0}.copiar-seleccion-card label{display:flex;align-items:center;gap:12px;cursor:pointer}.copiar-seleccion-card input{width:20px;height:20px;flex-shrink:0;accent-color:#ff8c00}.copiar-seleccion-card strong{color:#172c3d}.copiar-seleccion-card small{display:block;color:#637587;margin-top:4px}.copiar-seleccion-card details{padding:10px 0 0 32px;color:#53677d}.copiar-seleccion-card summary{cursor:pointer;font-size:13px}.copiar-opcion-detalle{display:flex;justify-content:space-between;gap:10px;margin-top:8px;font-size:14px}.copiar-opciones-dialog footer{display:flex;justify-content:flex-end;gap:12px;margin-top:18px;flex-wrap:wrap}.copiar-opciones-dialog .btn-ghost{background:#edf2f7;color:#405468;border-color:#dfe6ee}.copiar-opciones-dialog .btn-primary{background:#ff8c00;color:#172c3d}.copiar-opciones-dialog button:disabled{opacity:.45;cursor:default}.copiar-opciones-dialog .copiar-error{color:#b42318;font-size:14px}

.precios-extra-list input{box-sizing:border-box;width:100%;padding:12px;border:1px solid #dbe3ed;border-radius:12px;background:#f8fafc;color:#172c3d;font:inherit;margin-top:6px}

/* Historial de liquidaciones compacto: último comprobante y anteriores en modal. */
.sx-recibo-resumen{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px}
.sx-recibo-resumen>div{flex:1 1 220px;display:grid;gap:6px}
.sx-recibo-resumen strong,.sx-recibo-fila strong{display:block;font-size:26px;color:#20b56c}
.sx-recibo-resumen small,.sx-recibo-fila small{color:var(--muted)}
.sx-recibo-resumen .btn,.sx-recibos-dialog .btn{border-radius:18px;min-height:46px}
.sx-recibos-dialog{margin:auto;width:min(620px,94vw);max-height:85vh;overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:26px;padding:24px;box-shadow:var(--shadow)}
.sx-recibos-dialog::backdrop{background:#070a0fb8;backdrop-filter:blur(3px)}
.sx-recibos-dialog h2{margin-bottom:18px}
.sx-recibo-fila{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:12px;background:var(--surface-2)}
.sx-recibo-fila>div{display:grid;gap:6px}
.sx-recibos-dialog [data-estado]{margin:12px 0;color:var(--muted)}
@media(max-width:480px){.sx-recibo-resumen .btn,.sx-recibo-fila .btn{width:100%}}

.sx-recibos-dialog [hidden],.sx-recibo-resumen [hidden]{display:none!important}

.sx-recibo-resumen [data-ultimo]{background:linear-gradient(120deg,#ff8c00,#ffb23f);color:#172033;border:1px solid transparent;font-weight:700}
.sx-recibo-resumen [data-anteriores],.sx-recibos-dialog .btn{background:var(--surface-2);color:var(--orange-2);border:1px solid #ff8c0066}

#panelLiquidacionComercio[hidden]{display:none!important}

body.comercio-app{margin:0;background:#f5f6f8;color:#172033;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.5}
.comercio-app *{box-sizing:border-box}.comercio-app [hidden]{display:none!important}/* Los SVG de Leaflet conservan el ancho y alto calculados por el mapa. */
.comercio-app svg:not(:where(.leaflet-container svg)){width:22px;height:22px;flex-shrink:0;vertical-align:middle}
.comercio-app button,.comercio-app a,.comercio-app input,.comercio-app select,.comercio-app textarea{-webkit-tap-highlight-color:transparent}
.comercio-app :focus-visible{outline:3px solid #ffad4f;outline-offset:3px}.comercio-app button{cursor:pointer}.comercio-app button:disabled{opacity:.6;cursor:wait}
.comercio-app .layout{display:grid;grid-template-columns:246px minmax(0,1fr);min-height:100dvh}.comercio-app .content{min-width:0;padding:0 28px 32px;max-width:1600px;width:100%;margin:auto}
.comercio-app .sidebar{position:sticky;top:0;height:100dvh;width:auto;padding:24px 16px;background:#fff;border-right:1px solid #e6e9ee;overflow:auto;scrollbar-width:thin;z-index:60;transform:none}
.ca-brand{display:block;font-size:24px;font-weight:900;letter-spacing:-1px;text-align:center;color:#172033;margin:0 0 22px}.ca-brand span{color:#e77a00}.ca-store{display:grid;justify-items:center;text-align:center;gap:8px;margin-bottom:18px}.ca-store img{width:76px;height:76px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 0 0 1px #f2dcc1}.ca-store strong{font-size:17px;line-height:1.35;overflow-wrap:anywhere}.ca-store small{color:#718096;font-size:12px}
.ca-side-summary{display:grid;grid-template-columns:1fr 1fr;background:#fff7eb;border:1px solid #f8e6cd;border-radius:18px;margin-bottom:18px;padding:13px 5px}.ca-side-summary a{display:grid;text-align:center;gap:1px}.ca-side-summary a+a{border-left:1px solid #f1dfc5}.ca-side-summary strong{font-size:18px;color:#9e520b}.ca-side-summary small{font-size:11px;color:#947045}
.comercio-app .side-nav{display:grid;gap:7px}.comercio-app .side-nav a,.comercio-app .side-nav button{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;min-height:46px;background:#fff8ee;border:1px solid #f7ead7;color:#955015;font-size:13px;font-weight:650;text-align:left;width:100%;line-height:1.4}.comercio-app .side-nav a.active{background:#ffedd3;border-color:#f3ce96;color:#a34e00}.comercio-app .side-nav a:hover{background:#ffefda}.comercio-app .side-nav button[data-logout]{margin-top:12px;color:#fff;background:#b63436;border-color:#b63436}.ca-module-nav{display:grid;gap:7px}.ca-module-nav:empty{display:none}
.ca-header{position:sticky;top:0;z-index:40;min-height:88px;background:#ffffffed;backdrop-filter:blur(14px);display:flex;align-items:center;gap:14px;margin:0 -28px 24px;padding:14px 28px;border-bottom:1px solid #e8ebef}.ca-header-brand{display:grid;gap:2px;min-width:0}.ca-header-brand strong{font-size:25px;font-style:italic;letter-spacing:-1px;font-weight:850}.ca-header-brand small{color:#6c7685;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}.ca-header-actions{margin-left:auto;display:flex;align-items:center;gap:9px}.ca-quick-modules{display:flex;align-items:center;gap:7px}.ca-icon{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;position:relative;border:1px solid #f2dfc2;background:#fff8ed;color:#a05c16;border-radius:50%;padding:0;flex-shrink:0}.ca-icon:hover{background:#ffedcf}.ca-icon svg{width:21px;height:21px}.ca-menu{display:none}.ca-online{border:1px solid #bde3cd;background:#eaf8ef;color:#20734e;border-radius:30px;padding:9px 13px;font-size:12px;font-weight:650;min-height:38px;white-space:nowrap}.ca-online.offline{background:#f2f4f7;border-color:#dde2e8;color:#697587}.ca-icon [data-ca-count]{position:absolute;right:-3px;top:-4px;background:#cf393b;color:#fff;border:2px solid #fff;border-radius:20px;font-size:10px;min-width:18px;padding:0 3px}.ca-sidebar-close,.ca-scrim{display:none}.ca-connection{border:1px solid #f3dba6;background:#fff9e9;color:#8b5a15;padding:10px 14px;border-radius:12px;margin-bottom:16px;font-size:13px}
.comercio-app .comercio-toolbar:empty{display:none}.comercio-app .btn,.comercio-app .btn-mini{min-height:42px;line-height:1.4;letter-spacing:0;padding:11px 16px;border-radius:13px;font-weight:700;white-space:normal}.comercio-app .btn:hover,.comercio-app .btn-mini:hover{transform:none}.comercio-app .btn-primary{background:#ff8700;color:#fff;box-shadow:none}.comercio-app .btn-dark,.comercio-app .btn-ghost{background:#fff6e8;border:1px solid #f3ddba;color:#9b5314}.comercio-app .btn-green{background:#e9f8ed;color:#167347;border:1px solid #bce6ca}.comercio-app .btn-danger{background:#fff0ef;color:#ad3434;border:1px solid #f3c9c7}.comercio-app .btn-mini{background:#fff4e3;color:#985317;border:1px solid #f2dcc1}.comercio-app .btn-mini.bad{background:#fff1f0;color:#b83232;border-color:#f4cfcb}
.comercio-app :is(.card,.stat-card,.table-card,.liquidacion-card,.commerce-section-card,.commerce-page-hero,.commerce-command-card,.store-status-card,.commerce-order-card,.commerce-history-card,.commerce-product-card,.comercio-modal-card,.info-tile,.sx-recibos-dialog){background:#fff;border:1px solid #e5e9ef;color:#172033;box-shadow:0 3px 16px #17203306}
.comercio-app :is(h1,h2,h3,h4,.order-product-main,.info-tile strong,.history-card-head h3,.horario-editor-head strong){color:#172033}.comercio-app h1{font-size:26px;letter-spacing:-.6px}.comercio-app h2{font-size:20px;letter-spacing:-.3px}.comercio-app h3{font-size:17px}.comercio-app p{line-height:1.55}.comercio-app :is(.muted,.commerce-page-hero p,.commerce-command-card p,.store-status-main p){color:#6c7685;font-weight:400}
.comercio-app :is(.comercio-search,.comercio-form-grid input,.comercio-form-grid select,.comercio-form-grid textarea,.mini-form input,.mini-form select,.mini-form textarea,.horario-editor,.horario-row,.liquidacion-form input,.liquidacion-form select){background:#f8fafc;color:#172033;border-color:#dfe5ed;min-width:0}.comercio-app input::placeholder,.comercio-app textarea::placeholder{color:#85909e}.comercio-app label[style*="color:#d7e5f4"]{color:#435269!important}.comercio-app .form-grid input,.comercio-app .form-grid textarea,.comercio-app .form-grid select{background:#f8fafc;color:#172033;border-color:#dfe5ed}
.comercio-app .commerce-dashboard-hero{grid-template-columns:1.1fr 1fr}.comercio-app .commerce-command-card h2{font-size:23px}.comercio-app .command-kicker{color:#a75b13}.comercio-app .command-stats>div,.comercio-app .commerce-product-metrics>div,.comercio-app .commerce-history-summary>div{background:#f8fafc;border-color:#e6eaf0;box-shadow:none}.comercio-app .command-stats strong,.comercio-app .commerce-product-metrics strong,.comercio-app .commerce-history-summary strong{color:#172033}.comercio-app .commerce-product-layout{grid-template-columns:320px minmax(0,1fr);align-items:start}.comercio-app .commerce-create-card{position:static}.comercio-app .commerce-product-grid{grid-template-columns:repeat(auto-fill,minmax(min(235px,100%),1fr))}.comercio-app .commerce-product-actions{padding-bottom:6px;flex-wrap:wrap}.comercio-app .commerce-product-actions>*{flex:1 1 100px}.comercio-app .commerce-product-body{min-width:0}.comercio-app .commerce-product-card{overflow:hidden}.comercio-app .commerce-product-card .pill{background:#fff9ee;color:#985215;border-color:#f3d4a9;opacity:1}
.comercio-app .commerce-order-board,.comercio-app .commerce-history-list{grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr))}.comercio-app .order-item-extras span{background:#fff3e1;color:#905018;border-color:#f3dfbe}.comercio-app .order-item-extras p{color:#495b70}.comercio-app .order-product-main em{color:#ad5607}.comercio-app .chat-msg p{color:#172033}.comercio-app .chat-msg.mine{background:#fff4e6}.comercio-app .comercio-toast{background:#fff;color:#172033;z-index:1500;bottom:calc(100px + env(safe-area-inset-bottom));box-shadow:0 12px 45px #17203324}
.comercio-app .ca-dispatch{display:flex;gap:16px;align-items:center;background:#fff;border:1px solid #e5e9ef;border-radius:22px;padding:16px;margin-bottom:20px}.ca-dispatch-icon{width:52px;height:52px;display:grid;place-items:center;background:#fff4e3;color:#ab5d17;border-radius:18px;flex-shrink:0}.ca-dispatch-icon svg{width:28px;height:28px}.ca-dispatch>div{display:flex;gap:10px;flex-wrap:wrap}.comercio-app .ca-buy{background:#eaf2ff;color:#295ca8;border:1px solid #d5e3fc}
.comercio-app .commerce-bottom-nav{display:none}.comercio-app .rs-shell{padding:0;max-width:none;width:100%}.comercio-app .rs-nav{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:16px}.comercio-app .rs-nav .rs-btn{min-height:44px}.comercio-app.rs-focused .ca-header,.comercio-app.rs-focused .sidebar,.comercio-app.rs-focused .commerce-bottom-nav{display:none!important}.comercio-app.rs-focused .layout{display:block}.comercio-app.rs-focused .content{padding:0;max-width:none}.rs-embedded .comercio-app .sidebar,.rs-embedded .ca-header,.rs-embedded .commerce-bottom-nav{display:none!important}.rs-embedded .comercio-app .layout{display:block}.rs-embedded .comercio-app .content{padding:0;max-width:none}
.comercio-app .am-card{background:#fff;color:#172033}.comercio-app .am-card input,.comercio-app .am-card select,.comercio-app .am-card textarea{background:#f8fafc;color:#172033;border-color:#dfe5ed}.comercio-app .am-card fieldset{border-color:#e1e7ee}.comercio-app .table-wrap{overflow-x:auto}.comercio-app th{background:#f8fafc;color:#718096}.comercio-app td{color:#172033}.comercio-app .comercio-modal{z-index:1200}.comercio-app .comercio-modal-card{max-height:88dvh;overflow:auto}.comercio-app .side-nav #rs-service-links,.comercio-app .side-nav>[data-fidelidad-link]{display:none}
@media(min-width:1500px){.comercio-app .content{padding-left:40px;padding-right:40px}.ca-header{margin-left:-40px;margin-right:-40px;padding-left:40px;padding-right:40px}}
@media(max-width:1100px){.comercio-app .layout{grid-template-columns:220px minmax(0,1fr)}.comercio-app .commerce-dashboard-hero,.comercio-app .commerce-product-layout{grid-template-columns:1fr}.comercio-app .commerce-create-card form{grid-template-columns:repeat(2,minmax(0,1fr))}.ca-header-brand small{max-width:160px}}
@media(max-width:900px){.comercio-app .layout{display:block}.comercio-app .content{padding:0 18px calc(108px + env(safe-area-inset-bottom));margin:0;max-width:none}.ca-header{margin:0 -18px 20px;padding:12px 18px;min-height:78px;gap:10px}.ca-header-brand strong{font-size:23px}.ca-header-brand small{max-width:200px}.ca-menu{display:inline-flex}.comercio-app .sidebar{position:fixed;inset:0 auto 0 0;transform:translateX(-105%);width:min(290px,86vw);height:100dvh;transition:transform .2s ease;z-index:110;box-shadow:0 0 40px #17203322}.comercio-app .sidebar.open{transform:translateX(0)}.ca-sidebar-close{display:grid;place-items:center;border:0;background:#fff3e3;color:#9e5614;border-radius:50%;width:34px;height:34px;position:absolute;right:12px;top:12px}.ca-sidebar-close svg{width:18px;height:18px}.ca-scrim:not([hidden]){display:block;position:fixed;inset:0;border:0;background:#17203366;backdrop-filter:blur(2px);z-index:100}.comercio-app .commerce-bottom-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;width:100%;transform:none;border:1px solid #e5e9ef;border-bottom:0;border-radius:25px 25px 0 0;padding:9px 8px calc(14px + env(safe-area-inset-bottom));background:#fffffffa;box-shadow:0 -4px 20px #17203308;z-index:50;gap:3px}.comercio-app .commerce-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 3px;min-height:58px;border-radius:16px;color:#7b818a;font-size:10px;font-weight:600;line-height:1.3}.comercio-app .commerce-bottom-nav a.active{background:#fff2df;color:#b15f0d}.comercio-app .commerce-bottom-nav svg{width:23px;height:23px}.comercio-app .commerce-page-hero{padding:18px}.comercio-app .commerce-section-card{padding:16px}.comercio-app .commerce-stats-secondary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){.ca-header{flex-wrap:wrap;column-gap:9px;row-gap:8px}.ca-header-brand{flex:1}.ca-header-brand small{max-width:190px}.ca-header-actions{gap:7px}.ca-header-actions:has(.ca-quick-modules:not(:empty)){flex:1 1 100%;justify-content:flex-end}.ca-quick-modules{margin-right:auto}.ca-online{padding:8px 11px}.ca-icon{width:37px;height:37px}.ca-header-actions:has(.ca-quick-modules:empty) .ca-online{max-width:105px;overflow:hidden;text-overflow:ellipsis}.comercio-app .commerce-create-card form,.comercio-app .comercio-form-grid{grid-template-columns:1fr}.comercio-app .commerce-history-summary{grid-template-columns:repeat(2,1fr)}.comercio-app .commerce-product-metrics{grid-template-columns:repeat(2,1fr)}.comercio-app .comercio-search{width:100%;min-width:0!important}.comercio-app .comercio-toolbar{gap:10px}.comercio-app .ca-dispatch{padding:13px;gap:10px}.ca-dispatch>div{flex:1;display:grid;grid-template-columns:1fr;gap:7px}.ca-dispatch .btn{padding:9px 12px;font-size:12px;min-height:40px}.comercio-app .commerce-page-actions{width:100%}.comercio-app .store-status-card{padding:18px}.comercio-app .command-stats{grid-template-columns:repeat(2,1fr)}.comercio-app .table-head{gap:12px;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.comercio-app *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Detalle de pedidos, diálogos y centro de notificaciones. */
.ca-order{background:#fff;border:1px solid #e2e7ed;border-radius:22px;overflow:hidden;box-shadow:0 3px 14px #17203305;min-width:0}.ca-order>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:19px;cursor:pointer}.ca-order>summary::-webkit-details-marker{display:none}.ca-order>summary>div:first-child{display:grid;gap:5px;min-width:0}.ca-order>summary small{color:#8e5e2c;font-size:12px;font-weight:600}.ca-order>summary strong{font-size:18px;color:#172033;overflow-wrap:anywhere}.ca-order>summary span:not(.pill){font-size:12px;color:#7b8592;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}.ca-order>summary>div:last-child{display:flex;align-items:center;gap:10px;flex-shrink:0}.ca-order>summary svg{width:18px;height:18px;color:#a45f17;transition:transform .2s}.ca-order[open]>summary svg{transform:rotate(180deg)}.comercio-app .ca-order>.commerce-order-card{border:0;border-top:1px solid #eef0f4;border-radius:0;box-shadow:none}.ca-order .order-card-top{margin-bottom:12px}.ca-order .order-card-products{margin:0 0 12px}.comercio-app .order-product-main>strong{flex:1;min-width:0}.ca-product-thumb{width:54px;height:54px;border:1px solid #e6e9ef;border-radius:12px;background:#fff;padding:0;overflow:hidden;flex-shrink:0}.ca-product-thumb img{width:100%;height:100%;object-fit:cover}.comercio-app .order-item-extras section+section{margin-top:12px}.ca-reject-dialog{margin:auto;padding:26px;border-radius:24px;width:min(480px,94vw);border:1px solid #e5e9ef;color:#172033;background:#fff;box-shadow:0 24px 80px #17203333;max-height:90dvh;overflow:auto}.ca-reject-dialog::backdrop{background:#17203370;backdrop-filter:blur(3px)}.ca-dialog-kicker{font-size:11px;letter-spacing:1.2px;font-weight:750;color:#ad5711}.ca-reject-dialog h2{margin:9px 0}.ca-reject-dialog p{color:#6c7685;font-size:14px;margin:10px 0}.ca-reject-dialog label{display:grid;gap:7px;font-size:14px;font-weight:650;margin-top:18px}.ca-reject-dialog textarea{border:1px solid #dfe5ed;border-radius:12px;padding:12px;background:#f8fafc;color:#172033;resize:vertical;width:100%;font:inherit}.ca-reject-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.ca-reject-dialog [role=alert]{color:#b93434}
.comercio-app #sxNotificationCenter>.sx-notif-btn{display:none}.comercio-app #sxNotificationCenter{position:fixed;right:24px;top:82px;z-index:200}.comercio-app .sx-notif-panel{background:#fff;color:#172033;border-color:#e1e7ef;max-width:calc(100vw - 30px);box-shadow:0 18px 60px #17203325}.comercio-app .sx-notif-item,.comercio-app .sx-notif-head{background:#fff;color:#172033;border-color:#e8edf2}.comercio-app .sx-notif-item.unread{background:#fff7eb}.comercio-app .sx-notif-item strong{color:#172033}.comercio-app .sx-notif-item small,.comercio-app .sx-notif-item p{color:#6c7685}.comercio-app .commerce-product-bottom{align-items:flex-start;gap:12px;flex-wrap:wrap}.comercio-app .commerce-product-bottom>.comercio-actions{display:flex;flex-wrap:wrap;gap:7px;width:100%;padding-bottom:4px}.comercio-app .commerce-product-bottom .btn-mini{flex:1 1 72px;min-height:40px;padding:9px 11px}.comercio-app .commerce-product-title{align-items:flex-start;flex-wrap:wrap}.comercio-app .commerce-product-title h3{font-size:17px}.comercio-app .commerce-history-card{overflow:visible}.comercio-app .order-card-actions{padding-bottom:5px;flex-wrap:wrap}.comercio-app .order-card-actions .btn-mini{flex:1 1 120px}.comercio-app .commerce-order-board.compact{align-items:start}.comercio-app .comercio-profile{align-items:start}.comercio-app .commerce-empty-state{background:#fff;border:1px dashed #e1e6ee;color:#435269}.comercio-app .commerce-empty-state strong{color:#172033}
@media(max-width:580px){.comercio-app #sxNotificationCenter{right:15px;top:130px}.ca-order>summary{padding:15px;gap:10px}.ca-order>summary strong{font-size:16px}.ca-order>summary span:not(.pill){max-width:170px}.ca-order>summary .pill{font-size:10px;padding:5px 8px}.ca-order>summary>div:last-child{gap:6px}}

/* Legibilidad del tema claro, incluidos estados y resúmenes monetarios heredados. */
body.comercio-app{padding-bottom:0}.comercio-app :is(.store-state-pill.online,.pill.ok){color:#18734f;background:#eaf8ef;border-color:#c5e7d1}.comercio-app :is(.store-state-pill.offline,.pill.bad){color:#ad3434;background:#fff0ef;border-color:#f3cfcd}.comercio-app .pill.warn{color:#9f5610;background:#fff3e1;border-color:#f3dbb8}.comercio-app .pill{font-weight:650}.comercio-app .order-money-card strong{color:#172033}.comercio-app .order-money-card strong.ok{color:#168153}.comercio-app .order-money-card strong.bad{color:#bc3c3c}.comercio-app .order-progress{color:#92520e;background:#fff6e7;border-color:#f4d8ae}.comercio-app .order-progress.sx-ready,.comercio-app .order-progress.sx-ok{color:#18734f;background:#edf9f1;border-color:#c5e7d1}.comercio-app .order-progress.sx-late{color:#ad3434;background:#fff0ef;border-color:#f3cfcd}.comercio-app .order-phone{color:#2c6b9f}.comercio-app .order-product-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.comercio-app .order-product-main>strong{flex:1 1 100px;font-weight:650}.comercio-app .order-product-main em{font-weight:650}.comercio-app .order-product-item{padding:12px}.comercio-app .order-card-money .order-money-card{grid-template-columns:repeat(2,minmax(0,1fr))}.comercio-app .commerce-bottom-nav a span{font-size:10px;font-weight:600}.comercio-app .command-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.comercio-app .command-stats strong{font-size:22px;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-weight:750}.comercio-app .store-status-card{min-height:220px}.comercio-app .stat-card{padding:20px;min-height:140px}.comercio-app .stat-card strong{font-size:24px;font-weight:750;line-height:1.4;word-break:normal}.comercio-app .stat-card em{font-weight:500}.comercio-app .commerce-product-info p{font-weight:400}.comercio-app .commerce-product-tags span{font-weight:500}.comercio-app :is(.commerce-product-info h3,.order-card-top h3){font-weight:700}.comercio-app .order-card-meta{font-weight:500}.comercio-app .commerce-stats-secondary:has(#statNombreComercio){grid-template-columns:repeat(3,minmax(0,1fr))}.comercio-app .stat-card:has(#statNombreComercio),.comercio-app .stat-card:has(#statEstadoComercio){display:none}.comercio-app .commerce-command-card:after{display:none}.comercio-app .liquidacion-card p{font-weight:400}.comercio-app .commerce-product-card.is-hidden{opacity:1}.comercio-app .commerce-product-card.is-hidden .commerce-product-photo{opacity:.65}.comercio-app .commerce-product-bottom strong{font-weight:700}.comercio-app .commerce-product-info .comercio-actions{align-items:stretch}.comercio-app .command-stats small{color:#6c7685}.comercio-app .ca-order .order-card-top small{font-weight:600}.comercio-app .order-item-extras small{text-transform:none;font-size:12px;font-weight:700}
@media(max-width:900px){.comercio-app .content{padding:0 18px calc(108px + env(safe-area-inset-bottom))!important}.comercio-app.rs-focused .content,.rs-embedded .comercio-app .content{padding:0!important}.comercio-app .commerce-stats-secondary:has(#statNombreComercio){grid-template-columns:repeat(2,minmax(0,1fr))}}

.comercio-app .delivery-chip.delivery{background:#eaf8ef;color:#18734f;border-color:#c5e7d1}.comercio-app .delivery-chip.pickup{background:#edf3ff;color:#2857a1;border-color:#cdddf8}.comercio-app .ca-reject-dialog input{border:1px solid #dfe5ed;border-radius:12px;padding:12px;background:#f8fafc;color:#172033;width:100%;font:inherit}.comercio-app .commerce-page-hero>div>small{color:#a25a15}.comercio-app .comercio-form-grid .full{min-width:0}

.comercio-app .commerce-product-layout:has(.ca-create-product){display:block}.ca-create-product{margin-bottom:18px;border:1px solid #f0dbb9;background:#fffaf2;border-radius:18px;overflow:hidden}.ca-create-product>summary{cursor:pointer;padding:15px 18px;font-size:14px;color:#965115;font-weight:650}.comercio-app .ca-create-product .commerce-create-card{border:0;box-shadow:none;border-radius:0;margin:0;padding:22px}.comercio-app .commerce-page-hero{box-shadow:none;background:transparent;border:0;padding:0;margin-bottom:22px;min-height:0}.comercio-app .commerce-page-hero h2{font-size:22px}.comercio-app .commerce-page-hero p{font-size:13px}.comercio-app .command-stats strong{font-variant-numeric:tabular-nums}.comercio-app .commerce-product-info .price-offer{color:#ac590e}

.ca-create-product>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px}.ca-create-product>summary::-webkit-details-marker{display:none}.ca-create-product>summary svg{width:18px;height:18px;transition:transform .2s}.ca-create-product[open]>summary svg{transform:rotate(180deg)}

/* Completo también en Restaurante/Fidelidad, que no dependen de app.css. */
.comercio-app a{text-decoration:none}.comercio-app .ca-header-brand,.comercio-app .ca-header-brand:visited{color:#172033}.comercio-app .ca-side-summary a{color:inherit}.comercio-app #sxNotificationCenter{width:0;height:0;margin:0;right:20px;top:var(--ca-header-bottom,88px);z-index:1200}.comercio-app #sxNotifPanel{display:none;position:fixed;right:18px;top:calc(var(--ca-header-bottom,88px) + 8px);width:min(390px,calc(100vw - 28px));max-height:min(540px,calc(100dvh - var(--ca-header-bottom,88px) - 30px));overflow:hidden;border-radius:22px;background:#fff;border:1px solid #e1e7ef;box-shadow:0 18px 65px #1720332b;color:#172033;z-index:1201;font:14px/1.5 Inter,system-ui,sans-serif}.comercio-app #sxNotifPanel.open{display:flex;flex-direction:column}.comercio-app #sxNotifPanel .sx-notif-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:none;padding:16px;border-bottom:1px solid #e9edf2;background:#fff}.comercio-app #sxNotifPanel .sx-notif-head strong{font-size:17px;color:#172033}.comercio-app #sxNotifPanel .sx-notif-head button{border:1px solid #f3dfc1;border-radius:11px;padding:8px 10px;background:#fff6e7;color:#9c5312;font:600 12px/1.4 Inter,system-ui,sans-serif;cursor:pointer}.comercio-app #sxNotifList{min-height:0;overflow:auto;padding:10px;display:grid;gap:8px;overscroll-behavior:contain}.comercio-app #sxNotifPanel .sx-notif-item{display:grid;gap:5px;width:100%;text-align:left;padding:13px;border:1px solid #e7ebf0;border-radius:15px;background:#f9fafc;color:#172033;white-space:normal;overflow-wrap:anywhere;font:inherit;cursor:pointer}.comercio-app #sxNotifPanel .sx-notif-item.unread{background:#fff7e9;border-color:#f1d4a7}.comercio-app #sxNotifPanel .sx-notif-item strong{color:#172033;font-size:13px;font-weight:700}.comercio-app #sxNotifPanel .sx-notif-item span{font-size:12px;color:#5f6d7e;line-height:1.5}.comercio-app #sxNotifPanel .sx-notif-item small{font-size:11px;color:#7a8593;font-weight:400}.comercio-app #sxNotifPanel .sx-notif-empty{padding:24px;text-align:center;color:#768394}.comercio-app #sxNotifPanel .sx-notif-item:focus-visible{outline:3px solid #f6b35a;outline-offset:-3px}
