:root{
  --bg:#f4f7fb;
  --ink:#101828;
  --mut:#667085;
  --panel:#ffffff;
  --line:#dbe4f0;
  --soft:#eef5ff;
  --blue:#0b63ce;
  --blue2:#13a3d8;
  --green:#16a36a;
  --gold:#f3b63f;
  --red:#e54862;
  --shadow:0 18px 48px rgba(16,24,40,.10);
}
*{box-sizing:border-box}
body{
  margin:0;
  color:var(--ink);
  font-family:Segoe UI,Arial,sans-serif;
  background:
    radial-gradient(circle at 8% 10%,rgba(19,163,216,.18),transparent 26%),
    radial-gradient(circle at 92% 0%,rgba(243,182,63,.16),transparent 24%),
    linear-gradient(135deg,rgba(11,99,206,.09),transparent 30%),
    linear-gradient(315deg,rgba(19,163,216,.08),transparent 34%),
    var(--bg);
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.12;
  background-image:none;
  background-size:420px 220px;
  background-repeat:repeat;
}
a{color:inherit;text-decoration:none}
.app,.print-toolbar,.print{
  position:relative;
  z-index:1;
}
.app{display:flex;min-height:100vh}
.side{
  width:292px;
  height:100vh;
  position:sticky;
  top:0;
  overflow:auto;
  padding:18px;
  display:flex;
  flex-direction:column;
  background:
    linear-gradient(180deg,rgba(7,27,59,.84),rgba(8,51,106,.68) 56%,rgba(6,75,120,.58)),
    radial-gradient(circle at 18% 0%,rgba(57,213,255,.24),transparent 34%),
    radial-gradient(circle at 95% 18%,rgba(243,182,63,.18),transparent 28%);
  backdrop-filter:blur(18px) saturate(150%);
  -webkit-backdrop-filter:blur(18px) saturate(150%);
  color:white;
  border-right:1px solid rgba(255,255,255,.18);
  box-shadow:16px 0 48px rgba(7,27,59,.18);
  transition:width .22s ease, padding .22s ease;
}
.side .nav{flex:1}
.side svg{width:18px;height:18px;stroke-width:2.4;flex:0 0 auto}
.brand-panel{
  padding:14px;
  margin-bottom:14px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.075));
  box-shadow:0 18px 34px rgba(0,20,45,.14), inset 0 1px 0 rgba(255,255,255,.16);
  position:relative;
  min-height:94px;
}
.brand-panel img{width:58px;height:58px;object-fit:contain;border-radius:16px;background:white;margin-bottom:10px}
.brand-copy{transition:opacity .18s ease}
.brand{font-weight:950;font-size:19px;line-height:1.12}
.brand span{display:inline-block;color:#ffe08c}
.brand-panel small{display:block;margin-top:8px;color:#c8daf6;font-weight:800}
.side-toggle{
  position:absolute;
  top:12px;
  right:12px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  color:#eaf6ff;
  background:rgba(255,255,255,.12);
  cursor:pointer;
}
.side-toggle:hover{background:rgba(255,255,255,.22)}
.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 13px;
  margin:5px 0;
  border-radius:12px;
  color:#f2f8ff;
  font-weight:800;
  border:1px solid transparent;
  white-space:nowrap;
}
.nav a:hover{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.26);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
.nav > a.nav-home{
  margin-bottom:10px;
  color:#fff;
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.14);
}
.nav > a.nav-home.active{
  color:#063667;
  background:linear-gradient(135deg,#ffffff,#dff3ff);
  border-color:rgba(255,255,255,.72);
  box-shadow:0 14px 28px rgba(1,31,72,.22);
}
.nav-group{
  margin:7px 0;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
  background:linear-gradient(135deg,rgba(255,255,255,.105),rgba(255,255,255,.045));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.nav-group summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 14px;
  color:#f3f8ff;
  font-weight:950;
  cursor:pointer;
  letter-spacing:0;
}
.nav-group summary span{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.nav-group summary b{white-space:nowrap}
.nav-group summary::-webkit-details-marker{display:none}
.nav-group summary::after{
  content:"+";
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:#9fd6ff;
  background:rgba(255,255,255,.10);
  font-weight:950;
}
.nav-group[open]{
  background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.075));
  border-color:rgba(129,212,250,.42);
}
.nav-group[open] summary{
  background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(19,163,216,.38));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);
}
.nav-group[open] summary::after{content:"-";color:#fff}
.nav-sub{
  display:grid;
  gap:4px;
  padding:7px;
  background:rgba(4,20,45,.10);
}
.nav .nav-sub a{
  margin:0;
  padding:10px 12px 10px 18px;
  border-radius:11px;
  color:#d8eaff;
  font-size:13px;
  font-weight:800;
  background:transparent;
}
.nav .nav-sub a .nav-pill{margin-left:auto}
.nav .nav-sub a:hover{background:rgba(255,255,255,.10)}
.nav .nav-sub a.active{
  color:#063667;
  background:linear-gradient(135deg,#ffffff,#dff3ff);
  border-color:rgba(255,255,255,.72);
  box-shadow:0 10px 22px rgba(1,31,72,.20);
}
.nav-pill{
  float:right;
  margin-left:8px;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(243,182,63,.18);
  color:#ffe08c;
  font-size:10px;
  font-weight:950;
}
.nav .nav-sub a.active .nav-pill{
  background:#fff3c4;
  color:#8a5a00;
}
.side-bottom{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.18);
}
.side-logout{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:13px 14px;
  border-radius:14px;
  color:white;
  background:linear-gradient(135deg,#e54862,#b4233c);
  border:1px solid rgba(255,255,255,.28);
  box-shadow:0 14px 28px rgba(181,35,60,.26);
  font-weight:950;
  text-align:center;
  white-space:nowrap;
}
.side-logout:hover{filter:brightness(1.04);transform:translateY(-1px)}

.search-result.active{
  background:linear-gradient(90deg,#fff8df 0%,#fffdf4 100%)!important;
  border-color:#e9bf58!important;
  box-shadow:inset 4px 0 0 #d99517,0 8px 18px rgba(176,117,20,.10)!important;
  color:#573b08!important;
}
.selected-sale-line td{
  background:#fff1bf!important;
  color:#073b73!important;
}

.search-result.stock-alert{
  border-left:5px solid #d82f2f!important;
  background:linear-gradient(90deg, #fff5f5 0%, #fffcfc 100%);
}

.search-result.stock-alert.active{
  background:linear-gradient(90deg, #ffe6e6 0%, #ffd7d7 100%)!important;
}

.stock-alert-text{
  color:#b71c1c!important;
  font-weight:900!important;
}

.selected-sale-line{
  outline:2px solid rgba(243,182,63,.55);
  outline-offset:-2px;
}

.pos-quick-modal[hidden]{display:none}
.pos-quick-modal{
  position:fixed;
  inset:0;
  z-index:120;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(16,24,40,.34);
}
.pos-quick-card{
  width:min(420px,92vw);
  display:grid;
  gap:12px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
}
.pos-quick-card input{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  font-size:18px;
  font-weight:900;
}
.quick-price-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.quick-price-options button{
  min-height:42px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--blue);
  font-weight:900;
  cursor:pointer;
}

.batch-form{
  margin-top:10px;
}

@media print{
  *{
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .batch-print-page{
    break-after:page;
    page-break-after:always;
  }
  .batch-print-page:last-child{
    break-after:auto;
    page-break-after:auto;
  }
}
.main{flex:1;min-width:0;padding:24px}
body.sidebar-collapsed .side{
  width:86px;
  padding:14px;
}
body.sidebar-collapsed .brand-panel{
  padding:10px;
  min-height:74px;
  display:grid;
  place-items:center;
}
body.sidebar-collapsed .brand-panel img{width:46px;height:46px;margin:0}
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav a span,
body.sidebar-collapsed .nav-group summary b,
body.sidebar-collapsed .nav-pill,
body.sidebar-collapsed .side-logout span{
  opacity:0;
  width:0;
  max-width:0;
  overflow:hidden;
  pointer-events:none;
}
body.sidebar-collapsed .side-toggle{
  right:-12px;
  top:72px;
  background:linear-gradient(135deg,#fff,#eaf6ff);
  color:#0b63ce;
  border-color:#cde6f8;
  box-shadow:0 12px 24px rgba(16,24,40,.18);
}
body.sidebar-collapsed .nav a,
body.sidebar-collapsed .nav-group summary,
body.sidebar-collapsed .side-logout{
  justify-content:center;
  padding-left:10px;
  padding-right:10px;
}
body.sidebar-collapsed .nav-group summary::after{display:none}
body.sidebar-collapsed .nav-sub{
  display:none!important;
}
body.sidebar-collapsed .app.sidebar-peek .side{
  width:292px;
  padding:18px;
  z-index:30;
}
body.sidebar-collapsed .app.sidebar-peek .brand-panel{
  padding:14px;
  min-height:94px;
  display:block;
}
body.sidebar-collapsed .app.sidebar-peek .brand-panel img{width:58px;height:58px;margin-bottom:10px}
body.sidebar-collapsed .app.sidebar-peek .brand-copy,
body.sidebar-collapsed .app.sidebar-peek .nav a span,
body.sidebar-collapsed .app.sidebar-peek .nav-group summary b,
body.sidebar-collapsed .app.sidebar-peek .nav-pill,
body.sidebar-collapsed .app.sidebar-peek .side-logout span{
  opacity:1;
  width:auto;
  max-width:240px;
  overflow:visible;
  pointer-events:auto;
}
body.sidebar-collapsed .app.sidebar-peek .nav a,
body.sidebar-collapsed .app.sidebar-peek .nav-group summary,
body.sidebar-collapsed .app.sidebar-peek .side-logout{
  justify-content:flex-start;
}
body.sidebar-collapsed .app.sidebar-peek .nav-group summary::after{display:grid}
body.sidebar-collapsed .app.sidebar-peek .nav-sub{display:grid!important}
body.sidebar-collapsed .app.sidebar-peek .side-toggle{
  right:12px;
  top:72px;
  color:#eaf6ff;
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.22);
  box-shadow:none;
}
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
}
.top-title{
  flex:1;
  min-width:0;
  text-align:center;
}
.top-brand{display:flex;align-items:center;gap:10px;margin-bottom:8px;color:var(--blue);font-weight:950}
.top-title .top-brand{justify-content:center}
.top-title .top-brand span{font-size:22px;line-height:1.05}
.top-brand img{width:38px;height:38px;object-fit:contain;border-radius:10px;background:#fff;border:1px solid var(--line)}
.top-user{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.top-user a{color:var(--blue);font-weight:900;font-size:12px}
.top h1{margin:0;font-size:30px;letter-spacing:0}
.top small{color:var(--mut)!important;font-weight:700}
.user-menu{position:relative}
.user-menu summary::-webkit-details-marker{display:none}
.user-chip{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:54px;
  padding:7px 12px 7px 7px;
  border-radius:18px;
  background:linear-gradient(135deg,#fff,#edf8ff);
  border:1px solid #cde6f8;
  box-shadow:var(--shadow);
  cursor:pointer;
  list-style:none;
}
.user-chip::after{
  content:"v";
  color:#0b63ce;
  font-weight:950;
  margin-left:4px;
}
.user-menu[open] .user-chip::after{content:"^"}
.user-chip strong{
  display:block;
  color:#073b73;
  font-size:14px;
  line-height:1.1;
}
.user-chip small{
  display:block;
  margin-top:3px;
  color:#667085!important;
  font-size:11px;
  font-weight:850;
}
.user-logo{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--line);
  overflow:hidden;
}
.user-logo img{width:100%;height:100%;object-fit:contain;padding:4px}
.user-logo span{color:var(--blue);font-weight:950}
.user-menu-panel{
  position:absolute;
  top:62px;
  right:0;
  z-index:40;
  width:230px;
  padding:8px;
  border-radius:14px;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  box-shadow:0 22px 60px rgba(16,24,40,.18);
  backdrop-filter:blur(12px);
}
.user-menu-panel a{
  display:block;
  padding:11px 12px;
  border-radius:10px;
  color:#073b73;
  font-size:13px;
  font-weight:900;
}
.user-menu-panel a:hover{background:#eef7ff}
.user-menu-panel a.danger{
  margin-top:5px;
  color:white;
  background:linear-gradient(135deg,#e54862,#b4233c);
}
.badge{
  padding:10px 16px;
  border-radius:999px;
  color:#06406f;
  background:linear-gradient(135deg,#fff,#e6f5ff);
  border:1px solid #cde6f8;
  font-weight:950;
  box-shadow:var(--shadow);
}
.notifications{position:relative}
.notifications summary{
  list-style:none;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(135deg,#fff,#eaf6ff);
  border:1px solid #cde6f8;
  box-shadow:var(--shadow);
  cursor:pointer;
  position:relative;
}
.notifications summary::-webkit-details-marker{display:none}
.bell{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:white;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  font-weight:950;
}
.notifications summary b{
  position:absolute;
  top:-7px;
  right:-6px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e11d48;
  color:white;
  border:2px solid white;
  font-size:12px;
  box-shadow:0 8px 18px rgba(225,29,72,.32);
}
.notifications-menu{
  position:absolute;
  /* Se despliega despues de la fila de accesos/acciones de cada modulo. */
  top:112px;
  right:0;
  width:min(380px,86vw);
  z-index:20;
  background:rgba(255,255,255,.98);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 22px 60px rgba(16,24,40,.18);
  overflow:hidden;
}
@media(max-width:760px){.notifications-menu{top:54px}}
.notifications-menu h3{margin:0;padding:15px 16px;border-bottom:1px solid var(--line);font-size:16px}
.notification-item{
  display:grid;
  gap:4px;
  padding:13px 16px;
  border-bottom:1px solid var(--line);
  border-left:4px solid transparent;
  text-align:left;
}
.notification-item:hover{background:#f3f8ff}
.notification-item strong{color:#0b3d76;font-size:14px}
.notification-item span{color:#344054;font-size:13px;line-height:1.35}
.notification-item small,.empty-note{color:var(--mut);font-weight:800}
.notification-item.type-stock-critico,
.notification-item.type-inventario{border-left-color:#f59e0b;background:#fffaf0}
.notification-item.type-despacho,
.notification-item.type-entregas{border-left-color:#0ea5e9;background:#f0f9ff}
.notification-item.type-caja{border-left-color:#16a36a;background:#f0fdf4}
.notification-item.type-dgii{border-left-color:#7c3aed;background:#f5f3ff}
.notification-item.type-compras,
.notification-item.type-suplidores{border-left-color:#e54862;background:#fff1f3}
.notification-item.type-clientes{border-left-color:#0b63ce;background:#eef7ff}
.empty-note{margin:0;padding:16px}
.flash-stack{position:fixed;top:88px;right:24px;z-index:1200;display:grid;gap:10px;width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 112px);overflow:auto;pointer-events:none}
.flash{
  position:relative;
  padding:12px 14px;
  padding-right:42px;
  border-radius:14px;
  border:1px solid #cde6f8;
  background:#eef7ff;
  color:#084b83;
  font-weight:900;
  box-shadow:0 12px 28px rgba(17,45,82,.18);
  pointer-events:auto;
}
.flash-close{position:absolute;top:7px;right:8px;width:28px;height:28px;border:0;border-radius:9px;background:rgba(8,75,131,.10);color:inherit;font-size:20px;line-height:1;cursor:pointer;font-weight:900}.flash-close:hover{background:rgba(8,75,131,.20)}
@media(max-width:760px){.flash-stack{top:72px;right:16px;width:calc(100vw - 32px)}}
.flash.danger{background:#fff1f3;border-color:#fecdd3;color:#9f1239}
.actionbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 18px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  gap:6px;
  border:0;
  border-radius:12px;
  padding:10px 15px;
  color:white;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  font-weight:900;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(11,99,206,.18);
}
.btn.gold{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#ffffff}
.actionbar .btn.gold[class*="-tab-btn"],
.product-master-tabs .btn.mini.active,
.accounting-tabs a.active,
.inv-tab-btn.inventory-tab-active{
  background:linear-gradient(135deg,var(--gold),#ffd76b);
  color:#2f2300;
  box-shadow:0 10px 22px rgba(243,182,63,.32), inset 0 0 0 2px rgba(47,35,0,.12);
}
.btn.red{background:linear-gradient(135deg,var(--red),#ff8094);color:white}
.btn.mini{min-height:32px;padding:7px 10px;border-radius:10px;font-size:12px}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.wide{grid-column:span 2}
.full{grid-column:1/-1}
.dashboard-main-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.dashboard-stack{display:grid;gap:12px;align-content:start}
.dashboard-compact .grid{gap:12px}
.dashboard-compact .card{padding:14px}
.dashboard-compact .card h2,.dashboard-compact .card h3{margin-bottom:10px}
.dashboard-compact .section-head{margin-bottom:8px}
.card{
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
  box-shadow:var(--shadow);
  overflow:auto;
}
.card h2,.card h3{margin:0 0 14px}
.kpi{
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.kpi small{display:block;color:var(--mut);font-weight:900}
.kpi h2{margin:8px 0 0;font-size:28px}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.table th{
  color:#475467;
  font-size:12px;
  text-transform:uppercase;
  background:#f3f7fc;
}
.table th,.table td{
  padding:12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}
.table tr:hover td{background:#f8fbff}
.report-preview{display:grid;gap:14px}
.report-head{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.35fr);align-items:start;gap:18px}
.report-head h2{margin:4px 0;font-size:24px}
.report-head small{font-weight:900;color:var(--blue)}
.report-period{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:10px;align-items:end;width:100%;min-width:0;padding:12px;border:1px solid rgba(18,86,148,.12);border-radius:14px;background:rgba(255,255,255,.58)}
.report-period .report-field{display:grid;gap:6px;margin:0;color:var(--mut);font-size:11px;font-weight:900;text-transform:uppercase}
.report-period .report-field span{display:block}
.report-period input,
.report-period select{min-width:0;min-height:41px;border-radius:11px}
.report-period .btn{align-self:end;min-height:41px}
.report-period .report-apply{grid-column:1/-1}
.report-table-card{padding:0}
@media (max-width:900px){
  .report-head{grid-template-columns:1fr}
  .report-period{grid-template-columns:1fr}
}
.table-wrap{width:100%;overflow:auto}
.report-table th{position:sticky;top:0;z-index:1}
.report-table td{font-size:13px}
.report-separator td{height:10px;background:#eef3f8}
input,select{
  width:100%;
  min-height:44px;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid #ccd8e8;
  background:#fff;
  color:var(--ink);
  font:inherit;
  font-weight:700;
  outline:none;
}
input:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(11,99,206,.10)}
.mini-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}
.mini-form.one{grid-template-columns:1fr}
.premium-form{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.premium-form input,
.premium-form select{
  min-height:38px;
  padding:9px 10px;
  border-radius:10px;
  font-size:13px;
}
.premium-form .btn{
  min-height:38px;
  padding:8px 12px;
}
.product-master-form{
  display:grid;
  gap:10px;
  padding:10px;
  border:1px solid #c9d9ec;
  border-radius:12px;
  background:linear-gradient(180deg,#eef5fb,#dfeaf6);
}
.product-master-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding:8px;
  border:1px solid #c6d7e9;
  border-radius:10px;
  background:linear-gradient(180deg,#f8fbff,#e6f0fb);
}
.product-master-toolbar span{
  margin-right:auto;
  color:#0b3d76;
  font-size:18px;
  font-weight:950;
}
.product-master-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  border-bottom:1px solid #b9cadc;
}
.product-master-tabs .btn.mini{
  border:1px solid transparent;
  border-bottom:0;
  border-radius:8px 8px 0 0;
  padding:9px 13px;
  font-size:13.5px;
  font-weight:950;
  box-shadow:none;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.product-master-tabs .btn.mini.active{
  background:#fff;
  color:#0b3d76;
  border-color:#d8e6f5;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38);
}
.product-master-page{display:none}
.product-master-page.active{display:block}
.product-master-grid{
  display:grid;
  grid-template-columns:minmax(280px,1.1fr) minmax(280px,1fr) 190px;
  gap:12px;
  align-items:start;
}
.product-fieldset{
  display:grid;
  gap:9px;
  padding:12px;
  border:1px solid #c8d8ea;
  border-radius:10px;
  background:#f8fbff;
}
.product-fieldset label,
.product-existence-grid label{
  display:grid;
  gap:4px;
  color:#1d3d61;
  font-size:13.5px;
  font-weight:950;
}
.product-fieldset input,
.product-fieldset select,
.product-existence-grid input{
  min-height:37px;
  padding:8px 10px;
  border-radius:6px;
  font-size:14.5px;
  font-weight:750;
}
.product-two,
.product-price-grid,
.product-existence-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.product-price-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.product-flags{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 10px;
  padding:8px;
  border:1px solid #d8e5f3;
  border-radius:8px;
  background:#fff;
}
.product-flags label{
  display:flex;
  align-items:center;
  gap:7px;
  color:#2d4b6e;
  font-size:13.5px;
  font-weight:950;
}
.product-flags input{
  width:auto;
  min-height:auto;
}
.product-code-panel{
  display:grid;
  justify-items:center;
  gap:8px;
  padding:12px;
  border:1px solid #c8d8ea;
  border-radius:10px;
  background:#f8fbff;
  text-align:center;
}
.fake-qr{
  width:132px;
  aspect-ratio:1;
  border:8px solid #fff;
  background:
    linear-gradient(90deg,#111 10px,transparent 10px 18px,#111 18px 26px,transparent 26px 34px,#111 34px 42px,transparent 42px),
    linear-gradient(#111 10px,transparent 10px 18px,#111 18px 26px,transparent 26px 34px,#111 34px 42px,transparent 42px);
  background-size:42px 42px;
  box-shadow:0 0 0 1px #111;
}
.product-image-box{
  min-height:220px;
  display:grid;
  place-items:center;
  gap:10px;
  border:1px dashed #aebfd4;
  border-radius:12px;
  background:#f8fbff;
  color:#667085;
  font-weight:900;
}
.product-edit-master{
  padding:10px;
  border:1px solid #c8d8ea;
  border-radius:12px;
  background:linear-gradient(180deg,#eef5fb,#f8fbff);
}
.product-edit-title{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border:1px solid #c6d7e9;
  border-radius:10px;
  background:#fff;
}
.product-edit-title strong{
  color:#0b3d76;
  font-size:15px;
}
.product-edit-title span{
  color:#667085;
  font-size:12px;
  font-weight:900;
}
.compact-create{
  grid-template-columns:minmax(180px,1fr) auto;
}
.inline-form{display:grid;grid-template-columns:repeat(4,minmax(92px,1fr));gap:8px;align-items:center}
.check{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:auto;max-width:max-content;color:var(--mut);font-weight:900;text-align:left;line-height:1.2}
.check input[type="checkbox"]{flex:0 0 auto;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;margin:0;accent-color:#0d6ed8}
.mini-form label.check.supplier-active-check{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  min-height:42px;
  padding:0 12px;
  margin:0;
}
.mini-form label.check.supplier-active-check input{
  width:16px!important;
  height:16px!important;
  min-height:16px!important;
  flex:0 0 auto;
  margin:0;
}
.mini-form label.check.supplier-active-check span{
  display:inline-block;
  line-height:1;
}
.module-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.module-actions div{
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  padding:14px;
}
.module-actions small{display:block;color:var(--mut);margin-top:6px;font-weight:700}
.company-logo{width:96px;height:96px;object-fit:contain;border-radius:20px;background:white;margin-bottom:12px;border:1px solid var(--line)}
.receipt-logo{width:58px;height:58px;object-fit:contain;margin-bottom:6px}
.thermal .receipt-logo{
  display:block;
  margin:0 auto 6px;
  filter:none;
}
.system-footer{margin-top:28px;padding:18px 0;color:#667085;font-weight:800;text-align:center;border-top:1px solid var(--line)}
.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,rgba(11,99,206,.12),rgba(19,163,216,.08)),var(--bg)}
.login-god{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 12%,rgba(57,213,255,.24),transparent 28%),
    radial-gradient(circle at 82% 8%,rgba(243,182,63,.22),transparent 24%),
    radial-gradient(circle at 72% 86%,rgba(22,163,106,.14),transparent 28%),
    linear-gradient(135deg,#06152f 0%,#0b3c78 66%,#eaf6ff 66.2%,#f5f8fc 100%);
}
.login-god::before{
  content:"";
  position:absolute;
  inset:28px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:30px;
  pointer-events:none;
}
.login-stage{
  width:min(1120px,94vw);
  min-height:min(720px,92vh);
  display:grid;
  grid-template-columns:1.05fr .85fr;
  gap:22px;
  align-items:stretch;
  position:relative;
  z-index:1;
}
.password-stage{grid-template-columns:.95fr .78fr}
.login-brand-side{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:16px;
  padding:44px;
  color:white;
  text-shadow:0 2px 8px rgba(2,12,32,.38);
}
.login-brand-mark{
  width:118px;
  height:118px;
  display:grid;
  place-items:center;
  border-radius:30px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.28);
  backdrop-filter:blur(14px);
  box-shadow:0 24px 60px rgba(0,0,0,.18);
  overflow:hidden;
}
.login-brand-mark img{width:108px;height:108px;object-fit:contain;background:transparent;border-radius:24px;padding:0;display:block}
.login-brand-mark span{font-size:30px;font-weight:950;color:#fff}
.login-brand-side h1{
  margin:0;
  max-width:620px;
  font-size:clamp(38px,6vw,70px);
  line-height:.95;
  letter-spacing:0;
}
.login-brand-side p{
  max-width:620px;
  margin:0;
  color:#dcecff;
  font-size:18px;
  font-weight:800;
  line-height:1.45;
}
.login-feature-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  max-width:680px;
  margin-top:10px;
}
.login-feature-grid div{
  min-height:86px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.32);
  background:rgba(7,35,78,.58);
  backdrop-filter:blur(14px);
  box-shadow:0 16px 34px rgba(2,12,32,.18);
}
.login-feature-grid strong{display:block;color:#fff;font-size:18px;text-shadow:0 2px 6px rgba(2,12,32,.5)}
.login-feature-grid span{display:block;margin-top:5px;color:#f3f9ff;font-size:12px;font-weight:850;text-shadow:0 2px 6px rgba(2,12,32,.5)}
.login-signature{color:#eff8ff;font-weight:950;text-transform:uppercase;letter-spacing:0;font-size:11px;text-shadow:0 2px 6px rgba(2,12,32,.55)}
.login-shell{width:min(460px,92vw)}
.login-panel{background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:22px;padding:28px;box-shadow:var(--shadow)}
.login-glass{
  align-self:center;
  min-height:520px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:34px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.68);
  border-radius:28px;
  backdrop-filter:blur(22px) saturate(150%);
  -webkit-backdrop-filter:blur(22px) saturate(150%);
  box-shadow:0 28px 80px rgba(7,27,59,.22);
}
.login-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.login-panel-head h2{margin:10px 0 0;color:#073b73;font-size:34px;line-height:1}
.login-mini-logo{
  width:82px;
  height:82px;
  display:grid;
  place-items:center;
  flex:0 0 82px;
  border-radius:22px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 16px 38px rgba(7,27,59,.18);
  overflow:hidden;
}
.login-mini-logo img{width:74px;height:74px;object-fit:contain;padding:0;display:block}
.login-mini-logo span{color:var(--blue);font-weight:950;font-size:24px}
.login-logo{width:96px;height:96px;border-radius:24px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;margin:0 auto 14px;box-shadow:var(--shadow)}
.login-logo img{width:78px;height:78px;object-fit:contain}.login-logo span{font-weight:950;font-size:28px;color:var(--blue)}
.login-panel h1{margin:0}.login-panel p,.login-meta{color:var(--mut);font-weight:800}.login-form{display:grid;gap:14px;text-align:left;margin-top:20px}
.premium-login{width:min(520px,92vw)}
.login-eyebrow{display:inline-flex;margin-bottom:10px;padding:7px 11px;border-radius:999px;background:#eef7ff;color:#0b63ce;font-weight:950;font-size:12px}
.login-brand-side .login-eyebrow{width:max-content;background:rgba(255,255,255,.14);color:#eaf6ff;border:1px solid rgba(255,255,255,.22)}
.premium-access label{color:#475467;font-size:13px;font-weight:950}
.premium-access input{
  min-height:52px;
  border-radius:15px;
  background:rgba(255,255,255,.92);
}
.remember-pass-check{
  display:flex;
  align-items:center;
  gap:10px;
  width:max-content;
  max-width:100%;
  margin-top:-4px;
  color:#475467;
  font-size:13px;
  font-weight:950;
  cursor:pointer;
}
.premium-access .remember-pass-check input{
  width:18px;
  height:18px;
  min-height:18px;
  margin:0;
  border-radius:4px;
  cursor:pointer;
}
.login-submit{min-height:54px;font-size:16px}
.login-meta-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
  color:var(--mut);
  font-size:12px;
  font-weight:900;
}
.password-wrap{display:grid;grid-template-columns:1fr auto;gap:8px}
.password-wrap input{min-width:0}
.show-pass{min-height:44px;border:1px solid #ccd8e8;border-radius:12px;background:#fff;color:#0b63ce;font-weight:950;padding:0 13px;cursor:pointer}
.user-role-list{display:grid;gap:10px}
.users-admin{align-items:start}
.user-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:18px;
  align-items:center;
  background:linear-gradient(135deg,#073b73,#0b63ce);
  color:white;
  overflow:hidden;
}
.user-hero h2{margin:10px 0 8px;color:white;font-size:32px;line-height:1.05}
.user-hero p{margin:0;max-width:760px;color:#e8f4ff;font-weight:800}
.user-hero .soft-pill{background:rgba(255,255,255,.16);color:white;border-color:rgba(255,255,255,.28)}
.user-hero-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.user-hero-metrics div{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.22);
  text-align:center;
}
.user-hero-metrics small{display:block;color:#dceeff;font-weight:950}
.user-hero-metrics strong{display:block;margin-top:6px;color:white;font-size:30px}
.role-template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.role-template{
  min-height:86px;
  display:grid;
  align-content:center;
  gap:6px;
  text-align:left;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f5fbff);
  color:#073b73;
  padding:14px;
  cursor:pointer;
}
.role-template:hover{border-color:#93c5fd;box-shadow:0 12px 28px rgba(11,99,206,.10)}
.role-template b{font-size:15px}
.role-template small{color:var(--mut);font-weight:900}
.user-form{padding:0}
.user-form-grid{
  display:grid;
  grid-template-columns:1.2fr 1fr 240px 120px;
  gap:10px;
  align-items:end;
}
.user-form-grid .password-field{grid-column:span 2}
.user-active{min-height:44px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:#f8fbff}
.user-card summary{background:linear-gradient(180deg,#fff,#f8fbff)}
.role-item{border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,#fff,#f8fbff);overflow:hidden}
.role-item summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:14px;font-weight:900}
.role-item summary small{display:block;color:var(--mut);margin-top:4px}.role-item summary strong{color:var(--blue)}
.client-summary-side{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}
.client-summary-side .btn.mini{
  min-height:30px;
  padding:6px 9px;
  font-size:12px;
}
.hidden-admin-delete{display:none!important}
.client-credit-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:0 10px 10px;
}
.admin-client-banner{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid #f2c28e;
  border-radius:12px;
  background:#fff7ed;
  color:#9a4a18;
  font-weight:900;
}
.admin-client-banner span{
  color:#7c4a20;
  font-size:12px;
}
.client-credit-grid .permission-form{
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  gap:8px;
}
.client-credit-grid .permission-head{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.client-credit-grid>div{
  min-width:0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.client-credit-grid h3{
  margin:0 0 6px;
  font-size:15px;
  color:#073b73;
}
.client-credit-grid label{
  font-size:12px;
  gap:4px;
}
.client-credit-grid input,
.client-credit-grid select{
  min-height:34px;
  padding:7px 9px;
  border-radius:8px;
  font-size:13px;
}
.client-credit-grid .btn{
  min-height:34px;
  padding:7px 10px;
  border-radius:8px;
  font-size:13px;
}
.client-history{
  grid-column:1/-1;
}
.client-history .table,
.client-credit-grid .table{
  min-width:680px;
}
.client-credit-grid .table td,
.client-credit-grid .table th{
  white-space:nowrap;
}
.client-credit-grid .table td:nth-child(3){
  white-space:normal;
  min-width:220px;
}
.role-edit-form{display:grid;grid-template-columns:1fr 220px 120px auto;gap:10px;align-items:end;padding:0 14px 14px}
.permission-form{display:grid;gap:14px;padding:0 14px 14px}
.delete-user-form{
  margin:0 14px 14px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.delete-user-form .btn{min-height:40px}
.permission-head{display:grid;grid-template-columns:1fr 220px 120px;gap:10px;align-items:end}
.permission-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.permissions-toggle{
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  overflow:hidden;
}
.permissions-toggle summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:50px;
  padding:12px 14px;
  color:#073b73;
  font-weight:950;
  cursor:pointer;
}
.permissions-toggle summary::-webkit-details-marker{display:none}
.permissions-toggle summary span{display:flex;align-items:center;gap:8px}
.permissions-toggle summary span::before{
  content:"+";
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:white;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
}
.permissions-toggle[open] summary span::before{content:"-"}
.permissions-toggle summary b{
  padding:6px 10px;
  border-radius:999px;
  background:#eef7ff;
  color:#0b4a8b;
  font-size:12px;
}
.permissions-toggle .permission-grid{
  padding:14px;
  border-top:1px solid var(--line);
}
.perm-check{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#344054;
  font-weight:850;
}
.perm-check input[type="checkbox"]{flex:0 0 auto;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;margin:0;accent-color:#0d6ed8}
.perm-check:has(input:checked){border-color:#93c5fd;background:#eff6ff;color:#0b4a8b}
.ok-text{color:var(--green)}
.danger-text{color:var(--red)}
.cancel-box{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.dashboard-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  align-items:center;
  gap:18px;
  background:
    linear-gradient(135deg,rgba(7,59,115,.96),rgba(11,99,206,.88)),
    linear-gradient(45deg,rgba(243,182,63,.2),transparent);
  color:white;
  overflow:hidden;
}
.dashboard-hero h2{margin:10px 0 8px;font-size:32px;line-height:1.05;color:white}
.dashboard-hero p{margin:0;color:#e8f4ff;font-weight:800;max-width:760px}
.dashboard-hero .soft-pill{background:rgba(255,255,255,.16);color:white;border-color:rgba(255,255,255,.28)}
.hero-meter{
  display:grid;
  gap:8px;
  padding:16px;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.12);
  border-radius:8px;
}
.hero-meter small{color:#dceeff;font-weight:900}
.hero-meter strong{font-size:34px;color:white}
.hero-meter span{display:block;height:10px;border-radius:999px;background:linear-gradient(90deg,#f3b63f,#7ee787)}
.premium-chart{min-height:320px}
.user-sales-bars,.method-chart{display:grid;gap:12px}
.user-sales-row{
  display:grid;
  grid-template-columns:minmax(170px,1fr) minmax(150px,1.4fr) 120px;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,255,255,.72);
}
.user-sales-meta b{display:block;color:#073b73}
.user-sales-meta small{display:block;color:var(--mut);font-weight:800;margin-top:3px}
.bar-track{height:12px;border-radius:999px;background:#e8eef7;overflow:hidden;box-shadow:inset 0 1px 2px rgba(16,24,40,.08)}
.bar-track span{display:block;height:100%;min-width:3px;border-radius:999px;background:linear-gradient(90deg,#0b63ce,#13a3d8,#f3b63f)}
.user-sales-row>strong{color:#073b73;text-align:right}
.daily-chart{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
  min-height:225px;
  align-items:end;
}
.daily-bar{display:grid;gap:7px;text-align:center;min-width:0}
.daily-column{
  height:150px;
  display:flex;
  align-items:end;
  justify-content:center;
  padding:8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,#f8fbff,#eef6ff);
}
.daily-column span{
  position:relative;
  width:100%;
  min-height:4px;
  border-radius:999px;
  overflow:hidden;
  background:linear-gradient(180deg,#d4ddd9,#b9c8c0);
  box-shadow:none;
}
.daily-column.has-sales span{
  background:
    linear-gradient(180deg,#f7c948 0%,#22c55e 42%,#0ea5e9 100%);
  box-shadow:0 10px 18px rgba(14,165,233,.22),0 0 0 1px rgba(34,197,94,.14);
}
.daily-column.no-sales span{
  opacity:.55;
}
.daily-column span::after{
  content:"";
  position:absolute;
  left:50%;
  top:8%;
  bottom:8%;
  width:42%;
  transform:translateX(-50%);
  border-radius:999px;
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(255,255,255,.18));
  mix-blend-mode:screen;
}
.daily-bar b{font-size:12px;color:#073b73;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.daily-bar small{color:var(--mut);font-weight:900}
.method-chart>div{
  display:grid;
  grid-template-columns:160px minmax(140px,1fr) 70px;
  gap:12px;
  align-items:center;
  padding:12px;
  border-bottom:1px solid var(--line);
}
.method-chart span b,.method-chart span small{display:block}
.method-chart span small{color:var(--mut);font-weight:800;margin-top:3px}
.method-chart strong{color:#073b73;text-align:right}
.fe-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  background:linear-gradient(135deg,#fff,#eef8ff);
}
.fe-hero h2{font-size:30px;margin:10px 0 8px;color:#073b73}
.fe-hero p{margin:0;color:var(--mut);font-weight:800;max-width:760px;line-height:1.45}
.status-lock{
  display:inline-flex;
  padding:7px 11px;
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412;
  border:1px solid #fed7aa;
  font-weight:950;
  font-size:12px;
}
.fe-shield{
  min-width:112px;
  height:112px;
  display:grid;
  place-items:center;
  border-radius:30px;
  color:white;
  background:linear-gradient(135deg,#0b63ce,#13a3d8);
  font-size:30px;
  font-weight:950;
  box-shadow:0 18px 40px rgba(11,99,206,.22);
}
.fe-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.disabled-btn,
.disabled-btn:disabled{
  cursor:not-allowed;
  opacity:.68;
  background:linear-gradient(135deg,#98a2b3,#cbd5e1);
  box-shadow:none;
}
.muted{color:var(--mut);font-weight:800;line-height:1.45}
.accounting-period{
  display:flex;
  align-items:end;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 14px;
}
.accounting-period label,
.mini-form label{
  display:grid;
  gap:6px;
  color:#475467;
  font-size:12px;
  font-weight:950;
}
.accounting-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 16px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.72);
}
.accounting-tabs a{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:11px;
  color:#0b4a8b;
  font-weight:950;
  background:#eef7ff;
  border:1px solid #cde6f8;
}
.accounting-tabs a.active{
  color:white;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  border-color:transparent;
  box-shadow:0 10px 22px rgba(11,99,206,.18);
}
.accounting-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:16px;
  background:linear-gradient(135deg,#fff,#eef8ff);
}
.accounting-hero h2{font-size:30px;margin:10px 0 8px;color:#073b73}
.accounting-hero p{margin:0;color:var(--mut);font-weight:800;max-width:820px;line-height:1.45}
.accounting-score{
  min-width:230px;
  padding:18px;
  border-radius:18px;
  color:white;
  background:linear-gradient(135deg,#073b73,#0b63ce);
  box-shadow:0 18px 40px rgba(11,99,206,.22);
}
.accounting-score small{display:block;color:#d8eaff;font-weight:950}
.accounting-score strong{display:block;margin:8px 0;font-size:28px}
.accounting-score span{font-weight:950;color:#ffe08c}
.accounting-checks{display:grid;gap:10px}
.accounting-check{
  display:grid;
  gap:4px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
}
.accounting-check strong{color:#073b73}
.accounting-check span{color:var(--mut);font-weight:800;line-height:1.35}
.accounting-check.ok{border-color:#bbf7d0;background:#f0fdf4}
.accounting-check.warn{border-color:#fed7aa;background:#fff7ed}
.accounting-check.ok strong{color:#166534}
.accounting-check.warn strong{color:#9a3412}
.flash.success{background:#ecfdf3;border-color:#bbf7d0;color:#166534}
.section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.section-head h2,.section-head h3{margin:0}
.section-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.soft-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:999px;
  color:#0b4a8b;
  background:#eef7ff;
  border:1px solid #cde6f8;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}
.row-warn td{background:#fff7ed!important}
.row-warn td:first-child{border-left:4px solid #f59e0b}
.pos-command{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
  background:linear-gradient(135deg,#fff,#eef8ff);
}
.pos-speedbar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:6px 0 10px;
}
.pos-speedbar .btn{
  min-height:32px;
  padding:7px 10px;
  font-size:12px;
}
.pos-command h2{margin:10px 0 8px;color:#073b73;font-size:30px}
.pos-command p{margin:0;max-width:760px;color:var(--mut);font-weight:800;line-height:1.45}
.pos-metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(110px,1fr));
  gap:10px;
  min-width:min(520px,100%);
}
.pos-metrics div{
  padding:13px;
  border-radius:16px;
  background:white;
  border:1px solid #cde6f8;
  box-shadow:0 10px 22px rgba(11,99,206,.08);
}
.pos-metrics small{display:block;color:var(--mut);font-weight:950;font-size:12px}
.pos-metrics strong{display:block;margin-top:6px;color:#073b73;font-size:20px}
.checkout-card{position:sticky;top:18px;align-self:start}
.checkout-actions{display:grid;grid-template-columns:1fr 110px;gap:10px}
.search-result.is-empty{opacity:.62;background:#fff1f3;border-color:#fecdd3}
.dispatch-box{
  display:grid;
  gap:8px;
  margin:12px 0;
  padding:12px;
  border:1px solid #cde6f8;
  border-radius:16px;
  background:#f8fbff;
}
.dispatch-form{
  display:grid;
  grid-template-columns:1.2fr 1.4fr 1.2fr 1fr 110px 1fr auto auto;
  gap:8px;
  align-items:center;
  min-width:980px;
}
.dispatch-form input,
.dispatch-form select{min-height:38px;padding:8px 10px;border-radius:10px;font-size:13px}
.pos{display:grid;grid-template-columns:1.35fr .85fr;gap:18px}
.scan-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.scan-box input{
  min-height:52px;
  font-size:18px;
  font-weight:950;
  border-color:#90caf9;
  background:linear-gradient(180deg,#fff,#f4faff);
}
.hint{display:block;color:var(--mut);font-weight:800;margin-top:8px}
.products{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.prod{
  padding:14px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fff,#f7fbff);
  border-radius:14px;
  cursor:pointer;
  transition:.16s ease;
}
.prod:hover{border-color:#8bc7ff;transform:translateY(-1px);box-shadow:0 12px 26px rgba(11,99,206,.14)}
.prod h3{color:var(--blue)}
.search-results{
  display:grid;
  gap:8px;
  margin-bottom:14px;
}
.search-result{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid #cde6f8;
  background:linear-gradient(180deg,#fff,#f5fbff);
  color:#073b73;
  font-weight:850;
  cursor:pointer;
  text-align:left;
}
.search-result:hover{border-color:#9fcce4;box-shadow:0 8px 16px rgba(48,112,150,.08)}
.search-result small{color:var(--mut);font-weight:850;white-space:nowrap}
.search-result .search-stock{
  display:inline-grid;
  justify-items:end;
  gap:2px;
  min-width:78px;
  padding:5px 8px;
  border:1px solid #b9e0c8;
  border-radius:8px;
  background:#eefaf2;
  color:#17643a;
  font-style:normal;
  font-size:14px;
  font-weight:950;
  line-height:1;
}
.search-result .search-stock small{
  color:#47725a;
  font-size:9px;
  font-weight:900;
  letter-spacing:0;
}
.search-result .search-stock.is-empty{
  border-color:#f3c2c8;
  background:#fff2f3;
  color:#9a2633;
}
.search-result.active .search-stock{
  border-color:#dfbd6d;
  background:#fff7da;
  color:#76500b;
}
.sale-detail{
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.sale-detail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  background:linear-gradient(135deg,#073b73,#0b63ce);
  color:white;
}
.sale-detail-head h3{margin:0}
.sale-detail-head span{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  font-weight:950;
}
.sale-table th{background:#eef7ff;color:#073b73}
.sale-table td{vertical-align:middle}
.sale-table{
  width:100%;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0 6px;
}
.sale-table th{
  padding:9px 10px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0;
  white-space:nowrap;
}
.sale-table td{
  padding:8px 10px;
  background:#f8fbff;
  border-top:1px solid #dbeafe;
  border-bottom:1px solid #dbeafe;
  color:#073b73;
  font-weight:850;
}
.sale-table th:nth-child(1),.sale-table td:nth-child(1){width:72px}
.sale-table th:nth-child(2),.sale-table td:nth-child(2){width:110px}
.sale-table th:nth-child(4),.sale-table td:nth-child(4){width:130px}
.sale-table th:nth-child(5),.sale-table td:nth-child(5){width:88px}
.sale-table th:nth-child(6),.sale-table td:nth-child(6){width:130px}
.sale-table th:nth-child(7),.sale-table td:nth-child(7){width:86px}
.sale-table .qty-cell,
.sale-table .code-cell,
.sale-table .stock-cell,
.sale-table .money-cell,
.sale-table .total-cell,
.sale-table .action-cell{text-align:center}
.sale-table .product-cell{
  text-align:left;
  min-width:0;
  word-break:break-word;
}
.sale-table .product-cell b{
  display:block;
  line-height:1.2;
  color:#073b73;
}
.sale-table .product-cell small,
.sale-table .money-cell small,
.sale-table .total-cell small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
}
.sale-table .stock-cell.is-negative{
  background:rgba(239,68,68,.14);
  color:#991b1b;
  border-color:rgba(239,68,68,.25);
}
.sale-table tr.selected-sale-line td{
  background:#fff7e6;
  border-color:#facc15;
}
.empty-sale{text-align:center!important;color:var(--mut);font-weight:850;padding:18px!important}
.qty-input{
  width:76px;
  min-height:38px;
  text-align:center;
  font-weight:950;
}
.line-remove{
  border:0;
  border-radius:9px;
  background:#fee6ea;
  color:#b4233c;
  padding:8px 10px;
  font-weight:950;
  cursor:pointer;
}
.ticket-summary{
  display:grid;
  gap:8px;
  margin:12px 0;
}
.ticket-mini{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 11px;
  border-radius:11px;
  background:#f8fbff;
  border:1px solid var(--line);
}
.ticket-mini span{color:var(--mut);font-weight:900}
.ticket-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px dashed #c4d2e4;
  padding:11px 0;
}
.ticket-item button{border:0;border-radius:8px;background:#fee6ea;color:#b4233c;font-weight:900}
.payment-panel{
  display:grid;
  gap:12px;
  margin:14px 0;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(180deg,#f8fbff,#eef7ff);
  border:1px solid #cde6f8;
}
.total-due,.change-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.total-due small,.change-box small{color:var(--mut);font-weight:950;text-transform:uppercase;font-size:12px}
.total-due strong{
  color:#073b73;
  font-size:34px;
  line-height:1;
}
.change-box{
  padding:14px;
  border-radius:14px;
  background:#ecfdf3;
  border:1px solid #bbf7d0;
}
.change-box strong{
  color:#067647;
  font-size:36px;
  line-height:1;
}
.change-box strong.pending-change{color:#b42318}
.print-body{background:#e8eef6;color:#101828}
.print-toolbar{display:flex;gap:10px;flex-wrap:wrap;padding:18px;position:sticky;top:0;z-index:5;background:rgba(255,255,255,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.print{background:white;color:#101828;margin:24px auto;box-shadow:0 20px 70px rgba(16,24,40,.18)}
.thermal{padding:2mm;font-family:Arial,Helvetica,sans-serif;box-shadow:0 12px 40px rgba(16,24,40,.16);position:relative;overflow:hidden;box-sizing:border-box}
.thermal::before{
  content:"";
  position:absolute;
  left:50%;
  top:52%;
  width:150%;
  transform:translate(-50%,-50%) rotate(-28deg);
  color:#111;
  opacity:.045;
  font-family:Segoe UI,Arial,sans-serif;
  font-size:18px;
  font-weight:900;
  letter-spacing:1px;
  text-align:center;
  text-transform:uppercase;
  pointer-events:none;
  z-index:0;
}
.thermal>*{position:relative;z-index:1}
.quote-print{position:relative;overflow:hidden}
.quote-print::before{
  content:"";
  position:absolute;
  left:50%;
  top:52%;
  width:140%;
  transform:translate(-50%,-50%) rotate(-28deg);
  color:#111;
  opacity:.035;
  font-family:Segoe UI,Arial,sans-serif;
  font-size:34px;
  font-weight:900;
  letter-spacing:1px;
  text-align:center;
  text-transform:uppercase;
  pointer-events:none;
  z-index:0;
}
.quote-print>*{position:relative;z-index:1}
.f58{width:54mm;max-width:54mm;font-size:9.2px}
.f80{width:70mm;max-width:70mm;font-size:11.2px}
.thermal-head{text-align:center;display:grid;gap:2px;font-weight:700}
.thermal-head h2{margin:2px 0 4px;font-size:1.55em;line-height:1;text-transform:uppercase;color:#555;text-shadow:1px 1px #ddd}
.thermal-head small,.thermal-head b{display:block}
.thermal-line{border-top:1px solid #111;margin:7px 0}
.thermal-meta{display:grid;gap:3px}
.thermal-meta div{display:flex;justify-content:space-between;gap:8px}
.thermal-totals div{display:grid;grid-template-columns:1fr minmax(54px,auto);gap:10px;align-items:baseline}
.thermal-meta span,.thermal-totals span{font-weight:700}
.thermal .receipt-logo{width:150px!important;height:88px!important;object-fit:contain!important;margin:0 auto 4px!important;display:block!important;filter:none!important}
.f58 .receipt-logo{width:120px!important;height:72px!important}
.dyc-print-logo{object-fit:contain!important;border:0!important;border-radius:0!important;background:transparent!important;filter:none!important}
.dyc-thermal-logo{object-fit:contain!important;border:0!important;border-radius:0!important;background:#fff!important;filter:none!important}
.thermal-columns,.thermal-item{display:grid;grid-template-columns:42px 34px 50px 42px 58px;gap:3px;align-items:start;justify-content:end}
.thermal-columns{font-weight:900;border-bottom:1px solid #111;padding:0 0 3px;margin-bottom:2px;font-size:.82em}
.thermal-columns b{text-align:right;white-space:normal;line-height:1.05;min-width:0}
.thermal-columns b:first-child{grid-column:1/-1;text-align:left}
.thermal-item{padding:4px 0;border-bottom:1px dotted #999;font-weight:800}
.thermal-item .item-name{grid-column:1/-1;line-height:1.12;font-weight:700;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-align:left;overflow-wrap:anywhere}
.thermal-item b{text-align:right;font-size:.82em;white-space:nowrap;line-height:1.12;font-variant-numeric:tabular-nums}
.f80 .thermal-columns,.f80 .thermal-item{justify-content:center}
.f80 .thermal-columns,.f80 .thermal-item{grid-template-columns:42px 34px 48px 42px 56px;column-gap:4px}
.f80 .thermal-columns b:first-child,.f80 .thermal-item .item-name{text-align:center}
.f80 .thermal-columns,.f80 .thermal-items{width:66mm;max-width:100%;margin-left:auto;margin-right:auto;box-sizing:border-box}
.f80 .receipt-split{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3mm}
.f80 .receipt-split>div{min-width:0;overflow-wrap:anywhere}
.f80 .receipt-split>div:last-child{text-align:right}
.f80 .thermal-totals,.f80 .receipt-paid{width:66mm;max-width:100%;margin-left:auto;margin-right:auto;box-sizing:border-box}
.f80 .thermal-totals .grand{grid-template-columns:minmax(0,1fr) minmax(58px,auto)}
.ticket-counter .f80{font-size:11.2px}
.ticket-counter .f80 .thermal-columns{font-size:.86em}
.ticket-counter .f80 .thermal-item b{font-size:.86em;font-weight:700}
.ticket-counter .f80 .thermal-item .item-name{font-size:1em;line-height:1.16}
.f58 .thermal-columns{grid-template-columns:28px 20px 31px 25px 34px;gap:2px;font-size:.58em;justify-content:end}
.f58 .thermal-columns b:first-child{grid-column:1/-1;text-align:left}
.f58 .thermal-item{grid-template-columns:28px 20px 31px 25px 34px;gap:2px}
.f58 .thermal-item{padding:3px 0}
.f58 .thermal-item .item-name{grid-column:1/-1;font-size:.9em;-webkit-line-clamp:2}
.f58 .thermal-item b{font-size:.72em}
.thermal-totals{display:grid;gap:4px}
.thermal-totals .items-count{grid-template-columns:auto 1fr;justify-content:start;max-width:112px}
.thermal-totals .items-count b{text-align:left}
.thermal-totals .tax-row{margin-left:auto;min-width:150px}
.thermal-totals .tax-row span{text-align:left;white-space:nowrap}
.thermal-totals .tax-row b{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.thermal-totals .grand{font-size:1.35em;border-top:1px solid #111;padding-top:6px;margin-top:2px;font-weight:900}
.thermal-totals .grand b{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.thermal-thanks{text-align:center;font-weight:400;margin-top:8px;line-height:1.22}
.receipt-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px;margin-top:8px;font-size:.84em}
.receipt-split b{display:block;line-height:1.16;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.receipt-split div:last-child{text-align:right}
.f58 .receipt-split{gap:4px;font-size:.76em}
.f58 .receipt-split b{line-height:1.14}
.receipt-paid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;font-size:.9em;margin:4px 0;overflow-wrap:anywhere}
.receipt-paid b:last-child{text-align:right}
.receipt-qr{display:block;width:108px;height:108px;object-fit:contain;margin:2px 0 4px}
.invoice-a4{width:210mm;min-height:297mm;padding:8mm 9mm;font-size:13px;font-family:Arial,Helvetica,sans-serif}
.invoice-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;border-bottom:2px solid #111;padding-bottom:5px}
.invoice-brand{display:flex;gap:14px;align-items:flex-start}
.invoice-logo{width:120px;height:82px;object-fit:contain;border:0;border-radius:0;padding:0}
.dyc-logo{width:128px;height:92px;margin-left:48px}
.invoice-company h1{margin:2px 0 14px;color:#555;font-size:24px;line-height:1;text-transform:uppercase;text-shadow:1px 1px #ddd}
.invoice-company p{margin:4px 0;font-size:13px}
.invoice-number{text-align:right;min-width:270px;padding:0;background:#fff;border:0;border-radius:0}
.pay-band{background:#075f9e;color:#fff;text-align:center;padding:5px 20px;font-weight:900;margin-bottom:8px;text-transform:uppercase}
.invoice-number h2{font-size:16px;margin:0 0 6px;text-transform:uppercase}
.invoice-number h3{font-size:15px;margin:7px 0;font-weight:900}
.invoice-number p{font-size:13px;margin:6px 0}
.invoice-info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}
.invoice-info-grid div{padding:12px;border:1px solid #dbe4f0;border-radius:12px;background:#f8fbff}
.invoice-info-grid b{display:block;color:#073b73;margin-bottom:5px}
.invoice-info-grid span{color:#344054;font-weight:800}
.invoice-client-lines{padding:8px 3px 5px;border-bottom:0}
.invoice-client-lines p{margin:4px 0}
.invoice-table{width:100%;border-collapse:collapse;margin-top:4px}
.invoice-table th{background:#075f9e;color:white;text-align:left;padding:6px 8px;border:1px solid #111;font-size:13px}
.invoice-table td{padding:8px 8px;border-bottom:0}
.invoice-table th:last-child,.invoice-table td:last-child{text-align:right}
.invoice-table th:nth-child(3),.invoice-table th:nth-child(4),.invoice-table td:nth-child(3),.invoice-table td:nth-child(4){text-align:right}
.items-count{border-top:1px solid #111;padding:4px 4px}
.invoice-bottom{display:grid;grid-template-columns:1fr 310px;gap:18px;margin-top:0}
.invoice-dispatch{border:1px solid #dbe4f0;border-radius:14px;padding:14px;background:#f8fbff}
.invoice-dispatch h3{margin:0 0 8px;color:#073b73}
.invoice-dispatch p{margin:5px 0;color:#344054}
.invoice-note{padding-top:110px;font-size:13px}
.invoice-totals{display:grid;gap:0;align-content:start}
.invoice-totals div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border:0;border-radius:0;background:#fff;font-size:15px}
.invoice-totals span{font-weight:900}
.invoice-totals .grand{border-top:2px solid #555;background:#fff;color:#111;font-size:16px;margin-top:8px;padding-top:9px}
.invoice-footer{margin-top:24px;text-align:center;color:#111;font-weight:800}
.invoice-footer>div{display:inline-block;width:30%;margin:18px 6%;padding-top:4px;border-top:1px solid #111;color:#111}
.selectable-table tbody tr.selected-row td{
  background:#eaf8f5;
  box-shadow:inset 3px 0 0 var(--blue);
}
.abonos-client-list{
  display:grid;
  gap:6px;
  max-height:62vh;
  overflow:auto;
  padding-right:2px;
}
.abono-client-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  text-decoration:none;
}
.abono-client-row small{display:block;color:var(--mut);margin-top:2px;font-size:12px}
.abono-client-row strong{color:var(--blue);white-space:nowrap}
.abono-client-row.active,
.abono-client-row.selected-row{background:#eaf8f5;border-color:#9bd8ce}
.abono-form{
  grid-template-columns:160px 160px 1fr 1fr auto;
  align-items:end;
}
@page{size:auto;margin:0}
@media print{
  body{background:white!important}
  .side,.top,.no-print,.print-toolbar{display:none!important}
  body.print-report .app{display:block!important}
  body.print-report .main{padding:0!important;width:100%!important;max-width:none!important}
  body.print-report .report-preview{display:block!important;width:100%!important;max-width:none!important}
  body.print-report .report-head,
  body.print-report .report-table-card{box-shadow:none!important;border:0!important;padding:0!important;background:white!important}
  body.print-report .report-head{margin:0 0 8mm!important;page-break-after:avoid}
  body.print-report .report-table th{position:static!important}
  body.print-report .table-wrap{overflow:visible!important;width:100%!important}
  body.print-report .report-table{
    width:100%!important;
    border-collapse:collapse!important;
    table-layout:auto!important;
    font-size:10px!important;
  }
  body.print-report .report-table thead{display:table-header-group}
  body.print-report .report-table tfoot{display:table-footer-group}
  body.print-report .report-table tr{break-inside:avoid;page-break-inside:avoid}
  body.print-report .report-table th,
  body.print-report .report-table td{
    padding:4px 5px!important;
    border:1px solid #d0d7e2!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    color:#111!important;
  }
  body.print-report .report-table th{
    background:#eef2f7!important;
    color:#111!important;
    font-weight:900!important;
  }
  body.print-report .cxc-report-kpis,
  body.print-report .cxc-report-grid{
    display:block!important;
  }
  body.print-report .cxc-report-kpis .card,
  body.print-report .cxc-report-grid .card{
    box-shadow:none!important;
    border:0!important;
    padding:0 0 6mm!important;
    background:white!important;
    break-inside:avoid;
    page-break-inside:avoid;
  }
  body.print-report .cxc-report-table{
    width:100%!important;
    table-layout:auto!important;
    border-collapse:collapse!important;
    font-size:10px!important;
  }
  body.print-report .cxc-report-table thead{display:table-header-group}
  body.print-report .cxc-report-table tr{break-inside:avoid;page-break-inside:avoid}
  body.print-report .cxc-report-table th,
  body.print-report .cxc-report-table td{
    padding:4px 5px!important;
    border:1px solid #d0d7e2!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    color:#111!important;
  }
  body.print-report .cxc-report-table th{
    background:#eef2f7!important;
    font-weight:900!important;
  }
  body.print-report .cxc-report-table .amount-cell{white-space:nowrap!important}
  body.print-report .cxc-report-table .btn{display:none!important}
  .print{display:block!important;box-shadow:none!important;margin:0 auto!important}
  .thermal{padding:2mm}
  .thermal .receipt-logo{filter:none!important}
  .invoice-a4{width:auto;min-height:auto;padding:12mm}
}
@media(max-width:1100px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .module-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mini-form,.inline-form{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){
  .app{display:block}
  .side{width:auto;height:auto;position:relative}
  body.sidebar-collapsed .side,
  body.sidebar-collapsed .app.sidebar-peek .side{width:auto;padding:18px}
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav a span,
  body.sidebar-collapsed .nav-group summary b,
  body.sidebar-collapsed .nav-pill,
  body.sidebar-collapsed .side-logout span{
    opacity:1;width:auto;max-width:none;overflow:visible;pointer-events:auto;
  }
  body.sidebar-collapsed .nav a,
  body.sidebar-collapsed .nav-group summary,
  body.sidebar-collapsed .side-logout{justify-content:flex-start}
  body.sidebar-collapsed .nav-group summary::after{display:grid}
  .grid{grid-template-columns:1fr}
  .wide{grid-column:auto}
  .report-head{align-items:stretch;flex-direction:column}
  .report-period{grid-template-columns:1fr auto}
  .pos-command,.accounting-hero{display:grid}
  .pos-metrics{grid-template-columns:1fr}
  .checkout-card{position:static}
  .checkout-actions{grid-template-columns:1fr}
  .section-head{display:grid}
  .pos{grid-template-columns:1fr}
  .products{grid-template-columns:1fr 1fr}
  .mini-form,.inline-form,.module-actions,.scan-box{grid-template-columns:1fr}
  .product-master-grid,
  .product-price-grid,
  .product-two,
  .product-existence-grid{grid-template-columns:1fr}
  .product-master-toolbar{align-items:stretch;flex-wrap:wrap}
  .product-master-toolbar span{width:100%}
  .dispatch-form{grid-template-columns:1fr;min-width:0}
  .client-credit-grid{grid-template-columns:1fr}
  .client-history{grid-column:auto}
  .user-hero{grid-template-columns:1fr}
  .user-hero-metrics,.role-template-grid{grid-template-columns:1fr 1fr}
  .user-form-grid{grid-template-columns:1fr}
  .user-form-grid .password-field{grid-column:auto}
  .dashboard-hero{grid-template-columns:1fr}
  .user-sales-row{grid-template-columns:1fr}
  .user-sales-row>strong{text-align:left}
  .daily-chart{grid-template-columns:repeat(2,minmax(0,1fr))}
  .method-chart>div{grid-template-columns:1fr}
  .method-chart strong{text-align:left}
  .login-god{display:block;overflow:auto;background:linear-gradient(180deg,#06152f 0%,#0b3c78 42%,#f5f8fc 42.2%)}
  .login-god::before{display:none}
  .login-stage{width:100%;min-height:100vh;display:grid;grid-template-columns:1fr;gap:0}
  .login-brand-side{padding:30px 22px 20px}
  .login-brand-side h1{font-size:38px}
  .login-brand-side p{font-size:15px}
  .login-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .login-feature-grid div{min-height:70px}
  .login-glass{margin:0 14px 24px;min-height:auto;padding:24px;border-radius:24px}
  .login-panel-head h2{font-size:28px}
  .login-meta-row{display:grid}
}

/* Compact dashboard layout */
.dashboard-compact .actionbar{
  gap:8px;
  margin-bottom:12px;
}
.dashboard-compact .actionbar .btn{
  min-height:36px;
  padding:8px 12px;
  border-radius:10px;
  font-size:13px;
}
.dashboard-compact .grid{
  gap:10px;
}
.dashboard-compact .dashboard-main-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  align-items:start;
}
.dashboard-compact .dashboard-stack{
  display:grid;
  gap:10px;
  align-content:start;
}
.dashboard-compact .card{
  padding:12px;
  border-radius:12px;
  align-self:start;
}
.dashboard-compact .kpi{
  min-height:86px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.dashboard-compact .kpi small{
  font-size:11px;
  letter-spacing:0;
}
.dashboard-compact .kpi h2{
  margin-top:6px;
  font-size:22px;
  line-height:1.05;
}
.dashboard-compact .dashboard-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) 210px;
  align-items:center;
  gap:14px;
  min-height:118px;
}
.dashboard-compact .dashboard-hero h2{
  margin:8px 0 5px;
  font-size:26px;
}
.dashboard-compact .dashboard-hero p{
  font-size:13px;
  line-height:1.38;
}
.dashboard-compact .hero-meter{
  padding:12px;
}
.dashboard-compact .hero-meter strong{
  font-size:26px;
}
.dashboard-compact .section-head{
  margin-bottom:10px;
  gap:10px;
}
.dashboard-compact .section-head h3{
  font-size:16px;
}
.dashboard-compact .section-head small,
.dashboard-compact .muted{
  font-size:12px;
}
.dashboard-compact .premium-chart{
  min-height:0;
  max-height:360px;
}
.dashboard-compact .daily-sales-card{
  align-self:start;
  min-height:0;
  max-height:none;
}
.dashboard-compact .user-sales-bars,
.dashboard-compact .method-chart{
  gap:8px;
}
.dashboard-compact .user-sales-row{
  grid-template-columns:minmax(0,1fr) minmax(120px,.55fr) 108px;
  gap:10px;
  padding:8px 0;
}
.dashboard-compact .user-sales-meta small,
.dashboard-compact .method-chart small{
  font-size:11px;
}
.dashboard-compact .daily-chart{
  min-height:118px;
  gap:6px;
  align-items:end;
}
.dashboard-compact .daily-column{
  height:68px;
  width:24px;
  justify-self:center;
  padding:4px;
}
.dashboard-compact .daily-column span{
  width:8px;
  min-height:5px;
}
.dashboard-compact .daily-bar b,
.dashboard-compact .method-chart strong{
  font-size:13px;
}
.dashboard-compact .daily-bar{
  gap:4px;
  justify-items:center;
}
.dashboard-compact .daily-bar b{
  font-size:11px;
}
.dashboard-compact .daily-bar small{
  font-size:10px;
}
.dashboard-compact .table th,
.dashboard-compact .table td{
  padding:8px 9px;
  font-size:13px;
}
.dashboard-compact .table th{
  font-size:11px;
}
.dashboard-compact .btn.mini{
  min-height:28px;
  padding:5px 8px;
  font-size:11px;
}
.dashboard-compact .soft-pill{
  padding:5px 9px!important;
  font-size:11px!important;
}
@media(max-width:1200px){
  .dashboard-compact .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .dashboard-compact .dashboard-main-grid{
    grid-template-columns:1fr;
  }
  .dashboard-compact .dashboard-hero{
    grid-template-columns:1fr;
  }
  .dashboard-compact .premium-chart{
    max-height:none;
  }
}

/* Compact inventory actions */
.inventory-console{
  padding:18px;
}
.inventory-tools{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.inventory-tool{
  border:1px solid #dbe6f4;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  overflow:hidden;
}
.inventory-tool summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  cursor:pointer;
  color:#10243f;
}
.inventory-tool summary::-webkit-details-marker{display:none}
.inventory-tool summary span{
  font-weight:950;
}
.inventory-tool summary b{
  color:var(--mut);
  font-size:12px;
  font-weight:900;
  text-align:right;
}
.inventory-tool[open] summary{
  border-bottom:1px solid #e4edf8;
  background:linear-gradient(135deg,#f8fbff,#eef7ff);
}
.inventory-tool form,
.inventory-tool .tag-row{
  padding:12px 14px;
}
.warehouse-selector-form{
  border-bottom:1px solid #e4edf8;
}
.warehouse-selector-form label{
  min-width:min(360px,100%);
}
.warehouse-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(130px,1fr));
  gap:10px;
  padding:12px 14px 0;
}
.warehouse-summary span{
  display:grid;
  gap:3px;
  padding:10px 12px;
  border:1px solid #cde6f8;
  border-radius:10px;
  background:linear-gradient(180deg,#ffffff,#f4faff);
}
.warehouse-summary small,
.warehouse-stock-head small{
  color:var(--mut);
  font-size:11px;
  font-weight:850;
}
.warehouse-summary b,
.warehouse-stock-head strong{
  color:#073b73;
}
.warehouse-stock-box{
  padding:12px 14px;
  overflow-x:hidden;
  max-width:100%;
}
.warehouse-stock-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.warehouse-stock-table{
  table-layout:auto;
  width:100%;
  min-width:0;
}
.warehouse-stock-table th,
.warehouse-stock-table td{
  padding:6px 7px;
  font-size:11.5px;
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
  vertical-align:middle;
}
.warehouse-stock-table th:nth-child(1),
.warehouse-stock-table td:nth-child(1){width:7%}
.warehouse-stock-table th:nth-child(2),
.warehouse-stock-table td:nth-child(2){width:29%;white-space:normal}
.warehouse-stock-table th:nth-child(3),
.warehouse-stock-table td:nth-child(3){width:12%}
.warehouse-stock-table th:nth-child(4),
.warehouse-stock-table td:nth-child(4){width:8%;text-align:center}
.warehouse-stock-table th:nth-child(5),
.warehouse-stock-table td:nth-child(5),
.warehouse-stock-table th:nth-child(6),
.warehouse-stock-table td:nth-child(6),
.warehouse-stock-table th:nth-child(7),
.warehouse-stock-table td:nth-child(7),
.warehouse-stock-table th:nth-child(8),
.warehouse-stock-table td:nth-child(8){width:11%;text-align:right}
.warehouse-stock-table .inventory-total-row td{white-space:normal}
.warehouse-stock-table .inventory-total-row td:nth-child(n+2){white-space:nowrap}
.warehouse-stock-table tr.stock-negativo td{
  background:rgba(239,68,68,.14)!important;
}
.warehouse-stock-table tr.stock-bajo td{
  background:rgba(245,158,11,.13)!important;
}
.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.inventory-card{overflow:visible}
.inventory-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
}
.legend-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.legend-chip.danger{background:rgba(239,68,68,.16);color:#991b1b;border:1px solid rgba(239,68,68,.24)}
.legend-chip.warning{background:rgba(245,158,11,.16);color:#92400e;border:1px solid rgba(245,158,11,.25)}
.inventory-total-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(140px,1fr));
  gap:10px;
  margin:0 0 12px;
}
.inventory-total-strip span{
  display:grid;
  gap:3px;
  padding:10px 12px;
  border:1px solid #cde6f8;
  border-radius:10px;
  background:linear-gradient(180deg,#fff,#f4faff);
}
.inventory-total-strip small,
.inventory-total-row small{
  display:block;
  color:var(--mut);
  font-size:11px;
  font-weight:850;
  line-height:1.2;
}
.inventory-total-strip b,
.inventory-total-row b{
  color:#073b73;
}
.inventory-table th,
.inventory-table td{
  padding:9px 10px;
  font-size:15.5px;
  font-weight:780;
  vertical-align:top;
}
.inventory-table th{
  font-weight:900;
}
.inventory-table td strong{
  font-weight:950;
}
.inventory-table .inventory-total-row td{
  background:#eaf6ff!important;
  border-top:2px solid #8bc7ff;
  border-bottom:0;
}
.inventory-table tr.stock-negativo td{
  background:rgba(239,68,68,.14)!important;
  border-top:1px solid rgba(239,68,68,.22);
  border-bottom:1px solid rgba(239,68,68,.16);
}
.inventory-table tr.stock-negativo:hover td{background:rgba(239,68,68,.2)!important}
.inventory-table tr.stock-bajo td{background:rgba(245,158,11,.13)!important}
.inventory-table tr.stock-bajo:hover td{background:rgba(245,158,11,.18)!important}
.stock-pill,
.almacen-chip{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:5px 10px;
  border-radius:999px;
  font-size:13.5px;
  font-weight:950;
  line-height:1;
  white-space:nowrap;
}
.stock-pill{background:#eaf5ff;color:#075f9e;border:1px solid #bfdbfe}
.stock-pill.stock-negativo{background:rgba(239,68,68,.18);color:#991b1b;border-color:rgba(239,68,68,.32)}
.stock-pill.stock-bajo{background:rgba(245,158,11,.18);color:#92400e;border-color:rgba(245,158,11,.32)}
.almacen-chip-list{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  max-width:220px;
}
.almacen-chip{background:#eef6ff;color:#075f9e;border:1px solid #bfdbfe}
.almacen-chip-main{background:#e0f2fe}
.almacen-chip-two{background:#dbeafe;color:#073b73;border-color:#93c5fd}
.almacen-chip-empty{background:#f1f5f9;color:#64748b;border-color:#e2e8f0}
.inventory-table .btn.mini{
  min-height:30px;
  padding:7px 10px;
  border-radius:8px;
  font-size:13.5px;
  font-weight:900;
  line-height:1;
}
.inventory-actions{
  min-width:280px;
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  align-items:flex-start;
}
.inventory-actions details{position:relative}
.inventory-edit-target{scroll-margin-top:96px}
.inventory-actions summary{
  cursor:pointer;
  list-style:none;
}
.inventory-actions summary::-webkit-details-marker{display:none}
.inventory-edit-panel,
.inventory-stock-form{
  position:absolute;
  right:0;
  top:32px;
  z-index:30;
  width:min(860px, calc(100vw - 64px));
  padding:14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  box-shadow:0 16px 34px rgba(19,37,64,.16);
}
.inventory-edit-target[open] .inventory-edit-panel{
  position:fixed;
  top:96px;
  left:300px;
  right:26px;
  width:auto;
  max-height:calc(100vh - 126px);
  overflow:auto;
  z-index:1200;
}
.inventory-edit-form{
  display:block;
}
.inventory-stock-form{
  width:min(480px, calc(100vw - 64px));
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:8px;
  align-items:end;
}
.inventory-edit-form fieldset{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  gap:8px;
  margin:0 0 10px;
  padding:10px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}
.inventory-edit-form legend{
  padding:0 6px;
  color:#075f9e;
  font-size:12px;
  font-weight:900;
}
.inventory-edit-form label,
.inventory-stock-form label{
  display:flex;
  flex-direction:column;
  gap:4px;
  color:#475569;
  font-size:13.5px;
  font-weight:950;
  text-transform:uppercase;
}
.inventory-edit-form label.wide,
.inventory-stock-form label.wide{grid-column:span 2}
.product-edit-title,
.stock-form-title{
  grid-column:1/-1;
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:10px;
  padding:8px 10px;
  border-radius:10px;
  background:#eaf5ff;
  color:#073b73;
}
.product-edit-title span,
.stock-form-title span{
  color:#64748b;
  font-size:15px;
  font-weight:850;
}
.inventory-edit-form input,
.inventory-stock-form input{
  min-height:39px;
  padding:8px 10px;
  font-size:15px;
  font-weight:800;
}
.inventory-delete-form{margin:0}
.check.compact{
  font-size:11px;
  gap:5px;
  align-self:center;
}
.quote-form .scan-box{
  grid-template-columns:minmax(220px,1.3fr) minmax(170px,.8fr) auto;
  align-items:center;
}
.quote-form .scan-box input,
.quote-form .scan-box select{
  min-height:40px;
}
@media(max-width:900px){
  .inventory-actions{min-width:190px}
  .inventory-edit-panel,
  .inventory-stock-form{
    position:static;
    width:100%;
    margin-top:6px;
  }
  .inventory-edit-target[open] .inventory-edit-panel{
    position:static;
    width:100%;
    max-height:none;
    overflow:visible;
  }
  .inventory-edit-form,
  .inventory-stock-form{
    grid-template-columns:1fr 1fr;
  }
  .inventory-edit-form fieldset{grid-template-columns:1fr 1fr}
  .inventory-edit-form label.wide,
  .inventory-stock-form label.wide{grid-column:1/-1}
  .quote-form .scan-box{
    grid-template-columns:1fr;
  }
}

/* Keyboard-first operations */
kbd{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  min-height:20px;
  padding:2px 7px;
  border:1px solid #9fcdf4;
  border-bottom-color:#6eaee9;
  border-radius:6px;
  background:linear-gradient(180deg,#ffffff,#d8ecff);
  color:#073b73;
  font-size:11px;
  font-weight:950;
  line-height:1;
  box-shadow:0 1px 0 rgba(16,36,63,.12),0 3px 8px rgba(12,102,190,.10);
}
.key-f1{background:linear-gradient(180deg,#ffffff,#d8ecff)!important;color:#073b73!important;border-color:#77bff0!important}
.key-f2{background:linear-gradient(180deg,#ffffff,#d8fbe8)!important;color:#064e3b!important;border-color:#61d6a4!important}
.key-f3{background:linear-gradient(180deg,#ffffff,#fff2bf)!important;color:#7a4306!important;border-color:#f2b64d!important}
.key-f4{background:linear-gradient(180deg,#ffffff,#e0e7ff)!important;color:#25367a!important;border-color:#8da2f5!important}
.key-f5{background:linear-gradient(180deg,#ffffff,#ffe1ec)!important;color:#8a1238!important;border-color:#f58aab!important}
.key-f6{background:linear-gradient(180deg,#ffffff,#ede9fe)!important;color:#4c1d95!important;border-color:#a78bfa!important}
.key-f7{background:linear-gradient(180deg,#ffffff,#d9f3ff)!important;color:#075985!important;border-color:#38bdf8!important}
.key-f8{background:linear-gradient(180deg,#ffffff,#ddf7e6)!important;color:#14532d!important;border-color:#79d99b!important}
.key-f9{background:linear-gradient(180deg,#ffffff,#ffedd5)!important;color:#9a3412!important;border-color:#fb923c!important}
.key-f10{background:linear-gradient(180deg,#ffffff,#f7edff)!important;color:#6b21a8!important;border-color:#c084fc!important}
.key-f11{background:linear-gradient(180deg,#ffffff,#e0f2fe)!important;color:#075985!important;border-color:#7dd3fc!important}
.key-f12{background:linear-gradient(180deg,#ffffff,#dcfce7)!important;color:#166534!important;border-color:#86efac!important}
.key-enter{background:linear-gradient(180deg,#ffffff,#fef3c7)!important;color:#92400e!important;border-color:#fbbf24!important}
.key-ctrl{background:linear-gradient(180deg,#ffffff,#e2e8f0)!important;color:#334155!important;border-color:#cbd5e1!important}
.key-arrow{background:linear-gradient(180deg,#ffffff,#ccfbf1)!important;color:#0f766e!important;border-color:#5eead4!important}
.btn kbd,
summary kbd{
  margin-right:5px;
}
.inline-form{
  display:inline-flex;
  margin:0;
}
.cash-board .kpi h2{
  font-size:clamp(20px,2vw,30px);
}
.cash-focus{
  border-color:#cfe3ef;
}
.cash-table th,
.cash-table td{
  padding:8px 9px;
  font-size:14px;
  vertical-align:middle;
}
.cashier-pending-table th{
  font-size:12px;
  font-weight:950;
}
.cashier-pending-table td{
  font-size:15px;
  font-weight:800;
}
.cash-table small{
  display:block;
  color:var(--mut);
  margin-top:2px;
}
.cashier-pending-table{
  table-layout:fixed;
  width:100%;
}
.cashier-pending-table th:nth-child(1),.cashier-pending-table td:nth-child(1){width:10%}
.cashier-pending-table th:nth-child(2),.cashier-pending-table td:nth-child(2){width:14%}
.cashier-pending-table th:nth-child(3),.cashier-pending-table td:nth-child(3){width:20%}
.cashier-pending-table th:nth-child(4),.cashier-pending-table td:nth-child(4){width:13%}
.cashier-pending-table th:nth-child(5),.cashier-pending-table td:nth-child(5){width:12%;text-align:right}
.cashier-pending-table th:nth-child(6),.cashier-pending-table td:nth-child(6){width:31%}
.cashier-pending-table td{
  overflow-wrap:anywhere;
}
.click-row{
  cursor:pointer;
}
.click-row:hover,
.click-row:focus{
  background:#f5fbff;
  outline:2px solid #9bd8ff;
  outline-offset:-2px;
}
.turn-badge,
.status-pill{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  background:#eef7ff;
  color:#13506d;
  font-size:11px;
  font-weight:950;
}
.status-pill.ok{
  background:#eafaf1;
  color:#137548;
}
.status-pill.status-paid,
.cxp-status-pill.status-paid{
  background:#dcfce7!important;
  color:#166534!important;
  border:1px solid #86efac!important;
}
.status-pill.status-cxc,
.cxp-status-pill.status-cxc{
  background:#dbeafe!important;
  color:#1d4ed8!important;
  border:1px solid #93c5fd!important;
}
.status-pill.status-approved,
.cxp-status-pill.status-approved{
  background:#ccfbf1!important;
  color:#0f766e!important;
  border:1px solid #5eead4!important;
}
.status-pill.status-pending,
.cxp-status-pill.status-pending{
  background:#fef3c7!important;
  color:#92400e!important;
  border:1px solid #fbbf24!important;
}
.status-pill.status-partial,
.cxp-status-pill.status-partial{
  background:#ffedd5!important;
  color:#9a3412!important;
  border:1px solid #fdba74!important;
}
.status-pill.status-canceled,
.status-pill.status-rejected,
.cxp-status-pill.status-canceled,
.cxp-status-pill.status-rejected{
  background:#fee2e2!important;
  color:#991b1b!important;
  border:1px solid #fca5a5!important;
}
.status-pill.status-expired,
.cxp-status-pill.status-expired{
  background:#f3e8ff!important;
  color:#6b21a8!important;
  border:1px solid #d8b4fe!important;
}
.status-pill.status-open,
.cxp-status-pill.status-open{
  background:#e0f2fe!important;
  color:#075985!important;
  border:1px solid #7dd3fc!important;
}
.status-pill.status-closed,
.cxp-status-pill.status-closed{
  background:#e2e8f0!important;
  color:#334155!important;
  border:1px solid #cbd5e1!important;
}
.status-pill.status-transit,
.cxp-status-pill.status-transit{
  background:#ede9fe!important;
  color:#5b21b6!important;
  border:1px solid #c4b5fd!important;
}
.status-pill.status-delivered,
.status-pill.status-processed,
.cxp-status-pill.status-delivered,
.cxp-status-pill.status-processed{
  background:#dcfce7!important;
  color:#14532d!important;
  border:1px solid #86efac!important;
}
.btn.tone-1{background:linear-gradient(135deg,#d8ecff,#acd7ff)!important;color:#073b73!important;border:1px solid #77bff0!important}
.btn.tone-2{background:linear-gradient(135deg,#d8fbe8,#9ee8c4)!important;color:#064e3b!important;border:1px solid #61d6a4!important}
.btn.tone-3{background:linear-gradient(135deg,#fff2bf,#ffd678)!important;color:#7a4306!important;border:1px solid #f2b64d!important}
.btn.tone-4{background:linear-gradient(135deg,#e0e7ff,#bdc9ff)!important;color:#25367a!important;border:1px solid #8da2f5!important}
.btn.tone-5{background:linear-gradient(135deg,#ffe1ec,#ffb8cf)!important;color:#8a1238!important;border:1px solid #f58aab!important}
.btn.tone-6{background:linear-gradient(135deg,#ede9fe,#cfc2ff)!important;color:#4c1d95!important;border:1px solid #a78bfa!important}
.btn.tone-7{background:linear-gradient(135deg,#d9f3ff,#9bdcff)!important;color:#075985!important;border:1px solid #38bdf8!important}
.btn[class*="tone-"]{
  box-shadow:0 8px 18px rgba(12,102,190,.12)!important;
}
.btn[class*="tone-"] kbd{
  color:#0f172a!important;
  background:rgba(255,255,255,.84)!important;
  border-color:rgba(15,23,42,.14)!important;
}

/* Estados compactos: una sola pastilla clara, sin doble aro ni exceso de alto. */
body:not(.print-body) .status-pill,
body:not(.print-body) .cxp-status-pill{
  min-height:19px!important;
  padding:2px 8px!important;
  border-radius:999px!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:950!important;
  box-shadow:none!important;
  outline:0!important;
  white-space:nowrap!important;
}
body:not(.print-body) td .status-pill,
body:not(.print-body) td .cxp-status-pill{
  margin:0!important;
  vertical-align:middle!important;
}
body:not(.print-body) td:has(> .status-pill),
body:not(.print-body) td:has(> .cxp-status-pill){
  padding-top:4px!important;
  padding-bottom:4px!important;
}
.status-pill.status-paid,
.cxp-status-pill.status-paid{
  background:#e8fff0!important;
  color:#166534!important;
  border:1px solid #65d98b!important;
}
.status-pill.status-cxc,
.cxp-status-pill.status-cxc{
  background:#eaf4ff!important;
  color:#075985!important;
  border:1px solid #7cc4f8!important;
}
.status-pill.status-approved,
.cxp-status-pill.status-approved{
  background:#e6fffa!important;
  color:#0f766e!important;
  border:1px solid #5eead4!important;
}
.status-pill.status-pending,
.cxp-status-pill.status-pending{
  background:#fff8df!important;
  color:#92400e!important;
  border:1px solid #eab308!important;
}
.status-pill.status-partial,
.cxp-status-pill.status-partial{
  background:#fff0df!important;
  color:#9a3412!important;
  border:1px solid #fb923c!important;
}
.status-pill.status-canceled,
.status-pill.status-rejected,
.cxp-status-pill.status-canceled,
.cxp-status-pill.status-rejected{
  background:#fff0f0!important;
  color:#991b1b!important;
  border:1px solid #f87171!important;
}
.status-pill.status-expired,
.cxp-status-pill.status-expired{
  background:#f7edff!important;
  color:#6b21a8!important;
  border:1px solid #c084fc!important;
}
.cash-open-form{
  grid-template-columns:repeat(5,minmax(120px,1fr)) auto;
}
.cash-detail-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}
.cash-detail-head h2{
  margin:4px 0;
}
.cash-breakdown{
  display:grid;
  grid-template-columns:repeat(4,minmax(110px,1fr));
  gap:8px;
  min-width:min(620px,100%);
}
.cash-breakdown span{
  border:1px solid #e0eaf5;
  border-radius:10px;
  padding:10px 12px;
  background:#fbfdff;
}
.cash-breakdown small{
  display:block;
  color:var(--mut);
  font-size:11px;
  font-weight:850;
}
.cash-breakdown b{
  color:#0f2948;
  font-size:16px;
}
.batch-filter{
  display:inline-grid;
  grid-template-columns:170px 135px 135px 90px auto;
  gap:8px;
  align-items:center;
  margin-left:8px;
}
.batch-filter input,
.batch-filter select{
  min-height:34px;
  padding:7px 9px;
  font-size:12px;
}
.company-switch select{
  min-height:38px;
  max-width:220px;
  border:1px solid #cfe0ee;
  border-radius:10px;
  background:#fff;
  color:#10243f;
  font-size:12px;
  font-weight:900;
  padding:7px 10px;
}
.inline-ecf-form{
  display:grid;
  grid-template-columns:110px minmax(150px,1fr) auto;
  gap:6px;
  align-items:center;
}
.inline-ecf-form select,
.inline-ecf-form input{
  min-height:30px;
  padding:5px 7px;
  font-size:12px;
}
.ecf-batchbar{
  display:grid;
  grid-template-columns:auto auto 170px minmax(220px,1fr) auto;
  gap:8px;
  align-items:center;
  padding:10px;
  margin:10px 0;
  border:1px solid #dce8f5;
  border-radius:10px;
  background:#f8fbff;
}
.ecf-batchbar select,
.ecf-batchbar input{
  min-height:34px;
  padding:7px 9px;
  font-size:12px;
}
@media(max-width:1000px){
  .cash-open-form{
    grid-template-columns:1fr 1fr;
  }
  .cash-detail-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .cash-breakdown{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:900px){
  .ecf-batchbar{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:900px){
  .batch-filter{
    display:grid;
    grid-template-columns:1fr 1fr;
    margin:10px 0 0;
    width:100%;
  }
}
@media(max-width:640px){
  .cash-open-form,
  .cash-breakdown{
    grid-template-columns:1fr;
  }
}

/* Sidebar toggle contrast in collapsed + hover peek mode */
.side-toggle,
.side-toggle:hover,
body.sidebar-collapsed .side-toggle,
body.sidebar-collapsed .side-toggle:hover,
body.sidebar-collapsed .app.sidebar-peek .side-toggle,
body.sidebar-collapsed .app.sidebar-peek .side-toggle:hover{
  color:#063b74!important;
  background:#ffffff!important;
  border-color:#baddfb!important;
  box-shadow:0 10px 22px rgba(21,33,29,.14)!important;
}
.side-toggle svg,
body.sidebar-collapsed .app.sidebar-peek .side-toggle svg{
  stroke:#063b74!important;
}
body.sidebar-collapsed .side-toggle,
body.sidebar-collapsed .app.sidebar-peek .side-toggle{
  top:112px!important;
}


/* POS cloud-ready: visual/UX sync from referencia */
.pos-workbar{
  display:grid;
  grid-template-columns:minmax(120px,156px) minmax(520px,1fr);
  gap:8px;
  align-items:center;
  padding:8px 10px;
  margin-bottom:8px;
  background:linear-gradient(135deg,#fff,#f4fbff);
}
.pos-cash-strip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:30px;
  padding:5px 9px;
  margin:0 0 6px;
  border:1px solid #cde6f8;
  border-radius:8px;
  background:#fff;
  color:#50625c;
  font-size:11px;
  font-weight:900;
}
.pos-cash-strip strong{
  color:#0b4a8b;
  font-size:12px;
  line-height:1;
}
.pos-cash-strip .pos-open-cash-form{
  margin:0;
}
.pos-workbar-inline{
  grid-template-columns:1fr;
  padding:0;
  margin:0 0 6px;
  border:0;
  background:transparent;
}
.pos-workbar-inline .checkout-top-grid{
  grid-template-columns:minmax(320px,1fr) minmax(170px,210px) minmax(210px,.45fr);
}
.pos-workbar-inline .pos-warehouse-row{
  grid-template-columns:minmax(260px,420px) 1fr;
  margin:5px 0 0;
}
.pos-workbar-inline .pos-warehouse-row select{
  min-height:32px;
}
.pos-workbar-inline .pos-warehouse-row small{
  padding-bottom:5px;
}
.pos-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}
.pos-cash-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:26px;
  padding:4px 8px;
  border:1px solid #cde6f8;
  border-radius:999px;
  background:#fff;
  color:#50625c;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.pos-cash-chip small{
  font-size:10px;
  line-height:1;
}
.pos-cash-chip strong{
  color:#0b4a8b;
  font-size:11px;
  line-height:1;
}
.pos-cash-chip .pos-open-cash-form{
  margin:0;
}
.pos-cash-chip .pos-open-cash-form button{
  min-height:18px;
  font-size:11px;
}
.pos-workbar-status,
.pos-workbar-cash{
  min-width:0;
}
.pos-workbar-status .status-lock{
  padding:4px 8px;
  font-size:11px;
  line-height:1;
}
.pos-workbar-status small,
.pos-workbar-cash small{
  display:block;
  margin-top:4px;
  color:var(--mut);
  font-size:11px;
  font-weight:850;
  line-height:1.1;
}
.pos-workbar-cash{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:50px;
  padding:6px 8px;
  border:1px solid #cde6f8;
  border-radius:8px;
  background:#fff;
}
.pos-workbar-cash strong{
  display:block;
  color:#0b4a8b;
  font-size:12px;
  line-height:1.05;
  white-space:nowrap;
}
.pos-open-cash-form{
  margin:2px 0 0;
}
.pos-open-cash-form button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0;
  border:0;
  background:transparent;
  color:#0b63ce;
  font-size:13px;
  font-weight:950;
  line-height:1;
  cursor:pointer;
}
.pos-open-cash-form button:hover{
  text-decoration:underline;
}
.pos-workbar-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
.pos-workbar-metrics div{
  padding:6px 8px;
  border-radius:8px;
  background:white;
  border:1px solid #cde6f8;
}
.pos-workbar-metrics small{
  display:block;
  color:var(--mut);
  font-size:10px;
  font-weight:950;
  line-height:1;
}
.pos-workbar-metrics strong{
  display:block;
  margin-top:2px;
  color:#073b73;
  font-size:13px;
  line-height:1.05;
}
.checkout-card{position:sticky;top:18px;align-self:start}
.checkout-card-horizontal{
  position:relative;
  top:auto;
  margin-bottom:8px;
  padding:10px 12px;
  z-index:2;
}
.checkout-card-horizontal .checkout-head{
  align-items:center;
  margin-bottom:6px;
}
.checkout-card-horizontal .checkout-head h2{
  margin:0;
  font-size:18px;
  line-height:1.05;
}
.checkout-card-horizontal .checkout-head small{
  font-size:11px;
  line-height:1.1;
}
.checkout-card-horizontal .soft-pill{
  padding:4px 8px;
  font-size:11px;
}
.checkout-top-grid{
  display:grid;
  grid-template-columns:minmax(300px,1fr) minmax(168px,190px) minmax(210px,.55fr);
  gap:8px;
  align-items:center;
}
.checkout-client-box,
.checkout-doc-box,
.checkout-ticket-box{
  min-width:0;
}
.checkout-client-box{
  position:relative;
}
.pos-workbar .checkout-ticket-box{
  align-self:center;
}
.checkout-card-horizontal label{
  margin-top:0;
  font-size:11px;
  line-height:1.1;
}
.pos-workbar label{
  margin-top:0;
  font-size:10px;
  line-height:1.05;
}
.checkout-card-horizontal input,
.checkout-card-horizontal select{
  min-height:36px;
  padding:7px 9px;
  font-size:13px;
}
.pos-workbar input,
.pos-workbar select{
  min-height:34px;
  padding:6px 8px;
  font-size:12px;
  border-radius:8px;
}
.checkout-card-horizontal .ticket-summary{
  min-height:36px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin:0;
}
.pos-workbar .ticket-summary{
  min-height:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin:0;
}
.checkout-card-horizontal .ticket-mini{
  padding:6px 8px;
  border-radius:8px;
  gap:6px;
  min-height:36px;
}
.pos-workbar .ticket-mini{
  padding:5px 6px;
  border-radius:8px;
  gap:4px;
  min-height:34px;
}
.checkout-card-horizontal .ticket-mini span,
.checkout-card-horizontal .ticket-mini b{
  font-size:12px;
  line-height:1.05;
}
.pos-workbar .ticket-mini span,
.pos-workbar .ticket-mini b{
  font-size:11px;
  line-height:1.02;
}
.checkout-card-horizontal .hint{
  display:block;
  margin-top:4px;
  font-size:11px;
  line-height:1.15;
}
.pos-workbar .hint{
  display:block;
  margin-top:0;
  font-size:10px;
  line-height:1.15;
  white-space:normal;
}
.checkout-card-horizontal .client-results{
  position:absolute;
  z-index:20;
  width:min(520px,calc(100vw - 48px));
}
.pos-sale-card{
  padding:10px 12px;
}
.pos-sale-card .section-head{
  align-items:center;
  margin-bottom:6px;
}
.pos-sale-card .section-head h3{
  font-size:17px;
  line-height:1.05;
}
.pos-sale-card .section-head > div:first-child > small.muted{
  display:none;
}
.pos-shortcuts{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:5px;
  max-width:980px;
}
.pos-sale-card .pos-shortcuts .btn{
  min-width:auto;
  min-height:30px;
  flex-direction:row;
  gap:5px;
  padding:5px 8px;
  border-radius:10px;
  font-size:12px;
  line-height:1;
  color:#ffffff;
}
.pos-sale-card .pos-shortcuts .btn kbd{
  margin-right:0;
  color:#111827;
  border-color:rgba(255,255,255,.55);
  background:rgba(255,255,255,.92);
}
.pos-sale-card .pos-shortcuts .btn span{
  display:block;
  color:#ffffff;
}
.pos-shortcuts span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:26px;
  padding:4px 7px;
  border:1px solid #cde6f8;
  border-radius:8px;
  background:#f8fbff;
  color:#31524d;
  font-size:12px;
  font-weight:900;
  line-height:1;
}
.pos-shortcuts kbd{
  font-size:11px;
  padding:2px 5px;
}
.pos-sale-card .section-head small{
  display:block;
  max-width:760px;
  font-size:11px;
  line-height:1.1;
}
.pos-sale-card .soft-pill{
  min-height:26px;
  padding:4px 8px;
  font-size:11px;
}
.pos-sale-card .pos-speedbar{
  margin:4px 0 6px;
}
.pos-sale-card .pos-speedbar .btn{
  min-height:28px;
  padding:5px 8px;
}
.pos-sale-card .pos-warehouse-row{
  grid-template-columns:minmax(190px,260px) 1fr;
  gap:8px;
  margin:4px 0 6px;
}
.pos-sale-card .pos-warehouse-row select{
  min-height:32px;
  padding:6px 8px;
  border-radius:8px;
}
.pos-sale-card .pos-warehouse-row small{
  padding-bottom:6px;
  font-size:11px;
}
.pos-sale-card .scan-box.one input{
  min-height:38px;
  padding:8px 10px;
}
.pos-sale-card #scan-status{
  display:block;
  margin-top:3px;
  font-size:11px;
  line-height:1.05;
}
.checkout-actions{display:grid;grid-template-columns:1fr 110px;gap:10px}
.search-result.is-empty{opacity:.62;background:#fff1f3;border-color:#fecdd3}
.dispatch-box{
  display:grid;
  gap:8px;
  margin:12px 0;
  padding:12px;
  border:1px solid #cde6f8;
  border-radius:10px;
  background:#f8fbff;
}
.dispatch-box summary{
  cursor:pointer;
  color:#17463f;
  font-weight:950;
}
.dispatch-box:not([open]){
  display:block;
}
.dispatch-box:not([open]) summary{
  list-style:none;
}
.dispatch-box:not([open]) summary::-webkit-details-marker{
  display:none;
}
.dispatch-form{
  display:grid;
  grid-template-columns:1.2fr 1.4fr 1.2fr 1fr 110px 1fr auto auto;
  gap:8px;
  align-items:center;
  min-width:980px;
}
.dispatch-form input,
.dispatch-form select{min-height:38px;padding:8px 10px;border-radius:10px;font-size:13px}
.pos{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,320px);gap:12px}
.pos.pos-wide{grid-template-columns:minmax(0,1fr)}
.scan-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.scan-box input{
  min-height:52px;
  font-size:18px;
  font-weight:950;
  border-color:#90caf9;
  background:linear-gradient(180deg,#fff,#f4faff);
}
#scan-code::placeholder{
  color:#586b66;
  opacity:.46;
  font-weight:700;
}
#scan-code:focus::placeholder{
  opacity:.32;
}
.hint{display:block;color:var(--mut);font-weight:800;margin-top:8px}
.products{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.prod{
  padding:14px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fff,#f7fbff);
  border-radius:14px;
  cursor:pointer;
  transition:.16s ease;
}
.prod:hover{border-color:#8bc7ff;transform:translateY(-1px);box-shadow:0 12px 26px rgba(11,99,206,.14)}
.prod h3{color:var(--blue)}
.search-results{
  display:grid;
  gap:8px;
  margin-bottom:14px;
}
.search-results.has-results{
  gap:0;
  border:1px solid #baddfb;
  border-radius:10px;
  overflow:hidden;
}
.search-result-head,
.search-result{
  width:100%;
  display:grid;
  grid-template-columns:48px 110px minmax(190px,1fr) 116px 76px 76px;
  align-items:center;
  gap:8px;
}
.search-result-head{
  padding:8px 12px;
  background:#f4fbff;
  color:#073b73;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
}
.search-result{
  padding:10px 12px;
  border:0;
  border-top:1px solid #dfe8e2;
  border-radius:0;
  background:#fbfdff;
  color:#073b73;
  font-weight:850;
  cursor:pointer;
  text-align:left;
}
.search-result:hover{border-color:#7cc4f8;box-shadow:0 10px 22px rgba(11,99,206,.10)}
.search-result small{
  display:block;
  margin-top:2px;
  color:var(--mut);
  font-weight:850;
}
.search-result strong,
.search-result em{
  font-style:normal;
  text-align:right;
}
.client-results{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 5px);
  z-index:120;
  max-height:min(430px,calc(100vh - 220px));
  overflow:auto;
  gap:6px;
  margin:0;
  padding:6px;
  border:1px solid #b8d9ee;
  border-radius:10px;
  background:#f9fcff;
  box-shadow:0 18px 38px rgba(8,49,82,.18);
}
.client-results.has-results{display:grid}
.client-result{
  display:flex;
  justify-content:space-between;
  gap:10px;
  width:100%;
  padding:8px 10px;
  border:1px solid #dfe8e2;
  border-radius:9px;
  background:#fff;
  color:#17463f;
  text-align:left;
  font-weight:900;
  cursor:pointer;
}

.client-result.active{
  background:#e8f2ff!important;
  border-color:#7cc4f8!important;
}
.client-result small{
  color:var(--mut);
  font-weight:850;
  white-space:nowrap;
}
.cashier-order-form{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  align-items:stretch;
}
.cashier-order-form select,
.cashier-order-form input{
  min-height:38px;
  padding:7px 10px;
  border-radius:9px;
  font-size:14px;
  font-weight:850;
  width:100%;
}
.cashier-order-form label{
  display:grid;
  gap:3px;
  min-width:0;
}
.cashier-order-form label span{
  color:var(--mut);
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
}
.cashier-payment-row,
.cashier-payment-docs{
  display:grid;
  grid-template-columns:minmax(115px,1fr) minmax(115px,1fr);
  gap:8px;
  align-items:end;
}
.cashier-payment-docs{
  grid-template-columns:minmax(140px,1fr) minmax(160px,1fr);
}
.cashier-payment-actions .btn{
  width:100%;
  justify-content:center;
}
.cashier-order-cell{
  min-width:330px;
}
.cashier-change{
  color:#17463f;
  font-weight:950;
  white-space:normal;
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border:1px solid #cfe3ef;
  border-radius:9px;
  background:#f8fbff;
  padding:7px 8px;
  font-size:14px;
}
@media (max-width:900px){
  .cashier-pending-table{
    table-layout:auto;
  }
  .cashier-pending-table th:nth-child(n),.cashier-pending-table td:nth-child(n){
    width:auto;
  }
  .cashier-order-cell{
    min-width:280px;
  }
  .cashier-payment-row,
  .cashier-payment-docs{
    grid-template-columns:1fr;
  }
  .cashier-change{
    justify-content:center;
  }
}
.cash-focus{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.cashier-pending-table{
  table-layout:fixed;
  min-width:1180px;
}
.cashier-pending-table th,
.cashier-pending-table td{
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  vertical-align:top;
}
.cashier-pending-table th:nth-child(1),
.cashier-pending-table td:nth-child(1){width:11%}
.cashier-pending-table th:nth-child(2),
.cashier-pending-table td:nth-child(2){width:15%}
.cashier-pending-table th:nth-child(3),
.cashier-pending-table td:nth-child(3){width:19%}
.cashier-pending-table th:nth-child(4),
.cashier-pending-table td:nth-child(4){width:14%}
.cashier-pending-table th:nth-child(5),
.cashier-pending-table td:nth-child(5){
  width:12%;
  text-align:right;
  white-space:nowrap;
}
.cashier-pending-table th:nth-child(6),
.cashier-pending-table td:nth-child(6){
  width:29%;
  min-width:360px;
}
.cashier-order-cell{
  min-width:360px;
}
.cashier-order-form{
  min-width:0;
}
.cashier-payment-row,
.cashier-payment-docs{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}
.cashier-payment-actions .btn{
  min-height:38px;
  line-height:1.15;
  white-space:normal;
}
.cashier-change{
  overflow-wrap:anywhere;
  word-break:normal;
}
@media (max-width:900px){
  .cash-focus{
    overflow-x:auto;
  }
  .cashier-pending-table{
    table-layout:fixed;
    min-width:980px;
  }
  .cashier-pending-table th:nth-child(n),
  .cashier-pending-table td:nth-child(n){
    width:auto;
  }
  .cashier-pending-table th:nth-child(6),
  .cashier-pending-table td:nth-child(6){
    width:340px;
    min-width:340px;
  }
}
.pos-add-card{
  width:min(520px,94vw);
}
.pos-add-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.pos-add-grid label{
  display:grid;
  gap:5px;
  color:#52635c;
  font-size:12px;
  font-weight:950;
}
.sale-detail{
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.sale-detail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  background:linear-gradient(135deg,#073b73,#0b63ce);
  color:white;
}
.sale-detail-head h3{margin:0}
.sale-detail-head span{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  font-weight:950;
}
.sale-table th{background:#eef7ff;color:#073b73}
.sale-table td{vertical-align:middle}
.empty-sale{text-align:center!important;color:var(--mut);font-weight:850;padding:18px!important}
.qty-input{
  width:76px;
  min-height:38px;
  text-align:center;
  font-weight:950;
}
.line-remove{
  border:0;
  border-radius:9px;
  background:#fee6ea;
  color:#b4233c;
  padding:8px 10px;
  font-weight:950;
  cursor:pointer;
}
.ticket-summary{
  display:grid;
  gap:8px;
  margin:12px 0;
}
.ticket-mini{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 11px;
  border-radius:11px;
  background:#f8fbff;
  border:1px solid var(--line);
}
.ticket-mini span{color:var(--mut);font-weight:900}
.ticket-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px dashed #c4d2e4;
  padding:11px 0;
}
.ticket-item button{border:0;border-radius:8px;background:#fee6ea;color:#b4233c;font-weight:900}
.payment-panel{
  display:grid;
  gap:12px;
  margin:14px 0;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(180deg,#f8fbff,#eef7ff);
  border:1px solid #cde6f8;
}
.total-due,.change-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.total-due small,.change-box small{color:var(--mut);font-weight:950;text-transform:uppercase;font-size:12px}
.total-due strong{
  color:#073b73;
  font-size:34px;
  line-height:1;
}
.change-box{
  padding:14px;
  border-radius:14px;
  background:#ecfdf3;
  border:1px solid #bbf7d0;
}
.change-box strong{
  color:#067647;
  font-size:36px;
  line-height:1;
}
.change-box strong.pending-change{color:#b42318}

@media(max-width:900px){
  .app{display:block}
  .side{width:auto;height:auto;position:relative}
  body.sidebar-collapsed .side,
  body.sidebar-collapsed .app.sidebar-peek .side{width:auto;padding:18px}
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav a span,
  body.sidebar-collapsed .nav-group summary b,
  body.sidebar-collapsed .nav-pill,
  body.sidebar-collapsed .side-logout span{
    opacity:1;width:auto;max-width:none;overflow:visible;pointer-events:auto;
  }
  body.sidebar-collapsed .nav a,
  body.sidebar-collapsed .nav-group summary,
  body.sidebar-collapsed .side-logout{justify-content:flex-start}
  body.sidebar-collapsed .nav-group summary::after{display:grid}
  .grid{grid-template-columns:1fr}
  .pos-workbar{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .pos-cash-strip{
    display:flex;
    width:100%;
  }
  .pos-workbar .checkout-top-grid{
    grid-column:1/-1;
    grid-template-columns:1fr;
  }
  .checkout-top-grid{grid-template-columns:1fr}
  .checkout-ticket-box{grid-column:auto}
  .wide{grid-column:auto}
  .report-head{align-items:stretch;flex-direction:column}
  .report-period{grid-template-columns:1fr auto}
  .pos-command,.accounting-hero{display:grid}
  .pos-metrics{grid-template-columns:1fr}
  .checkout-card{position:static}
  .checkout-actions{grid-template-columns:1fr}
  .section-head{display:grid}
  .pos{grid-template-columns:1fr}
  .search-result-head{display:none}
  .search-result{
    grid-template-columns:38px minmax(70px,.45fr) minmax(140px,1fr);
  }
  .search-result strong,
  .search-result em{
    text-align:left;
  }
  .search-result strong{grid-column:2}
  .search-result em{grid-column:3}
  .client-result{display:grid}
  .pos-warehouse-row,
  .pos-add-grid{grid-template-columns:1fr}
  .products{grid-template-columns:1fr 1fr}
  .mini-form,.inline-form,.module-actions,.scan-box{grid-template-columns:1fr}
  .product-master-grid,
  .product-price-grid,
  .product-two,
  .product-existence-grid{grid-template-columns:1fr}
  .product-master-toolbar{align-items:stretch;flex-wrap:wrap}
  .product-master-toolbar span{width:100%}
  .dispatch-form{grid-template-columns:1fr;min-width:0}
  .client-credit-grid{grid-template-columns:1fr}
  .client-history{grid-column:auto}
  .user-hero{grid-template-columns:1fr}
  .user-hero-metrics,.role-template-grid{grid-template-columns:1fr 1fr}
  .user-form-grid{grid-template-columns:1fr}
  .user-form-grid .password-field{grid-column:auto}
  .dashboard-hero{grid-template-columns:1fr}
  .user-sales-row{grid-template-columns:1fr}
  .user-sales-row>strong{text-align:left}
  .daily-chart{grid-template-columns:repeat(2,minmax(0,1fr))}
  .method-chart>div{grid-template-columns:1fr}
  .method-chart strong{text-align:left}
  .login-god{display:block;overflow:auto;background:linear-gradient(180deg,#06152f 0%,#0b3c78 42%,#f5f8fc 42.2%)}
  .login-god::before{display:none}
  .login-stage{width:100%;min-height:100vh;display:grid;grid-template-columns:1fr;gap:0}
  .login-brand-side{padding:30px 22px 20px}
  .login-brand-side h1{font-size:38px}
  .login-brand-side p{font-size:15px}
  .login-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .login-feature-grid div{min-height:70px}
  .login-glass{margin:0 14px 24px;min-height:auto;padding:24px;border-radius:24px}
  .login-panel-head h2{font-size:28px}
  .login-meta-row{display:grid}
}

.floating-total{
  position:fixed;
  left:50%;
  bottom:22px;
  z-index:60;
  width:min(860px,calc(100vw - 28px));
  display:grid;
  grid-template-columns:1.05fr 1fr 1fr auto;
  align-items:end;
  gap:12px;
  padding:14px;
  border:1px solid #cfe6dc;
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 22px 58px rgba(21,33,29,.18);
  transform:translate(-50%,130%);
  opacity:0;
  pointer-events:none;
  transition:transform .22s ease, opacity .22s ease;
  backdrop-filter:blur(14px);
}
.floating-total.show{
  transform:translate(-50%,0);
  opacity:1;
  pointer-events:auto;
}
.floating-total small{
  display:block;
  color:#69746f;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
}
.floating-pay-total span,
.floating-received{
  display:block;
  color:#52635c;
  font-size:12px;
  font-weight:950;
}
.floating-total strong,
.floating-change strong{
  display:block;
  margin-top:2px;
  color:#123d37;
  font-size:30px;
  line-height:1;
}
.floating-change{
  min-width:132px;
  padding-left:14px;
  border-left:1px solid #dfe8e2;
}
.floating-change.change-box{
  margin:0;
  padding:11px 12px;
  min-height:54px;
}
.floating-change strong{
  color:#2f9f73;
  font-size:24px;
}
.floating-change.pending-change strong{
  color:#b42335;
  font-size:20px;
}
.floating-order-note{
  display:grid;
  gap:3px;
  min-width:190px;
  padding:11px 12px;
  min-height:54px;
  border-radius:12px;
  border:1px solid rgba(11,99,206,.18);
  background:#eef5ff;
  color:#073b73;
}
.floating-order-note small{
  color:#667085;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
}
.floating-order-note strong{
  color:#073b73;
  font-size:15px;
  line-height:1.15;
}
.floating-total-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  flex:0 0 auto;
}
.floating-total input{
  min-height:54px;
  margin-top:5px;
  font-size:18px;
  font-weight:950;
}
.floating-total .btn{
  min-height:42px;
  border-radius:11px;
  white-space:nowrap;
}
body:has(.floating-total.show) .system-footer{padding-bottom:122px}

/* Ajustes POS solicitados por video/audio: mas area libre para facturar. */
.pos-sale-card .checkout-top-grid{
  grid-template-columns:minmax(320px,1.25fr) minmax(170px,210px) minmax(360px,.9fr);
}
.pos-sale-card .checkout-top-grid:has(#metodo_pedido){
  grid-template-columns:minmax(280px,1fr) minmax(140px,170px) minmax(170px,210px) minmax(320px,.85fr);
}
.pos-workbar .ticket-summary{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.pos-workbar .ticket-mini{
  min-height:30px;
  padding:4px 6px;
}
.pos-workbar .ticket-mini span,
.pos-workbar .ticket-mini b{
  font-size:11px;
  line-height:1;
}
.pos-sale-card .scan-box.one input{
  min-height:42px;
  border:2px solid #0b8fdf;
  background:linear-gradient(180deg,#ffffff,#eaf7ff);
  box-shadow:0 0 0 3px rgba(14,165,233,.08);
}
.pos-sale-card .scan-box.one input:focus{
  border-color:#0369a1;
  box-shadow:0 0 0 4px rgba(14,165,233,.18);
}
.search-results.has-results{
  max-height:32vh;
  overflow:auto;
  margin-bottom:8px;
}
.search-result-head,
.search-result{
  grid-template-columns:42px 92px minmax(220px,1fr) minmax(260px,.9fr) 92px;
}
.search-result{
  min-height:42px;
  padding:7px 10px;
}
.search-result.active{
  background:linear-gradient(90deg,#fff8df,#fffdf4)!important;
  border-color:#e9bf58!important;
  color:#573b08!important;
  box-shadow:inset 4px 0 0 #d99517,0 8px 18px rgba(176,117,20,.10)!important;
}
.search-price-stack{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:3px 6px;
  text-align:left!important;
}
.search-price-stack small{
  display:block;
  margin:0;
  padding:2px 4px;
  border-radius:6px;
  background:#edf8ff;
  color:#073b73;
  font-size:10px;
  font-weight:950;
  white-space:nowrap;
}
.sale-detail{
  margin-top:6px;
}
.sale-detail-head{
  padding:9px 12px;
}
.sale-head-status{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}
.sale-head-status span{
  white-space:nowrap;
}
.sale-head-status small{
  max-width:min(560px,52vw);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgba(255,255,255,.84);
  font-weight:850;
}
.sale-table th{
  padding:7px 8px;
}
.sale-table td{
  padding:6px 8px;
}
.qty-input{
  min-height:32px;
}
.line-remove{
  padding:6px 8px;
}

@media (max-width:1100px){
  .pos-sale-card .checkout-top-grid{
    grid-template-columns:1fr;
  }
  .pos-workbar .ticket-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .search-result-head,
  .search-result{
    grid-template-columns:36px 78px minmax(160px,1fr) minmax(180px,.9fr) 58px 58px;
  }
  .search-price-stack{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Correccion puntual POS: columnas de busqueda estables, sin montar encabezados. */
.pos-sale-card .search-results.has-results{
  overflow-x:auto;
}
.pos-sale-card .search-result-head,
.pos-sale-card .search-result{
  display:grid!important;
  grid-template-columns:46px 120px minmax(360px,1fr) 310px 86px 86px!important;
  min-width:1010px;
  align-items:center;
  column-gap:10px;
}
.pos-sale-card .search-result-head{
  padding:8px 12px;
  background:#eaf6ff;
  color:#073b73;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:0;
}
.pos-sale-card .search-result > span,
.pos-sale-card .search-result > b,
.pos-sale-card .search-result > strong,
.pos-sale-card .search-result > em,
.pos-sale-card .search-result-head > span{
  min-width:0;
}
.pos-sale-card .search-result > b,
.pos-sale-card .search-result > em{
  text-align:center!important;
}
.pos-sale-card .search-result > strong{
  grid-column:auto!important;
}
.pos-sale-card .search-result > em{
  grid-column:auto!important;
  font-style:normal;
}
.pos-sale-card .search-price-stack{
  grid-template-columns:repeat(3,minmax(72px,1fr));
}

@media (max-width:1100px){
  .pos-sale-card .search-result-head,
  .pos-sale-card .search-result{
    grid-template-columns:38px 76px minmax(160px,1fr) 226px 58px 58px!important;
    min-width:690px;
    column-gap:7px;
    padding-left:8px;
    padding-right:8px;
  }
  .pos-sale-card .search-price-stack{
    grid-template-columns:repeat(3,minmax(58px,1fr));
    gap:2px 4px;
  }
  .pos-sale-card .search-price-stack small{
    font-size:9px;
    padding:2px 3px;
  }
}

/* Ajuste global: las pantallas del sistema no deben crear desplazamiento horizontal. */
body:not(.print-body){
  overflow-x:hidden;
}
body:not(.print-body) .app,
body:not(.print-body) .main,
body:not(.print-body) .top,
body:not(.print-body) .grid,
body:not(.print-body) .card,
body:not(.print-body) .wide,
body:not(.print-body) .full,
body:not(.print-body) .table-wrap,
body:not(.print-body) .report-preview,
body:not(.print-body) .actionbar,
body:not(.print-body) .mini-form,
body:not(.print-body) .inline-form,
body:not(.print-body) .premium-form,
body:not(.print-body) .module-actions{
  max-width:100%;
  min-width:0;
}
body:not(.print-body) .main{
  overflow-x:hidden;
}
body:not(.print-body) .card,
body:not(.print-body) .table-wrap{
  overflow-x:visible;
}
body:not(.print-body) .pos-sale-card .search-results.has-results{
  max-width:100%;
  overflow:auto;
}
body:not(.print-body) .table,
body:not(.print-body) .report-table,
body:not(.print-body) .client-history .table,
body:not(.print-body) .client-credit-grid .table{
  width:100%;
  min-width:0!important;
  table-layout:fixed;
}
body:not(.print-body) .table th,
body:not(.print-body) .table td,
body:not(.print-body) .report-table th,
body:not(.print-body) .report-table td{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.25;
}
body:not(.print-body) .table .btn,
body:not(.print-body) .report-table .btn{
  white-space:normal;
}
body:not(.print-body) .dispatch-form{
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  min-width:0;
}
body:not(.print-body) .pos-sale-card .search-result-head,
body:not(.print-body) .pos-sale-card .search-result{
  grid-template-columns:38px 84px minmax(0,1fr) minmax(190px,.75fr) 58px 58px!important;
  min-width:0!important;
}
body:not(.print-body) .pos-sale-card .search-price-stack{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

@media (max-width:1100px){
  body:not(.print-body) .pos-sale-card .search-result-head,
  body:not(.print-body) .pos-sale-card .search-result{
    grid-template-columns:32px 64px minmax(0,1fr) minmax(130px,.65fr) 48px 48px!important;
  }
  body:not(.print-body) .pos-sale-card .search-price-stack{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:900px){
  body:not(.print-body) .main{
    padding:14px;
  }
  body:not(.print-body) .top{
    flex-wrap:wrap;
  }
  body:not(.print-body) .table th,
  body:not(.print-body) .table td,
  body:not(.print-body) .report-table th,
  body:not(.print-body) .report-table td{
    padding:8px 7px;
    font-size:12px;
  }
  body:not(.print-body) .btn{
    white-space:normal;
  }
}





body:not(.print-body) .warehouse-stock-box{
  overflow-x:hidden!important;
  max-width:100%!important;
}
body:not(.print-body) .warehouse-stock-table{
  table-layout:auto!important;
  min-width:0!important;
  width:100%!important;
}
body:not(.print-body) .warehouse-stock-table th,
body:not(.print-body) .warehouse-stock-table td{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  vertical-align:middle!important;
  padding:6px 7px!important;
  font-size:11.5px!important;
}
body:not(.print-body) .warehouse-stock-table th:nth-child(1),
body:not(.print-body) .warehouse-stock-table td:nth-child(1){width:7%}
body:not(.print-body) .warehouse-stock-table th:nth-child(2),
body:not(.print-body) .warehouse-stock-table td:nth-child(2){width:29%;white-space:normal!important}
body:not(.print-body) .warehouse-stock-table th:nth-child(3),
body:not(.print-body) .warehouse-stock-table td:nth-child(3){width:12%}
body:not(.print-body) .warehouse-stock-table th:nth-child(4),
body:not(.print-body) .warehouse-stock-table td:nth-child(4){width:8%;text-align:center}
body:not(.print-body) .warehouse-stock-table th:nth-child(5),
body:not(.print-body) .warehouse-stock-table td:nth-child(5),
body:not(.print-body) .warehouse-stock-table th:nth-child(6),
body:not(.print-body) .warehouse-stock-table td:nth-child(6),
body:not(.print-body) .warehouse-stock-table th:nth-child(7),
body:not(.print-body) .warehouse-stock-table td:nth-child(7),
body:not(.print-body) .warehouse-stock-table th:nth-child(8),
body:not(.print-body) .warehouse-stock-table td:nth-child(8){width:11%;text-align:right}
body:not(.print-body) .warehouse-stock-table .inventory-total-row td{white-space:normal!important}
body:not(.print-body) .warehouse-stock-table .inventory-total-row td:nth-child(n+2){white-space:nowrap!important}

/* Blindaje final de tablas y buscadores de productos. */
body:not(.print-body) .card:has(> table.table),
body:not(.print-body) .table-wrap,
body:not(.print-body) .sale-detail,
body:not(.print-body) .report-table-card{
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
}
body:not(.print-body) table.table,
body:not(.print-body) table.report-table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:auto!important;
}
body:not(.print-body) table.table th,
body:not(.print-body) table.table td,
body:not(.print-body) table.report-table th,
body:not(.print-body) table.report-table td{
  vertical-align:middle!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  line-height:1.25!important;
  max-width:360px;
}
body:not(.print-body) table.table td:nth-child(2),
body:not(.print-body) table.table td:nth-child(3),
body:not(.print-body) table.report-table td:nth-child(2),
body:not(.print-body) table.report-table td:nth-child(3),
body:not(.print-body) .product-cell,
body:not(.print-body) td .product-cell{
  white-space:normal!important;
  overflow-wrap:break-word!important;
}
body:not(.print-body) table.table input,
body:not(.print-body) table.table select,
body:not(.print-body) table.table button,
body:not(.print-body) table.table .btn,
body:not(.print-body) table.report-table input,
body:not(.print-body) table.report-table select,
body:not(.print-body) table.report-table button,
body:not(.print-body) table.report-table .btn{
  max-width:100%!important;
  white-space:nowrap!important;
}
.purchase-search-results{display:none;margin:-4px 0 10px;border:1px solid #cfe5f7;border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 12px 28px rgba(9,60,112,.12)}
.purchase-search-results.show{display:block}
.purchase-result-row{display:grid;grid-template-columns:90px minmax(220px,1fr) 110px 110px 72px;gap:8px;align-items:center;padding:9px 12px;border-bottom:1px solid #e5f0fa;cursor:pointer;font-weight:800;color:#123}
.purchase-result-row:last-child{border-bottom:0}
.purchase-result-row.active,.purchase-result-row:hover{background:linear-gradient(90deg,#c2e6ff 0%,#edf8ff 100%);color:#073b73;box-shadow:inset 5px 0 0 #0b8fdf}
.purchase-result-row.active small,.purchase-result-row:hover small{color:#063d78}
.purchase-result-row small{font-weight:900;color:#5a7187}
.consulta-product-field{position:relative;min-width:0}
.consulta-product-field .purchase-search-results{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:80;
  max-height:320px;
  overflow:auto;
  margin:0;
}
.purchase-help-line{margin:-2px 0 8px;color:#5d7188;font-size:12px;font-weight:900}
@media(max-width:900px){
  .purchase-result-row{grid-template-columns:70px minmax(0,1fr);font-size:12px}
  .purchase-result-row small:nth-child(n+3){display:none}
}

/* Estado activo uniforme para barras de opciones del sistema. */
.actionbar .btn.gold[class*="-tab-btn"],
.product-master-tabs .btn.mini.active,
.accounting-tabs a.active,
.inv-tab-btn.inventory-tab-active{
  background:linear-gradient(135deg,var(--gold),#ffd76b)!important;
  color:#2f2300!important;
  border-color:rgba(47,35,0,.18)!important;
  box-shadow:0 10px 22px rgba(243,182,63,.32), inset 0 0 0 2px rgba(47,35,0,.12)!important;
}

/* Video 71: las tablas de reportes/listados deben verse completas en pantalla. */
body:not(.print-body) .report-table-card,
body:not(.print-body) .report-table-card .table-wrap,
body:not(.print-body) .card.full:has(> table.table){
  overflow-x:hidden!important;
}
body:not(.print-body) .report-table,
body:not(.print-body) .table-wrap > table.table,
body:not(.print-body) .card.full > table.table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
body:not(.print-body) .report-table th,
body:not(.print-body) .report-table td,
body:not(.print-body) .table-wrap > table.table th,
body:not(.print-body) .table-wrap > table.table td,
body:not(.print-body) .card.full > table.table th,
body:not(.print-body) .card.full > table.table td{
  padding:7px 6px!important;
  font-size:clamp(10px, .72vw, 12px)!important;
  line-height:1.18!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  max-width:none!important;
}
body:not(.print-body) .report-table .btn,
body:not(.print-body) .table-wrap > table.table .btn,
body:not(.print-body) .card.full > table.table .btn{
  min-height:28px!important;
  padding:5px 7px!important;
  font-size:clamp(10px, .68vw, 11px)!important;
  white-space:normal!important;
}
body:not(.print-body) .report-table input,
body:not(.print-body) .report-table select,
body:not(.print-body) .table-wrap > table.table input,
body:not(.print-body) .table-wrap > table.table select,
body:not(.print-body) .card.full > table.table input,
body:not(.print-body) .card.full > table.table select{
  min-height:30px!important;
  padding:5px 6px!important;
  font-size:11px!important;
}

body:not(.print-body) .purchase-print-actions{
  width:180px!important;
  min-width:180px!important;
  white-space:normal!important;
}
body:not(.print-body) .purchase-print-actions > .btn{
  display:block!important;
  width:100%!important;
  margin:0 0 6px!important;
  text-align:center!important;
  white-space:nowrap!important;
  font-size:11px!important;
  padding:6px 8px!important;
}
body:not(.print-body) .purchase-detail-row[hidden]{
  display:none!important;
}
body:not(.print-body) .purchase-detail-row > td{
  padding:0 8px 12px!important;
  background:#f8fbff!important;
}
body:not(.print-body) .purchase-detail-panel{
  padding:12px!important;
  border:1px solid var(--line)!important;
  border-radius:8px!important;
  background:#fff!important;
}
body:not(.print-body) .purchase-detail-panel h4{
  margin:0 0 10px!important;
  font-size:13px!important;
}
body:not(.print-body) .purchase-detail-table{
  table-layout:auto!important;
  width:100%!important;
}
body:not(.print-body) .purchase-detail-table th,
body:not(.print-body) .purchase-detail-table td{
  white-space:normal!important;
  font-size:12px!important;
  padding:7px 8px!important;
}
body:not(.print-body) .purchase-detail-table th:nth-child(n+2),
body:not(.print-body) .purchase-detail-table td:nth-child(n+2){
  width:110px!important;
  text-align:right!important;
  white-space:nowrap!important;
}
body:not(.print-body) .purchase-pay-form{
  grid-template-columns:140px minmax(180px,1fr) minmax(140px,1fr) minmax(140px,1fr) auto!important;
}
body:not(.print-body) .inventory-product-row{
  cursor:pointer;
}
body:not(.print-body) .inventory-product-row.inventory-row-selected > td{
  background:#eaf6ff!important;
  box-shadow:inset 5px 0 0 var(--blue)!important;
}
body:not(.print-body) .inventory-product-row:focus{
  outline:2px solid rgba(11,99,206,.35);
  outline-offset:-2px;
}
body:not(.print-body) .inventory-category-box{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(0,1fr);
  gap:10px;
  align-items:end;
  margin:10px 0 12px;
}
body:not(.print-body) .inventory-category-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:end;
}
body:not(.print-body) .inventory-category-form label{
  display:grid;
  gap:5px;
  font-size:12px;
  font-weight:900;
  color:#475467;
}
body:not(.print-body) .inventory-category-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
@media(max-width:900px){
  body:not(.print-body) .inventory-category-box,
  body:not(.print-body) .inventory-category-form{
    grid-template-columns:1fr;
  }
}

/* Reportes: filtros y tablas anchas sin columnas montadas. */
body:not(.print-body) .report-period{
  grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr))!important;
}
body:not(.print-body) .report-period .report-field,
body:not(.print-body) .report-period input,
body:not(.print-body) .report-period select,
body:not(.print-body) .report-period button{
  min-width:0!important;
  max-width:100%!important;
}
body:not(.print-body) .report-table-card,
body:not(.print-body) .report-table-card .table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
}
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table,
body:not(.print-body) .report-preview.report-type-comision_venta .report-table,
body:not(.print-body) .report-preview.report-type-comisiones .report-table,
body:not(.print-body) .report-preview.report-type-utilidad_vendedor .report-table{
  table-layout:auto!important;
  min-width:980px!important;
}
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table{
  min-width:1120px!important;
}
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table th,
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table td,
body:not(.print-body) .report-preview.report-type-comision_venta .report-table th,
body:not(.print-body) .report-preview.report-type-comision_venta .report-table td,
body:not(.print-body) .report-preview.report-type-comisiones .report-table th,
body:not(.print-body) .report-preview.report-type-comisiones .report-table td,
body:not(.print-body) .report-preview.report-type-utilidad_vendedor .report-table th,
body:not(.print-body) .report-preview.report-type-utilidad_vendedor .report-table td{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
}
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table td:nth-child(4),
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table th:nth-child(4),
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table td:nth-child(5),
body:not(.print-body) .report-preview.report-type-comision_articulo .report-table th:nth-child(5),
body:not(.print-body) .report-preview.report-type-comision_venta .report-table td:nth-child(4),
body:not(.print-body) .report-preview.report-type-comision_venta .report-table th:nth-child(4),
body:not(.print-body) .report-preview.report-type-comisiones .report-table td:nth-child(4),
body:not(.print-body) .report-preview.report-type-comisiones .report-table th:nth-child(4){
  white-space:normal!important;
  min-width:220px!important;
}
@media(max-width:760px){
  body:not(.print-body) .report-period{
    grid-template-columns:1fr!important;
  }
  body:not(.print-body) .report-period .report-apply{
    grid-column:auto!important;
  }
}

/* POS: ventas en espera para administrador y vendedor mostrador. */
.pos-hold-panel{
  display:grid;
  gap:8px;
  margin:10px 0;
  padding:10px;
  border:1px solid #cfe4fb;
  border-radius:12px;
  background:linear-gradient(180deg,#f8fcff 0%,#eef8ff 100%);
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.pos-hold-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.pos-hold-actions .btn{
  min-height:34px;
  white-space:nowrap;
}
.pos-hold-save{
  background:linear-gradient(90deg,#0f74dc,#14a7c7)!important;
  color:#fff!important;
  border-color:#0f8ed2!important;
}
.pos-hold-list-btn{
  background:#fff!important;
  color:#0a4a84!important;
  border:1px solid #b8d8f0!important;
}
.held-sales-list{
  display:grid;
  gap:7px;
  max-height:260px;
  overflow:auto;
  padding-top:2px;
}
.held-sale-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:8px 10px;
  border:1px solid #d7e8f7;
  border-radius:10px;
  background:#fff;
}
.held-sale-info{
  min-width:0;
  display:grid;
  gap:2px;
}
.held-sale-info b,
.held-sale-info small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.held-sale-info b{color:#073b73}
.held-sale-info small{font-weight:800;color:#64748b}
.held-sale-buttons{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.held-sale-buttons .btn{
  min-height:30px;
  padding:6px 10px;
}
.held-sale-empty{
  padding:10px;
  border:1px dashed #b8d8f0;
  border-radius:10px;
  color:#60738a;
  font-weight:800;
  background:#fff;
}
@media (max-width:720px){
  .held-sale-row{
    grid-template-columns:1fr;
  }
  .held-sale-buttons{
    justify-content:stretch;
  }
  .held-sale-buttons .btn{
    flex:1 1 120px;
  }
}
/* Barras de submenus compactas: para pantallas con muchos botones. */
.compact-action-menu{position:relative;z-index:35;display:grid;grid-template-columns:repeat(var(--compact-action-count,3),minmax(0,1fr));gap:0;margin:8px 0 12px;border:1px solid rgba(10,104,210,.16);border-radius:10px;background:rgba(255,255,255,.68);box-shadow:0 8px 18px rgba(19,64,117,.07);overflow:visible}
.compact-action-group{position:relative;min-width:0}
.compact-action-trigger{width:100%;min-height:34px;border:0;border-right:1px solid rgba(10,104,210,.14);color:#0f2745;font-weight:900;text-align:left;padding:8px 12px;cursor:pointer;font-size:13.5px;line-height:1.18;background:rgba(33,150,243,.22)}
.compact-action-group:nth-child(3n+1) .compact-action-trigger{background:rgba(255,168,35,.30)}
.compact-action-group:nth-child(3n+2) .compact-action-trigger{background:rgba(33,150,243,.28)}
.compact-action-group:nth-child(3n+3) .compact-action-trigger{background:rgba(23,188,157,.28)}
.compact-action-group:last-child .compact-action-trigger{border-right:0}
.compact-action-trigger:after{content:'+';float:right;font-weight:950}
.compact-action-group.active .compact-action-trigger{background:linear-gradient(135deg,#0d6ed8,#16a4d8);color:#fff}
.compact-action-group.active .compact-action-trigger:after{content:'-'}
.actionbar .btn.is-current,
.compact-action-panel .btn.is-current{background:linear-gradient(135deg,#0d6ed8,#16a4d8)!important;color:#fff!important;border-color:rgba(13,110,216,.55)!important;box-shadow:0 10px 22px rgba(11,99,206,.22)!important}
.compact-action-group.has-current .compact-action-trigger{background:linear-gradient(135deg,#0d6ed8,#16a4d8);color:#fff;box-shadow:inset 0 -3px 0 rgba(255,255,255,.38)}
.compact-action-panel{display:none;position:absolute;top:100%;left:0;width:100%;padding:10px;background:rgba(255,255,255,.96);border:1px solid rgba(10,104,210,.16);border-top:0;border-radius:0 0 10px 10px;box-shadow:0 16px 34px rgba(19,64,117,.18)}
.compact-action-group.active .compact-action-panel{display:flex;flex-wrap:wrap;gap:8px}
.compact-action-panel .btn{white-space:normal}
@media(max-width:760px){.compact-action-menu{grid-template-columns:1fr}.compact-action-trigger{border-right:0;border-bottom:1px solid rgba(10,104,210,.12)}.compact-action-panel{position:static;width:100%;border-radius:0 0 10px 10px}}

.srn-credit{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.srn-credit img{width:34px;height:22px;object-fit:contain;border-radius:4px}
.srn-login-credit{display:inline-flex!important;align-items:center;gap:7px}
.srn-login-credit img{width:38px;height:24px;object-fit:contain;border-radius:5px;background:rgba(255,255,255,.72);padding:2px}

.return-sale-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin:0 0 14px;
  padding:12px;
  border:1px solid rgba(10,104,210,.16);
  border-radius:12px;
  background:rgba(232,244,255,.72);
}
.return-sale-summary div{
  min-width:0;
  display:grid;
  gap:3px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.78);
}
.return-sale-summary span{
  color:#5f728a;
  font-size:12px;
  font-weight:900;
}
.return-sale-summary b,
.return-sale-summary small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.return-sale-summary b{
  color:#0f2745;
  font-size:14px;
}
.return-history-filters{
  grid-template-columns:minmax(220px,1.3fr) minmax(190px,1fr) minmax(140px,.7fr) minmax(140px,.7fr) auto auto;
  margin:0 0 12px;
}
@media(max-width:980px){
  .return-history-filters{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .return-sale-summary,
  .return-history-filters{grid-template-columns:1fr}
}

/* DYC brand update: watermark disabled by request */
body::before,.thermal::before,.quote-print::before{background-image:none!important;content:""!important;display:none!important;}

/* Video 300 - clientes: formulario rapido, legible y por bloques */
.client-editor-form{display:flex;flex-direction:column;gap:12px}
.client-form-section{border:1px solid rgba(9,85,170,.18);border-radius:14px;padding:12px;box-shadow:0 10px 22px rgba(18,55,96,.06)}
.client-form-section legend,.client-form-section summary{font-size:15px;font-weight:950;color:#0b3765;letter-spacing:0}
.client-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end}
.client-form-grid label,.client-form-actions label{color:#132238;font-weight:900}
.client-form-grid input,.client-form-grid select,.client-form-grid textarea{min-height:42px;border-color:#bfd4ea;background:rgba(255,255,255,.92)}
.client-tone-blue{background:linear-gradient(135deg,rgba(37,144,236,.14),rgba(255,255,255,.92))}
.client-tone-green{background:linear-gradient(135deg,rgba(19,178,135,.15),rgba(255,255,255,.92))}
.client-tone-gold{background:linear-gradient(135deg,rgba(236,181,39,.20),rgba(255,255,255,.92))}

/* Botones con tonos suaves para diferenciar acciones sin romper el estilo del sistema. */
body:not(.print-body) .btn:not(.red):not(.danger):not(.is-current):not(.active):not(.inventory-tab-active){
  background:linear-gradient(135deg,#d8ecff,#acd7ff)!important;
  color:#073b73!important;
  border:1px solid #77bff0!important;
  box-shadow:0 8px 18px rgba(12,102,190,.12)!important;
}
body:not(.print-body) .btn.gold:not(.red):not(.danger):not(.is-current):not(.active):not(.inventory-tab-active){
  background:linear-gradient(135deg,#fff2bf,#ffd678)!important;
  color:#7a4306!important;
  border-color:#f2b64d!important;
}
body:not(.print-body) .actionbar .btn:nth-child(6n+1):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .module-actions .btn:nth-child(6n+1):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .compact-action-panel .btn:nth-child(6n+1):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .product-master-tabs .btn:nth-child(6n+1):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .report-period .btn:nth-child(6n+1):not(.red):not(.danger):not(.is-current):not(.active){
  background:linear-gradient(135deg,#d8ecff,#acd7ff)!important;
  color:#073b73!important;
  border-color:#77bff0!important;
}
body:not(.print-body) .actionbar .btn:nth-child(6n+2):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .module-actions .btn:nth-child(6n+2):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .compact-action-panel .btn:nth-child(6n+2):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .product-master-tabs .btn:nth-child(6n+2):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .report-period .btn:nth-child(6n+2):not(.red):not(.danger):not(.is-current):not(.active){
  background:linear-gradient(135deg,#d8fbe8,#9ee8c4)!important;
  color:#064e3b!important;
  border-color:#61d6a4!important;
}
body:not(.print-body) .actionbar .btn:nth-child(6n+3):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .module-actions .btn:nth-child(6n+3):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .compact-action-panel .btn:nth-child(6n+3):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .product-master-tabs .btn:nth-child(6n+3):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .report-period .btn:nth-child(6n+3):not(.red):not(.danger):not(.is-current):not(.active){
  background:linear-gradient(135deg,#fff2bf,#ffd678)!important;
  color:#7a4306!important;
  border-color:#f2b64d!important;
}
body:not(.print-body) .actionbar .btn:nth-child(6n+4):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .module-actions .btn:nth-child(6n+4):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .compact-action-panel .btn:nth-child(6n+4):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .product-master-tabs .btn:nth-child(6n+4):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .report-period .btn:nth-child(6n+4):not(.red):not(.danger):not(.is-current):not(.active){
  background:linear-gradient(135deg,#e0e7ff,#bdc9ff)!important;
  color:#25367a!important;
  border-color:#8da2f5!important;
}
body:not(.print-body) .actionbar .btn:nth-child(6n+5):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .module-actions .btn:nth-child(6n+5):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .compact-action-panel .btn:nth-child(6n+5):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .product-master-tabs .btn:nth-child(6n+5):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .report-period .btn:nth-child(6n+5):not(.red):not(.danger):not(.is-current):not(.active){
  background:linear-gradient(135deg,#ffe1ec,#ffb8cf)!important;
  color:#8a1238!important;
  border-color:#f58aab!important;
}
body:not(.print-body) .actionbar .btn:nth-child(6n):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .module-actions .btn:nth-child(6n):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .compact-action-panel .btn:nth-child(6n):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .product-master-tabs .btn:nth-child(6n):not(.red):not(.danger):not(.is-current):not(.active),
body:not(.print-body) .report-period .btn:nth-child(6n):not(.red):not(.danger):not(.is-current):not(.active){
  background:linear-gradient(135deg,#ede9fe,#cfc2ff)!important;
  color:#4c1d95!important;
  border-color:#a78bfa!important;
}
body:not(.print-body) .btn:not(.red):not(.danger) kbd{
  color:#0f172a!important;
  background:rgba(255,255,255,.82)!important;
  border-color:rgba(15,23,42,.12)!important;
}

/* Desplegables y busquedas con tonalidades leves para mejor lectura. */
body:not(.print-body) .search-results.has-results,
body:not(.print-body) .client-results,
body:not(.print-body) .purchase-search-results,
body:not(.print-body) .held-sales-list,
body:not(.print-body) .notifications-menu,
body:not(.print-body) .user-menu-panel{
  background:linear-gradient(180deg,rgba(246,251,255,.98),rgba(234,247,255,.98))!important;
  border-color:#b9dcf5!important;
  box-shadow:0 16px 34px rgba(8,49,82,.14)!important;
}
body:not(.print-body) .search-result-head{
  background:linear-gradient(90deg,#eaf4ff,#d9f1ff)!important;
  color:#073b73!important;
  border-bottom:1px solid #c5e3f8!important;
}
body:not(.print-body) .search-result:nth-child(6n+1),
body:not(.print-body) .client-result:nth-child(6n+1),
body:not(.print-body) .purchase-result-row:nth-child(6n+1),
body:not(.print-body) .held-sale-item:nth-child(6n+1),
body:not(.print-body) .user-menu-panel a:nth-child(6n+1){
  background:linear-gradient(90deg,#f0f8ff,#ffffff)!important;
  border-color:#c9e5fb!important;
}
body:not(.print-body) .search-result:nth-child(6n+2),
body:not(.print-body) .client-result:nth-child(6n+2),
body:not(.print-body) .purchase-result-row:nth-child(6n+2),
body:not(.print-body) .held-sale-item:nth-child(6n+2),
body:not(.print-body) .user-menu-panel a:nth-child(6n+2){
  background:linear-gradient(90deg,#effdf6,#ffffff)!important;
  border-color:#c7efd9!important;
}
body:not(.print-body) .search-result:nth-child(6n+3),
body:not(.print-body) .client-result:nth-child(6n+3),
body:not(.print-body) .purchase-result-row:nth-child(6n+3),
body:not(.print-body) .held-sale-item:nth-child(6n+3),
body:not(.print-body) .user-menu-panel a:nth-child(6n+3){
  background:linear-gradient(90deg,#fff9eb,#ffffff)!important;
  border-color:#f5dfac!important;
}
body:not(.print-body) .search-result:nth-child(6n+4),
body:not(.print-body) .client-result:nth-child(6n+4),
body:not(.print-body) .purchase-result-row:nth-child(6n+4),
body:not(.print-body) .held-sale-item:nth-child(6n+4),
body:not(.print-body) .user-menu-panel a:nth-child(6n+4){
  background:linear-gradient(90deg,#f3f5ff,#ffffff)!important;
  border-color:#d6ddff!important;
}
body:not(.print-body) .search-result:nth-child(6n+5),
body:not(.print-body) .client-result:nth-child(6n+5),
body:not(.print-body) .purchase-result-row:nth-child(6n+5),
body:not(.print-body) .held-sale-item:nth-child(6n+5),
body:not(.print-body) .user-menu-panel a:nth-child(6n+5){
  background:linear-gradient(90deg,#fff3f7,#ffffff)!important;
  border-color:#f8cedb!important;
}
body:not(.print-body) .search-result:nth-child(6n),
body:not(.print-body) .client-result:nth-child(6n),
body:not(.print-body) .purchase-result-row:nth-child(6n),
body:not(.print-body) .held-sale-item:nth-child(6n),
body:not(.print-body) .user-menu-panel a:nth-child(6n){
  background:linear-gradient(90deg,#f6f3ff,#ffffff)!important;
  border-color:#ded6ff!important;
}
body:not(.print-body) .search-result:hover,
body:not(.print-body) .client-result:hover,
body:not(.print-body) .client-result.active,
body:not(.print-body) .purchase-result-row:hover,
body:not(.print-body) .purchase-result-row.active,
body:not(.print-body) .held-sale-item:hover,
body:not(.print-body) .user-menu-panel a:hover{
  background:linear-gradient(90deg,#e9f5fc,#fbfdff)!important;
  border-color:#9fcce4!important;
  color:#073b73!important;
  box-shadow:inset 4px 0 0 #77b9db,0 8px 18px rgba(48,112,150,.08)!important;
}
body:not(.print-body) .search-result.active{
  background:linear-gradient(90deg,#fff8df,#fffdf4)!important;
  border-color:#e9bf58!important;
  color:#573b08!important;
  box-shadow:inset 4px 0 0 #d99517,0 8px 18px rgba(176,117,20,.10)!important;
}
body:not(.print-body) .notification-item:nth-of-type(6n+1){background:#f0f8ff!important}
body:not(.print-body) .notification-item:nth-of-type(6n+2){background:#effdf6!important}
body:not(.print-body) .notification-item:nth-of-type(6n+3){background:#fff9eb!important}
body:not(.print-body) .notification-item:nth-of-type(6n+4){background:#f3f5ff!important}
body:not(.print-body) .notification-item:nth-of-type(6n+5){background:#fff3f7!important}
body:not(.print-body) .notification-item:nth-of-type(6n){background:#f6f3ff!important}
body:not(.print-body) select,
body:not(.print-body) option{
  background-color:#f8fcff;
}

/* Acciones de impresion, tablas y facturacion por lotes: mismos tonos suaves. */
body:not(.print-body) table.table button:not(.red):not(.danger),
body:not(.print-body) table.report-table button:not(.red):not(.danger),
body:not(.print-body) .print-toolbar button:not(.red):not(.danger),
body:not(.print-body) .print-toolbar a:not(.red):not(.danger),
body:not(.print-body) .batch-toolbar button:not(.red):not(.danger),
body:not(.print-body) .batch-toolbar a:not(.red):not(.danger),
body:not(.print-body) .batch-actions button:not(.red):not(.danger),
body:not(.print-body) .batch-actions a:not(.red):not(.danger),
body:not(.print-body) .lote-actions button:not(.red):not(.danger),
body:not(.print-body) .lote-actions a:not(.red):not(.danger),
body:not(.print-body) [class*="lote"] button:not(.red):not(.danger),
body:not(.print-body) [class*="lote"] a.btn:not(.red):not(.danger){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:28px;
  border-radius:9px;
  padding:6px 9px;
  font-weight:900;
  text-decoration:none;
  border:1px solid #77bff0!important;
  background:linear-gradient(135deg,#d8ecff,#acd7ff)!important;
  color:#073b73!important;
  box-shadow:0 6px 14px rgba(12,102,190,.10)!important;
}
body:not(.print-body) table.table button:nth-of-type(6n+2):not(.red):not(.danger),
body:not(.print-body) table.report-table button:nth-of-type(6n+2):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] button:nth-of-type(6n+2):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] a.btn:nth-of-type(6n+2):not(.red):not(.danger){
  background:linear-gradient(135deg,#d8fbe8,#9ee8c4)!important;
  color:#064e3b!important;
  border-color:#61d6a4!important;
}
body:not(.print-body) table.table button:nth-of-type(6n+3):not(.red):not(.danger),
body:not(.print-body) table.report-table button:nth-of-type(6n+3):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] button:nth-of-type(6n+3):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] a.btn:nth-of-type(6n+3):not(.red):not(.danger){
  background:linear-gradient(135deg,#fff2bf,#ffd678)!important;
  color:#7a4306!important;
  border-color:#f2b64d!important;
}
body:not(.print-body) table.table button:nth-of-type(6n+4):not(.red):not(.danger),
body:not(.print-body) table.report-table button:nth-of-type(6n+4):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] button:nth-of-type(6n+4):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] a.btn:nth-of-type(6n+4):not(.red):not(.danger){
  background:linear-gradient(135deg,#e0e7ff,#bdc9ff)!important;
  color:#25367a!important;
  border-color:#8da2f5!important;
}
body:not(.print-body) table.table button:nth-of-type(6n+5):not(.red):not(.danger),
body:not(.print-body) table.report-table button:nth-of-type(6n+5):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] button:nth-of-type(6n+5):not(.red):not(.danger),
body:not(.print-body) [class*="lote"] a.btn:nth-of-type(6n+5):not(.red):not(.danger){
  background:linear-gradient(135deg,#ffe1ec,#ffb8cf)!important;
  color:#8a1238!important;
  border-color:#f58aab!important;
}

/* Restaurar prioridad de colores del punto de venta compacto. */
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(1),
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-speedbar .btn:nth-child(1){
  background:linear-gradient(90deg,#d8ecff,#acd7ff)!important;
  color:#073b73!important;
  border-color:#77bff0!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(2),
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-speedbar .btn:nth-child(2){
  background:linear-gradient(90deg,#d8fbe8,#9ee8c4)!important;
  color:#064e3b!important;
  border-color:#61d6a4!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(3),
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-speedbar .btn:nth-child(3){
  background:linear-gradient(90deg,#fff2bf,#ffd678)!important;
  color:#7a4306!important;
  border-color:#f2b64d!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(4),
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-speedbar .btn:nth-child(4){
  background:linear-gradient(90deg,#e0e7ff,#bdc9ff)!important;
  color:#25367a!important;
  border-color:#8da2f5!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(5),
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-speedbar .btn:nth-child(5){
  background:linear-gradient(90deg,#ffe1ec,#ffb8cf)!important;
  color:#8a1238!important;
  border-color:#f58aab!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(6),
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-speedbar .btn:nth-child(6){
  background:linear-gradient(90deg,#eefcf3,#ccefd8)!important;
  color:#14532d!important;
  border-color:#79d99b!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(7){
  background:linear-gradient(90deg,#ede9fe,#cfc2ff)!important;
  color:#4c1d95!important;
  border-color:#a78bfa!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-shortcuts .btn:nth-child(8){
  background:linear-gradient(90deg,#d9f3ff,#9bdcff)!important;
  color:#075985!important;
  border-color:#38bdf8!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-hold-save{
  background:linear-gradient(90deg,#e0f2fe,#bae6fd)!important;
  color:#075985!important;
  border-color:#38bdf8!important;
}
body:not(.print-body) .pos-sale-card.pos-compact-checkout .pos-hold-list-btn{
  background:linear-gradient(90deg,#f8fafc,#e2e8f0)!important;
  color:#334155!important;
  border-color:#cbd5e1!important;
}

/* FIX final estados: compacto real y sin doble aro, colocado al final para ganar prioridad. */
body:not(.print-body) table .status-pill,
body:not(.print-body) table .cxp-status-pill,
body:not(.print-body) .status-pill.status-paid,
body:not(.print-body) .status-pill.status-cxc,
body:not(.print-body) .status-pill.status-approved,
body:not(.print-body) .status-pill.status-pending,
body:not(.print-body) .status-pill.status-partial,
body:not(.print-body) .status-pill.status-canceled,
body:not(.print-body) .status-pill.status-rejected,
body:not(.print-body) .status-pill.status-expired,
body:not(.print-body) .cxp-status-pill.status-paid,
body:not(.print-body) .cxp-status-pill.status-cxc,
body:not(.print-body) .cxp-status-pill.status-approved,
body:not(.print-body) .cxp-status-pill.status-pending,
body:not(.print-body) .cxp-status-pill.status-partial,
body:not(.print-body) .cxp-status-pill.status-canceled,
body:not(.print-body) .cxp-status-pill.status-rejected,
body:not(.print-body) .cxp-status-pill.status-expired{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:17px!important;
  height:17px!important;
  padding:1px 7px!important;
  border-radius:8px!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:950!important;
  box-shadow:none!important;
  outline:none!important;
  background-clip:padding-box!important;
  white-space:nowrap!important;
}
body:not(.print-body) table td:has(> .status-pill),
body:not(.print-body) table td:has(> .cxp-status-pill){
  padding-top:3px!important;
  padding-bottom:3px!important;
}
body:not(.print-body) table .status-pill.status-paid,
body:not(.print-body) table .cxp-status-pill.status-paid{background:#e9fff1!important;color:#166534!important;border:1px solid #22c55e!important}
body:not(.print-body) table .status-pill.status-cxc,
body:not(.print-body) table .cxp-status-pill.status-cxc{background:#eaf4ff!important;color:#075985!important;border:1px solid #38bdf8!important}
body:not(.print-body) table .status-pill.status-approved,
body:not(.print-body) table .cxp-status-pill.status-approved{background:#e6fffa!important;color:#0f766e!important;border:1px solid #2dd4bf!important}
body:not(.print-body) table .status-pill.status-pending,
body:not(.print-body) table .cxp-status-pill.status-pending{background:#fff7db!important;color:#92400e!important;border:1px solid #f59e0b!important}
body:not(.print-body) table .status-pill.status-partial,
body:not(.print-body) table .cxp-status-pill.status-partial{background:#fff0df!important;color:#9a3412!important;border:1px solid #fb923c!important}
body:not(.print-body) table .status-pill.status-canceled,
body:not(.print-body) table .status-pill.status-rejected,
body:not(.print-body) table .cxp-status-pill.status-canceled,
body:not(.print-body) table .cxp-status-pill.status-rejected{background:#fff0f0!important;color:#991b1b!important;border:1px solid #ef4444!important}
body:not(.print-body) table .status-pill.status-expired,
body:not(.print-body) table .cxp-status-pill.status-expired{background:#f7edff!important;color:#6b21a8!important;border:1px solid #a855f7!important}

/* Caja: turnos y acciones diferenciados. */
body:not(.print-body) .cash-table .turn-badge{
  min-height:18px!important;
  height:18px!important;
  padding:2px 8px!important;
  border-radius:8px!important;
  font-size:10px!important;
  line-height:1!important;
  border:1px solid #77bff0!important;
  box-shadow:none!important;
  white-space:nowrap!important;
}
body:not(.print-body) .cash-table .turn-badge.turn-manana,
body:not(.print-body) .cash-table .turn-badge.turn-mañana{
  background:#d8ecff!important;
  color:#073b73!important;
  border-color:#77bff0!important;
}
body:not(.print-body) .cash-table .turn-badge.turn-tarde{
  background:#fff2bf!important;
  color:#7a4306!important;
  border-color:#f2b64d!important;
}
body:not(.print-body) .cash-table .turn-badge.turn-turno-libre{
  background:#d8fbe8!important;
  color:#064e3b!important;
  border-color:#61d6a4!important;
}
body:not(.print-body) .cash-table .turn-badge.turn-turno-completo{
  background:#ede9fe!important;
  color:#4c1d95!important;
  border-color:#a78bfa!important;
}
body:not(.print-body) .cash-table td .btn.mini{
  min-height:22px!important;
  padding:4px 8px!important;
  border-radius:8px!important;
  font-size:10px!important;
}

/* FIX definitivo: estados sin bordes externos ni "orejas" laterales. */
body:not(.print-body) table .status-pill,
body:not(.print-body) table .cxp-status-pill{
  --status-bg:#eef7ff;
  --status-fg:#073b73;
  --status-accent:#38bdf8;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:18px!important;
  min-height:18px!important;
  padding:2px 7px 2px 9px!important;
  border:0!important;
  border-radius:5px!important;
  outline:0!important;
  box-shadow:inset 3px 0 0 var(--status-accent)!important;
  background:var(--status-bg)!important;
  color:var(--status-fg)!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:950!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
body:not(.print-body) table .status-pill::before,
body:not(.print-body) table .status-pill::after,
body:not(.print-body) table .cxp-status-pill::before,
body:not(.print-body) table .cxp-status-pill::after{
  content:none!important;
  display:none!important;
}
body:not(.print-body) table .status-pill.status-paid,
body:not(.print-body) table .cxp-status-pill.status-paid{--status-bg:#e9fff1;--status-fg:#166534;--status-accent:#22c55e}
body:not(.print-body) table .status-pill.status-cxc,
body:not(.print-body) table .cxp-status-pill.status-cxc{--status-bg:#eaf4ff;--status-fg:#075985;--status-accent:#38bdf8}
body:not(.print-body) table .status-pill.status-approved,
body:not(.print-body) table .cxp-status-pill.status-approved{--status-bg:#e6fffa;--status-fg:#0f766e;--status-accent:#2dd4bf}
body:not(.print-body) table .status-pill.status-pending,
body:not(.print-body) table .cxp-status-pill.status-pending{--status-bg:#fff7db;--status-fg:#92400e;--status-accent:#f59e0b}
body:not(.print-body) table .status-pill.status-partial,
body:not(.print-body) table .cxp-status-pill.status-partial{--status-bg:#fff0df;--status-fg:#9a3412;--status-accent:#fb923c}
body:not(.print-body) table .status-pill.status-canceled,
body:not(.print-body) table .status-pill.status-rejected,
body:not(.print-body) table .cxp-status-pill.status-canceled,
body:not(.print-body) table .cxp-status-pill.status-rejected{--status-bg:#fff0f0;--status-fg:#991b1b;--status-accent:#ef4444}
body:not(.print-body) table .status-pill.status-expired,
body:not(.print-body) table .cxp-status-pill.status-expired{--status-bg:#f7edff;--status-fg:#6b21a8;--status-accent:#a855f7}
body:not(.print-body) table .status-pill.status-open,
body:not(.print-body) table .cxp-status-pill.status-open{--status-bg:#e0f2fe;--status-fg:#075985;--status-accent:#0ea5e9}
body:not(.print-body) table .status-pill.status-closed,
body:not(.print-body) table .cxp-status-pill.status-closed{--status-bg:#edf2f7;--status-fg:#334155;--status-accent:#94a3b8}

/* Facturas: estado y acciones con formato consistente de tabla. */
body:not(.print-body) #facturas-table td{
  vertical-align:middle!important;
}
body:not(.print-body) #facturas-table .factura-status{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:76px!important;
  height:20px!important;
  padding:2px 8px!important;
  border:0!important;
  border-radius:6px!important;
  box-shadow:inset 3px 0 0 var(--status-accent)!important;
  background:var(--status-bg,#eef7ff)!important;
  color:var(--status-fg,#073b73)!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:950!important;
  text-align:center!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell{
  display:table-cell!important;
  vertical-align:middle!important;
  text-align:center!important;
  font-size:11px!important;
  font-weight:950!important;
  padding:8px 10px!important;
  border-left:0!important;
  box-shadow:none!important;
  background:inherit!important;
  border-radius:0!important;
  min-height:0!important;
  height:auto!important;
  outline:0!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell b{
  display:block!important;
  width:100%!important;
  min-width:82px!important;
  padding:4px 6px!important;
  border-radius:6px!important;
  line-height:1!important;
  box-shadow:none!important;
  border:0!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell.estado-pagada b,
body:not(.print-body) #facturas-table td.factura-status-cell.estado-pagado b{
  background:#e9fff1!important;
  color:#166534!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell.estado-credito--cxc b,
body:not(.print-body) #facturas-table td.factura-status-cell.estado-creditocxc b,
body:not(.print-body) #facturas-table td.factura-status-cell.estado-cxc b{
  background:#eaf4ff!important;
  color:#075985!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell.estado-aprobada b,
body:not(.print-body) #facturas-table td.factura-status-cell.estado-aprobado b{
  background:#e6fffa!important;
  color:#0f766e!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell.estado-pendiente b{
  background:#fff7db!important;
  color:#92400e!important;
}
body:not(.print-body) #facturas-table td.factura-status-cell.estado-cancelada b,
body:not(.print-body) #facturas-table td.factura-status-cell.estado-cancelado b{
  background:#fff0f0!important;
  color:#991b1b!important;
}
body:not(.print-body) #facturas-table td:last-child{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  flex-wrap:wrap!important;
}
body:not(.print-body) #facturas-table td:last-child .btn.mini{
  min-height:22px!important;
  height:22px!important;
  padding:4px 8px!important;
  border-radius:7px!important;
  font-size:10px!important;
  line-height:1!important;
}

/* Menu de usuario: colores legibles y cerrar sesion visible. */
body:not(.print-body) .user-menu-panel{
  background:rgba(247,252,255,.98)!important;
  border:1px solid #b9dcf5!important;
  box-shadow:0 18px 38px rgba(8,49,82,.16)!important;
}
body:not(.print-body) .user-menu-panel a{
  color:#073b73!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  text-decoration:none!important;
}
body:not(.print-body) .user-menu-panel a:nth-child(1){
  background:linear-gradient(90deg,#d8ecff,#f7fcff)!important;
  border-color:#b7dcf7!important;
}
body:not(.print-body) .user-menu-panel a:nth-child(2){
  background:linear-gradient(90deg,#d8fbe8,#fbfffd)!important;
  color:#064e3b!important;
  border-color:#b5eccc!important;
}
body:not(.print-body) .user-menu-panel a:nth-child(3){
  background:linear-gradient(90deg,#fff2bf,#fffdf5)!important;
  color:#7a4306!important;
  border-color:#efd58c!important;
}
body:not(.print-body) .user-menu-panel a:hover{
  filter:saturate(1.08) brightness(.99)!important;
  transform:none!important;
}
body:not(.print-body) .user-menu-panel a.danger,
body:not(.print-body) .user-menu-panel a[href*="logout"],
body:not(.print-body) .user-menu-panel a[href*="salir"]{
  margin-top:6px!important;
  background:linear-gradient(90deg,#ffe1ec,#ff9fb9)!important;
  color:#8a1238!important;
  border:1px solid #f58aab!important;
  font-weight:950!important;
  opacity:1!important;
}

/* Facturas: colores reales por accion, al final para no ser pisados por tablas. */
body:not(.print-body) #facturas-table td:last-child a.btn.mini{
  border-width:1px!important;
  border-style:solid!important;
  box-shadow:0 6px 14px rgba(12,102,190,.10)!important;
}
body:not(.print-body) #facturas-table td:last-child a.btn.mini:nth-child(1){
  background:linear-gradient(135deg,#d8ecff,#acd7ff)!important;
  color:#073b73!important;
  border-color:#77bff0!important;
}
body:not(.print-body) #facturas-table td:last-child a.btn.mini:nth-child(2){
  background:linear-gradient(135deg,#fff2bf,#ffd678)!important;
  color:#7a4306!important;
  border-color:#f2b64d!important;
}
body:not(.print-body) #facturas-table td:last-child a.btn.mini:nth-child(3){
  background:linear-gradient(135deg,#d9f3ff,#9bdcff)!important;
  color:#075985!important;
  border-color:#38bdf8!important;
}
body:not(.print-body) #facturas-table td:last-child a.btn.mini:nth-child(4){
  background:linear-gradient(135deg,#e0e7ff,#bdc9ff)!important;
  color:#25367a!important;
  border-color:#8da2f5!important;
}
.client-advanced{background:linear-gradient(135deg,rgba(126,157,190,.13),rgba(255,255,255,.94))}
.client-advanced summary{cursor:pointer;padding:2px 0 6px}
.client-note-field{grid-column:span 2}
.client-form-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.client-route-form{display:grid;grid-template-columns:180px minmax(260px,1fr) minmax(260px,1fr) auto;gap:10px;align-items:end;margin-bottom:14px;padding:12px;border-radius:14px;background:linear-gradient(135deg,rgba(37,144,236,.12),rgba(19,178,135,.10))}
.route-zone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.route-zone-column{border:1px solid rgba(9,85,170,.16);border-radius:14px;padding:12px;background:rgba(255,255,255,.78)}
.route-zone-column h3{margin:0 0 10px;color:#0b3765;font-size:16px}
.route-zone-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid rgba(9,85,170,.10)}
.route-zone-item:last-child{border-bottom:0}
.route-zone-item b{display:block;color:#10243d;font-size:14px}
.route-zone-item small{display:block;color:#5f728a;font-weight:800;margin-top:2px}
@media(max-width:1200px){.client-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.client-route-form,.route-zone-grid{grid-template-columns:1fr}}
@media(max-width:700px){.client-form-grid{grid-template-columns:1fr}.client-note-field{grid-column:auto}}

