:root{--bg:#f3f5f8;--surface:#fff;--surface-2:#f8fafc;--ink:#171b24;--muted:#667085;--line:#e3e8ef;--gold:#b88a2e;--gold-2:#e3be65;--nav:#11151d;--nav2:#1a202b;--green:#17865d;--red:#bf3d4c;--blue:#2867c8;--shadow:0 12px 34px rgba(16,24,40,.08);--radius:16px}
body.dark{--bg:#0d1118;--surface:#151b24;--surface-2:#1b2330;--ink:#f1f5f9;--muted:#aab4c4;--line:#2a3544;--shadow:0 12px 34px rgba(0,0,0,.32)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}.hidden{display:none!important}.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800;color:var(--gold)}
.login-screen{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr;background:#0a0d12}.login-brand{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:70px;color:#fff;background:radial-gradient(circle at 35% 30%,#293140 0,#131923 36%,#090c11 70%)}.brand-glow{position:absolute;width:420px;height:420px;border-radius:50%;background:rgba(202,155,57,.17);filter:blur(90px)}.login-logo{position:relative;width:min(600px,80%);filter:invert(1) sepia(.15) saturate(1.2);margin-bottom:24px}.login-brand p{position:relative;font-size:20px;color:#bfc7d4;text-align:center}.login-features{position:relative;display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.login-features span{border:1px solid #394252;background:#161c26;padding:9px 14px;border-radius:999px;font-size:13px}.login-panel{display:flex;align-items:center;justify-content:center;background:#f5f6f8;padding:40px}.login-card{width:min(430px,100%);background:#fff;border-radius:22px;padding:42px;box-shadow:0 25px 80px rgba(0,0,0,.2)}.login-card h1{font-size:38px;margin:8px 0}.login-card p{color:#667085;margin:0 0 28px}.login-card label{display:grid;gap:8px;font-size:13px;font-weight:700;margin:16px 0}.login-card input{padding:13px 14px;border:1px solid #d8dde6;border-radius:11px}.login-card small{display:block;text-align:center;color:#98a2b3;margin-top:14px}
.app{min-height:100vh;display:grid;grid-template-columns:268px 1fr}.sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,var(--nav),#0c1016);color:#d9e0ea;padding:16px 12px;display:flex;flex-direction:column;z-index:5}.sidebar-brand{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #29303b;padding:6px 8px 14px}.sidebar-brand img{width:178px;filter:invert(1);max-height:56px;object-fit:contain}.sidebar .icon-btn{color:#fff;border-color:#303846}.nav{padding:14px 0;overflow:auto;flex:1}.nav-group{font-size:10px;letter-spacing:.14em;color:#718096;padding:16px 14px 7px;font-weight:800}.nav button{width:100%;display:flex;align-items:center;gap:12px;border:0;background:transparent;color:#aeb8c7;padding:11px 14px;border-radius:10px;text-align:left;cursor:pointer;margin:2px 0}.nav button:hover,.nav button.active{background:linear-gradient(90deg,rgba(184,138,46,.24),rgba(184,138,46,.06));color:#fff}.nav button.active{box-shadow:inset 3px 0 var(--gold-2)}.nav .icon{font-size:17px;width:20px;text-align:center}.sidebar-footer{border-top:1px solid #29303b;padding:14px 8px}.user-chip{display:flex;gap:10px;align-items:center}.avatar{width:37px;height:37px;border-radius:11px;background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#15100a;display:grid;place-items:center;font-weight:900}.user-chip div:last-child{display:grid}.user-chip strong{font-size:13px}.user-chip small{color:#818c9c}.text-btn{border:0;background:none;color:#8d98a8;padding:10px 0;cursor:pointer}.main{min-width:0}.topbar{height:92px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:18px 30px;position:sticky;top:0;z-index:4}.topbar h1{font-size:25px;margin:3px 0}.top-actions{display:flex;align-items:center;gap:10px}.search{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--line);padding:9px 12px;border-radius:11px}.search input{border:0;outline:0;background:transparent;color:var(--ink);width:260px}.icon-btn{border:1px solid var(--line);background:var(--surface);color:var(--ink);width:40px;height:40px;border-radius:10px;cursor:pointer}.notification{position:relative}.notification i{position:absolute;right:-3px;top:-5px;background:var(--red);color:#fff;border-radius:20px;font-size:10px;padding:2px 5px;font-style:normal}.btn{border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:10px 15px;font-weight:750;cursor:pointer;color:var(--ink)}.btn.primary{background:linear-gradient(135deg,#9e741f,var(--gold-2));border:0;color:#15110a;box-shadow:0 7px 17px rgba(184,138,46,.24)}.btn.danger{color:#fff;background:var(--red);border:0}.btn.full{width:100%}.content{padding:26px 30px 50px}.grid{display:grid;gap:18px}.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.kpi{padding:20px}.kpi-top{display:flex;justify-content:space-between;align-items:start}.kpi-icon{width:42px;height:42px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;font-size:20px}.kpi small{color:var(--muted)}.kpi h3{font-size:27px;margin:12px 0 3px}.trend{font-size:12px;font-weight:800}.up{color:var(--green)}.down{color:var(--red)}.dashboard-grid{grid-template-columns:1.55fr .9fr;margin-top:18px}.card-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}.card-head h2{font-size:16px;margin:0}.card-body{padding:20px}.chart{height:275px;position:relative}.chart-bars{position:absolute;inset:25px 10px 30px 35px;display:flex;align-items:flex-end;gap:14px;border-bottom:1px solid var(--line)}.bar-group{flex:1;height:100%;display:flex;align-items:flex-end;gap:3px;position:relative}.bar{flex:1;border-radius:6px 6px 0 0;background:linear-gradient(180deg,var(--gold-2),var(--gold));min-height:6px}.bar.alt{background:linear-gradient(180deg,#7187a9,#34455e)}.bar-label{position:absolute;bottom:-25px;left:0;right:0;text-align:center;font-size:11px;color:var(--muted)}.activity{display:grid;gap:14px}.activity-item{display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:center}.activity-dot{width:34px;height:34px;border-radius:10px;background:var(--surface-2);display:grid;place-items:center}.activity-item p{margin:0;font-size:13px}.activity-item small{color:var(--muted)}.progress{height:7px;background:var(--surface-2);border-radius:99px;overflow:hidden}.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--gold-2));border-radius:99px}.module-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}.module-head h2{margin:0;font-size:20px}.module-head p{margin:4px 0 0;color:var(--muted)}.toolbar{display:flex;gap:8px;flex-wrap:wrap}.filter{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:10px;border-radius:10px}.table-card{overflow:hidden}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:860px}.data-table th{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);text-align:left;background:var(--surface-2);padding:13px 15px;border-bottom:1px solid var(--line)}.data-table td{padding:14px 15px;border-bottom:1px solid var(--line);font-size:13px}.data-table tr:hover td{background:rgba(184,138,46,.035)}.status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;background:#edf2f7}.status.ok{background:#e6f5ef;color:#14704f}.status.warn{background:#fff4da;color:#946a12}.status.bad{background:#fde8eb;color:#a72e3d}.status.info{background:#e8f0fd;color:#245aa9}.amount{text-align:right;font-variant-numeric:tabular-nums;font-weight:750}.split{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.form-grid .wide{grid-column:1/-1}.form-grid label{display:grid;gap:7px;font-size:12px;font-weight:800;color:var(--muted)}.form-grid input,.form-grid select,.form-grid textarea{border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:var(--surface);color:var(--ink)}.accounting-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mini-stat{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:14px}.mini-stat small{color:var(--muted)}.mini-stat strong{display:block;font-size:18px;margin-top:4px}.production-board{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.kanban{background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:12px;min-height:390px}.kanban h3{font-size:13px;margin:3px 3px 12px;display:flex;justify-content:space-between}.job{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:13px;margin:9px 0;box-shadow:0 5px 14px rgba(16,24,40,.05)}.job strong{font-size:13px}.job p{font-size:12px;color:var(--muted);margin:7px 0}.job-foot{display:flex;justify-content:space-between;font-size:11px}.modal{position:fixed;inset:0;background:rgba(4,8,14,.64);display:grid;place-items:center;padding:20px;z-index:20}.modal-card{width:min(760px,100%);max-height:90vh;overflow:auto;background:var(--surface);border-radius:18px;box-shadow:0 30px 100px rgba(0,0,0,.35)}.modal-head{display:flex;justify-content:space-between;padding:21px 24px;border-bottom:1px solid var(--line)}.modal-head h2{margin:4px 0 0}.modal-body{padding:22px}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.toast{position:fixed;right:24px;bottom:24px;background:#17221d;color:#fff;padding:13px 18px;border-radius:11px;box-shadow:var(--shadow);transform:translateY(100px);opacity:0;transition:.25s;z-index:30}.toast.show{transform:translateY(0);opacity:1}.empty{text-align:center;padding:45px;color:var(--muted)}
@media(max-width:1150px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.split{grid-template-columns:1fr}.production-board{grid-template-columns:repeat(2,1fr)}.search{display:none}}
@media(max-width:760px){.app{grid-template-columns:1fr}.sidebar{position:fixed;width:268px;transform:translateX(-100%);transition:.25s}.sidebar.open{transform:translateX(0)}.topbar{padding:14px 16px}.topbar h1{font-size:19px}.content{padding:18px 14px}.kpi-grid{grid-template-columns:1fr}.production-board{grid-template-columns:1fr}.top-actions .notification{display:none}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.login-screen{grid-template-columns:1fr}.login-brand{display:none}.login-panel{min-height:100vh;padding:18px}.accounting-summary{grid-template-columns:1fr}}

/* ===== Tema corporativo claro V101 ===== */
:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f5f5f5;
  --ink:#111111;
  --muted:#666666;
  --line:#d9d9d9;
  --gold:#444444;
  --gold-2:#222222;
  --nav:#ffffff;
  --nav2:#f5f5f5;
  --green:#26734d;
  --red:#a8323e;
  --blue:#3f5f86;
  --shadow:0 4px 14px rgba(0,0,0,.06);
  --radius:10px;
}
body,body.dark{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f5f5f5;
  --ink:#111111;
  --muted:#666666;
  --line:#d9d9d9;
  --shadow:0 4px 14px rgba(0,0,0,.06);
  background:#ffffff;
  color:#111111;
}
body,button,input,select,textarea{
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;
  font-weight:400;
}
strong,b,.btn,.form-grid label,.login-card label,.data-table th,.eyebrow,.nav-group,.trend,.amount,.avatar{
  font-weight:400;
}
.eyebrow{
  color:#555;
  letter-spacing:.04em;
  font-size:12px;
}
.login-screen{
  grid-template-columns:1fr 1fr;
  background:#fff;
}
.login-brand{
  color:#111;
  background:#fff;
  border-right:1px solid #ddd;
}
.brand-glow{display:none}
.login-logo{
  filter:none;
  width:min(620px,82%);
}
.login-brand p{color:#555;font-size:18px}
.login-features span{
  color:#333;
  border:1px solid #ccc;
  background:#f7f7f7;
  border-radius:6px;
}
.login-panel{background:#f5f5f5}
.login-card{
  border:1px solid #ddd;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
.login-card h1{font-weight:400;font-size:34px}
.login-card p,.login-card small{color:#666}
.login-card input{border-radius:6px;border-color:#cfcfcf;background:#fff;color:#111}
.app{grid-template-columns:250px 1fr;background:#fff}
.sidebar{
  background:#fff;
  color:#111;
  border-right:1px solid #d9d9d9;
  padding:14px 10px;
}
.sidebar-brand{border-bottom:1px solid #ddd}
.sidebar-brand img{filter:none;width:185px}
.sidebar .icon-btn{color:#222;border-color:#ccc;background:#fff}
.nav-group{color:#777;letter-spacing:.05em}
.nav button{
  color:#444;
  border-radius:6px;
  font-weight:400;
}
.nav button:hover,.nav button.active{
  background:#efefef;
  color:#111;
}
.nav button.active{
  box-shadow:inset 3px 0 #333;
}
.sidebar-footer{border-top:1px solid #ddd}
.avatar{background:#e5e5e5;color:#111;border:1px solid #ccc}
.user-chip small,.text-btn{color:#666}
.topbar{
  height:82px;
  background:#fff;
  border-bottom:1px solid #ddd;
  padding:16px 26px;
}
.topbar h1{font-weight:400}
.search{background:#f7f7f7;border-color:#d6d6d6;border-radius:6px}
.icon-btn,.btn,.filter{
  border-radius:6px;
  background:#fff;
  color:#222;
  border-color:#cfcfcf;
  box-shadow:none;
}
.btn.primary{
  background:#222;
  color:#fff;
  border:1px solid #222;
  box-shadow:none;
}
.btn.primary:hover{background:#444}
.btn.danger{background:#555;color:#fff}
.card{
  border-radius:8px;
  border:1px solid #ddd;
  box-shadow:none;
}
.kpi-icon,.activity-dot,.mini-stat,.kanban,.progress{
  background:#f3f3f3;
}
.kpi h3,.mini-stat strong,.card-head h2,.module-head h2{font-weight:400}
.bar{background:#333}
.bar.alt{background:#999}
.progress i{background:#555}
.data-table th{
  background:#f3f3f3;
  color:#555;
  letter-spacing:.02em;
}
.data-table td{color:#222}
.data-table tr:hover td{background:#f8f8f8}
.status{border-radius:5px;font-weight:400;background:#eee;color:#333}
.status.ok{background:#edf3ef;color:#285c43}
.status.warn{background:#f4f1e8;color:#6b5a2b}
.status.bad{background:#f4eaea;color:#7d3338}
.status.info{background:#eceff3;color:#40546d}
.form-grid label{color:#555}
.form-grid input,.form-grid select,.form-grid textarea{
  border-radius:6px;
  background:#fff;
  color:#111;
  border-color:#ccc;
}
.job{border-radius:6px;box-shadow:none}
.modal{background:rgba(0,0,0,.35)}
.modal-card{border-radius:10px;border:1px solid #ccc;box-shadow:0 12px 32px rgba(0,0,0,.16)}
.toast{background:#222;color:#fff;border-radius:6px}
#themeBtn{display:none}
@media(max-width:760px){
  .sidebar{background:#fff}
  .login-panel{background:#f5f5f5}
}

/* Sidebar sin iconos */
.nav button{gap:0;padding-left:16px}
.nav .icon{display:none!important}
.sidebar-toggle-text{
  border:0;
  background:transparent;
  color:#555;
  padding:8px 4px;
  font:inherit;
  font-size:12px;
  font-weight:400;
  cursor:pointer;
}
.sidebar-toggle-text:hover{color:#111;text-decoration:underline}

/* ===== Estilo clásico V103 ===== */
:root,
body,
body.dark{
  --bg:#f4f0e8;
  --surface:#fffdf8;
  --surface-2:#eee8dd;
  --ink:#1f1d1a;
  --muted:#6d675f;
  --line:#cfc5b7;
  --gold:#8a6a32;
  --gold-2:#b08a45;
  --nav:#2b2926;
  --nav2:#36322e;
  --green:#486b55;
  --red:#8b3e3e;
  --blue:#4c6073;
  --shadow:0 3px 10px rgba(45,38,30,.08);
  --radius:3px;
}
body,button,input,select,textarea{
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
}
body{background:var(--bg);color:var(--ink)}
.eyebrow,.nav-group,.data-table th,.login-card label,.form-grid label{
  font-family:Arial,"Helvetica Neue",sans-serif;
  font-weight:400;
  letter-spacing:.08em;
}
.login-screen{background:#ece6dc;grid-template-columns:1.05fr .95fr}
.login-brand{
  background:#f8f4ec;
  color:#211f1c;
  border-right:1px solid #bfb4a4;
}
.login-brand:before{
  content:"";
  position:absolute;
  inset:22px;
  border:1px solid rgba(138,106,50,.35);
  pointer-events:none;
}
.login-logo{filter:none;width:min(610px,78%)}
.login-brand p{color:#5e584f;font-family:Georgia,"Times New Roman",serif}
.login-features span{
  background:transparent;
  border:1px solid #b8aa96;
  border-radius:2px;
  color:#4d473f;
  font-family:Arial,"Helvetica Neue",sans-serif;
}
.login-panel{background:#ece6dc}
.login-card{
  background:#fffdf8;
  border:1px solid #bfb4a4;
  border-radius:2px;
  box-shadow:0 14px 34px rgba(54,46,36,.14);
}
.login-card h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;letter-spacing:.01em}
.login-card input{border-radius:2px;border-color:#bfb4a4;background:#fffefb}
.app{grid-template-columns:252px 1fr;background:var(--bg)}
.sidebar{
  background:#2b2926;
  color:#f2ede4;
  border-right:1px solid #191816;
}
.sidebar-brand{border-bottom:1px solid #514b43}
.sidebar-brand img{filter:brightness(0) invert(1);opacity:.94}
.sidebar .icon-btn{color:#f2ede4;border-color:#6b6258;background:transparent}
.nav-group{color:#b9ad9d}
.nav button{
  color:#ded6ca;
  border-radius:0;
  border-bottom:1px solid transparent;
  padding-top:12px;
  padding-bottom:12px;
}
.nav button:hover,.nav button.active{
  background:#3a3631;
  color:#fffaf1;
}
.nav button.active{
  box-shadow:inset 3px 0 #b08a45;
  border-bottom-color:#4f4942;
}
.sidebar-footer{border-top:1px solid #514b43}
.avatar{background:#b08a45;color:#201b14;border:0;border-radius:50%}
.user-chip small,.text-btn{color:#b9ad9d}
.topbar{
  height:86px;
  background:#fffdf8;
  border-bottom:1px solid #cfc5b7;
}
.topbar h1,.module-head h2,.card-head h2,.kpi h3,.mini-stat strong{
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
}
.search,.icon-btn,.btn,.filter{
  border-radius:2px;
  border-color:#bfb4a4;
}
.search{background:#f5f0e7}
.btn{font-family:Arial,"Helvetica Neue",sans-serif;font-weight:400}
.btn.primary{
  background:#2f2c28;
  color:#fffaf2;
  border:1px solid #2f2c28;
}
.btn.primary:hover{background:#48423b}
.btn.danger{background:#7d3b3b}
.content{background:var(--bg)}
.card{
  background:#fffdf8;
  border:1px solid #cfc5b7;
  border-radius:2px;
  box-shadow:var(--shadow);
}
.card-head{border-bottom-color:#cfc5b7;background:#f8f4ed}
.kpi{position:relative}
.kpi:after{
  content:"";
  position:absolute;
  left:20px;
  right:20px;
  bottom:0;
  height:2px;
  background:#b08a45;
  opacity:.55;
}
.kpi-icon,.activity-dot,.mini-stat,.kanban,.progress{background:#eee8dd;border-radius:2px}
.bar{background:#8a6a32;border-radius:0}
.bar.alt{background:#6e6a64}
.progress i{background:#8a6a32}
.data-table{font-family:Arial,"Helvetica Neue",sans-serif}
.data-table th{
  background:#e9e2d7;
  color:#4e4840;
  border-bottom:1px solid #bfb4a4;
}
.data-table td{color:#27231f;border-bottom-color:#ddd3c6}
.data-table tr:hover td{background:#f5f0e8}
.status{border-radius:2px;border:1px solid currentColor;background:transparent}
.status.ok{background:#edf1ec;color:#42604b}
.status.warn{background:#f4eedf;color:#7b632f}
.status.bad{background:#f4e9e7;color:#7d3b3b}
.status.info{background:#e9edf0;color:#465a69}
.form-grid input,.form-grid select,.form-grid textarea{
  border-radius:2px;
  border-color:#bfb4a4;
  background:#fffefb;
}
.job,.kanban,.mini-stat{border-radius:2px}
.modal-card{border-radius:2px;border:1px solid #a99c8b;background:#fffdf8}
.toast{border-radius:2px;background:#2f2c28}
.sidebar-toggle-text{color:#c8bdaf;font-family:Arial,"Helvetica Neue",sans-serif}
.sidebar-toggle-text:hover{color:#fffaf1}
@media(max-width:760px){
  .sidebar{background:#2b2926}
  .login-panel{background:#ece6dc}
}

/* ===== Paleta crema sencilla V105 ===== */
:root,
body,
body.dark{
  --bg:#f7f1e7;
  --surface:#fffdf8;
  --surface-2:#f1eadf;
  --ink:#25221e;
  --muted:#756f67;
  --line:#d9d0c3;
  --gold:#8a7860;
  --gold-2:#a9977f;
  --nav:#f3ecdf;
  --nav2:#ece3d5;
  --green:#55705e;
  --red:#8a4d4d;
  --blue:#607080;
  --shadow:none;
  --radius:6px;
}
body,button,input,select,textarea{
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;
  font-weight:400;
}
body{background:var(--bg);color:var(--ink)}
strong,b,.btn,.form-grid label,.login-card label,.data-table th,.eyebrow,.nav-group,.trend,.amount,.avatar{
  font-weight:400;
}
.eyebrow{color:#857b70;letter-spacing:.04em;font-size:11px}
.login-screen{grid-template-columns:1fr 1fr;background:#f7f1e7}
.login-brand{
  background:#fffdf8;
  color:#25221e;
  border-right:1px solid #d9d0c3;
}
.login-brand:before,.brand-glow{display:none!important}
.login-logo{filter:none;width:min(590px,78%)}
.login-brand p{color:#756f67;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:17px}
.login-features span{
  background:#f3ecdf;
  border:1px solid #d9d0c3;
  border-radius:5px;
  color:#5f584f;
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;
}
.login-panel{background:#f1eadf}
.login-card{
  background:#fffdf8;
  border:1px solid #d9d0c3;
  border-radius:8px;
  box-shadow:none;
  padding:36px;
}
.login-card h1{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:32px;font-weight:400}
.login-card input{border-radius:5px;border-color:#cec3b4;background:#fffdf8}
.app{grid-template-columns:240px 1fr;background:#f7f1e7}
.sidebar{
  background:#f3ecdf;
  color:#302c27;
  border-right:1px solid #d9d0c3;
  padding:12px 10px;
}
.sidebar-brand{border-bottom:1px solid #d9d0c3}
.sidebar-brand img{filter:none;opacity:1;width:180px}
.sidebar .icon-btn{color:#4d463f;border-color:#cfc4b5;background:#fffaf2}
.nav-group{color:#8a8176;letter-spacing:.04em}
.nav button{
  color:#554f48;
  border-radius:5px;
  border:0;
  padding:10px 14px;
}
.nav button:hover,.nav button.active{background:#e8dfd2;color:#241f1a}
.nav button.active{box-shadow:inset 3px 0 #8a7860}
.sidebar-footer{border-top:1px solid #d9d0c3}
.avatar{background:#e6ddcf;color:#3f3933;border:1px solid #d2c7b8;border-radius:50%}
.user-chip small,.text-btn,.sidebar-toggle-text{color:#746b62}
.topbar{
  height:78px;
  background:#fffdf8;
  border-bottom:1px solid #d9d0c3;
  padding:14px 24px;
}
.topbar h1,.module-head h2,.card-head h2,.kpi h3,.mini-stat strong{
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;
  font-weight:400;
}
.search,.icon-btn,.btn,.filter{
  border-radius:5px;
  border-color:#cec3b4;
  box-shadow:none;
}
.search{background:#f4ede3}
.btn{background:#fffdf8;color:#332e29}
.btn.primary{background:#6f6252;color:#fffdf8;border:1px solid #6f6252;box-shadow:none}
.btn.primary:hover{background:#594f43}
.btn.danger{background:#8a5a55;color:#fff}
.content{background:#f7f1e7;padding:22px 24px 42px}
.card{
  background:#fffdf8;
  border:1px solid #d9d0c3;
  border-radius:6px;
  box-shadow:none;
}
.card-head{background:#faf5ed;border-bottom:1px solid #d9d0c3}
.kpi:after{display:none!important}
.kpi-icon,.activity-dot,.mini-stat,.kanban,.progress{background:#f1eadf;border-radius:5px}
.bar{background:#8a7860;border-radius:2px 2px 0 0}
.bar.alt{background:#b4aa9d}
.progress i{background:#8a7860}
.data-table{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif}
.data-table th{background:#f1eadf;color:#6d655c;letter-spacing:.02em}
.data-table td{color:#302b26}
.data-table tr:hover td{background:#faf5ed}
.status{border-radius:5px;font-weight:400}
.status.ok{background:#e9efe9;color:#526556}
.status.warn{background:#f3ead8;color:#766343}
.status.bad{background:#f2e6e3;color:#7d504d}
.status.info{background:#e9ecee;color:#56616b}
.form-grid label{color:#6d655c}
.form-grid input,.form-grid select,.form-grid textarea{
  border-radius:5px;
  background:#fffdf8;
  color:#25221e;
  border-color:#cec3b4;
}
.job{border-radius:5px;box-shadow:none}
.modal{background:rgba(65,55,45,.28)}
.modal-card{border-radius:8px;border:1px solid #cfc4b5;box-shadow:none;background:#fffdf8}
.toast{background:#5f5447;color:#fffdf8;border-radius:5px}
#themeBtn{display:none!important}
@media(max-width:760px){
  .sidebar{background:#f3ecdf}
  .login-panel{background:#f1eadf}
}

/* ===== V106: fondo blanco con crema suave ===== */
:root,
body,
body.dark{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f8f3ea;
  --ink:#202020;
  --muted:#6b6b6b;
  --line:#e3dacd;
  --gold:#9a876d;
  --gold-2:#b8a58a;
  --nav:#f6efe4;
  --nav2:#efe6d8;
  --shadow:none;
  --radius:6px;
}
html,body{background:#ffffff!important;color:#202020}
body,button,input,select,textarea{
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif!important;
  font-weight:400!important;
}
.app,.main,.content{background:#ffffff!important}
.sidebar{
  background:#f6efe4!important;
  color:#2c2c2c!important;
  border-right:1px solid #e3dacd!important;
}
.sidebar-brand,.sidebar-footer{border-color:#e3dacd!important}
.nav-group{color:#857d73!important}
.nav button{color:#55504a!important;background:transparent!important}
.nav button:hover,.nav button.active{
  background:#ece2d4!important;
  color:#1f1f1f!important;
}
.nav button.active{box-shadow:inset 3px 0 #9a876d!important}
.topbar{
  background:#ffffff!important;
  border-bottom:1px solid #e3dacd!important;
}
.card,.login-card,.modal-card,.job{
  background:#ffffff!important;
  border:1px solid #e3dacd!important;
  box-shadow:none!important;
}
.card-head,.data-table th,.mini-stat,.kanban,.kpi-icon,.activity-dot,.progress{
  background:#f8f3ea!important;
}
.login-screen{background:#ffffff!important}
.login-brand{background:#ffffff!important;border-right:1px solid #e3dacd!important}
.login-panel{background:#f8f3ea!important}
.login-features span{background:#f8f3ea!important;border-color:#e3dacd!important}
.search{background:#fbf8f3!important;border-color:#ddd3c5!important}
.btn,.filter,.icon-btn{
  background:#ffffff!important;
  color:#2a2a2a!important;
  border-color:#d8cdbf!important;
}
.btn.primary{
  background:#8f7b62!important;
  color:#ffffff!important;
  border-color:#8f7b62!important;
}
.btn.primary:hover{background:#77654f!important}
.form-grid input,.form-grid select,.form-grid textarea,.login-card input{
  background:#ffffff!important;
  color:#202020!important;
  border-color:#d8cdbf!important;
}
.data-table td{background:#ffffff;color:#2b2b2b}
.data-table tr:hover td{background:#fcfaf6!important}
.bar,.progress i{background:#9a876d!important}
.bar.alt{background:#c5b9aa!important}
.toast{background:#625648!important;color:#ffffff!important}
.module-head p,.kpi small,.activity-item small,.user-chip small,.login-card p,.login-card small{color:#6b6b6b!important}
@media(max-width:760px){
  .sidebar{background:#f6efe4!important}
  .login-panel{background:#f8f3ea!important}
}

/* V107: gráfico principal de líneas */
.line-chart{height:285px;display:flex;flex-direction:column;position:relative}
.line-chart svg{width:100%;height:245px;overflow:visible}
.chart-legend{display:flex;justify-content:flex-end;gap:22px;margin:0 8px 2px;font-size:12px;color:#5f5a54}
.chart-legend span{display:inline-flex;align-items:center;gap:7px}
.legend-line{display:inline-block;width:22px;height:0;border-top:2px solid #806b4f}
.legend-line.purchases-line{border-top-color:#aaa39a}
.chart-grid line{stroke:#ece7df;stroke-width:1}
.chart-y-labels text,.chart-x-labels text{fill:#77716a;font-family:Arial,"Helvetica Neue",sans-serif;font-size:11px;text-anchor:middle}
.chart-y-labels text{text-anchor:end}
.data-line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.line-sales{stroke:#806b4f}
.line-purchases{stroke:#aaa39a}
.data-points circle{stroke:#fff;stroke-width:2}
.sales-points circle{fill:#806b4f}
.purchases-points circle{fill:#aaa39a}
@media(max-width:700px){.line-chart{height:250px}.line-chart svg{height:210px}.chart-legend{justify-content:flex-start}}

/* V108: texto negro y gris, menú lateral blanco */
:root,
body,
body.dark{
  --ink:#161616;
  --muted:#666666;
  --nav:#ffffff;
  --nav2:#ffffff;
}
html,body{color:#161616!important}
.sidebar{
  background:#ffffff!important;
  color:#1c1c1c!important;
  border-right:1px solid #e2e2e2!important;
}
.sidebar-brand,.sidebar-footer{border-color:#e2e2e2!important}
.sidebar-brand img{filter:none!important;opacity:1!important}
.sidebar .icon-btn{background:#ffffff!important;color:#333333!important;border-color:#d8d8d8!important}
.nav-group{color:#858585!important}
.nav button{background:transparent!important;color:#4f4f4f!important}
.nav button:hover,.nav button.active{background:#f3f3f3!important;color:#111111!important}
.nav button.active{box-shadow:inset 3px 0 #a99a84!important}
.user-chip strong{color:#222222!important}
.user-chip small,.text-btn,.sidebar-toggle-text{color:#6d6d6d!important}
.sidebar-toggle-text:hover,.text-btn:hover{color:#111111!important}
.topbar h1,.module-head h2,.card-head h2,.kpi h3,.login-card h1{color:#171717!important}
.card,.data-table td,.form-grid input,.form-grid select,.form-grid textarea{color:#222222!important}
.module-head p,.kpi small,.activity-item small,.login-card p,.login-card small,.chart-legend,.chart-y-labels text,.chart-x-labels text{color:#666666!important;fill:#666666!important}
@media(max-width:760px){.sidebar{background:#ffffff!important}}

/* Estado de conexión con Cloudflare Worker y D1 */
.api-status{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #d8d8d8;border-radius:999px;background:#fff;color:#666;font-size:12px;font-weight:400;white-space:nowrap}
.api-status::before{content:"";width:8px;height:8px;border-radius:50%;background:#aaa}
.api-status.online{color:#333;border-color:#cfcfcf}
.api-status.online::before{background:#4c7a54}
.api-status.offline{color:#666;border-color:#d8caca}
.api-status.offline::before{background:#a85d5d}
.api-status.checking::before{background:#b59a68}
@media(max-width:760px){.api-status{display:none}}

/* V111: valores monetarios con separador de miles */
.money-input,
.amount {
  font-variant-numeric: tabular-nums;
}
.money-input {
  text-align: right;
}


/* ===== V117: responsive móvil y tablet ===== */
html{overflow-x:hidden}
body{min-width:320px}
.mobile-menu-button,.sidebar-backdrop{display:none}
.topbar-title{min-width:0}
.topbar-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.table-wrap{-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.data-table th,.data-table td{white-space:nowrap}

@media (max-width:1024px){
  .app{grid-template-columns:1fr!important}
  .main{width:100%;min-width:0}
  .sidebar{
    position:fixed!important;inset:0 auto 0 0!important;
    width:min(310px,86vw)!important;height:100dvh!important;
    transform:translateX(-105%);transition:transform .24s ease;
    z-index:60!important;box-shadow:12px 0 35px rgba(0,0,0,.16)!important;
  }
  .sidebar.open{transform:translateX(0)!important}
  .mobile-menu-button{
    display:inline-grid;place-items:center;flex:0 0 auto;width:42px;height:42px;
    border:1px solid #d8cdbf;border-radius:6px;background:#fff;color:#222;
    font-size:22px;line-height:1;cursor:pointer
  }
  .sidebar-backdrop{
    display:block;position:fixed;inset:0;border:0;background:rgba(20,20,20,.38);
    z-index:55;cursor:pointer
  }
  .sidebar-backdrop.hidden{display:none!important}
  body.sidebar-open{overflow:hidden}
  .topbar{height:78px;padding:12px 20px;gap:12px}
  .topbar-title{flex:1}
  .topbar h1{font-size:21px}
  .top-actions{flex:0 0 auto}
  .search{display:none!important}
  .content{padding:22px 20px 42px}
  .module-head{align-items:flex-start;gap:14px}
  .toolbar{justify-content:flex-end}
  .dashboard-grid,.split{grid-template-columns:1fr!important}
  .production-board{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .modal-card{width:min(760px,calc(100vw - 32px));max-height:92dvh}
}

@media (max-width:760px){
  .topbar{height:68px;padding:9px 12px;gap:9px}
  .mobile-menu-button{width:40px;height:40px}
  .topbar .eyebrow{display:none}
  .topbar h1{font-size:18px;margin:0;max-width:42vw}
  .top-actions{gap:6px}
  .top-actions .api-status,.top-actions .notification,.top-actions .icon-btn{display:none!important}
  #quickAction{padding:9px 11px;font-size:13px;min-height:40px}
  .content{padding:16px 12px 34px}
  .module-head{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:14px}
  .module-head h2{font-size:19px}
  .module-head p{font-size:13px;line-height:1.4}
  .toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
  .toolbar>*{width:100%;min-height:43px}
  .toolbar>*:only-child{grid-column:1/-1}
  .toolbar .filter:first-child:last-child{grid-column:1/-1}
  .btn,.filter,.icon-btn,input,select,textarea{min-height:44px}
  .kpi-grid{grid-template-columns:1fr!important;gap:12px}
  .kpi{padding:16px}
  .kpi h3{font-size:23px}
  .card-head{padding:14px 15px;gap:10px;align-items:flex-start}
  .card-body{padding:15px}
  .dashboard-grid{gap:12px;margin-top:12px}
  .production-board{grid-template-columns:1fr!important}
  .accounting-summary{grid-template-columns:1fr!important}
  .table-card{border-radius:7px}
  .table-wrap{overflow-x:auto;position:relative}
  .data-table{min-width:760px}
  .data-table th{padding:11px 12px;font-size:10px}
  .data-table td{padding:12px;font-size:12px}
  .data-table th:first-child,.data-table td:first-child{
    position:sticky;left:0;z-index:2;background:#fff!important;
    box-shadow:5px 0 8px rgba(0,0,0,.05)
  }
  .data-table th:first-child{z-index:3;background:#f8f3ea!important}
  .data-table td .btn{min-height:38px;padding:8px 10px}
  .form-grid{grid-template-columns:1fr!important;gap:13px}
  .form-grid .wide{grid-column:auto!important}
  .form-grid input,.form-grid select,.form-grid textarea{font-size:16px;padding:12px}
  .modal{align-items:end;padding:0;background:rgba(35,30,25,.42)}
  .modal-card{
    width:100%;max-width:none;max-height:94dvh;border-radius:14px 14px 0 0!important;
    border-left:0!important;border-right:0!important;border-bottom:0!important;
    overflow:hidden;display:flex;flex-direction:column
  }
  .modal-head{padding:15px 16px;position:sticky;top:0;background:#fff;z-index:3}
  .modal-head h2{font-size:20px}
  .modal-body{padding:16px;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .form-actions{
    position:sticky;bottom:-16px;background:#fff;padding:12px 0 16px;
    display:grid;grid-template-columns:1fr 1fr;z-index:2;border-top:1px solid #eee
  }
  .form-actions .btn{width:100%}
  .toast{left:12px;right:12px;bottom:12px;text-align:center;padding:12px 14px}
  .login-panel{min-height:100dvh;padding:14px}
  .login-card{padding:25px 20px;border-radius:10px;width:100%}
  .login-card h1{font-size:29px}
  .login-card input{font-size:16px;min-height:48px}
  .line-chart{height:225px}
  .line-chart svg{height:190px;min-width:560px}
  .line-chart{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .chart-legend{position:sticky;left:0;width:max-content;background:#fff;padding-right:10px}
}

@media (max-width:420px){
  #quickAction{font-size:0;width:42px;padding:0}
  #quickAction::after{content:"+";font-size:22px}
  .topbar h1{max-width:54vw}
  .toolbar{grid-template-columns:1fr}
  .toolbar>*{grid-column:1!important}
  .modal-card{max-height:96dvh}
  .form-actions{grid-template-columns:1fr}
  .sidebar{width:88vw!important}
}


/* V120: búsqueda y filtros de productos */
.product-filter-bar{display:grid;grid-template-columns:minmax(260px,1.8fr) repeat(4,minmax(145px,.8fr)) auto auto;gap:10px;align-items:center;margin:0 0 16px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.product-search-box{display:flex;align-items:center;gap:9px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.product-search-box span{font-size:20px;color:var(--muted);line-height:1}
.product-search-box input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:14px;min-width:0}
.product-search-box:focus-within{border-color:#9d8666;box-shadow:0 0 0 3px rgba(157,134,102,.12)}
.product-result-count{white-space:nowrap;color:var(--muted);font-size:12px;font-weight:700;text-align:right}
@media(max-width:1200px){.product-filter-bar{grid-template-columns:2fr repeat(2,1fr)}.product-search-box{grid-column:1/-1}.product-result-count{text-align:left}}
@media(max-width:760px){.product-filter-bar{grid-template-columns:1fr 1fr;padding:12px;gap:8px}.product-search-box{grid-column:1/-1}.product-filter-bar .filter{width:100%;min-width:0}.product-clear-filter{grid-column:1/-1}.product-result-count{grid-column:1/-1;text-align:left}.product-search-box input{font-size:16px}}
@media(max-width:430px){.product-filter-bar{grid-template-columns:1fr}.product-search-box,.product-clear-filter,.product-result-count{grid-column:1}.product-filter-bar>*{width:100%}}

/* V121 — Compras compactas con buscador de productos */
.purchase-compact-form{display:grid;gap:12px}
.purchase-section{border:1px solid var(--line);background:var(--surface);padding:14px;border-radius:10px}
.purchase-section h3{font-size:14px;margin:0 0 10px}
.purchase-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.purchase-section-title h3{margin:0}.purchase-section-title span{font-size:11px;color:var(--muted)}
.purchase-header-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr 1fr;gap:9px}
.purchase-header-grid label,.purchase-product-entry label,.purchase-totals-grid label,.purchase-notes{display:grid;gap:5px;font-size:11px;font-weight:750;color:var(--muted)}
.purchase-header-grid input,.purchase-header-grid select,.purchase-product-entry input,.purchase-totals-grid input,.purchase-notes input{width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;padding:9px 10px;background:var(--surface);color:var(--ink)}
.purchase-product-entry{display:grid;grid-template-columns:minmax(260px,2.4fr) minmax(100px,.7fr) minmax(130px,.9fr) auto;gap:9px;align-items:end}
.purchase-search-box{position:relative;min-width:0}
.purchase-product-results{position:absolute;top:100%;left:0;right:0;z-index:8;max-height:260px;overflow:auto;background:#fff;border:1px solid var(--line);box-shadow:0 14px 32px rgba(0,0,0,.14);border-radius:8px;margin-top:4px;padding:5px}
.purchase-product-result{width:100%;border:0;background:#fff;text-align:left;padding:9px;border-radius:6px;display:grid;grid-template-columns:110px 1fr auto;gap:8px;align-items:center;cursor:pointer;color:var(--ink)}
.purchase-product-result:hover{background:var(--surface-2)}
.purchase-product-result strong{font-size:12px}.purchase-product-result span{font-size:12px}.purchase-product-result small{font-size:12px;color:var(--muted)}
.purchase-no-results{padding:14px;text-align:center;color:var(--muted);font-size:12px}
.purchase-selected{margin-top:6px;border:1px solid #cfc4b5;background:#fffaf0;border-radius:7px;padding:8px;display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center}
.purchase-selected span{font-size:12px}.purchase-selected small{font-size:10px;color:var(--muted)}.purchase-selected button{border:0;background:none;text-decoration:underline;cursor:pointer;color:var(--ink)}
.purchase-add-btn{height:37px;white-space:nowrap}
.purchase-items-list{display:grid;gap:6px;margin-top:10px}
.purchase-item-row{display:grid;grid-template-columns:minmax(220px,2fr) .7fr 1fr 1fr auto;gap:10px;align-items:center;border-top:1px solid var(--line);padding:9px 0}
.purchase-item-main{display:grid}.purchase-item-main strong{font-size:12px}.purchase-item-main span{font-size:12px}.purchase-item-main small,.purchase-item-row>div>small{font-size:10px;color:var(--muted);display:block}.purchase-item-row>div>strong{font-size:12px;display:block}
.purchase-remove{padding:7px 10px;font-size:11px}.purchase-empty{text-align:center;padding:16px;color:var(--muted);font-size:12px}
.purchase-totals-grid{display:grid;grid-template-columns:repeat(7,minmax(90px,1fr));gap:8px}.purchase-notes{margin-top:9px}.purchase-actions{position:sticky;bottom:0;background:var(--surface);padding-top:12px;border-top:1px solid var(--line)}
#modal:has(.purchase-compact-form) .modal-card{width:min(1120px,calc(100vw - 28px))}
#modal:has(.purchase-compact-form) .modal-body{padding:14px}

@media(max-width:1000px){
 .purchase-header-grid{grid-template-columns:repeat(3,1fr)}
 .purchase-product-entry{grid-template-columns:1fr 120px 150px auto}
 .purchase-totals-grid{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:700px){
 .purchase-section{padding:11px}
 .purchase-header-grid{grid-template-columns:1fr 1fr}
 .purchase-product-entry{grid-template-columns:1fr 1fr}
 .purchase-search-box{grid-column:1/-1}
 .purchase-add-btn{width:100%}
 .purchase-item-row{grid-template-columns:1fr 1fr;gap:7px;border:1px solid var(--line);padding:10px;border-radius:8px}
 .purchase-item-main{grid-column:1/-1}.purchase-remove{width:100%}
 .purchase-totals-grid{grid-template-columns:1fr 1fr}
 .purchase-product-result{grid-template-columns:85px 1fr}.purchase-product-result small{grid-column:1/-1}
 .purchase-selected{grid-template-columns:1fr auto}.purchase-selected span,.purchase-selected small{grid-column:1/-1}
}


/* V122 — Buscador de proveedores en compras */
.purchase-supplier-search{position:relative;min-width:0}
.purchase-supplier-results{position:absolute;top:100%;left:0;right:0;z-index:12;max-height:250px;overflow:auto;background:#fff;border:1px solid var(--line);box-shadow:0 14px 32px rgba(0,0,0,.14);border-radius:8px;margin-top:4px;padding:5px}
.purchase-supplier-result{width:100%;border:0;background:#fff;text-align:left;padding:9px;border-radius:6px;display:grid;grid-template-columns:115px 1fr auto;gap:8px;align-items:center;cursor:pointer;color:var(--ink)}
.purchase-supplier-result:hover{background:var(--surface-2)}
.purchase-supplier-result strong,.purchase-supplier-result span{font-size:12px}.purchase-supplier-result small{font-size:10px;color:var(--muted)}
.purchase-selected-supplier{margin-top:6px}
@media(max-width:700px){.purchase-supplier-search{grid-column:1/-1}.purchase-supplier-result{grid-template-columns:95px 1fr}.purchase-supplier-result small{grid-column:1/-1}}

/* V123 — Proveedor por documento, sin lista desplegable */
.purchase-supplier-lookup{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(240px,1.4fr);gap:10px;grid-column:span 2;align-items:start}
.purchase-supplier-lookup label{margin:0}
.purchase-supplier-lookup input[readonly]{background:var(--surface-2);font-weight:700;color:var(--ink)}
.purchase-supplier-message{grid-column:1/-1;min-height:18px;font-size:11px;margin-top:-4px;color:var(--muted)}
.purchase-supplier-message.ok{color:var(--green);font-weight:700}
.purchase-supplier-message.error{color:var(--red);font-weight:700}
@media(max-width:700px){.purchase-supplier-lookup{grid-template-columns:1fr;grid-column:1/-1}.purchase-supplier-message{margin-top:-2px}}


/* V124 — Compras compactas y simétricas */
#modal:has(.purchase-compact-form) .modal-card{width:min(1040px,calc(100vw - 32px));max-height:94dvh}
#modal:has(.purchase-compact-form) .modal-header{padding:14px 18px}
#modal:has(.purchase-compact-form) .modal-body{padding:10px 12px 12px}
.purchase-compact-form{gap:9px}
.purchase-section{padding:10px 12px;border-radius:9px}
.purchase-section h3{margin-bottom:8px}
.purchase-header-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;align-items:start}
.purchase-supplier-lookup{grid-column:span 6;grid-template-columns:minmax(150px,2fr) minmax(240px,4fr);gap:8px}
.purchase-field-invoice{grid-column:span 3}
.purchase-field-date{grid-column:span 3}
.purchase-field-payment,.purchase-field-method,.purchase-field-due{grid-column:span 4}
.purchase-header-grid input,.purchase-header-grid select,.purchase-product-entry input,.purchase-totals-grid input,.purchase-notes input{min-height:36px;padding:7px 9px}
.purchase-product-entry{grid-template-columns:repeat(12,minmax(0,1fr));gap:8px}
.purchase-search-box{grid-column:span 6}
.purchase-product-entry>label:nth-of-type(1){grid-column:span 2}
.purchase-product-entry>label:nth-of-type(2){grid-column:span 2}
.purchase-add-btn{grid-column:span 2;height:36px;width:100%}
.purchase-items-list{margin-top:8px}
.purchase-item-row{padding:7px 0;gap:8px}
.purchase-totals-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:8px}
.purchase-total-subtotal,.purchase-total-discount,.purchase-total-taxes,.purchase-total-other{grid-column:span 3}
.purchase-total-total,.purchase-total-paid,.purchase-total-balance{grid-column:span 4}
.purchase-notes{margin-top:7px}
.purchase-actions{padding-top:9px}
.purchase-supplier-message{min-height:14px;margin-top:-2px}

@media(max-width:900px){
  .purchase-supplier-lookup{grid-column:1/-1}
  .purchase-field-invoice,.purchase-field-date,.purchase-field-payment,.purchase-field-method,.purchase-field-due{grid-column:span 4}
  .purchase-search-box{grid-column:1/-1}
  .purchase-product-entry>label:nth-of-type(1),.purchase-product-entry>label:nth-of-type(2),.purchase-add-btn{grid-column:span 4}
  .purchase-total-subtotal,.purchase-total-discount,.purchase-total-taxes,.purchase-total-other{grid-column:span 6}
  .purchase-total-total,.purchase-total-paid,.purchase-total-balance{grid-column:span 4}
}
@media(max-width:650px){
  #modal:has(.purchase-compact-form) .modal-card{width:100%;max-height:96dvh;border-radius:14px 14px 0 0}
  .purchase-header-grid,.purchase-product-entry,.purchase-totals-grid{grid-template-columns:1fr 1fr}
  .purchase-supplier-lookup{grid-template-columns:1fr;grid-column:1/-1}
  .purchase-field-invoice,.purchase-field-date,.purchase-field-payment,.purchase-field-method,.purchase-field-due{grid-column:span 1}
  .purchase-field-due{grid-column:1/-1}
  .purchase-search-box{grid-column:1/-1}
  .purchase-product-entry>label:nth-of-type(1),.purchase-product-entry>label:nth-of-type(2){grid-column:span 1}
  .purchase-add-btn{grid-column:1/-1}
  .purchase-total-subtotal,.purchase-total-discount,.purchase-total-taxes,.purchase-total-other,.purchase-total-total,.purchase-total-paid,.purchase-total-balance{grid-column:span 1}
  .purchase-total-balance{grid-column:1/-1}
}

/* V131: acciones y detalle de compras */
.purchase-row-actions{display:flex;gap:6px;flex-wrap:nowrap}.purchase-row-actions .btn{padding:7px 10px;white-space:nowrap}.purchase-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.purchase-detail-grid>div{border:1px solid var(--line);border-radius:8px;padding:12px;background:#fff}.purchase-detail-grid small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em;margin-bottom:5px}.purchase-detail-grid strong{display:block;font-size:14px;overflow-wrap:anywhere}.purchase-detail-grid .wide{grid-column:1/-1}@media(max-width:900px){.purchase-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.purchase-detail-grid{grid-template-columns:1fr}.purchase-row-actions{flex-wrap:wrap}}

.purchase-items-block{margin-top:18px}.purchase-items-block h3{font-size:15px;margin:0 0 10px}.purchase-items-empty{margin-top:16px;padding:12px;border:1px dashed var(--border);border-radius:8px;color:var(--muted);font-size:13px}

/* V133 - Botón Exportar en todos los módulos */
#exportButton{white-space:nowrap}
@media(max-width:760px){#exportButton{padding:9px 10px;font-size:12px;min-height:40px}}
@media(max-width:520px){#exportButton{font-size:0;width:42px;padding:0}#exportButton::after{content:"XLS";font-size:11px;font-weight:800}}


/* V137: búsqueda y filtros en Compras */
.purchase-filter-bar{display:grid;grid-template-columns:minmax(280px,1.8fr) repeat(3,minmax(145px,.75fr)) auto auto;gap:10px;align-items:center;margin:0 0 16px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.purchase-result-count{font-size:12px;color:var(--muted);text-align:right;white-space:nowrap}
.purchase-clear-filter{white-space:nowrap}
@media(max-width:1180px){.purchase-filter-bar{grid-template-columns:2fr repeat(2,1fr)}.purchase-filter-bar .product-search-box{grid-column:1/-1}.purchase-result-count{text-align:left}}
@media(max-width:760px){.purchase-filter-bar{grid-template-columns:1fr 1fr;padding:12px;gap:8px}.purchase-filter-bar .product-search-box{grid-column:1/-1}.purchase-filter-bar .filter{width:100%;min-width:0}.purchase-clear-filter,.purchase-result-count{grid-column:1/-1}.purchase-result-count{text-align:left}.purchase-filter-bar input{font-size:16px}}
@media(max-width:430px){.purchase-filter-bar{grid-template-columns:1fr}.purchase-filter-bar .product-search-box,.purchase-clear-filter,.purchase-result-count{grid-column:1}.purchase-filter-bar>*{width:100%}}

/* V140 Ventas y facturación */
.sale-form{display:grid;gap:16px}.sale-header-grid{grid-template-columns:2fr repeat(4,minmax(140px,1fr))}.sale-add-row{display:grid;grid-template-columns:minmax(260px,2fr) 130px 170px 160px auto;gap:12px;align-items:end}.sale-add-btn{height:42px}.sale-item-row{grid-template-columns:minmax(210px,2fr) repeat(4,minmax(90px,1fr)) auto}.sale-total-grid{grid-template-columns:repeat(3,minmax(160px,1fr)) 2fr}.search-select{position:relative}.search-results{position:absolute;z-index:60;top:calc(100% + 4px);left:0;right:0;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 14px 35px rgba(0,0,0,.13);max-height:260px;overflow:auto}.search-results button{width:100%;border:0;background:transparent;padding:10px 12px;text-align:left;display:flex;flex-direction:column;gap:3px;color:var(--text);cursor:pointer}.search-results button:hover{background:var(--surface-2)}.search-results small,.search-empty{color:var(--muted);font-size:12px}.search-empty{padding:14px}.table-sub{display:block;color:var(--muted);margin-top:3px}.action-buttons{display:flex;gap:6px;flex-wrap:wrap}.sale-detail .detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.sale-detail .detail-grid>div{padding:12px;background:var(--surface-2);border-radius:10px;display:flex;flex-direction:column;gap:4px}.invoice-summary{margin:18px 0 0 auto;max-width:390px}.invoice-summary p{display:flex;justify-content:space-between;margin:8px 0}.invoice-summary .grand{border-top:2px solid var(--border);padding-top:10px;font-size:18px}.sale-kpis{margin-bottom:16px}@media(max-width:1100px){.sale-header-grid,.sale-total-grid{grid-template-columns:repeat(2,1fr)}.sale-add-row{grid-template-columns:1fr 1fr}.sale-item-row{grid-template-columns:1fr 1fr}.sale-detail .detail-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.sale-header-grid,.sale-total-grid,.sale-add-row,.sale-detail .detail-grid{grid-template-columns:1fr}.sale-item-row{grid-template-columns:1fr}.sale-add-btn{width:100%}}

/* V141 — Ventas con la misma estética compacta y simétrica de Compras */
.sale-form .purchase-header-grid label,.sale-form .purchase-product-entry label,.sale-form .purchase-totals-grid label{display:grid;gap:5px;font-size:11px;font-weight:750;color:var(--muted)}
.sale-form .purchase-header-grid input,.sale-form .purchase-header-grid select,.sale-form .purchase-product-entry input,.sale-form .purchase-totals-grid input,.sale-form .purchase-notes input{width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;padding:7px 9px;min-height:36px;background:var(--surface);color:var(--ink)}
.sale-customer-search{grid-column:span 6}
.sale-field-date{grid-column:span 2}.sale-field-payment{grid-column:span 2}.sale-field-method{grid-column:span 2}.sale-field-due{grid-column:span 3}
.sale-product-entry{grid-template-columns:repeat(12,minmax(0,1fr))}
.sale-product-entry .purchase-search-box{grid-column:span 5}
.sale-product-entry>label:nth-of-type(1){grid-column:span 2}
.sale-product-entry>label:nth-of-type(2){grid-column:span 2}
.sale-product-entry>label:nth-of-type(3){grid-column:span 2}
.sale-product-entry .purchase-add-btn{grid-column:span 1;min-width:96px}
.sale-form .search-select{position:relative}.sale-form .search-results{position:absolute;top:100%;left:0;right:0;z-index:12;max-height:260px;overflow:auto;background:#fff;border:1px solid var(--line);box-shadow:0 14px 32px rgba(0,0,0,.14);border-radius:8px;margin-top:4px;padding:5px}
.sale-form .search-results button{width:100%;border:0;background:#fff;text-align:left;padding:9px;border-radius:6px;display:grid;gap:3px;cursor:pointer;color:var(--ink)}
.sale-form .search-results button:hover{background:var(--surface-2)}.sale-form .search-results small{font-size:11px;color:var(--muted)}
.sale-form #saleStockHint{display:block;min-height:14px;margin-top:3px;font-size:11px;color:var(--green);font-weight:700}
.sale-item-row{grid-template-columns:minmax(220px,2fr) .7fr 1fr 1fr 1fr auto}
.sale-totals-grid{grid-template-columns:repeat(12,minmax(0,1fr))}
.sale-total-subtotal,.sale-total-discount,.sale-total-other{grid-column:span 4}
.sale-total-total,.sale-total-paid,.sale-total-balance{grid-column:span 4}
.sale-total-total input,.sale-total-balance input{font-weight:800;background:var(--surface-2)}
@media(max-width:900px){.sale-customer-search{grid-column:1/-1}.sale-field-date,.sale-field-payment,.sale-field-method,.sale-field-due{grid-column:span 3}.sale-product-entry .purchase-search-box{grid-column:1/-1}.sale-product-entry>label:nth-of-type(1),.sale-product-entry>label:nth-of-type(2),.sale-product-entry>label:nth-of-type(3),.sale-product-entry .purchase-add-btn{grid-column:span 3}.sale-total-subtotal,.sale-total-discount,.sale-total-other,.sale-total-total,.sale-total-paid,.sale-total-balance{grid-column:span 6}}
@media(max-width:650px){.sale-field-date,.sale-field-payment,.sale-field-method{grid-column:span 1}.sale-field-due{grid-column:1/-1}.sale-product-entry>label:nth-of-type(1),.sale-product-entry>label:nth-of-type(2),.sale-product-entry>label:nth-of-type(3){grid-column:span 1}.sale-product-entry .purchase-add-btn{grid-column:1/-1}.sale-total-subtotal,.sale-total-discount,.sale-total-other,.sale-total-total,.sale-total-paid,.sale-total-balance{grid-column:span 1}.sale-total-balance{grid-column:1/-1}.sale-item-row{grid-template-columns:1fr 1fr}}


/* V142 — Ajuste compacto de la sección Agregar productos en Ventas */
.sale-form .purchase-section:has(.sale-product-entry){padding:12px 14px}
.sale-form .purchase-section:has(.sale-product-entry) .purchase-section-title{margin-bottom:8px}
.sale-form .purchase-section:has(.sale-product-entry) .purchase-section-title h3{margin:0;font-size:14px}
.sale-form .purchase-section:has(.sale-product-entry) .purchase-section-title span{font-size:10px}
.sale-product-entry{grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;align-items:end}
.sale-product-entry .purchase-search-box{grid-column:span 4;min-width:0}
.sale-product-entry>label:nth-of-type(1){grid-column:span 2}
.sale-product-entry>label:nth-of-type(2){grid-column:span 2}
.sale-product-entry>label:nth-of-type(3){grid-column:span 2}
.sale-product-entry .purchase-add-btn{grid-column:span 2;min-width:0;width:100%;height:36px;padding:7px 10px;white-space:nowrap}
.sale-form #saleStockHint{min-height:0;margin-top:2px;line-height:1.15}
.sale-empty-compact{margin:7px 0 0;padding:7px 9px;min-height:0;font-size:11px;text-align:left;border-style:dashed;background:var(--surface-2)}
.sale-form #saleLinesBox:empty{display:none}
@media(max-width:900px){.sale-product-entry .purchase-search-box{grid-column:1/-1}.sale-product-entry>label:nth-of-type(1),.sale-product-entry>label:nth-of-type(2),.sale-product-entry>label:nth-of-type(3){grid-column:span 4}.sale-product-entry .purchase-add-btn{grid-column:1/-1}}
@media(max-width:650px){.sale-product-entry>label:nth-of-type(1),.sale-product-entry>label:nth-of-type(2),.sale-product-entry>label:nth-of-type(3){grid-column:1/-1}}


/* V143 — Consecutivo FV visible en nueva venta */
.sale-field-consecutive{grid-column:span 2}
.sale-field-consecutive input{font-weight:800;letter-spacing:.04em;background:var(--surface-2);color:var(--ink)}
.sale-customer-search{grid-column:span 8}
@media(max-width:900px){.sale-field-consecutive{grid-column:span 3}.sale-customer-search{grid-column:span 9}}
@media(max-width:650px){.sale-field-consecutive,.sale-customer-search{grid-column:1/-1}}

/* V145: barra compacta de búsqueda y filtros en Ventas */
.sale-filter-panel{
  display:grid;
  grid-template-columns:minmax(320px,1.7fr) minmax(160px,.72fr) minmax(190px,.82fr) minmax(165px,.7fr) auto auto;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  margin:0 0 10px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
}
.sale-search-box{
  display:flex;
  align-items:center;
  gap:8px;
  height:38px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  min-width:0;
}
.sale-search-box span{color:var(--muted);font-size:15px;flex:0 0 auto}
.sale-search-box input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font-size:13px;
}
.sale-filter-control{
  width:100%;
  min-width:0;
  height:38px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  color:var(--ink);
  font-size:13px;
}
.sale-clear-filter{
  height:38px;
  padding:0 13px;
  border-radius:9px;
  white-space:nowrap;
}
.sale-result-count{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  text-align:right;
}
@media(max-width:1180px){
  .sale-filter-panel{grid-template-columns:2fr 1fr 1fr}
  .sale-search-box{grid-column:1/-1}
  .sale-result-count{text-align:left}
}
@media(max-width:760px){
  .sale-filter-panel{grid-template-columns:1fr 1fr;padding:10px;gap:8px}
  .sale-search-box{grid-column:1/-1}
  .sale-date-filter,.sale-clear-filter,.sale-result-count{grid-column:1/-1}
  .sale-result-count{text-align:left}
}
@media(max-width:430px){
  .sale-filter-panel{grid-template-columns:1fr}
  .sale-filter-panel>*{grid-column:1;width:100%}
}

/* ===== V149 Tipografía compacta global ===== */
html{font-size:13px}
body{font-size:12px;line-height:1.25}
button,input,select,textarea{font-size:12px;line-height:1.2}
.topbar{height:76px;padding-top:12px;padding-bottom:12px}
.topbar h1{font-size:20px;line-height:1.15}
.eyebrow{font-size:9px}
.nav-group{font-size:9px}
.nav button{font-size:12px;padding-top:8px;padding-bottom:8px}
.user-chip strong{font-size:11px}.user-chip small,.text-btn{font-size:10px}
.module-head h2{font-size:17px}.module-head p{font-size:11px}
.btn,.filter,.search input{font-size:12px}
.data-table th{font-size:9px;padding:9px 11px}
.data-table td{font-size:11px;padding:10px 11px}
.kpi small,.mini-stat small,.activity-item small{font-size:10px}
.kpi h3{font-size:22px;margin-top:8px}
.card-head h2{font-size:14px}
.form-grid label{font-size:10px;gap:5px}
.form-grid input,.form-grid select,.form-grid textarea{font-size:12px;padding:8px 10px}
.modal-head h2{font-size:18px}.modal-body{font-size:12px}
.status{font-size:9px;padding:4px 7px}
.toolbar{gap:6px}
.content{padding-top:20px}
@media(max-width:760px){html{font-size:12px}.topbar h1{font-size:17px}.nav button{font-size:12px}.data-table th{font-size:9px}.data-table td{font-size:11px}}

/* ===== V151 Tipografía compacta ampliada ===== */
html{font-size:14px}
body{font-size:13px;line-height:1.3}
button,input,select,textarea{font-size:13px;line-height:1.25}
.topbar h1{font-size:21px}
.eyebrow,.nav-group{font-size:10px}
.nav button{font-size:13px}
.user-chip strong{font-size:12px}.user-chip small,.text-btn{font-size:11px}
.module-head h2{font-size:18px}.module-head p{font-size:12px}
.btn,.filter,.search input{font-size:13px}
.data-table th{font-size:10px;padding:9px 11px}
.data-table td{font-size:12px;padding:10px 11px}
.kpi small,.mini-stat small,.activity-item small{font-size:11px}
.kpi h3{font-size:23px}
.card-head h2{font-size:15px}
.form-grid label{font-size:11px}
.form-grid input,.form-grid select,.form-grid textarea{font-size:13px}
.modal-head h2{font-size:19px}.modal-body{font-size:13px}
.status{font-size:10px}
.sale-search-box input,.sale-filter-control{font-size:13px}
.sale-result-count{font-size:12px}
.purchase-filter-bar,.sale-filter-panel{font-size:13px}
@media(max-width:760px){html{font-size:13px}.topbar h1{font-size:18px}.nav button{font-size:13px}.data-table th{font-size:10px}.data-table td{font-size:12px}}

/* ===== V152 Tipografía ampliada manteniendo diseño compacto ===== */
html{font-size:15px}
body{font-size:14px;line-height:1.32}
button,input,select,textarea{font-size:14px;line-height:1.28}
.topbar h1{font-size:22px}
.eyebrow,.nav-group{font-size:11px}
.nav button{font-size:14px}
.user-chip strong{font-size:13px}.user-chip small,.text-btn{font-size:12px}
.module-head h2{font-size:19px}.module-head p{font-size:13px}
.btn,.filter,.search input{font-size:14px}
.data-table th{font-size:11px;padding:9px 11px}
.data-table td{font-size:13px;padding:10px 11px}
.kpi small,.mini-stat small,.activity-item small{font-size:12px}
.kpi h3{font-size:24px}
.card-head h2{font-size:16px}
.form-grid label{font-size:12px}
.form-grid input,.form-grid select,.form-grid textarea{font-size:14px}
.modal-head h2{font-size:20px}.modal-body{font-size:14px}
.status{font-size:11px}
.sale-search-box input,.sale-filter-control{font-size:14px}
.sale-result-count{font-size:13px}
.purchase-filter-bar,.sale-filter-panel{font-size:14px}
@media(max-width:760px){html{font-size:14px}.topbar h1{font-size:19px}.nav button{font-size:14px}.data-table th{font-size:11px}.data-table td{font-size:13px}}

/* V163 — Compras alineadas visualmente con Ventas y facturación */
.purchase-as-sales-form .purchase-section:first-child{outline:1px solid rgba(141,113,76,.12)}
.purchase-sales-header{grid-template-columns:repeat(12,minmax(0,1fr))}
.purchase-field-consecutive{grid-column:span 4}
.purchase-supplier-sales{grid-column:span 8;grid-template-columns:minmax(180px,1fr) minmax(260px,1.5fr)}
.purchase-sales-header .purchase-field-invoice{grid-column:span 4}
.purchase-sales-header .purchase-field-date{grid-column:span 4}
.purchase-sales-header .purchase-field-payment{grid-column:span 4}
.purchase-sales-header .purchase-field-method{grid-column:span 4}
.purchase-sales-header .purchase-field-due{grid-column:span 4}
.purchase-as-sales-form .purchase-product-entry{grid-template-columns:minmax(280px,2.5fr) minmax(120px,.8fr) minmax(150px,1fr) minmax(130px,.8fr)}
.purchase-as-sales-form .purchase-search-box,.purchase-as-sales-form .purchase-product-entry>label,.purchase-as-sales-form .purchase-add-btn{grid-column:auto}
.purchase-sales-totals{grid-template-columns:repeat(12,minmax(0,1fr))}
.purchase-sales-totals .purchase-total-subtotal,.purchase-sales-totals .purchase-total-discount,.purchase-sales-totals .purchase-total-taxes,.purchase-sales-totals .purchase-total-other{grid-column:span 3}
.purchase-sales-totals .purchase-total-total,.purchase-sales-totals .purchase-total-paid,.purchase-sales-totals .purchase-total-balance{grid-column:span 4}
@media(max-width:900px){.purchase-field-consecutive{grid-column:span 6}.purchase-supplier-sales{grid-column:span 12}.purchase-sales-header .purchase-field-invoice,.purchase-sales-header .purchase-field-date,.purchase-sales-header .purchase-field-payment,.purchase-sales-header .purchase-field-method,.purchase-sales-header .purchase-field-due{grid-column:span 6}.purchase-as-sales-form .purchase-product-entry{grid-template-columns:1fr 1fr}.purchase-as-sales-form .purchase-search-box{grid-column:1/-1}}
@media(max-width:600px){.purchase-field-consecutive,.purchase-sales-header .purchase-field-invoice,.purchase-sales-header .purchase-field-date,.purchase-sales-header .purchase-field-payment,.purchase-sales-header .purchase-field-method,.purchase-sales-header .purchase-field-due{grid-column:1/-1}.purchase-supplier-sales{grid-template-columns:1fr}.purchase-as-sales-form .purchase-product-entry{grid-template-columns:1fr}.purchase-as-sales-form .purchase-search-box{grid-column:1}.purchase-sales-totals>*{grid-column:1/-1!important}}

/* V164: buscador de proveedor igual al de facturación */
.purchase-supplier-sales.sale-customer-search{display:block;grid-template-columns:none}
.purchase-supplier-sales.sale-customer-search .search-select{margin-top:5px}


/* V187 — Caja y tesorería con barra de filtros igual a Productos */
.cash-filter-bar{grid-template-columns:minmax(260px,1.8fr) repeat(4,minmax(145px,.8fr)) auto auto;margin-top:18px;margin-bottom:0}
.cash-filter-bar .filter{width:100%;min-width:0;min-height:44px}
@media(max-width:1200px){.cash-filter-bar{grid-template-columns:2fr repeat(2,1fr)}.cash-filter-bar .product-search-box{grid-column:1/-1}.cash-filter-bar .product-result-count{text-align:left}}
@media(max-width:760px){.cash-filter-bar{grid-template-columns:1fr 1fr;padding:12px;gap:8px}.cash-filter-bar .product-search-box{grid-column:1/-1}.cash-filter-bar .filter{width:100%;min-width:0}.cash-filter-bar .product-clear-filter,.cash-filter-bar .product-result-count{grid-column:1/-1}.cash-filter-bar .product-result-count{text-align:left}}
@media(max-width:430px){.cash-filter-bar{grid-template-columns:1fr}.cash-filter-bar>*{width:100%;grid-column:1}}

.finance-filter-bar{grid-template-columns:minmax(300px,2fr) minmax(170px,.9fr) minmax(155px,.8fr) auto auto}
@media(max-width:1200px){.finance-filter-bar{grid-template-columns:2fr 1fr 1fr}.finance-filter-bar .product-search-box{grid-column:1/-1}.finance-filter-bar .product-result-count{text-align:left}}
@media(max-width:760px){.finance-filter-bar{grid-template-columns:1fr 1fr}.finance-filter-bar .product-search-box{grid-column:1/-1}.finance-filter-bar .filter{width:100%;min-width:0}.finance-filter-bar .product-clear-filter,.finance-filter-bar .product-result-count{grid-column:1/-1}}
@media(max-width:430px){.finance-filter-bar{grid-template-columns:1fr}.finance-filter-bar .product-search-box,.finance-filter-bar .product-clear-filter,.finance-filter-bar .product-result-count{grid-column:1}.finance-filter-bar>*{width:100%}}


/* V189 — Rediseño visual de Contabilidad */
.accounting-module-head{align-items:flex-end}
.accounting-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.accounting-summary-card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px;box-shadow:0 4px 14px rgba(45,38,29,.04)}
.accounting-summary-card small{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}.accounting-summary-card strong{display:block;font-size:25px;line-height:1.1;color:var(--text);font-variant-numeric:tabular-nums}.accounting-summary-card span{display:block;color:var(--muted);font-size:12px;margin-top:8px}.accounting-summary-card.positive{border-top:3px solid #48896b}.accounting-summary-card.negative{border-top:3px solid #b05252}.accounting-summary-card.neutral{border-top:3px solid var(--gold)}
.accounting-period-bar{display:grid;grid-template-columns:minmax(230px,1.3fr) repeat(2,minmax(150px,.7fr)) auto;align-items:end;gap:12px;margin-top:18px;padding:14px 16px;background:var(--card);border:1px solid var(--line);border-radius:12px}.accounting-period-bar>div:first-child strong,.accounting-period-bar>div:first-child span{display:block}.accounting-period-bar>div:first-child span{color:var(--muted);font-size:12px;margin-top:4px}.accounting-period-bar label{font-size:11px;color:var(--muted)}.accounting-period-bar input{width:100%;min-height:42px;margin-top:5px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:0 12px}.accounting-period-actions{display:flex;gap:8px;flex-wrap:wrap}
.accounting-result-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.7fr);gap:18px;margin-top:18px}.accounting-statement-card,.accounting-position-card,.accounting-ledger-card{overflow:hidden}.accounting-margin-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.accounting-margin-grid>div{padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.accounting-margin-grid small{display:block;color:var(--muted);margin-bottom:4px}.accounting-margin-grid strong{font-size:22px}.accounting-progress{height:7px;margin-top:10px;border-radius:999px;background:#e9e4dc;overflow:hidden}.accounting-progress i{display:block;height:100%;border-radius:inherit;background:#6f8f7d}.accounting-progress.negative i{background:#b05252}
.accounting-statement-table .accounting-main-row td{font-weight:700}.accounting-statement-table .accounting-section-row td{background:var(--soft);font-weight:700;text-transform:uppercase;font-size:11px;letter-spacing:.04em}.accounting-statement-table .accounting-subtotal td{font-weight:700;border-top:1px solid var(--line)}.accounting-statement-table .accounting-total td{font-weight:800;font-size:14px;background:#edf6f1;border-top:2px solid #6f8f7d}.accounting-statement-table .accounting-total.loss td{background:#fbefef;border-top-color:#b05252}.accounting-indent{padding-left:18px;display:inline-block}.muted-cell{color:var(--muted)}
.accounting-position-list{display:grid;gap:10px}.accounting-position-item{display:grid;grid-template-columns:40px 1fr;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}.accounting-position-icon{width:40px;height:40px;display:grid;place-items:center;background:var(--soft);border-radius:9px;color:var(--gold);font-weight:700}.accounting-position-item small,.accounting-position-item strong,.accounting-position-item span{display:block}.accounting-position-item strong{font-size:17px;margin-top:2px}.accounting-position-item span{color:var(--muted);font-size:11px;margin-top:3px}.accounting-capital-box{margin-top:14px;padding:16px;border-radius:10px;background:var(--text);color:#fff}.accounting-capital-box small,.accounting-capital-box strong,.accounting-capital-box span{display:block}.accounting-capital-box strong{font-size:23px;margin:5px 0}.accounting-capital-box span{opacity:.75;font-size:12px}
.accounting-ledger-card{margin-top:18px}.account-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted);font-size:12px}.accounting-negative{color:#a23f3f}.accounting-note{margin-top:14px;padding:12px 14px;border-radius:9px;background:var(--soft);color:var(--muted);font-size:12px}
@media(max-width:1100px){.accounting-summary-grid{grid-template-columns:repeat(2,1fr)}.accounting-result-layout{grid-template-columns:1fr}.accounting-period-bar{grid-template-columns:1fr 1fr}.accounting-period-bar>div:first-child,.accounting-period-actions{grid-column:1/-1}}
@media(max-width:650px){.accounting-summary-grid{grid-template-columns:1fr}.accounting-period-bar{grid-template-columns:1fr}.accounting-period-bar>*{grid-column:1!important}.accounting-margin-grid{grid-template-columns:1fr}.accounting-period-actions .btn{flex:1}.accounting-result-layout{gap:12px}}

/* v191: tarjetas contables con costo y gastos separados */
.accounting-summary-grid-five{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1350px){.accounting-summary-grid-five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.accounting-summary-grid-five{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.accounting-summary-grid-five{grid-template-columns:1fr}}


/* V196 · Resumen ejecutivo basado en datos reales */
.executive-head{align-items:flex-start}.executive-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:18px}.executive-kpi{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:17px 16px;display:flex;justify-content:space-between;gap:12px;min-height:126px;box-shadow:0 1px 0 rgba(39,31,22,.02)}.executive-kpi>div{min-width:0;display:flex;flex-direction:column}.executive-kpi small{color:var(--muted);font-size:12px}.executive-kpi strong{font-size:23px;line-height:1.15;margin:13px 0 8px;letter-spacing:-.02em}.executive-kpi span{font-size:11px;color:var(--muted);line-height:1.4}.executive-kpi>b{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:var(--soft);flex:0 0 auto}.executive-kpi.positive{border-top:2px solid #4d8969}.executive-kpi.negative{border-top:2px solid #b45f5f}.executive-kpi.negative strong{color:#9d4545}.executive-main-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-bottom:16px}.executive-bottom-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,1fr);gap:16px}.executive-trend-card .card-body{padding:16px 20px 20px}.executive-legend{display:flex;gap:16px;font-size:11px;color:var(--muted)}.executive-legend span{display:flex;align-items:center;gap:6px}.executive-legend i{display:block;width:18px;height:4px;border-radius:10px;background:#917550}.executive-legend i.profit{background:#555d54}.executive-trend-chart{height:245px;display:grid;grid-template-columns:repeat(6,1fr);gap:18px;align-items:end;border-bottom:1px solid var(--line);padding:18px 16px 0;background:repeating-linear-gradient(to top,transparent 0,transparent 48px,rgba(139,121,96,.11) 49px,transparent 50px)}.executive-trend-column{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:9px}.executive-trend-bars{height:195px;width:100%;display:flex;justify-content:center;align-items:flex-end;gap:7px}.executive-trend-bars i{display:block;width:min(28%,22px);min-height:0;border-radius:5px 5px 1px 1px;background:#917550;transition:.2s}.executive-trend-bars i.profit{background:#555d54}.executive-trend-bars i.profit.negative{background:#b45f5f}.executive-trend-column>span{font-size:11px;color:var(--muted);text-transform:capitalize}executive-position-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.executive-position-grid button{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:15px;text-align:left;display:flex;flex-direction:column;gap:7px;cursor:pointer}.executive-position-grid button:hover{border-color:#a58e6e;box-shadow:0 4px 14px rgba(72,56,38,.06)}.executive-position-grid small{color:var(--muted)}.executive-position-grid strong{font-size:18px}.executive-position-grid span{font-size:11px;color:var(--muted)}.empty-dashboard-state{padding:28px;text-align:center;color:var(--muted)}
@media(max-width:1280px){.executive-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.executive-main-grid,.executive-bottom-grid{grid-template-columns:1fr}}
@media(max-width:760px){.executive-kpi-grid{grid-template-columns:1fr}.executive-position-grid{grid-template-columns:1fr}.executive-trend-chart{gap:7px;padding-left:4px;padding-right:4px}.executive-trend-bars{gap:3px}.executive-main-grid,.executive-bottom-grid{display:block}.executive-main-grid>.card,.executive-bottom-grid>.card{margin-bottom:14px}}

/* v200 — búsqueda global */
.top-actions .search{position:relative;overflow:visible;z-index:40}
.global-search-results{position:absolute;top:calc(100% + 8px);right:0;width:min(520px,calc(100vw - 32px));max-height:66vh;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 20px 55px rgba(30,24,18,.2);padding:7px;text-align:left}
.global-search-results.hidden{display:none}
.global-search-group+.global-search-group{border-top:1px solid var(--line);margin-top:6px;padding-top:6px}
.global-search-group-title{padding:7px 10px 5px;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.global-search-result{width:100%;border:0;background:transparent;color:var(--ink);display:grid;grid-template-columns:30px 1fr 20px;gap:9px;align-items:center;padding:9px 10px;border-radius:8px;text-align:left;cursor:pointer}
.global-search-result:hover,.global-search-result:focus{background:var(--surface-2);outline:0}
.global-search-result-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;background:#f4ede3;color:#8f7654}
.global-search-result strong,.global-search-result small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.global-search-result strong{font-size:12px;font-weight:750}.global-search-result small{font-size:11px;color:var(--muted);margin-top:2px}.global-search-result b{font-size:14px;color:var(--muted)}
.global-search-hint,.global-search-empty{padding:18px;text-align:center;color:var(--muted);font-size:12px}.global-search-empty{display:grid;gap:4px}.global-search-empty strong{color:var(--ink)}
.global-search-highlight td{background:#fff3cf!important;transition:background .3s}
@media(max-width:1150px){.top-actions .search{display:flex}.top-actions .search input{width:190px}}
@media(max-width:850px){.top-actions .search{display:none}}

/* v202 — logo centrado en la cabecera lateral */
.sidebar-brand{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:10px 12px 14px!important;
  text-align:center!important;
}
.sidebar-brand img{
  display:block!important;
  width:min(170px,92%)!important;
  max-width:100%!important;
  max-height:58px!important;
  margin:0 auto!important;
  object-fit:contain!important;
  object-position:center!important;
}

/* V203 — rango de fechas en Caja y bancos */
.cash-date-field{display:flex;align-items:center;gap:8px;min-width:0;padding:0 10px;border:1px solid var(--line,#ddd3c5);border-radius:8px;background:#fff;min-height:44px}
.cash-date-field span{font-size:11px;color:var(--muted);white-space:nowrap}
.cash-date-field .filter{border:0!important;padding:0!important;min-height:40px;background:transparent;box-shadow:none!important}
@media(max-width:1200px){.cash-filter-bar{grid-template-columns:2fr repeat(2,1fr)}.cash-date-field{width:100%}}
@media(max-width:760px){.cash-date-field{grid-column:auto}}
@media(max-width:430px){.cash-date-field{grid-column:1;width:100%}}

/* V204 — rango visible en Caja y Bancos */
.cash-filter-bar .product-result-count{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:2px;min-width:150px}
.cash-filter-bar .product-result-count strong{font-size:11px;color:var(--ink);white-space:nowrap}
.cash-filter-bar .product-result-count span{font-size:10px;color:var(--muted);white-space:nowrap}
@media(max-width:1200px){.cash-filter-bar .product-result-count{align-items:flex-start}}

/* v209: buscadores de producto en Traslados */
.transfer-form .search-select{position:relative;margin-top:5px}
.transfer-form .search-select>input[type="search"]{width:100%;padding-right:38px}
.transfer-form .search-results{position:absolute;z-index:90;top:calc(100% + 4px);left:0;right:0;max-height:280px;overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 16px 38px rgba(0,0,0,.16);padding:5px}
.transfer-form .search-results.hidden{display:none}
.transfer-form .search-results button{width:100%;border:0;background:transparent;text-align:left;padding:10px 11px;border-radius:7px;display:grid;gap:4px;cursor:pointer;color:var(--text)}
.transfer-form .search-results button:hover,.transfer-form .search-results button:focus{background:var(--surface-2);outline:0}
.transfer-form .search-results strong{font-size:12px}.transfer-form .search-results small{font-size:11px;color:var(--muted)}
.transfer-form label>small{display:block;margin-top:5px;color:var(--muted);font-size:11px}

/* ===== V215: ajuste responsive exclusivo para tablet y móvil ===== */
@media (max-width:1024px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .app{display:block!important;width:100%;min-width:0}
  .main,.content,.module-head,.card,.table-card{min-width:0;max-width:100%}
  .sidebar{overflow:hidden;display:flex!important;flex-direction:column}
  .sidebar-brand{flex:0 0 auto}
  .nav{min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:24px}
  .sidebar-footer{flex:0 0 auto;background:#fff}
  .topbar{height:auto!important;min-height:72px;flex-wrap:nowrap;align-items:center}
  .topbar-title{overflow:hidden}
  .topbar-title h1{max-width:100%;font-size:20px}
  .top-actions{margin-left:auto;min-width:0;white-space:nowrap}
  .top-actions .search{display:none!important}
  .content{width:100%;padding:18px 18px 36px!important}
  .module-head{align-items:flex-start!important;gap:14px;flex-wrap:wrap}
  .module-head>div:first-child{min-width:0;flex:1 1 320px}
  .module-head .toolbar{flex:1 1 auto;justify-content:flex-end}
  .kpi-grid,.executive-kpi-grid,.accounting-summary-grid,.accounting-summary-grid-five{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-grid,.executive-main-grid,.executive-bottom-grid,.accounting-result-layout,.split{grid-template-columns:1fr!important}
  .card-head{gap:12px;flex-wrap:wrap}
  .card-head>*{min-width:0}
  .table-card,.table-wrap{width:100%;max-width:100%}
  .table-wrap{overflow-x:auto!important;overscroll-behavior-inline:contain}
  .data-table{width:max-content;min-width:100%}
  .action-buttons,.purchase-row-actions{flex-wrap:wrap!important}
  .modal{padding:16px}
  .modal-card{width:min(920px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px);max-height:94dvh}
  .modal-body{max-width:100%;overflow-x:hidden}
  .form-grid,.purchase-header-grid,.sale-header-grid{min-width:0}
  .purchase-compact-form,.sale-form,.transfer-form{min-width:0;max-width:100%}
  .purchase-section,.purchase-product-entry,.purchase-totals,.sale-product-entry,.sale-total-grid{min-width:0;max-width:100%}
  .search-results,.global-search-results{max-width:calc(100vw - 48px)}
  .production-board{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .executive-position-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:768px){
  body{font-size:14px}
  .topbar{min-height:64px;padding:9px 10px!important;gap:8px}
  .mobile-menu-button{display:inline-grid!important;width:42px;height:42px;flex:0 0 42px}
  .topbar .eyebrow{display:none!important}
  .topbar-title{flex:1 1 auto;min-width:0}
  .topbar-title h1{margin:0;font-size:18px;line-height:1.2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
  .top-actions{gap:6px;flex:0 0 auto}
  .top-actions .api-status,.top-actions .search,.top-actions .icon-btn{display:none!important}
  #exportButton{width:42px!important;min-width:42px;padding:0!important;font-size:0!important}
  #exportButton::after{content:"XLS";font-size:10px;font-weight:700}
  #quickAction{width:42px!important;min-width:42px;padding:0!important;font-size:0!important}
  #quickAction::after{content:"+";font-size:22px;line-height:1}
  .content{padding:14px 10px 28px!important}
  .module-head{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-bottom:14px}
  .module-head h2{font-size:19px;line-height:1.25}
  .module-head p{font-size:13px;line-height:1.4}
  .toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
  .toolbar>*{width:100%!important;min-width:0;min-height:44px}
  .toolbar>*:only-child{grid-column:1/-1}
  .btn,.filter,input,select,textarea{font-size:16px}
  .btn{min-height:44px;padding:9px 11px}
  .kpi-grid,.executive-kpi-grid,.accounting-summary-grid,.accounting-summary-grid-five,.executive-position-grid,.production-board{grid-template-columns:1fr!important;gap:10px!important}
  .kpi{padding:14px!important}
  .kpi h3{font-size:22px!important;overflow-wrap:anywhere}
  .card{border-radius:7px}
  .card-head{padding:13px 14px!important;align-items:flex-start!important}
  .card-head h2{font-size:15px;line-height:1.3}
  .card-body{padding:14px!important}
  .dashboard-grid,.executive-main-grid,.executive-bottom-grid{gap:10px!important;margin-top:10px!important}
  .product-filter-bar,.purchase-filter-bar,.cash-filter-bar,.finance-filter-bar{display:grid!important;grid-template-columns:1fr!important;padding:10px!important;gap:8px!important;border-radius:7px!important}
  .product-filter-bar>*,.purchase-filter-bar>*,.cash-filter-bar>*,.finance-filter-bar>*{grid-column:1!important;width:100%!important;min-width:0!important}
  .product-result-count,.purchase-result-count{padding:2px 0;text-align:left!important}
  .cash-date-field{width:100%;min-height:44px}
  .cash-date-field input{min-width:0;width:100%}
  .table-card{overflow:hidden;border-radius:7px}
  .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  .data-table{min-width:760px!important}
  .data-table th{font-size:10px!important;padding:10px 11px!important}
  .data-table td{font-size:12px!important;padding:10px 11px!important}
  .data-table th:first-child,.data-table td:first-child{position:sticky;left:0;z-index:2;background:#fff!important;box-shadow:4px 0 7px rgba(0,0,0,.06)}
  .data-table th:first-child{z-index:3;background:#f4eee4!important}
  .action-buttons,.purchase-row-actions{gap:5px!important}
  .action-buttons .btn,.purchase-row-actions .btn,.data-table .btn{min-height:38px!important;padding:7px 9px!important;font-size:12px!important}
  .form-grid,.sale-header-grid,.sale-total-grid,.sale-add-row,.sale-item-row,.purchase-header-grid,.purchase-detail-grid,.accounting-period-bar,.accounting-margin-grid{grid-template-columns:1fr!important}
  .form-grid .wide,.purchase-header-grid>*,.sale-header-grid>*,.sale-total-grid>*,.sale-add-row>*,.sale-item-row>*{grid-column:1!important}
  .purchase-product-entry,.sale-product-entry,.purchase-as-sales-form .purchase-product-entry{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .purchase-product-entry>*,.sale-product-entry>*{grid-column:1!important;width:100%!important;min-width:0}
  .purchase-item-row,.sale-item-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .purchase-item-row>*:first-child,.sale-item-row>*:first-child{grid-column:1/-1!important}
  .purchase-totals,.purchase-sales-totals{grid-template-columns:1fr 1fr!important}
  .purchase-totals>*,.purchase-sales-totals>*{grid-column:auto!important}
  .purchase-totals>*:last-child,.purchase-sales-totals>*:last-child{grid-column:1/-1!important}
  .search-results{left:0!important;right:0!important;max-height:230px!important;width:auto!important}
  .transfer-form .search-results{max-height:220px!important}
  .modal{padding:0!important;align-items:end!important}
  .modal-card{width:100%!important;max-width:none!important;max-height:96dvh!important;border-radius:14px 14px 0 0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  .modal-head{flex:0 0 auto;padding:13px 14px!important;position:sticky;top:0;background:#fff;z-index:5}
  .modal-head h2{font-size:19px!important}
  .modal-body{padding:13px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .form-actions{position:sticky!important;bottom:-13px;background:#fff;padding:11px 0 13px!important;margin-top:14px!important;border-top:1px solid var(--line);display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;z-index:4}
  .form-actions .btn{width:100%!important}
  .line-chart,.executive-trend-chart{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .line-chart svg{min-width:560px}
  .toast{left:10px!important;right:10px!important;bottom:10px!important;text-align:center}
  .login-panel{min-height:100dvh;padding:12px!important}
  .login-card{width:100%;padding:22px 18px!important}
  .login-card h1{font-size:28px}
}

@media (max-width:480px){
  .sidebar{width:min(88vw,320px)!important}
  .content{padding-left:8px!important;padding-right:8px!important}
  .toolbar{grid-template-columns:1fr!important}
  .toolbar>*{grid-column:1!important}
  .purchase-item-row,.sale-item-row,.purchase-totals,.purchase-sales-totals{grid-template-columns:1fr!important}
  .purchase-item-row>*,.sale-item-row>*,.purchase-totals>*,.purchase-sales-totals>*{grid-column:1!important}
  .form-actions{grid-template-columns:1fr!important}
  .card-head{display:block!important}
  .card-head .text-btn,.card-head .btn{margin-top:8px}
  .data-table{min-width:700px!important}
  .kpi h3{font-size:20px!important}
  .modal-body{padding:11px!important}
  .search-results{max-height:190px!important}
}

/* v216 — adaptación completa para escritorio sin alterar móvil/tablet */
@media (min-width:1025px){
  html,body{width:100%;overflow-x:hidden}
  .app{width:100%;min-width:0}
  .main{min-width:0;width:100%}
  .topbar{width:100%;min-width:0}
  .topbar-title{min-width:0;flex:1 1 auto}
  .topbar-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top-actions{flex:0 0 auto;min-width:0}
  .content{width:100%;min-width:0}
  .content>*{min-width:0}
  .module-head{gap:18px;align-items:flex-start}
  .module-head>div:first-child{min-width:0;flex:1 1 auto}
  .module-head .toolbar{justify-content:flex-end;flex:0 1 auto}
  .card,.table-card,.table-wrap{min-width:0;max-width:100%}
  .table-wrap{overflow:auto;overscroll-behavior-x:contain}
  .data-table{width:100%;min-width:880px}
  .data-table th,.data-table td{white-space:nowrap}
  .data-table td:nth-child(2),.data-table td:nth-child(3),.data-table td:nth-child(4){white-space:normal}
  .modal-card{width:min(980px,calc(100vw - 70px));max-width:calc(100vw - 70px)}
  .modal-body{min-width:0;overflow-x:hidden}
  .purchase-compact-form,.sale-form,.transfer-form,.form-grid{min-width:0;max-width:100%}
  .product-filter-bar,.purchase-filter-bar,.cash-filter-bar,.finance-filter-bar{min-width:0;max-width:100%}
  .product-filter-bar>*,.purchase-filter-bar>*,.cash-filter-bar>*,.finance-filter-bar>*{min-width:0}
  .global-search-results{max-width:min(560px,calc(100vw - 80px))}
}

/* Escritorios compactos y portátiles */
@media (min-width:1025px) and (max-width:1279px){
  .app{grid-template-columns:232px minmax(0,1fr)}
  .sidebar{padding-left:9px;padding-right:9px}
  .sidebar-brand img{width:156px}
  .nav button{padding:10px 10px;gap:9px;font-size:12px}
  .topbar{height:82px;padding:14px 20px}
  .topbar h1{font-size:21px}
  .content{padding:20px 20px 42px}
  .top-actions .search input{width:180px}
  .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .executive-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-grid,.executive-main-grid,.executive-bottom-grid{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .production-board{grid-template-columns:repeat(2,minmax(0,1fr))}
  .accounting-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cash-filter-bar{grid-template-columns:minmax(220px,1.5fr) repeat(2,minmax(130px,.8fr));}
  .cash-filter-bar>*{min-height:42px}
}

/* Escritorios estándar */
@media (min-width:1280px) and (max-width:1599px){
  .app{grid-template-columns:252px minmax(0,1fr)}
  .topbar{padding-left:26px;padding-right:26px}
  .content{padding:24px 26px 48px}
  .top-actions .search input{width:240px}
  .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .executive-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .executive-main-grid{grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr)}
  .executive-bottom-grid{grid-template-columns:minmax(0,1.15fr) minmax(320px,.9fr)}
  .production-board{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Monitores grandes y ultrawide */
@media (min-width:1600px){
  .app{grid-template-columns:280px minmax(0,1fr)}
  .topbar{padding-left:max(32px,calc((100vw - 1900px)/2 + 32px));padding-right:max(32px,calc((100vw - 1900px)/2 + 32px))}
  .content{width:min(100%,1900px);margin:0 auto;padding:30px 34px 58px}
  .top-actions .search input{width:320px}
  .kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .executive-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:minmax(0,1.7fr) minmax(360px,.8fr)}
  .executive-main-grid{grid-template-columns:minmax(0,1.8fr) minmax(360px,.85fr)}
  .executive-bottom-grid{grid-template-columns:minmax(0,1.35fr) minmax(380px,.9fr)}
  .production-board{grid-template-columns:repeat(4,minmax(0,1fr))}
  .data-table th{padding:14px 16px}
  .data-table td{padding:15px 16px}
  .modal-card{width:min(1120px,calc(100vw - 120px))}
}

/* Escritorio muy ancho: evita contenido excesivamente estirado */
@media (min-width:2200px){
  .content{width:1960px}
  .topbar{padding-left:calc((100vw - 1960px)/2 + 34px);padding-right:calc((100vw - 1960px)/2 + 34px)}
}


/* v230 · Acciones de traslados en una sola fila */
.transfer-action-cell{min-width:205px;white-space:nowrap}
.transfer-action-buttons{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;align-items:center;width:100%;flex-wrap:nowrap!important}
.transfer-action-buttons .btn{width:100%;min-width:0!important;white-space:nowrap;padding-left:9px!important;padding-right:9px!important}
@media(max-width:720px){
  .transfer-action-cell{min-width:190px}
  .transfer-action-buttons{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .transfer-action-buttons .btn{font-size:11px!important;padding-left:7px!important;padding-right:7px!important}
}


/* ===== V231: Traslados · visual alineado con maqueta aprobada ===== */
.nav button{gap:12px!important;padding-left:12px!important}
.nav-icon{width:20px;height:20px;display:grid;place-items:center;flex:0 0 20px;color:#344256}
.nav-icon svg{width:19px;height:19px;display:block}
.nav button.active .nav-icon,.nav button:hover .nav-icon{color:#111}
.sidebar-brand{height:74px!important;padding:4px 8px 12px!important}
.sidebar-brand img{width:184px!important;max-height:58px!important}
.sidebar-footer .avatar{width:44px;height:44px;background:#e8dac0!important;border:0!important;font-weight:500}
.text-btn{padding-top:8px!important}
.topbar-user-avatar{width:42px;height:42px;border-radius:50%;background:#e8dac0;display:grid;place-items:center;color:#171717;font-size:13px;flex:0 0 auto}
.topbar-user-copy{display:flex;flex-direction:column;line-height:1.25;min-width:96px}
.topbar-user-copy strong{font-size:13px;font-weight:600;color:#111}
.topbar-user-copy small{font-size:12px;color:#596579}

.topbar-user-menu{font-size:18px}


.search-kbd{border:1px solid #d3d6dc;border-radius:5px;padding:4px 7px;font-size:11px;color:#4b5563;white-space:nowrap;background:#fff}
.top-search-icon{font-size:22px;line-height:1;color:#344256;transform:rotate(-18deg)}

body.transfer-view{background:#fafafa!important}
body.transfer-view .app,body.transfer-view .main,body.transfer-view .content{background:#fafafa!important}
body.transfer-view .app{grid-template-columns:250px minmax(0,1fr)!important}
body.transfer-view .sidebar{width:250px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;padding:12px 14px 16px!important}
body.transfer-view .sidebar-brand,body.transfer-view .sidebar-footer{border-color:#ddd8d0!important}
body.transfer-view .nav{padding:10px 0!important}
body.transfer-view .nav-group{font-size:12px!important;color:#5a6474!important;letter-spacing:0!important;padding:13px 8px 6px!important;font-family:Arial,"Helvetica Neue",sans-serif!important}
body.transfer-view .nav button{color:#1b2738!important;padding:9px 12px!important;border-radius:8px!important;margin:1px 0!important;font-size:14px!important}
body.transfer-view .nav button:hover{background:#faf7f1!important}
body.transfer-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;font-weight:600!important;color:#111!important;box-shadow:none!important;position:relative}
body.transfer-view .nav button.active:before{content:"";position:absolute;left:-7px;top:0;bottom:0;width:3px;background:#9b6b20;border-radius:0 4px 4px 0}
body.transfer-view .main{min-width:0}
body.transfer-view .topbar{height:74px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;padding:0 30px!important;display:flex!important;align-items:center!important}
body.transfer-view .topbar-title{display:none!important}
body.transfer-view .top-actions{width:100%;margin-left:0!important;gap:16px!important;flex-wrap:nowrap!important}
body.transfer-view .top-actions .search{order:-10;width:min(710px,58vw)!important;max-width:none!important;height:43px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;padding:0 12px!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important;position:relative}
body.transfer-view .top-actions .search input{width:100%!important;padding:0 10px!important;font-size:13px!important;color:#111!important}
body.transfer-view .api-status{margin-left:auto;border-color:#d8dbdf!important;border-radius:22px!important;padding:9px 14px!important;color:#222!important;background:#fff!important}
body.transfer-view .api-status.online:before{background:#3fa45d!important}
body.transfer-view #themeBtn,body.transfer-view #exportButton,body.transfer-view #quickAction{display:none!important}
body.transfer-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important}

.transfer-page{--t-bg:#fafafa;--t-panel:#fff;--t-text:#101827;--t-muted:#596579;--t-line:#ddd8d0;--t-soft-line:#ece8e1;--t-gold:#9b6b20;--t-gold-2:#b28333;--t-gold-soft:#f4ecdd;--t-green:#1f8b4c;--t-green-soft:#dff6e7;--t-red:#ea2b2b;color:var(--t-text);font-family:Inter,Arial,"Helvetica Neue",sans-serif!important}
.transfer-breadcrumbs{font-size:12px;color:#586273;margin:0 0 12px 85px}.transfer-breadcrumbs span{margin:0 4px;color:#989fa9}
.transfer-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:25px;margin-bottom:26px}.transfer-title-group{display:flex;gap:18px;align-items:center}.transfer-title-icon{width:64px;height:60px;border-radius:12px;background:var(--t-gold-soft);display:grid;place-items:center;flex:0 0 auto}.transfer-title-icon svg{width:29px;height:29px;stroke-width:1.8}.transfer-page-heading h1{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;font-weight:700!important;margin:0 0 2px!important;letter-spacing:-.7px;color:#101827!important}.transfer-page-heading p{margin:0;color:#3e4b5d!important;font-size:15px!important;line-height:1.45}.transfer-heading-actions{display:flex;gap:10px;align-self:center}
.transfer-btn{height:46px;border-radius:9px;padding:0 19px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:600!important;border:1px solid transparent;background:#fff;color:#111;cursor:pointer;font-family:Inter,Arial,sans-serif!important;white-space:nowrap}.transfer-btn svg{width:18px;height:18px}.transfer-btn.secondary{border-color:#ccb890;background:#fff;color:#111}.transfer-btn.primary{background:linear-gradient(#a77b31,#95691f);color:#fff;border-color:#95691f;box-shadow:0 1px 2px rgba(0,0,0,.08)}.transfer-btn.compact{height:40px;padding:0 18px}
.transfer-stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.transfer-stat-card{min-height:118px;border:1px solid var(--t-line);background:#fff;border-radius:8px;display:flex;align-items:center;padding:18px;gap:20px;box-shadow:0 1px 3px rgba(15,23,42,.06)}.transfer-stat-icon{width:56px;height:56px;border-radius:10px;background:#f3eee6;display:grid;place-items:center;flex:0 0 auto}.transfer-stat-icon svg{width:28px;height:28px}.transfer-stat-icon.gold svg{color:var(--t-gold)}.transfer-stat-body{display:flex;flex-direction:column;min-width:0}.transfer-stat-body>span{color:#596579;font-size:13px;margin-bottom:6px}.transfer-stat-body strong{font-family:Inter,Arial,sans-serif!important;font-size:27px!important;font-weight:700!important;letter-spacing:-.5px;white-space:nowrap;color:#101827!important}.transfer-stat-body small{color:#596579!important;font-size:13px;margin-top:3px}.transfer-stat-trend{margin-left:auto;display:flex;align-self:stretch;flex-direction:column;justify-content:space-between;align-items:flex-end}.transfer-stat-trend b{background:var(--t-green-soft);color:#1f8248;font-weight:600;font-size:11px;border-radius:7px;padding:6px 8px}.transfer-stat-trend svg{width:74px;height:30px}.transfer-stat-trend polyline{fill:none;stroke:var(--t-gold);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.transfer-table-card{border:1px solid var(--t-line);background:#fff;border-radius:9px;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.06)}.transfer-table-toolbar{padding:13px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--t-soft-line)}.transfer-table-search{height:41px;width:560px;max-width:47%;border:1px solid #d7d9dd;border-radius:8px;display:flex;align-items:center;padding:0 12px}.transfer-table-search svg{width:19px;height:19px;color:#344256;flex:0 0 auto}.transfer-table-search input{border:0!important;outline:0!important;width:100%;padding:0 10px!important;background:transparent!important;color:#111!important;font-size:13px!important;box-shadow:none!important}.transfer-toolbar-spacer{flex:1}.transfer-results-count{font-size:12px;color:#596579;white-space:nowrap}.transfer-period-select{height:40px;border:1px solid #d7dadd;border-radius:8px;background:#fff;display:flex;align-items:center;gap:8px;padding:0 12px;color:#263244;white-space:nowrap}.transfer-period-select svg{width:17px;height:17px;flex:0 0 auto}.transfer-period-select select{border:0;background:transparent;appearance:none;outline:0;color:#263244;font:inherit;font-size:12px;padding:0;cursor:pointer}.transfer-period-select svg:last-child{width:15px}.transfer-filter-panel{display:flex;gap:10px;align-items:end;padding:12px 13px;border-bottom:1px solid var(--t-soft-line);background:#fcfbf9}.transfer-filter-panel label{display:grid;gap:5px;font-size:11px;color:#596579;font-weight:600}.transfer-filter-panel input{height:38px;border:1px solid #d7dadd;border-radius:7px;padding:0 10px;background:#fff;color:#111}
.transfer-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}.transfer-data-table{width:100%!important;border-collapse:collapse!important;min-width:1280px!important;font-family:Inter,Arial,sans-serif!important}.transfer-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}.transfer-data-table th{font-size:10px!important;font-weight:500!important;letter-spacing:0!important;text-align:left!important;color:#3d4653!important;padding:12px 16px!important;white-space:nowrap!important;background:transparent!important;border-bottom:0!important}.transfer-data-table td{font-size:12px!important;padding:9px 16px!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;vertical-align:middle!important;background:#fff!important;white-space:nowrap}.transfer-data-table tbody tr:hover td{background:#fcfbf8!important}.transfer-data-table .transfer-doc strong{font-weight:700}.transfer-product-code{display:block;font-weight:600}.transfer-product-name{display:block!important;font-size:10px!important;color:#465165!important;margin-top:2px!important;font-weight:400!important}.transfer-arrow{text-align:center!important;width:30px}.transfer-number{white-space:nowrap;font-variant-numeric:tabular-nums;text-align:left!important;font-weight:400!important}.transfer-note{max-width:210px;overflow:hidden;text-overflow:ellipsis}.transfer-empty{text-align:center!important;padding:30px!important;color:#596579!important}
.transfer-action-cell{min-width:270px!important;white-space:nowrap!important}.transfer-action-buttons{display:flex!important;grid-template-columns:none!important;gap:8px!important;flex-wrap:nowrap!important;width:auto!important}.transfer-action-btn{height:36px;min-width:68px;border-radius:7px;border:1px solid #d7dadd;background:#fff;color:#172033;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;font-weight:600;font-size:12px;cursor:pointer}.transfer-action-btn svg{width:15px;height:15px}.transfer-action-btn.danger{border-color:#f4bcbc;color:var(--t-red)}
.transfer-table-footer{display:flex;align-items:center;justify-content:space-between;padding:12px 16px 13px;font-size:12px;color:#465165}.transfer-pagination-area{display:flex;align-items:center;gap:24px}.transfer-per-page{height:34px;padding:0 13px;border:1px solid #d7dadd;border-radius:7px;background:#fff;display:flex;align-items:center;gap:8px}.transfer-per-page select{border:0;background:transparent;appearance:none;outline:0;color:#263244;font:inherit;font-size:12px;cursor:pointer}.transfer-per-page svg{width:15px;height:15px}.transfer-pagination{display:flex;align-items:center;gap:8px}.transfer-pagination button{width:34px;height:34px;border:1px solid #d7dadd;background:#fff;border-radius:6px;display:grid;place-items:center;color:#293548;cursor:pointer}.transfer-pagination button svg{width:15px;height:15px}.transfer-pagination button.active{background:#9a712f;color:#fff;border-color:#9a712f}.transfer-pagination button:disabled{opacity:.42;cursor:not-allowed}.transfer-pagination span{padding:0 2px}

@media(max-width:1200px){body.transfer-view .app{grid-template-columns:220px minmax(0,1fr)!important}body.transfer-view .sidebar{width:220px!important}.transfer-stats-grid{grid-template-columns:1fr}.transfer-page-heading{flex-direction:column}.transfer-heading-actions{align-self:flex-start}.transfer-breadcrumbs{margin-left:0}.topbar-user-copy{display:none}body.transfer-view .top-actions .search{width:min(650px,64vw)!important}.transfer-action-cell{min-width:250px!important}}
@media(max-width:1024px){body.transfer-view .app{grid-template-columns:1fr!important}body.transfer-view .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)}body.transfer-view .sidebar.open{transform:translateX(0)}body.transfer-view .topbar{padding:0 16px!important}.transfer-page{min-width:0}.transfer-stats-grid{grid-template-columns:1fr}.transfer-table-search{max-width:none;width:100%}.transfer-table-toolbar{flex-wrap:wrap}.transfer-toolbar-spacer{display:none}.transfer-results-count{margin-left:auto}.transfer-table-footer{align-items:flex-start;gap:16px;flex-direction:column}.transfer-pagination-area{width:100%;justify-content:space-between;gap:10px}.transfer-filter-panel{flex-wrap:wrap}.transfer-page-heading h1{font-size:24px!important}.transfer-title-icon{width:52px;height:52px}.transfer-heading-actions{width:100%}.transfer-heading-actions .transfer-btn{flex:1}.transfer-breadcrumbs{margin-left:0}.topbar-user-avatar,.topbar-user-menu{display:none!important}.search-kbd{display:none}}
@media(max-width:720px){body.transfer-view .content{padding:18px 14px 24px!important}body.transfer-view .top-actions{gap:8px!important}body.transfer-view .api-status{display:none!important}body.transfer-view .top-actions .search{width:100%!important}.transfer-title-group{align-items:flex-start}.transfer-page-heading{gap:14px;margin-bottom:18px}.transfer-page-heading p{font-size:13px!important}.transfer-heading-actions{display:grid;grid-template-columns:1fr 1fr}.transfer-btn{padding:0 11px}.transfer-table-toolbar{display:grid;grid-template-columns:1fr 1fr}.transfer-table-search{grid-column:1/-1;max-width:none}.transfer-toolbar-spacer{display:none}.transfer-results-count{margin:0;align-self:center}.transfer-period-select{min-width:0}.transfer-period-select select{width:100%}.transfer-table-footer{padding:12px}.transfer-pagination-area{flex-direction:column;align-items:flex-start}.transfer-pagination{gap:4px;flex-wrap:wrap}.transfer-pagination button{width:30px;height:30px}.transfer-filter-panel{display:grid;grid-template-columns:1fr 1fr}.transfer-filter-panel .transfer-btn{grid-column:1/-1}.transfer-stat-card{min-height:100px;padding:15px;gap:13px}.transfer-stat-body strong{font-size:23px!important}.transfer-stat-trend svg{display:none}.transfer-action-cell{min-width:235px!important}.transfer-action-btn{min-width:64px;padding:0 9px;font-size:11px}}

/* V231: los elementos extra de la barra superior se muestran solo en Traslados. */



body.transfer-view .topbar-user-avatar{display:grid}
body.transfer-view .topbar-user-copy{display:flex}
body.transfer-view .topbar-user-menu{display:grid}
body.transfer-view .search-kbd{display:inline-block}
@media(max-width:1200px){body.transfer-view .topbar-user-copy{display:none}}
@media(max-width:1024px){body.transfer-view .topbar-user-avatar,body.transfer-view .topbar-user-menu{display:none!important}}
@media(max-width:720px){body.transfer-view .search-kbd{display:none!important}}
\n\n/* V232 hard override: reproduce the supplied Traslados reference and defeat legacy module rules. */
html body.transfer-view .topbar .topbar-title{display:none!important}
html body.transfer-view .topbar #themeBtn,
html body.transfer-view .topbar #exportButton,
html body.transfer-view .topbar #quickAction{display:none!important}
html body.transfer-view #content>.module-head,
html body.transfer-view #content>.product-filter-bar{display:none!important}
html body.transfer-view .transfer-page{display:block!important}
html body.transfer-view .transfer-table-card .transfer-data-table th:last-child,
html body.transfer-view .transfer-table-card .transfer-data-table td:last-child{display:table-cell!important}
html body.transfer-view .transfer-stat-trend b{min-width:48px;text-align:center}
html body.transfer-view .sidebar-brand img{max-width:150px!important;max-height:58px!important;object-fit:contain!important}


/* ===== V233 EXACT DESKTOP — replica la captura de referencia de Traslados ===== */
@media (min-width:1201px){
  html body.transfer-view{font-size:16px!important;background:#fafafa!important}
  html body.transfer-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.transfer-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.transfer-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-bottom:1px solid #ddd8d0!important}
  html body.transfer-view .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;filter:none!important;opacity:1!important}
  html body.transfer-view .nav{padding:8px 0!important}
  html body.transfer-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.transfer-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.transfer-view .nav button .nav-icon{width:20px!important;min-width:20px!important;display:grid!important;place-items:center!important}
  html body.transfer-view .nav button .nav-icon svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.transfer-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#151515!important;font-weight:600!important;box-shadow:none!important}
  html body.transfer-view .nav button.active:before{left:-7px!important;width:3px!important;background:#9b6b20!important}
  html body.transfer-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.transfer-view .sidebar-footer .avatar{width:42px!important;height:42px!important;border-radius:50%!important;background:#eadfc9!important;color:#171717!important;font-size:14px!important}
  html body.transfer-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.transfer-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.transfer-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}

  html body.transfer-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;position:sticky!important;top:0!important}
  html body.transfer-view .topbar .topbar-title{display:none!important}
  html body.transfer-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
  html body.transfer-view .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important}
  html body.transfer-view .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
  html body.transfer-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
  html body.transfer-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
  html 
  html 
  html body.transfer-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
  html body.transfer-view .topbar-user-copy{display:flex!important;min-width:96px!important}
  html body.transfer-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
  html body.transfer-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
  html body.transfer-view .topbar-user-menu{display:grid!important}
  html body.transfer-view #themeBtn,html body.transfer-view #exportButton,html body.transfer-view #quickAction{display:none!important}

  html body.transfer-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
  html body.transfer-view .transfer-page{font-size:16px!important;color:#101827!important}
  html body.transfer-view .transfer-breadcrumbs{margin:0 0 12px 85px!important;font-size:12px!important;color:#586273!important}
  html body.transfer-view .transfer-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}
  html body.transfer-view .transfer-title-group{display:flex!important;align-items:center!important;gap:18px!important}
  html body.transfer-view .transfer-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important}
  html body.transfer-view .transfer-title-icon svg{width:29px!important;height:29px!important}
  html body.transfer-view .transfer-page-heading h1{font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
  html body.transfer-view .transfer-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
  html body.transfer-view .transfer-heading-actions{display:flex!important;align-self:center!important;gap:10px!important}
  html body.transfer-view .transfer-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;gap:9px!important;font-size:13px!important;font-weight:600!important}
  html body.transfer-view .transfer-btn.compact{height:40px!important;padding:0 18px!important}

  html body.transfer-view .transfer-stats-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}
  html body.transfer-view .transfer-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:18px!important;gap:20px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
  html body.transfer-view .transfer-stat-icon{width:56px!important;height:56px!important;border-radius:10px!important;background:#f3eee6!important}
  html body.transfer-view .transfer-stat-icon svg{width:28px!important;height:28px!important}
  html body.transfer-view .transfer-stat-body>span{font-size:13px!important;margin-bottom:6px!important;color:#596579!important}
  html body.transfer-view .transfer-stat-body strong{font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important}
  html body.transfer-view .transfer-stat-body small{font-size:13px!important;margin-top:3px!important;color:#596579!important}
  html body.transfer-view .transfer-stat-trend b{font-size:11px!important;padding:6px 8px!important;border-radius:7px!important;background:#dff6e7!important;color:#1f8248!important}

  html body.transfer-view .transfer-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}
  html body.transfer-view .transfer-table-toolbar{min-height:66px!important;padding:13px!important;gap:12px!important;border-bottom:1px solid #ece8e1!important}
  html body.transfer-view .transfer-table-search{width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important}
  html body.transfer-view .transfer-table-search input{font-size:13px!important}
  html body.transfer-view .transfer-results-count{font-size:12px!important;color:#596579!important}
  html body.transfer-view .transfer-period-select{height:40px!important;padding:0 12px!important;border:1px solid #d7dadd!important;border-radius:8px!important;font-size:12px!important}
  html body.transfer-view .transfer-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important}
  html body.transfer-view .transfer-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
  html body.transfer-view .transfer-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.2!important;color:#3d4653!important;background:transparent!important}
  html body.transfer-view .transfer-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important}
  html body.transfer-view .transfer-product-name{font-size:10px!important;line-height:1.2!important;margin-top:2px!important;color:#465165!important}
  html body.transfer-view .transfer-action-cell{min-width:270px!important}
  html body.transfer-view .transfer-action-buttons{display:flex!important;gap:8px!important;flex-wrap:nowrap!important}
  html body.transfer-view .transfer-action-btn{height:36px!important;min-width:68px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:600!important;background:#fff!important}
  html body.transfer-view .transfer-action-btn.danger{border-color:#f4bcbc!important;color:#ea2b2b!important}
  html body.transfer-view .transfer-table-footer{min-height:58px!important;padding:12px 16px 13px!important;font-size:12px!important;color:#465165!important}
  html body.transfer-view .transfer-pagination button{width:34px!important;height:34px!important;border-radius:6px!important}
}


/* ===== V234 EXACT — Compras y proveedores replica de la captura suministrada ===== */


body.purchase-view .topbar-user-avatar{display:grid}
body.purchase-view .topbar-user-copy{display:flex}
body.purchase-view .topbar-user-menu{display:grid}
body.purchase-view .search-kbd{display:inline-block}


html body.purchase-view .topbar .topbar-title{display:none!important}
html body.purchase-view .topbar #themeBtn,
html body.purchase-view .topbar #exportButton,
html body.purchase-view .topbar #quickAction{display:none!important}
html body.purchase-view .sidebar-brand img{max-width:150px!important;max-height:58px!important;object-fit:contain!important}

@media (min-width:1201px){
  html body.purchase-view{font-size:16px!important;background:#fafafa!important}
  html body.purchase-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.purchase-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.purchase-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-bottom:1px solid #ddd8d0!important}
  html body.purchase-view .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;filter:none!important;opacity:1!important}
  html body.purchase-view .nav{padding:8px 0!important}
  html body.purchase-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.purchase-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.purchase-view .nav button .nav-icon{width:20px!important;min-width:20px!important;display:grid!important;place-items:center!important}
  html body.purchase-view .nav button .nav-icon svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.purchase-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#151515!important;font-weight:600!important;box-shadow:none!important}
  html body.purchase-view .nav button.active:before{left:-7px!important;width:3px!important;background:#9b6b20!important}
  html body.purchase-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.purchase-view .sidebar-footer .avatar{width:42px!important;height:42px!important;border-radius:50%!important;background:#eadfc9!important;color:#171717!important;font-size:14px!important}
  html body.purchase-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.purchase-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.purchase-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}

  html body.purchase-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;position:sticky!important;top:0!important}
  html body.purchase-view .topbar .topbar-title{display:none!important}
  html body.purchase-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
  html body.purchase-view .top-actions .search{order:-10!important;width:720px!important;max-width:min(720px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important}
  html body.purchase-view .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
  html body.purchase-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
  html body.purchase-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
  html 
  
  html body.purchase-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
  html body.purchase-view .topbar-user-copy{display:flex!important;min-width:96px!important}
  html body.purchase-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
  html body.purchase-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
  html body.purchase-view .topbar-user-menu{display:grid!important}

  html body.purchase-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:18px 30px 24px!important;background:#fafafa!important}
  html body.purchase-view .purchase-page{font-size:16px!important;color:#101827!important}
  html body.purchase-view .purchase-breadcrumbs{margin:0 0 9px 83px!important;font-size:11px!important;color:#586273!important}
  html body.purchase-view .purchase-breadcrumbs span{margin:0 5px!important;color:#9299a4!important}
  html body.purchase-view .purchase-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:22px!important;margin-bottom:18px!important}
  html body.purchase-view .purchase-title-group{display:flex!important;align-items:center!important;gap:22px!important}
  html body.purchase-view .purchase-title-icon{width:60px!important;height:58px!important;display:grid!important;place-items:center!important;border-radius:11px!important;background:#f4ecdd!important;color:#111!important}
  html body.purchase-view .purchase-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.9!important}
  html body.purchase-view .purchase-page-heading h1{font-size:27px!important;line-height:1.08!important;font-weight:700!important;letter-spacing:-.65px!important;margin:0 0 3px!important;color:#101827!important}
  html body.purchase-view .purchase-page-heading p{font-size:14px!important;line-height:1.4!important;margin:0!important;color:#3e4b5d!important}
  html body.purchase-view .purchase-heading-actions{display:flex!important;align-self:center!important;gap:10px!important}
  html body.purchase-view .purchase-btn{height:45px!important;border-radius:8px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-size:13px!important;font-weight:600!important;border:1px solid #d8c5a2!important;background:#fff!important;color:#111!important;white-space:nowrap!important}
  html body.purchase-view .purchase-btn svg{width:18px!important;height:18px!important}
  html body.purchase-view .purchase-btn.primary{min-width:167px!important;background:linear-gradient(#a77b31,#95691f)!important;color:#fff!important;border-color:#95691f!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
  html body.purchase-view .purchase-btn.secondary{background:#fff!important;color:#111!important}
  html body.purchase-view .purchase-btn.compact{height:39px!important;padding:0 14px!important}

  html body.purchase-view .purchase-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:16px!important}
  html body.purchase-view .purchase-stat-card{min-height:101px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:14px 17px!important;display:flex!important;align-items:center!important;gap:16px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.04)!important;overflow:hidden!important}
  html body.purchase-view .purchase-stat-icon{width:52px!important;height:52px!important;min-width:52px!important;border-radius:9px!important;background:#f3eee6!important;display:grid!important;place-items:center!important;color:#111!important}
  html body.purchase-view .purchase-stat-icon svg{width:26px!important;height:26px!important;stroke-width:1.8!important}
  html body.purchase-view .purchase-stat-icon.gold svg{color:#9b6b20!important}
  html body.purchase-view .purchase-stat-body{display:flex!important;flex-direction:column!important;min-width:0!important}
  html body.purchase-view .purchase-stat-body>span{font-size:12px!important;line-height:1.15!important;margin-bottom:5px!important;color:#596579!important;white-space:nowrap!important}
  html body.purchase-view .purchase-stat-body strong{font-size:23px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.45px!important;color:#101827!important;white-space:nowrap!important}
  html body.purchase-view .purchase-stat-body small{font-size:12px!important;line-height:1.15!important;margin-top:4px!important;color:#596579!important;white-space:nowrap!important}
  html body.purchase-view .purchase-stat-trend{margin-left:auto!important;align-self:stretch!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;align-items:flex-end!important}
  html body.purchase-view .purchase-stat-trend b{min-width:48px!important;padding:5px 8px!important;border-radius:6px!important;background:#dff6e7!important;color:#1f8248!important;font-size:11px!important;line-height:1.1!important;text-align:center!important;white-space:nowrap!important}
  html body.purchase-view .purchase-stat-trend svg{width:72px!important;height:27px!important}
  html body.purchase-view .purchase-stat-trend polyline{fill:none!important;stroke:#a77722!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}

  html body.purchase-view .purchase-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.05)!important;overflow:hidden!important}
  html body.purchase-view .purchase-table-toolbar{min-height:66px!important;padding:13px 16px!important;display:flex!important;align-items:center!important;gap:10px!important;border-bottom:1px solid #ece8e1!important;background:#fff!important}
  html body.purchase-view .purchase-table-search{width:420px!important;max-width:31%!important;height:39px!important;padding:0 12px!important;display:flex!important;align-items:center!important;border:1px solid #d7d9dd!important;border-radius:7px!important;background:#fff!important}
  html body.purchase-view .purchase-table-search svg{width:18px!important;height:18px!important;min-width:18px!important;color:#344256!important}
  html body.purchase-view .purchase-table-search input{width:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 9px!important;font-size:12px!important;color:#111!important}
  html body.purchase-view .purchase-filter-select{height:39px!important;min-width:220px!important;display:flex!important;align-items:center!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;position:relative!important}
  html body.purchase-view .purchase-filter-select select{width:100%!important;height:100%!important;border:0!important;outline:0!important;appearance:none!important;background:transparent!important;padding:0 34px 0 13px!important;font-size:12px!important;color:#111!important}
  html body.purchase-view .purchase-filter-select svg{position:absolute!important;right:10px!important;width:15px!important;height:15px!important;pointer-events:none!important}
  html body.purchase-view .purchase-date-filter{height:39px!important;width:165px!important;display:flex!important;align-items:center!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;position:relative!important}
  html body.purchase-view .purchase-date-filter input{width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 35px 0 12px!important;font-size:12px!important;color:#111!important}
  html body.purchase-view .purchase-date-filter svg{position:absolute!important;right:10px!important;width:16px!important;height:16px!important;pointer-events:none!important;background:#fff!important}
  html body.purchase-view .purchase-date-filter input::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:0;width:38px;height:100%;cursor:pointer}
  html body.purchase-view .purchase-clear{border-color:#d7dadd!important;min-width:126px!important}
  html body.purchase-view .purchase-toolbar-spacer{flex:1!important}
  html body.purchase-view .purchase-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important}

  html body.purchase-view .purchase-table-wrap{overflow-x:auto!important;background:#fff!important}
  html body.purchase-view .purchase-data-table{width:100%!important;min-width:1260px!important;border-collapse:collapse!important;table-layout:auto!important}
  html body.purchase-view .purchase-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
  html body.purchase-view .purchase-data-table th{height:39px!important;padding:10px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.15!important;text-align:left!important;color:#3d4653!important;background:transparent!important;white-space:nowrap!important}
  html body.purchase-view .purchase-data-table td{height:35px!important;padding:5px 16px!important;font-size:11px!important;line-height:1.15!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important;vertical-align:middle!important}
  html body.purchase-view .purchase-data-table tbody tr:hover td{background:#fcfbf8!important}
  html body.purchase-view .purchase-data-table th:nth-child(1){width:118px!important}
  html body.purchase-view .purchase-data-table th:nth-child(2){width:112px!important}
  html body.purchase-view .purchase-data-table th:nth-child(3){min-width:240px!important}
  html body.purchase-view .purchase-data-table th:nth-child(4){min-width:155px!important}
  html body.purchase-view .purchase-data-table th:nth-child(5){width:105px!important}
  html body.purchase-view .purchase-data-table th:nth-child(6),html body.purchase-view .purchase-data-table th:nth-child(7){width:120px!important}
  html body.purchase-view .purchase-data-table th:nth-child(8){width:145px!important}
  html body.purchase-view .purchase-doc strong{font-size:11px!important;font-weight:700!important;color:#111827!important;white-space:nowrap!important}
  html body.purchase-view .purchase-doc small{display:block!important;font-size:9px!important;color:#596579!important;margin-top:1px!important}
  html body.purchase-view .purchase-provider{white-space:nowrap!important}
  html body.purchase-view .purchase-number{text-align:right!important;white-space:nowrap!important}
  html body.purchase-view .purchase-sort-arrow{font-size:13px!important;margin-left:5px!important;color:#202936!important}
  html body.purchase-view .purchase-pay-pill{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:24px!important;padding:0 10px!important;border-radius:6px!important;background:#eef0f3!important;color:#273243!important;font-size:10px!important;font-weight:600!important;white-space:nowrap!important}
  html body.purchase-view .purchase-status-pill{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:24px!important;padding:0 11px!important;border-radius:6px!important;font-size:10px!important;font-weight:600!important;white-space:nowrap!important}
  html body.purchase-view .purchase-status-pill.confirmed{background:#d9f3e3!important;color:#17683b!important}
  html body.purchase-view .purchase-status-pill.opening{background:#dbeafe!important;color:#1f5c9e!important}
  html body.purchase-view .purchase-action-cell{min-width:262px!important;padding-right:16px!important}
  html body.purchase-view .purchase-action-buttons{display:flex!important;gap:7px!important;align-items:center!important;flex-wrap:nowrap!important}
  html body.purchase-view .purchase-action-btn{height:28px!important;min-width:64px!important;padding:0 10px!important;border-radius:6px!important;border:1px solid #d7dadd!important;background:#fff!important;color:#1f2a3a!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;font-size:10px!important;font-weight:600!important;white-space:nowrap!important}
  html body.purchase-view .purchase-action-btn:last-child{min-width:84px!important}
  html body.purchase-view .purchase-action-btn svg{width:14px!important;height:14px!important;stroke-width:1.8!important}
  html body.purchase-view .purchase-empty{text-align:center!important;padding:30px!important;color:#596579!important}

  html body.purchase-view .purchase-table-footer{min-height:65px!important;padding:10px 16px 11px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;font-size:12px!important;color:#465165!important;background:#fafafa!important}
  html body.purchase-view .purchase-pagination-area{display:flex!important;align-items:center!important;gap:20px!important}
  html body.purchase-view .purchase-per-page{height:36px!important;min-width:128px!important;display:flex!important;align-items:center!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;position:relative!important}
  html body.purchase-view .purchase-per-page select{width:100%!important;height:100%!important;border:0!important;outline:0!important;appearance:none!important;background:transparent!important;padding:0 32px 0 13px!important;font-size:12px!important;color:#111!important}
  html body.purchase-view .purchase-per-page svg{position:absolute!important;right:10px!important;width:15px!important;height:15px!important;pointer-events:none!important}
  html body.purchase-view .purchase-pagination{display:flex!important;align-items:center!important;gap:8px!important}
  html body.purchase-view .purchase-pagination button{width:34px!important;height:36px!important;padding:0!important;border:1px solid #d7dadd!important;border-radius:6px!important;background:#fff!important;color:#263244!important;display:grid!important;place-items:center!important;font-size:12px!important}
  html body.purchase-view .purchase-pagination button svg{width:15px!important;height:15px!important}
  html body.purchase-view .purchase-pagination button.active{background:#9a712f!important;color:#fff!important;border-color:#9a712f!important}
  html body.purchase-view .purchase-pagination button:disabled{opacity:.48!important;cursor:default!important}
  html body.purchase-view .purchase-pagination span{padding:0 3px!important;color:#273142!important}
}

@media(max-width:1200px){
  body.purchase-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  body.purchase-view .sidebar{width:220px!important}
  body.purchase-view .purchase-stats-grid{grid-template-columns:repeat(2,1fr)!important}
  body.purchase-view .purchase-page-heading{flex-direction:column!important}
  body.purchase-view .purchase-heading-actions{align-self:flex-start!important}
  body.purchase-view .purchase-breadcrumbs{margin-left:0!important}
  body.purchase-view .topbar-user-copy{display:none!important}
  body.purchase-view .top-actions .search{width:min(650px,64vw)!important}
  body.purchase-view .purchase-table-toolbar{flex-wrap:wrap!important}
  body.purchase-view .purchase-table-search{width:100%!important;max-width:none!important}
  body.purchase-view .purchase-toolbar-spacer{display:none!important}
  body.purchase-view .purchase-results-count{margin-left:auto!important}
}
@media(max-width:1024px){
  body.purchase-view .app{grid-template-columns:1fr!important}
  body.purchase-view .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)}
  body.purchase-view .sidebar.open{transform:translateX(0)}
  body.purchase-view .topbar{padding:0 16px!important}
  body.purchase-view .topbar-user-avatar,body.purchase-view .topbar-user-menu{display:none!important}
  body.purchase-view .search-kbd{display:none!important}
  body.purchase-view .purchase-stats-grid{grid-template-columns:1fr!important}
  body.purchase-view .purchase-page-heading h1{font-size:24px!important}
  body.purchase-view .purchase-title-icon{width:52px!important;height:52px!important}
  body.purchase-view .purchase-heading-actions{width:100%!important}
  body.purchase-view .purchase-heading-actions .purchase-btn{flex:1!important}
  body.purchase-view .purchase-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  body.purchase-view .purchase-pagination-area{width:100%!important;justify-content:space-between!important}
}
@media(max-width:720px){
  body.purchase-view .content{padding:18px 14px 24px!important}
  body.purchase-view .top-actions{gap:8px!important}
  body.purchase-view .api-status{display:none!important}
  body.purchase-view .top-actions .search{width:100%!important}
  body.purchase-view .purchase-stats-grid{grid-template-columns:1fr!important}
  body.purchase-view .purchase-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  body.purchase-view .purchase-table-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important}
  body.purchase-view .purchase-table-search{grid-column:1/-1!important}
  body.purchase-view .purchase-filter-select,body.purchase-view .purchase-date-filter{width:100%!important;min-width:0!important}
  body.purchase-view .purchase-clear{width:100%!important}
  body.purchase-view .purchase-results-count{margin:0!important;align-self:center!important;justify-self:end!important}
  body.purchase-view .purchase-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  body.purchase-view .purchase-pagination{gap:4px!important;flex-wrap:wrap!important}
  body.purchase-view .purchase-pagination button{width:30px!important;height:32px!important}
}

/* ===== V235 — Compras: tipografía y espaciado homologados a Traslados ===== */
@media (min-width:1201px){
  html body.purchase-view{font-size:16px!important;background:#fafafa!important}

  /* Estructura lateral y superior: mismas proporciones que Traslados */
  html body.purchase-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important}
  html body.purchase-view .sidebar-brand img{width:150px!important;max-width:150px!important;max-height:52px!important}
  html body.purchase-view .nav{padding:8px 0!important}
  html body.purchase-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;padding:13px 8px 6px!important;letter-spacing:.02em!important}
  html body.purchase-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;font-size:13px!important;line-height:1.2!important}
  html body.purchase-view .top-actions .search{width:710px!important;max-width:min(710px,58vw)!important;height:43px!important}

  /* Contenido: idéntica escala vertical/horizontal de Traslados */
  html body.purchase-view .content{padding:22px 30px 26px!important}
  html body.purchase-view .purchase-breadcrumbs{margin:0 0 12px 85px!important;font-size:12px!important}
  html body.purchase-view .purchase-page-heading{gap:25px!important;margin-bottom:26px!important}
  html body.purchase-view .purchase-title-group{gap:18px!important}
  html body.purchase-view .purchase-title-icon{width:64px!important;height:60px!important;border-radius:12px!important}
  html body.purchase-view .purchase-page-heading h1{font-size:29px!important;line-height:1.12!important;letter-spacing:-.7px!important;margin:0 0 2px!important}
  html body.purchase-view .purchase-page-heading p{font-size:15px!important;line-height:1.45!important}
  html body.purchase-view .purchase-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;gap:9px!important;font-size:13px!important}
  html body.purchase-view .purchase-btn.compact{height:40px!important;padding:0 18px!important}

  /* Indicadores: misma altura, padding y tipografía de Traslados */
  html body.purchase-view .purchase-stats-grid{gap:14px!important;margin-bottom:18px!important}
  html body.purchase-view .purchase-stat-card{min-height:118px!important;padding:18px!important;gap:20px!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
  html body.purchase-view .purchase-stat-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:10px!important}
  html body.purchase-view .purchase-stat-icon svg{width:28px!important;height:28px!important}
  html body.purchase-view .purchase-stat-body>span{font-size:13px!important;line-height:1.2!important;margin-bottom:6px!important}
  html body.purchase-view .purchase-stat-body strong{font-size:27px!important;line-height:1.15!important;letter-spacing:-.5px!important}
  html body.purchase-view .purchase-stat-body small{font-size:13px!important;line-height:1.2!important;margin-top:3px!important}
  html body.purchase-view .purchase-stat-trend b{padding:6px 8px!important;border-radius:7px!important;font-size:11px!important}
  html body.purchase-view .purchase-stat-trend svg{width:74px!important;height:30px!important}

  /* Barra de filtros: misma altura y respiración de Traslados */
  html body.purchase-view .purchase-table-toolbar{min-height:66px!important;padding:13px!important;gap:12px!important}
  html body.purchase-view .purchase-table-search{height:41px!important;border-radius:8px!important;padding:0 12px!important}
  html body.purchase-view .purchase-table-search svg{width:19px!important;height:19px!important;min-width:19px!important}
  html body.purchase-view .purchase-table-search input{padding:0 10px!important;font-size:13px!important}
  html body.purchase-view .purchase-filter-select,
  html body.purchase-view .purchase-date-filter{height:40px!important;border-radius:8px!important}
  html body.purchase-view .purchase-filter-select select,
  html body.purchase-view .purchase-date-filter input{font-size:13px!important}
  html body.purchase-view .purchase-results-count{font-size:12px!important}

  /* Tabla: misma escala tipográfica y altura de fila de Traslados */
  html body.purchase-view .purchase-data-table{min-width:1280px!important}
  html body.purchase-view .purchase-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;line-height:1.2!important}
  html body.purchase-view .purchase-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important}
  html body.purchase-view .purchase-doc strong{font-size:12px!important}
  html body.purchase-view .purchase-doc small{font-size:10px!important;line-height:1.2!important;margin-top:2px!important}
  html body.purchase-view .purchase-sort-arrow{font-size:13px!important}
  html body.purchase-view .purchase-pay-pill,
  html body.purchase-view .purchase-status-pill{min-height:24px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}
  html body.purchase-view .purchase-action-cell{min-width:270px!important;padding-right:16px!important}
  html body.purchase-view .purchase-action-buttons{gap:8px!important}
  html body.purchase-view .purchase-action-btn{height:36px!important;min-width:68px!important;padding:0 12px!important;border-radius:7px!important;gap:7px!important;font-size:12px!important}
  html body.purchase-view .purchase-action-btn:last-child{min-width:84px!important}
  html body.purchase-view .purchase-action-btn svg{width:15px!important;height:15px!important}

  /* Pie y paginación: mismos espacios de Traslados */
  html body.purchase-view .purchase-table-footer{min-height:58px!important;padding:12px 16px 13px!important;font-size:12px!important;background:#fff!important}
  html body.purchase-view .purchase-pagination-area{gap:24px!important}
  html body.purchase-view .purchase-per-page{height:34px!important;min-width:128px!important;border-radius:7px!important}
  html body.purchase-view .purchase-per-page select{font-size:12px!important;padding:0 32px 0 13px!important}
  html body.purchase-view .purchase-pagination{gap:8px!important}
  html body.purchase-view .purchase-pagination button{width:34px!important;height:34px!important;border-radius:6px!important;font-size:12px!important}
}


/* ERP v236 — botón Filtros de Compras idéntico al módulo Traslados */
@media(min-width:821px){
  html body.purchase-view .purchase-filter-toggle{
    height:40px!important;
    padding:0 18px!important;
    border:1px solid #ccb890!important;
    border-radius:9px!important;
    background:#fff!important;
    color:#111!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    font-family:Inter,Arial,sans-serif!important;
    font-size:13px!important;
    font-weight:600!important;
    line-height:1!important;
    box-shadow:none!important;
    white-space:nowrap!important;
  }
  html body.purchase-view .purchase-filter-toggle svg{
    width:18px!important;
    height:18px!important;
    stroke-width:1.8!important;
  }
  html body.purchase-view .purchase-filter-toggle:hover,
  html body.purchase-view .purchase-filter-toggle.active{
    background:#fff!important;
    color:#111!important;
    border-color:#ccb890!important;
    transform:none!important;
    filter:none!important;
  }
  html body.purchase-view .purchase-filter-panel{
    display:flex!important;
    align-items:end!important;
    gap:10px!important;
    padding:12px 13px!important;
    border-bottom:1px solid #ece8e1!important;
    background:#fcfbf9!important;
  }
  html body.purchase-view .purchase-filter-panel .purchase-filter-select{
    min-width:220px!important;
    height:38px!important;
    border-radius:7px!important;
  }
  html body.purchase-view .purchase-filter-panel .purchase-date-filter{
    width:165px!important;
    height:38px!important;
    border-radius:7px!important;
  }
  html body.purchase-view .purchase-filter-panel .purchase-clear{
    height:38px!important;
    padding:0 16px!important;
    min-width:auto!important;
    border-radius:7px!important;
  }
}
@media(max-width:820px){
  html body.purchase-view .purchase-filter-toggle{height:40px!important;padding:0 18px!important;border-color:#ccb890!important}
  html body.purchase-view .purchase-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important}
  html body.purchase-view .purchase-filter-panel .purchase-filter-select,
  html body.purchase-view .purchase-filter-panel .purchase-date-filter,
  html body.purchase-view .purchase-filter-panel .purchase-clear{width:100%!important;min-width:0!important;max-width:none!important}
}
@media(max-width:520px){
  html body.purchase-view .purchase-filter-panel{grid-template-columns:1fr!important}
}

/* ===== V237 — Compras: responsive homologado 1:1 con Traslados =====
   Solo afecta purchase-view. La lógica JavaScript no cambia. */

/* Base visual que Traslados conserva en portátil/tablet horizontal. */
@media (max-width:1200px){
  html body.purchase-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.purchase-view .sidebar{
    width:220px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;
    padding:12px 14px 16px!important;color:#1b2738!important
  }
  html body.purchase-view .sidebar-brand,html body.purchase-view .sidebar-footer{border-color:#ddd8d0!important}
  html body.purchase-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important}
  html body.purchase-view .sidebar-brand img{width:150px!important;max-width:150px!important;max-height:52px!important;filter:none!important}
  html body.purchase-view .nav{padding:8px 0!important}
  html body.purchase-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.purchase-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.purchase-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#151515!important;font-weight:600!important;box-shadow:none!important}
  html body.purchase-view .sidebar-footer{padding:13px 8px 0!important;background:#fff!important}
  html body.purchase-view .sidebar-footer .avatar{width:42px!important;height:42px!important;border-radius:50%!important;background:#eadfc9!important;color:#171717!important;font-size:14px!important}
  html body.purchase-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.purchase-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.purchase-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}

  html body.purchase-view .topbar{height:74px!important;min-height:74px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;padding:0 30px!important;display:flex!important;align-items:center!important}
  html body.purchase-view .topbar-title{display:none!important}
  html body.purchase-view .top-actions{width:100%!important;margin-left:0!important;gap:16px!important;flex-wrap:nowrap!important}
  html body.purchase-view .top-actions .search{order:-10!important;width:min(650px,64vw)!important;max-width:none!important;height:43px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;padding:0 12px!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important;position:relative!important}
  html body.purchase-view .top-actions .search input{width:100%!important;padding:0 10px!important;font-size:13px!important;color:#111!important}
  html body.purchase-view .api-status{margin-left:auto!important;border-color:#d8dbdf!important;border-radius:22px!important;padding:9px 14px!important;color:#222!important;background:#fff!important;font-size:12px!important;white-space:nowrap!important}
  html body.purchase-view .topbar-user-copy{display:none!important}
  html body.purchase-view #themeBtn,html body.purchase-view #exportButton,html body.purchase-view #quickAction{display:none!important}

  html body.purchase-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
  html body.purchase-view .purchase-page{min-width:0;color:#101827!important;font-family:Inter,Arial,"Helvetica Neue",sans-serif!important}
  html body.purchase-view .purchase-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 12px 0!important}
  html body.purchase-view .purchase-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}
  html body.purchase-view .purchase-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important;flex-direction:column!important}
  html body.purchase-view .purchase-title-group{display:flex!important;gap:18px!important;align-items:center!important}
  html body.purchase-view .purchase-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important;flex:0 0 auto!important}
  html body.purchase-view .purchase-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
  html body.purchase-view .purchase-page-heading h1{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;font-weight:700!important;margin:0 0 2px!important;letter-spacing:-.7px!important;color:#101827!important}
  html body.purchase-view .purchase-page-heading p{margin:0!important;color:#3e4b5d!important;font-size:15px!important;line-height:1.45!important}
  html body.purchase-view .purchase-heading-actions{display:flex!important;gap:10px!important;align-self:flex-start!important}
  html body.purchase-view .purchase-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-weight:600!important;border:1px solid transparent!important;background:#fff!important;color:#111!important;cursor:pointer!important;white-space:nowrap!important;font-size:13px!important}
  html body.purchase-view .purchase-btn svg{width:18px!important;height:18px!important}
  html body.purchase-view .purchase-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}
  html body.purchase-view .purchase-btn.primary{background:linear-gradient(#a77b31,#95691f)!important;color:#fff!important;border-color:#95691f!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
  html body.purchase-view .purchase-btn.compact{height:40px!important;padding:0 18px!important}

  html body.purchase-view .purchase-stats-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;margin-bottom:18px!important}
  html body.purchase-view .purchase-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;background:#fff!important;border-radius:8px!important;display:flex!important;align-items:center!important;padding:18px!important;gap:20px!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
  html body.purchase-view .purchase-stat-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:10px!important;background:#f3eee6!important;display:grid!important;place-items:center!important;flex:0 0 auto!important}
  html body.purchase-view .purchase-stat-icon svg{width:28px!important;height:28px!important}
  html body.purchase-view .purchase-stat-body{display:flex!important;flex-direction:column!important;min-width:0!important}
  html body.purchase-view .purchase-stat-body>span{color:#596579!important;font-size:13px!important;margin-bottom:6px!important}
  html body.purchase-view .purchase-stat-body strong{font-size:27px!important;font-weight:700!important;letter-spacing:-.5px!important;white-space:nowrap!important;color:#101827!important;line-height:1.15!important}
  html body.purchase-view .purchase-stat-body small{color:#596579!important;font-size:13px!important;margin-top:3px!important}
  html body.purchase-view .purchase-stat-trend{margin-left:auto!important;display:flex!important;align-self:stretch!important;flex-direction:column!important;justify-content:space-between!important;align-items:flex-end!important}
  html body.purchase-view .purchase-stat-trend b{background:#dff6e7!important;color:#1f8248!important;font-weight:600!important;font-size:11px!important;border-radius:7px!important;padding:6px 8px!important}
  html body.purchase-view .purchase-stat-trend svg{width:74px!important;height:30px!important}
  html body.purchase-view .purchase-stat-trend polyline{fill:none!important;stroke:#9b6b20!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}

  html body.purchase-view .purchase-table-card{border:1px solid #ddd8d0!important;background:#fff!important;border-radius:9px!important;overflow:hidden!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
  html body.purchase-view .purchase-table-toolbar{padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important;flex-wrap:wrap!important}
  html body.purchase-view .purchase-table-search{height:41px!important;width:100%!important;max-width:none!important;border:1px solid #d7d9dd!important;border-radius:8px!important;display:flex!important;align-items:center!important;padding:0 12px!important;background:#fff!important}
  html body.purchase-view .purchase-table-search svg{width:19px!important;height:19px!important;color:#344256!important;flex:0 0 auto!important}
  html body.purchase-view .purchase-table-search input{border:0!important;outline:0!important;width:100%!important;padding:0 10px!important;background:transparent!important;color:#111!important;font-size:13px!important;box-shadow:none!important}
  html body.purchase-view .purchase-toolbar-spacer{display:none!important}
  html body.purchase-view .purchase-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important;margin-left:auto!important}
  html body.purchase-view .purchase-filter-toggle{height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-size:13px!important;font-weight:600!important;line-height:1!important;box-shadow:none!important;white-space:nowrap!important}
  html body.purchase-view .purchase-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.purchase-view .purchase-filter-panel{display:flex!important;gap:10px!important;align-items:end!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important;flex-wrap:wrap!important}
  html body.purchase-view .purchase-filter-panel .purchase-filter-select{min-width:220px!important;height:38px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;position:relative!important;display:flex!important;align-items:center!important}
  html body.purchase-view .purchase-filter-select select{width:100%!important;height:100%!important;border:0!important;outline:0!important;appearance:none!important;background:transparent!important;padding:0 34px 0 11px!important;color:#263244!important;font-size:12px!important}
  html body.purchase-view .purchase-filter-select svg{position:absolute!important;right:10px!important;width:15px!important;height:15px!important;pointer-events:none!important}
  html body.purchase-view .purchase-filter-panel .purchase-date-filter{height:38px!important;width:165px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;display:flex!important;align-items:center!important;padding:0 10px!important;position:relative!important}
  html body.purchase-view .purchase-date-filter input{width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;color:#263244!important;font-size:12px!important;padding:0!important}
  html body.purchase-view .purchase-date-filter svg{width:16px!important;height:16px!important;flex:0 0 auto!important;color:#596579!important}
  html body.purchase-view .purchase-filter-panel .purchase-clear{height:38px!important;padding:0 16px!important;min-width:auto!important;border-radius:7px!important}

  html body.purchase-view .purchase-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;width:100%!important;max-width:100%!important}
  html body.purchase-view .purchase-data-table{width:100%!important;border-collapse:collapse!important;min-width:1280px!important;font-family:Inter,Arial,sans-serif!important;table-layout:auto!important}
  html body.purchase-view .purchase-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
  html body.purchase-view .purchase-data-table th{font-size:10px!important;font-weight:500!important;letter-spacing:0!important;text-align:left!important;color:#3d4653!important;padding:12px 16px!important;white-space:nowrap!important;background:transparent!important;border-bottom:0!important;height:40px!important}
  html body.purchase-view .purchase-data-table td{font-size:12px!important;padding:9px 16px!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;vertical-align:middle!important;background:#fff!important;white-space:nowrap!important;height:49px!important}
  html body.purchase-view .purchase-data-table tbody tr:hover td{background:#fcfbf8!important}
  html body.purchase-view .purchase-doc strong{font-size:12px!important;font-weight:700!important}
  html body.purchase-view .purchase-doc small{display:block!important;font-size:10px!important;color:#596579!important;margin-top:2px!important}
  html body.purchase-view .purchase-number{text-align:right!important;white-space:nowrap!important;font-variant-numeric:tabular-nums!important}
  html body.purchase-view .purchase-pay-pill,html body.purchase-view .purchase-status-pill{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:24px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important;font-weight:600!important;white-space:nowrap!important}
  html body.purchase-view .purchase-action-cell{min-width:250px!important;white-space:nowrap!important}
  html body.purchase-view .purchase-action-buttons{display:flex!important;gap:8px!important;flex-wrap:nowrap!important;width:auto!important}
  html body.purchase-view .purchase-action-btn{height:36px!important;min-width:68px!important;border-radius:7px!important;border:1px solid #d7dadd!important;background:#fff!important;color:#172033!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:0 12px!important;font-weight:600!important;font-size:12px!important;cursor:pointer!important;white-space:nowrap!important}
  html body.purchase-view .purchase-action-btn svg{width:15px!important;height:15px!important}

  html body.purchase-view .purchase-table-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 16px 13px!important;font-size:12px!important;color:#465165!important;background:#fff!important;min-height:58px!important}
  html body.purchase-view .purchase-pagination-area{display:flex!important;align-items:center!important;gap:24px!important}
  html body.purchase-view .purchase-per-page{height:34px!important;min-width:128px!important;padding:0 13px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;display:flex!important;align-items:center!important;gap:8px!important;position:relative!important}
  html body.purchase-view .purchase-per-page select{width:100%!important;height:100%!important;border:0!important;background:transparent!important;appearance:none!important;outline:0!important;color:#263244!important;font-size:12px!important;padding:0 24px 0 0!important;cursor:pointer!important}
  html body.purchase-view .purchase-per-page svg{position:absolute!important;right:10px!important;width:15px!important;height:15px!important;pointer-events:none!important}
  html body.purchase-view .purchase-pagination{display:flex!important;align-items:center!important;gap:8px!important}
  html body.purchase-view .purchase-pagination button{width:34px!important;height:34px!important;border:1px solid #d7dadd!important;background:#fff!important;border-radius:6px!important;display:grid!important;place-items:center!important;color:#293548!important;cursor:pointer!important;padding:0!important;font-size:12px!important}
  html body.purchase-view .purchase-pagination button svg{width:15px!important;height:15px!important}
  html body.purchase-view .purchase-pagination button.active{background:#9a712f!important;color:#fff!important;border-color:#9a712f!important}
  html body.purchase-view .purchase-pagination button:disabled{opacity:.42!important;cursor:not-allowed!important}
}

/* Tablet: mismo quiebre de Traslados. */
@media (max-width:1024px){
  html body.purchase-view .app{grid-template-columns:1fr!important}
  html body.purchase-view .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)!important}
  html body.purchase-view .sidebar.open{transform:translateX(0)!important}
  html body.purchase-view .topbar{padding:0 16px!important}
  html body.purchase-view .purchase-page{min-width:0!important}
  html body.purchase-view .purchase-stats-grid{grid-template-columns:1fr!important}
  html body.purchase-view .purchase-table-search{max-width:none!important;width:100%!important}
  html body.purchase-view .purchase-table-toolbar{flex-wrap:wrap!important}
  html body.purchase-view .purchase-toolbar-spacer{display:none!important}
  html body.purchase-view .purchase-results-count{margin-left:auto!important}
  html body.purchase-view .purchase-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  html body.purchase-view .purchase-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}
  html body.purchase-view .purchase-filter-panel{flex-wrap:wrap!important}
  html body.purchase-view .purchase-page-heading h1{font-size:24px!important}
  html body.purchase-view .purchase-title-icon{width:52px!important;height:52px!important}
  html body.purchase-view .purchase-heading-actions{width:100%!important}
  html body.purchase-view .purchase-heading-actions .purchase-btn{flex:1!important}
  html body.purchase-view .purchase-breadcrumbs{margin-left:0!important}
  html body.purchase-view .topbar-user-avatar,html body.purchase-view .topbar-user-menu{display:none!important}
  html body.purchase-view .search-kbd{display:none!important}
}

/* Móvil: mismo flujo, alturas, espacios y tabla desplazable de Traslados. */
@media (max-width:720px){
  html body.purchase-view .content{padding:18px 14px 24px!important}
  html body.purchase-view .top-actions{gap:8px!important}
  html body.purchase-view .api-status{display:none!important}
  html body.purchase-view .top-actions .search{width:100%!important}
  html body.purchase-view .purchase-title-group{align-items:flex-start!important}
  html body.purchase-view .purchase-page-heading{gap:14px!important;margin-bottom:18px!important}
  html body.purchase-view .purchase-page-heading p{font-size:13px!important}
  html body.purchase-view .purchase-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.purchase-view .purchase-btn{padding:0 11px!important}
  html body.purchase-view .purchase-table-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.purchase-view .purchase-table-search{grid-column:1/-1!important;max-width:none!important}
  html body.purchase-view .purchase-filter-toggle{width:auto!important;justify-self:start!important}
  html body.purchase-view .purchase-toolbar-spacer{display:none!important}
  html body.purchase-view .purchase-results-count{margin:0!important;align-self:center!important;justify-self:end!important}
  html body.purchase-view .purchase-table-footer{padding:12px!important}
  html body.purchase-view .purchase-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  html body.purchase-view .purchase-pagination{gap:4px!important;flex-wrap:wrap!important}
  html body.purchase-view .purchase-pagination button{width:30px!important;height:30px!important}
  html body.purchase-view .purchase-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
  html body.purchase-view .purchase-filter-panel .purchase-filter-select,
  html body.purchase-view .purchase-filter-panel .purchase-date-filter{width:100%!important;min-width:0!important;max-width:none!important}
  html body.purchase-view .purchase-filter-panel .purchase-clear{grid-column:1/-1!important;width:100%!important}
  html body.purchase-view .purchase-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}
  html body.purchase-view .purchase-stat-body strong{font-size:23px!important}
  html body.purchase-view .purchase-stat-trend svg{display:none!important}
  html body.purchase-view .purchase-action-cell{min-width:235px!important}
  html body.purchase-view .purchase-action-btn{min-width:64px!important;padding:0 9px!important;font-size:11px!important}
}

/* V239 · Identificación visual de INVENTARIO INICIAL */
html body.purchase-view .opening-inventory-label{
  display:inline-flex!important;
  align-items:center!important;
  min-height:24px!important;
  padding:0 9px!important;
  border:1px solid #bfdbfe!important;
  border-radius:6px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.035em!important;
  white-space:nowrap!important;
}
html body.purchase-view .purchase-provider-opening{color:#1d4ed8!important}
html body.purchase-view .opening-inventory-text{
  color:#1d4ed8!important;
  font-weight:700!important;
  text-transform:uppercase!important;
  letter-spacing:.025em!important;
}
html body.purchase-view input.opening-inventory-origin[readonly]{
  background:#eff6ff!important;
  border-color:#bfdbfe!important;
  color:#1d4ed8!important;
  font-weight:700!important;
  text-transform:uppercase!important;
  letter-spacing:.025em!important;
}


/* ===== Gastos operativos · réplica visual de la captura suministrada ===== */
html body.expense-view{
  --expense-text:#111827;
  --expense-muted:#536078;
  --expense-line:#ddd8d0;
  --expense-gold:#9d7430;
  --expense-gold-soft:#f5eddf;
  background:#fafafa!important;
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif!important;
}
html body.expense-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:18px 30px 24px!important;background:#fafafa!important}
html body.expense-view .expense-page{min-width:0;color:var(--expense-text);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif}
html body.expense-view .expense-breadcrumbs{margin:0 0 10px 92px;font-size:11px;color:#536078}
html body.expense-view .expense-breadcrumbs span{margin:0 7px;color:#8b93a1}
html body.expense-view .expense-breadcrumbs strong{font-weight:600;color:#465166}
html body.expense-view .expense-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:20px}
html body.expense-view .expense-title-group{display:flex;align-items:center;gap:20px;min-width:0}
html body.expense-view .expense-title-icon{width:68px;height:64px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(145deg,#f5eddf,#f1e5d0);color:#111;flex:none}
html body.expense-view .expense-title-icon svg{width:32px;height:32px;stroke-width:1.8}
html body.expense-view .expense-page-heading h1{margin:0 0 3px;font-size:29px;line-height:1.12;font-weight:700;letter-spacing:-.55px;color:#0f172a}
html body.expense-view .expense-page-heading p{margin:0;font-size:14px;line-height:1.45;color:#3e4b5d}
html body.expense-view .expense-heading-actions{display:flex;gap:12px;align-self:center;flex:none}
html body.expense-view .expense-btn{height:47px;padding:0 19px;border-radius:8px;border:1px solid #d7d9dd;background:#fff;color:#101010;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-weight:600;white-space:nowrap;box-shadow:none}
html body.expense-view .expense-btn svg{width:18px;height:18px}
html body.expense-view .expense-btn.primary{min-width:178px;background:linear-gradient(#a98041,#98702f);border-color:#98702f;color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08)}
html body.expense-view .expense-btn.secondary{min-width:142px}

html body.expense-view .expense-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
html body.expense-view .expense-stat-card{min-height:102px;border:1px solid var(--expense-line);border-radius:7px;background:#fff;display:flex;align-items:center;padding:16px 16px;gap:18px;box-shadow:0 1px 3px rgba(15,23,42,.035);overflow:hidden}
html body.expense-view .expense-stat-icon{width:54px;height:54px;border-radius:9px;background:linear-gradient(145deg,#f5eee2,#f2e7d4);display:grid;place-items:center;color:#101010;flex:none}
html body.expense-view .expense-stat-icon svg{width:28px;height:28px;stroke-width:1.9}
html body.expense-view .expense-stat-body{display:flex;flex-direction:column;min-width:0;flex:1}
html body.expense-view .expense-stat-body>span{font-size:12px;color:#526077;margin-bottom:7px;white-space:nowrap}
html body.expense-view .expense-stat-body strong{font-size:23px;line-height:1.1;font-weight:700;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.expense-view .expense-stat-body small{font-size:12px;line-height:1.3;color:#5b6678;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.expense-view .expense-stat-side{margin-left:auto;align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;flex:none}
html body.expense-view .expense-trend-badge{display:inline-flex;align-items:center;justify-content:center;min-width:54px;height:25px;padding:0 8px;border-radius:6px;background:#dff6e7;color:#1d8449;font-size:12px;font-weight:600;white-space:nowrap}
html body.expense-view .expense-trend-badge.down{background:#fde8e8;color:#c03c3c}
html body.expense-view .expense-stat-side svg{width:68px;height:27px}
html body.expense-view .expense-stat-side polyline{fill:none;stroke:#a87825;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html body.expense-view .expense-category-main .expense-stat-body strong{font-size:17px;line-height:1.25;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
html body.expense-view .expense-category-pie{width:38px;height:38px;border-radius:50%;background:conic-gradient(#a47b39 0 76%,#eadfcf 76% 100%);position:relative;flex:none;margin-left:auto}
html body.expense-view .expense-category-pie:after{content:"";position:absolute;inset:10px;border-radius:50%;background:#fff}
html body.expense-view .expense-category-pie span{position:absolute;right:-2px;top:-2px;width:8px;height:8px;border-radius:50%;background:#a47b39}

html body.expense-view .expense-table-card{border:1px solid var(--expense-line);border-radius:8px;background:#fff;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.035)}
html body.expense-view .expense-table-toolbar{min-height:61px;padding:10px 14px;display:grid;grid-template-columns:minmax(340px,1.8fr) minmax(180px,.9fr) minmax(180px,.9fr) minmax(185px,.8fr) auto auto;gap:10px;align-items:center;border-bottom:1px solid #ece8e1}
html body.expense-view .expense-table-search{height:38px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;display:flex;align-items:center;padding:0 11px;min-width:0}
html body.expense-view .expense-table-search svg{width:18px;height:18px;color:#344256;flex:none}
html body.expense-view .expense-table-search input{width:100%;height:100%;border:0;outline:0;background:transparent;padding:0 10px;font-size:12px;color:#172033;min-width:0}
html body.expense-view .expense-table-search input::placeholder{color:#596579}
html body.expense-view .expense-filter-select{height:38px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;display:flex;align-items:center;padding:0 9px 0 11px;min-width:0;position:relative}
html body.expense-view .expense-filter-select select{appearance:none;width:100%;height:100%;border:0;outline:0;background:transparent;padding:0 28px 0 0;font-size:12px;color:#172033;cursor:pointer;min-width:0}
html body.expense-view .expense-filter-select svg{width:15px;height:15px;position:absolute;right:9px;pointer-events:none}
html body.expense-view .expense-date-filter{height:38px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;display:flex;align-items:center;padding:0 9px 0 11px;min-width:0;position:relative}
html body.expense-view .expense-date-filter input{width:100%;height:100%;border:0;outline:0;background:transparent;font-size:12px;color:#172033;min-width:0}
html body.expense-view .expense-date-filter input::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:0;width:38px;height:38px;cursor:pointer}
html body.expense-view .expense-date-filter svg{width:16px;height:16px;flex:none;pointer-events:none}
html body.expense-view .expense-clear-btn{height:38px;padding:0 14px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;color:#172033;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:500;white-space:nowrap}
html body.expense-view .expense-clear-btn svg{width:16px;height:16px}
html body.expense-view .expense-results-count{font-size:11px;color:#4f5d72;white-space:nowrap;text-align:right;padding-left:8px}
html body.expense-view .expense-results-count b{font-weight:500}

html body.expense-view .expense-table-wrap{width:100%;overflow-x:auto}
html body.expense-view .expense-data-table{width:100%;min-width:1220px;border-collapse:collapse;table-layout:auto;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif}
html body.expense-view .expense-data-table thead{background:linear-gradient(90deg,#f5ead8,#f0e2c9)}
html body.expense-view .expense-data-table th{height:39px;padding:10px 16px;background:transparent;border:0;color:#374151;font-size:9.5px;font-weight:600;letter-spacing:.01em;text-align:left;white-space:nowrap}
html body.expense-view .expense-data-table td{height:41px;padding:5px 16px;border-bottom:1px solid #e8e5df;background:#fff;color:#1f2a3a;font-size:11px;line-height:1.15;vertical-align:middle;white-space:nowrap}
html body.expense-view .expense-data-table tbody tr:hover td{background:#fcfbf8}
html body.expense-view .expense-doc strong{font-size:11px;font-weight:700;color:#152238}
html body.expense-view .expense-sort-arrow{font-size:15px;margin-left:5px;font-weight:500}
html body.expense-view .expense-category-cell{display:flex;align-items:center;gap:9px;min-width:180px}
html body.expense-view .expense-category-icon{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;flex:none;color:#1f2937}
html body.expense-view .expense-category-icon svg{width:16px;height:16px;stroke-width:1.9}
html body.expense-view .expense-category-icon.blue{background:#dbeafe;color:#245a8d}
html body.expense-view .expense-category-icon.coral{background:#fee2e2;color:#93413d}
html body.expense-view .expense-category-icon.green{background:#dcfce7;color:#287a4b}
html body.expense-view .expense-category-icon.indigo{background:#dbeafe;color:#2755a5}
html body.expense-view .expense-category-icon.sky{background:#e0f2fe;color:#2475a1}
html body.expense-view .expense-category-icon.yellow{background:#fef3c7;color:#946f15}
html body.expense-view .expense-category-icon.violet{background:#ede9fe;color:#6d4ab7}
html body.expense-view .expense-category-icon.slate{background:#e5e7eb;color:#465166}
html body.expense-view .expense-category-icon.mint{background:#d1fae5;color:#28775a}
html body.expense-view .expense-category-icon.gray{background:#e5e7eb;color:#4b5563}
html body.expense-view .expense-concept{display:block;font-size:11px;font-weight:600;color:#111827;max-width:235px;overflow:hidden;text-overflow:ellipsis}
html body.expense-view .expense-beneficiary{display:block;margin-top:2px;font-size:9.5px;color:#596579;max-width:235px;overflow:hidden;text-overflow:ellipsis}
html body.expense-view .expense-payment-pill{display:inline-flex;align-items:center;justify-content:center;min-height:23px;padding:0 10px;border-radius:6px;font-size:10px;font-weight:500;white-space:nowrap}
html body.expense-view .expense-payment-pill.cash{background:#dff6e7;color:#1f8248}
html body.expense-view .expense-payment-pill.transfer{background:#dbeafe;color:#2d5f91}
html body.expense-view .expense-payment-pill.card{background:#ede9fe;color:#6750a4}
html body.expense-view .expense-payment-pill.other{background:#eef0f3;color:#4b5563}
html body.expense-view .expense-number{text-align:right;font-variant-numeric:tabular-nums}
html body.expense-view .expense-number strong{font-weight:600}
html body.expense-view .expense-action-cell{min-width:260px}
html body.expense-view .expense-action-buttons{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
html body.expense-view .expense-action-btn{height:31px;min-width:66px;padding:0 11px;border:1px solid #d7dadd;border-radius:6px;background:#fff;color:#172033;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:10.5px;font-weight:600;white-space:nowrap}
html body.expense-view .expense-action-btn svg{width:14px;height:14px;stroke-width:1.9}
html body.expense-view .expense-action-btn.danger{border-color:#f1bbbb;color:#e32323}
html body.expense-view .expense-empty{text-align:center!important;padding:28px!important;color:#667085!important}

html body.expense-view .expense-table-footer{min-height:53px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff;color:#465165;font-size:11px}
html body.expense-view .expense-pagination-area{display:flex;align-items:center;gap:24px;margin-left:auto}
html body.expense-view .expense-per-page{height:38px;min-width:138px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;display:flex;align-items:center;position:relative;padding:0 9px}
html body.expense-view .expense-per-page select{appearance:none;width:100%;height:100%;border:0;outline:0;background:transparent;font-size:11px;padding:0 25px 0 2px;cursor:pointer}
html body.expense-view .expense-per-page svg{width:15px;height:15px;position:absolute;right:9px;pointer-events:none}
html body.expense-view .expense-pagination{display:flex;align-items:center;gap:8px}
html body.expense-view .expense-pagination button{width:37px;height:37px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;color:#172033;display:grid;place-items:center;font-size:12px}
html body.expense-view .expense-pagination button svg{width:15px;height:15px}
html body.expense-view .expense-pagination button.active{background:linear-gradient(#a98041,#96702f);border-color:#96702f;color:#fff}
html body.expense-view .expense-pagination button:disabled{opacity:.45;cursor:not-allowed}
html body.expense-view .expense-pagination span{color:#596579;padding:0 2px}

/* El formulario conserva la lógica original; sólo se armoniza visualmente en Gastos. */
html body.expense-view .modal-card{border-radius:10px!important;background:#fff!important;border:1px solid #d9d3c9!important;box-shadow:0 22px 70px rgba(15,23,42,.22)!important}
html body.expense-view .modal-head{padding:18px 22px!important;border-bottom:1px solid #e7e2da!important}
html body.expense-view .modal-body{padding:20px 22px!important}
html body.expense-view .purchase-section{border-radius:8px!important;border:1px solid #e1ddd6!important;background:#fff!important}
html body.expense-view .form-grid input,
html body.expense-view .form-grid select,
html body.expense-view .form-grid textarea,
html body.expense-view #modalForm>label textarea{border-radius:7px!important;border-color:#d5d8de!important;background:#fff!important;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif!important}

@media(max-width:1320px){
  html body.expense-view .expense-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  html body.expense-view .expense-table-toolbar{grid-template-columns:minmax(300px,1.5fr) repeat(2,minmax(160px,.8fr));}
  html body.expense-view .expense-date-filter,html body.expense-view .expense-clear-btn,html body.expense-view .expense-results-count{grid-row:2}
  html body.expense-view .expense-results-count{justify-self:end}
}
@media(max-width:1024px){
  html body.expense-view .expense-breadcrumbs{margin-left:0}
  html body.expense-view .expense-page-heading{flex-direction:column;gap:15px}
  html body.expense-view .expense-heading-actions{align-self:flex-start}
  html body.expense-view .expense-table-toolbar{grid-template-columns:1fr 1fr}
  html body.expense-view .expense-table-search{grid-column:1/-1}
  html body.expense-view .expense-date-filter,html body.expense-view .expense-clear-btn,html body.expense-view .expense-results-count{grid-row:auto}
  html body.expense-view .expense-results-count{justify-self:end;align-self:center}
  html body.expense-view .expense-table-footer{flex-direction:column;align-items:flex-start}
  html body.expense-view .expense-pagination-area{width:100%;justify-content:space-between;margin-left:0}
}
@media(max-width:720px){
  html body.expense-view .content{padding:18px 14px 24px!important}
  html body.expense-view .expense-title-group{align-items:flex-start;gap:14px}
  html body.expense-view .expense-title-icon{width:52px;height:52px;border-radius:9px}
  html body.expense-view .expense-title-icon svg{width:25px;height:25px}
  html body.expense-view .expense-page-heading h1{font-size:24px}
  html body.expense-view .expense-page-heading p{font-size:13px}
  html body.expense-view .expense-heading-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  html body.expense-view .expense-btn{min-width:0!important;padding:0 10px}
  html body.expense-view .expense-stats-grid{grid-template-columns:1fr}
  html body.expense-view .expense-stat-card{min-height:98px;padding:14px}
  html body.expense-view .expense-stat-side svg{display:none}
  html body.expense-view .expense-table-toolbar{display:grid;grid-template-columns:1fr;padding:10px}
  html body.expense-view .expense-table-toolbar>*{grid-column:1!important;width:100%;min-width:0;justify-self:stretch}
  html body.expense-view .expense-results-count{text-align:left;justify-self:start;padding:2px 0}
  html body.expense-view .expense-pagination-area{flex-direction:column;align-items:flex-start;gap:10px}
  html body.expense-view .expense-pagination{gap:4px;flex-wrap:wrap}
  html body.expense-view .expense-pagination button{width:32px;height:32px}
  html body.expense-view .expense-action-cell{min-width:238px}
  html body.expense-view .expense-action-btn{min-width:62px;padding:0 8px}
}


/* ===== V239.1 · Gastos operativos homologado visualmente a Traslados =====
   Tipografía, escalas, respiración, botón Filtros y responsive móvil/tablet. */
html body.expense-view{background:#fafafa!important;font-family:Inter,Arial,"Helvetica Neue",sans-serif!important}
html body.expense-view .app{background:#fafafa!important}
html body.expense-view .main,html body.expense-view .content{background:#fafafa!important}
html body.expense-view .topbar .topbar-title{display:none!important}
html body.expense-view .topbar #themeBtn,
html body.expense-view .topbar #exportButton,
html body.expense-view .topbar #quickAction{display:none!important}
html body.expense-view .expense-page{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;color:#101827!important}
html body.expense-view .expense-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;gap:9px!important;font-size:13px!important;font-weight:600!important;font-family:Inter,Arial,sans-serif!important}
html body.expense-view .expense-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important;min-width:0!important}
html body.expense-view .expense-btn.primary{background:linear-gradient(#a77b31,#95691f)!important;color:#fff!important;border-color:#95691f!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important;min-width:0!important}
html body.expense-view .expense-btn.compact{height:40px!important;padding:0 18px!important}
html body.expense-view .expense-toolbar-spacer{flex:1!important}

/* Encabezado y tarjetas con la misma escala de Traslados */
html body.expense-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important}
html body.expense-view .expense-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 12px 85px!important}
html body.expense-view .expense-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}
html body.expense-view .expense-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}
html body.expense-view .expense-title-group{display:flex!important;gap:18px!important;align-items:center!important}
html body.expense-view .expense-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important}
html body.expense-view .expense-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
html body.expense-view .expense-page-heading h1{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
html body.expense-view .expense-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
html body.expense-view .expense-heading-actions{display:flex!important;gap:10px!important;align-self:center!important}
html body.expense-view .expense-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}
html body.expense-view .expense-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:18px!important;gap:20px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
html body.expense-view .expense-stat-icon{width:56px!important;height:56px!important;border-radius:10px!important;background:#f3eee6!important}
html body.expense-view .expense-stat-icon svg{width:28px!important;height:28px!important}
html body.expense-view .expense-stat-body>span{font-size:13px!important;margin-bottom:6px!important;color:#596579!important}
html body.expense-view .expense-stat-body strong{font-family:Inter,Arial,sans-serif!important;font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important}
html body.expense-view .expense-stat-body small{font-size:13px!important;margin-top:3px!important;color:#596579!important}
html body.expense-view .expense-stat-side{margin-left:auto!important}
html body.expense-view .expense-trend-badge{font-size:11px!important;padding:6px 8px!important;height:auto!important;min-width:48px!important;border-radius:7px!important}
html body.expense-view .expense-category-main .expense-stat-body strong{font-size:17px!important;line-height:1.25!important;letter-spacing:-.2px!important}

/* Barra, filtros, tabla y paginación en la misma métrica de Traslados */
html body.expense-view .expense-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}
html body.expense-view .expense-table-toolbar{min-height:66px!important;padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important}
html body.expense-view .expense-table-search{width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important}
html body.expense-view .expense-table-search svg{width:19px!important;height:19px!important}
html body.expense-view .expense-table-search input{font-size:13px!important;padding:0 10px!important}
html body.expense-view .expense-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important;padding:0!important}
html body.expense-view .expense-filter-panel{display:flex!important;gap:10px!important;align-items:center!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important}
html body.expense-view .expense-filter-select,
html body.expense-view .expense-date-filter{height:38px!important;min-width:190px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;padding:0 10px!important}
html body.expense-view .expense-filter-select select,
html body.expense-view .expense-date-filter input{font-size:12px!important;color:#111!important}
html body.expense-view .expense-clear-btn{height:40px!important;border-radius:9px!important;border-color:#ccb890!important;font-size:13px!important;font-weight:600!important;padding:0 18px!important}
html body.expense-view .expense-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important;font-family:Inter,Arial,sans-serif!important}
html body.expense-view .expense-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
html body.expense-view .expense-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.2!important;color:#3d4653!important;background:transparent!important}
html body.expense-view .expense-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important}
html body.expense-view .expense-doc strong{font-size:12px!important}
html body.expense-view .expense-concept{font-size:12px!important;line-height:1.2!important}
html body.expense-view .expense-beneficiary{font-size:10px!important;line-height:1.2!important;margin-top:2px!important;color:#465165!important}
html body.expense-view .expense-category-cell{gap:9px!important}
html body.expense-view .expense-category-icon{width:28px!important;height:28px!important;border-radius:7px!important}
html body.expense-view .expense-payment-pill{font-size:11px!important;min-height:24px!important;padding:0 10px!important}
html body.expense-view .expense-action-cell{min-width:270px!important}
html body.expense-view .expense-action-buttons{display:flex!important;gap:8px!important;flex-wrap:nowrap!important}
html body.expense-view .expense-action-btn{height:36px!important;min-width:68px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:600!important;background:#fff!important}
html body.expense-view .expense-action-btn.danger{border-color:#f4bcbc!important;color:#ea2b2b!important}
html body.expense-view .expense-table-footer{min-height:58px!important;padding:12px 16px 13px!important;font-size:12px!important;color:#465165!important;background:#fff!important}
html body.expense-view .expense-pagination-area{gap:24px!important}
html body.expense-view .expense-per-page{height:34px!important;border-radius:7px!important}
html body.expense-view .expense-pagination{gap:8px!important}
html body.expense-view .expense-pagination button{width:34px!important;height:34px!important;border-radius:6px!important}

/* Desktop: sidebar y topbar exactamente en la misma escala de Traslados. */
@media (min-width:1201px){
  html body.expense-view{font-size:16px!important}
  html body.expense-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.expense-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.expense-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;border-bottom:1px solid #ddd8d0!important}
  html body.expense-view .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important}
  html body.expense-view .nav{padding:8px 0!important}
  html body.expense-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.expense-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.expense-view .nav button .nav-icon{width:20px!important;min-width:20px!important}
  html body.expense-view .nav button .nav-icon svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.expense-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#151515!important;font-weight:600!important;box-shadow:none!important}
  html body.expense-view .nav button.active:before{left:-7px!important;width:3px!important;background:#9b6b20!important}
  html body.expense-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.expense-view .sidebar-footer .avatar{width:42px!important;height:42px!important;background:#eadfc9!important;color:#171717!important;font-size:14px!important}
  html body.expense-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.expense-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.expense-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
  html body.expense-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;position:sticky!important;top:0!important}
  html body.expense-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
  html body.expense-view .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important}
  html body.expense-view .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
  html body.expense-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
  html body.expense-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
  
  
  html body.expense-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
  html body.expense-view .topbar-user-copy{display:flex!important;min-width:96px!important}
  html body.expense-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
  html body.expense-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
  html body.expense-view .topbar-user-menu{display:grid!important}
}

/* Portátil / tablet horizontal: mismos quiebres que Traslados. */
@media(max-width:1200px){
  html body.expense-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.expense-view .sidebar{width:220px!important}
  html body.expense-view .expense-stats-grid{grid-template-columns:1fr!important}
  html body.expense-view .expense-page-heading{flex-direction:column!important}
  html body.expense-view .expense-heading-actions{align-self:flex-start!important}
  html body.expense-view .expense-breadcrumbs{margin-left:0!important}
  html body.expense-view .topbar-user-copy{display:none!important}
  html body.expense-view .top-actions .search{width:min(650px,64vw)!important}
  html body.expense-view .expense-action-cell{min-width:250px!important}
}

/* Tablet: mismo flujo de Traslados. */
@media(max-width:1024px){
  html body.expense-view .app{grid-template-columns:1fr!important}
  html body.expense-view .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)}
  html body.expense-view .sidebar.open{transform:translateX(0)}
  html body.expense-view .topbar{padding:0 16px!important}
  html body.expense-view .expense-page{min-width:0!important}
  html body.expense-view .expense-stats-grid{grid-template-columns:1fr!important}
  html body.expense-view .expense-table-toolbar{flex-wrap:wrap!important}
  html body.expense-view .expense-table-search{max-width:none!important;width:100%!important}
  html body.expense-view .expense-toolbar-spacer{display:none!important}
  html body.expense-view .expense-results-count{margin-left:auto!important}
  html body.expense-view .expense-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  html body.expense-view .expense-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}
  html body.expense-view .expense-filter-panel{flex-wrap:wrap!important}
  html body.expense-view .expense-page-heading h1{font-size:24px!important}
  html body.expense-view .expense-title-icon{width:52px!important;height:52px!important}
  html body.expense-view .expense-heading-actions{width:100%!important}
  html body.expense-view .expense-heading-actions .expense-btn{flex:1!important}
  html body.expense-view .expense-breadcrumbs{margin-left:0!important}
  html body.expense-view .topbar-user-avatar,html body.expense-view .topbar-user-menu{display:none!important}
  html body.expense-view .search-kbd{display:none!important}
}

/* Móvil: mismo grid, respiración y scroll horizontal de Traslados. */
@media(max-width:720px){
  html body.expense-view .content{padding:18px 14px 24px!important}
  html body.expense-view .top-actions{gap:8px!important}
  html body.expense-view .api-status{display:none!important}
  html body.expense-view .top-actions .search{width:100%!important}
  html body.expense-view .expense-title-group{align-items:flex-start!important}
  html body.expense-view .expense-page-heading{gap:14px!important;margin-bottom:18px!important}
  html body.expense-view .expense-page-heading p{font-size:13px!important}
  html body.expense-view .expense-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.expense-view .expense-btn{padding:0 11px!important}
  html body.expense-view .expense-table-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.expense-view .expense-table-search{grid-column:1/-1!important;max-width:none!important}
  html body.expense-view .expense-toolbar-spacer{display:none!important}
  html body.expense-view .expense-results-count{margin:0!important;align-self:center!important;justify-self:end!important}
  html body.expense-view .expense-table-footer{padding:12px!important}
  html body.expense-view .expense-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  html body.expense-view .expense-pagination{gap:4px!important;flex-wrap:wrap!important}
  html body.expense-view .expense-pagination button{width:30px!important;height:30px!important}
  html body.expense-view .expense-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:center!important}
  html body.expense-view .expense-filter-select,html body.expense-view .expense-date-filter{width:100%!important;min-width:0!important}
  html body.expense-view .expense-filter-panel .expense-clear-btn{width:100%!important}
  html body.expense-view .expense-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}
  html body.expense-view .expense-stat-body strong{font-size:23px!important}
  html body.expense-view .expense-category-main .expense-stat-body strong{font-size:17px!important}
  html body.expense-view .expense-stat-side svg{display:none!important}
  html body.expense-view .expense-action-cell{min-width:235px!important}
  html body.expense-view .expense-action-btn{min-width:64px!important;padding:0 9px!important;font-size:11px!important}
}

@media(max-width:460px){
  html body.expense-view .expense-filter-panel{grid-template-columns:1fr!important}
  html body.expense-view .expense-heading-actions{grid-template-columns:1fr!important}
}

/* V239 - Gastos: método de pago en mayúscula y negrilla */
html body.expense-view .expense-payment-pill{font-weight:700!important;}
#modalForm .expense-payment-field select,
#modalForm .expense-payment-field input{font-weight:700!important;text-transform:uppercase;}

/* V239 - Gastos: método de pago con el mismo badge verde de estado CONFIRMADA en Compras */
html body.expense-view .expense-payment-pill,
html body.expense-view .expense-payment-pill.cash,
html body.expense-view .expense-payment-pill.transfer,
html body.expense-view .expense-payment-pill.card,
html body.expense-view .expense-payment-pill.other{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  padding:0 10px!important;
  border-radius:6px!important;
  background:#d9f3e3!important;
  color:#17683b!important;
  font-size:11px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap!important;
}

/* ===== V240: Inventario y kardex — réplica visual solicitada ===== */
html body.inventory-view{background:#fafafa!important}
html body.inventory-view .app,html body.inventory-view .main,html body.inventory-view .content{background:#fafafa!important}
html body.inventory-view .app{grid-template-columns:250px minmax(0,1fr)!important}
html body.inventory-view .sidebar{width:250px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;padding:12px 14px 16px!important;color:#1b2738!important}
html body.inventory-view .sidebar-brand,html body.inventory-view .sidebar-footer{border-color:#ddd8d0!important}
html body.inventory-view .sidebar-brand{height:64px!important;padding:4px 8px 10px!important}
html body.inventory-view .sidebar-brand img{filter:none!important;width:185px!important;max-height:50px!important}
html body.inventory-view .nav{padding:10px 0!important}
html body.inventory-view .nav-group{font-size:12px!important;color:#5a6474!important;letter-spacing:0!important;padding:13px 8px 6px!important;font-family:Arial,"Helvetica Neue",sans-serif!important}
html body.inventory-view .nav button{display:flex!important;gap:12px!important;color:#1b2738!important;padding:9px 12px!important;border-radius:8px!important;margin:1px 0!important;font-size:14px!important;font-family:Arial,"Helvetica Neue",sans-serif!important}
html body.inventory-view .nav .icon{display:inline-grid!important;width:20px!important;height:20px!important;place-items:center!important}
html body.inventory-view .nav .icon svg{width:19px!important;height:19px!important}
html body.inventory-view .nav button:hover{background:#faf7f1!important}
html body.inventory-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;font-weight:600!important;color:#111!important;box-shadow:none!important;position:relative}
html body.inventory-view .nav button.active:before{content:"";position:absolute;left:-7px;top:0;bottom:0;width:3px;background:#9b6b20;border-radius:0 4px 4px 0}
html body.inventory-view .sidebar-footer{background:#fff!important}.inventory-view .sidebar-footer strong{color:#111!important}.inventory-view .sidebar-footer small,.inventory-view .sidebar-footer .text-btn{color:#596579!important}
html body.inventory-view .avatar{border:0!important;background:#e8dac0!important;color:#111!important;border-radius:50%!important;width:44px!important;height:44px!important}
html body.inventory-view .main{min-width:0!important}
html body.inventory-view .topbar{height:74px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;padding:0 30px!important;display:flex!important;align-items:center!important}
html body.inventory-view .topbar-title{display:none!important}
html body.inventory-view .top-actions{width:100%!important;margin-left:0!important;gap:16px!important;flex-wrap:nowrap!important}
html body.inventory-view .top-actions .search{order:-10;width:min(710px,58vw)!important;max-width:none!important;height:43px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;padding:0 12px!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important;position:relative!important}
html body.inventory-view .top-actions .search input{width:100%!important;padding:0 10px!important;font-size:13px!important;color:#111!important}
html body.inventory-view .api-status{margin-left:auto!important;border-color:#d8dbdf!important;border-radius:22px!important;padding:9px 14px!important;color:#222!important;background:#fff!important}
html body.inventory-view .api-status.online:before{background:#3fa45d!important}
html body.inventory-view #themeBtn,html body.inventory-view #exportButton,html body.inventory-view #quickAction{display:none!important}
html body.inventory-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:18px 30px 24px!important}

.inventory-page{--i-text:#101827;--i-muted:#596579;--i-line:#ddd8d0;--i-soft:#ece8e1;--i-gold:#9b6b20;--i-gold-soft:#f4ecdd;--i-green:#1f8b4c;color:var(--i-text);font-family:Arial,"Helvetica Neue",sans-serif!important;min-width:0}
.inventory-breadcrumbs{font-size:11px;color:#536078;margin:0 0 10px 82px}.inventory-breadcrumbs span{margin:0 6px;color:#8b93a1}.inventory-breadcrumbs strong{font-weight:600;color:#465166}
.inventory-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:20px}.inventory-title-group{display:flex;align-items:center;gap:20px;min-width:0}.inventory-title-icon{width:61px;height:60px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(145deg,#f5eddf,#f1e5d0);color:#111;flex:none}.inventory-title-icon svg{width:31px;height:31px;stroke-width:1.8}.inventory-page-heading h1{margin:0 0 3px!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.55px!important;color:#0f172a!important}.inventory-page-heading p{margin:0!important;font-size:14px!important;line-height:1.45!important;color:#3e4b5d!important}.inventory-heading-actions{display:flex;gap:10px;align-self:center;flex:none}
.inventory-btn{height:45px;padding:0 19px;border-radius:8px;border:1px solid #d7d9dd;background:#fff;color:#101010;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-weight:600;white-space:nowrap;box-shadow:none;cursor:pointer}.inventory-btn svg{width:18px;height:18px}.inventory-btn.primary{min-width:196px;background:linear-gradient(#a98041,#98702f);border-color:#98702f;color:#fff}.inventory-btn.secondary{min-width:154px}
.inventory-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}.inventory-stat-card{min-height:108px;border:1px solid var(--i-line);border-radius:7px;background:#fff;display:flex;align-items:center;padding:16px;gap:16px;box-shadow:0 1px 3px rgba(15,23,42,.035);overflow:hidden}.inventory-stat-icon{width:52px;height:52px;border-radius:9px;background:linear-gradient(145deg,#f5eee2,#f2e7d4);display:grid;place-items:center;color:#111;flex:none;font-size:28px}.inventory-stat-icon svg{width:27px;height:27px;stroke-width:1.9}.inventory-gold-icon{color:#8d651f}.inventory-stat-body{display:flex;flex-direction:column;min-width:0;flex:1}.inventory-stat-body>span{font-size:12px;color:#526077;margin-bottom:6px;white-space:nowrap}.inventory-stat-body strong{font-size:23px;line-height:1.1;font-weight:700;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inventory-stat-body small{font-size:11px;line-height:1.3;color:#5b6678;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inventory-stat-side{margin-left:auto;align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;flex:none}.inventory-stat-side b{display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:25px;padding:0 8px;border-radius:6px;background:#dff6e7;color:#1d8449;font-size:12px;font-weight:600;white-space:nowrap}.inventory-stat-side.danger b{background:#fde8e8;color:#c03c3c}.inventory-stat-side svg{width:62px;height:26px}.inventory-stat-side polyline{fill:none;stroke:#a87825;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.inventory-table-card{border:1px solid var(--i-line);border-radius:8px;background:#fff;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.035)}.inventory-filter-toolbar{min-height:61px;padding:10px 12px;display:grid;grid-template-columns:minmax(320px,1.7fr) minmax(165px,.85fr) minmax(165px,.85fr) minmax(180px,.9fr) auto auto;gap:10px;align-items:center;border-bottom:1px solid var(--i-soft)}.inventory-search-box{height:39px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;display:flex;align-items:center;padding:0 11px;min-width:0}.inventory-search-box svg{width:18px;height:18px;color:#344256;flex:none}.inventory-search-box input{width:100%;height:100%;border:0!important;outline:0!important;background:transparent!important;padding:0 10px!important;font-size:12px!important;color:#172033!important;min-width:0;box-shadow:none!important}.inventory-search-box input::placeholder{color:#596579}.inventory-select-wrap{height:39px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;display:flex;align-items:center;padding:0 9px 0 11px;min-width:0;position:relative}.inventory-select-wrap select{appearance:none;width:100%;height:100%;border:0!important;outline:0!important;background:transparent!important;padding:0 28px 0 0!important;font-size:12px!important;color:#172033!important;cursor:pointer;min-width:0;box-shadow:none!important}.inventory-select-wrap svg{width:15px;height:15px;position:absolute;right:9px;pointer-events:none}.inventory-clear-btn{height:39px;padding:0 14px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;color:#172033;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer}.inventory-clear-btn svg{width:16px;height:16px}.inventory-results-count{font-size:11px;color:#4f5d72;white-space:nowrap;text-align:right;padding-left:6px}
.inventory-table-wrap{width:100%;overflow-x:auto}.inventory-data-table{width:100%!important;min-width:1180px!important;border-collapse:collapse!important;table-layout:auto;font-family:Arial,"Helvetica Neue",sans-serif!important}.inventory-data-table thead{background:linear-gradient(90deg,#f5ead8,#f0e2c9)!important}.inventory-data-table th{height:39px!important;padding:10px 12px!important;background:transparent!important;border:0!important;color:#5f4e33!important;font-size:9.5px!important;font-weight:600!important;letter-spacing:.01em!important;text-align:left!important;white-space:nowrap!important}.inventory-data-table td{height:39px!important;padding:6px 12px!important;border-bottom:1px solid #e5e3df!important;color:#122039!important;font-size:11px!important;vertical-align:middle!important;white-space:nowrap}.inventory-data-table tbody tr:last-child td{border-bottom:0!important}.inventory-data-table tr:hover td{background:#fcfbf8!important}.inventory-record-cell{line-height:1.05}.inventory-record-cell strong{display:block;font-size:11px;font-weight:700}.inventory-record-cell small{display:block;font-size:9px;color:#445166;margin-top:3px}.inventory-product-name{font-weight:500}.inventory-money{text-align:right!important;font-variant-numeric:tabular-nums}.inventory-category-badge{display:inline-flex;align-items:center;min-height:26px;padding:0 11px;border-radius:5px;font-size:10px;font-weight:600;background:#e8eef7;color:#294b70}.inventory-category-material{background:#d9eafa;color:#284c72}.inventory-category-herraje{background:#d6f3e4;color:#16704d}.inventory-category-dije{background:#e9e3fb;color:#504487}.inventory-category-cadena{background:#fbefc7;color:#786017}.inventory-actions-cell{display:flex;align-items:center;gap:14px}.inventory-action-btn{height:32px;padding:0 13px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;color:#111;display:inline-flex;align-items:center;gap:9px;font-size:11px;font-weight:600;cursor:pointer}.inventory-action-btn svg{width:16px;height:16px}.inventory-more-btn{height:32px;min-width:44px;border:1px solid #d6d8dd;border-radius:6px;background:#fff;color:#20304a;font-weight:700;letter-spacing:2px;cursor:pointer}.inventory-empty{padding:34px;text-align:center;color:#596579}.inventory-empty p{margin:0 0 14px}
.inventory-table-footer{display:flex;align-items:center;justify-content:space-between;padding:10px 0 0;font-size:11px;color:#465165}.inventory-pagination-area{display:flex;align-items:center;gap:18px}.inventory-page-size{height:38px;min-width:130px;border:1px solid #d7dadd;border-radius:7px;background:#fff;display:flex;align-items:center;padding:0 10px;position:relative}.inventory-page-size select{appearance:none;width:100%;height:100%;border:0!important;outline:0!important;background:transparent!important;padding:0 24px 0 0!important;font-size:11px!important;color:#172033!important}.inventory-page-size svg{position:absolute;right:9px;width:15px;height:15px;pointer-events:none}.inventory-pagination{display:flex;align-items:center;gap:5px}.inventory-pagination button,.inventory-page-btn{width:36px;height:36px;border:1px solid #d7dadd;border-radius:6px;background:#fff;color:#172033;display:grid;place-items:center;font-size:11px;cursor:pointer}.inventory-pagination button svg{width:15px;height:15px}.inventory-pagination button:disabled{opacity:.4;cursor:default}.inventory-pagination .inventory-page-btn.active{background:#9a712f;color:#fff;border-color:#9a712f}.inventory-page-dots{width:25px;text-align:center;color:#596579}
@media(max-width:1280px){.inventory-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-filter-toolbar{grid-template-columns:1fr 1fr 1fr}.inventory-search-box{grid-column:span 2}.inventory-results-count{text-align:left}.inventory-page-heading{flex-direction:column}.inventory-heading-actions{align-self:flex-start}}
@media(max-width:860px){html body.inventory-view .content{padding:16px!important}.inventory-breadcrumbs{margin-left:0}.inventory-title-icon{width:52px;height:52px}.inventory-page-heading h1{font-size:24px!important}.inventory-heading-actions{width:100%}.inventory-heading-actions .inventory-btn{flex:1;min-width:0}.inventory-stats-grid{grid-template-columns:1fr}.inventory-filter-toolbar{display:grid;grid-template-columns:1fr!important}.inventory-filter-toolbar>*{grid-column:1!important;width:100%!important}.inventory-results-count{text-align:left}.inventory-table-footer{align-items:flex-start;gap:12px;flex-direction:column}.inventory-pagination-area{width:100%;justify-content:space-between}.inventory-page-size{min-width:118px}.inventory-pagination{gap:3px}.inventory-pagination button,.inventory-page-btn{width:31px;height:31px}.inventory-page-dots{width:18px}.inventory-data-table{min-width:980px!important}}
@media(max-width:760px){html body.inventory-view .app{grid-template-columns:1fr!important}html body.inventory-view .sidebar{position:fixed!important;width:min(88vw,320px)!important}html body.inventory-view .topbar{padding:9px 10px!important;min-height:64px!important;height:auto!important}html body.inventory-view .top-actions{gap:8px!important}html body.inventory-view .top-actions .search{width:100%!important;max-width:none!important}.inventory-heading-actions{display:grid;grid-template-columns:1fr 1fr}.inventory-btn{padding:0 10px;font-size:12px}.inventory-title-group{gap:12px}.inventory-title-icon{display:none}}

/* ===== V241 · Inventario y kardex alineado a escala/espaciado de Traslados ===== */
html body.inventory-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
.inventory-page{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important}
.inventory-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 12px 85px!important}.inventory-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}.inventory-breadcrumbs strong{font-weight:600!important;color:#465166!important}
.inventory-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}.inventory-title-group{display:flex!important;gap:18px!important;align-items:center!important}.inventory-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important}.inventory-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}.inventory-page-heading h1{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}.inventory-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}.inventory-heading-actions{display:flex!important;gap:10px!important;align-self:center!important}
.inventory-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;color:#111!important;box-shadow:none!important}.inventory-btn svg{width:18px!important;height:18px!important}.inventory-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}.inventory-btn.primary{min-width:0!important;background:linear-gradient(#a77b31,#95691f)!important;border-color:#95691f!important;color:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}.inventory-btn.compact{height:40px!important;padding:0 18px!important}
.inventory-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}.inventory-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:18px!important;gap:20px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}.inventory-stat-icon{width:56px!important;height:56px!important;border-radius:10px!important;background:#f3eee6!important}.inventory-stat-icon svg{width:28px!important;height:28px!important}.inventory-stat-body>span{font-size:13px!important;line-height:1.2!important;margin-bottom:6px!important;color:#596579!important}.inventory-stat-body strong{font-family:Inter,Arial,sans-serif!important;font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important}.inventory-stat-body small{font-size:13px!important;line-height:1.25!important;margin-top:3px!important;color:#596579!important}.inventory-stat-side b{height:auto!important;min-width:48px!important;padding:6px 8px!important;border-radius:7px!important;font-size:11px!important}.inventory-stat-side svg{width:74px!important;height:30px!important}
.inventory-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}.inventory-filter-toolbar{min-height:66px!important;padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important}.inventory-search-box{width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}.inventory-search-box svg{width:19px!important;height:19px!important}.inventory-search-box input{font-size:13px!important;padding:0 10px!important}.inventory-toolbar-spacer{flex:1!important}.inventory-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important;text-align:left!important;padding:0!important}.inventory-filter-toggle{flex:none!important}
.inventory-filter-panel{display:flex!important;gap:10px!important;align-items:center!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important}.inventory-filter-panel .inventory-select-wrap{height:38px!important;min-width:190px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;padding:0 10px!important}.inventory-filter-panel .inventory-select-wrap select{font-size:12px!important;color:#111!important}.inventory-filter-panel .inventory-clear-btn{margin-left:2px!important}
.inventory-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important;font-family:Inter,Arial,sans-serif!important}.inventory-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}.inventory-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.2!important;color:#3d4653!important;background:transparent!important;letter-spacing:0!important}.inventory-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important}.inventory-record-cell strong{font-size:12px!important}.inventory-record-cell small{font-size:10px!important;line-height:1.2!important;margin-top:2px!important;color:#465165!important}.inventory-product-name{font-size:12px!important}.inventory-category-badge{min-height:26px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}.inventory-actions-cell{gap:8px!important;min-width:205px!important}.inventory-action-btn{height:36px!important;min-width:104px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:600!important}.inventory-more-btn{height:36px!important;min-width:46px!important;border-radius:7px!important;font-size:12px!important}
.inventory-table-footer{min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 16px 13px!important;border-top:0!important;font-size:12px!important;color:#465165!important;background:#fff!important}.inventory-pagination-area{display:flex!important;align-items:center!important;gap:24px!important}.inventory-page-size{height:34px!important;min-width:0!important;padding:0 13px!important;border:1px solid #d7dadd!important;border-radius:7px!important}.inventory-page-size select{font-size:12px!important}.inventory-pagination{gap:8px!important}.inventory-pagination button,.inventory-page-btn{width:34px!important;height:34px!important;border-radius:6px!important;font-size:12px!important}

/* Desktop: misma escala de navegación/topbar que Traslados. */
@media (min-width:1201px){
  html body.inventory-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.inventory-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.inventory-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;border-bottom:1px solid #ddd8d0!important}
  html body.inventory-view .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important}
  html body.inventory-view .nav{padding:8px 0!important}
  html body.inventory-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.inventory-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.inventory-view .nav button .nav-icon,html body.inventory-view .nav button .icon{width:20px!important;min-width:20px!important}
  html body.inventory-view .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.inventory-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.inventory-view .sidebar-footer .avatar{width:42px!important;height:42px!important;font-size:14px!important}
  html body.inventory-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.inventory-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.inventory-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
  html body.inventory-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important}
  html body.inventory-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
  html body.inventory-view .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}
  html body.inventory-view .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
  html body.inventory-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
  html body.inventory-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
  
  
  html body.inventory-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
  html body.inventory-view .topbar-user-copy{display:flex!important;min-width:96px!important}
  html body.inventory-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
  html body.inventory-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
  html body.inventory-view .topbar-user-menu{display:grid!important}
}

/* Tablet: reproduce la conducta de la barra de filtros de Traslados. */
@media(max-width:1200px){
  html body.inventory-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.inventory-view .sidebar{width:220px!important}
  .inventory-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .inventory-page-heading{flex-direction:column!important}
  .inventory-heading-actions{align-self:flex-start!important}
  .inventory-breadcrumbs{margin-left:0!important}
  html body.inventory-view .topbar-user-copy{display:none!important}
  html body.inventory-view .top-actions .search{width:min(650px,64vw)!important}
}
@media(max-width:1024px){
  html body.inventory-view .app{grid-template-columns:1fr!important}
  html body.inventory-view .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)}
  html body.inventory-view .sidebar.open{transform:translateX(0)!important}
  html body.inventory-view .topbar{padding:0 16px!important}
  html body.inventory-view .content{padding:18px 16px 24px!important}
  .inventory-page{min-width:0!important}
  .inventory-breadcrumbs{margin-left:0!important}
  .inventory-title-icon{width:52px!important;height:52px!important}
  .inventory-page-heading h1{font-size:24px!important}
  .inventory-heading-actions{width:100%!important}.inventory-heading-actions .inventory-btn{flex:1!important;min-width:0!important}
  .inventory-filter-toolbar{flex-wrap:wrap!important}
  .inventory-search-box{width:100%!important;max-width:none!important;flex:1 0 100%!important}
  .inventory-toolbar-spacer{display:none!important}
  .inventory-results-count{margin-left:auto!important}
  .inventory-filter-panel{flex-wrap:wrap!important}
  .inventory-filter-panel .inventory-select-wrap{flex:1 1 180px!important;min-width:160px!important}
  .inventory-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  .inventory-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}
  html body.inventory-view .topbar-user-avatar,html body.inventory-view .topbar-user-menu{display:none!important}
  html body.inventory-view .search-kbd{display:none!important}
}
@media(max-width:860px){.inventory-stats-grid{grid-template-columns:1fr!important}.inventory-data-table{min-width:1100px!important}}
@media(max-width:720px){
  html body.inventory-view .content{padding:18px 14px 24px!important}
  html body.inventory-view .top-actions{gap:8px!important}
  html body.inventory-view .api-status{display:none!important}
  html body.inventory-view .top-actions .search{width:100%!important;max-width:none!important}
  .inventory-title-group{align-items:flex-start!important;gap:12px!important}.inventory-title-icon{display:none!important}
  .inventory-page-heading{gap:14px!important;margin-bottom:18px!important}.inventory-page-heading p{font-size:13px!important}
  .inventory-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.inventory-btn{padding:0 11px!important}
  .inventory-filter-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important}.inventory-search-box{grid-column:1/-1!important;width:100%!important;max-width:none!important}.inventory-filter-toggle{width:100%!important}.inventory-results-count{margin:0!important;align-self:center!important;text-align:right!important}.inventory-toolbar-spacer{display:none!important}
  .inventory-filter-panel{display:grid!important;grid-template-columns:1fr!important}.inventory-filter-panel .inventory-select-wrap,.inventory-filter-panel .inventory-clear-btn{width:100%!important;min-width:0!important;margin:0!important}
  .inventory-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}.inventory-stat-body strong{font-size:23px!important}.inventory-stat-side svg{display:none!important}
  .inventory-table-footer{padding:12px!important}.inventory-pagination-area{flex-direction:column!important;align-items:flex-start!important}.inventory-pagination{gap:4px!important;flex-wrap:wrap!important}.inventory-pagination button,.inventory-page-btn{width:30px!important;height:30px!important}
  .inventory-actions-cell{min-width:190px!important}.inventory-action-btn{min-width:104px!important;padding:0 9px!important;font-size:11px!important}.inventory-more-btn{min-width:42px!important}
}

/* ===== V242 · COMPRAS — misma escala visual de Inventario + Filtros de Traslados =====
   Solo afecta al módulo Compras. No modifica Gastos aunque comparta clases históricas. */
html body.purchase-view:not(.expense-view){background:#fafafa!important;font-size:16px!important}
html body.purchase-view:not(.expense-view) .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
html body.purchase-view:not(.expense-view) .purchase-page{min-width:0!important;font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important}

/* Encabezado: mismas métricas de Inventario y kardex. */
html body.purchase-view:not(.expense-view) .purchase-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 12px 85px!important}
html body.purchase-view:not(.expense-view) .purchase-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}
html body.purchase-view:not(.expense-view) .purchase-breadcrumbs strong{font-weight:600!important;color:#465166!important}
html body.purchase-view:not(.expense-view) .purchase-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}
html body.purchase-view:not(.expense-view) .purchase-title-group{display:flex!important;gap:18px!important;align-items:center!important}
html body.purchase-view:not(.expense-view) .purchase-title-icon{width:64px!important;height:60px!important;min-width:64px!important;border-radius:12px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important}
html body.purchase-view:not(.expense-view) .purchase-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
html body.purchase-view:not(.expense-view) .purchase-page-heading h1{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
html body.purchase-view:not(.expense-view) .purchase-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
html body.purchase-view:not(.expense-view) .purchase-heading-actions{display:flex!important;gap:10px!important;align-self:center!important}
html body.purchase-view:not(.expense-view) .purchase-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;color:#111!important;box-shadow:none!important}
html body.purchase-view:not(.expense-view) .purchase-btn svg{width:18px!important;height:18px!important}
html body.purchase-view:not(.expense-view) .purchase-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}
html body.purchase-view:not(.expense-view) .purchase-btn.primary{background:linear-gradient(#a77b31,#95691f)!important;border-color:#95691f!important;color:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
html body.purchase-view:not(.expense-view) .purchase-btn.compact{height:40px!important;padding:0 18px!important}

/* KPIs: 4 columnas y exactamente la misma escala/respiración que Inventario. */
html body.purchase-view:not(.expense-view) .purchase-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}
html body.purchase-view:not(.expense-view) .purchase-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:18px!important;gap:20px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
html body.purchase-view:not(.expense-view) .purchase-stat-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:10px!important;background:#f3eee6!important}
html body.purchase-view:not(.expense-view) .purchase-stat-icon svg{width:28px!important;height:28px!important}
html body.purchase-view:not(.expense-view) .purchase-stat-body>span{font-size:13px!important;line-height:1.2!important;margin-bottom:6px!important;color:#596579!important}
html body.purchase-view:not(.expense-view) .purchase-stat-body strong{font-family:Inter,Arial,sans-serif!important;font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important}
html body.purchase-view:not(.expense-view) .purchase-stat-body small{font-size:13px!important;line-height:1.25!important;margin-top:3px!important;color:#596579!important}
html body.purchase-view:not(.expense-view) .purchase-stat-trend b{height:auto!important;min-width:48px!important;padding:6px 8px!important;border-radius:7px!important;font-size:11px!important}
html body.purchase-view:not(.expense-view) .purchase-stat-trend svg{width:74px!important;height:30px!important}

/* Contenedor, buscador y tabla: mismas medidas de Inventario. */
html body.purchase-view:not(.expense-view) .purchase-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}
html body.purchase-view:not(.expense-view) .purchase-table-toolbar{min-height:66px!important;padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important;flex-wrap:nowrap!important}
html body.purchase-view:not(.expense-view) .purchase-table-search{width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}
html body.purchase-view:not(.expense-view) .purchase-table-search svg{width:19px!important;height:19px!important;min-width:19px!important}
html body.purchase-view:not(.expense-view) .purchase-table-search input{font-size:13px!important;padding:0 10px!important}
html body.purchase-view:not(.expense-view) .purchase-toolbar-spacer{display:block!important;flex:1!important}
html body.purchase-view:not(.expense-view) .purchase-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important;text-align:left!important;padding:0!important;margin:0!important}

/* Botón Filtros: réplica de Traslados en todos los breakpoints. */
html body.purchase-view:not(.expense-view) .purchase-filter-toggle{height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;line-height:1!important;box-shadow:none!important;white-space:nowrap!important;flex:none!important}
html body.purchase-view:not(.expense-view) .purchase-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body.purchase-view:not(.expense-view) .purchase-filter-toggle:hover,
html body.purchase-view:not(.expense-view) .purchase-filter-toggle.active{background:#fff!important;color:#111!important;border-color:#ccb890!important;transform:none!important;filter:none!important;box-shadow:none!important}
html body.purchase-view:not(.expense-view) .purchase-filter-panel{display:flex!important;gap:10px!important;align-items:end!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important}
html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-filter-select{height:38px!important;min-width:190px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;padding:0 10px!important}
html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-filter-select select{font-size:12px!important;color:#111!important}
html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-date-filter{height:38px!important;width:165px!important;min-width:165px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;padding:0 10px!important}
html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-date-filter input{font-size:12px!important;color:#111!important}
html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-clear{height:38px!important;padding:0 16px!important;min-width:auto!important;border-radius:7px!important;margin:0!important}

html body.purchase-view:not(.expense-view) .purchase-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;width:100%!important;max-width:100%!important}
html body.purchase-view:not(.expense-view) .purchase-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important;font-family:Inter,Arial,sans-serif!important}
html body.purchase-view:not(.expense-view) .purchase-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
html body.purchase-view:not(.expense-view) .purchase-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.2!important;color:#3d4653!important;background:transparent!important;letter-spacing:0!important}
html body.purchase-view:not(.expense-view) .purchase-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important}
html body.purchase-view:not(.expense-view) .purchase-doc strong{font-size:12px!important}
html body.purchase-view:not(.expense-view) .purchase-doc small{font-size:10px!important;line-height:1.2!important;margin-top:2px!important;color:#465165!important}
html body.purchase-view:not(.expense-view) .purchase-pay-pill,
html body.purchase-view:not(.expense-view) .purchase-status-pill{min-height:26px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}
html body.purchase-view:not(.expense-view) .purchase-action-buttons{gap:8px!important}
html body.purchase-view:not(.expense-view) .purchase-action-btn{height:36px!important;min-width:68px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:600!important}
html body.purchase-view:not(.expense-view) .purchase-action-btn svg{width:15px!important;height:15px!important}
html body.purchase-view:not(.expense-view) .purchase-table-footer{min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 16px 13px!important;border-top:0!important;font-size:12px!important;color:#465165!important;background:#fff!important}
html body.purchase-view:not(.expense-view) .purchase-pagination-area{display:flex!important;align-items:center!important;gap:24px!important}
html body.purchase-view:not(.expense-view) .purchase-per-page{height:34px!important;min-width:128px!important;padding:0 13px!important;border:1px solid #d7dadd!important;border-radius:7px!important}
html body.purchase-view:not(.expense-view) .purchase-per-page select{font-size:12px!important}
html body.purchase-view:not(.expense-view) .purchase-pagination{gap:8px!important}
html body.purchase-view:not(.expense-view) .purchase-pagination button{width:34px!important;height:34px!important;border-radius:6px!important;font-size:12px!important}

/* Escritorio: misma navegación y topbar de Inventario. */
@media (min-width:1201px){
  html body.purchase-view:not(.expense-view) .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.purchase-view:not(.expense-view) .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.purchase-view:not(.expense-view) .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;border-bottom:1px solid #ddd8d0!important}
  html body.purchase-view:not(.expense-view) .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important;filter:none!important}
  html body.purchase-view:not(.expense-view) .nav{padding:8px 0!important}
  html body.purchase-view:not(.expense-view) .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.purchase-view:not(.expense-view) .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.purchase-view:not(.expense-view) .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.purchase-view:not(.expense-view) .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.purchase-view:not(.expense-view) .sidebar-footer .avatar{width:42px!important;height:42px!important;font-size:14px!important}
  html body.purchase-view:not(.expense-view) .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.purchase-view:not(.expense-view) .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.purchase-view:not(.expense-view) .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
  html body.purchase-view:not(.expense-view) .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important}
  html body.purchase-view:not(.expense-view) .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
  html body.purchase-view:not(.expense-view) .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}
  html body.purchase-view:not(.expense-view) .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
  html body.purchase-view:not(.expense-view) .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
  html body.purchase-view:not(.expense-view) .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
  
  
  html body.purchase-view:not(.expense-view) .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
  html body.purchase-view:not(.expense-view) .topbar-user-copy{display:flex!important;min-width:96px!important}
  html body.purchase-view:not(.expense-view) .topbar-user-copy strong{font-size:13px!important;color:#111!important}
  html body.purchase-view:not(.expense-view) .topbar-user-copy small{font-size:12px!important;color:#596579!important}
  html body.purchase-view:not(.expense-view) .topbar-user-menu{display:grid!important}
}

/* Portátil / tablet horizontal: igual que Inventario (4 → 2 KPIs). */
@media(max-width:1200px){
  html body.purchase-view:not(.expense-view) .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.purchase-view:not(.expense-view) .sidebar{width:220px!important}
  html body.purchase-view:not(.expense-view) .purchase-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.purchase-view:not(.expense-view) .purchase-page-heading{flex-direction:column!important}
  html body.purchase-view:not(.expense-view) .purchase-heading-actions{align-self:flex-start!important}
  html body.purchase-view:not(.expense-view) .purchase-breadcrumbs{margin-left:0!important}
  html body.purchase-view:not(.expense-view) .topbar-user-copy{display:none!important}
  html body.purchase-view:not(.expense-view) .top-actions .search{width:min(650px,64vw)!important}
}

/* Tablet: mismo flujo de Inventario; filtros conservan el botón/flujo de Traslados. */
@media(max-width:1024px){
  html body.purchase-view:not(.expense-view) .app{grid-template-columns:1fr!important}
  html body.purchase-view:not(.expense-view) .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)!important}
  html body.purchase-view:not(.expense-view) .sidebar.open{transform:translateX(0)!important}
  html body.purchase-view:not(.expense-view) .topbar{padding:0 16px!important}
  html body.purchase-view:not(.expense-view) .content{padding:18px 16px 24px!important}
  html body.purchase-view:not(.expense-view) .purchase-breadcrumbs{margin-left:0!important}
  html body.purchase-view:not(.expense-view) .purchase-title-icon{width:52px!important;height:52px!important;min-width:52px!important}
  html body.purchase-view:not(.expense-view) .purchase-page-heading h1{font-size:24px!important}
  html body.purchase-view:not(.expense-view) .purchase-heading-actions{width:100%!important}
  html body.purchase-view:not(.expense-view) .purchase-heading-actions .purchase-btn{flex:1!important;min-width:0!important}
  html body.purchase-view:not(.expense-view) .purchase-table-toolbar{flex-wrap:wrap!important}
  html body.purchase-view:not(.expense-view) .purchase-table-search{width:100%!important;max-width:none!important;flex:1 0 100%!important}
  html body.purchase-view:not(.expense-view) .purchase-toolbar-spacer{display:none!important}
  html body.purchase-view:not(.expense-view) .purchase-results-count{margin-left:auto!important}
  html body.purchase-view:not(.expense-view) .purchase-filter-panel{flex-wrap:wrap!important}
  html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-filter-select{flex:1 1 180px!important;min-width:160px!important}
  html body.purchase-view:not(.expense-view) .purchase-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  html body.purchase-view:not(.expense-view) .purchase-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}
  html body.purchase-view:not(.expense-view) .topbar-user-avatar,
  html body.purchase-view:not(.expense-view) .topbar-user-menu{display:none!important}
  html body.purchase-view:not(.expense-view) .search-kbd{display:none!important}
}

@media(max-width:860px){
  html body.purchase-view:not(.expense-view) .purchase-stats-grid{grid-template-columns:1fr!important}
  html body.purchase-view:not(.expense-view) .purchase-data-table{min-width:1280px!important}
}

/* Móvil: espaciado de Inventario + botón Filtros exactamente con la conducta de Traslados. */
@media(max-width:720px){
  html body.purchase-view:not(.expense-view) .content{padding:18px 14px 24px!important}
  html body.purchase-view:not(.expense-view) .top-actions{gap:8px!important}
  html body.purchase-view:not(.expense-view) .api-status{display:none!important}
  html body.purchase-view:not(.expense-view) .top-actions .search{width:100%!important;max-width:none!important}
  html body.purchase-view:not(.expense-view) .purchase-title-group{align-items:flex-start!important;gap:12px!important}
  html body.purchase-view:not(.expense-view) .purchase-title-icon{display:none!important}
  html body.purchase-view:not(.expense-view) .purchase-page-heading{gap:14px!important;margin-bottom:18px!important}
  html body.purchase-view:not(.expense-view) .purchase-page-heading p{font-size:13px!important}
  html body.purchase-view:not(.expense-view) .purchase-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.purchase-view:not(.expense-view) .purchase-btn{padding:0 11px!important}

  html body.purchase-view:not(.expense-view) .purchase-table-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.purchase-view:not(.expense-view) .purchase-table-search{grid-column:1/-1!important;width:100%!important;max-width:none!important}
  html body.purchase-view:not(.expense-view) .purchase-filter-toggle{width:auto!important;justify-self:start!important}
  html body.purchase-view:not(.expense-view) .purchase-results-count{margin:0!important;align-self:center!important;justify-self:end!important;text-align:right!important}
  html body.purchase-view:not(.expense-view) .purchase-toolbar-spacer{display:none!important}

  html body.purchase-view:not(.expense-view) .purchase-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;align-items:center!important}
  html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-filter-select,
  html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-date-filter{width:100%!important;min-width:0!important;max-width:none!important}
  html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-clear{grid-column:1/-1!important;width:100%!important}

  html body.purchase-view:not(.expense-view) .purchase-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}
  html body.purchase-view:not(.expense-view) .purchase-stat-body strong{font-size:23px!important}
  html body.purchase-view:not(.expense-view) .purchase-stat-trend svg{display:none!important}
  html body.purchase-view:not(.expense-view) .purchase-table-footer{padding:12px!important}
  html body.purchase-view:not(.expense-view) .purchase-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  html body.purchase-view:not(.expense-view) .purchase-pagination{gap:4px!important;flex-wrap:wrap!important}
  html body.purchase-view:not(.expense-view) .purchase-pagination button{width:30px!important;height:30px!important}
  html body.purchase-view:not(.expense-view) .purchase-action-cell{min-width:235px!important}
  html body.purchase-view:not(.expense-view) .purchase-action-btn{min-width:64px!important;padding:0 9px!important;font-size:11px!important}
}

@media(max-width:520px){
  html body.purchase-view:not(.expense-view) .purchase-filter-panel{grid-template-columns:1fr!important}
  html body.purchase-view:not(.expense-view) .purchase-filter-panel .purchase-clear{grid-column:1!important}
}

/* ===== V243 · INVENTARIO — colores preservados en iPhone / móvil / tablet =====
   En Inventario algunos fondos de indicadores y badges provenían de reglas base
   con menor prioridad que las reglas responsive. Este bloque los fija al final
   de la cascada para que WebKit/Safari y otros navegadores móviles conserven la
   misma lectura cromática que escritorio, Compras y Traslados. */
html body.inventory-view .inventory-stat-icon{
  background-color:#f3eee6!important;
  background-image:none!important;
  color:#111!important;
  opacity:1!important;
}
html body.inventory-view .inventory-stat-icon.inventory-gold-icon,
html body.inventory-view .inventory-stat-icon.inventory-gold-icon svg{
  color:#8d651f!important;
}
html body.inventory-view .inventory-stat-side b{
  background-color:#dff6e7!important;
  background-image:none!important;
  color:#1d8449!important;
  opacity:1!important;
}
html body.inventory-view .inventory-stat-side.danger b{
  background-color:#fde8e8!important;
  background-image:none!important;
  color:#c03c3c!important;
}
html body.inventory-view .inventory-category-badge{
  opacity:1!important;
  -webkit-appearance:none!important;
  appearance:none!important;
}
html body.inventory-view .inventory-category-badge.inventory-category-material{
  background-color:#d9eafa!important;
  color:#284c72!important;
}
html body.inventory-view .inventory-category-badge.inventory-category-herraje{
  background-color:#d6f3e4!important;
  color:#16704d!important;
}
html body.inventory-view .inventory-category-badge.inventory-category-dije{
  background-color:#e9e3fb!important;
  color:#504487!important;
}
html body.inventory-view .inventory-category-badge.inventory-category-cadena{
  background-color:#fbefc7!important;
  color:#786017!important;
}
html body.inventory-view .inventory-title-icon{
  background-color:#f4ecdd!important;
}
html body.inventory-view .inventory-data-table thead{
  background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important;
}

/* Refuerzo responsive para Safari iOS, Chrome móvil y tablets. */
@media(max-width:1024px){
  html body.inventory-view .inventory-stat-card,
  html body.inventory-view .inventory-table-card{
    background-color:#fff!important;
  }
  html body.inventory-view .inventory-stat-icon{
    background-color:#f3eee6!important;
  }
  html body.inventory-view .inventory-stat-side b{
    background-color:#dff6e7!important;
    color:#1d8449!important;
  }
  html body.inventory-view .inventory-stat-side.danger b{
    background-color:#fde8e8!important;
    color:#c03c3c!important;
  }
  html body.inventory-view .inventory-category-material{background-color:#d9eafa!important;color:#284c72!important}
  html body.inventory-view .inventory-category-herraje{background-color:#d6f3e4!important;color:#16704d!important}
  html body.inventory-view .inventory-category-dije{background-color:#e9e3fb!important;color:#504487!important}
  html body.inventory-view .inventory-category-cadena{background-color:#fbefc7!important;color:#786017!important}
}

/* iPhone / móviles estrechos: no ocultar ni decolorar los badges de tendencia. */
@media(max-width:720px){
  html body.inventory-view .inventory-stat-side{
    display:flex!important;
    opacity:1!important;
  }
  html body.inventory-view .inventory-stat-side b{
    display:inline-flex!important;
    visibility:visible!important;
    min-width:48px!important;
    padding:6px 8px!important;
  }
  html body.inventory-view .inventory-stat-side svg{display:none!important}
}

/* ===== V244 · COMPRAS — colores preservados en iPhone / móvil / tablet =====
   Refuerzo final de la cascada para Safari/WebKit y navegadores móviles.
   No altera datos, eventos ni lógica del módulo. */
html body.purchase-view:not(.expense-view) .purchase-title-icon{
  background-color:#f4ecdd!important;
  background-image:none!important;
  color:#101827!important;
}
html body.purchase-view:not(.expense-view) .purchase-stat-card,
html body.purchase-view:not(.expense-view) .purchase-table-card{
  background-color:#fff!important;
}
html body.purchase-view:not(.expense-view) .purchase-stat-icon{
  background-color:#f3eee6!important;
  background-image:none!important;
  color:#111!important;
}
html body.purchase-view:not(.expense-view) .purchase-stat-icon svg{
  color:#111!important;
  stroke:currentColor!important;
}
html body.purchase-view:not(.expense-view) .purchase-stat-icon.gold,
html body.purchase-view:not(.expense-view) .purchase-stat-icon.gold svg{
  color:#9b6b20!important;
}
html body.purchase-view:not(.expense-view) .purchase-stat-trend b{
  background-color:#dff6e7!important;
  background-image:none!important;
  color:#1f8248!important;
  -webkit-text-fill-color:#1f8248!important;
}
html body.purchase-view:not(.expense-view) .purchase-stat-trend polyline{
  stroke:#9b6b20!important;
}
html body.purchase-view:not(.expense-view) .purchase-data-table thead,
html body.purchase-view:not(.expense-view) .purchase-data-table thead tr{
  background-color:#f2e6d2!important;
}
html body.purchase-view:not(.expense-view) .purchase-data-table thead th{
  background-color:#f2e6d2!important;
  color:#3d4653!important;
  -webkit-text-fill-color:#3d4653!important;
}
html body.purchase-view:not(.expense-view) .purchase-pay-pill{
  background-color:#eef0f3!important;
  background-image:none!important;
  color:#273243!important;
  -webkit-text-fill-color:#273243!important;
}
html body.purchase-view:not(.expense-view) .purchase-status-pill.confirmed{
  background-color:#d9f3e3!important;
  background-image:none!important;
  color:#17683b!important;
  -webkit-text-fill-color:#17683b!important;
}
html body.purchase-view:not(.expense-view) .purchase-status-pill.opening{
  background-color:#dbeafe!important;
  background-image:none!important;
  color:#1f5c9e!important;
  -webkit-text-fill-color:#1f5c9e!important;
}
html body.purchase-view:not(.expense-view) .purchase-btn.primary{
  background-color:#9b6b20!important;
  background-image:linear-gradient(#a77b31,#95691f)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body.purchase-view:not(.expense-view) .purchase-filter-toggle,
html body.purchase-view:not(.expense-view) .purchase-btn.secondary{
  background-color:#fff!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border-color:#ccb890!important;
}
html body.purchase-view:not(.expense-view) .purchase-pagination .page.active{
  background-color:#9a712f!important;
  background-image:none!important;
  border-color:#9a712f!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body.purchase-view:not(.expense-view) .purchase-filter-panel{
  background-color:#fcfbf9!important;
}

/* Safari/iOS puede recomponer fondos dentro de contenedores con overflow.
   Se repiten los colores en los breakpoints donde cambia el layout. */
@media(max-width:1024px){
  html body.purchase-view:not(.expense-view) .purchase-title-icon{background-color:#f4ecdd!important}
  html body.purchase-view:not(.expense-view) .purchase-stat-card{background-color:#fff!important}
  html body.purchase-view:not(.expense-view) .purchase-stat-icon{background-color:#f3eee6!important}
  html body.purchase-view:not(.expense-view) .purchase-stat-trend b{background-color:#dff6e7!important;color:#1f8248!important;-webkit-text-fill-color:#1f8248!important}
  html body.purchase-view:not(.expense-view) .purchase-data-table thead th{background-color:#f2e6d2!important;color:#3d4653!important;-webkit-text-fill-color:#3d4653!important}
  html body.purchase-view:not(.expense-view) .purchase-pay-pill{background-color:#eef0f3!important;color:#273243!important;-webkit-text-fill-color:#273243!important}
  html body.purchase-view:not(.expense-view) .purchase-status-pill.confirmed{background-color:#d9f3e3!important;color:#17683b!important;-webkit-text-fill-color:#17683b!important}
  html body.purchase-view:not(.expense-view) .purchase-status-pill.opening{background-color:#dbeafe!important;color:#1f5c9e!important;-webkit-text-fill-color:#1f5c9e!important}
}
@media(max-width:720px){
  html body.purchase-view:not(.expense-view) .purchase-stat-icon{
    display:grid!important;
    background-color:#f3eee6!important;
    opacity:1!important;
  }
  html body.purchase-view:not(.expense-view) .purchase-stat-trend b{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background-color:#dff6e7!important;
    opacity:1!important;
  }
  html body.purchase-view:not(.expense-view) .purchase-data-table thead th{
    background-color:#f2e6d2!important;
  }
  html body.purchase-view:not(.expense-view) .purchase-pay-pill,
  html body.purchase-view:not(.expense-view) .purchase-status-pill{
    opacity:1!important;
  }
}


/* ===== V245 · PRODUCTOS — referencia visual suministrada =====
   Rediseño aislado al módulo Productos. Conserva carga API, filtros,
   creación, edición, desactivación, kardex y búsqueda global existentes. */
html body.product-view{background:#fafafa!important;font-size:16px!important}
html body.product-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:18px 30px 26px!important;background:#fafafa!important}
html body.product-view .topbar{height:74px!important;min-height:74px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;padding:0 30px!important;display:flex!important;align-items:center!important}
html body.product-view .topbar-title{display:none!important}
html body.product-view #themeBtn,
html body.product-view #exportButton,
html body.product-view #quickAction{display:none!important}
html body.product-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
html body.product-view .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}
html body.product-view .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
html body.product-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
html body.product-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}


html body.product-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
html body.product-view .topbar-user-copy{display:flex!important;min-width:96px!important}
html body.product-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
html body.product-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
html body.product-view .topbar-user-menu{display:grid!important}

.products-page{--p-text:#101827;--p-muted:#596579;--p-line:#ddd8d0;--p-soft:#ece8e1;--p-gold:#9b6b20;--p-gold-soft:#f4ecdd;min-width:0;color:var(--p-text);font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important}
.products-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 10px 82px!important}.products-breadcrumbs span{margin:0 7px!important;color:#989fa9!important}.products-breadcrumbs strong{font-weight:600!important;color:#465166!important}
.products-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:20px!important}.products-title-group{display:flex!important;gap:20px!important;align-items:center!important;min-width:0!important}.products-title-icon{width:62px!important;height:60px!important;border-radius:10px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important;flex:none!important}.products-title-icon svg{width:31px!important;height:31px!important;stroke-width:1.8!important}.products-page-heading h1{font-family:Inter,Arial,sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 3px!important;color:#101827!important}.products-page-heading p{font-size:14px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}.products-heading-actions{display:flex!important;gap:10px!important;align-self:center!important;flex:none!important}
.products-btn{height:46px!important;border-radius:8px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;border:1px solid transparent!important;background:#fff!important;white-space:nowrap!important;cursor:pointer!important}.products-btn svg{width:18px!important;height:18px!important}.products-btn.secondary{border-color:#d4d5d8!important;color:#111!important}.products-btn.primary{background:linear-gradient(#a77b31,#95691f)!important;color:#fff!important;border-color:#95691f!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
.products-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:14px!important}.products-stat-card{min-height:104px!important;border:1px solid #ddd8d0!important;border-radius:7px!important;padding:14px!important;gap:18px!important;background:#fff!important;display:flex!important;align-items:center!important;box-shadow:0 1px 3px rgba(15,23,42,.04)!important;overflow:hidden!important}.products-stat-icon{width:56px!important;height:56px!important;border-radius:10px!important;background:#f3eee6!important;display:grid!important;place-items:center!important;flex:none!important;color:#111!important;font-size:28px!important;font-weight:500!important}.products-stat-icon svg{width:28px!important;height:28px!important}.products-info-icon{font-family:Arial,sans-serif!important;border:2px solid transparent!important}.products-info-icon::before{content:"";width:22px;height:22px;border:2px solid #111;border-radius:50%;position:absolute}.products-info-icon{position:relative;font-size:0!important}.products-info-icon::after{content:"!";font-size:16px;font-weight:700;position:relative;line-height:1;color:#111}.products-stat-body{display:flex!important;flex-direction:column!important;min-width:0!important;flex:1!important}.products-stat-body>span{font-size:12px!important;line-height:1.2!important;margin-bottom:6px!important;color:#526077!important;white-space:nowrap!important}.products-stat-body strong{font-family:Inter,Arial,sans-serif!important;font-size:25px!important;line-height:1.1!important;font-weight:700!important;color:#101827!important;white-space:nowrap!important}.products-stat-body small{font-size:12px!important;line-height:1.25!important;margin-top:5px!important;color:#596579!important;white-space:nowrap!important}.products-stat-side{margin-left:auto!important;align-self:stretch!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;align-items:flex-end!important;flex:none!important}.products-stat-side b{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:52px!important;padding:6px 8px!important;border-radius:7px!important;background:#dff6e7!important;color:#1d8449!important;font-size:11px!important;font-weight:600!important;white-space:nowrap!important}.products-stat-side.danger b{background:#fde8e8!important;color:#d82f3a!important}.products-stat-side svg{width:46px!important;height:32px!important}.products-stat-side polyline{fill:none!important;stroke:#9b6b20!important;stroke-width:1.55!important;stroke-linecap:round!important;stroke-linejoin:round!important}.products-stat-side.no-badge{justify-content:flex-end!important}.products-stat-side.no-badge b{display:none!important}
.products-table-card{border:1px solid #ddd8d0!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 1px 3px rgba(15,23,42,.04)!important}.products-filter-toolbar{min-height:65px!important;padding:10px 12px!important;display:grid!important;grid-template-columns:minmax(330px,1.65fr) repeat(4,minmax(145px,.72fr)) auto auto!important;gap:10px!important;align-items:center!important;border-bottom:1px solid #ece8e1!important}.products-search-box{height:39px!important;border:1px solid #d6d8dd!important;border-radius:6px!important;background:#fff!important;display:flex!important;align-items:center!important;padding:0 11px!important;min-width:0!important}.products-search-box svg{width:18px!important;height:18px!important;color:#344256!important;flex:none!important}.products-search-box input{width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 10px!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;color:#172033!important;min-width:0!important;box-shadow:none!important}.products-search-box input::placeholder{color:#596579!important}.products-select-wrap{height:39px!important;border:1px solid #d6d8dd!important;border-radius:6px!important;background:#fff!important;display:flex!important;align-items:center!important;padding:0 9px 0 11px!important;min-width:0!important;position:relative!important}.products-select-wrap select{appearance:none!important;-webkit-appearance:none!important;width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 28px 0 0!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;color:#172033!important;cursor:pointer!important;min-width:0!important;box-shadow:none!important}.products-select-wrap svg{width:15px!important;height:15px!important;position:absolute!important;right:9px!important;pointer-events:none!important}.products-clear-btn{height:39px!important;padding:0 14px!important;border:1px solid #d6d8dd!important;border-radius:6px!important;background:#fff!important;color:#172033!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;font-weight:600!important;white-space:nowrap!important;cursor:pointer!important}.products-clear-btn svg{width:16px!important;height:16px!important}.products-results-count{font-size:11px!important;color:#36425a!important;white-space:nowrap!important;text-align:right!important;padding-left:5px!important}.products-results-count b{font-weight:600!important}.products-loading{padding:34px!important;text-align:center!important;color:#596579!important}.products-loading.error{color:#b3313b!important}
.products-table-wrap{width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}.products-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important;font-family:Inter,Arial,sans-serif!important}.products-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}.products-data-table th{height:40px!important;padding:10px 12px!important;background:transparent!important;border:0!important;color:#3d4653!important;font-size:10px!important;font-weight:500!important;letter-spacing:0!important;text-align:left!important;white-space:nowrap!important}.products-data-table td{height:40px!important;padding:6px 12px!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;font-size:11px!important;vertical-align:middle!important;white-space:nowrap!important;background:#fff!important}.products-data-table tbody tr:hover td{background:#fcfbf8!important}.products-data-table tbody tr:last-child td{border-bottom:0!important}.products-check{width:38px!important;text-align:center!important;padding-left:12px!important;padding-right:4px!important}.products-check input{width:17px!important;height:17px!important;accent-color:#9a712f!important}.products-sku strong{font-weight:600!important}.products-name{font-weight:500!important;max-width:280px!important;overflow:hidden!important;text-overflow:ellipsis!important}.products-sort-arrow{font-size:12px!important;margin-left:7px!important;color:#273243!important}.products-category-badge{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:70px!important;min-height:25px!important;padding:0 10px!important;border-radius:5px!important;font-size:10px!important;font-weight:600!important;background:#eef0f3!important;color:#334155!important}.products-category-material{background:#d9eafa!important;color:#284c72!important}.products-category-herraje{background:#d6f3e4!important;color:#16704d!important}.products-category-dije{background:#e9e3fb!important;color:#504487!important}.products-category-cadena{background:#fbefc7!important;color:#786017!important}.products-category-anillo{background:#fbe4dc!important;color:#8c4d35!important}.products-category-arete,.products-category-topo,.products-category-candoga{background:#fde8f0!important;color:#8a3d63!important}.products-category-pulsera,.products-category-tobillera{background:#e2edf9!important;color:#345d87!important}.products-status-pill{display:inline-flex!important;align-items:center!important;gap:7px!important;min-width:70px!important;justify-content:center!important;height:25px!important;padding:0 10px!important;border-radius:5px!important;font-size:10px!important;font-weight:600!important}.products-status-pill i{width:8px!important;height:8px!important;border-radius:50%!important;background:currentColor!important}.products-status-pill.active{background:#d9f3e3!important;color:#17683b!important}.products-status-pill.inactive{background:#fde8e8!important;color:#b3313b!important}.products-stock button{border:0!important;background:transparent!important;color:#1f2a3a!important;font:inherit!important;padding:0!important;cursor:pointer!important;font-weight:500!important}.products-stock button:hover{text-decoration:underline!important}.products-actions-cell{min-width:345px!important}.products-action-buttons{display:flex!important;align-items:center!important;gap:7px!important}.products-action-btn{height:34px!important;padding:0 12px!important;border:1px solid #d7dadd!important;border-radius:6px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;font-weight:600!important;cursor:pointer!important;white-space:nowrap!important}.products-action-btn svg{width:15px!important;height:15px!important}.products-action-btn.danger{border-color:#f2c2c5!important;color:#e1292f!important}.products-more-btn{height:34px!important;min-width:44px!important;padding:0 10px!important;border:1px solid #d7dadd!important;border-radius:6px!important;background:#fff!important;color:#111!important;display:grid!important;place-items:center!important;cursor:pointer!important}.products-more-btn svg{width:18px!important;height:18px!important}.products-inactive-note{height:34px!important;display:inline-flex!important;align-items:center!important;padding:0 12px!important;border:1px solid #e3e5e8!important;border-radius:6px!important;color:#7a8492!important;font-size:11px!important}.products-empty{padding:34px!important;text-align:center!important;color:#596579!important}.products-empty button{border:0!important;background:none!important;color:#9b6b20!important;text-decoration:underline!important;cursor:pointer!important}
.products-table-footer{min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:10px 0 0!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;color:#465165!important;background:#fafafa!important}.products-pagination-area{display:flex!important;align-items:center!important;gap:16px!important}.products-page-size{height:40px!important;min-width:138px!important;border:1px solid #d7dadd!important;border-radius:6px!important;background:#fff!important;display:flex!important;align-items:center!important;padding:0 10px!important;position:relative!important}.products-page-size select{appearance:none!important;-webkit-appearance:none!important;width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 24px 0 0!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;color:#172033!important}.products-page-size svg{position:absolute!important;right:9px!important;width:15px!important;height:15px!important;pointer-events:none!important}.products-pagination{display:flex!important;align-items:center!important;gap:5px!important}.products-pagination button,.products-page-btn{width:36px!important;height:36px!important;border:1px solid #d7dadd!important;border-radius:6px!important;background:#fff!important;color:#172033!important;display:grid!important;place-items:center!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;cursor:pointer!important}.products-pagination button svg{width:15px!important;height:15px!important}.products-pagination button:disabled{opacity:.4!important;cursor:default!important}.products-pagination .products-page-btn.active{background:#9a712f!important;color:#fff!important;border-color:#9a712f!important}.products-page-dots{width:25px!important;text-align:center!important;color:#596579!important}

@media(min-width:1201px){
  html body.product-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.product-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.product-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;border-bottom:1px solid #ddd8d0!important}
  html body.product-view .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important}
  html body.product-view .nav{padding:8px 0!important}
  html body.product-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.product-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.product-view .nav button .nav-icon{display:inline-flex!important;width:20px!important;min-width:20px!important}
  html body.product-view .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.product-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#111!important;box-shadow:inset 3px 0 #9b6b20!important;font-weight:600!important}
  html body.product-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.product-view .sidebar-footer .avatar{width:42px!important;height:42px!important;font-size:14px!important;background:#e8dac0!important}
  html body.product-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.product-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.product-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
}
@media(max-width:1320px){.products-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.products-filter-toolbar{grid-template-columns:2fr 1fr 1fr!important}.products-search-box{grid-column:1/-1!important}.products-results-count{text-align:left!important}.products-page-heading{flex-direction:column!important}.products-heading-actions{align-self:flex-start!important}.products-breadcrumbs{margin-left:0!important}}
@media(max-width:1200px){html body.product-view .app{grid-template-columns:220px minmax(0,1fr)!important}html body.product-view .sidebar{width:220px!important}.products-page-heading{flex-direction:column!important}.products-heading-actions{align-self:flex-start!important}.products-breadcrumbs{margin-left:0!important}html body.product-view .topbar-user-copy{display:none!important}html body.product-view .top-actions .search{width:min(650px,64vw)!important}}
@media(max-width:1024px){html body.product-view .app{grid-template-columns:1fr!important}html body.product-view .sidebar{position:fixed!important;width:280px!important;transform:translateX(-100%)}html body.product-view .sidebar.open{transform:translateX(0)!important}html body.product-view .topbar{padding:0 16px!important}html body.product-view .content{padding:18px 16px 24px!important}.products-page{min-width:0!important}.products-title-icon{width:52px!important;height:52px!important}.products-page-heading h1{font-size:24px!important}.products-heading-actions{width:100%!important}.products-heading-actions .products-btn{flex:1!important;min-width:0!important}.products-filter-toolbar{grid-template-columns:1fr 1fr!important}.products-search-box{grid-column:1/-1!important}.products-clear-btn{width:100%!important}.products-results-count{align-self:center!important;text-align:right!important}.products-table-footer{align-items:flex-start!important;gap:14px!important;flex-direction:column!important}.products-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}html body.product-view .topbar-user-avatar,html body.product-view .topbar-user-menu{display:none!important}html body.product-view .search-kbd{display:none!important}}
@media(max-width:760px){html body.product-view .content{padding:18px 14px 24px!important}html body.product-view .topbar{padding:9px 10px!important;min-height:64px!important;height:auto!important}html body.product-view .top-actions{gap:8px!important}html body.product-view .api-status{display:none!important}html body.product-view .top-actions .search{width:100%!important;max-width:none!important}.products-title-group{align-items:flex-start!important;gap:12px!important}.products-title-icon{display:none!important}.products-page-heading{gap:14px!important;margin-bottom:18px!important}.products-page-heading p{font-size:13px!important}.products-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.products-btn{padding:0 11px!important}.products-stats-grid{grid-template-columns:1fr!important}.products-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}.products-stat-body strong{font-size:23px!important}.products-stat-side svg{display:none!important}.products-filter-toolbar{display:grid!important;grid-template-columns:1fr!important;padding:10px!important}.products-filter-toolbar>*{grid-column:1!important;width:100%!important}.products-results-count{text-align:left!important}.products-data-table{min-width:1180px!important}.products-table-footer{padding:12px 0 0!important}.products-pagination-area{flex-direction:column!important;align-items:flex-start!important}.products-pagination{gap:4px!important;flex-wrap:wrap!important}.products-pagination button,.products-page-btn{width:30px!important;height:30px!important}.products-actions-cell{min-width:330px!important}}

/* ===== V246 · PRODUCTOS — misma escala, tipografía, espaciado y filtros que Inventario =====
   Mantiene intactas las funciones/API de Productos. Solo iguala la presentación y
   la conducta responsive del bloque de filtros a Inventario y kardex. */
html body.product-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
.products-page{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important}
.products-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 12px 85px!important}.products-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}.products-breadcrumbs strong{font-weight:600!important;color:#465166!important}
.products-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}.products-title-group{display:flex!important;gap:18px!important;align-items:center!important;min-width:0!important}.products-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important;flex:none!important}.products-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}.products-page-heading h1{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}.products-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}.products-heading-actions{display:flex!important;gap:10px!important;align-self:center!important}
.products-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;color:#111!important;box-shadow:none!important}.products-btn svg{width:18px!important;height:18px!important}.products-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}.products-btn.primary{min-width:0!important;background:linear-gradient(#a77b31,#95691f)!important;border-color:#95691f!important;color:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}.products-btn.compact{height:40px!important;padding:0 18px!important}
.products-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}.products-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:18px!important;gap:20px!important;background:#fff!important;display:flex!important;align-items:center!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}.products-stat-icon{width:56px!important;height:56px!important;border-radius:10px!important;background:#f3eee6!important}.products-stat-icon svg{width:28px!important;height:28px!important}.products-stat-body>span{font-size:13px!important;line-height:1.2!important;margin-bottom:6px!important;color:#596579!important}.products-stat-body strong{font-family:Inter,Arial,sans-serif!important;font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important}.products-stat-body small{font-size:13px!important;line-height:1.25!important;margin-top:3px!important;color:#596579!important}.products-stat-side b{height:auto!important;min-width:48px!important;padding:6px 8px!important;border-radius:7px!important;font-size:11px!important}.products-stat-side svg{width:74px!important;height:30px!important}
.products-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}.products-filter-toolbar{min-height:66px!important;padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important}.products-search-box{width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}.products-search-box svg{width:19px!important;height:19px!important}.products-search-box input{font-size:13px!important;padding:0 10px!important}.products-toolbar-spacer{flex:1!important}.products-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important;text-align:left!important;padding:0!important}.products-filter-toggle{flex:none!important}
.products-filter-panel{display:flex!important;gap:10px!important;align-items:center!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important}.products-filter-panel .products-select-wrap{height:38px!important;min-width:180px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;padding:0 10px!important}.products-filter-panel .products-select-wrap select{font-size:12px!important;color:#111!important}.products-filter-panel .products-clear-btn{margin-left:2px!important;min-width:auto!important}
.products-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important;font-family:Inter,Arial,sans-serif!important}.products-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}.products-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.2!important;color:#3d4653!important;background:transparent!important;letter-spacing:0!important}.products-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important}.products-check{width:40px!important;padding-left:16px!important;padding-right:4px!important}.products-sku strong{font-size:12px!important}.products-name{font-size:12px!important}.products-sort-arrow{font-size:12px!important}.products-category-badge{min-height:26px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}.products-status-pill{height:26px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}.products-actions-cell{min-width:365px!important}.products-action-buttons{gap:8px!important}.products-action-btn{height:36px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:600!important}.products-more-btn{height:36px!important;min-width:46px!important;border-radius:7px!important}.products-inactive-note{height:36px!important;border-radius:7px!important;font-size:12px!important}
.products-table-footer{min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 16px 13px!important;border-top:0!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;color:#465165!important;background:#fff!important}.products-pagination-area{display:flex!important;align-items:center!important;gap:24px!important}.products-page-size{height:34px!important;min-width:0!important;padding:0 13px!important;border:1px solid #d7dadd!important;border-radius:7px!important}.products-page-size select{font-size:12px!important}.products-pagination{gap:8px!important}.products-pagination button,.products-page-btn{width:34px!important;height:34px!important;border-radius:6px!important;font-size:12px!important}

/* Tablet: misma respuesta que Inventario. */
@media(max-width:1200px){
  .products-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .products-page-heading{flex-direction:column!important}
  .products-heading-actions{align-self:flex-start!important}
  .products-breadcrumbs{margin-left:0!important}
}
@media(max-width:1024px){
  html body.product-view .content{padding:18px 16px 24px!important}
  .products-page{min-width:0!important}
  .products-breadcrumbs{margin-left:0!important}
  .products-title-icon{width:52px!important;height:52px!important}
  .products-page-heading h1{font-size:24px!important}
  .products-heading-actions{width:100%!important}.products-heading-actions .products-btn{flex:1!important;min-width:0!important}
  .products-filter-toolbar{flex-wrap:wrap!important}
  .products-filter-toolbar>*{grid-column:auto!important;width:auto!important;min-width:0!important}
  .products-search-box{width:100%!important;max-width:none!important;flex:1 0 100%!important}
  .products-toolbar-spacer{display:none!important}
  .products-results-count{margin-left:auto!important}
  .products-filter-panel{flex-wrap:wrap!important}
  .products-filter-panel .products-select-wrap{flex:1 1 180px!important;min-width:160px!important}
  .products-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  .products-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important;flex-direction:row!important;align-items:center!important}
  .products-pagination{flex-wrap:nowrap!important}
}
@media(max-width:860px){.products-stats-grid{grid-template-columns:1fr!important}.products-data-table{min-width:1180px!important}}
@media(max-width:720px){
  html body.product-view .content{padding:18px 14px 24px!important}
  .products-title-group{align-items:flex-start!important;gap:12px!important}.products-title-icon{display:none!important}
  .products-page-heading{gap:14px!important;margin-bottom:18px!important}.products-page-heading p{font-size:13px!important}
  .products-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.products-btn{padding:0 11px!important}
  .products-filter-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;padding:13px!important}.products-filter-toolbar>*{grid-column:auto!important;width:auto!important;min-width:0!important}.products-search-box{grid-column:1/-1!important;width:100%!important;max-width:none!important}.products-filter-toggle{width:100%!important}.products-results-count{margin:0!important;align-self:center!important;text-align:right!important}.products-toolbar-spacer{display:none!important}
  .products-filter-panel{display:grid!important;grid-template-columns:1fr!important}.products-filter-panel .products-select-wrap,.products-filter-panel .products-clear-btn{width:100%!important;min-width:0!important;margin:0!important}
  .products-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}.products-stat-body strong{font-size:23px!important}.products-stat-side svg{display:none!important}
  .products-table-footer{padding:12px!important}.products-pagination-area{flex-direction:column!important;align-items:flex-start!important}.products-pagination{gap:4px!important;flex-wrap:wrap!important}.products-pagination button,.products-page-btn{width:30px!important;height:30px!important}
  .products-actions-cell{min-width:350px!important}.products-action-btn{padding:0 9px!important;font-size:11px!important}.products-more-btn{min-width:42px!important}
}

/* ===== V247 · PRODUCTOS — SIDEBAR EXACTO DE INVENTARIO =====
   Replica en Productos las mismas métricas, colores, tipografía, logo,
   estado activo y comportamiento responsive del sidebar de Inventario.
   No modifica la lógica ni las funciones del módulo. */
html body.product-view .app{grid-template-columns:250px minmax(0,1fr)!important}
html body.product-view .sidebar{width:250px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;padding:12px 14px 16px!important;color:#1b2738!important}
html body.product-view .sidebar-brand,
html body.product-view .sidebar-footer{border-color:#ddd8d0!important}
html body.product-view .sidebar-brand{height:64px!important;padding:4px 8px 10px!important}
html body.product-view .sidebar-brand img{filter:none!important;width:185px!important;max-height:50px!important;object-fit:contain!important}
html body.product-view .nav{padding:10px 0!important}
html body.product-view .nav-group{font-size:12px!important;color:#5a6474!important;letter-spacing:0!important;padding:13px 8px 6px!important;font-family:Arial,"Helvetica Neue",sans-serif!important}
html body.product-view .nav button{display:flex!important;gap:12px!important;color:#1b2738!important;padding:9px 12px!important;border-radius:8px!important;margin:1px 0!important;font-size:14px!important;font-family:Arial,"Helvetica Neue",sans-serif!important;box-shadow:none!important}
html body.product-view .nav .icon,
html body.product-view .nav .nav-icon{display:inline-grid!important;width:20px!important;min-width:20px!important;height:20px!important;place-items:center!important}
html body.product-view .nav .icon svg,
html body.product-view .nav .nav-icon svg,
html body.product-view .nav button svg{width:19px!important;height:19px!important;stroke-width:1.8!important}
html body.product-view .nav button:hover{background:#faf7f1!important;color:#1b2738!important}
html body.product-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;font-weight:600!important;color:#111!important;box-shadow:none!important;position:relative!important}
html body.product-view .nav button.active:before{content:"";position:absolute;left:-7px;top:0;bottom:0;width:3px;background:#9b6b20;border-radius:0 4px 4px 0}
html body.product-view .sidebar-footer{background:#fff!important}
html body.product-view .sidebar-footer strong{color:#111!important}
html body.product-view .sidebar-footer small,
html body.product-view .sidebar-footer .text-btn{color:#596579!important}
html body.product-view .avatar{border:0!important;background:#e8dac0!important;color:#111!important;border-radius:50%!important;width:44px!important;height:44px!important}

/* Desktop: mismas medidas finales que Inventario. */
@media (min-width:1201px){
  html body.product-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.product-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.product-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;border-bottom:1px solid #ddd8d0!important}
  html body.product-view .sidebar-brand img{filter:none!important;width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important}
  html body.product-view .nav{padding:8px 0!important}
  html body.product-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  html body.product-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  html body.product-view .nav button .nav-icon,
  html body.product-view .nav button .icon{width:20px!important;min-width:20px!important;height:20px!important}
  html body.product-view .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  html body.product-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;font-weight:600!important;color:#111!important;box-shadow:none!important;position:relative!important}
  html body.product-view .nav button.active:before{content:"";position:absolute;left:-7px;top:0;bottom:0;width:3px;background:#9b6b20;border-radius:0 4px 4px 0}
  html body.product-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  html body.product-view .sidebar-footer .avatar{width:42px!important;height:42px!important;font-size:14px!important}
  html body.product-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  html body.product-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
  html body.product-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
}

/* Tablet: mismo ancho y navegación de Inventario. */
@media(max-width:1200px){
  html body.product-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.product-view .sidebar{width:220px!important;min-width:220px!important;background:#fff!important;color:#1b2738!important}
}

/* Tablet vertical / móvil grande: drawer idéntico a Inventario. */
@media(max-width:1024px){
  html body.product-view .app{grid-template-columns:1fr!important}
  html body.product-view .sidebar{position:fixed!important;width:280px!important;min-width:0!important;transform:translateX(-100%)!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
  html body.product-view .sidebar.open{transform:translateX(0)!important}
}

/* ======================================================================
   V248 · PRODUCTOS — MISMA ESCALA, ESPACIADO Y FILTROS QUE COMPRAS
   ----------------------------------------------------------------------
   Objetivo:
   - Productos usa las mismas métricas visuales de Compras.
   - El sidebar/topbar no aumenta al entrar a Productos.
   - El botón Filtros y su panel responden igual que Compras.
   - Se conserva toda la lógica/API de Productos.
   ====================================================================== */

/* Shell de Productos = shell de Compras. */
html body.product-view{font-size:16px!important;background:#fafafa!important}
html body.product-view .app{grid-template-columns:250px minmax(0,1fr)!important}
html body.product-view .sidebar{width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important}
html body.product-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;border-bottom:1px solid #ddd8d0!important}
html body.product-view .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important;filter:none!important}
html body.product-view .nav{padding:8px 0!important}
html body.product-view .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important;font-family:Inter,Arial,sans-serif!important}
html body.product-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important;font-family:Inter,Arial,sans-serif!important}
html body.product-view .nav button .nav-icon,html body.product-view .nav button .icon{width:20px!important;min-width:20px!important;height:20px!important}
html body.product-view .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body.product-view .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#151515!important;font-weight:600!important;box-shadow:none!important;position:relative!important}
html body.product-view .nav button.active:before{content:""!important;position:absolute!important;left:-7px!important;top:0!important;bottom:0!important;width:3px!important;background:#9b6b20!important;border-radius:0 4px 4px 0!important}
html body.product-view .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
html body.product-view .sidebar-footer .avatar,html body.product-view .avatar{width:42px!important;height:42px!important;border-radius:50%!important;background:#eadfc9!important;color:#171717!important;font-size:14px!important}
html body.product-view .sidebar-footer strong{font-size:13px!important;color:#171717!important}
html body.product-view .sidebar-footer small{font-size:11px!important;color:#596579!important}
html body.product-view .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
html body.product-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;display:flex!important;align-items:center!important}
html body.product-view .topbar-title{display:none!important}
html body.product-view #themeBtn,html body.product-view #exportButton,html body.product-view #quickAction{display:none!important}
html body.product-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
html body.product-view .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important}
html body.product-view .top-actions .search input{width:100%!important;font-size:13px!important;color:#111!important}
html body.product-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
html body.product-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}


html body.product-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
html body.product-view .topbar-user-copy{display:flex!important;min-width:96px!important}
html body.product-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
html body.product-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
html body.product-view .topbar-user-menu{display:grid!important}

/* Escala desktop de Productos = Compras. */
html body.product-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
html body.product-view .products-page{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important}
html body.product-view .products-breadcrumbs{margin:0 0 12px 85px!important;font-size:12px!important;color:#586273!important}
html body.product-view .products-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}
html body.product-view .products-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}
html body.product-view .products-title-group{display:flex!important;align-items:center!important;gap:18px!important}
html body.product-view .products-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important;flex:none!important}
html body.product-view .products-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
html body.product-view .products-page-heading h1{font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
html body.product-view .products-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
html body.product-view .products-heading-actions{display:flex!important;gap:10px!important;align-self:center!important}
html body.product-view .products-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-size:13px!important;font-weight:600!important;white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;color:#111!important}
html body.product-view .products-btn svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body.product-view .products-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}
html body.product-view .products-btn.primary{background:linear-gradient(#a77b31,#95691f)!important;color:#fff!important;border-color:#95691f!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
html body.product-view .products-btn.compact{height:40px!important;padding:0 18px!important}

html body.product-view .products-stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}
html body.product-view .products-stat-card{min-height:118px!important;border:1px solid #ddd8d0!important;background:#fff!important;border-radius:8px!important;display:flex!important;align-items:center!important;padding:18px!important;gap:20px!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
html body.product-view .products-stat-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:10px!important;background:#f3eee6!important;display:grid!important;place-items:center!important}
html body.product-view .products-stat-icon svg{width:28px!important;height:28px!important}
html body.product-view .products-stat-body>span{font-size:13px!important;line-height:1.2!important;margin-bottom:6px!important;color:#596579!important}
html body.product-view .products-stat-body strong{font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important}
html body.product-view .products-stat-body small{font-size:13px!important;line-height:1.2!important;margin-top:3px!important;color:#596579!important}
html body.product-view .products-stat-side b{padding:6px 8px!important;border-radius:7px!important;font-size:11px!important}
html body.product-view .products-stat-side svg{width:74px!important;height:30px!important}

/* Barra de búsqueda/filtro = Compras. */
html body.product-view .products-table-card{border:1px solid #ddd8d0!important;background:#fff!important;border-radius:9px!important;overflow:hidden!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
html body.product-view .products-filter-toolbar{min-height:66px!important;padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important;background:#fff!important}
html body.product-view .products-search-box{width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;display:flex!important;align-items:center!important}
html body.product-view .products-search-box svg{width:19px!important;height:19px!important;min-width:19px!important;color:#344256!important}
html body.product-view .products-search-box input{width:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 10px!important;font-size:13px!important;color:#111!important}
html body.product-view .products-toolbar-spacer{flex:1!important}
html body.product-view .products-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important}
html body.product-view .products-filter-toggle{height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-size:13px!important;font-weight:600!important;line-height:1!important;box-shadow:none!important;white-space:nowrap!important}
html body.product-view .products-filter-toggle:hover,html body.product-view .products-filter-toggle.active{background:#fff!important;color:#111!important;border-color:#ccb890!important;transform:none!important;filter:none!important;box-shadow:none!important}
html body.product-view .products-filter-panel{display:flex!important;align-items:end!important;gap:10px!important;padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important}
html body.product-view .products-filter-panel .products-select-wrap{min-width:220px!important;height:38px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;padding:0!important;position:relative!important;display:flex!important;align-items:center!important}
html body.product-view .products-filter-panel .products-select-wrap select{width:100%!important;height:100%!important;border:0!important;outline:0!important;appearance:none!important;background:transparent!important;padding:0 34px 0 11px!important;color:#263244!important;font-size:12px!important}
html body.product-view .products-filter-panel .products-select-wrap svg{position:absolute!important;right:10px!important;width:15px!important;height:15px!important;pointer-events:none!important}
html body.product-view .products-filter-panel .products-clear-btn{height:38px!important;padding:0 16px!important;min-width:auto!important;border-radius:7px!important;margin:0!important}

/* Tabla y pie = escala de Compras. */
html body.product-view .products-data-table{width:100%!important;min-width:1280px!important;border-collapse:collapse!important;font-family:Inter,Arial,sans-serif!important}
html body.product-view .products-data-table th{height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;line-height:1.2!important;color:#3d4653!important;white-space:nowrap!important}
html body.product-view .products-data-table td{height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;vertical-align:middle!important}
html body.product-view .products-sku strong,html body.product-view .products-name{font-size:12px!important}
html body.product-view .products-category-badge,html body.product-view .products-status-pill{min-height:24px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}
html body.product-view .products-actions-cell{min-width:365px!important;padding-right:16px!important}
html body.product-view .products-action-buttons{gap:8px!important}
html body.product-view .products-action-btn{height:36px!important;padding:0 12px!important;border-radius:7px!important;gap:7px!important;font-size:12px!important;font-weight:600!important}
html body.product-view .products-action-btn svg{width:15px!important;height:15px!important}
html body.product-view .products-more-btn,html body.product-view .products-inactive-note{height:36px!important;border-radius:7px!important;font-size:12px!important}
html body.product-view .products-table-footer{min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 16px 13px!important;font-size:12px!important;color:#465165!important;background:#fff!important}
html body.product-view .products-pagination-area{display:flex!important;align-items:center!important;gap:24px!important}
html body.product-view .products-page-size{height:34px!important;min-width:128px!important;padding:0 13px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important}
html body.product-view .products-page-size select{font-size:12px!important}
html body.product-view .products-pagination{gap:8px!important}
html body.product-view .products-pagination button,html body.product-view .products-page-btn{width:34px!important;height:34px!important;border-radius:6px!important;font-size:12px!important}

/* Portátil / tablet horizontal: mismos quiebres de Compras. */
@media(max-width:1200px){
  html body.product-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.product-view .sidebar{width:220px!important;min-width:220px!important;padding:12px 14px 16px!important}
  html body.product-view .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important}
  html body.product-view .sidebar-brand img{width:150px!important;max-width:150px!important;max-height:52px!important}
  html body.product-view .nav{padding:8px 0!important}
  html body.product-view .nav-group{font-size:11px!important;padding:13px 8px 6px!important}
  html body.product-view .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;font-size:13px!important}
  html body.product-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important}
  html body.product-view .top-actions{gap:16px!important}
  html body.product-view .top-actions .search{width:min(650px,64vw)!important;max-width:none!important;height:43px!important}
  html body.product-view .topbar-user-copy{display:none!important}
  html body.product-view .content{padding:22px 30px 26px!important}
  html body.product-view .products-breadcrumbs{margin-left:0!important}
  html body.product-view .products-page-heading{flex-direction:column!important;gap:25px!important;margin-bottom:26px!important}
  html body.product-view .products-heading-actions{align-self:flex-start!important}
  html body.product-view .products-stats-grid{grid-template-columns:1fr!important;gap:14px!important;margin-bottom:18px!important}
  html body.product-view .products-filter-toolbar{flex-wrap:wrap!important}
  html body.product-view .products-search-box{width:100%!important;max-width:none!important;flex:1 0 100%!important}
  html body.product-view .products-toolbar-spacer{display:none!important}
  html body.product-view .products-results-count{margin-left:auto!important}
  html body.product-view .products-filter-panel{flex-wrap:wrap!important}
  html body.product-view .products-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  html body.product-view .products-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}
}

/* Tablet vertical: sidebar drawer y tamaños idénticos a Compras. */
@media(max-width:1024px){
  html body.product-view .app{grid-template-columns:1fr!important}
  html body.product-view .sidebar{position:fixed!important;width:280px!important;min-width:0!important;transform:translateX(-100%)!important}
  html body.product-view .sidebar.open{transform:translateX(0)!important}
  html body.product-view .topbar{padding:0 16px!important}
  html body.product-view .topbar-user-avatar,html body.product-view .topbar-user-menu{display:none!important}
  html body.product-view .search-kbd{display:none!important}
  html body.product-view .products-page{min-width:0!important}
  html body.product-view .products-page-heading h1{font-size:24px!important}
  html body.product-view .products-title-icon{display:grid!important;width:52px!important;height:52px!important}
  html body.product-view .products-heading-actions{width:100%!important}
  html body.product-view .products-heading-actions .products-btn{flex:1!important;min-width:0!important}
  html body.product-view .products-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  html body.product-view .products-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important}
}

/* Móvil: mismo flujo de Compras. */
@media(max-width:720px){
  html body.product-view .content{padding:18px 14px 24px!important}
  html body.product-view .topbar{height:74px!important;min-height:74px!important;padding:0 16px!important}
  html body.product-view .top-actions{gap:8px!important}
  html body.product-view .api-status{display:none!important}
  html body.product-view .top-actions .search{width:100%!important;max-width:none!important}
  html body.product-view .products-title-group{align-items:flex-start!important;gap:18px!important}
  html body.product-view .products-title-icon{display:grid!important;width:52px!important;height:52px!important;flex:none!important}
  html body.product-view .products-page-heading{gap:14px!important;margin-bottom:18px!important}
  html body.product-view .products-page-heading p{font-size:13px!important}
  html body.product-view .products-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  html body.product-view .products-btn{padding:0 11px!important}
  html body.product-view .products-stats-grid{grid-template-columns:1fr!important}
  html body.product-view .products-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}
  html body.product-view .products-stat-body strong{font-size:23px!important}
  html body.product-view .products-stat-side svg{display:none!important}
  html body.product-view .products-filter-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;padding:13px!important;gap:12px!important}
  html body.product-view .products-search-box{grid-column:1/-1!important;width:100%!important;max-width:none!important}
  html body.product-view .products-filter-toggle{width:auto!important;justify-self:start!important}
  html body.product-view .products-toolbar-spacer{display:none!important}
  html body.product-view .products-results-count{margin:0!important;align-self:center!important;justify-self:end!important;text-align:right!important;width:auto!important}
  html body.product-view .products-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;padding:12px 13px!important}
  html body.product-view .products-filter-panel .products-select-wrap{width:100%!important;min-width:0!important;max-width:none!important}
  html body.product-view .products-filter-panel .products-clear-btn{grid-column:1/-1!important;width:100%!important}
  html body.product-view .products-table-footer{padding:12px!important}
  html body.product-view .products-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  html body.product-view .products-pagination{gap:4px!important;flex-wrap:wrap!important}
  html body.product-view .products-pagination button,html body.product-view .products-page-btn{width:30px!important;height:30px!important}
  html body.product-view .products-actions-cell{min-width:350px!important}
  html body.product-view .products-action-btn{padding:0 9px!important;font-size:11px!important}
}

@media(max-width:520px){
  html body.product-view .products-filter-panel{grid-template-columns:1fr!important}
  html body.product-view .products-filter-panel .products-clear-btn{grid-column:1!important}
}

/* ======================================================================
   V249 · PRODUCTOS — SIDEBAR 1:1 CON INVENTARIO Y KARDEX
   ----------------------------------------------------------------------
   Este bloque va al final para neutralizar overrides anteriores de
   Productos/Compras. Solo afecta al shell lateral cuando body tiene
   .product-view. La lógica y el contenido del módulo no se modifican.
   ====================================================================== */

/* Base exacta del sidebar usado por Inventario. */
html body.product-view .sidebar{
  width:250px!important;
  min-width:250px!important;
  height:100vh!important;
  padding:12px 14px 16px!important;
  background:#fff!important;
  border-right:1px solid #ddd8d0!important;
  color:#1b2738!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .sidebar-brand{
  height:64px!important;
  padding:3px 8px 12px!important;
  margin:0 0 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-bottom:1px solid #ddd8d0!important;
}
html body.product-view .sidebar-brand img{
  width:150px!important;
  max-width:150px!important;
  height:auto!important;
  max-height:52px!important;
  object-fit:contain!important;
  filter:none!important;
  opacity:1!important;
}
html body.product-view .nav{
  padding:8px 0!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .nav-group{
  font-size:11px!important;
  line-height:1!important;
  font-weight:500!important;
  color:#596579!important;
  letter-spacing:.02em!important;
  padding:13px 8px 6px!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .nav button{
  min-height:35px!important;
  height:auto!important;
  padding:8px 12px!important;
  gap:11px!important;
  margin:1px 0!important;
  border-radius:8px!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:400!important;
  color:#1b2738!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  box-shadow:none!important;
  transform:none!important;
}
html body.product-view .nav button .nav-icon,
html body.product-view .nav button .icon{
  display:inline-grid!important;
  place-items:center!important;
  width:20px!important;
  min-width:20px!important;
  height:20px!important;
  flex:0 0 20px!important;
}
html body.product-view .nav button svg,
html body.product-view .nav button .nav-icon svg,
html body.product-view .nav button .icon svg{
  width:18px!important;
  height:18px!important;
  stroke-width:1.8!important;
}
html body.product-view .nav button:hover{
  background:#faf7f1!important;
  color:#1b2738!important;
}
html body.product-view .nav button.active{
  background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;
  color:#111!important;
  font-weight:600!important;
  box-shadow:none!important;
  position:relative!important;
}
html body.product-view .nav button.active:before{
  content:""!important;
  position:absolute!important;
  left:-7px!important;
  top:0!important;
  bottom:0!important;
  width:3px!important;
  background:#9b6b20!important;
  border-radius:0 4px 4px 0!important;
}
html body.product-view .sidebar-footer{
  padding:13px 8px 0!important;
  border-top:1px solid #ddd8d0!important;
  background:#fff!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .sidebar-footer .user-chip{gap:10px!important;align-items:center!important}
html body.product-view .sidebar-footer .avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:50%!important;
  background:#e8dac0!important;
  border:0!important;
  color:#171717!important;
  font-size:14px!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .sidebar-footer strong{
  font-size:13px!important;
  line-height:1.2!important;
  color:#171717!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .sidebar-footer small{
  font-size:11px!important;
  line-height:1.2!important;
  color:#596579!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body.product-view .sidebar-footer .text-btn{
  font-size:12px!important;
  line-height:1.2!important;
  color:#3e4b5d!important;
  padding:10px 0 0!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}

/* Escritorio: mismo ancho de columna que Inventario. */
@media (min-width:1201px){
  html body.product-view .app{grid-template-columns:250px minmax(0,1fr)!important}
  html body.product-view .sidebar{position:sticky!important;top:0!important;width:250px!important;min-width:250px!important;transform:none!important}
}

/* Portátil / tablet horizontal: Inventario reduce únicamente el ancho. */
@media (max-width:1200px) and (min-width:1025px){
  html body.product-view .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body.product-view .sidebar{position:sticky!important;top:0!important;width:220px!important;min-width:220px!important;transform:none!important}
}

/* Tablet vertical y móvil: mismo drawer de Inventario. */
@media (max-width:1024px){
  html body.product-view .app{grid-template-columns:1fr!important}
  html body.product-view .sidebar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    width:280px!important;
    min-width:280px!important;
    max-width:280px!important;
    transform:translateX(-100%)!important;
  }
  html body.product-view .sidebar.open{transform:translateX(0)!important}
}


/* ===== V250: Productos - retirar botón adicional de más acciones ===== */
html body.product-view .products-actions-cell{min-width:305px!important}
@media(max-width:1200px){html body.product-view .products-actions-cell{min-width:295px!important}}
@media(max-width:760px){html body.product-view .products-actions-cell{min-width:290px!important}}

/* ===== V252 · INVENTARIO Y KARDEX — MISMA ESCALA Y FILTROS DE PRODUCTOS =====
   Igualación final de tipografía, espaciado, tarjetas, tabla, filtros y responsive.
   La lógica del módulo no cambia. */
html body.inventory-view .content{
  width:100%!important;max-width:none!important;margin:0!important;
  padding:22px 30px 26px!important;background:#fafafa!important;
}
.inventory-page{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;
  font-size:16px!important;color:#101827!important;min-width:0!important;
}
.inventory-breadcrumbs{
  font-size:12px!important;color:#586273!important;margin:0 0 12px 85px!important;
}
.inventory-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}
.inventory-breadcrumbs strong{font-weight:600!important;color:#465166!important}

.inventory-page-heading{
  display:flex!important;align-items:flex-start!important;justify-content:space-between!important;
  gap:25px!important;margin-bottom:26px!important;
}
.inventory-title-group{display:flex!important;gap:18px!important;align-items:center!important;min-width:0!important}
.inventory-title-icon{
  width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important;
  display:grid!important;place-items:center!important;flex:none!important;
}
.inventory-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
.inventory-page-heading h1{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:29px!important;
  line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;
  margin:0 0 2px!important;color:#101827!important;
}
.inventory-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
.inventory-heading-actions{display:flex!important;gap:10px!important;align-self:center!important}

.inventory-btn{
  height:46px!important;border-radius:9px!important;padding:0 19px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;
  font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;
  white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;
  color:#111!important;box-shadow:none!important;
}
.inventory-btn svg{width:18px!important;height:18px!important}
.inventory-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}
.inventory-btn.primary{
  min-width:0!important;background:linear-gradient(#a77b31,#95691f)!important;
  border-color:#95691f!important;color:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important;
}
.inventory-btn.compact{height:40px!important;padding:0 18px!important}

.inventory-stats-grid{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;margin-bottom:18px!important;
}
.inventory-stat-card{
  min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;
  padding:18px!important;gap:20px!important;background:#fff!important;display:flex!important;
  align-items:center!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important;
}
.inventory-stat-icon{width:56px!important;height:56px!important;border-radius:10px!important;background:#f3eee6!important}
.inventory-stat-icon svg{width:28px!important;height:28px!important}
.inventory-stat-body>span{font-size:13px!important;line-height:1.2!important;margin-bottom:6px!important;color:#596579!important}
.inventory-stat-body strong{
  font-family:Inter,Arial,sans-serif!important;font-size:27px!important;line-height:1.15!important;
  font-weight:700!important;letter-spacing:-.5px!important;color:#101827!important;
}
.inventory-stat-body small{font-size:13px!important;line-height:1.25!important;margin-top:3px!important;color:#596579!important}
.inventory-stat-side b{height:auto!important;min-width:48px!important;padding:6px 8px!important;border-radius:7px!important;font-size:11px!important}
.inventory-stat-side svg{width:74px!important;height:30px!important}

.inventory-table-card{
  border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;
  box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important;
}
.inventory-filter-toolbar{
  min-height:66px!important;padding:13px!important;display:flex!important;align-items:center!important;
  gap:12px!important;border-bottom:1px solid #ece8e1!important;
}
.inventory-search-box{
  width:560px!important;max-width:47%!important;height:41px!important;padding:0 12px!important;
  border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;
}
.inventory-search-box svg{width:19px!important;height:19px!important}
.inventory-search-box input{font-size:13px!important;padding:0 10px!important}
.inventory-toolbar-spacer{flex:1!important}
.inventory-results-count{
  font-size:12px!important;color:#596579!important;white-space:nowrap!important;
  text-align:left!important;padding:0!important;
}

/* Filtros: exactamente la misma geometría visual de Productos. */
.inventory-filter-toggle{flex:none!important}
.inventory-filter-toggle,
.inventory-filter-toggle:hover,
.inventory-filter-toggle.active,
.inventory-filter-toggle[aria-expanded="true"]{
  height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;
  border-radius:9px!important;background:#fff!important;color:#111!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;
  font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;
  line-height:1!important;box-shadow:none!important;white-space:nowrap!important;
  transform:none!important;filter:none!important;
}
.inventory-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
.inventory-filter-panel{
  display:flex!important;gap:10px!important;align-items:center!important;padding:12px 13px!important;
  border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important;
}
.inventory-filter-panel .inventory-select-wrap{
  height:38px!important;min-width:180px!important;border:1px solid #d7dadd!important;
  border-radius:7px!important;background:#fff!important;padding:0 10px!important;
}
.inventory-filter-panel .inventory-select-wrap select{font-size:12px!important;color:#111!important}
.inventory-filter-panel .inventory-clear-btn{margin-left:2px!important;min-width:auto!important}

.inventory-data-table{
  width:100%!important;min-width:1280px!important;border-collapse:collapse!important;
  font-family:Inter,Arial,sans-serif!important;
}
.inventory-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
.inventory-data-table th{
  height:40px!important;padding:12px 16px!important;font-size:10px!important;font-weight:500!important;
  line-height:1.2!important;color:#3d4653!important;background:transparent!important;letter-spacing:0!important;
}
.inventory-data-table td{
  height:49px!important;padding:9px 16px!important;font-size:12px!important;line-height:1.2!important;
  border-bottom:1px solid #e8e5df!important;color:#1f2a3a!important;background:#fff!important;
}
.inventory-record-cell strong{font-size:12px!important}
.inventory-record-cell small{font-size:10px!important;line-height:1.2!important;margin-top:2px!important;color:#465165!important}
.inventory-product-name{font-size:12px!important}
.inventory-category-badge{min-height:26px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important}
.inventory-actions-cell{gap:8px!important;min-width:205px!important}
.inventory-action-btn{height:36px!important;min-width:104px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:600!important}
.inventory-more-btn{height:36px!important;min-width:46px!important;border-radius:7px!important;font-size:12px!important}

.inventory-table-footer{
  min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:12px 16px 13px!important;border-top:0!important;font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;color:#465165!important;background:#fff!important;
}
.inventory-pagination-area{display:flex!important;align-items:center!important;gap:24px!important}
.inventory-page-size{height:34px!important;min-width:0!important;padding:0 13px!important;border:1px solid #d7dadd!important;border-radius:7px!important}
.inventory-page-size select{font-size:12px!important}
.inventory-pagination{gap:8px!important}
.inventory-pagination button,.inventory-page-btn{width:34px!important;height:34px!important;border-radius:6px!important;font-size:12px!important}

/* Tablet / portátil: mismo comportamiento de Productos. */
@media(max-width:1200px){
  .inventory-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .inventory-page-heading{flex-direction:column!important}
  .inventory-heading-actions{align-self:flex-start!important}
  .inventory-breadcrumbs{margin-left:0!important}
}
@media(max-width:1024px){
  html body.inventory-view .content{padding:18px 16px 24px!important}
  .inventory-page{min-width:0!important}
  .inventory-breadcrumbs{margin-left:0!important}
  .inventory-title-icon{width:52px!important;height:52px!important}
  .inventory-page-heading h1{font-size:24px!important}
  .inventory-heading-actions{width:100%!important}
  .inventory-heading-actions .inventory-btn{flex:1!important;min-width:0!important}
  .inventory-filter-toolbar{flex-wrap:wrap!important}
  .inventory-filter-toolbar>*{grid-column:auto!important;width:auto!important;min-width:0!important}
  .inventory-search-box{width:100%!important;max-width:none!important;flex:1 0 100%!important}
  .inventory-toolbar-spacer{display:none!important}
  .inventory-results-count{margin-left:auto!important}
  .inventory-filter-panel{flex-wrap:wrap!important}
  .inventory-filter-panel .inventory-select-wrap{flex:1 1 180px!important;min-width:160px!important}
  .inventory-table-footer{align-items:flex-start!important;gap:16px!important;flex-direction:column!important}
  .inventory-pagination-area{width:100%!important;justify-content:space-between!important;gap:10px!important;flex-direction:row!important;align-items:center!important}
  .inventory-pagination{flex-wrap:nowrap!important}
}
@media(max-width:860px){
  .inventory-stats-grid{grid-template-columns:1fr!important}
  .inventory-data-table{min-width:1180px!important}
}
@media(max-width:720px){
  html body.inventory-view .content{padding:18px 14px 24px!important}
  .inventory-title-group{align-items:flex-start!important;gap:12px!important}
  .inventory-title-icon{display:none!important}
  .inventory-page-heading{gap:14px!important;margin-bottom:18px!important}
  .inventory-page-heading p{font-size:13px!important}
  .inventory-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .inventory-btn{padding:0 11px!important}

  .inventory-filter-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;padding:13px!important}
  .inventory-filter-toolbar>*{grid-column:auto!important;width:auto!important;min-width:0!important}
  .inventory-search-box{grid-column:1/-1!important;width:100%!important;max-width:none!important}
  .inventory-filter-toggle{width:100%!important}
  .inventory-results-count{margin:0!important;align-self:center!important;text-align:right!important}
  .inventory-toolbar-spacer{display:none!important}

  .inventory-filter-panel{display:grid!important;grid-template-columns:1fr!important}
  .inventory-filter-panel .inventory-select-wrap,.inventory-filter-panel .inventory-clear-btn{width:100%!important;min-width:0!important;margin:0!important}

  .inventory-stat-card{min-height:100px!important;padding:15px!important;gap:13px!important}
  .inventory-stat-body strong{font-size:23px!important}
  .inventory-stat-side svg{display:none!important}
  .inventory-table-footer{padding:12px!important}
  .inventory-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  .inventory-pagination{gap:4px!important;flex-wrap:wrap!important}
  .inventory-pagination button,.inventory-page-btn{width:30px!important;height:30px!important}
  .inventory-actions-cell{min-width:190px!important}
  .inventory-action-btn{min-width:104px!important;padding:0 9px!important;font-size:11px!important}
  .inventory-more-btn{min-width:42px!important}
}

/* ======================================================================
   V253 · INVENTARIO Y KARDEX — HERENCIA VISUAL 1:1 DE PRODUCTOS
   ----------------------------------------------------------------------
   Inventario usa también las clases visuales de Productos desde app-v253.
   Estas reglas solo resuelven detalles semánticos de Inventario que no
   existen en Productos; tipografía, espacios, toolbar, filtro, tarjetas,
   tabla, footer y responsive provienen directamente de .products-*.
   ====================================================================== */
html body.inventory-view.product-view .inventory-table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
html body.inventory-view.product-view .inventory-data-table.products-data-table{
  min-width:1280px!important;
}
html body.inventory-view.product-view .inventory-actions-cell{
  min-width:205px!important;
  white-space:nowrap!important;
}
html body.inventory-view.product-view .inventory-action-btn{
  height:36px!important;
  padding:0 12px!important;
  border-radius:7px!important;
  font-size:12px!important;
  font-weight:600!important;
}
html body.inventory-view.product-view .inventory-more-btn{
  height:36px!important;
  min-width:46px!important;
  border-radius:7px!important;
  font-size:12px!important;
}
/* En móvil/tablet el panel de filtros hereda exactamente el grid de Productos. */
@media(max-width:720px){
  html body.inventory-view.product-view .inventory-filter-toolbar.products-filter-toolbar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    padding:13px!important;
    gap:12px!important;
  }
  html body.inventory-view.product-view .inventory-search-box.products-search-box{
    grid-column:1/-1!important;
    width:100%!important;
    max-width:none!important;
  }
  html body.inventory-view.product-view .inventory-filter-toggle.products-filter-toggle{
    width:auto!important;
    justify-self:start!important;
  }
  html body.inventory-view.product-view .inventory-results-count.products-results-count{
    justify-self:end!important;
    width:auto!important;
    text-align:right!important;
  }
  html body.inventory-view.product-view .inventory-filter-panel.products-filter-panel{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    padding:12px 13px!important;
  }
  html body.inventory-view.product-view .inventory-filter-panel .inventory-select-wrap.products-select-wrap{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  html body.inventory-view.product-view .inventory-clear-btn.products-clear-btn{
    grid-column:1/-1!important;
    width:100%!important;
  }
}
@media(max-width:520px){
  html body.inventory-view.product-view .inventory-filter-panel.products-filter-panel{grid-template-columns:1fr!important}
  html body.inventory-view.product-view .inventory-clear-btn.products-clear-btn{grid-column:1!important}
}

/* ======================================================================
   SIDEBAR GLOBAL UNIFICADO
   La navegación de TODOS los módulos usa exactamente la misma escala,
   tipografía y responsive del sidebar de Inventario y kardex.
   ====================================================================== */
html body .app{
  grid-template-columns:250px minmax(0,1fr)!important;
}
html body .sidebar{
  width:250px!important;
  min-width:250px!important;
  height:100vh!important;
  padding:12px 14px 16px!important;
  background:#fff!important;
  border-right:1px solid #ddd8d0!important;
  color:#1b2738!important;
  box-shadow:none!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body .sidebar-brand{
  height:64px!important;
  padding:3px 8px 12px!important;
  margin:0 0 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-bottom:1px solid #ddd8d0!important;
}
html body .sidebar-brand img{
  width:150px!important;
  max-width:150px!important;
  height:auto!important;
  max-height:52px!important;
  object-fit:contain!important;
  filter:none!important;
  opacity:1!important;
}
html body .sidebar .nav{
  padding:8px 0!important;
  overflow:auto!important;
  flex:1!important;
}
html body .sidebar .nav-group{
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:500!important;
  color:#596579!important;
  letter-spacing:.02em!important;
  padding:13px 8px 6px!important;
}
html body .sidebar .nav button{
  width:100%!important;
  min-height:35px!important;
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  margin:1px 0!important;
  padding:8px 12px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#1b2738!important;
  box-shadow:none!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:400!important;
  text-align:left!important;
}
html body .sidebar .nav button .nav-icon,
html body .sidebar .nav button .icon{
  width:20px!important;
  min-width:20px!important;
  height:20px!important;
  display:inline-grid!important;
  place-items:center!important;
  font-size:17px!important;
}
html body .sidebar .nav button svg{
  width:18px!important;
  height:18px!important;
  stroke-width:1.8!important;
}
html body .sidebar .nav button:hover{
  background:#faf7f1!important;
  color:#111!important;
}
html body .sidebar .nav button.active{
  position:relative!important;
  background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;
  color:#111!important;
  font-weight:600!important;
  box-shadow:none!important;
}
html body .sidebar .nav button.active::before{
  content:""!important;
  position:absolute!important;
  left:-7px!important;
  top:0!important;
  bottom:0!important;
  width:3px!important;
  background:#9b6b20!important;
  border-radius:0 4px 4px 0!important;
}
html body .sidebar-footer{
  padding:13px 8px 0!important;
  margin:0!important;
  border-top:1px solid #ddd8d0!important;
  background:#fff!important;
  color:#171717!important;
}
html body .sidebar-footer .user-chip{
  display:flex!important;
  gap:10px!important;
  align-items:center!important;
}
html body .sidebar-footer .avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border:0!important;
  border-radius:50%!important;
  background:#e8dac0!important;
  color:#171717!important;
  font-size:14px!important;
  font-weight:700!important;
  box-shadow:none!important;
}
html body .sidebar-footer strong{
  font-size:13px!important;
  color:#171717!important;
}
html body .sidebar-footer small{
  font-size:11px!important;
  color:#596579!important;
}
html body .sidebar-footer .text-btn{
  min-height:0!important;
  padding:10px 0 0!important;
  border:0!important;
  background:transparent!important;
  color:#3e4b5d!important;
  font-size:12px!important;
}

/* Portátil / tablet horizontal: misma reducción usada por Inventario. */
@media (max-width:1200px) and (min-width:1025px){
  html body .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body .sidebar{width:220px!important;min-width:220px!important}
}

/* Tablet vertical y móvil: sidebar lateral, misma escala interna. */
@media (max-width:1024px){
  html body .app{grid-template-columns:1fr!important}
  html body .sidebar{
    position:fixed!important;
    inset:0 auto 0 0!important;
    width:280px!important;
    min-width:0!important;
    height:100dvh!important;
    transform:translateX(-105%)!important;
    transition:transform .24s ease!important;
    z-index:60!important;
    box-shadow:12px 0 35px rgba(0,0,0,.16)!important;
  }
  html body .sidebar.open{transform:translateX(0)!important}
  html body .mobile-menu-button{
    display:inline-grid!important;
    place-items:center!important;
  }
  html body .sidebar-backdrop{
    display:block!important;
  }
  html body .sidebar-backdrop.hidden{display:none!important}
}

/* ===== V249 · VENTAS Y FACTURACIÓN — integración visual de la referencia =====
   Mantiene la lógica existente de ventas, inventario, impresión y exportación. */
html body.sales-view{background:#fafafa!important}
html body.sales-view .content{background:#fafafa!important}
html body.sales-view .sales-page{min-width:0!important}

/* Cabecera y KPIs */
html body.sales-view .sales-stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html body.sales-view .sales-title-icon{background:#f4ecdd!important}
html body.sales-view .sale-stat-card .purchase-stat-icon{color:#111!important}
html body.sales-view .sale-stat-card.sales-visible .purchase-stat-icon{background:#d9f4e5!important}
html body.sales-view .sale-stat-card.sales-paid .purchase-stat-icon{background:#d9eaff!important}
html body.sales-view .sale-stat-card.sales-balance .purchase-stat-icon{background:#fde0df!important}
html body.sales-view .sale-stat-card.sales-paid .purchase-stat-icon svg{color:#111!important}
html body.sales-view .sale-stat-card.sales-balance .purchase-stat-icon svg{color:#111!important}
html body.sales-view .sale-stat-card .purchase-stat-trend.down b{background:#fde2e1!important;color:#d83232!important;-webkit-text-fill-color:#d83232!important}
html body.sales-view .sale-stat-card .purchase-stat-trend.flat b{background:#eef0f2!important;color:#667085!important;-webkit-text-fill-color:#667085!important}
html body.sales-view .sale-stat-card .purchase-stat-trend.down polyline{stroke:#9b6b20!important}

/* Filtros en una sola fila como la captura de referencia */
html body.sales-view .sales-filter-toolbar{
  min-height:63px!important;
  padding:10px 12px!important;
  display:grid!important;
  grid-template-columns:minmax(330px,1.75fr) minmax(170px,.78fr) minmax(205px,.92fr) minmax(170px,.72fr) auto auto!important;
  gap:10px!important;
  align-items:center!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fff!important;
}
html body.sales-view .sales-table-search{width:100%!important;max-width:none!important;height:39px!important;margin:0!important}
html body.sales-view .sales-table-search input{font-size:13px!important}
html body.sales-view .sales-filter-select,
html body.sales-view .sales-date-filter{
  height:39px!important;
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  border:1px solid #d7d9dd!important;
  border-radius:7px!important;
  background:#fff!important;
  overflow:hidden!important;
}
html body.sales-view .sales-filter-select select,
html body.sales-view .sales-date-filter input{
  width:100%!important;
  height:100%!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#172033!important;
  font-size:12px!important;
  padding:0 36px 0 13px!important;
}
html body.sales-view .sales-filter-select select{appearance:none!important;-webkit-appearance:none!important;cursor:pointer!important}
html body.sales-view .sales-filter-select svg,
html body.sales-view .sales-date-filter svg{position:absolute!important;right:11px!important;width:16px!important;height:16px!important;pointer-events:none!important;color:#172033!important}
html body.sales-view .sales-date-filter input::-webkit-calendar-picker-indicator{opacity:0!important;position:absolute!important;right:0!important;width:42px!important;height:100%!important;cursor:pointer!important}
html body.sales-view .sales-clear-filter{height:39px!important;padding:0 15px!important;border-color:#d7d9dd!important}
html body.sales-view .sales-clear-filter svg{width:17px!important;height:17px!important}
html body.sales-view .sales-results-count{justify-self:end!important;white-space:nowrap!important;font-size:12px!important}
html body.sales-view .sales-results-count b{font-weight:600!important}

/* Tabla */
html body.sales-view .sales-data-table{min-width:1280px!important}
html body.sales-view .sales-data-table th:nth-child(1){width:105px!important}
html body.sales-view .sales-data-table th:nth-child(2){width:112px!important}
html body.sales-view .sales-data-table th:nth-child(3){min-width:210px!important}
html body.sales-view .sales-data-table th:nth-child(4){width:150px!important}
html body.sales-view .sales-data-table th:nth-child(5){width:125px!important}
html body.sales-view .sales-data-table th:nth-child(6),
html body.sales-view .sales-data-table th:nth-child(7),
html body.sales-view .sales-data-table th:nth-child(8){width:125px!important;text-align:right!important}
html body.sales-view .sales-data-table th:nth-child(9){min-width:330px!important}
html body.sales-view .sale-doc strong{font-weight:700!important;color:#14213a!important}
html body.sales-view .sale-customer strong{display:block!important;font-weight:500!important;color:#172033!important}
html body.sales-view .sale-customer small{display:block!important;margin-top:2px!important;font-size:10px!important;color:#53627a!important;white-space:nowrap!important}
html body.sales-view .sale-number{text-align:right!important;font-variant-numeric:tabular-nums!important;white-space:nowrap!important}
html body.sales-view .sale-status-pill{display:inline-flex!important;align-items:center!important;gap:7px!important;min-height:27px!important;padding:0 10px!important;border-radius:6px!important;font-size:11px!important;font-weight:500!important;white-space:nowrap!important}
html body.sales-view .sale-status-pill i{width:9px!important;height:9px!important;border-radius:50%!important;display:block!important;flex:0 0 auto!important}
html body.sales-view .sale-status-pill.paid{background:#d9f6e5!important;color:#187345!important}
html body.sales-view .sale-status-pill.paid i{background:#07954f!important}
html body.sales-view .sale-status-pill.partial{background:#fff0cf!important;color:#8d6418!important}
html body.sales-view .sale-status-pill.partial i{background:#cc8c14!important}
html body.sales-view .sale-status-pill.credit{background:#fce3e3!important;color:#a63a3a!important}
html body.sales-view .sale-status-pill.credit i{background:#db4747!important}
html body.sales-view .sale-action-cell{min-width:330px!important}
html body.sales-view .sale-action-cell .purchase-action-buttons{gap:8px!important;flex-wrap:nowrap!important}
html body.sales-view .sale-print-btn{min-width:92px!important}
html body.sales-view .sale-more-btn{min-width:38px!important;width:38px!important;padding:0!important}
html body.sales-view .sale-more-btn svg{width:16px!important;height:16px!important}
html body.sales-view .sales-table-footer{min-height:59px!important}

/* La barra superior conserva búsqueda + servidor + usuario; los botones del módulo viven en el encabezado de contenido. */
html body.sales-view #exportButton,
html body.sales-view #quickAction{display:none!important}
html body.sales-view .topbar-user-avatar{background:#e8dac0!important}

@media(max-width:1200px){
  html body.sales-view .sales-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.sales-view .sales-filter-toolbar{grid-template-columns:1fr 1fr 1fr!important}
  html body.sales-view .sales-table-search{grid-column:1/-1!important}
  html body.sales-view .sales-results-count{justify-self:start!important}
}
@media(max-width:860px){
  html body.sales-view .sales-stats-grid{grid-template-columns:1fr!important}
  html body.sales-view .sales-filter-toolbar{grid-template-columns:1fr 1fr!important}
  html body.sales-view .sales-table-search{grid-column:1/-1!important}
  html body.sales-view .sales-results-count{justify-self:end!important}
}
@media(max-width:720px){
  html body.sales-view .sales-filter-toolbar{grid-template-columns:1fr!important;padding:10px!important}
  html body.sales-view .sales-filter-toolbar>*{grid-column:1!important;width:100%!important}
  html body.sales-view .sales-results-count{justify-self:start!important}
  html body.sales-view .sale-action-cell{min-width:300px!important}
}

/* V249.1 · ajustes finos de proporción en Ventas */
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toolbar{
  grid-template-columns:minmax(350px,1fr) 190px 220px 185px 150px auto!important;
}
html body.purchase-view.sales-view:not(.expense-view) .purchase-table-search.sales-table-search{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-data-table td:nth-child(1),
html body.purchase-view.sales-view:not(.expense-view) .sales-data-table td:nth-child(2){white-space:nowrap!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-data-table td:nth-child(1){min-width:105px!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-data-table td:nth-child(2){min-width:112px!important}
@media(max-width:1200px){
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toolbar{grid-template-columns:1fr 1fr 1fr!important}
  html body.purchase-view.sales-view:not(.expense-view) .purchase-table-search.sales-table-search{grid-column:1/-1!important}
}
@media(max-width:860px){html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toolbar{grid-template-columns:1fr 1fr!important}}
@media(max-width:720px){html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toolbar{grid-template-columns:1fr!important}}

/* ======================================================================
   UNIFICACIÓN FINAL SOLICITADA
   - Ventas usa exactamente la escala tipográfica y el espaciado de Compras.
   - El botón Filtros y el panel desplegable de Ventas se comportan igual que Compras.
   - El sidebar global conserva el mismo aspecto de Inventario en cada sección.
   ====================================================================== */
html body.purchase-view.sales-view:not(.expense-view) .sales-page{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;
  font-size:16px!important;
  color:#101827!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-table-toolbar{
  min-height:66px!important;
  padding:13px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fff!important;
  flex-wrap:nowrap!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-table-search{
  width:560px!important;
  max-width:47%!important;
  height:41px!important;
  padding:0 12px!important;
  margin:0!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-table-search input{font-size:13px!important;padding:0 10px!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toggle{
  height:40px!important;
  padding:0 18px!important;
  border:1px solid #ccb890!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#111!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap!important;
  flex:none!important;
  box-shadow:none!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toggle:hover,
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toggle.active{background:#fff!important;color:#111!important;border-color:#ccb890!important;box-shadow:none!important;transform:none!important;filter:none!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded{
  display:flex!important;
  gap:10px!important;
  align-items:end!important;
  padding:12px 13px!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fcfbf9!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .purchase-filter-select{
  height:38px!important;
  min-width:190px!important;
  border:1px solid #d7dadd!important;
  border-radius:7px!important;
  background:#fff!important;
  padding:0 10px!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .purchase-filter-select select{font-size:12px!important;color:#111!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .purchase-date-filter{
  height:38px!important;
  width:165px!important;
  min-width:165px!important;
  border:1px solid #d7dadd!important;
  border-radius:7px!important;
  background:#fff!important;
  padding:0 10px!important;
}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .purchase-date-filter input{font-size:12px!important;color:#111!important}
html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .sales-clear-filter{height:38px!important;padding:0 16px!important;border-radius:7px!important;margin:0!important}

/* Desktop intermedio / tablet horizontal: replica la adaptación de Compras. */
@media(max-width:1180px){
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-toolbar{flex-wrap:wrap!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-search{width:100%!important;max-width:none!important;flex:1 1 520px!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded{flex-wrap:wrap!important}
}
@media(max-width:860px){
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-toolbar{display:grid!important;grid-template-columns:1fr auto!important;gap:9px!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-search{grid-column:1/-1!important;width:100%!important;max-width:none!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toggle{grid-column:1!important;justify-self:start!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-toolbar .purchase-toolbar-spacer{display:none!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-results-count{grid-column:2!important;justify-self:end!important;align-self:center!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:center!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .purchase-filter-select,
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .purchase-date-filter{width:100%!important;min-width:0!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded .sales-clear-filter{width:100%!important}
}
@media(max-width:520px){
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-toolbar{grid-template-columns:1fr!important;padding:10px!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-table-toolbar>*{grid-column:1!important;width:100%!important;max-width:none!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-toggle{justify-self:stretch!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-results-count{justify-self:start!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded{grid-template-columns:1fr!important;padding:10px!important}
  html body.purchase-view.sales-view:not(.expense-view) .sales-filter-panel-expanded>*{grid-column:1!important;width:100%!important}
}

/* ======================================================================
   UI FINAL UNIFICADA — Caja hereda escala de Compras; sidebar global
   ----------------------------------------------------------------------
   Este bloque final prevalece sobre reglas históricas sin conservar
   variantes visuales anteriores dentro del proyecto entregado.
   ====================================================================== */

/* Caja y tesorería usa exactamente las métricas visuales de Compras. */
html body.cash-view.purchase-view:not(.expense-view) .cash-page{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;
  color:#101827!important;
}
html body.cash-view .cash-stat-down .purchase-stat-trend b,
html body.cash-view .purchase-stat-trend.cash-down b{
  background:#fde2e1!important;
  color:#c92b32!important;
  -webkit-text-fill-color:#c92b32!important;
}
html body.cash-view .purchase-stat-trend.cash-down polyline{stroke:#9b6b20!important}
html body.cash-view .cash-range-filter{
  gap:7px!important;
  width:190px!important;
  min-width:190px!important;
}
html body.cash-view .cash-range-filter>span{
  font-size:11px!important;
  line-height:1!important;
  color:#667085!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
html body.cash-view .cash-range-filter input{min-width:0!important}
html body.cash-view .cash-concept strong{display:block!important;font-size:12px!important;font-weight:600!important;color:#1f2a3a!important}
html body.cash-view .cash-concept small{display:block!important;margin-top:2px!important;font-size:10px!important;line-height:1.2!important;color:#596579!important}
html body.cash-view .cash-type-pill{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:72px!important;min-height:26px!important;padding:0 10px!important;border-radius:6px!important;
  font-size:11px!important;font-weight:600!important;white-space:nowrap!important;
}
html body.cash-view .cash-type-pill.income{background:#d9f3e3!important;color:#17683b!important}
html body.cash-view .cash-type-pill.expense{background:#fde2e1!important;color:#b4232c!important}
html body.cash-view .cash-auto-pill{
  display:inline-flex!important;align-items:center!important;min-height:26px!important;padding:0 10px!important;
  border-radius:6px!important;background:#eef0f3!important;color:#465165!important;font-size:11px!important;font-weight:600!important;white-space:nowrap!important;
}
html body.cash-view .cash-delete-btn{color:#d92d20!important;border-color:#f2b8b5!important}
html body.cash-view .cash-data-table{min-width:1180px!important}

/* Tablet: el panel y el botón de filtros conservan el mismo comportamiento de Compras. */
@media(max-width:1024px){
  html body.cash-view .cash-range-filter{width:100%!important;min-width:0!important}
}
@media(max-width:720px){
  html body.cash-view .cash-purchase-filter-panel{grid-template-columns:1fr 1fr!important}
  html body.cash-view .cash-purchase-filter-panel .cash-range-filter{width:100%!important;min-width:0!important}
  html body.cash-view .cash-data-table{min-width:1080px!important}
}
@media(max-width:520px){
  html body.cash-view .cash-purchase-filter-panel{grid-template-columns:1fr!important}
  html body.cash-view .cash-purchase-filter-panel>*{grid-column:1!important;width:100%!important;min-width:0!important}
}

/* Sidebar definitivo para TODOS los módulos: referencia Inventario y kardex. */
html body .app{grid-template-columns:250px minmax(0,1fr)!important}
html body .sidebar{
  width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;
  background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important;
  box-shadow:none!important;font-family:Arial,"Helvetica Neue",sans-serif!important;
}
html body .sidebar-brand{
  height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;border-bottom:1px solid #ddd8d0!important;
}
html body .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important;filter:none!important;opacity:1!important}
html body .sidebar .nav{padding:8px 0!important;overflow:auto!important;flex:1!important}
html body .sidebar .nav-group{
  font-family:Arial,"Helvetica Neue",sans-serif!important;font-size:11px!important;line-height:1!important;font-weight:500!important;
  color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important;
}
html body .sidebar .nav button{
  width:100%!important;min-height:35px!important;display:flex!important;align-items:center!important;gap:11px!important;
  margin:1px 0!important;padding:8px 12px!important;border:0!important;border-radius:8px!important;background:transparent!important;
  color:#1b2738!important;box-shadow:none!important;font-family:Arial,"Helvetica Neue",sans-serif!important;font-size:13px!important;
  line-height:1.2!important;font-weight:400!important;text-align:left!important;
}
html body .sidebar .nav button .nav-icon,html body .sidebar .nav button .icon{width:20px!important;min-width:20px!important;height:20px!important;display:inline-grid!important;place-items:center!important;font-size:17px!important}
html body .sidebar .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body .sidebar .nav button:hover{background:#faf7f1!important;color:#111!important}
html body .sidebar .nav button.active{
  position:relative!important;background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#111!important;font-weight:600!important;box-shadow:none!important;
}
html body .sidebar .nav button.active::before{
  content:""!important;position:absolute!important;left:-7px!important;top:0!important;bottom:0!important;width:3px!important;
  background:#9b6b20!important;border-radius:0 4px 4px 0!important;
}
html body .sidebar-footer{padding:13px 8px 0!important;margin:0!important;border-top:1px solid #ddd8d0!important;background:#fff!important;color:#171717!important}
html body .sidebar-footer .user-chip{display:flex!important;gap:10px!important;align-items:center!important}
html body .sidebar-footer .avatar{width:42px!important;height:42px!important;min-width:42px!important;border:0!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important}
html body .sidebar-footer strong{font-size:13px!important;color:#171717!important}
html body .sidebar-footer small{font-size:11px!important;color:#596579!important}
html body .sidebar-footer .text-btn{min-height:0!important;padding:10px 0 0!important;border:0!important;background:transparent!important;color:#3e4b5d!important;font-size:12px!important}
@media(max-width:1200px) and (min-width:1025px){
  html body .app{grid-template-columns:220px minmax(0,1fr)!important}
  html body .sidebar{width:220px!important;min-width:220px!important}
}
@media(max-width:1024px){
  html body .app{grid-template-columns:1fr!important}
  html body .sidebar{
    position:fixed!important;inset:0 auto 0 0!important;width:280px!important;min-width:0!important;height:100dvh!important;
    transform:translateX(-105%)!important;transition:transform .24s ease!important;z-index:60!important;box-shadow:12px 0 35px rgba(0,0,0,.16)!important;
  }
  html body .sidebar.open{transform:translateX(0)!important}
  html body .mobile-menu-button{display:inline-grid!important;place-items:center!important}
  html body .sidebar-backdrop{display:block!important}
  html body .sidebar-backdrop.hidden{display:none!important}
}

/* ======================================================================
   ENTREGA FINAL · RESUMEN EJECUTIVO + FILTROS + SIDEBAR UNIFICADOS
   - Resumen ejecutivo integrado al ERP, usando la escala de Compras.
   - Botones Filtros homologados a Compras en todos los módulos que los usan.
   - Sidebar global conserva la referencia visual de Inventario y kardex.
   ====================================================================== */

/* Resumen ejecutivo: misma escala tipográfica y respiración que Compras. */
html body.dashboard-view{font-size:16px!important;background:#fafafa!important}
html body.dashboard-view .topbar{
  height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;
  border-bottom:1px solid #ddd8d0!important;position:sticky!important;top:0!important;
}
html body.dashboard-view .topbar .topbar-title{display:none!important}
html body.dashboard-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
html body.dashboard-view .top-actions .search{
  order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;
  border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important;
}
html body.dashboard-view .top-actions .search input{width:100%!important;padding:0 10px!important;font-size:13px!important;color:#111!important}
html body.dashboard-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important}
html body.dashboard-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
html body.dashboard-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important}
html body.dashboard-view .topbar-user-copy{display:flex!important;min-width:96px!important}
html body.dashboard-view .topbar-user-copy strong{font-size:13px!important;color:#111!important}
html body.dashboard-view .topbar-user-copy small{font-size:12px!important;color:#596579!important}
html body.dashboard-view .topbar-user-menu{display:grid!important}
html body.dashboard-view #themeBtn,html body.dashboard-view #exportButton,html body.dashboard-view #quickAction{display:none!important}
html body.dashboard-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}

.dashboard-page{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important;min-width:0!important}
.dashboard-page-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:25px!important;margin-bottom:20px!important}
.dashboard-heading-copy{min-width:0!important}
.dashboard-eyebrow{display:block!important;font-size:11px!important;line-height:1!important;font-weight:500!important;letter-spacing:.02em!important;color:#596579!important;margin:0 0 6px!important}
.dashboard-page-heading h1{font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
.dashboard-page-heading p{font-size:13px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
.dashboard-heading-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important}
.dashboard-btn{height:40px!important;border-radius:9px!important;padding:0 16px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-size:13px!important;font-weight:600!important;line-height:1!important;white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;color:#111!important;box-shadow:none!important}
.dashboard-btn svg{width:18px!important;height:18px!important}
.dashboard-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}
.dashboard-btn.primary{height:40px!important;background:linear-gradient(#a77b31,#95691f)!important;border-color:#95691f!important;color:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
.dashboard-date-range{height:40px!important;display:inline-flex!important;align-items:center!important;gap:8px!important;padding:0 12px!important;border:1px solid #d7dadd!important;border-radius:8px!important;background:#fff!important;color:#263244!important;font-size:12px!important;white-space:nowrap!important}
.dashboard-date-range svg{width:17px!important;height:17px!important}

.dashboard-kpi-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:14px!important;margin-bottom:18px!important}
.dashboard-kpi{min-height:118px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;padding:15px 14px!important;display:flex!important;align-items:flex-start!important;gap:14px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;min-width:0!important;cursor:pointer!important;transition:border-color .15s ease,transform .15s ease!important}
.dashboard-kpi:hover{border-color:#cbb890!important;transform:translateY(-1px)!important}
.dashboard-kpi-icon{width:46px!important;height:46px!important;min-width:46px!important;border-radius:9px!important;display:grid!important;place-items:center!important;color:#172033!important}
.dashboard-kpi-icon svg{width:25px!important;height:25px!important;stroke-width:1.9!important}
.dashboard-kpi-copy{display:flex!important;flex-direction:column!important;min-width:0!important;padding-top:1px!important}
.dashboard-kpi-copy>span:first-child{font-size:11px!important;font-weight:600!important;color:#202b3c!important;margin:1px 0 7px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.dashboard-kpi-copy>strong{font-size:22px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.6px!important;color:#101827!important;white-space:nowrap!important}
.dashboard-kpi-change{display:flex!important;align-items:center!important;gap:8px!important;margin-top:8px!important;font-size:10px!important;line-height:1.1!important;white-space:nowrap!important}
.dashboard-kpi-change b{font-size:10px!important;font-weight:700!important}
.dashboard-kpi-change em{font-style:normal!important;color:#657083!important;overflow:hidden!important;text-overflow:ellipsis!important}
.dashboard-kpi-change.up b{color:#0d8c45!important}.dashboard-kpi-change.down b{color:#d22121!important}.dashboard-kpi-change.flat b{color:#475569!important}
.dashboard-tone-green{background:linear-gradient(135deg,#fff,#f2fbf6)!important;border-color:#d7e9dd!important}.dashboard-tone-green .dashboard-kpi-icon{background:#dff5e7!important;color:#168647!important}
.dashboard-tone-red{background:linear-gradient(135deg,#fff,#fff5f5)!important;border-color:#eedddd!important}.dashboard-tone-red .dashboard-kpi-icon{background:#ffe1e1!important;color:#cb2020!important}
.dashboard-tone-blue{background:linear-gradient(135deg,#fff,#f2f8ff)!important;border-color:#d8e6f3!important}.dashboard-tone-blue .dashboard-kpi-icon{background:#deedff!important;color:#106bc0!important}
.dashboard-tone-amber{background:linear-gradient(135deg,#fff,#fffaf1)!important;border-color:#e8dfd1!important}.dashboard-tone-amber .dashboard-kpi-icon{background:#ffedc8!important;color:#b57909!important}
.dashboard-tone-purple{background:linear-gradient(135deg,#fff,#f7f4ff)!important;border-color:#e3ddf2!important}.dashboard-tone-purple .dashboard-kpi-icon{background:#e9defe!important;color:#5e27cb!important}

.dashboard-middle-grid{display:grid!important;grid-template-columns:minmax(0,2.3fr) minmax(340px,1fr)!important;gap:14px!important;margin-bottom:16px!important}
.dashboard-bottom-grid{display:grid!important;grid-template-columns:1fr 1.08fr!important;gap:14px!important;margin-bottom:12px!important}
.dashboard-panel{background:#fff!important;border:1px solid #ddd8d0!important;border-radius:8px!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important;min-width:0!important}
.dashboard-panel-head{min-height:60px!important;border-bottom:1px solid #ece8e1!important;padding:11px 14px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;background:linear-gradient(180deg,#fffdf9,#fff)!important}
.dashboard-panel-title{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
.dashboard-panel-title>div{min-width:0!important}
.dashboard-panel-title h2{font-size:15px!important;line-height:1.2!important;margin:0 0 3px!important;color:#101827!important;white-space:nowrap!important}
.dashboard-panel-title p{font-size:10px!important;line-height:1.25!important;margin:0!important;color:#596579!important}
.dashboard-mini-icon{width:34px!important;height:34px!important;min-width:34px!important;border-radius:8px!important;display:grid!important;place-items:center!important;background:#f8efdf!important;color:#906726!important}
.dashboard-mini-icon svg{width:18px!important;height:18px!important}
.dashboard-link{border:0!important;background:transparent!important;color:#171717!important;font-size:10px!important;font-weight:600!important;display:inline-flex!important;align-items:center!important;gap:4px!important;padding:5px!important;white-space:nowrap!important}
.dashboard-link svg{width:14px!important;height:14px!important}
.dashboard-chart-tools{display:flex!important;align-items:center!important;gap:14px!important}
.dashboard-legend{display:flex!important;align-items:center!important;gap:14px!important;font-size:10px!important;color:#4c5768!important}
.dashboard-legend span{display:flex!important;align-items:center!important;gap:5px!important;white-space:nowrap!important}
.dashboard-legend i{width:9px!important;height:9px!important;border-radius:50%!important;display:block!important}.dashboard-legend i.sales{background:#9b7133!important}.dashboard-legend i.purchases{background:#24925d!important}.dashboard-legend i.expenses{background:#dc3434!important}
.dashboard-period-chip{height:34px!important;border:1px solid #d9dce1!important;background:#fff!important;border-radius:6px!important;padding:0 13px!important;display:inline-flex!important;align-items:center!important;gap:10px!important;font-size:10px!important;white-space:nowrap!important}
.dashboard-period-chip svg{width:14px!important;height:14px!important}
.dashboard-chart-area{height:255px!important;padding:8px 14px 13px!important;position:relative!important;overflow:hidden!important}
.dashboard-chart-grid{position:absolute!important;inset:8px 14px 35px!important;background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#ece8e1 50px,#ece8e1 51px)!important;border-bottom:1px solid #cfd5dd!important;pointer-events:none!important}
.dashboard-chart-columns{position:absolute!important;inset:8px 14px 10px!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:16px!important;align-items:end!important}
.dashboard-chart-column{height:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;min-width:0!important}
.dashboard-bars{height:205px!important;width:100%!important;display:flex!important;justify-content:center!important;align-items:flex-end!important;gap:5px!important;min-width:0!important}
.dashboard-bar{width:min(25%,28px)!important;min-width:7px!important;max-width:28px!important;border:0!important;border-radius:3px 3px 0 0!important;padding:0!important;cursor:pointer!important;transition:filter .15s ease,transform .15s ease!important}
.dashboard-bar:hover{filter:brightness(.92)!important;transform:scaleX(1.08)!important}
.dashboard-bar.sales{background:linear-gradient(#a98451,#8d6632)!important}.dashboard-bar.purchases{background:linear-gradient(#36a976,#218654)!important}.dashboard-bar.expenses{background:linear-gradient(#ef5551,#d83434)!important}
.dashboard-chart-column>span{font-size:10px!important;color:#465166!important;white-space:nowrap!important;text-transform:capitalize!important}

.dashboard-activities{padding:0 14px!important}
.dashboard-activity{width:100%!important;min-height:52px!important;display:grid!important;grid-template-columns:38px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;padding:8px 0!important;border:0!important;border-bottom:1px solid #ece9e4!important;background:transparent!important;text-align:left!important;color:#101827!important}
.dashboard-activity:last-child{border-bottom:0!important}.dashboard-activity:hover{background:#fcfbf8!important}
.dashboard-activity-icon{width:36px!important;height:36px!important;border-radius:8px!important;display:grid!important;place-items:center!important}.dashboard-activity-icon svg{width:19px!important;height:19px!important}
.dashboard-activity-icon.green{background:#dff5e7!important;color:#168647!important}.dashboard-activity-icon.blue{background:#deedff!important;color:#106bc0!important}.dashboard-activity-icon.red{background:#ffe1e1!important;color:#cb2020!important}
.dashboard-activity-copy{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important}.dashboard-activity-copy strong{font-size:11px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.dashboard-activity-copy small{font-size:10px!important;line-height:1.15!important;color:#4e5a6c!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.dashboard-activity time{font-size:10px!important;color:#506077!important;white-space:nowrap!important}.dashboard-empty-activity{padding:30px 12px!important;text-align:center!important;color:#667085!important;font-size:12px!important}

.dashboard-mini-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:10px 14px 13px!important}
.dashboard-mini-card,.dashboard-summary-card{min-width:0!important;border:1px solid #e4e1dc!important;border-radius:7px!important;padding:10px 11px!important;background:#fff!important;text-align:left!important;color:#101827!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;cursor:pointer!important}
.dashboard-mini-card.green,.dashboard-summary-card.green{background:linear-gradient(135deg,#fff,#f3fbf6)!important;border-color:#dbe9df!important}.dashboard-mini-card.blue,.dashboard-summary-card.blue{background:linear-gradient(135deg,#fff,#f3f8fe)!important;border-color:#d8e4f0!important}.dashboard-mini-card.red,.dashboard-summary-card.red{background:linear-gradient(135deg,#fff,#fff5f5)!important;border-color:#ecdcdc!important}.dashboard-mini-card.purple,.dashboard-summary-card.purple{background:linear-gradient(135deg,#fff,#f7f4ff)!important;border-color:#e2ddef!important}
.dashboard-small-icon{width:32px!important;height:32px!important;border-radius:7px!important;display:grid!important;place-items:center!important;margin-bottom:5px!important;background:#f3eee6!important}.dashboard-small-icon svg{width:17px!important;height:17px!important}
.dashboard-mini-card small,.dashboard-summary-card>span{font-size:10px!important;line-height:1.2!important;font-weight:600!important;color:#273246!important}
.dashboard-mini-card strong,.dashboard-summary-card>strong{display:block!important;font-size:15px!important;line-height:1.18!important;margin:5px 0!important;white-space:nowrap!important;letter-spacing:-.2px!important}
.dashboard-mini-card em,.dashboard-summary-card>small{display:block!important;font-size:9px!important;line-height:1.2!important;color:#596579!important;font-style:normal!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important}
.dashboard-summary-card .dashboard-kpi-change{margin-top:8px!important}
.dashboard-summary-card .dashboard-kpi-change em{display:none!important}
.dashboard-tip{min-height:42px!important;border:1px solid #b9dafa!important;background:#eaf5ff!important;color:#1665b9!important;border-radius:6px!important;display:flex!important;align-items:center!important;gap:10px!important;padding:8px 12px!important;font-size:10px!important;line-height:1.3!important}
.dashboard-tip>svg{width:17px!important;height:17px!important;min-width:17px!important}

/* Botón Filtros: geometría única, idéntica a Compras. */
html body .products-filter-toggle,
html body .inventory-filter-toggle,
html body .transfer-filter-toggle,
html body .purchase-filter-toggle,
html body .sales-filter-toggle,
html body .cash-filter-toggle,
html body .expense-filter-toggle,
html body .products-filter-toggle:hover,
html body .inventory-filter-toggle:hover,
html body .transfer-filter-toggle:hover,
html body .purchase-filter-toggle:hover,
html body .sales-filter-toggle:hover,
html body .cash-filter-toggle:hover,
html body .expense-filter-toggle:hover,
html body .products-filter-toggle.active,
html body .inventory-filter-toggle.active,
html body .transfer-filter-toggle.active,
html body .purchase-filter-toggle.active,
html body .sales-filter-toggle.active,
html body .cash-filter-toggle.active,
html body .expense-filter-toggle.active{
  height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;
  background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;line-height:1!important;
  box-shadow:none!important;white-space:nowrap!important;transform:none!important;filter:none!important;
}
html body .products-filter-toggle svg,
html body .inventory-filter-toggle svg,
html body .transfer-filter-toggle svg,
html body .purchase-filter-toggle svg,
html body .sales-filter-toggle svg,
html body .cash-filter-toggle svg,
html body .expense-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}

/* Paneles desplegados con la misma respiración de Compras. */
html body .transfer-filter-panel,html body .expense-filter-panel{
  display:flex!important;align-items:end!important;gap:10px!important;padding:12px 13px!important;
  border-bottom:1px solid #ece8e1!important;background:#fcfbf9!important;
}
html body .transfer-filter-panel label{display:grid!important;gap:5px!important;font-size:11px!important;color:#596579!important;font-weight:600!important}
html body .transfer-filter-panel input{height:38px!important;border:1px solid #d7dadd!important;border-radius:7px!important;padding:0 10px!important;background:#fff!important;color:#111!important;font-size:12px!important}
html body .expense-filter-panel .expense-filter-select{min-width:220px!important;height:38px!important;border-radius:7px!important}
html body .expense-filter-panel .expense-date-filter{width:165px!important;height:38px!important;border-radius:7px!important}
html body .expense-filter-panel .expense-clear-btn{height:38px!important;padding:0 16px!important;border-radius:7px!important}

@media(max-width:1400px){
  .dashboard-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .dashboard-middle-grid{grid-template-columns:minmax(0,1.8fr) minmax(320px,.9fr)!important}
  .dashboard-bottom-grid{grid-template-columns:1fr!important}
}
@media(max-width:1200px){
  html body.dashboard-view .top-actions .search{width:min(650px,64vw)!important;max-width:none!important}
  html body.dashboard-view .topbar-user-copy{display:none!important}
  .dashboard-page-heading{align-items:flex-start!important;flex-direction:column!important}
  .dashboard-heading-actions{justify-content:flex-start!important}
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-middle-grid{grid-template-columns:1fr!important}
}
@media(max-width:1024px){
  html body.dashboard-view .topbar{padding:0 16px!important}
  html body.dashboard-view .content{padding:18px 16px 24px!important}
  html body.dashboard-view .topbar-user-avatar,html body.dashboard-view .topbar-user-menu{display:none!important}
  html body.dashboard-view .search-kbd{display:none!important}
  .dashboard-page-heading h1{font-size:24px!important}
  .dashboard-heading-actions{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  .dashboard-date-range{grid-column:1/-1!important;width:100%!important;justify-content:center!important}
  .dashboard-btn{width:100%!important}
  .dashboard-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-chart-tools{display:none!important}
  html body .transfer-filter-panel,html body .expense-filter-panel{flex-wrap:wrap!important}
  html body .expense-filter-panel .expense-filter-select{flex:1 1 180px!important;min-width:160px!important}
}
@media(max-width:720px){
  html body.dashboard-view .content{padding:18px 14px 24px!important}
  html body.dashboard-view .top-actions{gap:8px!important}
  html body.dashboard-view .api-status{display:none!important}
  html body.dashboard-view .top-actions .search{width:100%!important;max-width:none!important}
  .dashboard-page-heading{gap:14px!important;margin-bottom:18px!important}
  .dashboard-page-heading p{font-size:13px!important}
  .dashboard-kpi-grid{grid-template-columns:1fr!important;gap:10px!important}
  .dashboard-kpi{min-height:100px!important;padding:15px!important;gap:13px!important}
  .dashboard-kpi-copy>strong{font-size:20px!important}
  .dashboard-panel-head{align-items:flex-start!important}
  .dashboard-panel-title h2{white-space:normal!important}
  .dashboard-chart-area{height:230px!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .dashboard-chart-columns{min-width:620px!important}
  .dashboard-chart-grid{min-width:620px!important}
  .dashboard-activity{grid-template-columns:36px minmax(0,1fr)!important}.dashboard-activity time{display:none!important}
  .dashboard-tip{align-items:flex-start!important}
  html body .products-filter-toggle,html body .inventory-filter-toggle,html body .transfer-filter-toggle,html body .purchase-filter-toggle,html body .sales-filter-toggle,html body .cash-filter-toggle,html body .expense-filter-toggle{width:100%!important}
  html body .transfer-filter-panel,html body .expense-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
  html body .transfer-filter-panel label,html body .transfer-filter-panel button,html body .expense-filter-panel>*{width:100%!important;min-width:0!important;max-width:none!important}
}
@media(max-width:520px){
  .dashboard-heading-actions{grid-template-columns:1fr!important}.dashboard-date-range{grid-column:1!important}
  .dashboard-mini-grid{grid-template-columns:1fr!important}
  .dashboard-chart-area{padding-left:10px!important;padding-right:10px!important}
  html body .transfer-filter-panel,html body .expense-filter-panel{grid-template-columns:1fr!important}
}

/* ===== AJUSTE FINAL · ESCALA VISUAL IGUAL A COMPRAS =====
   Tipografía e iconografía del Resumen ejecutivo y sidebar unificadas con Compras.
   No modifica lógica, datos, filtros ni acciones. */

/* Sidebar global: misma escala del módulo Compras en cualquier sección. */
@media (min-width:1201px){
  #app:not(.hidden){grid-template-columns:250px minmax(0,1fr)!important}
  #app:not(.hidden) .sidebar{
    width:250px!important;min-width:250px!important;height:100vh!important;
    padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important;
  }
  #app:not(.hidden) .sidebar-brand{
    height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;border-bottom:1px solid #ddd8d0!important;
  }
  #app:not(.hidden) .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important;filter:none!important;opacity:1!important}
  #app:not(.hidden) .nav{padding:8px 0!important}
  #app:not(.hidden) .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
  #app:not(.hidden) .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;margin:1px 0!important;border-radius:8px!important;font-size:13px!important;line-height:1.2!important;color:#1b2738!important}
  #app:not(.hidden) .nav button .nav-icon,#app:not(.hidden) .nav button .icon{width:20px!important;min-width:20px!important;display:grid!important;place-items:center!important}
  #app:not(.hidden) .nav button .nav-icon svg,#app:not(.hidden) .nav button .icon svg,#app:not(.hidden) .nav button>svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
  #app:not(.hidden) .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#151515!important;font-weight:600!important;box-shadow:none!important}
  #app:not(.hidden) .nav button.active:before{left:-7px!important;width:3px!important;background:#9b6b20!important}
  #app:not(.hidden) .sidebar-footer{padding:13px 8px 0!important;border-top:1px solid #ddd8d0!important;background:#fff!important}
  #app:not(.hidden) .sidebar-footer .user-chip{gap:10px!important;align-items:center!important}
  #app:not(.hidden) .sidebar-footer .avatar{width:42px!important;height:42px!important;border-radius:50%!important;background:#eadfc9!important;color:#171717!important;font-size:14px!important}
  #app:not(.hidden) .sidebar-footer strong{font-size:13px!important;color:#171717!important}
  #app:not(.hidden) .sidebar-footer small{font-size:11px!important;color:#596579!important}
  #app:not(.hidden) .sidebar-footer .text-btn{font-size:12px!important;color:#3e4b5d!important;padding:10px 0 0!important}
}
@media (max-width:1200px) and (min-width:1025px){
  #app:not(.hidden){grid-template-columns:220px minmax(0,1fr)!important}
  #app:not(.hidden) .sidebar{width:220px!important;min-width:220px!important}
  #app:not(.hidden) .nav button{font-size:13px!important}
  #app:not(.hidden) .nav button .nav-icon svg,#app:not(.hidden) .nav button .icon svg,#app:not(.hidden) .nav button>svg{width:18px!important;height:18px!important}
}
@media (max-width:1024px){
  #app:not(.hidden){grid-template-columns:1fr!important}
  #app:not(.hidden) .sidebar{position:fixed!important;width:280px!important;min-width:280px!important;transform:translateX(-100%)!important}
  #app:not(.hidden) .sidebar.open{transform:translateX(0)!important}
  #app:not(.hidden) .nav button{font-size:13px!important;min-height:38px!important;padding:9px 12px!important}
  #app:not(.hidden) .nav button .nav-icon svg,#app:not(.hidden) .nav button .icon svg,#app:not(.hidden) .nav button>svg{width:19px!important;height:19px!important}
}

/* Resumen ejecutivo: exactamente la escala tipográfica/iconográfica de Compras. */
html body.dashboard-view .content{padding:22px 30px 26px!important}
.dashboard-page-heading{gap:25px!important;margin-bottom:26px!important}
.dashboard-page-heading h1{font-size:29px!important;line-height:1.12!important;letter-spacing:-.7px!important;margin:0 0 2px!important}
.dashboard-page-heading p{font-size:15px!important;line-height:1.45!important}
.dashboard-eyebrow{font-size:12px!important;line-height:1.2!important;margin-bottom:6px!important}
.dashboard-btn,.dashboard-date-range{height:46px!important;border-radius:9px!important;font-size:13px!important}
.dashboard-btn{padding:0 19px!important;gap:9px!important}
.dashboard-btn svg,.dashboard-date-range svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
.dashboard-date-range{padding:0 14px!important}

.dashboard-kpi-grid{gap:14px!important;margin-bottom:18px!important}
.dashboard-kpi{min-height:118px!important;padding:18px!important;gap:20px!important;align-items:center!important}
.dashboard-kpi-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:10px!important}
.dashboard-kpi-icon svg{width:28px!important;height:28px!important;stroke-width:1.8!important}
.dashboard-kpi-copy>span:first-child{font-size:13px!important;line-height:1.2!important;margin:0 0 6px!important;color:#596579!important}
.dashboard-kpi-copy>strong{font-size:27px!important;line-height:1.15!important;letter-spacing:-.5px!important}
.dashboard-kpi-change{font-size:11px!important;line-height:1.2!important;margin-top:6px!important;gap:8px!important}
.dashboard-kpi-change b{font-size:11px!important}.dashboard-kpi-change em{font-size:12px!important}

.dashboard-panel-head{min-height:66px!important;padding:13px 16px!important;gap:16px!important}
.dashboard-panel-title{gap:12px!important}
.dashboard-panel-title h2{font-size:16px!important;line-height:1.25!important;margin:0 0 3px!important}
.dashboard-panel-title p{font-size:12px!important;line-height:1.3!important}
.dashboard-mini-icon{width:40px!important;height:40px!important;min-width:40px!important;border-radius:9px!important}
.dashboard-mini-icon svg{width:21px!important;height:21px!important;stroke-width:1.8!important}
.dashboard-link{font-size:12px!important;gap:5px!important}.dashboard-link svg{width:16px!important;height:16px!important}
.dashboard-legend{font-size:12px!important;gap:16px!important}.dashboard-legend i{width:10px!important;height:10px!important}
.dashboard-period-chip{height:39px!important;padding:0 14px!important;font-size:12px!important}.dashboard-period-chip svg{width:15px!important;height:15px!important}
.dashboard-chart-column>span{font-size:12px!important}

.dashboard-activity{min-height:60px!important;grid-template-columns:44px minmax(0,1fr) auto!important;gap:12px!important;padding:10px 0!important}
.dashboard-activity-icon{width:42px!important;height:42px!important;border-radius:9px!important}.dashboard-activity-icon svg{width:22px!important;height:22px!important;stroke-width:1.8!important}
.dashboard-activity-copy{gap:5px!important}.dashboard-activity-copy strong{font-size:13px!important;line-height:1.2!important}.dashboard-activity-copy small{font-size:12px!important;line-height:1.25!important}.dashboard-activity time{font-size:11px!important}
.dashboard-empty-activity{font-size:13px!important}

.dashboard-mini-grid{gap:12px!important;padding:13px 16px 16px!important}
.dashboard-mini-card,.dashboard-summary-card{padding:13px 14px!important;border-radius:8px!important;min-height:112px!important}
.dashboard-small-icon{width:38px!important;height:38px!important;border-radius:8px!important;margin-bottom:7px!important}.dashboard-small-icon svg{width:20px!important;height:20px!important;stroke-width:1.8!important}
.dashboard-mini-card small,.dashboard-summary-card>span{font-size:12px!important;line-height:1.25!important}
.dashboard-mini-card strong,.dashboard-summary-card>strong{font-size:18px!important;line-height:1.18!important;margin:6px 0!important}
.dashboard-mini-card em,.dashboard-summary-card>small{font-size:11px!important;line-height:1.25!important}
.dashboard-summary-card .dashboard-kpi-change{margin-top:9px!important}
.dashboard-summary-card .dashboard-kpi-change b{font-size:11px!important}
.dashboard-tip{min-height:46px!important;padding:10px 14px!important;font-size:12px!important;line-height:1.35!important;gap:10px!important}.dashboard-tip>svg{width:19px!important;height:19px!important;min-width:19px!important}

@media(max-width:1200px){
  html body.dashboard-view .content{padding:22px 24px 26px!important}
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-page-heading{flex-direction:column!important;align-items:flex-start!important}
  .dashboard-heading-actions{justify-content:flex-start!important}
}
@media(max-width:1024px){
  html body.dashboard-view .content{padding:18px 16px 24px!important}
  .dashboard-page-heading h1{font-size:24px!important}
  .dashboard-page-heading p{font-size:14px!important}
  .dashboard-kpi{min-height:108px!important;padding:16px!important;gap:16px!important}
  .dashboard-kpi-icon{width:52px!important;height:52px!important;min-width:52px!important}.dashboard-kpi-icon svg{width:26px!important;height:26px!important}
  .dashboard-kpi-copy>strong{font-size:24px!important}
  .dashboard-panel-title h2{font-size:15px!important}.dashboard-panel-title p{font-size:12px!important}
  .dashboard-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
  html body.dashboard-view .content{padding:18px 14px 24px!important}
  .dashboard-page-heading{gap:16px!important;margin-bottom:20px!important}
  .dashboard-heading-actions{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .dashboard-date-range{grid-column:1/-1!important;height:44px!important}
  .dashboard-btn{height:44px!important;font-size:13px!important}
  .dashboard-kpi-grid{grid-template-columns:1fr!important;gap:12px!important}
  .dashboard-kpi{min-height:108px!important;padding:16px!important;gap:16px!important}
  .dashboard-kpi-icon{width:52px!important;height:52px!important;min-width:52px!important}.dashboard-kpi-icon svg{width:26px!important;height:26px!important}
  .dashboard-kpi-copy>span:first-child{font-size:13px!important}.dashboard-kpi-copy>strong{font-size:24px!important}.dashboard-kpi-change b{font-size:11px!important}.dashboard-kpi-change em{font-size:11px!important}
  .dashboard-panel-head{padding:12px 14px!important}.dashboard-mini-icon{width:38px!important;height:38px!important;min-width:38px!important}.dashboard-mini-icon svg{width:20px!important;height:20px!important}
  .dashboard-activity{grid-template-columns:42px minmax(0,1fr)!important}.dashboard-activity-icon{width:40px!important;height:40px!important}.dashboard-activity-icon svg{width:21px!important;height:21px!important}.dashboard-activity-copy strong{font-size:13px!important}.dashboard-activity-copy small{font-size:12px!important}
  .dashboard-mini-card,.dashboard-summary-card{min-height:106px!important;padding:12px!important}.dashboard-mini-card strong,.dashboard-summary-card>strong{font-size:17px!important}.dashboard-mini-card small,.dashboard-summary-card>span{font-size:12px!important}.dashboard-mini-card em,.dashboard-summary-card>small{font-size:11px!important}
  .dashboard-tip{font-size:12px!important}
}
@media(max-width:520px){
  .dashboard-heading-actions{grid-template-columns:1fr!important}.dashboard-date-range{grid-column:1!important}
  .dashboard-mini-grid{grid-template-columns:1fr!important}
}

/* Resumen del mes: iconografía alineada con Posición financiera. */
.dashboard-summary-card>.dashboard-small-icon{
  width:38px!important;height:38px!important;min-width:38px!important;border-radius:8px!important;
  display:grid!important;place-items:center!important;margin:0 0 7px!important;background:#f3eee6!important;color:#273246!important;
}
.dashboard-summary-card>.dashboard-small-icon svg{width:20px!important;height:20px!important;stroke-width:1.8!important}
.dashboard-summary-card>.dashboard-summary-label{font-size:12px!important;line-height:1.25!important;font-weight:600!important;color:#273246!important}
.dashboard-summary-card.green>.dashboard-small-icon{background:#dff5e7!important;color:#168647!important}
.dashboard-summary-card.red>.dashboard-small-icon{background:#ffe1e1!important;color:#cb2020!important}
.dashboard-summary-card.blue>.dashboard-small-icon{background:#deedff!important;color:#106bc0!important}
.dashboard-summary-card.purple>.dashboard-small-icon{background:#e9defe!important;color:#5e27cb!important}
@media(max-width:720px){
  .dashboard-summary-card>.dashboard-small-icon{width:38px!important;height:38px!important;min-width:38px!important}
  .dashboard-summary-card>.dashboard-small-icon svg{width:20px!important;height:20px!important}
}

/* Rango de fechas activo en Resumen ejecutivo. */
.dashboard-date-control{position:relative!important;display:inline-flex!important;align-items:center!important;z-index:35!important}
.dashboard-date-range{font-family:Inter,Arial,sans-serif!important;cursor:pointer!important;appearance:none!important;-webkit-appearance:none!important}
.dashboard-date-range.active{border-color:#9b702d!important;box-shadow:0 0 0 3px rgba(155,112,45,.10)!important}
.dashboard-date-range svg:last-child{width:15px!important;height:15px!important;margin-left:2px!important}
.dashboard-date-popover{
  position:absolute!important;top:calc(100% + 8px)!important;right:0!important;width:350px!important;padding:14px!important;
  background:#fff!important;border:1px solid #ddd8d0!important;border-radius:10px!important;box-shadow:0 14px 36px rgba(15,23,42,.15)!important;
  z-index:80!important;color:#101827!important;
}
.dashboard-date-fields{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
.dashboard-date-fields label{display:flex!important;flex-direction:column!important;gap:6px!important;font-size:11px!important;font-weight:600!important;color:#596579!important}
.dashboard-date-fields input{
  width:100%!important;height:40px!important;padding:0 10px!important;border:1px solid #d7dadd!important;border-radius:8px!important;
  background:#fff!important;color:#101827!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;outline:0!important;
}
.dashboard-date-fields input:focus{border-color:#9b702d!important;box-shadow:0 0 0 3px rgba(155,112,45,.10)!important}
.dashboard-date-actions{display:flex!important;justify-content:flex-end!important;gap:8px!important;margin-top:12px!important;padding-top:12px!important;border-top:1px solid #ece8e1!important}
.dashboard-date-actions button{height:38px!important;border-radius:8px!important;padding:0 14px!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;font-weight:600!important}
.dashboard-date-clear{border:1px solid #d7dadd!important;background:#fff!important;color:#283548!important}
.dashboard-date-apply{border:1px solid #95691f!important;background:linear-gradient(#a77b31,#95691f)!important;color:#fff!important}
@media(max-width:720px){
  .dashboard-date-control{grid-column:1/-1!important;width:100%!important}
  .dashboard-date-range{width:100%!important;justify-content:center!important}
  .dashboard-date-popover{left:0!important;right:auto!important;width:100%!important;min-width:0!important}
}
@media(max-width:520px){
  .dashboard-date-control{grid-column:1!important}
  .dashboard-date-fields{grid-template-columns:1fr!important}
  .dashboard-date-popover{width:100%!important}
  .dashboard-date-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .dashboard-date-actions button{width:100%!important}
}
.dashboard-chart-columns{grid-template-columns:repeat(var(--dashboard-columns,6),minmax(0,1fr))!important}

/* ======================================================================
   CONTABILIDAD FINAL · MISMA ESCALA VISUAL DE COMPRAS + RESPONSIVE
   ====================================================================== */
.topbar-notification{display:none;border:1px solid #e3e1dc;background:#fff;color:#1f2937;width:36px;height:36px;border-radius:50%;place-items:center;position:relative;padding:0;flex:0 0 auto}
.topbar-notification svg{width:17px;height:17px}.topbar-notification i{position:absolute;top:7px;right:7px;width:6px;height:6px;border-radius:50%;background:#d43b32;border:1px solid #fff}
#exportButton .export-button-icon{width:16px;height:16px;flex:0 0 auto}

html body.accounting-view{font-size:16px!important;background:#fafafa!important}
html body.accounting-view .app,html body.accounting-view .main,html body.accounting-view .content{background:#fafafa!important}
html body.accounting-view .topbar{
  min-height:96px!important;height:96px!important;padding:12px 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;
  display:flex!important;align-items:center!important;gap:24px!important;position:sticky!important;top:0!important;
}
html body.accounting-view .topbar-title{display:block!important;min-width:300px!important;max-width:520px!important;flex:1 1 auto!important}
html body.accounting-view .topbar-title .eyebrow{display:block!important;font-size:11px!important;letter-spacing:.02em!important;font-weight:600!important;color:#596579!important;margin-bottom:4px!important}
html body.accounting-view .topbar-title h1{font-size:27px!important;line-height:1.08!important;letter-spacing:-.65px!important;margin:0 0 3px!important;color:#101827!important;font-weight:700!important}
html body.accounting-view .topbar-title::after{content:"Lectura gerencial de resultados, posición financiera y saldos contables a partir de la operación registrada.";display:block;font-size:12px;line-height:1.35;color:#4a5a70;max-width:690px}
html body.accounting-view .top-actions{width:auto!important;margin-left:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:nowrap!important;min-width:0!important}
html body.accounting-view .top-actions .search{order:0!important;width:300px!important;max-width:30vw!important;height:40px!important;padding:0 11px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important}
html body.accounting-view .top-actions .search input{width:100%!important;min-width:0!important;font-size:12px!important;color:#111!important;padding:0 8px!important}
html body.accounting-view .search-kbd{display:inline-block!important;font-size:10px!important;padding:4px 6px!important}
html body.accounting-view .api-status{margin-left:0!important;min-height:36px!important;padding:8px 12px!important;border:1px solid #d8dbdf!important;border-radius:8px!important;background:#fff!important;color:#222!important;font-size:11px!important;white-space:nowrap!important}
html body.accounting-view .topbar-notification{display:grid!important}
html body.accounting-view .topbar-user-avatar{display:grid!important;width:38px!important;height:38px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:12px!important}
html body.accounting-view .topbar-user-copy{display:flex!important;min-width:84px!important}
html body.accounting-view .topbar-user-copy strong{font-size:12px!important;color:#111!important}.accounting-view .topbar-user-copy small{font-size:11px!important;color:#596579!important}
html body.accounting-view .topbar-user-menu{display:none!important}
html body.accounting-view #themeBtn{display:none!important}
html body.accounting-view #exportButton{display:inline-flex!important;height:38px!important;padding:0 13px!important;border:1px solid #d9d7d2!important;border-radius:7px!important;background:#fff!important;color:#182230!important;font-size:11px!important;font-weight:600!important;gap:7px!important;align-items:center!important;white-space:nowrap!important}
html body.accounting-view #quickAction{display:none!important}
html body.accounting-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:12px 30px 26px!important}

.accounting-page{--ac-line:#e5dfd5;--ac-text:#172236;--ac-muted:#667085;--ac-gold:#9b7844;--ac-soft:#f7f1e7;font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;color:var(--ac-text)!important;min-width:0!important}
.accounting-page-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin:0 0 12px}.accounting-period-display{height:38px;border:1px solid #d9d7d2;border-radius:7px;background:#fff;padding:0 11px;display:inline-flex;align-items:center;gap:8px;color:#2d3a4f;font-size:11px;white-space:nowrap}.accounting-period-display svg{width:16px;height:16px}.accounting-refresh-btn{height:38px;border:1px solid #92703d;border-radius:7px;background:linear-gradient(#ac8b58,#96723c);color:#fff;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer}.accounting-refresh-btn svg{width:16px;height:16px}

.accounting-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:13px}.accounting-kpi{min-height:104px;border:1px solid var(--ac-line);border-radius:8px;background:#fff;padding:13px 12px;display:flex;gap:12px;align-items:flex-start;box-shadow:0 1px 2px rgba(15,23,42,.04);min-width:0}.accounting-kpi-icon{width:44px;height:44px;min-width:44px;border-radius:9px;display:grid;place-items:center}.accounting-kpi-icon svg{width:24px;height:24px;stroke-width:1.9}.accounting-kpi>div:last-child{min-width:0}.accounting-kpi span{font-size:11px;font-weight:600;display:block;margin:2px 0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.accounting-kpi strong{font-size:19px;line-height:1.12;display:block;letter-spacing:-.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.accounting-kpi small{font-size:10px;color:#53627a;display:block;margin-top:6px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.accounting-kpi.green{background:linear-gradient(90deg,#f5fff9,#fff);border-color:#cfeede}.accounting-kpi.green .accounting-kpi-icon{background:#dff8e8;color:#089647}.accounting-kpi.red{background:linear-gradient(90deg,#fff8f8,#fff);border-color:#f3d8d8}.accounting-kpi.red .accounting-kpi-icon{background:#ffe3e3;color:#d52f2f}.accounting-kpi.orange{background:linear-gradient(90deg,#fffaf2,#fff);border-color:#f0e0ca}.accounting-kpi.orange .accounting-kpi-icon{background:#fff0d8;color:#dc7305}.accounting-kpi.blue{background:linear-gradient(90deg,#f4faff,#fff);border-color:#d4e7fb}.accounting-kpi.blue .accounting-kpi-icon{background:#e0f0ff;color:#0b6fd7}.accounting-kpi.purple{background:linear-gradient(90deg,#fcf7ff,#fff);border-color:#e7d9f1}.accounting-kpi.purple .accounting-kpi-icon{background:#f4ddff;color:#8c1bc6}

.accounting-date-panel{min-height:66px;border:1px solid var(--ac-line);border-radius:8px;background:#fff;padding:10px 14px;display:grid;grid-template-columns:1.15fr .72fr .72fr auto;gap:14px;align-items:end;margin-bottom:13px}.accounting-date-title{align-self:center;min-width:0}.accounting-date-title strong{display:block;font-size:12px}.accounting-date-title span{display:block;font-size:10px;color:#56657a;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.accounting-date-panel label>span{font-size:10px;color:#55657a;font-weight:600;display:block;margin-bottom:5px}.accounting-date-input{position:relative}.accounting-date-input input{width:100%;height:35px;border:1px solid #d9d7d2;border-radius:7px;padding:0 34px 0 10px;font-size:11px;background:#fff;color:#172236;outline:0}.accounting-date-input svg{position:absolute;right:10px;top:9px;width:16px;height:16px;color:#223248;pointer-events:none;background:#fff}.accounting-date-input input::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:0;width:38px;height:100%;cursor:pointer}.accounting-quick-buttons{display:flex;gap:8px}.accounting-quick-buttons button{height:35px;border:1px solid #d9d7d2;border-radius:7px;background:#fff;font-size:10px;padding:0 15px;color:#253248;font-weight:600;white-space:nowrap}.accounting-quick-buttons button.active{border-color:#a47c3b;background:#fffaf1;color:#5d4624}

.accounting-upper-grid{display:grid;grid-template-columns:minmax(0,2.35fr) minmax(292px,1fr);gap:13px;margin-bottom:13px}.accounting-panel{border:1px solid var(--ac-line);border-radius:8px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04);min-width:0}.accounting-panel-title{min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 14px;border-bottom:1px solid var(--ac-line);background:linear-gradient(90deg,#f8f2e8,#fbf8f1)}.accounting-panel-heading{display:flex;align-items:center;gap:11px;min-width:0}.accounting-panel-icon{width:40px;height:40px;min-width:40px;border-radius:9px;background:#f1e8d8;color:#806238;display:grid;place-items:center}.accounting-panel-icon svg{width:21px;height:21px;stroke-width:1.9}.accounting-panel-title h2{font-size:15px;line-height:1.2;margin:0;color:#172236}.accounting-panel-title p{font-size:10px;line-height:1.25;margin:3px 0 0;color:#53627a}.accounting-unit-select{display:flex;align-items:center;gap:8px;font-size:10px;color:#36445a;white-space:nowrap}.accounting-unit-select select{height:32px;border:1px solid #d7d7d7;border-radius:7px;background:#fff;padding:0 28px 0 10px;font-size:10px;color:#253248;outline:0}
.accounting-margins{display:grid;grid-template-columns:1fr 1fr;gap:11px;padding:12px 14px 10px}.accounting-margins article{border:1px solid #e5e1db;border-radius:8px;padding:10px 14px;min-width:0}.accounting-margins span{font-size:10px;color:#59687e;display:block}.accounting-margins strong{font-size:20px;line-height:1.1;display:block;margin:6px 0 9px}.accounting-progress{height:6px;background:#e8e5df;border-radius:6px;overflow:hidden}.accounting-progress i{display:block;height:100%;background:#0d9b4b;border-radius:6px}.accounting-progress.brown i{background:#9b7844}.accounting-progress.negative i{background:#d94242}
.accounting-table-box{padding:0 14px 10px}.accounting-table-wrap{overflow-x:auto}.accounting-statement-table,.accounting-balance-table{width:100%;border-collapse:collapse;font-size:11px}.accounting-statement-table{min-width:650px}.accounting-statement-table th,.accounting-balance-table th{font-size:9px;font-weight:500;color:#4d5a6f;background:linear-gradient(#fbf8f2,#f6f0e5);padding:8px 12px;text-align:left;border-top:1px solid #e4e0d8;border-bottom:1px solid #e4e0d8;white-space:nowrap}.accounting-statement-table td{padding:9px 12px;border-bottom:1px solid #ece8e1;color:#172236}.accounting-statement-table th:nth-child(2),.accounting-statement-table td:nth-child(2){width:34%;text-align:right}.accounting-statement-table th:last-child,.accounting-statement-table td:last-child{width:15%;text-align:right}.accounting-success-row{background:#edf9f1}.accounting-success-row td{border-top:1px solid #c7e9d3;border-bottom-color:#c7e9d3}.accounting-success-row.loss{background:#fff1f1}.accounting-success-row.loss td{border-color:#f0caca}.accounting-section-row td{background:#fbf7ef;font-size:9px;font-weight:700;padding:8px 12px;text-transform:uppercase}.accounting-indent{padding-left:13px;display:inline-block}.accounting-statement-table .muted-cell{color:#667085}
.accounting-position-list{padding:9px 12px 12px;display:flex;flex-direction:column;gap:7px}.accounting-position-item{min-height:55px;border:1px solid #e5e1db;border-radius:8px;display:flex;align-items:center;gap:10px;padding:7px 10px;background:#fff;min-width:0}.accounting-position-icon{width:35px;height:35px;min-width:35px;border-radius:8px;background:#f7f1e7;color:#765a32;display:grid;place-items:center}.accounting-position-icon svg{width:18px;height:18px;stroke-width:1.9}.accounting-position-item>div:last-child{min-width:0}.accounting-position-item small{font-size:10px;display:block;color:#344054}.accounting-position-item strong{font-size:14px;line-height:1.15;display:block;margin:1px 0;color:#172236;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.accounting-position-item span{font-size:9px;color:#59687c;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.accounting-balance-panel{margin-bottom:0}.accounting-status-badge{font-size:9px;border:1px solid #6e8bae;border-radius:6px;color:#405d7e;background:#fff;padding:5px 8px;white-space:nowrap}.accounting-balance-wrap{padding-top:10px;overflow-x:auto}.accounting-balance-table{min-width:850px}.accounting-balance-table td{padding:5px 12px;border-bottom:1px solid #ece8e1;color:#23405e;font-size:10px}.accounting-balance-table td:nth-child(3),.accounting-balance-table td:nth-child(4),.accounting-balance-table td:nth-child(5),.accounting-balance-table th:nth-child(3),.accounting-balance-table th:nth-child(4),.accounting-balance-table th:nth-child(5){text-align:right}.accounting-negative{color:#e02d2d!important;font-weight:700}.accounting-info-note{margin:0 10px 10px;min-height:35px;border:1px solid #acd3f7;background:#f1f8ff;color:#35679b;border-radius:7px;display:flex;align-items:center;gap:9px;padding:7px 10px;font-size:10px;line-height:1.3}.accounting-info-icon{width:16px;height:16px;min-width:16px;border-radius:50%;background:#1e7ed9;color:#fff;display:grid;place-items:center;font-size:10px;font-weight:700}

/* Asegura que cualquier botón Filtros conserve exactamente la métrica de Compras. */
html body .products-filter-toggle,html body .inventory-filter-toggle,html body .transfer-filter-toggle,html body .purchase-filter-toggle,html body .sales-filter-toggle,html body .cash-filter-toggle,html body .expense-filter-toggle{
  height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;gap:9px!important;font-size:13px!important;font-weight:600!important;box-shadow:none!important;
}

@media(max-width:1380px){
  html body.accounting-view .topbar-title{min-width:250px!important}.accounting-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-kpi:nth-child(4),.accounting-kpi:nth-child(5){min-height:98px}
  html body.accounting-view .top-actions .search{width:265px!important;max-width:27vw!important}.accounting-upper-grid{grid-template-columns:minmax(0,1.75fr) minmax(285px,.8fr)}
}
@media(max-width:1200px){
  html body.accounting-view .topbar{height:82px!important;min-height:82px!important;padding:9px 24px!important;gap:14px!important}
  html body.accounting-view .topbar-title{min-width:210px!important}.accounting-view .topbar-title::after{display:none!important}
  html body.accounting-view .topbar-title h1{font-size:24px!important;margin-bottom:0!important}
  html body.accounting-view .top-actions .search{width:230px!important;max-width:28vw!important}.accounting-view .topbar-user-copy{display:none!important}
  html body.accounting-view .content{padding:12px 24px 24px!important}.accounting-date-panel{grid-template-columns:1fr 1fr}.accounting-date-title,.accounting-quick-buttons{grid-column:1/-1}.accounting-upper-grid{grid-template-columns:1fr}.accounting-position-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1024px){
  html body.accounting-view .topbar{height:72px!important;min-height:72px!important;padding:9px 16px!important;gap:10px!important}
  html body.accounting-view .topbar-title{display:block!important;min-width:0!important;max-width:none!important;flex:1 1 auto!important}.accounting-view .topbar-title .eyebrow{display:none!important}.accounting-view .topbar-title h1{font-size:20px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html body.accounting-view .top-actions{width:auto!important;gap:8px!important}.accounting-view .top-actions .search,.accounting-view .api-status,.accounting-view .topbar-notification,.accounting-view .topbar-user-avatar,.accounting-view .topbar-user-copy{display:none!important}
  html body.accounting-view #exportButton{height:40px!important;width:42px!important;min-width:42px!important;padding:0!important;font-size:0!important}.accounting-view #exportButton .export-button-icon{width:18px!important;height:18px!important}.accounting-view #exportButton span{display:none!important}
  html body.accounting-view .content{padding:14px 16px 24px!important}.accounting-page-actions{justify-content:flex-start}.accounting-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-upper-grid{gap:12px}.accounting-position-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  html body.accounting-view .content{padding:12px 12px 22px!important}.accounting-page-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.accounting-period-display,.accounting-refresh-btn{width:100%;justify-content:center;min-width:0}.accounting-period-display{font-size:10px;overflow:hidden}.accounting-period-display span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .accounting-kpi-grid{grid-template-columns:1fr;gap:9px}.accounting-kpi{min-height:94px;padding:12px}.accounting-kpi-icon{width:42px;height:42px;min-width:42px}.accounting-kpi strong{font-size:18px}.accounting-kpi span{font-size:11px}.accounting-kpi small{font-size:10px}
  .accounting-date-panel{grid-template-columns:1fr;padding:10px;gap:9px}.accounting-date-title,.accounting-quick-buttons{grid-column:1}.accounting-quick-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.accounting-quick-buttons button{padding:0 7px;width:100%}
  .accounting-panel-title{min-height:58px;padding:9px 11px}.accounting-panel-icon{width:36px;height:36px;min-width:36px}.accounting-panel-icon svg{width:19px;height:19px}.accounting-panel-title h2{font-size:14px}.accounting-panel-title p{font-size:9px}.accounting-unit-select>span{display:none}.accounting-unit-select select{width:88px}
  .accounting-margins{grid-template-columns:1fr;padding:10px 11px 9px}.accounting-table-box{padding:0 10px 9px}.accounting-position-list{grid-template-columns:1fr;padding:9px 10px 10px}.accounting-status-badge{display:none}.accounting-info-note{align-items:flex-start;margin:0 8px 8px;font-size:9px}
}
@media(max-width:480px){
  .accounting-page-actions{grid-template-columns:1fr}.accounting-date-panel{gap:8px}.accounting-quick-buttons{grid-template-columns:1fr}.accounting-panel-heading{gap:8px}.accounting-panel-title p{display:none}.accounting-unit-select select{width:78px}.accounting-kpi strong{font-size:17px}
}


/* ======================================================================
   AJUSTE FINAL SOLICITADO · CONTABILIDAD = ESCALA DE COMPRAS
   Tipografía, densidad, espaciados e iconografía sincronizados con Compras.
   Este bloque es deliberadamente el último de la cascada.
   ====================================================================== */
html body,
html body button,
html body input,
html body select,
html body textarea{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif;
}

/* Sidebar: una sola métrica visual para todos los módulos, incluida la fuente. */
html body .sidebar,
html body .sidebar .nav-group,
html body .sidebar .nav button,
html body .sidebar-footer,
html body .sidebar-footer button{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;
}
html body .sidebar .nav-group{font-size:11px!important;line-height:1!important;font-weight:500!important;padding:13px 8px 6px!important}
html body .sidebar .nav button{min-height:35px!important;padding:8px 12px!important;gap:11px!important;font-size:13px!important;line-height:1.2!important}
html body .sidebar .nav button .nav-icon{width:20px!important;min-width:20px!important;height:20px!important}
html body .sidebar .nav button .nav-icon svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body .sidebar-footer strong{font-size:13px!important;line-height:1.2!important}
html body .sidebar-footer small{font-size:11px!important;line-height:1.2!important}
html body .sidebar-footer .text-btn{font-size:12px!important;line-height:1.2!important}

/* Ícono de búsqueda superior: mismo lenguaje de línea SVG que Compras. */
html body .top-search-icon{width:19px!important;height:19px!important;display:inline-grid!important;place-items:center!important;flex:0 0 19px!important;color:#344256!important;font-size:0!important}
html body .top-search-icon svg{width:19px!important;height:19px!important;display:block!important;stroke-width:1.8!important}

/* Contabilidad conserva su composición, pero usa la misma escala tipográfica de Compras. */
html body.accounting-view,
html body.accounting-view .accounting-page{
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;
  color:#101827!important;
  font-size:16px!important;
}
html body.accounting-view .content{padding:18px 30px 26px!important;background:#fafafa!important}

/* Cabecera de Contabilidad: fuente, controles e iconos con medidas de Compras. */
html body.accounting-view .topbar{min-height:96px!important;height:96px!important;padding:12px 30px!important;gap:24px!important}
html body.accounting-view .topbar-title{min-width:300px!important;max-width:560px!important}
html body.accounting-view .topbar-title .eyebrow{font-family:Inter,Arial,sans-serif!important;font-size:12px!important;line-height:1.2!important;font-weight:600!important;letter-spacing:.02em!important;margin-bottom:5px!important}
html body.accounting-view .topbar-title h1{font-family:Inter,Arial,sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 3px!important}
html body.accounting-view .topbar-title::after{font-family:Inter,Arial,sans-serif!important;font-size:13px!important;line-height:1.4!important;color:#3e4b5d!important;max-width:720px!important}
html body.accounting-view .top-actions{gap:12px!important}
html body.accounting-view .top-actions .search{height:43px!important;width:300px!important;padding:0 12px!important;border-radius:8px!important}
html body.accounting-view .top-actions .search input{font-size:13px!important;line-height:1.2!important;padding:0 9px!important}
html body.accounting-view .search-kbd{font-size:11px!important;padding:4px 7px!important;border-radius:5px!important}
html body.accounting-view .api-status{min-height:34px!important;padding:8px 13px!important;border-radius:22px!important;font-size:12px!important}
html body.accounting-view .topbar-notification{width:40px!important;height:40px!important;border-radius:10px!important}
html body.accounting-view .topbar-notification svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body.accounting-view .topbar-user-avatar{width:42px!important;height:42px!important;font-size:13px!important}
html body.accounting-view .topbar-user-copy{min-width:96px!important}
html body.accounting-view .topbar-user-copy strong{font-size:13px!important;line-height:1.2!important}
html body.accounting-view .topbar-user-copy small{font-size:12px!important;line-height:1.2!important}
html body.accounting-view #exportButton{height:40px!important;padding:0 16px!important;border-radius:9px!important;font-size:13px!important;font-weight:600!important;gap:9px!important;border-color:#ccb890!important}
html body.accounting-view #exportButton .export-button-icon{width:18px!important;height:18px!important;stroke-width:1.8!important}

/* Acciones y período: misma densidad de los botones compactos de Compras. */
.accounting-page-actions{gap:10px!important;margin:0 0 14px!important}
.accounting-period-display,.accounting-refresh-btn{height:40px!important;border-radius:9px!important;padding:0 14px!important;gap:9px!important;font-size:13px!important;line-height:1!important;font-weight:600!important}
.accounting-period-display svg,.accounting-refresh-btn svg{width:18px!important;height:18px!important;stroke-width:1.8!important}

/* KPIs: misma escala de texto/icono de Compras, adaptada a cinco tarjetas. */
.accounting-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:14px!important;margin-bottom:14px!important}
.accounting-kpi{min-height:112px!important;padding:16px 14px!important;gap:14px!important;border-radius:8px!important;align-items:center!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
.accounting-kpi-icon{width:52px!important;height:52px!important;min-width:52px!important;border-radius:10px!important}
.accounting-kpi-icon svg{width:28px!important;height:28px!important;stroke-width:1.8!important}
.accounting-kpi span{font-size:12px!important;line-height:1.2!important;font-weight:600!important;margin:0 0 6px!important}
.accounting-kpi strong{font-family:Inter,Arial,sans-serif!important;font-size:22px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.5px!important}
.accounting-kpi small{font-size:11px!important;line-height:1.25!important;margin-top:5px!important;color:#596579!important}

/* Selector de período: inputs, labels y espacios equivalentes a Compras. */
.accounting-date-panel{min-height:72px!important;padding:12px 14px!important;gap:14px!important;margin-bottom:14px!important;border-radius:9px!important}
.accounting-date-title strong{font-size:13px!important;line-height:1.2!important}
.accounting-date-title span{font-size:11px!important;line-height:1.25!important;margin-top:4px!important}
.accounting-date-panel label>span{font-size:11px!important;line-height:1.2!important;font-weight:600!important;margin-bottom:6px!important}
.accounting-date-input input{height:40px!important;border-radius:8px!important;padding:0 36px 0 11px!important;font-size:13px!important}
.accounting-date-input svg{right:11px!important;top:11px!important;width:18px!important;height:18px!important;stroke-width:1.8!important}
.accounting-quick-buttons{gap:9px!important}
.accounting-quick-buttons button{height:40px!important;border-radius:8px!important;padding:0 16px!important;font-size:12px!important;font-weight:600!important}

/* Paneles: misma respiración, tipografía e iconografía de las tarjetas de Compras. */
.accounting-upper-grid{gap:14px!important;margin-bottom:14px!important}
.accounting-panel{border-radius:9px!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
.accounting-panel-title{min-height:66px!important;padding:11px 14px!important;gap:14px!important}
.accounting-panel-heading{gap:12px!important}
.accounting-panel-icon{width:42px!important;height:42px!important;min-width:42px!important;border-radius:9px!important}
.accounting-panel-icon svg{width:22px!important;height:22px!important;stroke-width:1.8!important}
.accounting-panel-title h2{font-family:Inter,Arial,sans-serif!important;font-size:15px!important;line-height:1.2!important;font-weight:700!important}
.accounting-panel-title p{font-size:12px!important;line-height:1.3!important;margin-top:3px!important;color:#596579!important}
.accounting-unit-select{gap:9px!important;font-size:12px!important}
.accounting-unit-select select{height:36px!important;border-radius:7px!important;padding:0 30px 0 11px!important;font-size:12px!important}

.accounting-margins{gap:12px!important;padding:13px 14px 12px!important}
.accounting-margins article{padding:11px 14px!important;border-radius:8px!important}
.accounting-margins span{font-size:12px!important;line-height:1.2!important}
.accounting-margins strong{font-size:22px!important;line-height:1.1!important;margin:6px 0 9px!important}
.accounting-progress{height:6px!important}

/* Tablas: exactamente la escala tipográfica de la tabla de Compras. */
.accounting-table-box{padding:0 14px 12px!important}
.accounting-statement-table,.accounting-balance-table{font-family:Inter,Arial,sans-serif!important;font-size:12px!important}
.accounting-statement-table th,.accounting-balance-table th{height:40px!important;padding:10px 14px!important;font-size:10px!important;line-height:1.2!important;font-weight:500!important;letter-spacing:0!important;color:#3d4653!important;background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
.accounting-statement-table td{height:43px!important;padding:9px 14px!important;font-size:12px!important;line-height:1.2!important;color:#1f2a3a!important}
.accounting-section-row td{height:auto!important;padding:9px 14px!important;font-size:10px!important;line-height:1.2!important;font-weight:700!important}
.accounting-indent{padding-left:14px!important}

.accounting-position-list{padding:10px 12px 12px!important;gap:8px!important}
.accounting-position-item{min-height:62px!important;gap:11px!important;padding:9px 11px!important;border-radius:8px!important}
.accounting-position-icon{width:40px!important;height:40px!important;min-width:40px!important;border-radius:8px!important}
.accounting-position-icon svg{width:20px!important;height:20px!important;stroke-width:1.8!important}
.accounting-position-item small{font-size:11px!important;line-height:1.2!important}
.accounting-position-item strong{font-size:15px!important;line-height:1.15!important;margin:2px 0!important}
.accounting-position-item span{font-size:11px!important;line-height:1.2!important}
.accounting-status-badge{font-size:11px!important;line-height:1!important;padding:6px 9px!important;border-radius:6px!important}
.accounting-balance-wrap{padding-top:10px!important}
.accounting-balance-table td{height:34px!important;padding:7px 14px!important;font-size:12px!important;line-height:1.2!important;color:#1f2a3a!important}
.accounting-info-note{min-height:39px!important;margin:0 10px 10px!important;padding:8px 11px!important;gap:9px!important;font-size:11px!important;line-height:1.3!important}
.accounting-info-icon{width:18px!important;height:18px!important;min-width:18px!important;font-size:11px!important}

/* Todos los botones Filtros conservan la misma fuente, icono y espacio que Compras. */
html body .products-filter-toggle,
html body .inventory-filter-toggle,
html body .transfer-filter-toggle,
html body .purchase-filter-toggle,
html body .sales-filter-toggle,
html body .cash-filter-toggle,
html body .expense-filter-toggle{
  height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;
  font-family:Inter,Arial,sans-serif!important;font-size:13px!important;line-height:1!important;font-weight:600!important;box-shadow:none!important;
}
html body .products-filter-toggle svg,
html body .inventory-filter-toggle svg,
html body .transfer-filter-toggle svg,
html body .purchase-filter-toggle svg,
html body .sales-filter-toggle svg,
html body .cash-filter-toggle svg,
html body .expense-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}

/* Responsive de Contabilidad siguiendo los mismos saltos de Compras/Inventario. */
@media(max-width:1380px){
  .accounting-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .accounting-kpi{padding:14px 12px!important;gap:11px!important}
  .accounting-kpi-icon{width:46px!important;height:46px!important;min-width:46px!important}
  .accounting-kpi-icon svg{width:25px!important;height:25px!important}
  .accounting-kpi strong{font-size:20px!important}
  html body.accounting-view .topbar-title{min-width:270px!important}
  html body.accounting-view .top-actions .search{width:260px!important;max-width:25vw!important}
}
@media(max-width:1200px){
  html body.accounting-view .topbar{min-height:82px!important;height:82px!important;padding:9px 24px!important;gap:14px!important}
  html body.accounting-view .topbar-title h1{font-size:24px!important}
  html body.accounting-view .topbar-title .eyebrow{font-size:11px!important}
  html body.accounting-view .topbar-title::after{display:none!important}
  html body.accounting-view .content{padding:18px 24px 24px!important}
  .accounting-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .accounting-upper-grid{grid-template-columns:1fr!important}
  .accounting-position-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .accounting-date-panel{grid-template-columns:1fr 1fr!important}
  .accounting-date-title,.accounting-quick-buttons{grid-column:1/-1!important}
}
@media(max-width:1024px){
  html body.accounting-view .topbar{min-height:74px!important;height:74px!important;padding:0 16px!important;gap:10px!important}
  html body.accounting-view .topbar-title{min-width:0!important;max-width:none!important;flex:1 1 auto!important}
  html body.accounting-view .topbar-title .eyebrow{display:none!important}
  html body.accounting-view .topbar-title h1{font-size:20px!important;margin:0!important}
  html body.accounting-view .top-actions{gap:8px!important}
  html body.accounting-view .top-actions .search,
  html body.accounting-view .api-status,
  html body.accounting-view .topbar-notification,
  html body.accounting-view .topbar-user-avatar,
  html body.accounting-view .topbar-user-copy{display:none!important}
  html body.accounting-view #exportButton{height:40px!important;width:42px!important;min-width:42px!important;padding:0!important;font-size:0!important}
  html body.accounting-view #exportButton span{display:none!important}
  html body.accounting-view .content{padding:18px 16px 24px!important}
  .accounting-page-actions{justify-content:flex-start!important}
  .accounting-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .accounting-position-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
  html body.accounting-view .content{padding:18px 14px 24px!important}
  .accounting-page-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important}
  .accounting-period-display,.accounting-refresh-btn{width:100%!important;justify-content:center!important;min-width:0!important}
  .accounting-kpi-grid{grid-template-columns:1fr!important;gap:10px!important}
  .accounting-kpi{min-height:100px!important;padding:15px!important;gap:13px!important}
  .accounting-kpi-icon{width:50px!important;height:50px!important;min-width:50px!important}
  .accounting-kpi-icon svg{width:27px!important;height:27px!important}
  .accounting-kpi span{font-size:12px!important}.accounting-kpi strong{font-size:23px!important}.accounting-kpi small{font-size:11px!important}
  .accounting-date-panel{grid-template-columns:1fr!important;padding:12px!important;gap:10px!important}
  .accounting-date-title,.accounting-quick-buttons{grid-column:1!important}
  .accounting-quick-buttons{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important}
  .accounting-quick-buttons button{width:100%!important;padding:0 8px!important}
  .accounting-panel-title{min-height:62px!important;padding:10px 12px!important}
  .accounting-panel-title h2{font-size:14px!important}.accounting-panel-title p{font-size:11px!important}
  .accounting-margins{grid-template-columns:1fr!important;padding:11px 12px 10px!important}
  .accounting-table-box{padding:0 10px 10px!important}
  .accounting-position-list{grid-template-columns:1fr!important;padding:10px!important}
  .accounting-status-badge{display:none!important}
  .accounting-info-note{align-items:flex-start!important;font-size:10px!important}
}
@media(max-width:480px){
  .accounting-page-actions{grid-template-columns:1fr!important}
  .accounting-quick-buttons{grid-template-columns:1fr!important}
  .accounting-panel-title p{display:none!important}
  .accounting-unit-select>span{display:none!important}
  .accounting-unit-select select{width:86px!important}
}

/* ======================================================================
   FINAL OVERRIDE · CONTABILIDAD CALCADA CON LAS MISMAS MÉTRICAS DE COMPRAS
   Sin Actualizar, sin Excel visible y sin alerta. 2026-09-21
   ====================================================================== */
html body.accounting-view .topbar .topbar-title,
html body.accounting-view #themeBtn,
html body.accounting-view #exportButton,
html body.accounting-view #quickAction,
html body.accounting-view .topbar-notification,
html body.accounting-view .notification,
html body.accounting-view .accounting-refresh-btn{
  display:none!important;
}

/* Cabecera superior = Compras: sólo búsqueda, conexión y usuario. */
html body.accounting-view .topbar{
  height:74px!important;
  min-height:74px!important;
  padding:0 30px!important;
  gap:20px!important;
  background:#fff!important;
  border-bottom:1px solid #ddd8d0!important;
}
html body.accounting-view .top-actions{
  width:100%!important;
  margin-left:0!important;
  gap:16px!important;
  justify-content:flex-end!important;
}
html body.accounting-view .top-actions .search{
  margin-right:auto!important;
  width:min(710px,58vw)!important;
  max-width:min(710px,58vw)!important;
  height:43px!important;
  padding:0 12px!important;
  border:1px solid #d7d9dd!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.02)!important;
}
html body.accounting-view .top-actions .search input{font-size:13px!important;padding:0 10px!important}
html body.accounting-view .search-kbd{font-size:12px!important;padding:4px 7px!important;border-radius:5px!important}
html body.accounting-view .api-status{min-height:auto!important;padding:9px 14px!important;border-radius:22px!important;font-size:12px!important}
html body.accounting-view .topbar-user-avatar{width:42px!important;height:42px!important;font-size:13px!important}
html body.accounting-view .topbar-user-copy{min-width:96px!important}
html body.accounting-view .topbar-user-copy strong{font-size:13px!important;line-height:1.2!important}
html body.accounting-view .topbar-user-copy small{font-size:12px!important;line-height:1.2!important}

/* Contenido y encabezado interno reutilizan exactamente las clases de Compras. */
html body.accounting-view .content{padding:22px 30px 26px!important;background:#fafafa!important}
html body.accounting-view .accounting-page{font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important}
html body.accounting-view .accounting-breadcrumbs{margin:0 0 12px 85px!important;font-size:12px!important;color:#586273!important}
html body.accounting-view .accounting-page-heading{gap:25px!important;margin-bottom:18px!important}
html body.accounting-view .accounting-page-heading .purchase-title-group{gap:18px!important}
html body.accounting-view .accounting-title-icon{width:64px!important;height:60px!important;border-radius:12px!important;background:#f4ecdd!important;color:#111!important}
html body.accounting-view .accounting-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
html body.accounting-view .accounting-page-heading h1{font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
html body.accounting-view .accounting-page-heading p{font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}

/* KPIs: misma densidad, fuente e iconografía de las tarjetas de Compras. */
html body.accounting-view .accounting-kpi-grid{gap:14px!important;margin-bottom:18px!important}
html body.accounting-view .accounting-kpi{
  min-height:118px!important;
  padding:18px!important;
  gap:20px!important;
  border-radius:8px!important;
  align-items:center!important;
  box-shadow:0 1px 3px rgba(15,23,42,.06)!important;
}
html body.accounting-view .accounting-kpi-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:10px!important}
html body.accounting-view .accounting-kpi-icon svg{width:28px!important;height:28px!important;stroke-width:1.8!important}
html body.accounting-view .accounting-kpi span{font-size:13px!important;line-height:1.2!important;font-weight:500!important;margin:0 0 6px!important}
html body.accounting-view .accounting-kpi strong{font-size:27px!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.5px!important}
html body.accounting-view .accounting-kpi small{font-size:13px!important;line-height:1.2!important;margin-top:3px!important}

/* Selector de periodo y paneles con la misma escala de controles de Compras. */
html body.accounting-view .accounting-date-panel{min-height:72px!important;padding:13px!important;gap:12px!important;margin-bottom:18px!important;border-radius:9px!important}
html body.accounting-view .accounting-date-title strong{font-size:13px!important;line-height:1.2!important}
html body.accounting-view .accounting-date-title span{font-size:12px!important;line-height:1.2!important;margin-top:3px!important}
html body.accounting-view .accounting-date-panel label>span{font-size:12px!important;line-height:1.2!important;margin-bottom:6px!important}
html body.accounting-view .accounting-date-input input{height:40px!important;border-radius:8px!important;padding:0 36px 0 12px!important;font-size:13px!important}
html body.accounting-view .accounting-date-input svg{width:18px!important;height:18px!important;right:11px!important;top:11px!important;stroke-width:1.8!important}
html body.accounting-view .accounting-quick-buttons{gap:9px!important}
html body.accounting-view .accounting-quick-buttons button{height:40px!important;border-radius:8px!important;padding:0 16px!important;font-size:12px!important;font-weight:600!important}

html body.accounting-view .accounting-upper-grid{gap:14px!important;margin-bottom:14px!important}
html body.accounting-view .accounting-panel{border-radius:9px!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
html body.accounting-view .accounting-panel-title{min-height:66px!important;padding:11px 14px!important;gap:14px!important}
html body.accounting-view .accounting-panel-heading{gap:12px!important}
html body.accounting-view .accounting-panel-icon{width:42px!important;height:42px!important;min-width:42px!important;border-radius:9px!important}
html body.accounting-view .accounting-panel-icon svg{width:22px!important;height:22px!important;stroke-width:1.8!important}
html body.accounting-view .accounting-panel-title h2{font-size:15px!important;line-height:1.2!important;font-weight:700!important}
html body.accounting-view .accounting-panel-title p{font-size:12px!important;line-height:1.3!important;margin-top:3px!important}
html body.accounting-view .accounting-unit-select{font-size:12px!important;gap:9px!important}
html body.accounting-view .accounting-unit-select select{height:36px!important;border-radius:7px!important;font-size:12px!important}

html body.accounting-view .accounting-margins{gap:12px!important;padding:13px 14px 12px!important}
html body.accounting-view .accounting-margins article{padding:11px 14px!important;border-radius:8px!important}
html body.accounting-view .accounting-margins span{font-size:12px!important}
html body.accounting-view .accounting-margins strong{font-size:22px!important;margin:6px 0 9px!important}
html body.accounting-view .accounting-table-box{padding:0 14px 12px!important}
html body.accounting-view .accounting-statement-table,
html body.accounting-view .accounting-balance-table{font-family:Inter,Arial,sans-serif!important;font-size:12px!important}
html body.accounting-view .accounting-statement-table th,
html body.accounting-view .accounting-balance-table th{height:40px!important;padding:10px 14px!important;font-size:10px!important;line-height:1.2!important;font-weight:500!important}
html body.accounting-view .accounting-statement-table td{height:43px!important;padding:9px 14px!important;font-size:12px!important;line-height:1.2!important}
html body.accounting-view .accounting-section-row td{padding:9px 14px!important;font-size:10px!important}
html body.accounting-view .accounting-balance-table td{height:34px!important;padding:7px 14px!important;font-size:12px!important;line-height:1.2!important}
html body.accounting-view .accounting-position-item{min-height:62px!important;gap:11px!important;padding:9px 11px!important;border-radius:8px!important}
html body.accounting-view .accounting-position-icon{width:40px!important;height:40px!important;min-width:40px!important;border-radius:8px!important}
html body.accounting-view .accounting-position-icon svg{width:20px!important;height:20px!important;stroke-width:1.8!important}
html body.accounting-view .accounting-position-item small{font-size:11px!important}
html body.accounting-view .accounting-position-item strong{font-size:15px!important}
html body.accounting-view .accounting-position-item span{font-size:11px!important}

/* Tablet / móvil: mismos quiebres y comportamiento de Compras. */
@media(max-width:1200px){
  html body.accounting-view .accounting-breadcrumbs{margin-left:0!important}
  html body.accounting-view .accounting-page-heading{flex-direction:column!important}
  html body.accounting-view .accounting-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.accounting-view .accounting-upper-grid{grid-template-columns:1fr!important}
  html body.accounting-view .topbar-user-copy{display:none!important}
  html body.accounting-view .top-actions .search{width:min(650px,64vw)!important;max-width:min(650px,64vw)!important}
}
@media(max-width:1024px){
  html body.accounting-view .topbar{padding:0 16px!important}
  html body.accounting-view .topbar-user-avatar,
  html body.accounting-view .topbar-user-menu{display:none!important}
  html body.accounting-view .search-kbd{display:none!important}
  html body.accounting-view .accounting-kpi-grid{grid-template-columns:1fr!important}
  html body.accounting-view .accounting-page-heading h1{font-size:24px!important}
  html body.accounting-view .accounting-title-icon{width:52px!important;height:52px!important}
  html body.accounting-view .accounting-date-panel{grid-template-columns:1fr 1fr!important}
  html body.accounting-view .accounting-date-title{grid-column:1/-1!important}
  html body.accounting-view .accounting-quick-buttons{grid-column:1/-1!important}
}
@media(max-width:720px){
  html body.accounting-view .content{padding:18px 14px 24px!important}
  html body.accounting-view .top-actions{gap:8px!important}
  html body.accounting-view .api-status{display:none!important}
  html body.accounting-view .top-actions .search{width:100%!important;max-width:none!important}
  html body.accounting-view .accounting-page-heading p{font-size:13px!important}
  html body.accounting-view .accounting-date-panel{grid-template-columns:1fr!important}
  html body.accounting-view .accounting-date-title,
  html body.accounting-view .accounting-quick-buttons{grid-column:auto!important}
  html body.accounting-view .accounting-quick-buttons{display:grid!important;grid-template-columns:repeat(3,1fr)!important}
  html body.accounting-view .accounting-margins{grid-template-columns:1fr!important}
}
@media(max-width:480px){
  html body.accounting-view .accounting-title-icon{width:48px!important;height:48px!important}
  html body.accounting-view .accounting-title-icon svg{width:24px!important;height:24px!important}
  html body.accounting-view .accounting-page-heading h1{font-size:22px!important}
  html body.accounting-view .accounting-quick-buttons{grid-template-columns:1fr!important}
}

/* === AJUSTE FINAL CONTABILIDAD V3: alineación de cabecera + legibilidad de paneles === */
html body.accounting-view .accounting-page-heading .purchase-title-group{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:18px!important;
  width:100%!important;
}
html body.accounting-view .accounting-title-icon{
  flex:0 0 64px!important;
  align-self:center!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
}
html body.accounting-view .accounting-title-icon svg{
  display:block!important;
  margin:0!important;
  transform:none!important;
}
html body.accounting-view .accounting-page-heading .purchase-title-group>div:last-child{
  min-width:0!important;
  align-self:center!important;
}

/* accounting-upper-grid: aumentar lectura sin alterar la lógica ni la composición. */
html body.accounting-view .accounting-upper-grid{
  gap:16px!important;
  margin-bottom:16px!important;
}
html body.accounting-view .accounting-panel-title{
  min-height:70px!important;
  padding:12px 15px!important;
}
html body.accounting-view .accounting-panel-title h2{
  font-size:16px!important;
  line-height:1.25!important;
}
html body.accounting-view .accounting-panel-title p{
  font-size:13px!important;
  line-height:1.35!important;
  margin-top:3px!important;
}
html body.accounting-view .accounting-panel-icon{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
}
html body.accounting-view .accounting-panel-icon svg{
  width:23px!important;
  height:23px!important;
}
html body.accounting-view .accounting-unit-select,
html body.accounting-view .accounting-unit-select select{
  font-size:13px!important;
}
html body.accounting-view .accounting-margins{
  gap:14px!important;
  padding:14px 15px 13px!important;
}
html body.accounting-view .accounting-margins article{
  padding:12px 15px!important;
}
html body.accounting-view .accounting-margins span{
  font-size:13px!important;
  line-height:1.25!important;
}
html body.accounting-view .accounting-margins strong{
  font-size:24px!important;
  line-height:1.12!important;
  margin:6px 0 10px!important;
}
html body.accounting-view .accounting-table-box{
  padding:0 15px 14px!important;
}
html body.accounting-view .accounting-statement-table th,
html body.accounting-view .accounting-balance-table th{
  height:41px!important;
  padding:11px 14px!important;
  font-size:11px!important;
  line-height:1.2!important;
}
html body.accounting-view .accounting-statement-table td{
  height:45px!important;
  padding:10px 14px!important;
  font-size:13px!important;
  line-height:1.25!important;
}
html body.accounting-view .accounting-section-row td{
  padding:10px 14px!important;
  font-size:11px!important;
  line-height:1.2!important;
}

/* Posición financiera: mismo aumento de legibilidad del panel principal. */
html body.accounting-view .accounting-position-list{
  padding:11px 12px 13px!important;
  gap:9px!important;
}
html body.accounting-view .accounting-position-item{
  min-height:66px!important;
  gap:12px!important;
  padding:10px 12px!important;
}
html body.accounting-view .accounting-position-icon{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
}
html body.accounting-view .accounting-position-icon svg{
  width:21px!important;
  height:21px!important;
}
html body.accounting-view .accounting-position-item small{
  font-size:12px!important;
  line-height:1.2!important;
}
html body.accounting-view .accounting-position-item strong{
  font-size:16px!important;
  line-height:1.18!important;
  margin:2px 0!important;
}
html body.accounting-view .accounting-position-item span{
  font-size:12px!important;
  line-height:1.2!important;
}

/* accounting-balance-panel: texto y filas más legibles. */
html body.accounting-view .accounting-balance-panel .accounting-panel-title{
  min-height:70px!important;
}
html body.accounting-view .accounting-balance-wrap{
  padding-top:11px!important;
}
html body.accounting-view .accounting-balance-table td{
  height:39px!important;
  padding:9px 14px!important;
  font-size:13px!important;
  line-height:1.25!important;
}
html body.accounting-view .accounting-status-badge{
  font-size:12px!important;
  padding:7px 10px!important;
}
html body.accounting-view .accounting-info-note{
  min-height:42px!important;
  padding:9px 12px!important;
  font-size:12px!important;
  line-height:1.35!important;
}

@media(max-width:1024px){
  html body.accounting-view .accounting-page-heading .purchase-title-group{
    display:flex!important;
    align-items:center!important;
    gap:14px!important;
  }
  html body.accounting-view .accounting-title-icon{flex-basis:52px!important}
  html body.accounting-view .accounting-panel-title h2{font-size:15px!important}
  html body.accounting-view .accounting-panel-title p{font-size:12px!important}
  html body.accounting-view .accounting-statement-table td,
  html body.accounting-view .accounting-balance-table td{font-size:12px!important}
}
@media(max-width:720px){
  html body.accounting-view .accounting-page-heading .purchase-title-group{
    align-items:flex-start!important;
    gap:12px!important;
  }
  html body.accounting-view .accounting-panel-title{min-height:64px!important;padding:10px 12px!important}
  html body.accounting-view .accounting-panel-icon{width:40px!important;height:40px!important;min-width:40px!important}
  html body.accounting-view .accounting-panel-title h2{font-size:15px!important}
  html body.accounting-view .accounting-panel-title p{font-size:12px!important}
  html body.accounting-view .accounting-position-item strong{font-size:15px!important}
}
@media(max-width:480px){
  html body.accounting-view .accounting-title-icon{flex-basis:48px!important}
  html body.accounting-view .accounting-page-heading .purchase-title-group{gap:11px!important}
}

/* ======================================================================
   CLIENTES Y PROVEEDORES · visual unificado con Compras / Inventario
   Mantiene la lógica de API y formularios existente; sólo normaliza UI.
   ====================================================================== */
html body.thirdparty-view{background:#fafafa!important;color:#101827!important}
html body.thirdparty-view .content{width:100%!important;max-width:none!important;margin:0!important;padding:22px 30px 26px!important;background:#fafafa!important}
html body.thirdparty-view .thirdparty-page{min-width:0!important;font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;font-size:16px!important;color:#101827!important}

/* Topbar igual a Compras: el título vive dentro del módulo. */
html body.thirdparty-view .topbar{height:74px!important;min-height:74px!important;padding:0 30px!important;background:#fff!important;border-bottom:1px solid #ddd8d0!important;display:flex!important;align-items:center!important}
html body.thirdparty-view .topbar .topbar-title{display:none!important}
html body.thirdparty-view .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;flex-wrap:nowrap!important}
html body.thirdparty-view .top-actions .search{order:-10!important;width:710px!important;max-width:min(710px,58vw)!important;height:43px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important}
html body.thirdparty-view .top-actions .search input{width:100%!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;color:#111!important}
html body.thirdparty-view .top-actions .search-kbd{display:inline-block!important;border:1px solid #d3d6dc!important;border-radius:5px!important;padding:4px 7px!important;font-size:11px!important;color:#4b5563!important;background:#fff!important;white-space:nowrap!important}
html body.thirdparty-view .topbar-user-avatar{display:grid!important;width:42px!important;height:42px!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:13px!important;place-items:center!important}
html body.thirdparty-view .topbar-user-copy{display:flex!important;flex-direction:column!important;min-width:96px!important}
html body.thirdparty-view .topbar-user-copy strong{font-size:13px!important;color:#111!important;line-height:1.2!important}
html body.thirdparty-view .topbar-user-copy small{font-size:12px!important;color:#596579!important;line-height:1.2!important}
html body.thirdparty-view .topbar-user-menu{display:grid!important}
html body.thirdparty-view .api-status{margin-left:auto!important;min-height:34px!important;padding:8px 13px!important;border:1px solid #d8dbdf!important;border-radius:22px!important;background:#fff!important;color:#222!important;font-size:12px!important;white-space:nowrap!important}
html body.thirdparty-view #themeBtn,
html body.thirdparty-view #exportButton,
html body.thirdparty-view #quickAction{display:none!important}

/* Encabezado principal. */
.thirdparty-page-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:25px!important;margin-bottom:26px!important}
.thirdparty-eyebrow{font-family:Inter,Arial,sans-serif!important;font-size:11px!important;line-height:1!important;font-weight:600!important;letter-spacing:.01em!important;color:#475467!important;margin:0 0 8px!important}
html body.thirdparty-view .thirdparty-breadcrumbs{font-size:12px!important;color:#586273!important;margin:0 0 12px 85px!important}
html body.thirdparty-view .thirdparty-breadcrumbs span{margin:0 4px!important;color:#989fa9!important}
html body.thirdparty-view .thirdparty-breadcrumbs strong{font-weight:600!important;color:#465166!important}
.thirdparty-title-group{display:flex!important;gap:18px!important;align-items:center!important}
.thirdparty-title-icon{width:64px!important;height:60px!important;min-width:64px!important;border-radius:12px!important;background:#f4ecdd!important;display:grid!important;place-items:center!important;color:#111!important}
.thirdparty-title-icon svg{width:29px!important;height:29px!important;stroke-width:1.8!important}
.thirdparty-page-heading h1{font-family:Inter,Arial,sans-serif!important;font-size:29px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.7px!important;margin:0 0 2px!important;color:#101827!important}
.thirdparty-page-heading p{font-family:Inter,Arial,sans-serif!important;font-size:15px!important;line-height:1.45!important;margin:0!important;color:#3e4b5d!important}
.thirdparty-heading-actions{display:flex!important;gap:10px!important;align-self:center!important;flex:none!important}

/* Los botones usan las mismas métricas e iconografía de Compras. */
html body.thirdparty-view .purchase-btn{height:46px!important;border-radius:9px!important;padding:0 19px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;line-height:1!important;white-space:nowrap!important;border:1px solid transparent!important;background:#fff!important;color:#111!important;box-shadow:none!important}
html body.thirdparty-view .purchase-btn svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
html body.thirdparty-view .purchase-btn.secondary{border-color:#ccb890!important;background:#fff!important;color:#111!important}
html body.thirdparty-view .purchase-btn.primary{background:linear-gradient(#a77b31,#95691f)!important;border-color:#95691f!important;color:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
html body.thirdparty-view .purchase-btn.compact{height:40px!important;padding:0 18px!important}

/* Pestañas y acciones secundarias. */
.thirdparty-tabs-actions{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin:0 0 16px!important}
.thirdparty-tabs{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
.thirdparty-tabs button{height:42px!important;min-width:118px!important;padding:0 20px!important;border:1px solid #d4d8df!important;border-radius:8px!important;background:#fff!important;color:#172033!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:500!important;cursor:pointer!important;box-shadow:none!important}
.thirdparty-tabs button.active{background:linear-gradient(#9b7132,#876028)!important;border-color:#876028!important;color:#fff!important;font-weight:600!important}
.thirdparty-secondary-actions{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;justify-content:flex-end!important}

/* Tarjeta y filtros. */
.thirdparty-table-card{border:1px solid #ddd8d0!important;border-radius:9px!important;background:#fff!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important;overflow:hidden!important}
.thirdparty-filter-toolbar{min-height:72px!important;padding:13px!important;display:flex!important;align-items:center!important;gap:12px!important;border-bottom:1px solid #ece8e1!important;flex-wrap:nowrap!important;background:#fff!important}
.thirdparty-search{width:560px!important;max-width:54%!important;height:42px!important;padding:0 12px!important;border:1px solid #d7d9dd!important;border-radius:8px!important;background:#fff!important;display:flex!important;align-items:center!important;gap:0!important}
.thirdparty-search svg{width:19px!important;height:19px!important;min-width:19px!important;color:#344256!important}
.thirdparty-search input{width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 10px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;color:#172033!important}
.thirdparty-results-count{font-size:12px!important;color:#596579!important;white-space:nowrap!important}
.thirdparty-filter-toggle,
.thirdparty-filter-toggle:hover,
.thirdparty-filter-toggle.active,
.thirdparty-filter-toggle[aria-expanded="true"]{height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;font-weight:600!important;box-shadow:none!important}
.thirdparty-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
.thirdparty-filter-panel{padding:12px 13px!important;border-bottom:1px solid #ece8e1!important;background:#fcfbf8!important;display:grid!important;grid-template-columns:minmax(180px,240px) minmax(180px,240px) auto!important;gap:10px!important;align-items:center!important}
.thirdparty-filter-panel .purchase-filter-select{height:40px!important;position:relative!important;display:flex!important;align-items:center!important;border:1px solid #d7dadd!important;border-radius:8px!important;background:#fff!important;padding:0 12px!important;min-width:0!important}
.thirdparty-filter-panel .purchase-filter-select select{appearance:none!important;-webkit-appearance:none!important;width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 27px 0 0!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;color:#172033!important;cursor:pointer!important}
.thirdparty-filter-panel .purchase-filter-select svg{position:absolute!important;right:10px!important;width:16px!important;height:16px!important;pointer-events:none!important;color:#475467!important}
.thirdparty-filter-panel .purchase-clear{height:40px!important;width:auto!important}

/* Tabla. */
.thirdparty-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
.thirdparty-data-table{width:100%!important;border-collapse:collapse!important;min-width:1120px!important;font-family:Inter,Arial,sans-serif!important;background:#fff!important}
.thirdparty-data-table thead{background:linear-gradient(90deg,#f4ead8,#f0e3cc)!important}
.thirdparty-data-table th{height:48px!important;padding:0 16px!important;border-bottom:1px solid #ddd8d0!important;background:transparent!important;color:#273244!important;font-family:Inter,Arial,sans-serif!important;font-size:10px!important;line-height:1.15!important;font-weight:600!important;letter-spacing:.01em!important;text-align:left!important;white-space:nowrap!important}
.thirdparty-data-table th span{font-size:11px!important;margin-left:6px!important;color:#344054!important}
.thirdparty-data-table td{height:57px!important;padding:8px 16px!important;border-bottom:1px solid #e8e5df!important;background:#fff!important;color:#1f2a3a!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;line-height:1.25!important;vertical-align:middle!important}
.thirdparty-data-table tbody tr:hover td{background:#fcfbf8!important}
.thirdparty-doc{font-weight:500!important;white-space:nowrap!important}
.thirdparty-name strong{font-size:13px!important;font-weight:600!important;color:#172033!important}
.thirdparty-type-pill{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:32px!important;padding:0 12px!important;border-radius:7px!important;font-size:12px!important;font-weight:500!important;white-space:nowrap!important}
.thirdparty-type-pill.client{background:#d9f2e5!important;color:#16704d!important}
.thirdparty-type-pill.supplier{background:#e9defc!important;color:#5b33bb!important}
.thirdparty-type-pill.both{background:#d9eaff!important;color:#2059a8!important}
.thirdparty-status{display:inline-flex!important;align-items:center!important;gap:8px!important;font-size:12px!important;color:#172033!important;white-space:nowrap!important}
.thirdparty-status i{width:9px!important;height:9px!important;border-radius:50%!important;background:#0ca24f!important;display:block!important;flex:none!important}
.thirdparty-status.inactive i{background:#9ca3af!important}
.thirdparty-actions-cell{white-space:nowrap!important;min-width:238px!important}
.thirdparty-action-buttons{display:flex!important;align-items:center!important;gap:8px!important}
.thirdparty-action-btn{height:36px!important;min-width:72px!important;padding:0 12px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;font-weight:600!important;cursor:pointer!important}
.thirdparty-action-btn svg{width:15px!important;height:15px!important;stroke-width:1.8!important}
.thirdparty-action-btn.more{min-width:44px!important;width:44px!important;padding:0!important}
.thirdparty-empty{height:100px!important;text-align:center!important;color:#667085!important}

/* Footer y paginación. */
.thirdparty-table-footer{min-height:66px!important;padding:12px 16px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;color:#465165!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;background:#fff!important}
.thirdparty-pagination-area{display:flex!important;align-items:center!important;gap:12px!important}
.thirdparty-pagination{display:flex!important;align-items:center!important;gap:7px!important}
.thirdparty-pagination button{width:36px!important;height:36px!important;border:1px solid #d7dadd!important;border-radius:6px!important;background:#fff!important;color:#172033!important;display:grid!important;place-items:center!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;cursor:pointer!important}
.thirdparty-pagination button svg{width:15px!important;height:15px!important}
.thirdparty-pagination button:disabled{opacity:.4!important;cursor:default!important}
.thirdparty-pagination button.active{background:#9a712f!important;color:#fff!important;border-color:#9a712f!important}
.thirdparty-page-dots{width:24px!important;text-align:center!important;color:#596579!important}
.thirdparty-per-page{width:145px!important;height:36px!important;border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;position:relative!important;display:flex!important;align-items:center!important;padding:0 10px!important}
.thirdparty-per-page select{appearance:none!important;-webkit-appearance:none!important;width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;padding:0 22px 0 0!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;color:#172033!important}
.thirdparty-per-page svg{position:absolute!important;right:8px!important;width:15px!important;height:15px!important;pointer-events:none!important}

/* Resumen inferior. */
.thirdparty-bottom-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(300px,1.35fr)!important;gap:14px!important;margin-top:18px!important}
.thirdparty-stat-card{min-height:138px!important;border:1px solid #ddd8d0!important;border-radius:8px!important;background:#fff!important;padding:15px!important;display:flex!important;align-items:flex-start!important;gap:16px!important;box-shadow:0 1px 3px rgba(15,23,42,.04)!important}
.thirdparty-stat-icon{width:56px!important;height:56px!important;min-width:56px!important;border-radius:11px!important;display:grid!important;place-items:center!important}
.thirdparty-stat-icon svg{width:29px!important;height:29px!important;stroke-width:1.9!important}
.thirdparty-stat-card.green .thirdparty-stat-icon{background:#dff4e7!important;color:#079449!important}
.thirdparty-stat-card.purple .thirdparty-stat-icon{background:#e9defc!important;color:#5b23d7!important}
.thirdparty-stat-card.brown .thirdparty-stat-icon{background:#f3e6d5!important;color:#6d4319!important}
.thirdparty-stat-card>div:last-child{display:flex!important;flex-direction:column!important;min-width:0!important}
.thirdparty-stat-card span{font-size:12px!important;color:#344054!important;margin:3px 0 8px!important}
.thirdparty-stat-card strong{font-family:Inter,Arial,sans-serif!important;font-size:27px!important;line-height:1!important;color:#101827!important;margin-bottom:9px!important}
.thirdparty-stat-card small{font-size:12px!important;color:#596579!important;line-height:1.25!important}
.thirdparty-info-card{min-height:138px!important;border:1px solid #d7e8fb!important;border-radius:8px!important;background:#eaf4ff!important;padding:23px 20px!important;display:flex!important;gap:14px!important;align-items:flex-start!important;color:#0752b4!important}
.thirdparty-info-icon{width:30px!important;height:30px!important;min-width:30px!important;border-radius:50%!important;background:#0c61c9!important;color:#fff!important;display:grid!important;place-items:center!important;font-size:17px!important;font-weight:700!important}
.thirdparty-info-card strong{font-size:14px!important;color:#0752b4!important}
.thirdparty-info-card p{margin:8px 0 0!important;font-size:12px!important;line-height:1.45!important;color:#0752b4!important}
.thirdparty-detail-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
.thirdparty-detail-grid>div{border:1px solid #e1e4e8!important;border-radius:8px!important;padding:12px!important;background:#fbfbfa!important;display:flex!important;flex-direction:column!important;gap:5px!important}
.thirdparty-detail-grid .wide{grid-column:1/-1!important}
.thirdparty-detail-grid span{font-size:11px!important;color:#667085!important}
.thirdparty-detail-grid strong{font-size:13px!important;color:#172033!important}

/* Responsive desktop pequeño / tablet. */
@media(max-width:1320px){
  .thirdparty-tabs-actions{align-items:flex-start!important;flex-direction:column!important}
  .thirdparty-secondary-actions{justify-content:flex-start!important}
  .thirdparty-bottom-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .thirdparty-info-card{grid-column:1/-1!important}
}
@media(max-width:1200px){
  .thirdparty-page-heading{flex-direction:column!important}
  .thirdparty-heading-actions{align-self:flex-start!important}
  html body.thirdparty-view .thirdparty-breadcrumbs{margin-left:0!important}
  html body.thirdparty-view .topbar-user-copy{display:none!important}
  html body.thirdparty-view .top-actions .search{width:min(650px,64vw)!important;max-width:64vw!important}
}
@media(max-width:1024px){
  html body.thirdparty-view .topbar{height:74px!important;min-height:74px!important;padding:0 16px!important;gap:10px!important}
  html body.thirdparty-view .top-actions{min-width:0!important;flex:1!important}
  html body.thirdparty-view .top-actions .search{width:100%!important;max-width:none!important;min-width:0!important}
  html body.thirdparty-view .api-status,
  html body.thirdparty-view .topbar-user-avatar,
  html body.thirdparty-view .topbar-user-copy,
  html body.thirdparty-view .topbar-user-menu{display:none!important}
  html body.thirdparty-view .search-kbd{display:none!important}
  html body.thirdparty-view .content{padding:18px 16px 24px!important}
  .thirdparty-title-icon{width:52px!important;height:52px!important;min-width:52px!important}
  .thirdparty-page-heading h1{font-size:24px!important}
  .thirdparty-heading-actions{width:100%!important}
  .thirdparty-heading-actions .purchase-btn{flex:1!important;min-width:0!important}
  .thirdparty-tabs{width:100%!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .thirdparty-tabs button{min-width:0!important;width:100%!important;padding:0 10px!important}
  .thirdparty-secondary-actions{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .thirdparty-secondary-actions .purchase-btn{width:100%!important;padding:0 11px!important}
  .thirdparty-filter-toolbar{display:grid!important;grid-template-columns:1fr auto!important;gap:10px!important}
  .thirdparty-search{grid-column:1/-1!important;width:100%!important;max-width:none!important}
  .thirdparty-filter-toggle{width:auto!important}
  .thirdparty-results-count{text-align:right!important;align-self:center!important}
  .thirdparty-filter-panel{grid-template-columns:1fr 1fr!important}
  .thirdparty-filter-panel .purchase-clear{grid-column:1/-1!important;width:100%!important}
  .thirdparty-table-footer{align-items:flex-start!important;flex-direction:column!important}
  .thirdparty-pagination-area{width:100%!important;justify-content:space-between!important}
}
@media(max-width:720px){
  html body.thirdparty-view .content{padding:15px 12px 22px!important}
  .thirdparty-title-group{align-items:flex-start!important;gap:12px!important}
  .thirdparty-title-icon{display:none!important}
  .thirdparty-page-heading{gap:14px!important;margin-bottom:18px!important}
  .thirdparty-page-heading h1{font-size:24px!important}
  .thirdparty-page-heading p{font-size:13px!important}
  .thirdparty-heading-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .thirdparty-heading-actions .purchase-btn{height:42px!important;padding:0 10px!important;font-size:12px!important}
  .thirdparty-tabs{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .thirdparty-tabs button{height:40px!important;font-size:12px!important}
  .thirdparty-secondary-actions{grid-template-columns:1fr 1fr!important}
  .thirdparty-secondary-actions .purchase-btn:last-child{grid-column:1/-1!important}
  .thirdparty-filter-toolbar{padding:10px!important;grid-template-columns:1fr 1fr!important}
  .thirdparty-search{height:40px!important}
  .thirdparty-filter-toggle{width:auto!important;justify-self:start!important}
  .thirdparty-results-count{text-align:right!important}
  .thirdparty-filter-panel{grid-template-columns:1fr!important;padding:10px!important}
  .thirdparty-filter-panel .purchase-clear{grid-column:1!important}
  .thirdparty-data-table{min-width:1000px!important}
  .thirdparty-data-table th{padding:0 12px!important}
  .thirdparty-data-table td{padding:8px 12px!important}
  .thirdparty-bottom-grid{grid-template-columns:1fr!important}
  .thirdparty-info-card{grid-column:auto!important}
  .thirdparty-stat-card{min-height:110px!important;padding:14px!important}
  .thirdparty-stat-card strong{font-size:24px!important}
  .thirdparty-table-footer{padding:12px!important}
  .thirdparty-pagination-area{flex-direction:column!important;align-items:flex-start!important}
  .thirdparty-pagination{flex-wrap:wrap!important;gap:4px!important}
  .thirdparty-pagination button{width:32px!important;height:32px!important}
  .thirdparty-detail-grid{grid-template-columns:1fr!important}
  .thirdparty-detail-grid .wide{grid-column:1!important}
}
@media(max-width:520px){
  html body.thirdparty-view .topbar{padding:0 10px!important}
  html body.thirdparty-view .top-actions .search{height:40px!important}
  .thirdparty-heading-actions{grid-template-columns:1fr!important}
  .thirdparty-tabs{grid-template-columns:1fr!important}
  .thirdparty-secondary-actions{grid-template-columns:1fr!important}
  .thirdparty-secondary-actions .purchase-btn:last-child{grid-column:1!important}
  .thirdparty-filter-toolbar{grid-template-columns:1fr!important}
  .thirdparty-filter-toggle{grid-column:1!important;width:auto!important;justify-self:start!important}
  .thirdparty-results-count{grid-column:1!important;width:100%!important;text-align:left!important;padding-left:2px!important}
}

/* ======================================================================
   SIDEBAR FINAL · una sola presentación en todos los módulos.
   Es la misma escala del módulo Inventario y kardex, incluso al navegar.
   ====================================================================== */
#app:not(.hidden){grid-template-columns:250px minmax(0,1fr)!important}
#app:not(.hidden) .sidebar{position:sticky!important;top:0!important;width:250px!important;min-width:250px!important;height:100vh!important;padding:12px 14px 16px!important;background:#fff!important;border-right:1px solid #ddd8d0!important;color:#1b2738!important;box-shadow:none!important;font-family:Arial,"Helvetica Neue",sans-serif!important;z-index:60!important}
#app:not(.hidden) .sidebar-brand{height:64px!important;padding:3px 8px 12px!important;margin:0 0 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-bottom:1px solid #ddd8d0!important}
#app:not(.hidden) .sidebar-brand img{width:150px!important;max-width:150px!important;height:auto!important;max-height:52px!important;object-fit:contain!important;filter:none!important;opacity:1!important}
#app:not(.hidden) .nav{padding:8px 0!important;overflow:auto!important;flex:1!important}
#app:not(.hidden) .nav-group{font-family:Arial,"Helvetica Neue",sans-serif!important;font-size:11px!important;line-height:1!important;font-weight:500!important;color:#596579!important;letter-spacing:.02em!important;padding:13px 8px 6px!important}
#app:not(.hidden) .nav button{width:100%!important;min-height:35px!important;display:flex!important;align-items:center!important;gap:11px!important;margin:1px 0!important;padding:8px 12px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#1b2738!important;box-shadow:none!important;font-family:Arial,"Helvetica Neue",sans-serif!important;font-size:13px!important;line-height:1.2!important;font-weight:400!important;text-align:left!important;position:relative!important}
#app:not(.hidden) .nav button .nav-icon,#app:not(.hidden) .nav button .icon{width:20px!important;min-width:20px!important;height:20px!important;display:inline-grid!important;place-items:center!important}
#app:not(.hidden) .nav button svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
#app:not(.hidden) .nav button:hover{background:#faf7f1!important;color:#111!important}
#app:not(.hidden) .nav button.active{background:linear-gradient(90deg,#f7f0e5,#f4eddf)!important;color:#111!important;font-weight:600!important;box-shadow:none!important}
#app:not(.hidden) .nav button.active::before{content:""!important;position:absolute!important;left:-7px!important;top:0!important;bottom:0!important;width:3px!important;background:#9b6b20!important;border-radius:0 4px 4px 0!important}
#app:not(.hidden) .sidebar-footer{padding:13px 8px 0!important;margin:0!important;border-top:1px solid #ddd8d0!important;background:#fff!important;color:#171717!important}
#app:not(.hidden) .sidebar-footer .user-chip{display:flex!important;gap:10px!important;align-items:center!important}
#app:not(.hidden) .sidebar-footer .avatar{width:42px!important;height:42px!important;min-width:42px!important;border:0!important;border-radius:50%!important;background:#e8dac0!important;color:#171717!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important}
#app:not(.hidden) .sidebar-footer strong{font-size:13px!important;color:#171717!important}
#app:not(.hidden) .sidebar-footer small{font-size:11px!important;color:#596579!important}
#app:not(.hidden) .sidebar-footer .text-btn{min-height:0!important;padding:10px 0 0!important;border:0!important;background:transparent!important;color:#3e4b5d!important;font-size:12px!important}
@media(max-width:1200px) and (min-width:1025px){#app:not(.hidden){grid-template-columns:220px minmax(0,1fr)!important}#app:not(.hidden) .sidebar{width:220px!important;min-width:220px!important}}
@media(max-width:1024px){#app:not(.hidden){grid-template-columns:1fr!important}#app:not(.hidden) .sidebar{position:fixed!important;inset:0 auto 0 0!important;width:280px!important;min-width:280px!important;height:100dvh!important;transform:translateX(-105%)!important;transition:transform .24s ease!important;box-shadow:12px 0 35px rgba(0,0,0,.16)!important}#app:not(.hidden) .sidebar.open{transform:translateX(0)!important}#app:not(.hidden) .mobile-menu-button{display:inline-grid!important;place-items:center!important}#sidebarBackdrop{display:block!important}#sidebarBackdrop.hidden{display:none!important}}

/* El botón Filtros queda idéntico a Compras en cualquier módulo que lo utilice. */
html body .products-filter-toggle,
html body .inventory-filter-toggle,
html body .transfer-filter-toggle,
html body .purchase-filter-toggle,
html body .sales-filter-toggle,
html body .cash-filter-toggle,
html body .expense-filter-toggle,
html body .thirdparty-filter-toggle{height:40px!important;padding:0 18px!important;border:1px solid #ccb890!important;border-radius:9px!important;background:#fff!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font-family:Inter,Arial,sans-serif!important;font-size:13px!important;line-height:1!important;font-weight:600!important;box-shadow:none!important}
html body .products-filter-toggle svg,
html body .inventory-filter-toggle svg,
html body .transfer-filter-toggle svg,
html body .purchase-filter-toggle svg,
html body .sales-filter-toggle svg,
html body .cash-filter-toggle svg,
html body .expense-filter-toggle svg,
html body .thirdparty-filter-toggle svg{width:18px!important;height:18px!important;stroke-width:1.8!important}

/* Ocultar permanentemente el control desplegable del usuario en el topbar. */
html body .topbar .top-actions .topbar-user-menu,
html body .topbar .top-actions #themeBtn{
  display:none!important;
}

/* ======================================================================
   V254 · KARDEX DE PRODUCTO — MOVIMIENTOS DE INVENTARIO
   Vista ampliada inspirada en la ficha operativa solicitada: cabecera de
   producto, KPIs, filtros, tabla detallada, paginación, exportación e impresión.
   ====================================================================== */
#modal.kardex-modal{
  /* El kardex debe cubrir también el sidebar (sidebar z-index: 60). */
  z-index:1000!important;
  padding:24px!important;
  background:rgba(33,43,58,.46)!important;
  backdrop-filter:blur(1.5px);
  align-items:center!important;
}
#modal.kardex-modal .modal-card{
  width:min(1460px,calc(100vw - 46px))!important;
  max-width:min(1460px,calc(100vw - 46px))!important;
  max-height:94dvh!important;
  overflow:hidden!important;
  border:1px solid #d8dde5!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 28px 90px rgba(15,23,42,.24)!important;
}
#modal.kardex-modal .modal-head{display:none!important}
#modal.kardex-modal .modal-body{
  padding:0!important;
  margin:0!important;
  max-width:none!important;
  overflow:auto!important;
  background:#fff!important;
}
#modal.kardex-modal #modalForm{display:block!important}
.kardex-shell{
  min-width:0;
  background:#fff;
  color:#12203a;
  font-family:Inter,Arial,sans-serif;
}
.kardex-product-header{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:16px 18px 14px;
  border-bottom:1px solid #eef0f3;
  background:#fff;
}
.kardex-product-identity{display:flex;align-items:center;gap:18px;min-width:0}
.kardex-product-visual{
  width:112px;height:104px;flex:0 0 112px;
  border-radius:7px;
  display:grid;place-items:center;
  color:#a87923;
  background:
    radial-gradient(circle at 74% 24%,rgba(255,255,255,.95),rgba(255,255,255,0) 28%),
    linear-gradient(145deg,#fffdf6 0%,#f8eed7 52%,#fffaf0 100%);
  border:1px solid #f1eadc;
}
.kardex-product-visual svg{width:64px;height:64px;stroke-width:1.38;filter:drop-shadow(0 8px 10px rgba(159,115,34,.20))}
.kardex-gold-mark{
  width:78px;height:72px;border-radius:18px;display:grid;place-items:center;position:relative;isolation:isolate;
  color:#a87418;background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(245,224,177,.70));
  border:1px solid rgba(180,132,43,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 10px 22px rgba(123,87,24,.10)
}
.kardex-gold-mark::before{content:"";position:absolute;inset:8px;border-radius:14px;background:linear-gradient(135deg,rgba(255,255,255,.7),rgba(255,255,255,0) 50%);z-index:-1}
.kardex-gold-mark::after{content:"18K";position:absolute;right:7px;bottom:5px;min-width:25px;height:17px;padding:0 4px;border-radius:999px;display:grid;place-items:center;background:#9a6b1d;color:#fff;font-size:8px;font-weight:800;letter-spacing:.35px;box-shadow:0 2px 5px rgba(116,77,11,.20)}
.kardex-product-copy{min-width:0}
.kardex-product-meta{display:flex;align-items:center;gap:16px;font-size:13px;color:#5a6780;margin-bottom:6px}
.kardex-active-dot{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:#dff6e9;color:#168054;font-weight:700;font-size:11px}
.kardex-product-copy h2{margin:0;color:#0b1835;font-size:27px;line-height:1.12;letter-spacing:-.45px;font-weight:800}
.kardex-product-copy p{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:7px 0 0;color:#65728c;font-size:13px}
.kardex-product-copy p strong{font-weight:600;color:#53627d}
.kardex-product-copy p i{width:1px;height:13px;background:#cbd1da;display:inline-block}
.kardex-header-actions{display:flex;align-items:center;gap:10px;padding-right:34px;flex:0 0 auto}
.kardex-action-btn{
  height:40px;padding:0 17px;border:1px solid #d9dce2;border-radius:7px;background:#fff;
  color:#182235;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 1px 1px rgba(15,23,42,.02)
}
.kardex-action-btn:hover{background:#faf9f7;border-color:#c8b995}
.kardex-action-btn svg{width:17px;height:17px}
.kardex-close-btn{
  position:absolute;right:14px;top:12px;width:32px;height:32px;border:0;background:transparent;
  color:#536174;font-size:26px;line-height:1;border-radius:7px;display:grid;place-items:center
}
.kardex-close-btn:hover{background:#f3f4f6;color:#111827}

.kardex-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;
  padding:0 18px 14px;background:#fff;
}
.kardex-kpi{
  min-height:94px;border-radius:7px;border:1px solid #eadfc9;background:#fffaf0;
  padding:14px;display:flex;align-items:center;gap:16px;overflow:hidden;
}
.kardex-kpi.entry{border-color:#cfeadc;background:#f0fbf6}
.kardex-kpi.exit{border-color:#f2d6d7;background:#fff6f6}
.kardex-kpi.cost{border-color:#d9dcfb;background:#f6f7ff}
.kardex-kpi-icon{
  width:52px;height:52px;flex:0 0 52px;border-radius:10px;background:#f7edd8;
  display:grid;place-items:center;color:#101827;font-weight:800;font-size:27px
}
.kardex-kpi.entry .kardex-kpi-icon{background:#d7f3e4;color:#14804d}
.kardex-kpi.exit .kardex-kpi-icon{background:#ffe0e1;color:#d23030}
.kardex-kpi.cost .kardex-kpi-icon{background:#e3e5ff;color:#3345d8}
.kardex-kpi-icon svg{width:25px;height:25px}
.kardex-kpi>div:last-child{display:flex;flex-direction:column;min-width:0}
.kardex-kpi span{font-size:12px;font-weight:700;color:#41506b;margin-bottom:5px}
.kardex-kpi strong{font-size:22px;line-height:1.05;color:#0b1835;letter-spacing:-.25px;white-space:nowrap}
.kardex-kpi small{font-size:11px;color:#53627e;margin-top:5px}

.kardex-controls{
  margin:0 18px 10px;padding:10px 12px;
  display:grid;grid-template-columns:166px 166px 218px minmax(260px,1fr) minmax(240px,290px) auto;
  align-items:end;gap:12px;border:1px solid #e2e5ea;border-radius:7px;background:#fff;
}
.kardex-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.kardex-field>span{font-size:10px;font-weight:700;color:#62708a}
.kardex-field input,.kardex-select{
  height:34px;border:1px solid #d8dce3;border-radius:6px;background:#fff;color:#17233a;
}
.kardex-field input{width:100%;padding:0 9px;font-size:11px;outline:none}
.kardex-field input:focus,.kardex-select:focus-within,.kardex-search:focus-within{border-color:#a9864c;box-shadow:0 0 0 3px rgba(169,134,76,.09)}
.kardex-select{position:relative;display:flex;align-items:center;min-width:0}
.kardex-select select{appearance:none;width:100%;height:100%;padding:0 31px 0 9px;border:0;outline:0;background:transparent;font-size:11px;color:#17233a}
.kardex-select svg{position:absolute;right:9px;width:14px;height:14px;pointer-events:none;color:#4d5a70}
.kardex-search{
  height:38px;border:1px solid #d8dce3;border-radius:6px;background:#fff;
  display:flex;align-items:center;padding:0 11px;align-self:end;min-width:0
}
.kardex-search svg{width:17px;height:17px;color:#52637e;flex:0 0 auto}
.kardex-search input{width:100%;min-width:0;border:0;outline:0;padding:0 9px;background:transparent;color:#17233a;font-size:11px}
.kardex-clear{height:38px;padding:0 11px;border:1px solid #d8dce3;border-radius:6px;background:#fff;color:#5c687b;font-size:11px;font-weight:600}

.kardex-table-card{margin:0 18px;border:1px solid #e0e3e7;border-radius:7px;overflow:hidden;background:#fff}
.kardex-table-wrap{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
.kardex-table{width:100%;min-width:1390px;border-collapse:collapse;font-variant-numeric:tabular-nums}
.kardex-table thead{background:linear-gradient(90deg,#f5ede0,#f1e6d5)}
.kardex-table th{
  padding:9px 10px;text-align:left;border-bottom:1px solid #ddd5c7;color:#4b5565;
  font-size:9px;font-weight:700;line-height:1.15;letter-spacing:.01em;white-space:nowrap
}
.kardex-table td{
  padding:8px 10px;border-bottom:1px solid #e4e7eb;color:#1d2a40;font-size:10.5px;
  line-height:1.18;vertical-align:middle;background:#fff
}
.kardex-table tbody tr:hover td{background:#fcfbf8}
.kardex-row-number{width:30px;color:#58667d}
.kardex-product-cell{min-width:142px}.kardex-product-cell strong{display:block;font-size:10.5px}.kardex-product-cell small{display:block;color:#748096;font-size:9px;margin-top:2px}
.kardex-origin{font-weight:600;color:#35445e;white-space:nowrap}
.kardex-document-cell{min-width:192px}.kardex-document-cell strong{display:block;font-size:10.5px}.kardex-document-cell small{display:block;color:#62708a;font-size:8.8px;margin-top:2px;max-width:240px}
.kardex-type-pill{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:5px 8px;border-radius:7px;font-weight:700;font-size:9.5px}
.kardex-type-pill.entry{background:#d8f4e5;color:#157c4d}.kardex-type-pill.exit{background:#ffe1e1;color:#c92d32}
.kardex-qty,.kardex-money{white-space:nowrap;text-align:right}.kardex-qty strong,.kardex-money strong{font-weight:700}
.kardex-user{white-space:nowrap}
.kardex-empty-cell{text-align:center!important;padding:38px 18px!important;color:#6d7889!important}
.kardex-footer{
  min-height:54px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between;gap:14px;
  background:#fff;color:#58667d;font-size:10.5px
}
.kardex-pagination-area{display:flex;align-items:center;gap:18px}
.kardex-pagination{display:flex;align-items:center;gap:7px}
.kardex-pagination button,.kardex-page{
  width:32px;height:32px;border:1px solid #d8dce3;border-radius:6px;background:#fff;color:#344158;
  display:grid;place-items:center;font-size:10.5px
}
.kardex-pagination button svg{width:14px;height:14px}
.kardex-pagination button:disabled{opacity:.38;cursor:default}
.kardex-pagination .active{background:#8d7243;border-color:#8d7243;color:#fff}
.kardex-page-dots{padding:0 2px;color:#6e7786}
.kardex-page-size{height:34px;min-width:118px;border:1px solid #d8dce3;border-radius:6px;display:flex;align-items:center;position:relative;background:#fff}
.kardex-page-size select{appearance:none;width:100%;height:100%;border:0;outline:0;background:transparent;padding:0 28px 0 11px;font-size:10.5px;color:#354158}
.kardex-page-size svg{position:absolute;right:8px;width:13px;height:13px;pointer-events:none}
.kardex-bottom-actions{display:flex;justify-content:flex-end;padding:10px 18px 12px;background:#fff}
.kardex-close-bottom{height:38px;min-width:72px;border:1px solid #cbb995;border-radius:7px;background:#fff;color:#6f5932;font-size:11px;font-weight:700}
.kardex-loading{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#334155;text-align:center;padding:30px}
.kardex-loading span{font-size:12px;color:#64748b}.kardex-loading.error strong{color:#b42318}
.kardex-spinner{width:32px;height:32px;border:3px solid #ebe6db;border-top-color:#9a762f;border-radius:50%;animation:kardexSpin .8s linear infinite}@keyframes kardexSpin{to{transform:rotate(360deg)}}

@media(max-width:1180px){
  #modal.kardex-modal{padding:14px!important}
  #modal.kardex-modal .modal-card{width:calc(100vw - 28px)!important;max-width:calc(100vw - 28px)!important}
  .kardex-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kardex-controls{grid-template-columns:repeat(4,minmax(0,1fr))}
  .kardex-search{grid-column:1/-2}.kardex-clear{grid-column:-2/-1}
}
@media(max-width:760px){
  #modal.kardex-modal{padding:0!important;align-items:end!important}
  #modal.kardex-modal .modal-card{width:100%!important;max-width:none!important;max-height:97dvh!important;border-radius:14px 14px 0 0!important}
  .kardex-product-header{padding:14px;flex-direction:column;gap:13px}
  .kardex-product-identity{align-items:flex-start;gap:12px;padding-right:28px}
  .kardex-product-visual{width:62px;height:62px;flex-basis:62px}.kardex-product-visual svg{width:34px;height:34px}
  .kardex-product-copy h2{font-size:20px}.kardex-product-meta{font-size:11px;gap:8px}.kardex-product-copy p{font-size:11px;gap:7px}.kardex-product-copy p i{display:none}
  .kardex-header-actions{width:100%;padding-right:0;display:grid;grid-template-columns:1fr 1fr}.kardex-action-btn{width:100%;height:38px;padding:0 9px}
  .kardex-close-btn{right:9px;top:8px}
  .kardex-kpis{grid-template-columns:1fr;padding:0 14px 12px;gap:8px}.kardex-kpi{min-height:78px;padding:11px}.kardex-kpi-icon{width:44px;height:44px;flex-basis:44px}.kardex-kpi strong{font-size:19px}
  .kardex-controls{margin:0 14px 10px;padding:10px;grid-template-columns:1fr 1fr;gap:9px}.kardex-origin-field{grid-column:1/-1}.kardex-search{grid-column:1/-1}.kardex-clear{grid-column:1/-1;width:100%}
  .kardex-table-card{margin:0 14px}.kardex-table{min-width:1260px}.kardex-footer{flex-direction:column;align-items:flex-start}.kardex-pagination-area{width:100%;justify-content:space-between;gap:8px}.kardex-pagination{gap:4px}.kardex-pagination button,.kardex-page{width:29px;height:29px}
  .kardex-bottom-actions{padding:10px 14px 14px}.kardex-close-bottom{width:100%}
}
@media(max-width:460px){
  .kardex-controls{grid-template-columns:1fr}.kardex-origin-field,.kardex-search,.kardex-clear{grid-column:auto}.kardex-pagination-area{flex-direction:column;align-items:stretch}.kardex-page-size{width:100%}
}

/* ======================================================================
   V260 · PRODUCTOS — MODAL "NUEVO PRODUCTO" MEJORADO
   ----------------------------------------------------------------------
   - Replica la composición visual de la referencia suministrada.
   - Mantiene el modal fuera del área ocupada por el sidebar en escritorio.
   - El modal queda por encima del drawer lateral en tablet/móvil.
   - No altera la lógica de creación/edición ni los demás módulos.
   ====================================================================== */
.modal-lead-icon,.modal-subtitle{display:none}

html body.product-view #modal.product-editor-modal{
  z-index:180!important;
  padding:24px!important;
  display:grid!important;
  place-items:center!important;
  align-items:center!important;
  justify-items:center!important;
  background:rgba(20,24,31,.38)!important;
  backdrop-filter:blur(1.5px);
  -webkit-backdrop-filter:blur(1.5px);
  overflow:auto!important;
}
html body.product-view #modal.product-editor-modal .modal-card{
  width:min(900px,calc(100vw - 48px))!important;
  max-width:900px!important;
  max-height:min(92dvh,760px)!important;
  overflow:visible!important;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  border:1px solid #ded8ce!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#101827!important;
  box-shadow:0 24px 70px rgba(15,23,42,.25)!important;
}
html body.product-view #modal.product-editor-modal .modal-head{
  min-height:96px!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:18px 24px!important;
  border-bottom:1px solid #e8e3dc!important;
  background:#fff!important;
  position:sticky!important;
  top:0!important;
  z-index:2!important;
}
html body.product-view #modal.product-editor-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
}
html body.product-view #modal.product-editor-modal .modal-lead-icon{
  display:grid!important;
  place-items:center!important;
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  border-radius:12px!important;
  background:#f3eadc!important;
  color:#111!important;
}
html body.product-view #modal.product-editor-modal .modal-lead-icon svg{
  width:30px!important;
  height:30px!important;
  stroke-width:1.8!important;
}
html body.product-view #modal.product-editor-modal .modal-title-copy{min-width:0!important}
html body.product-view #modal.product-editor-modal #modalEyebrow{
  margin:0 0 4px!important;
  font-size:11px!important;
  line-height:1.1!important;
  font-weight:600!important;
  letter-spacing:.02em!important;
  color:#596579!important;
}
html body.product-view #modal.product-editor-modal #modalTitle{
  margin:0!important;
  font-size:24px!important;
  line-height:1.08!important;
  letter-spacing:-.4px!important;
  color:#101827!important;
  font-weight:700!important;
}
html body.product-view #modal.product-editor-modal .modal-subtitle{
  display:block!important;
  margin:4px 0 0!important;
  color:#596579!important;
  font-size:13px!important;
  line-height:1.35!important;
  font-weight:400!important;
}
html body.product-view #modal.product-editor-modal #closeModal{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  border:1px solid #ddd5c8!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#172033!important;
  font-size:24px!important;
  line-height:1!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:none!important;
}
html body.product-view #modal.product-editor-modal #closeModal:hover{background:#faf7f2!important}

html body.product-view #modal.product-editor-modal .modal-body{
  padding:16px 24px 14px!important;
  background:#fff!important;
  overflow:visible!important;
  flex:1 1 auto!important;
}
html body.product-view #modal.product-editor-modal .product-editor-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px 20px!important;
}
html body.product-view #modal.product-editor-modal .product-editor-field{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
}
html body.product-view #modal.product-editor-modal .product-editor-field.wide{grid-column:1/-1!important}
html body.product-view #modal.product-editor-modal .product-editor-field>label{
  margin:0!important;
  color:#40506a!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:500!important;
}
html body.product-view #modal.product-editor-modal .product-required{color:#e12b2b!important;margin-left:3px!important}
html body.product-view #modal.product-editor-modal .product-optional{color:#596579!important;font-weight:400!important}
html body.product-view #modal.product-editor-modal .product-editor-control{
  min-height:42px!important;
  display:flex!important;
  align-items:stretch!important;
  overflow:hidden!important;
  border:1px solid #d8dde5!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.02)!important;
  transition:border-color .15s ease,box-shadow .15s ease!important;
}
html body.product-view #modal.product-editor-modal .product-editor-control:focus-within{
  border-color:#b18a50!important;
  box-shadow:0 0 0 3px rgba(177,138,80,.12)!important;
}
html body.product-view #modal.product-editor-modal .product-editor-control-icon{
  width:44px!important;
  min-width:44px!important;
  display:grid!important;
  place-items:center!important;
  color:#28405f!important;
  background:#fff!important;
}
html body.product-view #modal.product-editor-modal .product-editor-control-icon svg{
  width:18px!important;
  height:18px!important;
  stroke-width:1.8!important;
}
html body.product-view #modal.product-editor-modal .product-editor-control input,
html body.product-view #modal.product-editor-modal .product-editor-control select,
html body.product-view #modal.product-editor-modal .product-editor-control textarea{
  width:100%!important;
  min-width:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#172033!important;
  font:inherit!important;
  font-size:13px!important;
  line-height:1.3!important;
  box-shadow:none!important;
}
html body.product-view #modal.product-editor-modal .product-editor-control input,
html body.product-view #modal.product-editor-modal .product-editor-control select{
  min-height:40px!important;
  padding:0 12px 0 8px!important;
}
html body.product-view #modal.product-editor-modal .product-editor-control select{cursor:pointer!important}
html body.product-view #modal.product-editor-modal .product-editor-control input::placeholder,
html body.product-view #modal.product-editor-modal .product-editor-control textarea::placeholder{color:#7b8798!important;opacity:1!important}
html body.product-view #modal.product-editor-modal .product-status-control{
  position:relative!important;
  padding-left:38px!important;
}
html body.product-view #modal.product-editor-modal .product-status-control select{
  opacity:1!important;
  color:#172033!important;
  -webkit-text-fill-color:#172033!important;
  cursor:default!important;
}
html body.product-view #modal.product-editor-modal .product-status-dot{
  position:absolute!important;
  left:16px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:11px!important;
  height:11px!important;
  border-radius:50%!important;
  z-index:1!important;
}
html body.product-view #modal.product-editor-modal .product-status-dot.active{background:#0aa95b!important}
html body.product-view #modal.product-editor-modal .product-status-dot.inactive{background:#d84a4a!important}
html body.product-view #modal.product-editor-modal .product-description-field{margin-top:1px!important}
html body.product-view #modal.product-editor-modal .product-editor-textarea{
  min-height:84px!important;
  align-items:flex-start!important;
}
html body.product-view #modal.product-editor-modal .product-editor-textarea .product-editor-control-icon{padding-top:12px!important}
html body.product-view #modal.product-editor-modal .product-editor-control textarea{
  min-height:82px!important;
  resize:vertical!important;
  padding:11px 12px 11px 8px!important;
}
html body.product-view #modal.product-editor-modal .product-editor-actions{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:10px!important;
  margin-top:18px!important;
  padding-top:14px!important;
  border-top:1px solid #e8e3dc!important;
}
html body.product-view #modal.product-editor-modal .product-editor-actions .btn{
  min-width:116px!important;
  height:44px!important;
  padding:0 18px!important;
  border-radius:8px!important;
  font-size:13px!important;
  font-weight:600!important;
}
html body.product-view #modal.product-editor-modal .product-editor-cancel{
  border:1px solid #ddd5c8!important;
  background:#fff!important;
  color:#172033!important;
}
html body.product-view #modal.product-editor-modal .product-editor-submit{
  min-width:184px!important;
  border:1px solid #95691f!important;
  background:linear-gradient(#a77b31,#95691f)!important;
  color:#fff!important;
  box-shadow:0 1px 2px rgba(0,0,0,.08)!important;
}
html body.product-view #modal.product-editor-modal .product-editor-submit:disabled{opacity:.7!important;cursor:wait!important}


/* Selectores personalizados del formulario de producto.
   Reemplazan el menú nativo del navegador para que el despliegue conserve
   ancho, alineación, scroll y z-index dentro del modal. */
html body.product-view #modal.product-editor-modal .product-custom-host{
  overflow:visible!important;
  position:relative!important;
}
html body.product-view #modal.product-editor-modal .product-custom-select{
  /* El select sigue siendo el área interactiva, pero el menú absoluto se
     posiciona respecto al host completo para igualar todo el ancho del control. */
  position:static!important;
  flex:1 1 auto!important;
  min-width:0!important;
  align-self:stretch!important;
  display:flex!important;
}
html body.product-view #modal.product-editor-modal .product-custom-trigger{
  width:100%!important;
  min-width:0!important;
  min-height:40px!important;
  padding:0 12px 0 8px!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  font:inherit!important;
  font-size:13px!important;
}
html body.product-view #modal.product-editor-modal .product-custom-trigger>svg{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  transition:transform .16s ease!important;
  color:#172033!important;
}
html body.product-view #modal.product-editor-modal .product-custom-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body.product-view #modal.product-editor-modal .product-custom-select.open .product-custom-trigger>svg{
  transform:rotate(180deg)!important;
}
html body.product-view #modal.product-editor-modal .product-custom-menu{
  position:absolute!important;
  z-index:40!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  /* 100% ahora corresponde a .product-editor-control.product-custom-host,
     incluyendo el espacio del icono izquierdo. */
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  max-height:260px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  display:none!important;
  padding:6px!important;
  border:1px solid #d7dce4!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(15,23,42,.18),0 3px 10px rgba(15,23,42,.08)!important;
}
html body.product-view #modal.product-editor-modal .product-custom-select.drop-up .product-custom-menu{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
html body.product-view #modal.product-editor-modal .product-custom-select.open .product-custom-menu{
  display:block!important;
}
html body.product-view #modal.product-editor-modal .product-custom-option{
  width:100%!important;
  min-height:36px!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  font:inherit!important;
  font-size:13px!important;
  cursor:pointer!important;
}
html body.product-view #modal.product-editor-modal .product-custom-option:hover,
html body.product-view #modal.product-editor-modal .product-custom-option:focus-visible{
  outline:0!important;
  background:#f7f1e7!important;
}
html body.product-view #modal.product-editor-modal .product-custom-option.selected{
  background:#f3eadc!important;
  color:#7b5518!important;
  font-weight:600!important;
}
html body.product-view #modal.product-editor-modal .product-custom-check{
  margin-left:auto!important;
  display:grid!important;
  place-items:center!important;
}
html body.product-view #modal.product-editor-modal .product-custom-check svg{
  width:16px!important;
  height:16px!important;
}
html body.product-view #modal.product-editor-modal .product-custom-select.has-error{
  outline:2px solid rgba(225,43,43,.18)!important;
  border-radius:6px!important;
}
html body.product-view #modal.product-editor-modal .product-custom-select.is-disabled .product-custom-trigger{
  cursor:default!important;
  opacity:1!important;
}
html body.product-view #modal.product-editor-modal .product-status-control .product-custom-select{
  margin-left:26px!important;
}
html body.product-view #modal.product-editor-modal .product-status-control{
  padding-left:0!important;
}
html body.product-view #modal.product-editor-modal .product-status-control .product-status-dot{
  left:16px!important;
}

/* El modal se centra respecto a toda la ventana; el sidebar queda siempre por debajo del overlay. */
@media(max-width:1200px) and (min-width:1025px){
  html body.product-view #modal.product-editor-modal{padding:22px!important;place-items:center!important}
  html body.product-view #modal.product-editor-modal .modal-card{width:min(880px,calc(100vw - 44px))!important}
}

/* En tablet/móvil el sidebar es drawer. El modal pasa por encima y no queda tapado. */
@media(max-width:1024px){
  html body.product-view #modal.product-editor-modal{
    padding:18px!important;
    z-index:150!important;
    place-items:center!important;
  }
  html body.product-view #modal.product-editor-modal .modal-card{width:min(900px,100%)!important;max-height:94dvh!important;overflow:hidden!important}
  html body.product-view #modal.product-editor-modal .modal-head{padding:16px 18px!important}
  html body.product-view #modal.product-editor-modal .modal-body{padding:16px 18px 14px!important;overflow:auto!important}
}
@media(max-width:680px){
  html body.product-view #modal.product-editor-modal{padding:10px!important;align-items:start!important}
  html body.product-view #modal.product-editor-modal .modal-card{max-height:calc(100vh - 20px)!important;border-radius:10px!important}
  html body.product-view #modal.product-editor-modal .modal-head{min-height:84px!important;padding:14px!important;gap:10px!important}
  html body.product-view #modal.product-editor-modal .modal-title-wrap{gap:12px!important}
  html body.product-view #modal.product-editor-modal .modal-lead-icon{width:48px!important;height:48px!important;min-width:48px!important}
  html body.product-view #modal.product-editor-modal #modalTitle{font-size:20px!important}
  html body.product-view #modal.product-editor-modal .modal-subtitle{font-size:12px!important}
  html body.product-view #modal.product-editor-modal #closeModal{width:40px!important;height:40px!important;min-width:40px!important}
  html body.product-view #modal.product-editor-modal .modal-body{padding:14px!important}
  html body.product-view #modal.product-editor-modal .product-editor-grid{grid-template-columns:1fr!important;gap:12px!important}
  html body.product-view #modal.product-editor-modal .product-editor-field.wide{grid-column:auto!important}
  html body.product-view #modal.product-editor-modal .product-editor-actions{position:sticky!important;bottom:-14px!important;background:#fff!important;padding:12px 0 2px!important;margin-top:14px!important}
  html body.product-view #modal.product-editor-modal .product-editor-actions .btn{flex:1!important;min-width:0!important}
  html body.product-view #modal.product-editor-modal .product-editor-submit{min-width:0!important}
  html body.product-view #modal.product-editor-modal .product-custom-menu{max-height:220px!important}
}

/* ===== V254 · Productos — icono Desactivar más claro ===== */
html body.product-view .products-action-btn.danger .products-deactivate-icon{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  stroke-width:2!important;
  stroke:currentColor!important;
  fill:none!important;
}
html body.product-view .products-action-btn.danger:hover{
  background:#fff5f5!important;
  border-color:#ef9da2!important;
  color:#cf2028!important;
}

/* ===== V255 · Productos — toolbar con el mismo ancho útil de Ventas =====
   El buscador ocupa todo el espacio disponible hasta el botón Filtros.
   Se elimina el spacer visual para evitar el vacío central del toolbar. */
html body.product-view .products-filter-toolbar{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-height:66px!important;
  padding:13px!important;
  flex-wrap:nowrap!important;
}
html body.product-view .products-search-box{
  flex:1 1 auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  height:41px!important;
}
html body.product-view .products-filter-toggle{
  flex:0 0 auto!important;
  height:40px!important;
  padding:0 18px!important;
}
html body.product-view .products-toolbar-spacer{
  display:none!important;
  flex:0 0 0!important;
}
html body.product-view .products-results-count{
  flex:0 0 auto!important;
  margin-left:8px!important;
  white-space:nowrap!important;
}

@media(max-width:1180px){
  html body.product-view .products-filter-toolbar{flex-wrap:wrap!important}
  html body.product-view .products-search-box{flex:1 0 100%!important;width:100%!important;max-width:none!important}
  html body.product-view .products-results-count{margin-left:auto!important}
}
@media(max-width:860px){
  html body.product-view .products-filter-toolbar{display:grid!important;grid-template-columns:1fr auto!important;gap:9px!important}
  html body.product-view .products-search-box{grid-column:1/-1!important;width:100%!important;max-width:none!important}
  html body.product-view .products-filter-toggle{grid-column:1!important;justify-self:start!important}
  html body.product-view .products-results-count{grid-column:2!important;justify-self:end!important;margin-left:0!important;align-self:center!important}
}
@media(max-width:520px){
  html body.product-view .products-filter-toolbar{grid-template-columns:1fr!important;padding:10px!important}
  html body.product-view .products-filter-toolbar>*{grid-column:1!important;width:100%!important;max-width:none!important}
  html body.product-view .products-filter-toggle{justify-self:stretch!important}
  html body.product-view .products-results-count{justify-self:start!important;margin-left:0!important}
}

/* ======================================================================
   V256 · TOOLBARS UNIFICADOS — misma proporción visual de Ventas
   Aplica a Productos, Inventario, Traslados, Compras, Ventas, Caja,
   Gastos y Clientes/Proveedores. CxC/CxP conservan sus filtros directos,
   pero usan la misma altura, separación y escala visual.
   ====================================================================== */

/* Barra principal de búsqueda + botón filtros + contador */
.products-filter-toolbar,
.inventory-filter-toolbar,
.transfer-table-toolbar,
.purchase-table-toolbar,
.sales-table-toolbar,
.cash-table-toolbar,
.expense-table-toolbar,
.thirdparty-filter-toolbar{
  min-height:66px!important;
  padding:13px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fff!important;
}

/* Buscador: ocupa todo el ancho útil como en Ventas */
.products-search-box,
.inventory-search-box,
.transfer-table-search,
.purchase-table-search,
.sales-table-search,
.cash-table-search,
.expense-table-search,
.thirdparty-search{
  flex:1 1 auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  height:41px!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid #d7d9dd!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.products-search-box svg,
.inventory-search-box svg,
.transfer-table-search svg,
.purchase-table-search svg,
.sales-table-search svg,
.cash-table-search svg,
.expense-table-search svg,
.thirdparty-search svg{
  width:19px!important;
  height:19px!important;
  min-width:19px!important;
  flex:0 0 19px!important;
  color:#344256!important;
  stroke-width:1.8!important;
}
.products-search-box input,
.inventory-search-box input,
.transfer-table-search input,
.purchase-table-search input,
.sales-table-search input,
.cash-table-search input,
.expense-table-search input,
.thirdparty-search input{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0 10px!important;
  font-size:13px!important;
  color:#111!important;
}

/* Botón de filtros idéntico entre módulos */
.products-filter-toggle,
.inventory-filter-toggle,
.transfer-filter-toggle,
.purchase-filter-toggle,
.sales-filter-toggle,
.cash-filter-toggle,
.expense-filter-toggle,
.thirdparty-filter-toggle{
  flex:0 0 auto!important;
  height:40px!important;
  min-height:40px!important;
  padding:0 18px!important;
  border:1px solid #ccb890!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#111!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.products-filter-toggle svg,
.inventory-filter-toggle svg,
.transfer-filter-toggle svg,
.purchase-filter-toggle svg,
.sales-filter-toggle svg,
.cash-filter-toggle svg,
.expense-filter-toggle svg,
.thirdparty-filter-toggle svg{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  stroke-width:1.8!important;
}
.products-filter-toggle:hover,.products-filter-toggle.active,
.inventory-filter-toggle:hover,.inventory-filter-toggle.active,
.transfer-filter-toggle:hover,.transfer-filter-toggle.active,
.purchase-filter-toggle:hover,.purchase-filter-toggle.active,
.sales-filter-toggle:hover,.sales-filter-toggle.active,
.cash-filter-toggle:hover,.cash-filter-toggle.active,
.expense-filter-toggle:hover,.expense-filter-toggle.active,
.thirdparty-filter-toggle:hover,.thirdparty-filter-toggle.active{
  background:#fff!important;
  color:#111!important;
  border-color:#b99459!important;
  box-shadow:0 0 0 2px rgba(177,137,71,.08)!important;
  transform:none!important;
  filter:none!important;
}

/* El buscador ya hace el trabajo de ocupar el espacio: se elimina el spacer. */
.products-toolbar-spacer,
.inventory-toolbar-spacer,
.transfer-toolbar-spacer,
.purchase-toolbar-spacer,
.expense-toolbar-spacer{
  display:none!important;
  flex:0 0 0!important;
  width:0!important;
}

.products-results-count,
.inventory-results-count,
.transfer-results-count,
.purchase-results-count,
.sales-results-count,
.expense-results-count,
.thirdparty-results-count{
  flex:0 0 auto!important;
  margin-left:8px!important;
  padding:0!important;
  font-size:12px!important;
  color:#596579!important;
  white-space:nowrap!important;
  text-align:left!important;
}

/* Traslados conserva el selector de periodo, pero alineado con la misma barra. */
.transfer-period-select{
  flex:0 0 auto!important;
  height:40px!important;
  min-height:40px!important;
  border-radius:8px!important;
  margin:0!important;
}

/* Paneles desplegados: misma separación, fondo y altura de controles. */
.products-filter-panel,
.inventory-filter-panel,
.transfer-filter-panel,
.purchase-filter-panel,
.sales-filter-panel-expanded,
.cash-purchase-filter-panel,
.expense-filter-panel,
.thirdparty-filter-panel{
  padding:12px 13px!important;
  gap:10px!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fcfbf9!important;
}

.products-select-wrap,
.inventory-select-wrap,
.purchase-filter-select,
.expense-filter-select,
.purchase-date-filter,
.expense-date-filter,
.transfer-filter-panel label{
  min-height:38px!important;
  height:38px!important;
  border-radius:7px!important;
}

/* Cuentas por cobrar / pagar: misma escala de la barra, sin cambiar su lógica. */
.finance-filter-bar{
  min-height:66px!important;
  padding:13px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  border:1px solid #ddd8d0!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 1px 3px rgba(15,23,42,.06)!important;
}
.finance-filter-bar .product-search-box{
  flex:1 1 auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  height:41px!important;
  border-radius:8px!important;
  padding:0 12px!important;
}
.finance-filter-bar .filter,
.finance-filter-bar .product-clear-filter{
  flex:0 0 auto!important;
  height:40px!important;
  min-height:40px!important;
  border-radius:8px!important;
}
.finance-filter-bar .product-result-count{
  flex:0 0 auto!important;
  margin-left:8px!important;
  white-space:nowrap!important;
  font-size:12px!important;
  color:#596579!important;
}

/* Adaptación responsive compartida */
@media(max-width:1180px){
  .products-filter-toolbar,
  .inventory-filter-toolbar,
  .transfer-table-toolbar,
  .purchase-table-toolbar,
  .sales-table-toolbar,
  .cash-table-toolbar,
  .expense-table-toolbar,
  .thirdparty-filter-toolbar,
  .finance-filter-bar{
    flex-wrap:wrap!important;
  }
  .products-search-box,
  .inventory-search-box,
  .transfer-table-search,
  .purchase-table-search,
  .sales-table-search,
  .cash-table-search,
  .expense-table-search,
  .thirdparty-search,
  .finance-filter-bar .product-search-box{
    flex:1 0 100%!important;
    width:100%!important;
    max-width:none!important;
  }
  .products-results-count,
  .inventory-results-count,
  .transfer-results-count,
  .purchase-results-count,
  .sales-results-count,
  .expense-results-count,
  .thirdparty-results-count,
  .finance-filter-bar .product-result-count{
    margin-left:auto!important;
  }
}

@media(max-width:860px){
  .products-filter-toolbar,
  .inventory-filter-toolbar,
  .transfer-table-toolbar,
  .purchase-table-toolbar,
  .sales-table-toolbar,
  .cash-table-toolbar,
  .expense-table-toolbar,
  .thirdparty-filter-toolbar{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:9px!important;
  }
  .products-search-box,
  .inventory-search-box,
  .transfer-table-search,
  .purchase-table-search,
  .sales-table-search,
  .cash-table-search,
  .expense-table-search,
  .thirdparty-search{
    grid-column:1/-1!important;
    width:100%!important;
    max-width:none!important;
  }
  .products-filter-toggle,
  .inventory-filter-toggle,
  .transfer-filter-toggle,
  .purchase-filter-toggle,
  .sales-filter-toggle,
  .cash-filter-toggle,
  .expense-filter-toggle,
  .thirdparty-filter-toggle{
    grid-column:1!important;
    justify-self:start!important;
  }
  .products-results-count,
  .inventory-results-count,
  .transfer-results-count,
  .purchase-results-count,
  .sales-results-count,
  .expense-results-count,
  .thirdparty-results-count{
    grid-column:2!important;
    justify-self:end!important;
    align-self:center!important;
    margin-left:0!important;
  }
  .transfer-period-select{
    grid-column:1/-1!important;
    justify-self:stretch!important;
    width:100%!important;
  }
  .transfer-period-select select{flex:1!important}
  .finance-filter-bar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .finance-filter-bar .product-search-box{grid-column:1/-1!important}
  .finance-filter-bar .product-result-count{margin-left:0!important;justify-self:end!important}
}

@media(max-width:520px){
  .products-filter-toolbar,
  .inventory-filter-toolbar,
  .transfer-table-toolbar,
  .purchase-table-toolbar,
  .sales-table-toolbar,
  .cash-table-toolbar,
  .expense-table-toolbar,
  .thirdparty-filter-toolbar,
  .finance-filter-bar{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
  .products-filter-toolbar>*,
  .inventory-filter-toolbar>*,
  .transfer-table-toolbar>*,
  .purchase-table-toolbar>*,
  .sales-table-toolbar>*,
  .cash-table-toolbar>*,
  .expense-table-toolbar>*,
  .thirdparty-filter-toolbar>*,
  .finance-filter-bar>*{
    grid-column:1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
  .products-filter-toggle,
  .inventory-filter-toggle,
  .transfer-filter-toggle,
  .purchase-filter-toggle,
  .sales-filter-toggle,
  .cash-filter-toggle,
  .expense-filter-toggle,
  .thirdparty-filter-toggle{
    justify-self:stretch!important;
  }
  .products-results-count,
  .inventory-results-count,
  .transfer-results-count,
  .purchase-results-count,
  .sales-results-count,
  .expense-results-count,
  .thirdparty-results-count,
  .finance-filter-bar .product-result-count{
    justify-self:start!important;
    margin-left:0!important;
    text-align:left!important;
  }
  .products-filter-panel,
  .inventory-filter-panel,
  .transfer-filter-panel,
  .purchase-filter-panel,
  .sales-filter-panel-expanded,
  .cash-purchase-filter-panel,
  .expense-filter-panel,
  .thirdparty-filter-panel{
    padding:10px!important;
  }
}

/* ======================================================================
   V257 · BARRA DE BÚSQUEDA + FILTROS — CLON VISUAL DE VENTAS
   La franja superior de las tablas usa exactamente la misma proporción:
   buscador flexible + botón Filtros fijo + contador a la derecha.
   ====================================================================== */
:root{
  --sales-toolbar-h:66px;
  --sales-toolbar-pad:13px;
  --sales-toolbar-gap:10px;
  --sales-search-h:41px;
  --sales-filter-h:40px;
  --sales-filter-w:92px;
}

/* Todas las tarjetas de datos ocupan el ancho completo del módulo. */
.products-table-card,
.inventory-table-card,
.transfer-table-card,
.purchase-table-card,
.sales-table-card,
.cash-table-card,
.expense-table-card,
.thirdparty-table-card,
.finance-table-card{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Misma franja marcada en rojo del módulo Ventas. */
.products-filter-toolbar,
.inventory-filter-toolbar,
.transfer-table-toolbar,
.purchase-table-toolbar,
.sales-table-toolbar,
.cash-table-toolbar,
.expense-table-toolbar,
.thirdparty-filter-toolbar,
.finance-table-toolbar{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:var(--sales-toolbar-h)!important;
  height:var(--sales-toolbar-h)!important;
  padding:var(--sales-toolbar-pad)!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:var(--sales-toolbar-gap)!important;
  background:#fff!important;
  border-bottom:1px solid #ece8e1!important;
  margin:0!important;
}

/* El buscador se estira hasta Filtros, igual que Ventas. */
.products-search-box,
.inventory-search-box,
.transfer-table-search,
.purchase-table-search,
.sales-table-search,
.cash-table-search,
.expense-table-search,
.thirdparty-search,
.finance-table-search{
  box-sizing:border-box!important;
  flex:1 1 0!important;
  width:0!important;
  max-width:none!important;
  min-width:180px!important;
  height:var(--sales-search-h)!important;
  min-height:var(--sales-search-h)!important;
  margin:0!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:center!important;
  border:1px solid #d7d9dd!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.products-search-box svg,
.inventory-search-box svg,
.transfer-table-search svg,
.purchase-table-search svg,
.sales-table-search svg,
.cash-table-search svg,
.expense-table-search svg,
.thirdparty-search svg,
.finance-table-search svg{
  width:19px!important;height:19px!important;min-width:19px!important;flex:0 0 19px!important;
  color:#344256!important;stroke-width:1.8!important;
}
.products-search-box input,
.inventory-search-box input,
.transfer-table-search input,
.purchase-table-search input,
.sales-table-search input,
.cash-table-search input,
.expense-table-search input,
.thirdparty-search input,
.finance-table-search input{
  flex:1 1 auto!important;width:100%!important;min-width:0!important;height:100%!important;
  padding:0 10px!important;border:0!important;outline:0!important;background:transparent!important;
  box-shadow:none!important;font-size:13px!important;color:#111!important;
}

/* Filtros: ancho y alto fijos idénticos. */
.products-filter-toggle,
.inventory-filter-toggle,
.transfer-filter-toggle,
.purchase-filter-toggle,
.sales-filter-toggle,
.cash-filter-toggle,
.expense-filter-toggle,
.thirdparty-filter-toggle,
.finance-filter-toggle{
  box-sizing:border-box!important;
  flex:0 0 var(--sales-filter-w)!important;
  width:var(--sales-filter-w)!important;
  min-width:var(--sales-filter-w)!important;
  max-width:var(--sales-filter-w)!important;
  height:var(--sales-filter-h)!important;
  min-height:var(--sales-filter-h)!important;
  padding:0 12px!important;
  margin:0!important;
  border:1px solid #ccb890!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#111!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.products-filter-toggle svg,
.inventory-filter-toggle svg,
.transfer-filter-toggle svg,
.purchase-filter-toggle svg,
.sales-filter-toggle svg,
.cash-filter-toggle svg,
.expense-filter-toggle svg,
.thirdparty-filter-toggle svg,
.finance-filter-toggle svg{
  width:18px!important;height:18px!important;min-width:18px!important;stroke-width:1.8!important;
}

.products-toolbar-spacer,
.inventory-toolbar-spacer,
.transfer-toolbar-spacer,
.purchase-toolbar-spacer,
.expense-toolbar-spacer,
.finance-toolbar-spacer{
  display:none!important;width:0!important;flex:0 0 0!important;
}

.products-results-count,
.inventory-results-count,
.transfer-results-count,
.purchase-results-count,
.sales-results-count,
.expense-results-count,
.thirdparty-results-count,
.finance-results-count{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  min-width:68px!important;
  margin:0 0 0 8px!important;
  padding:0!important;
  color:#596579!important;
  font-size:12px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  text-align:right!important;
}

/* Traslados: el periodo pasa al panel Filtros para no acortar el buscador. */
.transfer-filter-panel .transfer-filter-period{height:auto!important;min-height:0!important;display:grid!important;gap:5px!important}
.transfer-filter-panel .transfer-period-select{
  box-sizing:border-box!important;height:38px!important;min-height:38px!important;min-width:210px!important;
  display:flex!important;align-items:center!important;gap:8px!important;padding:0 10px!important;
  border:1px solid #d7dadd!important;border-radius:7px!important;background:#fff!important;
}
.transfer-filter-panel .transfer-period-select select{flex:1!important;min-width:0!important}
.transfer-clear-filter{height:38px!important;align-self:end!important}

/* CxC/CxP también usan la barra de Ventas, con filtros desplegables. */
.finance-table-card{
  margin-top:18px!important;
  border:1px solid #ddd8d0!important;
  border-radius:9px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 1px 3px rgba(15,23,42,.06)!important;
}
.finance-filter-panel{
  box-sizing:border-box!important;
  min-height:62px!important;
  padding:12px 13px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fcfbf9!important;
}
.finance-filter-select,
.finance-date-filter{
  box-sizing:border-box!important;
  height:38px!important;
  min-height:38px!important;
  min-width:190px!important;
  padding:0 10px!important;
  display:flex!important;
  align-items:center!important;
  position:relative!important;
  border:1px solid #d7dadd!important;
  border-radius:7px!important;
  background:#fff!important;
}
.finance-filter-select select,
.finance-date-filter input{
  width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;
  color:#111!important;font-size:12px!important;
}
.finance-filter-select select{appearance:none!important;padding-right:24px!important}
.finance-filter-select svg,.finance-date-filter svg{width:16px!important;height:16px!important;flex:none!important;color:#596579!important}
.finance-clear-filter{
  height:38px!important;padding:0 16px!important;border:1px solid #d7dadd!important;border-radius:7px!important;
  background:#fff!important;color:#111!important;font-size:12px!important;font-weight:600!important;
}
.finance-table-wrap{overflow:auto!important;width:100%!important}
.finance-data-table{width:100%!important;min-width:1050px!important;border-collapse:collapse!important}
.finance-data-table thead{background:#f4ead8!important}
.finance-data-table th{font-size:10px!important;font-weight:500!important;color:#3d4653!important;padding:12px 14px!important;white-space:nowrap!important;text-align:left!important}
.finance-data-table td{font-size:12px!important;padding:10px 14px!important;border-bottom:1px solid #e8e5df!important;vertical-align:middle!important}
.finance-data-table tbody tr:last-child td{border-bottom:0!important}

/* Hover/activo uniforme. */
.products-filter-toggle:hover,.products-filter-toggle.active,
.inventory-filter-toggle:hover,.inventory-filter-toggle.active,
.transfer-filter-toggle:hover,.transfer-filter-toggle.active,
.purchase-filter-toggle:hover,.purchase-filter-toggle.active,
.sales-filter-toggle:hover,.sales-filter-toggle.active,
.cash-filter-toggle:hover,.cash-filter-toggle.active,
.expense-filter-toggle:hover,.expense-filter-toggle.active,
.thirdparty-filter-toggle:hover,.thirdparty-filter-toggle.active,
.finance-filter-toggle:hover,.finance-filter-toggle.active{
  background:#fff!important;color:#111!important;border-color:#b99459!important;
  box-shadow:0 0 0 2px rgba(177,137,71,.08)!important;transform:none!important;filter:none!important;
}

@media(max-width:1180px){
  .products-filter-toolbar,.inventory-filter-toolbar,.transfer-table-toolbar,.purchase-table-toolbar,
  .sales-table-toolbar,.cash-table-toolbar,.expense-table-toolbar,.thirdparty-filter-toolbar,.finance-table-toolbar{
    height:auto!important;min-height:var(--sales-toolbar-h)!important;flex-wrap:wrap!important;
  }
  .products-search-box,.inventory-search-box,.transfer-table-search,.purchase-table-search,.sales-table-search,
  .cash-table-search,.expense-table-search,.thirdparty-search,.finance-table-search{
    flex:1 0 100%!important;width:100%!important;max-width:none!important;
  }
  .products-results-count,.inventory-results-count,.transfer-results-count,.purchase-results-count,
  .sales-results-count,.expense-results-count,.thirdparty-results-count,.finance-results-count{margin-left:auto!important}
  .finance-filter-panel{flex-wrap:wrap!important}
}

@media(max-width:860px){
  .products-filter-toolbar,.inventory-filter-toolbar,.transfer-table-toolbar,.purchase-table-toolbar,
  .sales-table-toolbar,.cash-table-toolbar,.expense-table-toolbar,.thirdparty-filter-toolbar,.finance-table-toolbar{
    display:grid!important;grid-template-columns:1fr auto!important;gap:9px!important;
  }
  .products-search-box,.inventory-search-box,.transfer-table-search,.purchase-table-search,.sales-table-search,
  .cash-table-search,.expense-table-search,.thirdparty-search,.finance-table-search{
    grid-column:1/-1!important;width:100%!important;min-width:0!important;
  }
  .products-filter-toggle,.inventory-filter-toggle,.transfer-filter-toggle,.purchase-filter-toggle,
  .sales-filter-toggle,.cash-filter-toggle,.expense-filter-toggle,.thirdparty-filter-toggle,.finance-filter-toggle{
    grid-column:1!important;justify-self:start!important;
  }
  .products-results-count,.inventory-results-count,.transfer-results-count,.purchase-results-count,
  .sales-results-count,.expense-results-count,.thirdparty-results-count,.finance-results-count{
    grid-column:2!important;justify-self:end!important;align-self:center!important;margin-left:0!important;
  }
  .finance-filter-panel{display:grid!important;grid-template-columns:1fr 1fr!important}
  .finance-filter-select,.finance-date-filter{width:100%!important;min-width:0!important}
  .finance-clear-filter{grid-column:1/-1!important;width:100%!important}
}

@media(max-width:520px){
  .products-filter-toolbar,.inventory-filter-toolbar,.transfer-table-toolbar,.purchase-table-toolbar,
  .sales-table-toolbar,.cash-table-toolbar,.expense-table-toolbar,.thirdparty-filter-toolbar,.finance-table-toolbar{
    grid-template-columns:1fr!important;padding:10px!important;
  }
  .products-filter-toolbar>*,.inventory-filter-toolbar>*,.transfer-table-toolbar>*,.purchase-table-toolbar>*,
  .sales-table-toolbar>*,.cash-table-toolbar>*,.expense-table-toolbar>*,.thirdparty-filter-toolbar>*,.finance-table-toolbar>*{
    grid-column:1!important;width:100%!important;max-width:none!important;min-width:0!important;
  }
  .products-filter-toggle,.inventory-filter-toggle,.transfer-filter-toggle,.purchase-filter-toggle,
  .sales-filter-toggle,.cash-filter-toggle,.expense-filter-toggle,.thirdparty-filter-toggle,.finance-filter-toggle{
    justify-self:stretch!important;flex-basis:auto!important;
  }
  .products-results-count,.inventory-results-count,.transfer-results-count,.purchase-results-count,
  .sales-results-count,.expense-results-count,.thirdparty-results-count,.finance-results-count{
    justify-self:start!important;text-align:left!important;margin-left:0!important;
  }
  .finance-filter-panel{grid-template-columns:1fr!important;padding:10px!important}
  .finance-filter-panel>*{grid-column:1!important;width:100%!important;min-width:0!important}
}

/* ======================================================================
   V258 · BARRA EXACTA DE VENTAS — COMPRAS / GASTOS / VENTAS / CAJA / TRASLADOS
   Se usan IDs de toolbar para superar las reglas históricas específicas por vista.
   Desktop: franja 66px, buscador flexible 41px, Filtros 92x40px, contador a la derecha.
   ====================================================================== */
:root{
  --unified-sales-toolbar-height:66px;
  --unified-sales-toolbar-padding:13px;
  --unified-sales-toolbar-gap:10px;
  --unified-sales-search-height:41px;
  --unified-sales-filter-width:92px;
  --unified-sales-filter-height:40px;
}

/* La tarjeta que contiene la tabla siempre usa todo el ancho disponible del módulo. */
html body .unified-sales-card{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Selector por ID: prevalece sobre las reglas viejas de purchase-view / cash-view / etc. */
#purchaseUnifiedToolbar,
#expenseUnifiedToolbar,
#saleUnifiedToolbar,
#cashUnifiedToolbar,
#transferUnifiedToolbar{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:var(--unified-sales-toolbar-height)!important;
  min-height:var(--unified-sales-toolbar-height)!important;
  padding:var(--unified-sales-toolbar-padding)!important;
  margin:0!important;
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:var(--unified-sales-toolbar-gap)!important;
  background:#fff!important;
  border-bottom:1px solid #ece8e1!important;
  overflow:visible!important;
}

/* Buscador: ocupa exactamente el espacio libre entre el borde izquierdo y Filtros. */
#purchaseUnifiedToolbar .unified-sales-search,
#expenseUnifiedToolbar .unified-sales-search,
#saleUnifiedToolbar .unified-sales-search,
#cashUnifiedToolbar .unified-sales-search,
#transferUnifiedToolbar .unified-sales-search{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  height:var(--unified-sales-search-height)!important;
  min-height:var(--unified-sales-search-height)!important;
  padding:0 12px!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  gap:0!important;
  border:1px solid #d7d9dd!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:none!important;
}
#purchaseUnifiedToolbar .unified-sales-search svg,
#expenseUnifiedToolbar .unified-sales-search svg,
#saleUnifiedToolbar .unified-sales-search svg,
#cashUnifiedToolbar .unified-sales-search svg,
#transferUnifiedToolbar .unified-sales-search svg{
  width:19px!important;
  height:19px!important;
  min-width:19px!important;
  flex:0 0 19px!important;
  color:#344256!important;
  stroke-width:1.8!important;
}
#purchaseUnifiedToolbar .unified-sales-search input,
#expenseUnifiedToolbar .unified-sales-search input,
#saleUnifiedToolbar .unified-sales-search input,
#cashUnifiedToolbar .unified-sales-search input,
#transferUnifiedToolbar .unified-sales-search input{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  padding:0 10px!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#111!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:13px!important;
  line-height:1!important;
}

/* Botón Filtros: exactamente la caja usada en Ventas. */
#purchaseUnifiedToolbar .unified-sales-filter-btn,
#expenseUnifiedToolbar .unified-sales-filter-btn,
#saleUnifiedToolbar .unified-sales-filter-btn,
#cashUnifiedToolbar .unified-sales-filter-btn,
#transferUnifiedToolbar .unified-sales-filter-btn{
  box-sizing:border-box!important;
  flex:0 0 var(--unified-sales-filter-width)!important;
  width:var(--unified-sales-filter-width)!important;
  min-width:var(--unified-sales-filter-width)!important;
  max-width:var(--unified-sales-filter-width)!important;
  height:var(--unified-sales-filter-height)!important;
  min-height:var(--unified-sales-filter-height)!important;
  max-height:var(--unified-sales-filter-height)!important;
  padding:0 12px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:1px solid #ccb890!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#111!important;
  box-shadow:none!important;
  transform:none!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#purchaseUnifiedToolbar .unified-sales-filter-btn svg,
#expenseUnifiedToolbar .unified-sales-filter-btn svg,
#saleUnifiedToolbar .unified-sales-filter-btn svg,
#cashUnifiedToolbar .unified-sales-filter-btn svg,
#transferUnifiedToolbar .unified-sales-filter-btn svg{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  flex:0 0 18px!important;
  stroke-width:1.8!important;
}

/* El spacer histórico es el que dejaba huecos en varios módulos. */
#purchaseUnifiedToolbar .unified-sales-spacer,
#expenseUnifiedToolbar .unified-sales-spacer,
#saleUnifiedToolbar .unified-sales-spacer,
#cashUnifiedToolbar .unified-sales-spacer,
#transferUnifiedToolbar .unified-sales-spacer{
  display:none!important;
  width:0!important;
  min-width:0!important;
  flex:0 0 0!important;
  margin:0!important;
  padding:0!important;
}

/* Contador en el extremo derecho, sin robar ancho innecesario al buscador. */
#purchaseUnifiedToolbar .unified-sales-results,
#expenseUnifiedToolbar .unified-sales-results,
#saleUnifiedToolbar .unified-sales-results,
#cashUnifiedToolbar .unified-sales-results,
#transferUnifiedToolbar .unified-sales-results{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:68px!important;
  max-width:none!important;
  margin:0 0 0 8px!important;
  padding:0!important;
  align-self:center!important;
  color:#596579!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.2!important;
  text-align:right!important;
  white-space:nowrap!important;
}

/* Estados del botón sin alterar sus dimensiones. */
#purchaseUnifiedToolbar .unified-sales-filter-btn:hover,
#purchaseUnifiedToolbar .unified-sales-filter-btn.active,
#expenseUnifiedToolbar .unified-sales-filter-btn:hover,
#expenseUnifiedToolbar .unified-sales-filter-btn.active,
#saleUnifiedToolbar .unified-sales-filter-btn:hover,
#saleUnifiedToolbar .unified-sales-filter-btn.active,
#cashUnifiedToolbar .unified-sales-filter-btn:hover,
#cashUnifiedToolbar .unified-sales-filter-btn.active,
#transferUnifiedToolbar .unified-sales-filter-btn:hover,
#transferUnifiedToolbar .unified-sales-filter-btn.active{
  border-color:#b99459!important;
  background:#fff!important;
  color:#111!important;
  box-shadow:0 0 0 2px rgba(177,137,71,.08)!important;
}

/* Responsive: conserva el patrón de Ventas sin desbordar el sidebar. */
@media(max-width:1180px){
  #purchaseUnifiedToolbar,#expenseUnifiedToolbar,#saleUnifiedToolbar,#cashUnifiedToolbar,#transferUnifiedToolbar{
    height:auto!important;
    min-height:var(--unified-sales-toolbar-height)!important;
    flex-wrap:wrap!important;
  }
  #purchaseUnifiedToolbar .unified-sales-search,
  #expenseUnifiedToolbar .unified-sales-search,
  #saleUnifiedToolbar .unified-sales-search,
  #cashUnifiedToolbar .unified-sales-search,
  #transferUnifiedToolbar .unified-sales-search{
    flex:1 0 100%!important;
    width:100%!important;
  }
  #purchaseUnifiedToolbar .unified-sales-results,
  #expenseUnifiedToolbar .unified-sales-results,
  #saleUnifiedToolbar .unified-sales-results,
  #cashUnifiedToolbar .unified-sales-results,
  #transferUnifiedToolbar .unified-sales-results{
    margin-left:auto!important;
  }
}
@media(max-width:860px){
  #purchaseUnifiedToolbar,#expenseUnifiedToolbar,#saleUnifiedToolbar,#cashUnifiedToolbar,#transferUnifiedToolbar{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:9px!important;
  }
  #purchaseUnifiedToolbar .unified-sales-search,
  #expenseUnifiedToolbar .unified-sales-search,
  #saleUnifiedToolbar .unified-sales-search,
  #cashUnifiedToolbar .unified-sales-search,
  #transferUnifiedToolbar .unified-sales-search{
    grid-column:1/-1!important;
    width:100%!important;
  }
  #purchaseUnifiedToolbar .unified-sales-filter-btn,
  #expenseUnifiedToolbar .unified-sales-filter-btn,
  #saleUnifiedToolbar .unified-sales-filter-btn,
  #cashUnifiedToolbar .unified-sales-filter-btn,
  #transferUnifiedToolbar .unified-sales-filter-btn{
    grid-column:1!important;
    justify-self:start!important;
  }
  #purchaseUnifiedToolbar .unified-sales-results,
  #expenseUnifiedToolbar .unified-sales-results,
  #saleUnifiedToolbar .unified-sales-results,
  #cashUnifiedToolbar .unified-sales-results,
  #transferUnifiedToolbar .unified-sales-results{
    grid-column:2!important;
    justify-self:end!important;
    margin-left:0!important;
  }
}
@media(max-width:520px){
  #purchaseUnifiedToolbar,#expenseUnifiedToolbar,#saleUnifiedToolbar,#cashUnifiedToolbar,#transferUnifiedToolbar{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
  #purchaseUnifiedToolbar .unified-sales-search,#purchaseUnifiedToolbar .unified-sales-filter-btn,#purchaseUnifiedToolbar .unified-sales-results,
  #expenseUnifiedToolbar .unified-sales-search,#expenseUnifiedToolbar .unified-sales-filter-btn,#expenseUnifiedToolbar .unified-sales-results,
  #saleUnifiedToolbar .unified-sales-search,#saleUnifiedToolbar .unified-sales-filter-btn,#saleUnifiedToolbar .unified-sales-results,
  #cashUnifiedToolbar .unified-sales-search,#cashUnifiedToolbar .unified-sales-filter-btn,#cashUnifiedToolbar .unified-sales-results,
  #transferUnifiedToolbar .unified-sales-search,#transferUnifiedToolbar .unified-sales-filter-btn,#transferUnifiedToolbar .unified-sales-results{
    grid-column:1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    justify-self:stretch!important;
    margin-left:0!important;
    text-align:left!important;
  }
}

/* ======================================================================
   V262 · COMPRAS — MODAL "SALDO INICIAL" FIEL A LA REFERENCIA
   ----------------------------------------------------------------------
   Esta capa solo afecta #modal.opening-balance-modal. El resto de modales
   y módulos conserva sus estilos anteriores.
   ====================================================================== */
html body.purchase-view #modal.opening-balance-modal{
  --opening-ink:#101827;
  --opening-muted:#596579;
  --opening-line:#ddd8d0;
  --opening-soft-line:#ece7df;
  --opening-gold:#9a6d29;
  --opening-gold-dark:#8f6422;
  --opening-gold-soft:#f4ecdf;
  --opening-section:#fbf8f3;
  --opening-blue:#2067b2;
  --opening-blue-bg:#edf5ff;
  z-index:300!important;
  box-sizing:border-box!important;
  inset:0!important;
  /* Centrado real respecto a todo el viewport. El z-index mantiene el modal
     por encima del sidebar, por lo que no hace falta desplazarlo hacia la derecha. */
  padding:14px 18px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:rgba(25,31,39,.36)!important;
  backdrop-filter:blur(1.2px)!important;
  -webkit-backdrop-filter:blur(1.2px)!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-card{
  box-sizing:border-box!important;
  width:min(1180px,calc(100vw - 36px))!important;
  max-width:1180px!important;
  height:auto!important;
  max-height:calc(100dvh - 28px)!important;
  margin:0!important;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid #ded9d1!important;
  border-radius:11px!important;
  background:#fff!important;
  color:var(--opening-ink)!important;
  box-shadow:0 24px 70px rgba(15,23,42,.24)!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-head{
  box-sizing:border-box!important;
  min-height:108px!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  padding:17px 20px!important;
  border-bottom:1px solid var(--opening-soft-line)!important;
  background:#fff!important;
  position:relative!important;
  z-index:4!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-title-wrap{
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
  min-width:0!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-lead-icon{
  display:grid!important;
  place-items:center!important;
  width:74px!important;
  height:74px!important;
  min-width:74px!important;
  flex:0 0 74px!important;
  border-radius:11px!important;
  background:var(--opening-gold-soft)!important;
  color:#191817!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-lead-icon svg{
  width:35px!important;
  height:35px!important;
  stroke-width:1.8!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-title-copy{min-width:0!important}
html body.purchase-view #modal.opening-balance-modal #modalEyebrow{
  margin:0 0 5px!important;
  color:var(--opening-muted)!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:600!important;
  letter-spacing:.025em!important;
}
html body.purchase-view #modal.opening-balance-modal #modalTitle{
  margin:0!important;
  color:var(--opening-ink)!important;
  font-size:25px!important;
  line-height:1.06!important;
  letter-spacing:-.45px!important;
  font-weight:700!important;
}
html body.purchase-view #modal.opening-balance-modal .modal-subtitle{
  display:block!important;
  margin:4px 0 0!important;
  color:var(--opening-muted)!important;
  font-size:13px!important;
  line-height:1.3!important;
  font-weight:400!important;
}
html body.purchase-view #modal.opening-balance-modal #closeModal{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border:1px solid #dcd7ce!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#151a22!important;
  font-size:25px!important;
  line-height:1!important;
  display:grid!important;
  place-items:center!important;
  padding:0 0 3px!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.opening-balance-modal #closeModal:hover{background:#faf8f5!important;border-color:#cfc7bb!important}
html body.purchase-view #modal.opening-balance-modal .modal-body{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  min-height:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:12px 18px 12px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#fff!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin;
  scrollbar-color:#8d8d8d transparent;
}
html body.purchase-view #modal.opening-balance-modal .modal-body::-webkit-scrollbar{width:8px}
html body.purchase-view #modal.opening-balance-modal .modal-body::-webkit-scrollbar-thumb{background:#8d8d8d;border-radius:8px}
html body.purchase-view #modal.opening-balance-modal .opening-balance-form{
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  gap:12px!important;
  color:var(--opening-ink)!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-section{
  min-width:0!important;
  overflow:visible!important;
  border:1px solid #ddd7ce!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-section-head{
  box-sizing:border-box!important;
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  padding:7px 11px!important;
  border-bottom:1px solid #e7e1d8!important;
  background:linear-gradient(90deg,#fbf7f0 0%,#fff 62%)!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-section-icon{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  flex:0 0 44px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  background:#f2e9da!important;
  color:#171717!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-section-icon svg{width:24px!important;height:24px!important;stroke-width:1.8!important}
html body.purchase-view #modal.opening-balance-modal .opening-section-head h3{
  margin:0 0 2px!important;
  color:#111827!important;
  font-size:15px!important;
  line-height:1.15!important;
  font-weight:700!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-section-head p{
  margin:0!important;
  color:var(--opening-muted)!important;
  font-size:11.5px!important;
  line-height:1.25!important;
  font-weight:400!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-section-body{box-sizing:border-box!important;padding:11px 16px 13px!important}
html body.purchase-view #modal.opening-balance-modal .opening-data-body{padding-top:10px!important}
html body.purchase-view #modal.opening-balance-modal .opening-data-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  column-gap:16px!important;
  row-gap:11px!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-field{
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  gap:5px!important;
  color:#39465a!important;
  font-size:11.5px!important;
  line-height:1.15!important;
  font-weight:500!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-field-label{display:block!important;min-height:13px!important}
html body.purchase-view #modal.opening-balance-modal .opening-required{color:#e13b3b!important;font-weight:700!important;margin-left:2px!important}
html body.purchase-view #modal.opening-balance-modal .opening-field-label em{font-style:normal!important;color:#667085!important;margin-left:8px!important;font-size:11px!important}
html body.purchase-view #modal.opening-balance-modal .opening-control{
  box-sizing:border-box!important;
  width:100%!important;
  height:36px!important;
  min-height:36px!important;
  display:flex!important;
  align-items:center!important;
  position:relative!important;
  overflow:hidden!important;
  border:1px solid #d6d9df!important;
  border-radius:6px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-control:focus-within{border-color:#b59460!important;box-shadow:0 0 0 2px rgba(181,148,96,.08)!important}
html body.purchase-view #modal.opening-balance-modal .opening-control-icon{
  box-sizing:border-box!important;
  width:39px!important;
  height:100%!important;
  flex:0 0 39px!important;
  display:grid!important;
  place-items:center!important;
  color:#273548!important;
  background:#fff!important;
  border-right:1px solid #e5e7eb!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-control-icon svg{width:17px!important;height:17px!important;stroke-width:1.8!important}
html body.purchase-view #modal.opening-balance-modal .opening-control input,
html body.purchase-view #modal.opening-balance-modal .opening-control select{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0 10px!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#101827!important;
  box-shadow:none!important;
  font:500 12px/1.15 Inter,Arial,sans-serif!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-control input[readonly]{background:#fff!important;color:#101827!important;cursor:default!important}
html body.purchase-view #modal.opening-balance-modal .opening-origin-chevron{
  position:absolute!important;
  right:9px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:16px!important;
  height:16px!important;
  display:grid!important;
  place-items:center!important;
  pointer-events:none!important;
  color:#172033!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-origin-chevron svg{width:15px!important;height:15px!important}
html body.purchase-view #modal.opening-balance-modal .opening-inventory-origin{padding-right:34px!important}
html body.purchase-view #modal.opening-balance-modal input[type="date"]{color-scheme:light!important}
html body.purchase-view #modal.opening-balance-modal .opening-info-bar{
  box-sizing:border-box!important;
  min-height:37px!important;
  margin-top:11px!important;
  padding:7px 12px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  border:1px solid #cddff6!important;
  border-radius:5px!important;
  background:#eaf4ff!important;
  color:#244d7e!important;
  font-size:11.5px!important;
  line-height:1.25!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-info-icon,
html body.purchase-view #modal.opening-balance-modal .opening-products-hint b{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  display:inline-grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:#236bb5!important;
  color:#fff!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:700!important;
  font-style:normal!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-products-head{position:relative!important}
html body.purchase-view #modal.opening-balance-modal .opening-products-hint{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  color:#265b99!important;
  font-size:11.5px!important;
  font-weight:500!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-products-hint b{width:16px!important;height:16px!important;min-width:16px!important;font-size:10px!important;background:transparent!important;color:#2065ad!important;border:1.5px solid #2065ad!important}
html body.purchase-view #modal.opening-balance-modal .opening-products-body{padding:10px 14px 11px!important}
html body.purchase-view #modal.opening-balance-modal .opening-product-entry{
  display:grid!important;
  grid-template-columns:minmax(310px,2.15fr) minmax(145px,.9fr) minmax(175px,1.1fr) 108px!important;
  gap:12px!important;
  align-items:end!important;
  min-width:0!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-product-entry .opening-field{min-width:0!important}
html body.purchase-view #modal.opening-balance-modal .opening-product-search{position:relative!important;min-width:0!important}
html body.purchase-view #modal.opening-balance-modal .opening-product-search .purchase-product-results{
  top:100%!important;
  margin-top:5px!important;
  z-index:360!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-add-btn{
  box-sizing:border-box!important;
  width:108px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 14px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:1px solid var(--opening-gold-dark)!important;
  border-radius:6px!important;
  background:linear-gradient(180deg,#a67b37,#906523)!important;
  color:#fff!important;
  box-shadow:none!important;
  font:600 12px/1 Inter,Arial,sans-serif!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-add-btn svg{width:17px!important;height:17px!important;stroke-width:1.8!important}
html body.purchase-view #modal.opening-balance-modal .opening-lines-card{
  box-sizing:border-box!important;
  width:100%!important;
  margin-top:12px!important;
  overflow:hidden!important;
  border:1px solid #dfd9d0!important;
  border-radius:6px!important;
  background:#fff!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table{
  width:100%!important;
  border-collapse:collapse!important;
  table-layout:fixed!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table thead{background:#f5eee4!important}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th{
  box-sizing:border-box!important;
  height:39px!important;
  padding:0 9px!important;
  border:0!important;
  border-bottom:1px solid #e1dacf!important;
  color:#526071!important;
  background:#f5eee4!important;
  text-align:left!important;
  font:600 9.5px/1 Inter,Arial,sans-serif!important;
  letter-spacing:.01em!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(1){width:5%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(2){width:11%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(3){width:28%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(4){width:12%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(5){width:12%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(6){width:15%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(7){width:12%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table th:nth-child(8){width:10%}
html body.purchase-view #modal.opening-balance-modal .opening-lines-table td{
  padding:9px!important;
  border-bottom:1px solid #ece8e1!important;
  color:#273548!important;
  font-size:11px!important;
  vertical-align:middle!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-line-product strong{display:block!important;color:#101827!important}
html body.purchase-view #modal.opening-balance-modal .opening-line-product small{display:block!important;margin-top:2px!important;color:#7a8493!important;font-size:9.5px!important}
html body.purchase-view #modal.opening-balance-modal .opening-line-number{font-variant-numeric:tabular-nums!important;white-space:nowrap!important}
html body.purchase-view #modal.opening-balance-modal .opening-remove-line{width:30px!important;height:30px!important;border:1px solid #efc1bd!important;border-radius:5px!important;background:#fff!important;color:#d43d32!important;display:grid!important;place-items:center!important;padding:0!important}
html body.purchase-view #modal.opening-balance-modal .opening-remove-line svg{width:15px!important;height:15px!important}
html body.purchase-view #modal.opening-balance-modal .opening-lines-empty{
  box-sizing:border-box!important;
  min-height:104px!important;
  margin:6px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  border:1px dashed #cbd0d7!important;
  border-radius:5px!important;
  color:#617087!important;
  background:#fff!important;
  text-align:center!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-empty-icon{display:grid!important;place-items:center!important;color:#b9c0ca!important;margin-bottom:2px!important}
html body.purchase-view #modal.opening-balance-modal .opening-empty-icon svg{width:34px!important;height:34px!important;stroke-width:1.55!important}
html body.purchase-view #modal.opening-balance-modal .opening-lines-empty strong{font-size:11px!important;font-weight:500!important;color:#5f6d82!important}
html body.purchase-view #modal.opening-balance-modal .opening-lines-empty small{font-size:10px!important;color:#8a94a4!important}
html body.purchase-view #modal.opening-balance-modal .opening-totals-body{padding:10px 14px 11px!important}
html body.purchase-view #modal.opening-balance-modal .opening-totals-grid{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  column-gap:16px!important;
  row-gap:10px!important;
  align-items:end!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-total-subtotal,
html body.purchase-view #modal.opening-balance-modal .opening-total-discount,
html body.purchase-view #modal.opening-balance-modal .opening-total-taxes,
html body.purchase-view #modal.opening-balance-modal .opening-total-other{grid-column:span 3!important}
html body.purchase-view #modal.opening-balance-modal .opening-total-total,
html body.purchase-view #modal.opening-balance-modal .opening-total-paid,
html body.purchase-view #modal.opening-balance-modal .opening-total-balance{grid-column:span 4!important}
html body.purchase-view #modal.opening-balance-modal .opening-final-row{
  margin-top:9px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:14px!important;
  align-items:end!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-notes{min-width:0!important}
html body.purchase-view #modal.opening-balance-modal .opening-form-actions{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-cancel-btn,
html body.purchase-view #modal.opening-balance-modal .opening-submit-btn{
  box-sizing:border-box!important;
  height:42px!important;
  min-height:42px!important;
  border-radius:7px!important;
  padding:0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  font:600 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.opening-balance-modal .opening-cancel-btn{min-width:88px!important;border:1px solid #d7dadd!important;background:#fff!important;color:#172033!important}
html body.purchase-view #modal.opening-balance-modal .opening-submit-btn{min-width:176px!important;border:1px solid var(--opening-gold-dark)!important;background:linear-gradient(180deg,#a47a37,#906523)!important;color:#fff!important}
html body.purchase-view #modal.opening-balance-modal .opening-submit-btn svg{width:17px!important;height:17px!important}

/* El modal siempre queda por encima del sidebar; en escritorio se desplaza solo
   lo necesario para conservar la composición de la referencia, no todo el ancho
   del sidebar. */
html body.purchase-view #modal.opening-balance-modal{z-index:300!important}

@media(max-width:1180px){
  html body.purchase-view #modal.opening-balance-modal{padding:12px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-card{width:min(1080px,calc(100vw - 24px))!important;max-width:none!important}
  html body.purchase-view #modal.opening-balance-modal .opening-product-entry{grid-template-columns:minmax(280px,2fr) minmax(130px,.9fr) minmax(150px,1fr) 105px!important;gap:9px!important}
}
@media(max-width:900px){
  html body.purchase-view #modal.opening-balance-modal{align-items:end!important;padding:10px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-card{width:100%!important;max-height:calc(100dvh - 20px)!important;border-radius:10px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-head{min-height:88px!important;padding:13px 15px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-lead-icon{width:58px!important;height:58px!important;min-width:58px!important;flex-basis:58px!important}
  html body.purchase-view #modal.opening-balance-modal #modalTitle{font-size:22px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-body{padding:10px!important}
  html body.purchase-view #modal.opening-balance-modal .opening-data-grid{grid-template-columns:1fr 1fr!important}
  html body.purchase-view #modal.opening-balance-modal .opening-product-entry{grid-template-columns:1fr 1fr!important}
  html body.purchase-view #modal.opening-balance-modal .opening-product-search{grid-column:1/-1!important}
  html body.purchase-view #modal.opening-balance-modal .opening-add-btn{width:100%!important}
  html body.purchase-view #modal.opening-balance-modal .opening-totals-grid{grid-template-columns:1fr 1fr!important}
  html body.purchase-view #modal.opening-balance-modal .opening-totals-grid>*{grid-column:auto!important}
  html body.purchase-view #modal.opening-balance-modal .opening-final-row{grid-template-columns:1fr!important}
  html body.purchase-view #modal.opening-balance-modal .opening-form-actions{justify-content:flex-end!important}
  html body.purchase-view #modal.opening-balance-modal .opening-lines-card{overflow-x:auto!important}
  html body.purchase-view #modal.opening-balance-modal .opening-lines-table{min-width:760px!important}
}
@media(max-width:620px){
  html body.purchase-view #modal.opening-balance-modal{padding:0!important;align-items:stretch!important}
  html body.purchase-view #modal.opening-balance-modal .modal-card{height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important}
  html body.purchase-view #modal.opening-balance-modal .modal-head{min-height:78px!important;padding:11px 12px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-title-wrap{gap:10px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-lead-icon{width:50px!important;height:50px!important;min-width:50px!important;flex-basis:50px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-lead-icon svg{width:26px!important;height:26px!important}
  html body.purchase-view #modal.opening-balance-modal #modalTitle{font-size:20px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-subtitle{font-size:11px!important}
  html body.purchase-view #modal.opening-balance-modal .modal-body{padding:8px!important}
  html body.purchase-view #modal.opening-balance-modal .opening-balance-form{gap:8px!important}
  html body.purchase-view #modal.opening-balance-modal .opening-section-head{min-height:52px!important;padding:5px 8px!important}
  html body.purchase-view #modal.opening-balance-modal .opening-products-hint{display:none!important}
  html body.purchase-view #modal.opening-balance-modal .opening-section-body{padding:9px!important}
  html body.purchase-view #modal.opening-balance-modal .opening-data-grid,
  html body.purchase-view #modal.opening-balance-modal .opening-product-entry,
  html body.purchase-view #modal.opening-balance-modal .opening-totals-grid{grid-template-columns:1fr!important}
  html body.purchase-view #modal.opening-balance-modal .opening-totals-grid>*{grid-column:1!important}
  html body.purchase-view #modal.opening-balance-modal .opening-form-actions{display:grid!important;grid-template-columns:1fr 1.45fr!important;width:100%!important}
  html body.purchase-view #modal.opening-balance-modal .opening-cancel-btn,
  html body.purchase-view #modal.opening-balance-modal .opening-submit-btn{width:100%!important;min-width:0!important;padding:0 10px!important}
}

/* ======================================================================
   V265 · COMPRAS — MODAL "NUEVA COMPRA" EXACTO A REFERENCIA
   ----------------------------------------------------------------------
   - Replica la ventana de Nueva compra de la captura suministrada.
   - El overlay y la tarjeta quedan por encima del sidebar (z-index 500).
   - En 1536 px conserva el desplazamiento visual de la referencia.
   - En resoluciones menores evita que el sidebar cubra la ventana.
   ====================================================================== */
html body.purchase-view #modal.purchase-entry-modal{
  z-index:500!important;
  box-sizing:border-box!important;
  position:fixed!important;
  inset:0!important;
  display:grid!important;
  place-items:start center!important;
  align-items:start!important;
  justify-items:center!important;
  padding:58px 18px 18px!important;
  overflow:auto!important;
  background:rgba(26,31,38,.24)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html body.purchase-view #modal.purchase-entry-modal.hidden{display:none!important}
html body.purchase-view #modal.purchase-entry-modal .modal-card{
  box-sizing:border-box!important;
  width:1044px!important;
  max-width:calc(100vw - 36px)!important;
  max-height:calc(100dvh - 76px)!important;
  overflow:hidden!important;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  border:1px solid #ded8cf!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#101827!important;
  box-shadow:0 28px 80px rgba(15,23,42,.26)!important;
  transform:translateX(52px)!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-head{
  box-sizing:border-box!important;
  min-height:104px!important;
  flex:0 0 104px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:18px 20px 14px 25px!important;
  border:0!important;
  background:#fff!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-title-wrap{
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  min-width:0!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-lead-icon{
  width:70px!important;
  height:70px!important;
  min-width:70px!important;
  flex:0 0 70px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:10px!important;
  background:linear-gradient(145deg,#f5ead8,#f6eddc)!important;
  color:#111!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-lead-icon svg{width:34px!important;height:34px!important;stroke-width:1.9!important}
html body.purchase-view #modal.purchase-entry-modal .modal-title-copy{min-width:0!important;display:block!important}
html body.purchase-view #modal.purchase-entry-modal #modalEyebrow{
  margin:0 0 3px!important;
  color:#526076!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  letter-spacing:0!important;
}
html body.purchase-view #modal.purchase-entry-modal #modalTitle{
  margin:0!important;
  color:#0d1830!important;
  font-size:24px!important;
  line-height:1.15!important;
  font-weight:750!important;
  letter-spacing:-.35px!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-subtitle{
  display:block!important;
  margin:4px 0 0!important;
  color:#56657b!important;
  font-size:13px!important;
  line-height:1.25!important;
  font-weight:400!important;
}
html body.purchase-view #modal.purchase-entry-modal #closeModal{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  display:grid!important;
  place-items:center!important;
  padding:0 0 2px!important;
  border:1px solid #d9d4cc!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#172033!important;
  box-shadow:none!important;
  font-size:22px!important;
  line-height:1!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-body{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  min-height:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0 20px 14px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#fff!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:#9a9a9a transparent!important;
}
html body.purchase-view #modal.purchase-entry-modal .modal-body::-webkit-scrollbar{width:7px!important}
html body.purchase-view #modal.purchase-entry-modal .modal-body::-webkit-scrollbar-thumb{background:#989898!important;border-radius:8px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-form{
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  gap:10px!important;
  color:#101827!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section{
  box-sizing:border-box!important;
  min-width:0!important;
  overflow:visible!important;
  border:1px solid #ddd6cb!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-head{
  box-sizing:border-box!important;
  min-height:56px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:7px 12px!important;
  border-bottom:1px solid #ebe5dc!important;
  background:linear-gradient(90deg,#fbf7f0 0%,#fff 66%)!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-icon{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  flex:0 0 42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  background:#f2e7d7!important;
  color:#181818!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-icon svg{width:23px!important;height:23px!important;stroke-width:1.8!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-copy{min-width:0!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-copy h3{
  margin:0 0 2px!important;
  color:#111c31!important;
  font-size:15px!important;
  line-height:1.15!important;
  font-weight:750!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-copy p{
  margin:0!important;
  color:#617087!important;
  font-size:11.5px!important;
  line-height:1.2!important;
  font-weight:400!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-view-provider{
  margin-left:auto!important;
  height:35px!important;
  min-width:125px!important;
  padding:0 13px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  border:1px solid #d3d6dc!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  font-size:11.5px!important;
  font-weight:600!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-view-provider b{font-size:15px!important;font-weight:500!important;line-height:1!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-body{box-sizing:border-box!important;padding:10px 14px 13px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-body{padding:9px 14px 13px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  column-gap:14px!important;
  row-gap:9px!important;
  align-items:end!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-supplier-wrap{position:relative!important;min-width:0!important;grid-column:span 3!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-invoice{grid-column:span 3!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-date{grid-column:span 3!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-due{grid-column:span 3!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-payment,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-method,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-reference{grid-column:span 2!important;min-width:0!important;width:auto!important;justify-self:stretch!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-field{
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  gap:5px!important;
  color:#40506a!important;
  font-size:11.5px!important;
  line-height:1.1!important;
  font-weight:550!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-label{display:block!important;min-height:13px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-required{color:#e33131!important;font-weight:800!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control{
  box-sizing:border-box!important;
  width:100%!important;
  height:35px!important;
  min-height:35px!important;
  display:flex!important;
  align-items:center!important;
  position:relative!important;
  overflow:hidden!important;
  border:1px solid #d6d9df!important;
  border-radius:5px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control:focus-within{border-color:#a9834b!important;box-shadow:0 0 0 2px rgba(169,131,75,.08)!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control-icon{
  box-sizing:border-box!important;
  width:39px!important;
  height:100%!important;
  min-width:39px!important;
  flex:0 0 39px!important;
  display:grid!important;
  place-items:center!important;
  color:#24405a!important;
  background:#fff!important;
  border-right:1px solid #e6e8eb!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control-icon svg{width:17px!important;height:17px!important;stroke-width:1.8!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control input,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control select{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0 10px!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#132038!important;
  box-shadow:none!important;
  font:500 12px/1.1 Inter,Arial,sans-serif!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control input::placeholder{color:#6c7890!important;opacity:1!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-control input[readonly]{background:#fff!important;color:#101827!important}
html body.purchase-view #modal.purchase-entry-modal input[type="date"]{color-scheme:light!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-supplier-results{
  top:calc(100% + 5px)!important;
  left:0!important;
  right:0!important;
  z-index:560!important;
  max-height:230px!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-info{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  color:#1759aa!important;
  font-size:11.5px!important;
  font-weight:500!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-info b{
  width:15px!important;
  height:15px!important;
  min-width:15px!important;
  display:inline-grid!important;
  place-items:center!important;
  border:1.5px solid #1762b8!important;
  border-radius:50%!important;
  color:#1762b8!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:800!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-products-body{padding:9px 14px 10px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-entry{
  display:grid!important;
  grid-template-columns:minmax(310px,2.6fr) minmax(140px,1fr) minmax(190px,1.35fr) 120px!important;
  gap:11px!important;
  align-items:end!important;
  min-width:0!important;
  margin-bottom:10px!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-search{position:relative!important;min-width:0!important;grid-column:auto!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-search .purchase-product-results{top:100%!important;margin-top:5px!important;z-index:560!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-add-btn{
  box-sizing:border-box!important;
  width:120px!important;
  height:35px!important;
  min-height:35px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:1px solid #8f6729!important;
  border-radius:5px!important;
  background:linear-gradient(180deg,#a27a3b,#8e6628)!important;
  color:#fff!important;
  box-shadow:none!important;
  font:600 12px/1 Inter,Arial,sans-serif!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-add-btn svg{width:17px!important;height:17px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-card{
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid #ddd8d0!important;
  border-radius:5px!important;
  background:#fff!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table{
  width:100%!important;
  border-collapse:collapse!important;
  table-layout:fixed!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table thead{background:#f8f4ee!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th{
  height:36px!important;
  padding:8px 9px!important;
  border:0!important;
  border-bottom:1px solid #e8e3dc!important;
  background:transparent!important;
  color:#5a6778!important;
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:500!important;
  text-align:left!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(1){width:5%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(2){width:11%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(3){width:22%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(4){width:11%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(5){width:12%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(6){width:16%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(7){width:13%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table th:nth-child(8){width:10%}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table td{
  padding:8px 9px!important;
  border-bottom:1px solid #ece8e1!important;
  color:#273548!important;
  background:#fff!important;
  font-size:10.5px!important;
  vertical-align:middle!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-line-product strong{display:block!important;color:#101827!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-line-product small{display:block!important;margin-top:2px!important;color:#7a8493!important;font-size:9px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-remove-line{width:29px!important;height:29px!important;border:1px solid #efc1bd!important;border-radius:5px!important;background:#fff!important;color:#d43d32!important;display:grid!important;place-items:center!important;padding:0!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-remove-line svg{width:14px!important;height:14px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-empty{
  box-sizing:border-box!important;
  min-height:98px!important;
  margin:5px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  border:1px dashed #9ea6b0!important;
  border-radius:3px!important;
  background:#fff!important;
  color:#65728a!important;
  text-align:center!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-empty>span{display:grid!important;place-items:center!important;color:#b9a47e!important;margin-bottom:1px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-empty>span svg{width:31px!important;height:31px!important;stroke-width:1.55!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-empty strong{font-size:11px!important;font-weight:600!important;color:#617087!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-empty small{font-size:10px!important;color:#76839a!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-body{padding:8px 14px 10px!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-grid{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  column-gap:16px!important;
  row-gap:8px!important;
  align-items:end!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-subtotal,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-discount,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-taxes,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-other{grid-column:span 3!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-total,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-balance{grid-column:span 6!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-total .purchase-modal-control input,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-total-balance .purchase-modal-control input{font-weight:750!important;color:#101827!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-final-row{
  margin-top:7px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:14px!important;
  align-items:end!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-notes{min-width:0!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-actions{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:9px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-cancel,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-submit{
  box-sizing:border-box!important;
  height:41px!important;
  min-height:41px!important;
  border-radius:6px!important;
  padding:0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  font:600 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-cancel{min-width:94px!important;border:1px solid #d6d9df!important;background:#fff!important;color:#172033!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-submit{min-width:180px!important;border:1px solid #8e6628!important;background:linear-gradient(180deg,#a27a3b,#8e6628)!important;color:#fff!important}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-submit svg{width:17px!important;height:17px!important}

/* Escritorio intermedio: la tarjeta queda completamente a la derecha del sidebar. */
@media(min-width:1201px) and (max-width:1449px){
  html body.purchase-view #modal.purchase-entry-modal .modal-card{
    width:min(1044px,calc(100vw - 280px))!important;
    max-width:calc(100vw - 280px)!important;
    transform:translateX(110px)!important;
  }
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-entry{grid-template-columns:minmax(250px,2.2fr) minmax(115px,.9fr) minmax(150px,1.1fr) 110px!important;gap:8px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-add-btn{width:110px!important}
}
@media(max-width:1200px){
  html body.purchase-view #modal.purchase-entry-modal{padding:18px 14px!important;place-items:center!important;align-items:center!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-card{width:min(1044px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important;max-height:calc(100dvh - 36px)!important;transform:none!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-entry{grid-template-columns:minmax(260px,2fr) minmax(125px,.85fr) minmax(155px,1fr) 110px!important;gap:8px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-add-btn{width:110px!important}
}
@media(max-width:900px){
  html body.purchase-view #modal.purchase-entry-modal{padding:10px!important;align-items:end!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-card{width:100%!important;max-width:100%!important;max-height:calc(100dvh - 20px)!important;border-radius:10px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-head{min-height:88px!important;flex-basis:88px!important;padding:12px 14px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-lead-icon{width:58px!important;height:58px!important;min-width:58px!important;flex-basis:58px!important}
  html body.purchase-view #modal.purchase-entry-modal #modalTitle{font-size:21px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-body{padding:0 10px 10px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-grid{grid-template-columns:1fr 1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-grid>*{grid-column:auto!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-supplier-wrap,.purchase-modal-invoice,.purchase-modal-date,.purchase-modal-due{grid-column:auto!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-payment{grid-column:1/-1!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-method,.purchase-modal-reference{grid-column:auto!important;width:auto!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-entry{grid-template-columns:1fr 1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-search{grid-column:1/-1!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-add-btn{width:100%!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-card{overflow-x:auto!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-lines-table{min-width:760px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-grid{grid-template-columns:1fr 1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-grid>*{grid-column:auto!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-final-row{grid-template-columns:1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-actions{justify-content:flex-end!important}
}
@media(max-width:620px){
  html body.purchase-view #modal.purchase-entry-modal{padding:0!important;align-items:stretch!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-card{height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-head{min-height:78px!important;flex-basis:78px!important;padding:10px 11px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-title-wrap{gap:10px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-lead-icon{width:50px!important;height:50px!important;min-width:50px!important;flex-basis:50px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-lead-icon svg{width:26px!important;height:26px!important}
  html body.purchase-view #modal.purchase-entry-modal #modalEyebrow{font-size:10px!important}
  html body.purchase-view #modal.purchase-entry-modal #modalTitle{font-size:19px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-subtitle{font-size:10.5px!important}
  html body.purchase-view #modal.purchase-entry-modal .modal-body{padding:0 8px 8px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-form{gap:8px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-head{min-height:52px!important;padding:5px 8px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-icon{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-view-provider,
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-info{display:none!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-section-body{padding:8px!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-grid{display:grid!important;grid-template-columns:1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-grid>*{grid-column:1!important;width:100%!important;justify-self:stretch!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-entry{grid-template-columns:1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-product-search{grid-column:1!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-grid{grid-template-columns:1fr!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-grid>*{grid-column:1!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-actions{display:grid!important;grid-template-columns:1fr 1.5fr!important;width:100%!important}
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-cancel,
  html body.purchase-view #modal.purchase-entry-modal .purchase-modal-submit{width:100%!important;min-width:0!important;padding:0 10px!important}
}

/* V266 — Nueva compra centrada respecto al área útil (sin quedar bajo el sidebar) */
@media (min-width:1201px){
  html body.purchase-view #modal.purchase-entry-modal{
    box-sizing:border-box!important;
    padding-left:268px!important; /* sidebar 250px + 18px de separación */
    padding-right:18px!important;
    justify-items:center!important;
  }
  html body.purchase-view #modal.purchase-entry-modal .modal-card{
    width:min(1044px,calc(100vw - 286px))!important;
    max-width:calc(100vw - 286px)!important;
    transform:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}
@media (min-width:1025px) and (max-width:1200px){
  html body.purchase-view #modal.purchase-entry-modal{
    box-sizing:border-box!important;
    padding:18px 18px 18px 238px!important; /* sidebar 220px + 18px */
    place-items:center!important;
    align-items:center!important;
    justify-items:center!important;
  }
  html body.purchase-view #modal.purchase-entry-modal .modal-card{
    width:min(1044px,calc(100vw - 256px))!important;
    max-width:calc(100vw - 256px)!important;
    max-height:calc(100dvh - 36px)!important;
    transform:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}

/* ======================================================================
   V267 · COMPRAS — "NUEVA COMPRA" CENTRADA COMO "SALDO INICIAL"
   ----------------------------------------------------------------------
   En escritorio el modal se centra respecto al viewport completo, igual
   que Saldo inicial. El sidebar queda detrás del backdrop y nunca altera
   el cálculo del centro. Se conserva el ancho visual del formulario.
   ====================================================================== */
@media (min-width:901px){
  html body.purchase-view #modal.purchase-entry-modal{
    box-sizing:border-box!important;
    inset:0!important;
    padding:14px 18px!important;
    display:grid!important;
    place-items:center!important;
    align-items:center!important;
    justify-items:center!important;
    overflow:hidden!important;
    z-index:500!important;
  }
  html body.purchase-view #modal.purchase-entry-modal .modal-card{
    box-sizing:border-box!important;
    width:min(1044px,calc(100vw - 36px))!important;
    max-width:1044px!important;
    max-height:calc(100dvh - 28px)!important;
    margin:0!important;
    transform:none!important;
    position:relative!important;
  }
}

/* ======================================================================
   V268 · COMPRAS — FILTROS CON DESPLEGABLE TIPO "CREAR NUEVO PRODUCTO"
   - Los filtros Forma de pago y Estado usan el mismo patrón de select
     personalizado del modal Crear producto.
   - El desplegable toma exactamente el ancho del control.
   - Abre hacia arriba cuando no hay espacio suficiente.
   - El panel aprovecha mejor el ancho disponible de la tarjeta.
   ====================================================================== */
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-panel.purchase-filter-panel-v268{
  display:grid!important;
  grid-template-columns:minmax(230px,1fr) minmax(230px,1fr) minmax(205px,.82fr) auto!important;
  gap:12px!important;
  align-items:center!important;
  padding:12px 13px!important;
  border-bottom:1px solid #ece8e1!important;
  background:#fcfbf9!important;
  overflow:visible!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-table-card{
  overflow:visible!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-table-card .purchase-table-wrap,
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-data-wrap{
  overflow-x:auto!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  z-index:6!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select.open{
  z-index:30!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-trigger{
  width:100%!important;
  height:40px!important;
  padding:0 12px!important;
  border:1px solid #d7dadd!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1!important;
  box-shadow:none!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-trigger:focus-visible{
  outline:0!important;
  border-color:#a97c36!important;
  box-shadow:0 0 0 3px rgba(169,124,54,.12)!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-trigger>svg{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  color:#172033!important;
  transition:transform .16s ease!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select.open .product-custom-trigger>svg{
  transform:rotate(180deg)!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-menu{
  position:absolute!important;
  z-index:120!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  max-height:260px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  display:none!important;
  padding:6px!important;
  border:1px solid #d7dce4!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(15,23,42,.18),0 3px 10px rgba(15,23,42,.08)!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select.drop-up .product-custom-menu{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select.open .product-custom-menu{
  display:block!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-option{
  width:100%!important;
  min-height:36px!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:400!important;
  cursor:pointer!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-option:hover,
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-option:focus-visible{
  outline:0!important;
  background:#f7f1e7!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-option.selected{
  background:#f3eadc!important;
  color:#7b5518!important;
  font-weight:600!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-check{
  margin-left:auto!important;
  display:grid!important;
  place-items:center!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-check svg{
  width:16px!important;
  height:16px!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-date-filter.purchase-date-filter-v268{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:40px!important;
  border:1px solid #d7dadd!important;
  border-radius:8px!important;
  background:#fff!important;
  padding:0 11px!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-date-filter.purchase-date-filter-v268 input{
  width:100%!important;
  min-width:0!important;
  font-size:12px!important;
}
html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-panel-v268 .purchase-clear{
  height:40px!important;
  padding:0 18px!important;
  margin:0!important;
  border-radius:8px!important;
  white-space:nowrap!important;
}
@media(max-width:1180px){
  html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-panel.purchase-filter-panel-v268{
    grid-template-columns:1fr 1fr!important;
  }
  html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-panel-v268 .purchase-clear{
    width:100%!important;
  }
}
@media(max-width:700px){
  html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-panel.purchase-filter-panel-v268{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
  html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-panel-v268>*{
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
  }
  html body.purchase-view:not(.sales-view):not(.expense-view) .purchase-filter-custom-select .product-custom-menu{
    max-height:220px!important;
  }
}

/* ===== V269 — Selectores de Nueva compra con el mismo despliegue de Crear producto =====
   Sustituye los <select> nativos de Forma de pago / Medio de pago por el selector
   personalizado usado en Crear producto. El menú conserva TODO el ancho del control,
   incluido el área del icono, y no usa el desplegable azul/nativo de Chrome. */
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-custom-select-host{
  position:relative!important;
  overflow:visible!important;
  z-index:20!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select{
  position:static!important;
  flex:1 1 auto!important;
  min-width:0!important;
  align-self:stretch!important;
  display:flex!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-trigger{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:33px!important;
  margin:0!important;
  padding:0 10px!important;
  border:0!important;
  outline:0!important;
  border-radius:0 5px 5px 0!important;
  background:#fff!important;
  color:#132038!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  font:500 12px/1.1 Inter,Arial,sans-serif!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-trigger:focus-visible{
  outline:0!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-trigger>svg{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  color:#172033!important;
  transition:transform .16s ease!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select.open .product-custom-trigger>svg{
  transform:rotate(180deg)!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-menu{
  box-sizing:border-box!important;
  position:absolute!important;
  z-index:950!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  max-height:260px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  display:none!important;
  padding:6px!important;
  border:1px solid #d7dce4!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(15,23,42,.18),0 3px 10px rgba(15,23,42,.08)!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select.drop-up .product-custom-menu{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select.open .product-custom-menu{
  display:block!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-option{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:36px!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  font:500 12px/1.2 Inter,Arial,sans-serif!important;
  cursor:pointer!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-option:hover,
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-option:focus-visible{
  outline:0!important;
  background:#f7f1e7!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-option.selected{
  background:#f3eadc!important;
  color:#7b5518!important;
  font-weight:650!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-check{
  margin-left:auto!important;
  display:grid!important;
  place-items:center!important;
  color:#8e6628!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-check svg{
  width:16px!important;
  height:16px!important;
}
/* Al abrirse, el selector debe quedar por encima de la sección de productos. */
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-provider-section{
  position:relative!important;
  z-index:4!important;
}
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-products-section,
html body.purchase-view #modal.purchase-entry-modal .purchase-modal-totals-section{
  position:relative!important;
  z-index:1!important;
}
@media(max-width:720px){
  html body.purchase-view #modal.purchase-entry-modal .purchase-entry-custom-select .product-custom-menu{
    max-height:220px!important;
  }
}

/* ======================================================================
   V272 · GASTOS — MODAL "REGISTRAR GASTO" 1:1 CON REFERENCIA
   ----------------------------------------------------------------------
   - Modal por encima del sidebar global (sidebar z-index: 60).
   - Ancho, jerarquía, secciones, campos, nota y acciones ajustados a la
     captura de referencia 1536 × 1024.
   - Responsive sin perder la composición de dos columnas en escritorio.
   ====================================================================== */
html body.expense-view #modal.expense-entry-modal{
  z-index:1200!important;
  inset:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:20px!important;
  background:rgba(24,31,42,.38)!important;
  backdrop-filter:blur(.7px)!important;
  -webkit-backdrop-filter:blur(.7px)!important;
  overflow:auto!important;
}
html body.expense-view #modal.expense-entry-modal .modal-card{
  box-sizing:border-box!important;
  width:min(854px,calc(100vw - 40px))!important;
  max-width:854px!important;
  max-height:calc(100dvh - 40px)!important;
  margin:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  position:relative!important;
  border:1px solid #d9dde4!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#10203d!important;
  box-shadow:0 25px 70px rgba(15,23,42,.26)!important;
}
html body.expense-view #modal.expense-entry-modal .modal-head{
  box-sizing:border-box!important;
  min-height:106px!important;
  flex:0 0 106px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:18px 22px!important;
  border:0!important;
  border-bottom:1px solid #eef0f3!important;
  background:#fff!important;
  position:relative!important;
  z-index:3!important;
}
html body.expense-view #modal.expense-entry-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
}
html body.expense-view #modal.expense-entry-modal .modal-lead-icon{
  box-sizing:border-box!important;
  width:74px!important;
  height:72px!important;
  min-width:74px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:11px!important;
  background:linear-gradient(145deg,#f5eddf,#f1e4d0)!important;
  color:#111!important;
}
html body.expense-view #modal.expense-entry-modal .modal-lead-icon svg{
  width:31px!important;
  height:31px!important;
  stroke-width:1.9!important;
}
html body.expense-view #modal.expense-entry-modal .modal-title-copy{min-width:0!important}
html body.expense-view #modal.expense-entry-modal #modalEyebrow{
  margin:0 0 4px!important;
  color:#435879!important;
  font:500 12px/1.1 Inter,Arial,sans-serif!important;
  letter-spacing:.01em!important;
}
html body.expense-view #modal.expense-entry-modal #modalTitle{
  margin:0!important;
  color:#071a3b!important;
  font:700 24px/1.08 Inter,Arial,sans-serif!important;
  letter-spacing:-.35px!important;
}
html body.expense-view #modal.expense-entry-modal .modal-subtitle{
  display:block!important;
  margin:4px 0 0!important;
  color:#536889!important;
  font:400 13px/1.35 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal #closeModal{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid #d7dce4!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#0f2549!important;
  font:300 24px/1 Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.expense-view #modal.expense-entry-modal #closeModal:hover{background:#f8fafc!important}

html body.expense-view #modal.expense-entry-modal .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  /* V275: deja aire real entre modalForm y expense-entry-shell.
     Antes el padding superior era 0 y el primer bloque quedaba pegado al header. */
  padding:14px 22px 16px!important;
  background:#fff!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-shell{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  color:#10203d!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section{
  overflow:hidden!important;
  border:1px solid #ddd4c7!important;
  border-radius:7px!important;
  background:#fff!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-head{
  box-sizing:border-box!important;
  min-height:60px!important;
  display:flex!important;
  align-items:center!important;
  gap:15px!important;
  padding:9px 14px!important;
  background:linear-gradient(90deg,#fffdf9,#faf7f2)!important;
  border-bottom:1px solid #eee8df!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-icon{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:#f3e8d5!important;
  color:#111!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-icon svg{
  width:21px!important;
  height:21px!important;
  stroke-width:1.9!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-head>div{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  gap:2px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-head strong{
  color:#071a3b!important;
  font:700 15px/1.2 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-head small{
  color:#5c7091!important;
  font:400 12px/1.2 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-section-body{
  box-sizing:border-box!important;
  padding:10px 16px 26px!important;
  background:#fff!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:17px!important;
  row-gap:9px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-field{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  margin:0!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-label{
  min-height:15px!important;
  color:#3f587d!important;
  font:500 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-label b{
  color:#e23b3b!important;
  font-weight:600!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-label em{
  color:#49658d!important;
  font-style:normal!important;
  font-weight:400!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-control{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  display:flex!important;
  align-items:stretch!important;
  position:relative!important;
  overflow:hidden!important;
  border:1px solid #ccd5e1!important;
  border-radius:6px!important;
  background:#fff!important;
  transition:border-color .15s ease,box-shadow .15s ease!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-control:focus-within{
  border-color:#9fb0c8!important;
  box-shadow:0 0 0 2px rgba(78,111,157,.08)!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-control-icon,
html body.expense-view #modal.expense-entry-modal .expense-entry-money-symbol{
  box-sizing:border-box!important;
  width:43px!important;
  min-width:43px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  border-right:1px solid #d6dde7!important;
  color:#10264b!important;
  background:#fff!important;
}
html body.expense-view #modal.expense-entry-modal svg.expense-entry-control-icon{
  padding:10px!important;
  stroke-width:1.8!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-money-symbol{
  font:600 16px/1 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-control input,
html body.expense-view #modal.expense-entry-modal .expense-entry-control select,
html body.expense-view #modal.expense-entry-modal .expense-entry-control textarea{
  width:100%!important;
  min-width:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#10264b!important;
  box-shadow:none!important;
  font:400 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-control input,
html body.expense-view #modal.expense-entry-modal .expense-entry-control select{
  height:36px!important;
  padding:0 12px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-control input::placeholder,
html body.expense-view #modal.expense-entry-modal .expense-entry-control textarea::placeholder{
  color:#7183a0!important;
  opacity:1!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-select select{
  appearance:none!important;
  -webkit-appearance:none!important;
  padding-right:36px!important;
  cursor:pointer!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-chevron{
  position:absolute!important;
  right:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:15px!important;
  height:15px!important;
  color:#10264b!important;
  pointer-events:none!important;
}
html body.expense-view #modal.expense-entry-modal input[type="date"]{
  color:#10264b!important;
  color-scheme:light!important;
}
html body.expense-view #modal.expense-entry-modal input[type="date"]::-webkit-calendar-picker-indicator{
  opacity:1!important;
  cursor:pointer!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-detail-section{
  margin-top:11px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-detail-body{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:13px!important;
  padding-top:9px!important;
  padding-bottom:19px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-wide{grid-column:1/-1!important}
html body.expense-view #modal.expense-entry-modal .expense-entry-textarea{
  height:72px!important;
  align-items:flex-start!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-textarea svg.expense-entry-control-icon{
  height:70px!important;
  padding-top:11px!important;
  align-self:stretch!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-textarea textarea{
  min-height:70px!important;
  height:70px!important;
  resize:none!important;
  padding:10px 12px!important;
  line-height:1.35!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-note{
  box-sizing:border-box!important;
  min-height:62px!important;
  margin-top:16px!important;
  padding:11px 16px!important;
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  border:1px solid #bfd9fa!important;
  border-radius:7px!important;
  background:#edf6ff!important;
  color:#1858aa!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-note-icon{
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:#2e74d3!important;
  color:#fff!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-note-icon svg{
  width:16px!important;
  height:16px!important;
  stroke-width:2!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-note>div{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-note strong{
  color:#1354a5!important;
  font:700 12px/1.2 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-note span:not(.expense-entry-note-icon){
  color:#1a61b9!important;
  font:400 11px/1.3 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-actions{
  min-height:55px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:10px!important;
  padding-top:10px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-actions .btn{
  height:45px!important;
  min-width:89px!important;
  padding:0 16px!important;
  border-radius:7px!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-cancel{
  border:1px solid #d2d8e0!important;
  background:#fff!important;
  color:#10203d!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-submit{
  min-width:153px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:1px solid #95691f!important;
  background:linear-gradient(#a77b31,#95691f)!important;
  color:#fff!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-submit svg{
  width:16px!important;
  height:16px!important;
  stroke-width:1.8!important;
}

@media(max-width:900px){
  html body.expense-view #modal.expense-entry-modal{
    padding:24px 14px!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html body.expense-view #modal.expense-entry-modal .modal-card{
    width:min(854px,calc(100vw - 28px))!important;
    max-height:calc(100dvh - 48px)!important;
  }
}
@media(max-width:680px){
  html body.expense-view #modal.expense-entry-modal{padding:12px!important;align-items:end!important}
  html body.expense-view #modal.expense-entry-modal .modal-card{
    width:100%!important;
    max-width:none!important;
    max-height:96dvh!important;
    border-radius:12px 12px 0 0!important;
  }
  html body.expense-view #modal.expense-entry-modal .modal-head{
    min-height:88px!important;
    flex-basis:88px!important;
    padding:13px 14px!important;
  }
  html body.expense-view #modal.expense-entry-modal .modal-lead-icon{
    width:54px!important;height:54px!important;min-width:54px!important;border-radius:9px!important;
  }
  html body.expense-view #modal.expense-entry-modal #modalTitle{font-size:21px!important}
  html body.expense-view #modal.expense-entry-modal .modal-subtitle{font-size:12px!important}
  html body.expense-view #modal.expense-entry-modal .modal-body{padding:12px 12px 12px!important}
  html body.expense-view #modal.expense-entry-modal .expense-entry-grid{grid-template-columns:1fr!important}
  html body.expense-view #modal.expense-entry-modal .expense-entry-section-body{padding-left:12px!important;padding-right:12px!important}
  html body.expense-view #modal.expense-entry-modal .expense-entry-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  html body.expense-view #modal.expense-entry-modal .expense-entry-actions .btn{width:100%!important;min-width:0!important}
}

/* ======================================================================
   V274 · GASTOS — SELECTORES COMO "CREAR PRODUCTO"
   ----------------------------------------------------------------------
   - Categoría, Cuenta y Método de pago dejan de usar el <select> nativo.
   - El menú desplegable toma TODO el ancho visual del campo, incluido icono.
   - Despliegue blanco/dorado, scroll interno, drop-up automático y z-index
     suficiente para no quedar debajo de otras secciones del modal.
   ====================================================================== */
html body.expense-view #modal.expense-entry-modal .expense-entry-info-section{
  position:relative!important;
  z-index:8!important;
  overflow:visible!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-detail-section{
  position:relative!important;
  z-index:1!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select-host{
  position:relative!important;
  overflow:visible!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select{
  position:static!important;
  flex:1 1 auto!important;
  min-width:0!important;
  align-self:stretch!important;
  display:flex!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-trigger{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:36px!important;
  margin:0!important;
  padding:0 11px 0 12px!important;
  border:0!important;
  outline:0!important;
  border-radius:0 5px 5px 0!important;
  background:#fff!important;
  color:#10264b!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  font:400 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-trigger:focus-visible{
  outline:0!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-trigger>svg{
  width:15px!important;
  height:15px!important;
  min-width:15px!important;
  color:#10264b!important;
  transition:transform .16s ease!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select.open .product-custom-trigger>svg{
  transform:rotate(180deg)!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-menu{
  box-sizing:border-box!important;
  position:absolute!important;
  z-index:1250!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  max-height:260px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  display:none!important;
  padding:6px!important;
  border:1px solid #d7dce4!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(15,23,42,.18),0 3px 10px rgba(15,23,42,.08)!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select.drop-up .product-custom-menu{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select.open .product-custom-menu{
  display:block!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-option{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:36px!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  font:500 12px/1.2 Inter,Arial,sans-serif!important;
  cursor:pointer!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-option:hover,
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-option:focus-visible{
  outline:0!important;
  background:#f7f1e7!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-option.selected{
  background:#f3eadc!important;
  color:#7b5518!important;
  font-weight:650!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-check{
  margin-left:auto!important;
  display:grid!important;
  place-items:center!important;
  color:#8e6628!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-check svg{
  width:16px!important;
  height:16px!important;
  stroke-width:1.8!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-menu::-webkit-scrollbar{
  width:8px!important;
}
html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-menu::-webkit-scrollbar-thumb{
  background:#d7dce4!important;
  border:2px solid #fff!important;
  border-radius:999px!important;
}
@media(max-width:680px){
  html body.expense-view #modal.expense-entry-modal .expense-entry-custom-select .product-custom-menu{
    max-height:220px!important;
  }
}


/* ======================================================================
   V275 · GASTOS — SEPARACIÓN modalForm / expense-entry-shell
   ----------------------------------------------------------------------
   El formulario conserva el patrón de los otros modales del ERP: el form
   administra el padding y el shell ocupa solamente el área útil interna.
   Así el primer panel no queda visualmente adherido al encabezado/modalForm.
   ====================================================================== */
html body.expense-view #modal.expense-entry-modal form#modalForm.modal-body{
  padding-top:14px!important;
}
html body.expense-view #modal.expense-entry-modal form#modalForm.modal-body > .expense-entry-shell{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
}
@media(max-width:680px){
  html body.expense-view #modal.expense-entry-modal form#modalForm.modal-body{
    padding-top:12px!important;
  }
}

/* ======================================================================
   V276 · TRASLADOS — MODAL "NUEVO TRASLADO" 1:1 CON REFERENCIA
   ----------------------------------------------------------------------
   - El overlay cubre TODO el viewport y queda por encima del sidebar
     global (sidebar z-index: 60), evitando que el menú tape el modal.
   - Jerarquía, tonos, secciones, controles y acciones ajustados a la
     captura de referencia de "Nuevo traslado".
   ====================================================================== */
html body.transfer-view #modal.transfer-entry-modal{
  z-index:1400!important;
  inset:0!important;
  position:fixed!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:18px!important;
  background:rgba(24,31,42,.37)!important;
  backdrop-filter:blur(.65px)!important;
  -webkit-backdrop-filter:blur(.65px)!important;
  overflow:auto!important;
  isolation:isolate!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-card{
  box-sizing:border-box!important;
  width:min(1000px,calc(100vw - 36px))!important;
  max-width:1000px!important;
  max-height:calc(100dvh - 24px)!important;
  margin:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  position:relative!important;
  z-index:1!important;
  border:1px solid #d9dde4!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#10203d!important;
  box-shadow:0 28px 78px rgba(15,23,42,.27)!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-head{
  box-sizing:border-box!important;
  min-height:104px!important;
  flex:0 0 104px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:18px 22px 15px!important;
  border:0!important;
  border-bottom:0!important;
  background:#fff!important;
  position:relative!important;
  z-index:30!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-lead-icon{
  box-sizing:border-box!important;
  width:76px!important;
  height:70px!important;
  min-width:76px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:11px!important;
  background:linear-gradient(145deg,#f5eddf,#f2e4ce)!important;
  color:#111!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-lead-icon svg{
  width:32px!important;
  height:32px!important;
  stroke-width:1.9!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-title-copy{min-width:0!important}
html body.transfer-view #modal.transfer-entry-modal #modalEyebrow{
  margin:0 0 4px!important;
  color:#435879!important;
  font:500 12px/1.1 Inter,Arial,sans-serif!important;
  letter-spacing:.01em!important;
}
html body.transfer-view #modal.transfer-entry-modal #modalTitle{
  margin:0!important;
  color:#071a3b!important;
  font:700 23px/1.08 Inter,Arial,sans-serif!important;
  letter-spacing:-.35px!important;
}
html body.transfer-view #modal.transfer-entry-modal .modal-subtitle{
  display:block!important;
  margin:4px 0 0!important;
  color:#536889!important;
  font:400 13px/1.32 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal #closeModal{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  display:grid!important;
  place-items:center!important;
  padding:0 0 2px!important;
  border:1px solid #d7dce4!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#314158!important;
  font:300 24px/1 Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.transfer-view #modal.transfer-entry-modal #closeModal:hover{background:#f8fafc!important}

html body.transfer-view #modal.transfer-entry-modal form#modalForm.modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  padding:0 24px 10px!important;
  background:#fff!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-shell{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  margin:0!important;
  color:#10203d!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section{
  overflow:visible!important;
  border:1px solid #ddd4c7!important;
  border-radius:7px!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-head{
  box-sizing:border-box!important;
  min-height:53px!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  padding:7px 13px!important;
  border-radius:7px 7px 0 0!important;
  border-bottom:1px solid #eee8df!important;
  background:linear-gradient(90deg,#fffdf9,#faf7f2)!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-head.tone-beige{
  background:linear-gradient(90deg,#fffdf9,#faf7f2)!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section.tone-blue{
  border-color:#cbdced!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section.tone-blue .transfer-entry-section-head{
  background:linear-gradient(90deg,#eef7ff,#f6fbff)!important;
  border-bottom-color:#dceaf6!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section.tone-blue .transfer-entry-section-icon{
  background:#d7ebfb!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section.tone-green{
  border-color:#cfe2d8!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section.tone-green .transfer-entry-section-head{
  background:linear-gradient(90deg,#eff9f4,#f7fcf9)!important;
  border-bottom-color:#dcece4!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section.tone-green .transfer-entry-section-icon{
  background:#d8efe1!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-icon{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:#f3e8d5!important;
  color:#071a3b!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-icon svg{
  width:21px!important;
  height:21px!important;
  stroke-width:1.9!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-copy{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-copy strong{
  color:#071a3b!important;
  font:700 15px/1.15 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-copy small{
  color:#536889!important;
  font:400 12px/1.18 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-document{
  margin-left:auto!important;
  padding:4px 8px!important;
  border:1px solid #d7dce4!important;
  border-radius:5px!important;
  color:#52647f!important;
  background:#fff!important;
  font:600 11px/1 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-body{
  box-sizing:border-box!important;
  padding:7px 13px 10px!important;
  background:#fff!important;
  border-radius:0 0 7px 7px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:17px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-field{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  margin:0!important;
  color:#10203d!important;
  font:400 12px/1.2 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-label{
  min-height:15px!important;
  color:#40597c!important;
  font:500 12px/1.2 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-label b{
  color:#e43737!important;
  font-weight:600!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  display:flex!important;
  align-items:stretch!important;
  position:relative!important;
  overflow:hidden!important;
  border:1px solid #cad5e3!important;
  border-radius:6px!important;
  background:#fff!important;
  transition:border-color .15s ease,box-shadow .15s ease!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control:focus-within{
  border-color:#96abc5!important;
  box-shadow:0 0 0 2px rgba(71,105,151,.08)!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control-icon,
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-money-symbol{
  box-sizing:border-box!important;
  width:43px!important;
  min-width:43px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  border-right:1px solid #d6dde7!important;
  color:#10264b!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control-icon svg{
  width:18px!important;
  height:18px!important;
  stroke-width:1.8!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-money-symbol{
  font:600 17px/1 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control input,
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control textarea{
  width:100%!important;
  min-width:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#10264b!important;
  box-shadow:none!important;
  font:400 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control input{
  height:34px!important;
  padding:0 12px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control input::placeholder,
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-control textarea::placeholder{
  color:#7183a0!important;
  opacity:1!important;
}
html body.transfer-view #modal.transfer-entry-modal input[type="date"]{
  color:#10264b!important;
  color-scheme:light!important;
}
html body.transfer-view #modal.transfer-entry-modal input[type="date"]::-webkit-calendar-picker-indicator{
  opacity:0!important;
  width:0!important;
  margin:0!important;
  padding:0!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-suffix{
  min-width:80px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  padding:0 12px 0 8px!important;
  color:#536889!important;
  background:#fff!important;
  font:400 12px/1 Inter,Arial,sans-serif!important;
  white-space:nowrap!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-section .transfer-entry-section-body{
  padding-top:7px!important;
  padding-bottom:8px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-row{
  min-width:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 133px!important;
  gap:12px!important;
  align-items:center!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-select{
  min-width:0!important;
  position:relative!important;
  margin:0!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-control{margin:0!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-control input[type="search"]{
  padding-right:12px!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-control input[type="search"]::-webkit-search-cancel-button{display:none!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-stock-btn{
  box-sizing:border-box!important;
  width:133px!important;
  height:36px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  padding:0 13px!important;
  border:1px solid #d6cabb!important;
  border-radius:6px!important;
  background:linear-gradient(#f5f0e8,#eee7dc)!important;
  color:#2d2318!important;
  cursor:pointer!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-stock-btn:hover{background:#eee6da!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-stock-btn svg{
  width:18px!important;
  height:18px!important;
  stroke-width:1.8!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-help{
  margin-top:0!important;
  color:#536889!important;
  font:400 11px/1.18 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-results{
  top:calc(100% + 4px)!important;
  left:0!important;
  right:0!important;
  z-index:1505!important;
  max-height:220px!important;
  overflow:auto!important;
  padding:5px!important;
  border:1px solid #cfd8e4!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:0 16px 35px rgba(15,23,42,.18)!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-results button{
  width:100%!important;
  padding:9px 10px!important;
  border:0!important;
  border-radius:5px!important;
  background:#fff!important;
  color:#10203d!important;
  text-align:left!important;
  display:grid!important;
  gap:3px!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-results button:hover{background:#f4f7fb!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-results strong{font-size:12px!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-search-results small{font-size:11px!important;color:#627694!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-readonly{
  background:#e9edf2!important;
  border-color:#cfd5dd!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-readonly .transfer-entry-control-icon,
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-readonly input{
  background:#e9edf2!important;
  color:#617087!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-notes-section .transfer-entry-section-body{
  padding:7px 13px 10px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-textarea-control{
  height:43px!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-textarea-control textarea{
  min-height:41px!important;
  height:41px!important;
  resize:none!important;
  padding:9px 11px!important;
  line-height:1.35!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-actions{
  flex:0 0 auto!important;
  min-height:52px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:10px!important;
  padding:8px 0 0!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-actions .btn{
  height:42px!important;
  min-width:88px!important;
  padding:0 16px!important;
  border-radius:7px!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-cancel{
  border:1px solid #d2d8e0!important;
  background:#fff!important;
  color:#10203d!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-submit{
  min-width:177px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  border:1px solid #86683d!important;
  background:linear-gradient(#9d7c4c,#80633d)!important;
  color:#fff!important;
}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-submit:hover{background:linear-gradient(#947344,#755936)!important}
html body.transfer-view #modal.transfer-entry-modal .transfer-entry-submit svg{
  width:18px!important;
  height:18px!important;
  stroke-width:1.8!important;
}

/* La capa del modal siempre gana al sidebar, incluso si el drawer está abierto. */
html body.transfer-view #modal.transfer-entry-modal ~ *{isolation:auto}
html body.transfer-view:has(#modal.transfer-entry-modal:not(.hidden)) .sidebar{pointer-events:none!important}

@media(max-width:1040px){
  html body.transfer-view #modal.transfer-entry-modal{padding:14px!important}
  html body.transfer-view #modal.transfer-entry-modal .modal-card{
    width:min(1000px,calc(100vw - 28px))!important;
    max-height:calc(100dvh - 28px)!important;
  }
}
@media(max-width:720px){
  html body.transfer-view #modal.transfer-entry-modal{
    padding:10px!important;
    align-items:flex-end!important;
  }
  html body.transfer-view #modal.transfer-entry-modal .modal-card{
    width:100%!important;
    max-width:none!important;
    max-height:calc(100dvh - 20px)!important;
    border-radius:11px!important;
  }
  html body.transfer-view #modal.transfer-entry-modal .modal-head{
    min-height:84px!important;
    flex-basis:84px!important;
    padding:12px 13px 10px!important;
    gap:10px!important;
  }
  html body.transfer-view #modal.transfer-entry-modal .modal-title-wrap{gap:11px!important}
  html body.transfer-view #modal.transfer-entry-modal .modal-lead-icon{
    width:54px!important;height:54px!important;min-width:54px!important;border-radius:9px!important;
  }
  html body.transfer-view #modal.transfer-entry-modal .modal-lead-icon svg{width:26px!important;height:26px!important}
  html body.transfer-view #modal.transfer-entry-modal #modalTitle{font-size:20px!important}
  html body.transfer-view #modal.transfer-entry-modal .modal-subtitle{font-size:11px!important}
  html body.transfer-view #modal.transfer-entry-modal #closeModal{width:40px!important;height:40px!important;min-width:40px!important}
  html body.transfer-view #modal.transfer-entry-modal form#modalForm.modal-body{padding:0 11px 10px!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-grid{grid-template-columns:1fr!important;gap:9px!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-row{grid-template-columns:minmax(0,1fr) 112px!important;gap:8px!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-stock-btn{width:112px!important;padding:0 8px!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-head{padding-left:10px!important;padding-right:10px!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-section-body{padding-left:10px!important;padding-right:10px!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-actions{position:sticky!important;bottom:0!important;padding:9px 0 0!important;z-index:25!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-actions .btn{flex:1!important;min-width:0!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-submit{min-width:0!important}
}
@media(max-width:470px){
  html body.transfer-view #modal.transfer-entry-modal .modal-subtitle{display:none!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-product-row{grid-template-columns:1fr!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-stock-btn{width:100%!important}
  html body.transfer-view #modal.transfer-entry-modal .transfer-entry-actions{display:grid!important;grid-template-columns:1fr 1.35fr!important}
}

/* ======================================================================
   V277 · CAJA Y TESORERÍA — MODAL "REGISTRAR MOVIMIENTO" 1:1
   ----------------------------------------------------------------------
   Referencia: captura 1536 × 1024 suministrada por el usuario.
   El overlay ocupa el viewport completo y su z-index supera al sidebar
   global (z-index: 60), por lo que el menú nunca puede tapar el modal.
   ====================================================================== */
html body.cash-view #modal.cash-entry-modal{
  --cash-modal-top:clamp(18px,16.4vh,168px);
  position:fixed!important;
  inset:0!important;
  z-index:1600!important;
  isolation:isolate!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  padding:var(--cash-modal-top) 20px 24px!important;
  overflow:auto!important;
  background:rgba(28,35,46,.34)!important;
  backdrop-filter:blur(.55px)!important;
  -webkit-backdrop-filter:blur(.55px)!important;
}
html body.cash-view #modal.cash-entry-modal .modal-card{
  box-sizing:border-box!important;
  width:min(946px,calc(100vw - 40px))!important;
  max-width:946px!important;
  height:813px!important;
  max-height:calc(100dvh - var(--cash-modal-top) - 24px)!important;
  margin:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  position:relative!important;
  z-index:1!important;
  border:1px solid #d8dce3!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0b1d3c!important;
  box-shadow:0 24px 64px rgba(15,23,42,.22)!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .modal-head{
  box-sizing:border-box!important;
  min-height:103px!important;
  flex:0 0 103px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:13px 20px 12px 24px!important;
  border:0!important;
  border-bottom:1px solid #e6e8ec!important;
  background:#fff!important;
  position:relative!important;
  z-index:5!important;
}
html body.cash-view #modal.cash-entry-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:21px!important;
}
html body.cash-view #modal.cash-entry-modal .modal-lead-icon{
  box-sizing:border-box!important;
  width:76px!important;
  height:78px!important;
  min-width:76px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:11px!important;
  background:linear-gradient(145deg,#f4ecde,#f0e2cb)!important;
  color:#15130f!important;
}
html body.cash-view #modal.cash-entry-modal .modal-lead-icon svg{
  width:34px!important;
  height:34px!important;
  stroke-width:1.85!important;
}
html body.cash-view #modal.cash-entry-modal .modal-title-copy{min-width:0!important}
html body.cash-view #modal.cash-entry-modal #modalEyebrow{
  margin:0 0 5px!important;
  color:#546987!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  letter-spacing:.01em!important;
}
html body.cash-view #modal.cash-entry-modal #modalTitle{
  margin:0!important;
  color:#06183a!important;
  font:700 22px/1.08 Inter,Arial,sans-serif!important;
  letter-spacing:-.32px!important;
}
html body.cash-view #modal.cash-entry-modal .modal-subtitle{
  display:block!important;
  margin:5px 0 0!important;
  color:#53698c!important;
  font:400 13px/1.25 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal #closeModal{
  width:40px!important;
  height:41px!important;
  min-width:40px!important;
  display:grid!important;
  place-items:center!important;
  padding:0 0 2px!important;
  border:1px solid #d8d7d3!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#0b1b35!important;
  font:300 23px/1 Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.cash-view #modal.cash-entry-modal #closeModal:hover{background:#fafafa!important}

html body.cash-view #modal.cash-entry-modal form#modalForm.modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  padding:0 24px 15px!important;
  background:#fff!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-shell{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:11px!important;
  margin:0!important;
  color:#0d2143!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid #ded6c9!important;
  border-radius:7px!important;
  background:#fff!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-head{
  box-sizing:border-box!important;
  min-height:61px!important;
  display:flex!important;
  align-items:center!important;
  gap:15px!important;
  padding:9px 15px!important;
  background:linear-gradient(90deg,#fffdf9 0%,#faf7f2 100%)!important;
  border-bottom:1px solid #eee8df!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-icon{
  box-sizing:border-box!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:#f2e7d3!important;
  color:#17140f!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-icon svg{
  width:22px!important;
  height:22px!important;
  stroke-width:1.85!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-head>div{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-head strong{
  color:#071a3d!important;
  font:700 16px/1.1 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-head strong span{
  font-weight:700!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-head small{
  color:#5c7092!important;
  font:400 12px/1.15 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-section-body{
  box-sizing:border-box!important;
  background:#fff!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-data-section .cash-entry-section-body{
  padding:10px 16px 13px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:18px!important;
  row-gap:9px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-field{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  margin:0!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-label{
  min-height:15px!important;
  color:#3f587e!important;
  font:500 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-label b{
  color:#e33535!important;
  font-weight:700!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-label em{
  color:#3f587e!important;
  font-style:normal!important;
  font-weight:400!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:39px!important;
  display:flex!important;
  align-items:stretch!important;
  overflow:hidden!important;
  position:relative!important;
  border:1px solid #cbd5e2!important;
  border-radius:6px!important;
  background:#fff!important;
  transition:border-color .15s ease,box-shadow .15s ease!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control:focus-within{
  border-color:#9eafc5!important;
  box-shadow:0 0 0 2px rgba(73,106,153,.07)!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control-icon,
html body.cash-view #modal.cash-entry-modal .cash-entry-money-symbol{
  box-sizing:border-box!important;
  width:49px!important;
  min-width:49px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  border-right:1px solid #d3dce7!important;
  background:#fff!important;
  color:#0d2143!important;
}
html body.cash-view #modal.cash-entry-modal svg.cash-entry-control-icon{
  padding:13px!important;
  stroke-width:1.85!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-money-symbol{
  font:600 18px/1 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control input,
html body.cash-view #modal.cash-entry-modal .cash-entry-control select,
html body.cash-view #modal.cash-entry-modal .cash-entry-control textarea{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#102449!important;
  box-shadow:none!important;
  font:400 13px/1.25 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control input,
html body.cash-view #modal.cash-entry-modal .cash-entry-control select{
  height:37px!important;
  padding:0 12px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control select{
  cursor:pointer!important;
  appearance:auto!important;
  -webkit-appearance:menulist!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-control input::placeholder,
html body.cash-view #modal.cash-entry-modal .cash-entry-control textarea::placeholder{
  color:#70819d!important;
  opacity:1!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-concept-section .cash-entry-single-body{
  padding:10px 16px 12px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-notes-body{
  position:relative!important;
  padding:9px 16px 27px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-textarea{
  height:63px!important;
  align-items:stretch!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-textarea .cash-entry-control-icon{
  height:100%!important;
  align-self:stretch!important;
  padding:13px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-textarea textarea{
  height:61px!important;
  min-height:61px!important;
  resize:none!important;
  padding:10px 12px!important;
  line-height:1.4!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-counter{
  position:absolute!important;
  right:17px!important;
  bottom:7px!important;
  color:#617594!important;
  font:400 12px/1 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-actions{
  min-height:59px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin-top:5px!important;
  padding-top:12px!important;
  border-top:1px solid #ded8cf!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-actions .btn{
  height:45px!important;
  min-height:45px!important;
  border-radius:7px!important;
  padding:0 18px!important;
  font:600 13px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-cancel{
  min-width:97px!important;
  border:1px solid #ded8cf!important;
  background:#fff!important;
  color:#0c1d3c!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-submit{
  min-width:198px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  border:1px solid #9b7742!important;
  background:linear-gradient(180deg,#a4865c 0%,#8e704a 100%)!important;
  color:#fff!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-submit svg{
  width:17px!important;
  height:17px!important;
  stroke-width:1.8!important;
}

/* En el tamaño de la captura, conserva las alturas de las tres cajas. */
@media(min-width:900px) and (min-height:900px){
  html body.cash-view #modal.cash-entry-modal .cash-entry-data-section{min-height:293px!important;}
  html body.cash-view #modal.cash-entry-modal .cash-entry-concept-section{min-height:144px!important;}
  html body.cash-view #modal.cash-entry-modal .cash-entry-notes-section{min-height:163px!important;}
}
@media(max-height:880px){
  html body.cash-view #modal.cash-entry-modal{--cash-modal-top:18px;align-items:flex-start!important;padding-bottom:18px!important;}
  html body.cash-view #modal.cash-entry-modal .modal-card{height:auto!important;max-height:calc(100dvh - 36px)!important;}
}
@media(max-width:720px){
  html body.cash-view #modal.cash-entry-modal{
    --cash-modal-top:12px;
    padding:12px!important;
  }
  html body.cash-view #modal.cash-entry-modal .modal-card{
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    max-height:calc(100dvh - 24px)!important;
    border-radius:9px!important;
  }
  html body.cash-view #modal.cash-entry-modal .modal-head{
    min-height:88px!important;
    flex-basis:88px!important;
    padding:10px 12px!important;
  }
  html body.cash-view #modal.cash-entry-modal .modal-title-wrap{gap:11px!important;}
  html body.cash-view #modal.cash-entry-modal .modal-lead-icon{width:56px!important;height:56px!important;min-width:56px!important;}
  html body.cash-view #modal.cash-entry-modal .modal-lead-icon svg{width:27px!important;height:27px!important;}
  html body.cash-view #modal.cash-entry-modal #modalTitle{font-size:20px!important;}
  html body.cash-view #modal.cash-entry-modal .modal-subtitle{font-size:11.5px!important;}
  html body.cash-view #modal.cash-entry-modal form#modalForm.modal-body{padding:0 12px 12px!important;}
  html body.cash-view #modal.cash-entry-modal .cash-entry-grid{grid-template-columns:1fr!important;}
  html body.cash-view #modal.cash-entry-modal .cash-entry-data-section,
  html body.cash-view #modal.cash-entry-modal .cash-entry-concept-section,
  html body.cash-view #modal.cash-entry-modal .cash-entry-notes-section{min-height:0!important;}
  html body.cash-view #modal.cash-entry-modal .cash-entry-actions{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:center!important;}
  html body.cash-view #modal.cash-entry-modal .cash-entry-actions .btn{width:100%!important;min-width:0!important;}
}

/* ======================================================================
   V278 · CAJA Y TESORERÍA — CENTRADO REAL DEL MODAL REGISTRAR MOVIMIENTO
   ----------------------------------------------------------------------
   Centra la tarjeta respecto al viewport completo, no respecto al área de
   contenido. El overlay continúa por encima del sidebar (z-index: 1600).
   ====================================================================== */
@media (min-width:721px){
  html body.cash-view #modal.cash-entry-modal{
    --cash-modal-top:0px!important;
    inset:0!important;
    padding:20px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:auto!important;
  }
  html body.cash-view #modal.cash-entry-modal .modal-card{
    margin:auto!important;
    width:min(946px,calc(100vw - 40px))!important;
    max-width:946px!important;
    height:min(813px,calc(100dvh - 40px))!important;
    max-height:calc(100dvh - 40px)!important;
  }
}

@media (max-width:720px){
  html body.cash-view #modal.cash-entry-modal{
    inset:0!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html body.cash-view #modal.cash-entry-modal .modal-card{
    margin:auto!important;
  }
}

/* ======================================================================
   V279 · CAJA Y TESORERÍA — ANCHO + SELECTORES COMO "NUEVA COMPRA"
   ----------------------------------------------------------------------
   - El modal usa el mismo ancho visual de Nueva compra (1044 px).
   - Tipo de movimiento, Cuenta y Medio de pago dejan de usar el menú
     nativo de Chrome y usan el selector personalizado de Nueva compra.
   - El menú desplegable ocupa TODO el ancho del control, incluido el icono.
   - Los menús quedan por encima de las secciones inferiores y pueden abrir
     hacia arriba automáticamente cuando falta espacio en el viewport.
   ====================================================================== */
@media (min-width:721px){
  html body.cash-view #modal.cash-entry-modal .modal-card{
    width:min(1044px,calc(100vw - 40px))!important;
    max-width:1044px!important;
  }
}

html body.cash-view #modal.cash-entry-modal .cash-entry-data-section{
  position:relative!important;
  z-index:12!important;
  overflow:visible!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-concept-section,
html body.cash-view #modal.cash-entry-modal .cash-entry-notes-section{
  position:relative!important;
  z-index:1!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select-host{
  position:relative!important;
  overflow:visible!important;
  z-index:30!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select-host:has(.cash-entry-custom-select.open){
  z-index:980!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select{
  position:static!important;
  flex:1 1 auto!important;
  min-width:0!important;
  align-self:stretch!important;
  display:flex!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-trigger{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:37px!important;
  margin:0!important;
  padding:0 12px!important;
  border:0!important;
  outline:0!important;
  border-radius:0 6px 6px 0!important;
  background:#fff!important;
  color:#102449!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  font:400 13px/1.25 Inter,Arial,sans-serif!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-trigger:focus-visible{
  outline:0!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-trigger>svg{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  color:#102449!important;
  transition:transform .16s ease!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select.open .product-custom-trigger>svg{
  transform:rotate(180deg)!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-menu{
  box-sizing:border-box!important;
  position:absolute!important;
  z-index:1100!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  max-height:260px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  display:none!important;
  padding:6px!important;
  border:1px solid #d7dce4!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(15,23,42,.18),0 3px 10px rgba(15,23,42,.08)!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select.drop-up .product-custom-menu{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select.open .product-custom-menu{
  display:block!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-option{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:38px!important;
  padding:9px 10px!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  font:500 12.5px/1.2 Inter,Arial,sans-serif!important;
  cursor:pointer!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-option:hover,
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-option:focus-visible{
  outline:0!important;
  background:#f7f1e7!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-option.selected{
  background:#f3eadc!important;
  color:#7b5518!important;
  font-weight:650!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-check{
  margin-left:auto!important;
  display:grid!important;
  place-items:center!important;
  color:#8e6628!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-check svg{
  width:16px!important;
  height:16px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-menu::-webkit-scrollbar{
  width:7px!important;
}
html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-menu::-webkit-scrollbar-thumb{
  background:#c3c7cd!important;
  border-radius:10px!important;
}
@media(max-width:720px){
  html body.cash-view #modal.cash-entry-modal .cash-entry-custom-select .product-custom-menu{
    max-height:220px!important;
  }
}

/* ======================================================================
   V280 · CAJA Y TESORERÍA — SEPARACIÓN modalForm / cash-entry-shell
   ----------------------------------------------------------------------
   Igual que el ajuste aplicado al modal de Gastos: el form administra
   el espacio interno y el shell ocupa solamente el área útil del form.
   Evita que .cash-entry-shell quede visualmente pegado al encabezado y
   garantiza que nunca sea más ancho que form#modalForm.
   ====================================================================== */
html body.cash-view #modal.cash-entry-modal form#modalForm.modal-body{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  padding-top:14px!important;
  padding-left:24px!important;
  padding-right:24px!important;
  overflow-x:hidden!important;
  align-items:stretch!important;
}
html body.cash-view #modal.cash-entry-modal form#modalForm.modal-body > .cash-entry-shell{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  flex:0 0 auto!important;
  margin:0!important;
}
@media(max-width:720px){
  html body.cash-view #modal.cash-entry-modal form#modalForm.modal-body{
    padding-top:12px!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
}

/* ======================================================================
   V281 · CAJA Y TESORERÍA — ALTURA NATURAL SIN SCROLL INNECESARIO
   ----------------------------------------------------------------------
   El modal deja de estar limitado a una altura fija de 813 px en escritorio.
   Igual que "Nueva compra", la tarjeta crece con su contenido hasta el alto
   disponible del viewport. Solo aparece scroll interno cuando la pantalla
   realmente no tiene espacio suficiente.
   ====================================================================== */
@media (min-width:721px){
  html body.cash-view #modal.cash-entry-modal{
    box-sizing:border-box!important;
    inset:0!important;
    padding:14px 18px!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  html body.cash-view #modal.cash-entry-modal .modal-card{
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 28px)!important;
    margin:0!important;
  }
  html body.cash-view #modal.cash-entry-modal form#modalForm.modal-body{
    flex:0 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}


/* ======================================================================
   V282 · CLIENTES Y PROVEEDORES — MODAL "NUEVO TERCERO" 1:1 REFERENCIA
   ----------------------------------------------------------------------
   - Ventana 912 × 768 px centrada horizontal y verticalmente en el viewport.
   - Overlay fijo sobre TODO el viewport (z-index > sidebar 60), por lo que
     el menú lateral nunca puede cubrir el formulario.
   - Tres bloques: Información básica, Contacto e Información adicional.
   ====================================================================== */
html body.thirdparty-view #modal.thirdparty-entry-modal{
  z-index:1800!important;
  position:fixed!important;
  inset:0!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  overflow:auto!important;
  background:rgba(22,29,39,.31)!important;
  backdrop-filter:blur(.45px)!important;
  -webkit-backdrop-filter:blur(.45px)!important;
  isolation:isolate!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal.hidden{display:none!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-card{
  box-sizing:border-box!important;
  width:912px!important;
  max-width:calc(100vw - 48px)!important;
  height:768px!important;
  max-height:calc(100dvh - 48px)!important;
  margin:0!important;
  transform:none!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  position:relative!important;
  z-index:1!important;
  border:1px solid #d8dbe1!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#10203d!important;
  box-shadow:0 26px 72px rgba(15,23,42,.27)!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-head{
  box-sizing:border-box!important;
  height:104px!important;
  min-height:104px!important;
  flex:0 0 104px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:18px 20px 12px 18px!important;
  border:0!important;
  background:#fff!important;
  position:relative!important;
  z-index:4!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-lead-icon{
  box-sizing:border-box!important;
  width:76px!important;
  height:74px!important;
  min-width:76px!important;
  flex:0 0 76px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:10px!important;
  background:linear-gradient(145deg,#f5ead8,#f7eedf)!important;
  color:#111!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-lead-icon svg{width:36px!important;height:36px!important;stroke-width:1.9!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-title-copy{min-width:0!important}
html body.thirdparty-view #modal.thirdparty-entry-modal #modalEyebrow{
  display:block!important;
  margin:0 0 4px!important;
  color:#31466b!important;
  font-size:11px!important;
  line-height:1.15!important;
  font-weight:500!important;
  letter-spacing:.01em!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal #modalTitle{
  margin:0!important;
  color:#071638!important;
  font-size:22px!important;
  line-height:1.08!important;
  letter-spacing:-.25px!important;
  font-weight:800!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-subtitle{
  margin:5px 0 0!important;
  color:#405274!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:400!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal #closeModal{
  box-sizing:border-box!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  margin:0!important;
  border:1px solid #ddd3c3!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#17315c!important;
  font:400 25px/1 Arial,sans-serif!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:none!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal #closeModal:hover{background:#fbf8f3!important}
html body.thirdparty-view #modal.thirdparty-entry-modal form#modalForm.modal-body{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  min-height:0!important;
  width:100%!important;
  margin:0!important;
  padding:0 17px 14px!important;
  overflow:hidden!important;
  background:#fff!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-shell{
  box-sizing:border-box!important;
  height:100%!important;
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  min-width:0!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  overflow:hidden!important;
  border:1px solid #dfd2c0!important;
  border-radius:7px!important;
  background:#fff!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-basic-section{height:196px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-contact-section{height:128px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-additional-section{height:237px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-head{
  box-sizing:border-box!important;
  height:55px!important;
  min-height:55px!important;
  padding:9px 15px!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  background:linear-gradient(90deg,#fbf7f0 0%,#fbf9f5 58%,#fff 100%)!important;
  border:0!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-icon{
  box-sizing:border-box!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  flex:0 0 40px!important;
  border-radius:9px!important;
  display:grid!important;
  place-items:center!important;
  background:#f3eadb!important;
  color:#111!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-icon svg{width:23px!important;height:23px!important;stroke-width:1.9!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-head h3{
  margin:0!important;
  color:#071638!important;
  font-size:14px!important;
  line-height:1.12!important;
  font-weight:800!important;
  letter-spacing:-.1px!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-head p{
  margin:4px 0 0!important;
  color:#536887!important;
  font-size:11px!important;
  line-height:1.08!important;
  font-weight:400!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-body{
  box-sizing:border-box!important;
  background:#fff!important;
  padding:8px 15px 10px!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-basic-body{height:141px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-contact-body{height:73px!important;padding-top:7px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-additional-body{height:182px!important;padding-top:7px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  column-gap:20px!important;
  row-gap:7px!important;
  min-width:0!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-wide{grid-column:1/-1!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-field{
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
  margin:0!important;
  color:#263f67!important;
  font:400 12px/1.1 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-label{
  height:14px!important;
  line-height:14px!important;
  display:block!important;
  color:#263f67!important;
  font-size:12px!important;
  font-weight:400!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-required{color:#ef3e39!important;font-weight:700!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control{
  box-sizing:border-box!important;
  width:100%!important;
  height:36px!important;
  min-height:36px!important;
  display:flex!important;
  align-items:stretch!important;
  position:relative!important;
  overflow:hidden!important;
  border:1px solid #ccd4e0!important;
  border-radius:6px!important;
  background:#fff!important;
  transition:border-color .15s ease,box-shadow .15s ease!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control:focus-within{
  border-color:#9d7a43!important;
  box-shadow:0 0 0 3px rgba(157,122,67,.08)!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control-icon{
  box-sizing:border-box!important;
  width:43px!important;
  min-width:43px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  color:#0a1e45!important;
  background:#fff!important;
  border-right:1px solid #d7dde6!important;
  pointer-events:none!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control-icon svg{width:18px!important;height:18px!important;stroke-width:1.9!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-status-dot i{width:11px!important;height:11px!important;border-radius:50%!important;background:#25b85a!important;display:block!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control input,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control select,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control textarea{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  background:#fff!important;
  color:#0c1834!important;
  font:400 12px/1.2 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control input,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control select{height:34px!important;padding:0 13px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control select{
  appearance:auto!important;
  -webkit-appearance:auto!important;
  cursor:pointer!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control input::placeholder,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control textarea::placeholder{color:#647795!important;opacity:1!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-textarea-control{
  height:59px!important;
  min-height:59px!important;
  align-items:stretch!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-textarea-control .thirdparty-modal-control-icon{height:100%!important;align-self:stretch!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-textarea-control textarea{
  height:57px!important;
  resize:none!important;
  padding:9px 12px!important;
  line-height:1.25!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-observations-field .thirdparty-textarea-control textarea{padding-right:58px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-notes-counter{
  position:absolute!important;
  right:2px!important;
  bottom:-20px!important;
  color:#2e4d7b!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:400!important;
  pointer-events:none!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-address-field,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-observations-field{margin-top:1px!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-actions{
  box-sizing:border-box!important;
  min-height:56px!important;
  flex:1 1 auto!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin:0 -4px!important;
  padding:8px 4px 0 0!important;
  border-top:1px solid #dfd4c5!important;
  background:#fff!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-actions .btn{
  box-sizing:border-box!important;
  height:46px!important;
  min-height:46px!important;
  border-radius:7px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  padding:0 20px!important;
  font:600 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-cancel{
  width:97px!important;
  min-width:97px!important;
  border:1px solid #d8c7ae!important;
  background:#fff!important;
  color:#0c1834!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-submit{
  width:177px!important;
  min-width:177px!important;
  border:1px solid #936822!important;
  background:linear-gradient(180deg,#9f7633,#906522)!important;
  color:#fff!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-submit svg{width:18px!important;height:18px!important;stroke-width:1.8!important}


@media(max-height:820px) and (min-width:1101px){
  html body.thirdparty-view #modal.thirdparty-entry-modal form#modalForm.modal-body{overflow:auto!important;}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-shell{height:auto!important;min-height:650px!important;}
}

@media(max-width:1100px){
  html body.thirdparty-view #modal.thirdparty-entry-modal{padding:16px!important;align-items:center!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-card{transform:none!important;width:min(912px,calc(100vw - 32px))!important;max-height:calc(100dvh - 32px)!important;height:auto!important;min-height:0!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal form#modalForm.modal-body{overflow:auto!important;padding-bottom:12px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-shell{height:auto!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-basic-section,
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-contact-section,
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-additional-section{height:auto!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-basic-body,
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-contact-body,
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-additional-body{height:auto!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-actions{flex:0 0 auto!important;min-height:64px!important}
}
@media(max-width:720px){
  html body.thirdparty-view #modal.thirdparty-entry-modal{padding:0!important;align-items:stretch!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-card{width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border:0!important;border-radius:0!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-head{height:92px!important;min-height:92px!important;flex-basis:92px!important;padding:12px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-lead-icon{width:58px!important;height:58px!important;min-width:58px!important;flex-basis:58px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-lead-icon svg{width:29px!important;height:29px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal #modalTitle{font-size:19px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-subtitle{font-size:11px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal #closeModal{width:38px!important;height:38px!important;min-width:38px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal form#modalForm.modal-body{padding:0 10px 10px!important;overflow:auto!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-grid{grid-template-columns:1fr!important;gap:8px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-wide{grid-column:1!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-head{padding:8px 10px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-body{padding:8px 10px 10px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-actions{display:grid!important;grid-template-columns:1fr 1.55fr!important;gap:8px!important;padding-top:10px!important}
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-cancel,
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-submit{width:100%!important;min-width:0!important}
}

/* ======================================================================
   V284 · CLIENTES Y PROVEEDORES — TIPOGRAFÍA IGUAL A REGISTRO DE GASTOS
   Mantiene intacto el centrado, tamaño y estructura del modal v283.
   Solo homologa familia, pesos, tamaños e interlineados del modal
   "Nuevo tercero" con el modal "Registrar gasto".
   ====================================================================== */
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-card,
html body.thirdparty-view #modal.thirdparty-entry-modal form#modalForm.modal-body,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-shell{
  font-family:Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal #modalEyebrow{
  font:500 12px/1.1 Inter,Arial,sans-serif!important;
  letter-spacing:.01em!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal #modalTitle{
  font:700 24px/1.08 Inter,Arial,sans-serif!important;
  letter-spacing:-.35px!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .modal-subtitle{
  font:400 13px/1.35 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-head h3{
  font:700 15px/1.2 Inter,Arial,sans-serif!important;
  letter-spacing:0!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section-head p{
  font:400 12px/1.2 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-field,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-label{
  font:500 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control input,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control select,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-control textarea{
  font:400 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-notes-counter{
  font:400 12px/1 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-actions .btn{
  font:500 12px/1 Inter,Arial,sans-serif!important;
}
@media(max-width:900px){
  html body.thirdparty-view #modal.thirdparty-entry-modal #modalTitle{
    font-size:21px!important;
  }
  html body.thirdparty-view #modal.thirdparty-entry-modal .modal-subtitle{
    font-size:12px!important;
  }
}

/* ======================================================================
   V285 · CLIENTES Y PROVEEDORES — SELECTORES DESPLEGABLES COMO NUEVA COMPRA
   ----------------------------------------------------------------------
   - Tipo, Condición fiscal y Estado dejan de usar el <select> nativo.
   - El menú se despliega con TODO el ancho del control, incluido el icono.
   - Mismo comportamiento visual de Forma de pago / Medio de pago en
     "Nueva compra": menú blanco, selección dorada, sombra y auto drop-up.
   ====================================================================== */
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-custom-select-host{
  position:relative!important;
  overflow:visible!important;
  z-index:40!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select{
  position:static!important;
  flex:1 1 auto!important;
  min-width:0!important;
  align-self:stretch!important;
  display:flex!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-trigger{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:34px!important;
  margin:0!important;
  padding:0 12px 0 13px!important;
  border:0!important;
  outline:0!important;
  border-radius:0 5px 5px 0!important;
  background:#fff!important;
  color:#0c1834!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  font:400 12px/1.25 Inter,Arial,sans-serif!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-trigger:focus-visible{
  outline:0!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-trigger>svg{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  color:#172033!important;
  transition:transform .16s ease!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select.open .product-custom-trigger>svg{
  transform:rotate(180deg)!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-menu{
  box-sizing:border-box!important;
  position:absolute!important;
  z-index:1950!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  max-height:260px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  display:none!important;
  padding:6px!important;
  border:1px solid #d7dce4!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(15,23,42,.18),0 3px 10px rgba(15,23,42,.08)!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select.drop-up .product-custom-menu{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select.open .product-custom-menu{
  display:block!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-option{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:36px!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#172033!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  text-align:left!important;
  font:500 12px/1.2 Inter,Arial,sans-serif!important;
  cursor:pointer!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-option:hover,
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-option:focus-visible{
  outline:0!important;
  background:#f7f1e7!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-option.selected{
  background:#f3eadc!important;
  color:#7b5518!important;
  font-weight:650!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-check{
  margin-left:auto!important;
  display:grid!important;
  place-items:center!important;
  color:#8e6628!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-check svg{
  width:16px!important;
  height:16px!important;
}
/* Permite que los menús crucen los límites visuales de cada bloque sin recortarse. */
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-section{
  overflow:visible!important;
  position:relative!important;
}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-basic-section{z-index:30!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-contact-section{z-index:20!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-additional-section{z-index:10!important}
html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-modal-actions{position:relative!important;z-index:1!important}
@media(max-width:720px){
  html body.thirdparty-view #modal.thirdparty-entry-modal .thirdparty-entry-custom-select .product-custom-menu{
    max-height:220px!important;
  }
}

/* ======================================================================
   V292 · VENTAS Y FACTURACIÓN — NUEVA VENTA 1:1 CON REFERENCIA VISUAL
   - Modal dedicado, centrado por encima de toda la aplicación.
   - El sidebar queda detrás del backdrop y nunca puede tapar el formulario.
   - Estructura compacta: cliente/factura, productos y totales.
   ====================================================================== */
html body.sales-view #modal.sale-entry-modal{
  box-sizing:border-box!important;
  position:fixed!important;
  inset:0!important;
  z-index:1600!important;
  display:grid!important;
  place-items:start center!important;
  align-items:start!important;
  justify-items:center!important;
  padding:68px 18px 10px!important;
  overflow:hidden!important;
  background:rgba(19,27,38,.34)!important;
  backdrop-filter:none!important;
}
html body.sales-view #modal.sale-entry-modal.hidden{display:none!important}
html body.sales-view #modal.sale-entry-modal .modal-card{
  box-sizing:border-box!important;
  position:relative!important;
  width:min(1016px,calc(100vw - 42px))!important;
  max-width:1016px!important;
  max-height:calc(100dvh - 78px)!important;
  margin:0!important;
  transform:translateX(30px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid #d7d7d5!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 18px 50px rgba(15,23,42,.24)!important;
  font-family:Inter,Arial,"Helvetica Neue",sans-serif!important;
}
html body.sales-view #modal.sale-entry-modal .modal-head{
  box-sizing:border-box!important;
  min-height:104px!important;
  flex:0 0 104px!important;
  padding:17px 24px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:18px!important;
  border:0!important;
  background:#fff!important;
}
html body.sales-view #modal.sale-entry-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:17px!important;
}
html body.sales-view #modal.sale-entry-modal .modal-lead-icon{
  width:70px!important;
  height:70px!important;
  min-width:70px!important;
  flex:0 0 70px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#f5ecdf,#efe0c9)!important;
  color:#17120d!important;
}
html body.sales-view #modal.sale-entry-modal .modal-lead-icon svg{width:36px!important;height:36px!important;stroke-width:1.9!important}
html body.sales-view #modal.sale-entry-modal .modal-title-copy{padding-top:2px!important;min-width:0!important}
html body.sales-view #modal.sale-entry-modal #modalEyebrow{
  margin:0 0 5px!important;
  color:#23395f!important;
  font-size:11px!important;
  line-height:1.1!important;
  font-weight:500!important;
  letter-spacing:0!important;
}
html body.sales-view #modal.sale-entry-modal #modalTitle{
  margin:0!important;
  color:#0c2347!important;
  font-size:25px!important;
  line-height:1.05!important;
  font-weight:700!important;
  letter-spacing:-.02em!important;
}
html body.sales-view #modal.sale-entry-modal .modal-subtitle{
  margin:5px 0 0!important;
  color:#36527a!important;
  font-size:13px!important;
  line-height:1.25!important;
  font-weight:400!important;
}
html body.sales-view #modal.sale-entry-modal #closeModal{
  width:43px!important;
  height:43px!important;
  min-width:43px!important;
  margin:3px 1px 0 0!important;
  padding:0!important;
  border:1px solid #ddd9d2!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#0e1d32!important;
  display:grid!important;
  place-items:center!important;
  font:400 25px/1 Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.sales-view #modal.sale-entry-modal #closeModal:hover{background:#f8f6f2!important}
html body.sales-view #modal.sale-entry-modal .modal-body{
  box-sizing:border-box!important;
  min-height:0!important;
  flex:1 1 auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:0 24px 10px!important;
  background:#fff!important;
  scrollbar-gutter:stable!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-form{
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  gap:13px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-section{
  box-sizing:border-box!important;
  position:relative!important;
  min-width:0!important;
  overflow:visible!important;
  border:1px solid #d6d0c7!important;
  border-radius:8px!important;
  background:#fff!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-head{
  box-sizing:border-box!important;
  min-height:58px!important;
  padding:8px 12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  border-radius:7px 7px 0 0!important;
  background:linear-gradient(90deg,#f7f1e8 0%,#fbf8f4 66%,#fff 100%)!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-title{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-icon{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  flex:0 0 42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  background:#f1e6d6!important;
  color:#152238!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-icon svg{width:25px!important;height:25px!important;stroke-width:1.8!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-title h3{
  margin:0!important;
  color:#102a56!important;
  font-size:16px!important;
  line-height:1.12!important;
  font-weight:700!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-title p{
  margin:4px 0 0!important;
  color:#526886!important;
  font-size:11px!important;
  line-height:1.15!important;
  font-weight:400!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-info{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  color:#1648a0!important;
  font-size:11px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-info svg{width:17px!important;height:17px!important;stroke-width:2!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-section-body{
  box-sizing:border-box!important;
  min-width:0!important;
  padding:11px 15px 14px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-client-grid{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:14px 15px!important;
  align-items:end!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-consecutive{grid-column:span 5!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-customer{grid-column:span 7!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-date,
html body.sales-view #modal.sale-entry-modal .sale-modal-payment,
html body.sales-view #modal.sale-entry-modal .sale-modal-method{grid-column:span 4!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-due{grid-column:span 4!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-field{
  box-sizing:border-box!important;
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  gap:6px!important;
  color:#102a56!important;
  font-size:11px!important;
  line-height:1.1!important;
  font-weight:400!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-label{
  min-width:0!important;
  color:#173462!important;
  font-size:11px!important;
  line-height:1.1!important;
  font-weight:400!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-label em{
  color:#df2d2d!important;
  font-style:normal!important;
  font-weight:600!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-control{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  display:flex!important;
  align-items:stretch!important;
  border:1px solid #cfd6df!important;
  border-radius:6px!important;
  background:#fff!important;
  overflow:visible!important;
  color:#0d2448!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-control:focus-within{
  border-color:#9cabbd!important;
  box-shadow:0 0 0 2px rgba(30,64,112,.06)!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-control-icon{
  box-sizing:border-box!important;
  width:43px!important;
  min-width:43px!important;
  min-height:36px!important;
  display:grid!important;
  place-items:center!important;
  border-right:1px solid #d8dde4!important;
  color:#0e2851!important;
  background:#fff!important;
  border-radius:5px 0 0 5px!important;
  font-size:16px!important;
  line-height:1!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-control-icon svg{width:18px!important;height:18px!important;stroke-width:1.9!important}
html body.sales-view #modal.sale-entry-modal .sale-money-symbol{font-weight:600!important;font-size:15px!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-control input,
html body.sales-view #modal.sale-entry-modal .sale-modal-control select{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0 10px!important;
  border:0!important;
  outline:0!important;
  border-radius:0 5px 5px 0!important;
  background:#fff!important;
  color:#102a56!important;
  box-shadow:none!important;
  font:400 12px/1.2 Inter,Arial,sans-serif!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-control input::placeholder{color:#73809a!important;opacity:1!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-control input[readonly]{background:#fff!important;color:#173462!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-control select{
  appearance:none!important;
  -webkit-appearance:none!important;
  padding-right:34px!important;
  cursor:pointer!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-select-arrow{
  position:absolute!important;
  right:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  pointer-events:none!important;
  color:#0c2347!important;
  display:grid!important;
  place-items:center!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-select-arrow svg{width:15px!important;height:15px!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-payment .sale-modal-control,
html body.sales-view #modal.sale-entry-modal .sale-modal-method .sale-modal-control{position:relative!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-client-control{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 39px!important;
  gap:8px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-client-control .sale-modal-control{min-width:0!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-customer-btn{
  width:39px!important;
  height:38px!important;
  min-width:39px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #cfd6df!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#12305e!important;
  cursor:pointer!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-customer-btn svg{width:18px!important;height:18px!important}
html body.sales-view #modal.sale-entry-modal .search-select{
  position:relative!important;
  min-width:0!important;
  flex:1 1 auto!important;
  display:block!important;
}
html body.sales-view #modal.sale-entry-modal .search-select>input{width:100%!important}
html body.sales-view #modal.sale-entry-modal .search-results{
  box-sizing:border-box!important;
  position:absolute!important;
  z-index:1800!important;
  top:calc(100% + 6px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  max-height:230px!important;
  overflow:auto!important;
  padding:5px!important;
  margin:0!important;
  border:1px solid #d2d8e0!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:0 15px 34px rgba(15,23,42,.16)!important;
}
html body.sales-view #modal.sale-entry-modal .search-results button{
  width:100%!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:5px!important;
  background:#fff!important;
  color:#14294d!important;
  text-align:left!important;
  display:grid!important;
  gap:2px!important;
}
html body.sales-view #modal.sale-entry-modal .search-results button:hover{background:#f6f1e9!important}
html body.sales-view #modal.sale-entry-modal .search-results button strong{font-size:12px!important;font-weight:600!important}
html body.sales-view #modal.sale-entry-modal .search-results button small,
html body.sales-view #modal.sale-entry-modal .search-empty{font-size:10.5px!important;color:#66758d!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-product-entry{
  display:grid!important;
  grid-template-columns:minmax(250px,2.45fr) minmax(128px,1fr) minmax(168px,1.35fr) minmax(142px,1.12fr) 118px!important;
  gap:13px!important;
  align-items:end!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-add-btn{
  box-sizing:border-box!important;
  width:118px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 14px!important;
  border:0!important;
  border-radius:6px!important;
  background:linear-gradient(180deg,#9b7440,#8b632d)!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:0 1px 2px rgba(56,38,14,.16)!important;
  cursor:pointer!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-add-btn svg{width:17px!important;height:17px!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-suffix{
  height:36px!important;
  min-width:31px!important;
  display:grid!important;
  place-items:center!important;
  padding-right:6px!important;
  color:#16305c!important;
  font-size:12px!important;
  pointer-events:none!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines{margin-top:12px!important;min-width:0!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-card{
  box-sizing:border-box!important;
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid #d8d4ce!important;
  border-radius:6px!important;
  background:#fff!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-scroll{overflow-x:auto!important;overflow-y:hidden!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-table{
  width:100%!important;
  min-width:900px!important;
  border-collapse:collapse!important;
  table-layout:auto!important;
  color:#29405f!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-table thead{background:linear-gradient(90deg,#faf7f2,#f5f0e9)!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-table th{
  height:32px!important;
  padding:0 11px!important;
  border:0!important;
  border-bottom:1px solid #e2ded8!important;
  color:#56647a!important;
  background:transparent!important;
  text-align:left!important;
  white-space:nowrap!important;
  font:500 9px/1 Inter,Arial,sans-serif!important;
  letter-spacing:0!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-table td{
  height:38px!important;
  padding:6px 11px!important;
  border:0!important;
  border-bottom:1px solid #ebe8e3!important;
  color:#263a59!important;
  white-space:nowrap!important;
  font:400 10px/1.2 Inter,Arial,sans-serif!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-lines-table tbody tr:last-child td{border-bottom:0!important}
html body.sales-view #modal.sale-entry-modal .sale-line-product{max-width:200px!important;overflow:hidden!important;text-overflow:ellipsis!important}
html body.sales-view #modal.sale-entry-modal .sale-line-money{text-align:right!important;font-variant-numeric:tabular-nums!important}
html body.sales-view #modal.sale-entry-modal .sale-line-remove{
  width:29px!important;height:29px!important;padding:0!important;border:1px solid #e4b5b5!important;border-radius:5px!important;background:#fff!important;color:#d33d3d!important;display:grid!important;place-items:center!important;cursor:pointer!important
}
html body.sales-view #modal.sale-entry-modal .sale-line-remove svg{width:14px!important;height:14px!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-empty{
  box-sizing:border-box!important;
  min-height:94px!important;
  margin:6px!important;
  padding:14px 18px!important;
  border:1px dashed #879ab5!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  color:#35537e!important;
  text-align:center!important;
  background:#fff!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-empty-icon{display:grid!important;place-items:center!important;color:#7186a5!important;margin-bottom:2px!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-empty-icon svg{width:28px!important;height:28px!important;stroke-width:1.7!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-empty strong{font-size:12px!important;line-height:1.1!important;font-weight:500!important;color:#35537e!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-empty small{font-size:10px!important;line-height:1.15!important;font-weight:400!important;color:#667a98!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-totals-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px 16px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-notes{margin-top:10px!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-actions{
  margin-top:13px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:12px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-actions .btn{
  box-sizing:border-box!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  border-radius:6px!important;
  padding:0 20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-cancel{
  min-width:95px!important;
  border:1px solid #d5d6d8!important;
  background:#fff!important;
  color:#15243a!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-submit{
  min-width:158px!important;
  border:0!important;
  background:linear-gradient(180deg,#9b7440,#8b632d)!important;
  color:#fff!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-submit svg{width:17px!important;height:17px!important}

/* Evita que el sidebar, topbar o cualquier capa del módulo se dibuje sobre el modal. */
html body.sales-view #sidebar,
html body.sales-view .topbar{isolation:auto!important}
html body.sales-view #modal.sale-entry-modal ~ *{ }

@media(min-width:901px) and (max-width:1240px){
  html body.sales-view #modal.sale-entry-modal{padding:28px 14px 12px!important;place-items:start center!important}
  html body.sales-view #modal.sale-entry-modal .modal-card{width:min(1016px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important;max-height:calc(100dvh - 40px)!important;transform:none!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-product-entry{grid-template-columns:minmax(240px,2fr) 120px 150px 135px 110px!important;gap:9px!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-add-btn{width:110px!important}
}
@media(max-width:900px){
  html body.sales-view #modal.sale-entry-modal{padding:10px!important;align-items:end!important;place-items:end center!important;overflow:hidden!important}
  html body.sales-view #modal.sale-entry-modal .modal-card{width:100%!important;max-width:100%!important;max-height:calc(100dvh - 20px)!important;transform:none!important;border-radius:10px!important}
  html body.sales-view #modal.sale-entry-modal .modal-head{min-height:88px!important;flex-basis:88px!important;padding:11px 14px!important}
  html body.sales-view #modal.sale-entry-modal .modal-lead-icon{width:56px!important;height:56px!important;min-width:56px!important;flex-basis:56px!important}
  html body.sales-view #modal.sale-entry-modal .modal-lead-icon svg{width:29px!important;height:29px!important}
  html body.sales-view #modal.sale-entry-modal #modalTitle{font-size:21px!important}
  html body.sales-view #modal.sale-entry-modal .modal-body{padding:0 10px 10px!important}
  html body.sales-view #modal.sale-entry-modal .sale-client-grid{grid-template-columns:1fr 1fr!important}
  html body.sales-view #modal.sale-entry-modal .sale-client-grid>*{grid-column:auto!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-customer{grid-column:1/-1!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-product-entry{grid-template-columns:1fr 1fr!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-product-search{grid-column:1/-1!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-add-btn{width:100%!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-totals-grid{grid-template-columns:1fr 1fr!important}
}
@media(max-width:620px){
  html body.sales-view #modal.sale-entry-modal{padding:0!important;align-items:stretch!important;place-items:stretch!important}
  html body.sales-view #modal.sale-entry-modal .modal-card{height:100dvh!important;max-height:100dvh!important;border:0!important;border-radius:0!important}
  html body.sales-view #modal.sale-entry-modal .modal-head{min-height:78px!important;flex-basis:78px!important;padding:10px!important}
  html body.sales-view #modal.sale-entry-modal .modal-title-wrap{gap:10px!important}
  html body.sales-view #modal.sale-entry-modal .modal-lead-icon{width:50px!important;height:50px!important;min-width:50px!important;flex-basis:50px!important}
  html body.sales-view #modal.sale-entry-modal #modalEyebrow{font-size:9px!important}
  html body.sales-view #modal.sale-entry-modal #modalTitle{font-size:19px!important}
  html body.sales-view #modal.sale-entry-modal .modal-subtitle{font-size:10px!important}
  html body.sales-view #modal.sale-entry-modal .modal-body{padding:0 8px 8px!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-form{gap:8px!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-section-head{padding:6px 8px!important;min-height:52px!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-section-icon{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-info{display:none!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-section-body{padding:8px!important}
  html body.sales-view #modal.sale-entry-modal .sale-client-grid,
  html body.sales-view #modal.sale-entry-modal .sale-modal-product-entry,
  html body.sales-view #modal.sale-entry-modal .sale-modal-totals-grid{grid-template-columns:1fr!important}
  html body.sales-view #modal.sale-entry-modal .sale-client-grid>*,
  html body.sales-view #modal.sale-entry-modal .sale-modal-product-entry>*{grid-column:1!important;width:100%!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-add-btn{width:100%!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-actions{display:grid!important;grid-template-columns:1fr 1.45fr!important;gap:8px!important}
  html body.sales-view #modal.sale-entry-modal .sale-modal-actions .btn{width:100%!important;min-width:0!important;padding:0 8px!important}
}
/* V292.1 · Ajustes finales de fidelidad visual para Nueva venta */
html body.sales-view #modal.sale-entry-modal .modal-subtitle{display:block!important}
html body.sales-view #modal.sale-entry-modal .sale-modal-control input{ text-align:left!important; }
html body.sales-view #modal.sale-entry-modal .sale-modal-inline-currency{
  min-width:14px!important;
  height:36px!important;
  padding-left:10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  color:#102a56!important;
  font:400 12px/1 Inter,Arial,sans-serif!important;
  pointer-events:none!important;
}
html body.sales-view #modal.sale-entry-modal .sale-modal-inline-currency+input{padding-left:3px!important}
html body.sales-view #modal.sale-entry-modal #saleDueDateWrap.hidden{display:none!important}
/* V292.2 · Ajuste geométrico final contra la captura de referencia (1536×1024) */
@media(min-width:1241px){
  html body.sales-view #modal.sale-entry-modal{padding-top:69px!important}
  html body.sales-view #modal.sale-entry-modal .modal-card{
    width:min(1014px,calc(100vw - 42px))!important;
    max-width:1014px!important;
    max-height:calc(100dvh - 79px)!important;
    transform:translateX(32px)!important;
  }
}
html body.sales-view #modal.sale-entry-modal .modal-body{
  padding-top:2px!important;
  scrollbar-gutter:auto!important;
}
html body.sales-view #modal.sale-entry-modal .sale-client-section .sale-modal-section-body{
  padding-top:14px!important;
  padding-bottom:18px!important;
}
html body.sales-view #modal.sale-entry-modal .sale-products-section .sale-modal-empty{min-height:91px!important}
html body.sales-view #modal.sale-entry-modal .sale-totals-section{margin-top:-2px!important}
html body.sales-view #modal.sale-entry-modal .sale-totals-section .sale-modal-section-head{min-height:56px!important;padding-top:6px!important;padding-bottom:6px!important}
html body.sales-view #modal.sale-entry-modal .sale-totals-section .sale-modal-section-body{padding-top:8px!important;padding-bottom:10px!important}
html body.sales-view #modal.sale-entry-modal .sale-totals-section .sale-modal-totals-grid{row-gap:8px!important}
html body.sales-view #modal.sale-entry-modal .sale-totals-section .sale-modal-field{gap:4px!important}
html body.sales-view #modal.sale-entry-modal .sale-totals-section .sale-modal-actions{margin-top:9px!important}
/* V292.3 · En escritorio medio el modal permanece completamente a la derecha del sidebar. */
@media(min-width:1201px) and (max-width:1450px){
  html body.sales-view #modal.sale-entry-modal{
    padding:24px 18px 12px 268px!important;
    place-items:start!important;
    align-items:start!important;
    justify-items:start!important;
  }
  html body.sales-view #modal.sale-entry-modal .modal-card{
    width:min(1014px,calc(100vw - 286px))!important;
    max-width:calc(100vw - 286px)!important;
    max-height:calc(100dvh - 36px)!important;
    transform:none!important;
  }
}
@media(min-width:1025px) and (max-width:1200px){
  html body.sales-view #modal.sale-entry-modal{
    padding:18px 18px 12px 238px!important;
    place-items:start!important;
    align-items:start!important;
    justify-items:start!important;
  }
  html body.sales-view #modal.sale-entry-modal .modal-card{
    width:min(1014px,calc(100vw - 256px))!important;
    max-width:calc(100vw - 256px)!important;
    max-height:calc(100dvh - 30px)!important;
    transform:none!important;
  }
}

/* ======================================================================
   V292.4 · NUEVA VENTA — CENTRADO HORIZONTAL DEFINITIVO
   - Centra el modal exactamente respecto al viewport en escritorio amplio.
   - El sidebar permanece por debajo del backdrop (z-index del modal: 1600),
     por lo que nunca puede superponerse al formulario.
   - Conserva el centrado adaptativo especial en resoluciones medias/móviles.
   ====================================================================== */
@media (min-width:1451px){
  html body.sales-view #modal.sale-entry-modal{
    justify-items:center!important;
    place-items:start center!important;
  }
  html body.sales-view #modal.sale-entry-modal .modal-card{
    margin-left:auto!important;
    margin-right:auto!important;
    transform:none!important;
  }
}

/* ======================================================================
   V292.5 · NUEVA VENTA — MISMA POSICIÓN DE "NUEVA COMPRA"
   ----------------------------------------------------------------------
   En escritorio, el modal de venta usa exactamente la misma estrategia
   geométrica que el modal de compra: centrado respecto al viewport completo,
   con margen uniforme superior/inferior. El sidebar permanece detrás del
   backdrop gracias al z-index dedicado del modal de ventas.
   ====================================================================== */
@media (min-width:901px){
  html body.sales-view #modal.sale-entry-modal{
    box-sizing:border-box!important;
    inset:0!important;
    padding:14px 18px!important;
    display:grid!important;
    place-items:center!important;
    align-items:center!important;
    justify-items:center!important;
    overflow:hidden!important;
  }
  html body.sales-view #modal.sale-entry-modal .modal-card{
    box-sizing:border-box!important;
    width:min(1016px,calc(100vw - 36px))!important;
    max-width:1016px!important;
    max-height:calc(100dvh - 28px)!important;
    margin:0!important;
    transform:none!important;
    position:relative!important;
  }
}

/* ======================================================================
   V292.6 · LOGIN — REPRODUCCIÓN FIEL DE LA REFERENCIA
   - Ventana centrada y con proporciones equivalentes a 690 × 785 px.
   - El login se mantiene por encima de toda la aplicación y del sidebar.
   - Responsive sin deformar la composición original.
   ====================================================================== */
html body.login-active{
  overflow:hidden!important;
}
html body.login-active #app,
html body.login-active #sidebar,
html body.login-active #sidebarBackdrop{
  display:none!important;
}
#loginScreen.login-screen{
  position:fixed!important;
  inset:0!important;
  z-index:2500!important;
  min-height:100dvh!important;
  width:100%!important;
  display:block!important;
  overflow:auto!important;
  padding:0 17px 38px!important;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  color:#0b0d16!important;
  background:
    radial-gradient(circle at 11% 17%,rgba(255,255,255,.98) 0 2%,transparent 24%),
    radial-gradient(circle at 86% 23%,rgba(255,255,255,.90) 0 5%,transparent 30%),
    radial-gradient(circle at 50% 92%,rgba(255,255,255,.74) 0 8%,transparent 36%),
    linear-gradient(135deg,#f8f4ed 0%,#eee8df 49%,#f7f2eb 100%)!important;
}
#loginScreen.login-screen::before,
#loginScreen.login-screen::after{
  content:"";
  position:fixed;
  border-radius:50%;
  filter:blur(32px);
  pointer-events:none;
  z-index:-1;
}
#loginScreen.login-screen::before{
  width:360px;
  height:360px;
  left:-120px;
  top:20px;
  background:rgba(255,255,255,.72);
}
#loginScreen.login-screen::after{
  width:420px;
  height:420px;
  right:-140px;
  bottom:-120px;
  background:rgba(255,255,255,.60);
}
#loginScreen.hidden{display:none!important}

#loginScreen .login-help{
  position:absolute!important;
  top:20px!important;
  right:max(24px,calc((100vw - 560px)/2))!important;
  height:37px!important;
  border:0!important;
  background:transparent!important;
  color:#79501b!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:7px 0!important;
  font:500 14px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  box-shadow:none!important;
  z-index:3!important;
}
#loginScreen .login-help>svg:first-child{
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#loginScreen .login-help-chevron{
  width:15px!important;
  height:15px!important;
  fill:none!important;
  stroke:#4b3c2b!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  margin-left:1px!important;
}

#loginScreen .login-card-shell{
  width:min(560px,calc(100vw - 34px))!important;
  min-height:672px!important;
  margin:75px auto 0!important;
  position:relative!important;
  overflow:visible!important;
  border:1px solid rgba(207,183,151,.42)!important;
  border-radius:21px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.79))!important;
  box-shadow:0 28px 70px rgba(98,72,37,.16)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}
#loginScreen .login-language{
  position:absolute!important;
  top:24px!important;
  right:24px!important;
  min-width:89px!important;
  height:35px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  padding:0 10px!important;
  border:1px solid #e5d4bd!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.80)!important;
  color:#33343a!important;
  box-shadow:none!important;
  font:500 14px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  z-index:2!important;
}
#loginScreen .login-language .login-flag{
  font-size:18px!important;
  line-height:1!important;
}
#loginScreen .login-language svg{
  width:16px!important;
  height:16px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

#loginScreen form.login-card{
  width:100%!important;
  max-width:none!important;
  min-height:670px!important;
  margin:0!important;
  padding:67px 60px 24px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#0b0d16!important;
}
#loginScreen .login-heading{text-align:center!important}
#loginScreen .login-eyebrow{
  margin:0 0 12px!important;
  color:#9a7647!important;
  letter-spacing:.17em!important;
  font:600 11px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
#loginScreen .login-heading h1{
  margin:0!important;
  color:#0b0d16!important;
  font:700 37px/1.07 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  letter-spacing:-.035em!important;
}
#loginScreen .login-heading p{
  margin:11px 0 0!important;
  color:#7c7e88!important;
  font:400 15px/1.45 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

#loginScreen .login-fields{margin-top:25px!important}
#loginScreen .login-field-label{
  display:block!important;
  margin:0 0 6px!important;
  padding:0!important;
  color:#3d414b!important;
  font:600 13px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  letter-spacing:0!important;
}
#loginScreen .login-password-label{margin-top:18px!important}
#loginScreen .login-input-wrap{
  height:43px!important;
  display:flex!important;
  align-items:center!important;
  overflow:hidden!important;
  border:1px solid #d8c2a6!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.53)!important;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease!important;
}
#loginScreen .login-input-wrap:focus-within{
  border-color:#b78342!important;
  box-shadow:0 0 0 3px rgba(183,131,66,.12)!important;
  background:rgba(255,255,255,.84)!important;
}
#loginScreen .login-input-icon{
  width:49px!important;
  min-width:49px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  border-right:1px solid #e6d7c3!important;
  color:#5f6269!important;
}
#loginScreen .login-input-icon svg{
  width:19px!important;
  height:19px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#loginScreen .login-input-wrap input{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  height:100%!important;
  margin:0!important;
  padding:0 13px!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#12141b!important;
  font:400 14px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
#loginScreen .login-password-toggle{
  width:47px!important;
  min-width:47px!important;
  height:100%!important;
  border:0!important;
  background:transparent!important;
  color:#818692!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  box-shadow:none!important;
}
#loginScreen .login-password-toggle svg{
  width:20px!important;
  height:20px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

#loginScreen .login-options{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin-top:17px!important;
}
#loginScreen .login-remember{
  display:inline-flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  color:#656a75!important;
  font:400 13px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  user-select:none!important;
  cursor:pointer!important;
}
#loginScreen .login-remember input{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}
#loginScreen .login-check{
  width:21px!important;
  height:21px!important;
  flex:0 0 21px!important;
  border-radius:4px!important;
  background:linear-gradient(180deg,#a97834,#8e6025)!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:inset 0 1px rgba(255,255,255,.28)!important;
}
#loginScreen .login-check svg{
  width:15px!important;
  height:15px!important;
  fill:none!important;
  stroke:#fff!important;
  stroke-width:2.5!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#loginScreen .login-remember input:not(:checked)+.login-check{
  background:transparent!important;
  border:1px solid #cbb699!important;
}
#loginScreen .login-remember input:not(:checked)+.login-check svg{opacity:0!important}
#loginScreen .login-forgot{
  border:0!important;
  background:transparent!important;
  padding:4px 0!important;
  color:#a17037!important;
  box-shadow:none!important;
  font:400 13px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  white-space:nowrap!important;
}
#loginScreen .login-forgot:hover{text-decoration:underline!important}

#loginScreen .login-submit{
  width:100%!important;
  height:53px!important;
  margin-top:21px!important;
  padding:0 18px!important;
  border:0!important;
  border-radius:8px!important;
  color:#fff!important;
  background:linear-gradient(180deg,#bd8943 0%,#976520 100%)!important;
  box-shadow:0 7px 16px rgba(139,92,31,.15),inset 0 1px rgba(255,255,255,.20)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  font:600 16px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  transition:transform .14s ease,filter .14s ease!important;
}
#loginScreen .login-submit:hover{filter:brightness(1.04)!important;transform:translateY(-1px)!important}
#loginScreen .login-submit:active{transform:translateY(0)!important}
#loginScreen .login-submit svg{
  width:24px!important;
  height:24px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

#loginScreen .login-divider{
  display:grid!important;
  grid-template-columns:1fr auto 1fr!important;
  align-items:center!important;
  gap:15px!important;
  margin:25px 0 15px!important;
  color:#787d87!important;
}
#loginScreen .login-divider span{height:1px!important;background:#dfd6ca!important}
#loginScreen .login-divider p{
  margin:0!important;
  color:#787d87!important;
  font:400 12px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  white-space:nowrap!important;
}
#loginScreen .login-shortcuts{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
#loginScreen .login-shortcut{
  min-width:0!important;
  min-height:67px!important;
  padding:7px 4px!important;
  border:1px solid #dfc6a8!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.40)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  color:#17191f!important;
  box-shadow:none!important;
  transition:.16s ease!important;
}
#loginScreen .login-shortcut:hover{
  background:#fffaf3!important;
  border-color:#bd8a4d!important;
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(97,66,28,.08)!important;
}
#loginScreen .login-shortcut svg{
  width:24px!important;
  height:24px!important;
  fill:none!important;
  stroke:#956222!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#loginScreen .login-shortcut span{
  font:500 12px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  white-space:nowrap!important;
}
#loginScreen .login-demo{
  display:block!important;
  text-align:center!important;
  margin:35px 0 0!important;
  color:#8e929d!important;
  font:400 12px/1.2 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

@media(max-width:620px){
  html body.login-active{overflow:auto!important}
  #loginScreen.login-screen{padding:0 12px 22px!important}
  #loginScreen .login-help{
    top:10px!important;
    right:16px!important;
  }
  #loginScreen .login-help span{display:none!important}
  #loginScreen .login-card-shell{
    width:min(560px,calc(100vw - 24px))!important;
    min-height:0!important;
    margin-top:58px!important;
    border-radius:18px!important;
  }
  #loginScreen form.login-card{
    min-height:0!important;
    padding:66px 22px 24px!important;
  }
  #loginScreen .login-language{top:18px!important;right:18px!important}
  #loginScreen .login-heading h1{font-size:34px!important}
  #loginScreen .login-options{
    align-items:flex-start!important;
    flex-direction:column!important;
    gap:9px!important;
  }
  #loginScreen .login-forgot{align-self:flex-end!important}
  #loginScreen .login-shortcuts{grid-template-columns:1fr!important}
  #loginScreen .login-shortcut{
    min-height:58px!important;
    flex-direction:row!important;
  }
  #loginScreen .login-divider{gap:9px!important}
  #loginScreen .login-divider p{
    font-size:11px!important;
    white-space:normal!important;
    text-align:center!important;
  }
  #loginScreen .login-demo{margin-top:24px!important}
}

/* ======================================================================
   V292.7 · LOGIN — CENTRADO REAL EN EL VIEWPORT
   - Centra horizontal y verticalmente la tarjeta de acceso.
   - Mantiene el sidebar completamente fuera de la capa de login.
   - En pantallas bajas cambia a alineación superior para evitar recortes.
   ====================================================================== */
html body.login-active #loginScreen.login-screen{
  display:grid!important;
  place-items:center!important;
  align-content:center!important;
  justify-content:center!important;
  min-height:100dvh!important;
  height:100dvh!important;
  padding:20px 17px!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}
html body.login-active #loginScreen .login-card-shell{
  margin:0!important;
  align-self:center!important;
  justify-self:center!important;
}

/* La ayuda permanece fuera de la tarjeta, sin desplazar su centro. */
html body.login-active #loginScreen .login-help{
  top:20px!important;
}

/* Refuerzo: ninguna capa de navegación puede quedar por encima del login. */
html body.login-active #app,
html body.login-active #sidebar,
html body.login-active #sidebarBackdrop{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Si el alto disponible es menor que la tarjeta, prioriza que todo sea accesible. */
@media (max-height:740px){
  html body.login-active #loginScreen.login-screen{
    place-items:start center!important;
    align-content:start!important;
    height:auto!important;
    min-height:100dvh!important;
    padding:58px 17px 28px!important;
  }
}

@media(max-width:620px){
  html body.login-active #loginScreen.login-screen{
    place-items:center!important;
    align-content:center!important;
    height:100dvh!important;
    min-height:100dvh!important;
    padding:56px 12px 22px!important;
  }
  html body.login-active #loginScreen .login-card-shell{
    margin:0!important;
  }
}

@media(max-width:620px) and (max-height:780px){
  html body.login-active #loginScreen.login-screen{
    place-items:start center!important;
    align-content:start!important;
    height:auto!important;
    padding-top:56px!important;
  }
}


/* ======================================================================
   V292.8 · LOGIN — CENTRADO DEFINITIVO + SIN LEYENDA DEMO
   ====================================================================== */
html body.login-active #loginScreen.login-screen{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:100dvh!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  place-items:center!important;
  align-content:center!important;
  justify-content:center!important;
  padding:20px!important;
  margin:0!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  z-index:2500!important;
}
html body.login-active #loginScreen .login-card-shell{
  position:relative!important;
  margin:0!important;
  align-self:center!important;
  justify-self:center!important;
}
html body.login-active #loginScreen .login-demo{display:none!important}
html body.login-active #app,
html body.login-active #sidebar,
html body.login-active #sidebarBackdrop{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
@media (max-height:740px){
  html body.login-active #loginScreen.login-screen{
    height:auto!important;
    min-height:100dvh!important;
    place-items:start center!important;
    align-content:start!important;
    padding:58px 17px 28px!important;
  }
}
@media (max-width:620px){
  html body.login-active #loginScreen.login-screen{
    padding:56px 12px 22px!important;
  }
}
@media (max-width:620px) and (min-height:781px){
  html body.login-active #loginScreen.login-screen{
    height:100dvh!important;
    min-height:100dvh!important;
    place-items:center!important;
    align-content:center!important;
  }
}

/* ======================================================================
   V292.9 · LOGIN — SIN AYUDA NI SELECTOR DE IDIOMA
   Se eliminan los dos controles marcados por el usuario sin alterar
   el tamaño, centrado ni la distribución interna de la tarjeta.
   ====================================================================== */
html body.login-active #loginScreen .login-help,
html body.login-active #loginScreen .login-language{
  display:none!important;
}

/* ======================================================================
   V292.12 · KARDEX — TIPOGRAFÍA MÁS LEGIBLE
   ----------------------------------------------------------------------
   Aumenta únicamente la lectura de los filtros (kardex-controls) y de la
   tabla (kardex-table-card), manteniendo la estructura, columnas y lógica.
   ====================================================================== */
.kardex-controls{
  padding:11px 12px;
}
.kardex-field{gap:7px}
.kardex-field>span{
  font-size:12px;
  line-height:1.2;
}
.kardex-field input,
.kardex-select{
  height:36px;
}
.kardex-field input,
.kardex-select select{
  font-size:12px;
}
.kardex-search,
.kardex-clear{
  height:40px;
}
.kardex-search input,
.kardex-clear{
  font-size:12px;
}

.kardex-table th{
  padding:10px 10px;
  font-size:11px;
  line-height:1.2;
}
.kardex-table td{
  padding:9px 10px;
  font-size:12.5px;
  line-height:1.25;
}
.kardex-product-cell strong,
.kardex-document-cell strong{
  font-size:12.5px;
}
.kardex-product-cell small{
  font-size:10.5px;
  line-height:1.2;
}
.kardex-document-cell small{
  font-size:10px;
  line-height:1.2;
}
.kardex-type-pill{
  min-width:58px;
  padding:5px 9px;
  font-size:11px;
}
.kardex-footer{
  font-size:11.5px;
}
.kardex-pagination button,
.kardex-page,
.kardex-page-size select{
  font-size:11.5px;
}

@media(max-width:760px){
  .kardex-field>span{font-size:11.5px}
  .kardex-field input,.kardex-select select,.kardex-search input,.kardex-clear{font-size:12px}
  .kardex-table th{font-size:10.5px}
  .kardex-table td{font-size:12px}
  .kardex-product-cell strong,.kardex-document-cell strong{font-size:12px}
}

/* ======================================================================
   V292 · TRASLADOS — MODAL "VER / DETALLE DEL TRASLADO"
   Referencia visual: captura suministrada por el usuario (1536 × 1024).
   El overlay tiene prioridad absoluta sobre el sidebar (z-index 60), por
   lo que el menú lateral queda detrás y nunca invade la ventana.
   ====================================================================== */
html body.transfer-view #modal.transfer-detail-modal{
  position:fixed!important;
  inset:0!important;
  z-index:1900!important;
  isolation:isolate!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  padding:18px!important;
  overflow:auto!important;
  background:rgba(33,40,50,.36)!important;
  backdrop-filter:blur(.55px)!important;
  -webkit-backdrop-filter:blur(.55px)!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-card{
  box-sizing:border-box!important;
  width:min(1014px,calc(100vw - 36px))!important;
  max-width:1014px!important;
  max-height:calc(100dvh - 36px)!important;
  margin:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  position:relative!important;
  z-index:1!important;
  border:1px solid #d9dde4!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0a1d41!important;
  box-shadow:0 28px 76px rgba(15,23,42,.28)!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-head{
  box-sizing:border-box!important;
  min-height:109px!important;
  flex:0 0 109px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:16px!important;
  padding:17px 21px 15px 23px!important;
  border:0!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-title-wrap{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:22px!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-lead-icon{
  box-sizing:border-box!important;
  width:72px!important;
  height:73px!important;
  min-width:72px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:11px!important;
  background:linear-gradient(145deg,#f6eedf,#f0e2c8)!important;
  color:#0a1322!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-lead-icon svg{
  width:35px!important;
  height:35px!important;
  stroke-width:1.95!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-title-copy{min-width:0!important}
html body.transfer-view #modal.transfer-detail-modal #modalEyebrow{
  margin:0 0 7px!important;
  color:#4d658b!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  letter-spacing:.01em!important;
}
html body.transfer-view #modal.transfer-detail-modal #modalTitle{
  margin:0!important;
  color:#071b42!important;
  font:700 22px/1.08 Inter,Arial,sans-serif!important;
  letter-spacing:-.35px!important;
}
html body.transfer-view #modal.transfer-detail-modal .modal-subtitle{
  display:block!important;
  margin:5px 0 0!important;
  color:#526a91!important;
  font:400 13px/1.3 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status{
  box-sizing:border-box!important;
  min-width:145px!important;
  min-height:50px!important;
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:8px 12px!important;
  border:1px solid #bde3ce!important;
  border-radius:7px!important;
  background:#eaf8f0!important;
  color:#1d7c50!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status.warn{border-color:#ead5a3!important;background:#fff7e2!important;color:#936b18!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status.bad{border-color:#efc1c1!important;background:#fff0f0!important;color:#bc2f2f!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-check{
  width:18px!important;height:18px!important;min-width:18px!important;border-radius:50%!important;
  display:grid!important;place-items:center!important;background:#24a56a!important;color:#fff!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status.warn .transfer-detail-status-check{background:#c18b22!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status.bad .transfer-detail-status-check{background:#d84545!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-check svg{width:12px!important;height:12px!important;stroke-width:2.6!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status>span:last-child{display:flex!important;flex-direction:column!important;gap:3px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status strong{font:600 12px/1 Inter,Arial,sans-serif!important;color:inherit!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status small{font:400 11px/1 Inter,Arial,sans-serif!important;color:#617894!important;white-space:nowrap!important}
html body.transfer-view #modal.transfer-detail-modal #closeModal{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  display:grid!important;
  place-items:center!important;
  padding:0 0 2px!important;
  border:1px solid #d5d9e0!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#253955!important;
  font:300 22px/1 Arial,sans-serif!important;
  box-shadow:none!important;
}
html body.transfer-view #modal.transfer-detail-modal #closeModal:hover{background:#f8fafc!important}

html body.transfer-view #modal.transfer-detail-modal form#modalForm.modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  padding:0 23px 18px!important;
  background:#fff!important;
  color:#0a1d41!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-shell{
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section{
  box-sizing:border-box!important;
  overflow:hidden!important;
  border:1px solid #ded4c7!important;
  border-radius:7px!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-head{
  min-height:54px!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  padding:7px 12px!important;
  border-bottom:1px solid #eee7dd!important;
  background:linear-gradient(90deg,#fffdf9 0%,#faf7f2 100%)!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-icon{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:#f3e6cf!important;
  color:#0b1f43!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-icon svg{width:21px!important;height:21px!important;stroke-width:1.9!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-copy{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-copy strong{color:#09204a!important;font:700 15px/1.1 Inter,Arial,sans-serif!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-copy small{color:#536b90!important;font:400 12px/1.15 Inter,Arial,sans-serif!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-body{box-sizing:border-box!important;padding:8px 14px 14px!important;background:#fff!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general{
  display:grid!important;
  grid-template-columns:repeat(24,minmax(0,1fr))!important;
  gap:12px 13px!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field:nth-of-type(1){grid-column:span 9!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field:nth-of-type(2){grid-column:span 7!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field:nth-of-type(3){grid-column:span 8!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-warehouse:nth-of-type(4),
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-warehouse:nth-of-type(5){grid-column:span 12!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-field{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  margin:0!important;
  color:#284a78!important;
  font:400 12px/1.1 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-field>span{color:#284a78!important;font:400 12px/1.1 Inter,Arial,sans-serif!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-control{
  box-sizing:border-box!important;
  min-width:0!important;
  width:100%!important;
  height:38px!important;
  display:flex!important;
  align-items:stretch!important;
  overflow:hidden!important;
  border:1px solid #c9d4e2!important;
  border-radius:6px!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-control>i{
  width:46px!important;
  min-width:46px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  border-right:1px solid #d5dde8!important;
  background:#fff!important;
  color:#0a244c!important;
  font-style:normal!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-control>i svg{width:18px!important;height:18px!important;stroke-width:1.9!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-control.no-icon input{padding-left:13px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-control input{
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  padding:0 13px!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#0b234a!important;
  box-shadow:none!important;
  font:400 13px/1 Inter,Arial,sans-serif!important;
  text-overflow:ellipsis!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-control{align-items:center!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-control .transfer-detail-green-dot{
  width:13px!important;height:13px!important;min-width:13px!important;margin:0 0 0 14px!important;border:0!important;border-radius:50%!important;background:#28ad6e!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-control input{padding-left:20px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-control>b{width:35px!important;min-width:35px!important;display:grid!important;place-items:center!important;color:#09224b!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-status-control>b svg{width:16px!important;height:16px!important}

html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-section{position:relative!important;padding-bottom:80px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-wrap{padding:0 14px!important;overflow:auto!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table{
  width:100%!important;
  min-width:720px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  color:#0a234d!important;
  font-family:Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table th{
  height:34px!important;
  padding:0 14px!important;
  border-right:1px solid #e3e7ed!important;
  border-bottom:1px solid #dce1e8!important;
  background:#f8f9fb!important;
  color:#17345e!important;
  text-align:left!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
  white-space:nowrap!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table td{
  height:41px!important;
  padding:0 14px!important;
  border-right:1px solid #e3e7ed!important;
  border-bottom:1px solid #e1e5ea!important;
  background:#fff!important;
  color:#0b234a!important;
  font:400 13px/1 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table th:first-child,
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table td:first-child{width:58px!important;border-left:1px solid #e3e7ed!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table th:nth-child(2){width:145px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table th:nth-child(4){width:130px!important;text-align:right!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table th:nth-child(5){width:165px!important;text-align:right!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table th:nth-child(6){width:170px!important;text-align:right!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-table td.num{text-align:right!important;white-space:nowrap!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary{
  position:absolute!important;
  right:14px!important;
  bottom:11px!important;
  width:490px!important;
  min-height:60px!important;
  display:grid!important;
  grid-template-columns:1fr 1px 54px 1.15fr!important;
  align-items:center!important;
  gap:14px!important;
  padding:8px 17px!important;
  border-radius:10px!important;
  background:linear-gradient(90deg,#fbf5ea,#fff0c8)!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-count,
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-total{display:flex!important;flex-direction:column!important;gap:4px!important;text-align:right!important;color:#5c4c35!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-count span,
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-total span{font:400 11px/1 Inter,Arial,sans-serif!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-count strong{font:700 18px/1 Inter,Arial,sans-serif!important;color:#071a3b!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-total strong{font:700 18px/1 Inter,Arial,sans-serif!important;color:#35230d!important;white-space:nowrap!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-divider{width:1px!important;height:26px!important;background:#cdbd9e!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-icon{
  width:42px!important;height:42px!important;display:grid!important;place-items:center!important;border-radius:10px!important;background:#fff!important;color:#96691f!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-icon svg{width:25px!important;height:25px!important;stroke-width:1.9!important}

html body.transfer-view #modal.transfer-detail-modal .transfer-detail-cost-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px 13px!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-notes{grid-column:1/-1!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-currency{font:600 17px/1 Inter,Arial,sans-serif!important}

html body.transfer-view #modal.transfer-detail-modal .transfer-detail-actions{
  flex:0 0 65px!important;
  min-height:65px!important;
  margin-top:11px!important;
  border-top:1px solid #e2e4e8!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:11px 0 0!important;
  background:#fff!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-actions-right{display:flex!important;align-items:center!important;gap:11px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn{
  box-sizing:border-box!important;
  height:44px!important;
  min-width:80px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  padding:0 17px!important;
  border:1px solid #d7d9dd!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#071a3b!important;
  cursor:pointer!important;
  box-shadow:none!important;
  font:500 12px/1 Inter,Arial,sans-serif!important;
}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn svg{width:18px!important;height:18px!important;stroke-width:1.9!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.print{min-width:116px!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.edit{min-width:100px!important;border-color:#d6c6a9!important;background:#f7f0e4!important;color:#251c10!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.delete{min-width:105px!important;border-color:#f2b7b7!important;color:#e22f2f!important;background:#fff!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn:hover{background:#f8fafc!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.edit:hover{background:#f0e6d6!important}
html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.delete:hover{background:#fff7f7!important}

/* Garantía explícita: sidebar y drawer quedan siempre debajo del detalle. */
html body.transfer-view:has(#modal.transfer-detail-modal:not(.hidden)){overflow:hidden!important}
html body.transfer-view:has(#modal.transfer-detail-modal:not(.hidden)) .sidebar,
html body.transfer-view:has(#modal.transfer-detail-modal:not(.hidden)) #sidebarBackdrop{pointer-events:none!important}

@media(max-width:1080px){
  html body.transfer-view #modal.transfer-detail-modal{padding:14px!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-card{width:calc(100vw - 28px)!important;max-height:calc(100dvh - 28px)!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general{grid-template-columns:1fr 1fr!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field:nth-of-type(1),
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field:nth-of-type(2),
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-warehouse:nth-of-type(4),
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-warehouse:nth-of-type(5){grid-column:span 1!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field:nth-of-type(3){grid-column:1/-1!important}
}
@media(max-width:720px){
  html body.transfer-view #modal.transfer-detail-modal{padding:8px!important;align-items:flex-end!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-card{width:100%!important;max-width:none!important;max-height:calc(100dvh - 16px)!important;border-radius:10px!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-head{min-height:90px!important;flex-basis:90px!important;padding:11px 12px!important;gap:9px!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-title-wrap{gap:11px!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-lead-icon{width:55px!important;height:55px!important;min-width:55px!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-lead-icon svg{width:27px!important;height:27px!important}
  html body.transfer-view #modal.transfer-detail-modal #modalTitle{font-size:19px!important}
  html body.transfer-view #modal.transfer-detail-modal .modal-subtitle{font-size:11px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-header-status{display:none!important}
  html body.transfer-view #modal.transfer-detail-modal #closeModal{width:40px!important;height:40px!important;min-width:40px!important;margin-left:auto!important}
  html body.transfer-view #modal.transfer-detail-modal form#modalForm.modal-body{padding:0 10px 10px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general,
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-cost-grid{grid-template-columns:1fr!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-field,
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-general .transfer-detail-warehouse,
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-notes{grid-column:1!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-products-section{padding-bottom:96px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary{left:10px!important;right:10px!important;bottom:10px!important;width:auto!important;grid-template-columns:1fr 1px 42px 1.2fr!important;gap:8px!important;padding:8px 10px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-icon{width:38px!important;height:38px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-actions{position:sticky!important;bottom:0!important;z-index:25!important;align-items:center!important;flex-wrap:wrap!important;padding-top:8px!important;background:#fff!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-actions-right{margin-left:auto!important;gap:6px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn{height:40px!important;padding:0 11px!important;min-width:68px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.print{min-width:98px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.edit,
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.delete{min-width:82px!important}
}
@media(max-width:470px){
  html body.transfer-view #modal.transfer-detail-modal .modal-subtitle{display:none!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-section-copy small{font-size:11px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-count span,
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-total span{font-size:10px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-count strong,
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-summary-total strong{font-size:15px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-actions{display:grid!important;grid-template-columns:1fr!important;height:auto!important;min-height:0!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-actions-right{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:6px!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn.print{width:100%!important}
  html body.transfer-view #modal.transfer-detail-modal .transfer-detail-btn{width:100%!important;min-width:0!important;padding:0 8px!important}
}
