
:root{
  --bg:#07111f;--bg2:#0f172a;--panel:#ffffff;--soft:#f8fafc;--line:#dbe4ee;
  --text:#0f172a;--muted:#64748b;--primary:#0ea5e9;--secondary:#2563eb;
  --accent:#22c55e;--danger:#dc2626;--warning:#f59e0b;--purple:#6d28d9;
  --radius:18px;--shadow:0 22px 70px rgba(2,8,23,.18);
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:radial-gradient(circle at top left,rgba(14,165,233,.22),transparent 34%),linear-gradient(135deg,#050b14,#07111f 50%,#0d1b2f);color:var(--text);min-height:100vh}
.app{max-width:1580px;margin:0 auto;padding:20px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;margin-bottom:18px;background:rgba(15,23,42,.88);border:1px solid rgba(148,163,184,.22);border-radius:24px;color:#fff;box-shadow:0 16px 44px rgba(0,0,0,.22)}
.brand{display:flex;align-items:center;gap:16px}.brand-logo{width:62px;height:62px;object-fit:contain;border-radius:14px;background:#fff;padding:4px}.brand h1{margin:0;font-size:23px}.brand p{margin:5px 0 0;color:#cbd5e1;font-size:13px}.brand strong{color:#38bdf8}.top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
button,.btn{border:0;border-radius:13px;padding:10px 13px;font-weight:800;cursor:pointer;font-family:inherit;font-size:13px;transition:.15s;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}
button:hover,.btn:hover{transform:translateY(-1px)}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff}.btn-success{background:linear-gradient(135deg,var(--accent),#16a34a);color:#fff}.btn-dark{background:#0f172a;color:#fff}.btn-light{background:#e2e8f0;color:#0f172a}.btn-danger{background:#fee2e2;color:var(--danger)}.btn-warning{background:#fef3c7;color:#92400e}.btn-purple{background:linear-gradient(135deg,#7c3aed,#4f46e5);color:#fff}
.layout{display:grid;grid-template-columns:360px 1fr 330px;gap:18px;align-items:start}.layout-2{display:grid;grid-template-columns:420px 1fr;gap:18px;align-items:start}.layout-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;align-items:start}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.card-header{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:15px 17px}.card-header h2{margin:0;font-size:17px}.card-header p{margin:5px 0 0;color:#cbd5e1;font-size:12px}.card-body{padding:16px}
.tabs{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:14px}.tab{background:#f1f5f9;color:#334155;border:1px solid var(--line)}.tab.active{background:linear-gradient(135deg,var(--primary),var(--secondary));color:white;border-color:transparent}
label{display:block;font-size:12px;color:#334155;font-weight:900;margin:10px 0 5px}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:11px 12px;font-family:inherit;font-size:13px;color:#0f172a;background:#fff;outline:none}textarea{min-height:90px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(14,165,233,.15)}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:9px}.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px}.hidden{display:none!important}.small{font-size:12px;color:var(--muted);line-height:1.45;margin:7px 0}.muted{color:var(--muted)}
.stat-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px}.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px;box-shadow:0 10px 25px rgba(2,8,23,.10)}.stat span{font-size:10px;text-transform:uppercase;font-weight:900;color:var(--muted)}.stat strong{display:block;margin-top:5px;font-size:22px;color:#0f172a}
.pos-search{font-size:18px;padding:16px;border-radius:16px;font-weight:800}.hint{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:14px;padding:10px;font-size:12px;margin:10px 0}
table{width:100%;border-collapse:collapse}.table-wrap{border:1px solid var(--line);border-radius:16px;overflow:auto;max-height:520px}.main-table th{background:#0f172a;color:white;font-size:12px;text-align:left;padding:11px;position:sticky;top:0}.main-table td{border-bottom:1px solid var(--line);padding:10px;font-size:13px;vertical-align:middle}.main-table tr:nth-child(even) td{background:#f8fafc}.right{text-align:right}.center{text-align:center}
.product-list{max-height:360px;overflow:auto}.product{border:1px solid var(--line);border-radius:14px;padding:10px;margin-bottom:9px;background:#f8fafc;cursor:pointer}.product:hover{border-color:var(--primary);background:#eef8ff}.product strong{display:block;color:#0f172a}.product span{display:block;color:var(--muted);font-size:12px;margin-top:3px}.stock-low{color:#b45309;font-weight:900}.stock-out{color:#dc2626;font-weight:900}
.total-box{background:linear-gradient(135deg,#f8fafc,#ecfeff);border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:12px}.total-box small{font-size:11px;color:var(--muted);font-weight:900;text-transform:uppercase}.total-box h1{margin:5px 0 0;color:#16a34a;font-size:38px}.pay-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.vuelto{font-size:22px;font-weight:900;color:#0f172a;background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:12px;text-align:center;margin:8px 0}
.list-mini{max-height:330px;overflow:auto;border:1px solid var(--line);border-radius:14px}.mini-row{display:flex;justify-content:space-between;gap:8px;padding:10px;border-bottom:1px solid var(--line);font-size:12px}.mini-row:last-child{border-bottom:0}.mini-row strong{display:block}.mini-row span{color:var(--muted)}
.notice{padding:10px 12px;border-radius:14px;background:#f8fafc;border:1px solid var(--line);font-size:12px;color:#334155;margin-top:10px}.danger-zone{background:#fff7f7;border:1px dashed #fecaca;border-radius:14px;padding:12px;margin-top:12px}
.support-box{display:flex;align-items:center;gap:12px;background:#07111f;color:#fff;border-radius:18px;padding:14px;margin-top:14px}.support-box img{width:78px;height:78px;object-fit:contain;background:#fff;border-radius:14px;padding:5px}.support-box p{margin:2px 0;color:#cbd5e1;font-size:12px}.support-box strong{color:#fff}
.config-lock{max-width:520px;margin:28px auto}.logo-preview{width:120px;height:90px;border:1px solid var(--line);border-radius:16px;object-fit:contain;background:#fff;padding:6px;margin-top:8px}

.manual-tools{display:grid;grid-template-columns:1fr;gap:8px;margin-top:12px}
.manual-title{font-size:12px;font-weight:900;color:#0f172a;margin:12px 0 6px;text-transform:uppercase}
.manual-result{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:14px;padding:10px;margin-bottom:8px;background:#fff}
.manual-result:hover{border-color:var(--primary);background:#eef8ff}
.manual-result strong{display:block;color:#0f172a;font-size:13px}
.manual-result span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.manual-result button{width:auto;min-width:86px;margin:0}
.quick-empty{padding:10px;border:1px dashed #cbd5e1;border-radius:14px;color:#64748b;font-size:12px;background:#f8fafc}

.ticket{display:none;width:80mm;background:white;color:#000;padding:4mm;font-family:Consolas,monospace;font-size:12px}.ticket h3{text-align:center;margin:0 0 4px}.ticket .line{border-top:1px dashed #000;margin:6px 0}.ticket-row{display:flex;justify-content:space-between;gap:6px}.ticket-total{font-size:16px;font-weight:bold;text-align:right;margin-top:6px}.ticket-logo{display:block;max-width:44mm;max-height:22mm;object-fit:contain;margin:0 auto 4px}
@media(max-width:1200px){.layout,.layout-2,.layout-3{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.app{padding:10px}.topbar{flex-direction:column;align-items:flex-start}.tabs,.stat-grid,.grid-2,.grid-3{grid-template-columns:1fr}.pay-grid{grid-template-columns:1fr}}
@media print{@page{size:80mm auto;margin:0}body *{visibility:hidden!important}.ticket,.ticket *{visibility:visible!important}.ticket{display:block!important;position:absolute;left:0;top:0;width:80mm!important;box-shadow:none!important}}

/* ===== REPORTES GERENCIALES ===== */
.reportes-panel{display:grid;grid-template-columns:1fr;gap:16px}.reportes-toolbar{display:grid;grid-template-columns:1.1fr 180px 180px 180px auto;gap:10px;align-items:end;margin-bottom:14px}.reportes-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}.reporte-kpi{background:linear-gradient(135deg,#ffffff,#f8fafc);border:1px solid var(--line);border-radius:16px;padding:13px;box-shadow:0 8px 22px rgba(2,8,23,.08)}.reporte-kpi span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;font-weight:900;color:var(--muted)}.reporte-kpi strong{display:block;margin-top:6px;font-size:24px;color:#0f172a}.reporte-kpi small{display:block;margin-top:4px;color:#64748b;font-size:11px}.reporte-live{background:#ecfeff;border:1px solid #bae6fd;border-radius:16px;padding:12px;color:#075985;font-size:13px;margin-bottom:14px}.reporte-live strong{color:#0f172a}.reportes-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.report-table-wrap{border:1px solid var(--line);border-radius:16px;overflow:auto;background:#fff;max-height:430px}.report-table{width:100%;min-width:760px;border-collapse:collapse}.report-table th{background:#0f172a;color:white;text-align:left;font-size:12px;padding:11px;position:sticky;top:0}.report-table td{border-bottom:1px solid var(--line);padding:10px;font-size:12px;vertical-align:top}.report-table tr:nth-child(even) td{background:#f8fafc}.report-mini-table{width:100%;border-collapse:collapse}.report-mini-table th{background:#0f172a;color:#fff;padding:10px;font-size:12px;text-align:left}.report-mini-table td{border-bottom:1px solid var(--line);padding:9px;font-size:12px}.report-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}.report-section-title h3{margin:0;font-size:16px;color:#0f172a}.pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;background:#e0f2fe;color:#075985}.pill-open{background:#dcfce7;color:#166534}.pill-closed{background:#fee2e2;color:#991b1b}.report-note{font-size:12px;color:#64748b;margin:8px 0 0;line-height:1.45}.report-actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:1150px){.reportes-toolbar{grid-template-columns:1fr 1fr}.reportes-kpis,.reportes-grid{grid-template-columns:1fr 1fr}}@media(max-width:760px){.reportes-toolbar,.reportes-kpis,.reportes-grid{grid-template-columns:1fr}.report-table{min-width:700px}}


/* ===== AJUSTE UX REPORTES SIN FECHA BASE ===== */
.reportes-filtros,
.report-filter,
.reporte-filtros,
.filtros-reportes{
  display:grid;
  grid-template-columns:minmax(320px,1fr) 180px 180px auto auto;
  gap:10px;
  align-items:end;
}
@media(max-width:1000px){
  .reportes-filtros,
  .report-filter,
  .reporte-filtros,
  .filtros-reportes{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:640px){
  .reportes-filtros,
  .report-filter,
  .reporte-filtros,
  .filtros-reportes{
    grid-template-columns:1fr;
  }
}


/* ===== COMPROBANTES PRO ===== */
.comprobantes-layout{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);
  gap:18px;
  align-items:start;
}
.comprobantes-filtros{
  display:grid;
  grid-template-columns:1.4fr 220px;
  gap:12px;
  margin-bottom:12px;
}
.comprobantes-table-wrap{
  border:1px solid var(--line);
  border-radius:16px;
  overflow:auto;
  max-height:560px;
  background:#fff;
}
.comprobantes-table{
  width:100%;
  min-width:860px;
  border-collapse:collapse;
}
.comprobantes-table th{
  background:#0f172a;
  color:#fff;
  font-size:12px;
  text-align:left;
  padding:12px 10px;
  position:sticky;
  top:0;
  z-index:1;
  white-space:nowrap;
}
.comprobantes-table td{
  border-bottom:1px solid var(--line);
  padding:12px 10px;
  font-size:13px;
  vertical-align:middle;
  background:#fff;
}
.comprobantes-table tr:nth-child(even) td{
  background:#f8fafc;
}
.comp-id{
  font-weight:900;
  color:#0f172a;
  white-space:nowrap;
}
.comp-fecha{
  min-width:150px;
  line-height:1.35;
  color:#334155;
}
.comp-estado{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.comp-estado.vigente{
  background:#dcfce7;
  color:#166534;
}
.comp-estado.anulado{
  background:#fee2e2;
  color:#991b1b;
}
.comp-total{
  font-weight:900;
  text-align:right;
  white-space:nowrap;
}
.comp-medio{
  white-space:nowrap;
}
.comp-acciones{
  display:flex;
  gap:6px;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  min-width:260px;
}
.comp-acciones button{
  width:auto;
  margin:0;
  padding:9px 11px;
  border-radius:12px;
  white-space:nowrap;
}
.comprobante-preview{
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  min-height:320px;
}
.comprobante-preview h3{
  margin:0 0 8px;
  color:#0f172a;
}
.preview-ticket-box{
  background:#fff;
  border:1px dashed #94a3b8;
  border-radius:14px;
  padding:14px;
  font-family:Consolas,monospace;
  font-size:12px;
  color:#111827;
  line-height:1.45;
  overflow:auto;
  max-height:520px;
}
.preview-ticket-box .line{
  border-top:1px dashed #111827;
  margin:8px 0;
}
.preview-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
}
@media(max-width:1100px){
  .comprobantes-layout{grid-template-columns:1fr}
  .comprobantes-filtros{grid-template-columns:1fr}
  .comprobantes-table{min-width:820px}
}


/* ===== REPORTES CLAROS + IMPRESION TERMICA ===== */
.reportes-toolbar{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) 170px 170px auto!important;
  gap:10px!important;
  align-items:end!important;
}
.report-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:end}
.report-actions button{white-space:nowrap}
.reporte-live{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  background:#ecfeff;border:1px solid #bae6fd;border-radius:16px;padding:12px;color:#075985;font-size:13px;margin-bottom:14px
}
.reporte-live .live-title{font-weight:900;color:#0f172a}
.reporte-ayuda{
  background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:13px;margin-bottom:14px;
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;font-size:12px;color:#334155
}
.reporte-ayuda strong{display:block;color:#0f172a;margin-bottom:3px}
.reportes-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.reporte-kpi{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 8px 22px rgba(2,8,23,.08)}
.reporte-kpi.principal{border-color:#86efac;background:linear-gradient(135deg,#f0fdf4,#fff)}
.reporte-kpi span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;font-weight:900;color:var(--muted)}
.reporte-kpi strong{display:block;margin-top:6px;font-size:25px;color:#0f172a}
.reporte-kpi small{display:block;margin-top:4px;color:#64748b;font-size:11px;line-height:1.35}
.reportes-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.report-card-clean{box-shadow:none!important;border:1px solid var(--line)}
.report-mini-table th,.report-table th{background:#0f172a;color:#fff}.report-mini-table td,.report-table td{line-height:1.35}.report-table-wrap{max-height:460px}
.ticket-report-title{text-align:center;font-weight:bold;margin:4px 0;text-transform:uppercase}.ticket-small{font-size:11px}.ticket-center{text-align:center}.ticket-bold{font-weight:bold}.ticket-muted{font-size:10px}
@media(max-width:1150px){.reportes-toolbar{grid-template-columns:1fr 1fr!important}.reportes-kpis,.reportes-grid,.reporte-ayuda{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.reportes-toolbar,.reportes-kpis,.reportes-grid,.reporte-ayuda{grid-template-columns:1fr!important}.report-table{min-width:720px}}


/* ===== VISTA PREVIA TERMICA DE REPORTES ===== */
.reporte-preview-card{
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  margin:4px 0 14px;
}
.reporte-preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.reporte-preview-head h3{margin:0;font-size:16px;color:#0f172a}
.reporte-preview-head p{margin:4px 0 0;color:#64748b;font-size:12px}
.reporte-preview-ticket{
  width:80mm;
  max-width:100%;
  min-height:120px;
  margin:0 auto;
  background:#fff;
  color:#000;
  border:1px dashed #94a3b8;
  border-radius:14px;
  padding:4mm;
  font-family:Consolas,monospace;
  font-size:12px;
  line-height:1.35;
  box-shadow:0 12px 28px rgba(2,8,23,.10);
}
.reporte-preview-ticket .ticket-logo{display:block;max-width:44mm;max-height:22mm;object-fit:contain;margin:0 auto 4px}
.reporte-preview-ticket .ticket-logo.hidden{display:none!important}
.reporte-preview-ticket h3{text-align:center;margin:0 0 4px;font-size:15px}
.reporte-preview-ticket .line{border-top:1px dashed #000;margin:6px 0}
.reporte-preview-ticket .ticket-row{display:flex;justify-content:space-between;gap:6px}
.reporte-preview-ticket .ticket-total{font-size:16px;font-weight:bold;text-align:right;margin-top:6px}
.reporte-preview-empty{text-align:center;color:#64748b;font-size:12px;padding:22px 8px}



/* ===== INTERFAZ PREMIUM DESPEGA POS - AJUSTE SOLO VISUAL ===== */
:root{
  --bg:#f4f7fb;
  --bg2:#eef3f8;
  --panel:#ffffff;
  --soft:#f8fafc;
  --line:#dbe4ee;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#2563eb;
  --secondary:#0ea5e9;
  --accent:#16a34a;
  --danger:#ef4444;
  --warning:#f59e0b;
  --purple:#6d28d9;
  --radius:16px;
  --shadow:0 12px 32px rgba(15,23,42,.10);
}
html,body{background:#f4f7fb!important;color:#17233a;min-height:100vh;}
body{font-family:Arial,Helvetica,sans-serif;background:linear-gradient(180deg,#f7faff 0%,#eef3f8 100%)!important;}
.app{max-width:100%!important;width:100%;padding:10px 12px 14px!important;}
.topbar{
  min-height:138px;
  padding:14px 24px!important;
  margin-bottom:6px!important;
  border-radius:20px!important;
  background:linear-gradient(135deg,#081b36 0%,#0b2a52 58%,#123d73 100%)!important;
  border:1px solid rgba(59,130,246,.35)!important;
  box-shadow:0 10px 24px rgba(2,8,23,.28), inset 0 0 0 1px rgba(255,255,255,.06)!important;
}
.brand{gap:22px!important;min-width:420px;}
.brand-logo{
  width:124px!important;height:124px!important;
  border-radius:50%!important;
  padding:3px!important;
  background:#061325!important;
  border:2px solid rgba(125,211,252,.75)!important;
  box-shadow:0 0 0 4px rgba(255,255,255,.08),0 12px 26px rgba(0,0,0,.38)!important;
  object-fit:cover!important;
}
.brand h1{font-size:30px!important;line-height:1.05;font-weight:900;letter-spacing:-.03em;color:#fff!important;text-shadow:0 2px 10px rgba(0,0,0,.25);}
.brand p{font-size:16px!important;line-height:1.45;color:#d8e2ef!important;font-weight:700;margin-top:8px!important;}
.brand strong{color:#e8f2ff!important;}
.brand-dev{color:#18c9ff!important;font-weight:900;}
.top-actions{gap:12px!important;align-items:center;}
.top-actions button{min-width:122px;height:50px;border-radius:9px!important;font-size:14px!important;box-shadow:0 10px 20px rgba(0,0,0,.16);}
.btn-primary{background:linear-gradient(135deg,#2f80ff,#1559db)!important;color:#fff!important;}
.btn-success{background:linear-gradient(135deg,#1fd773,#0c9c42)!important;color:#fff!important;}
.btn-dark{background:linear-gradient(135deg,#0f233d,#172b49)!important;color:#fff!important;border:1px solid rgba(255,255,255,.18)!important;}
.btn-danger,.solid-danger{background:linear-gradient(135deg,#ff3b3b,#dc2626)!important;color:#fff!important;}
.tabs{
  background:#ffffff;
  padding:14px 18px;
  border-radius:20px;
  border:1px solid #dfe7f1;
  box-shadow:0 8px 22px rgba(15,23,42,.10);
  grid-template-columns:repeat(6,1fr)!important;
  gap:10px!important;
  margin-bottom:12px!important;
}
.tab{
  height:52px;
  border-radius:10px!important;
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  color:#24344d!important;
  font-size:16px!important;
  font-weight:900!important;
  box-shadow:0 4px 12px rgba(15,23,42,.08)!important;
}
.tab.active{background:linear-gradient(135deg,#347dff,#155fe9)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 8px 18px rgba(37,99,235,.28)!important;}
.stat-grid{grid-template-columns:repeat(5,1fr)!important;gap:10px!important;margin:10px 0 14px!important;}
.stat{border-radius:14px!important;box-shadow:0 6px 18px rgba(15,23,42,.08)!important;border:1px solid #e0e7ef!important;padding:15px!important;background:#fff!important;}
.stat span{font-size:12px!important;text-transform:none!important;letter-spacing:0!important;color:#394a63!important;}
.stat strong{font-size:27px!important;color:#0f172a!important;}
.card{border-radius:14px!important;border:1px solid #dfe7f1!important;box-shadow:0 8px 24px rgba(15,23,42,.08)!important;background:#fff!important;}
.card-header{background:#fff!important;color:#111827!important;border-bottom:1px solid #e5edf6!important;padding:14px 16px!important;}
.card-header h2{font-size:18px!important;font-weight:900!important;color:#111827!important;}
.card-header p{color:#64748b!important;font-size:13px!important;}
.card-body{padding:16px!important;}
.layout{grid-template-columns:360px minmax(520px,1fr) 330px!important;gap:12px!important;}
input,select,textarea{border-radius:8px!important;border:1px solid #cbd5e1!important;background:#fff!important;box-shadow:inset 0 1px 2px rgba(15,23,42,.04);}
input:focus,select:focus,textarea:focus{border-color:#2563eb!important;box-shadow:0 0 0 3px rgba(37,99,235,.16)!important;}
.pos-search{font-size:15px!important;height:52px!important;border:2px solid #2f80ff!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)!important;}
.hint{background:#eaf8ff!important;border-color:#bae6fd!important;color:#0369a1!important;border-radius:8px!important;}
.product{border-radius:9px!important;background:#fff!important;border-color:#e2e8f0!important;box-shadow:0 3px 10px rgba(15,23,42,.05);}
.product:hover{background:#f7fbff!important;border-color:#2563eb!important;}
.table-wrap{border-radius:8px!important;max-height:520px!important;border-color:#e2e8f0!important;}
.main-table th{background:linear-gradient(180deg,#f8fafc,#eef2f7)!important;color:#24344d!important;font-size:13px!important;padding:14px!important;border-bottom:1px solid #e2e8f0;}
.main-table td{font-size:14px!important;padding:13px!important;}
.total-box{background:#fff!important;border:1px solid #e2e8f0!important;border-radius:8px!important;box-shadow:0 3px 14px rgba(15,23,42,.06);text-align:center;}
.total-box h1{font-size:42px!important;color:#0b8a2a!important;}
.vuelto{background:#eafbea!important;border-color:#bbf7d0!important;color:#0b8a2a!important;border-radius:8px!important;font-size:28px!important;}
.pay-grid{gap:12px!important;}
.pay-grid button,.card-body>button{min-height:45px;border-radius:9px!important;margin-top:8px;}
.notice{border-radius:8px!important;background:#f8fafc!important;}
.reportes-toolbar,.reportes-filtros,.report-filter,.reporte-filtros,.filtros-reportes{border-radius:12px;}
.support-box{background:linear-gradient(135deg,#061325,#0b2a52)!important;border:1px solid rgba(59,130,246,.35)!important;}
.support-box img{border-radius:50%!important;background:#061325!important;object-fit:cover!important;}
.ticket-logo,.reporte-preview-ticket .ticket-logo{object-fit:contain!important;}
@media(max-width:1200px){.layout,.layout-2,.layout-3{grid-template-columns:1fr!important}.brand{min-width:0}.topbar{align-items:flex-start}.stat-grid{grid-template-columns:repeat(2,1fr)!important}.tabs{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:700px){.topbar{min-height:auto;flex-direction:column!important}.brand-logo{width:92px!important;height:92px!important}.brand h1{font-size:24px!important}.top-actions{width:100%}.top-actions button{flex:1;min-width:0}.tabs,.stat-grid{grid-template-columns:1fr!important}}

/* Ingreso rápido y alerta general de stock */
.stock-alert-general{width:100%;margin:0 0 14px;padding:12px 16px;border:1px solid #f59e0b;border-radius:12px;background:#fffbeb;color:#92400e;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;box-shadow:0 4px 12px rgba(146,64,14,.08)}
.stock-alert-general:hover{background:#fef3c7}.stock-alert-icon{font-size:23px}.stock-alert-general span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:2px}.stock-alert-general small{color:#a16207}.stock-alert-action{font-weight:800;color:#92400e}
.stock-modal{max-width:600px}.stock-modal .ns-modal-body label{display:block;margin:12px 0 6px;color:#334155;font-size:12px;font-weight:800}.stock-modal .ns-modal-body input,.stock-modal .ns-modal-body select{width:100%;height:46px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:0 12px;font-size:15px;background:#fff}.stock-modal .ns-modal-body input:focus,.stock-modal .ns-modal-body select:focus{outline:3px solid rgba(37,99,235,.14);border-color:#2563eb}.stock-producto-card{display:flex;flex-direction:column;gap:4px;margin:12px 0;padding:13px;border:1px solid #bfdbfe;border-radius:12px;background:#eff6ff;color:#1e3a8a}.stock-producto-card span{font-size:11px;font-weight:800;text-transform:uppercase}.stock-producto-card strong{font-size:16px}.stock-producto-card small{color:#475569}.stock-modal-message{min-height:20px;margin-top:12px;font-size:13px;font-weight:700}.stock-modal-message.error{color:#b91c1c}.stock-modal-message.success{color:#047857}.stock-modal-footer{margin:16px -20px -16px}.stock-low-modal{max-width:680px}.stock-low-table-wrap{max-height:55vh;overflow:auto;border:1px solid #dbe4ee;border-radius:10px}.stock-low-table{width:100%;border-collapse:collapse}.stock-low-table th,.stock-low-table td{padding:11px 12px;border-bottom:1px solid #e2e8f0;text-align:left}.stock-low-table th{position:sticky;top:0;background:#f8fafc;color:#475569;font-size:12px}.stock-low-table td:last-child,.stock-low-table th:last-child{text-align:right}.stock-low-table .stock-agotado{background:#fff1f2;color:#b91c1c}

.producto-proveedores-box{margin:14px 0;padding:12px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;min-width:0;max-width:100%;overflow:hidden;box-sizing:border-box}.producto-proveedores-title{display:flex;align-items:flex-start;flex-direction:column;gap:8px;margin-bottom:10px;min-width:0}.producto-proveedores-title div{display:flex;flex-direction:column;gap:3px;min-width:0;max-width:100%}.producto-proveedores-title small{color:#64748b}.producto-proveedores-title button{width:100%;max-width:100%;min-width:0}.proveedor-producto-principal,.proveedor-producto-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:end;min-width:0;max-width:100%}.proveedor-producto-principal>label,.proveedor-producto-row>label{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;margin:0;min-width:0;max-width:100%}.proveedor-producto-principal input,.proveedor-producto-row input{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box}.proveedor-producto-row{margin-top:10px;padding-top:10px;border-top:1px dashed #cbd5e1}.proveedor-producto-row button{height:42px;width:100%;max-width:100%}

.proveedores-modal{max-width:760px}.proveedores-modal .ns-modal-header>div p{margin:4px 0 0;color:#64748b;font-size:12px}.proveedor-nuevo-form{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;padding:12px;border:1px solid #bfdbfe;border-radius:12px;background:#eff6ff}.proveedor-nuevo-form label{display:block;margin:0 0 6px;color:#334155;font-size:12px;font-weight:800}.proveedor-nuevo-form input,.proveedores-busqueda input{width:100%;height:44px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:0 12px;background:#fff}.proveedor-nuevo-form button{height:44px}.proveedores-busqueda{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;margin:14px 0 10px}.proveedores-busqueda span{color:#64748b;font-size:12px;font-weight:800}.proveedores-tabla-wrap{max-height:48vh;overflow:auto;border:1px solid #dbe4ee;border-radius:10px}.proveedores-tabla th{position:sticky;top:0;z-index:1;background:#f8fafc}.proveedores-tabla td:last-child{white-space:nowrap}.proveedores-tabla button+button{margin-left:6px}.proveedores-tabla button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:640px){.proveedor-nuevo-form{grid-template-columns:1fr}.proveedores-tabla td:last-child{white-space:normal}.proveedores-tabla button{display:block;width:100%;margin:4px 0!important}}
@media(max-width:700px){.stock-alert-general{margin:8px 0}.stock-alert-action{display:none}.stock-modal{max-width:100%}.stock-low-table th,.stock-low-table td{padding:9px 8px}}
.mpos-stock-alert{cursor:pointer}.mpos-stock-alert:active{transform:scale(.98)}


/* ===== Seguridad / Login / Roles ===== */
#nsLoginOverlay{position:fixed;inset:0;background:linear-gradient(135deg,rgba(4,22,34,.96),rgba(5,74,92,.95));z-index:999999;display:flex;align-items:center;justify-content:center;padding:24px}
.ns-login-card{width:min(420px,100%);background:#fff;border-radius:24px;padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.35);display:grid;gap:10px}
.ns-login-card h2{margin:0;font-size:28px}.ns-login-card p{margin:0 0 8px;color:#475569}.ns-login-card input{width:100%;padding:12px 14px;border:1px solid #cbd5e1;border-radius:12px}.ns-login-brand{width:60px;height:60px;border-radius:18px;background:#ecfeff;display:flex;align-items:center;justify-content:center;font-size:30px}.ns-login-error{min-height:20px;color:#b91c1c;font-weight:700}.ns-login-card small{color:#64748b;line-height:1.4}.ns-user-badge{position:fixed;right:18px;bottom:18px;z-index:9999;background:#0f172a;color:#fff;border-radius:18px;padding:10px 12px;box-shadow:0 12px 40px rgba(0,0,0,.25);display:flex;align-items:center;gap:10px}.ns-user-badge span{font-size:12px;background:#1e293b;border-radius:999px;padding:4px 8px;text-transform:capitalize}.ns-user-badge button{border:0;background:#ef4444;color:#fff;border-radius:999px;padding:6px 10px;cursor:pointer}.ns-security-panel{grid-column:1/-1}.ns-security-panel h3{margin-top:18px}

/* ===== POS TOUCH + BOLETA EN PANTALLA ===== */
.touch-toggle{display:flex;align-items:center;gap:8px;margin:10px 0 8px;font-size:13px;font-weight:800;color:#334155;cursor:pointer}
.touch-toggle input{width:auto;margin:0}
.numeric-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0;padding:10px;background:#f8fafc;border:1px solid var(--line);border-radius:16px}
.numeric-pad button{margin:0;padding:15px 10px;border-radius:14px;font-size:20px;font-weight:900;background:#fff;border:1px solid #cbd5e1;color:#0f172a;box-shadow:0 4px 12px rgba(15,23,42,.08)}
.numeric-pad button:active{transform:scale(.98);background:#e0f2fe}
.numeric-pad .pad-wide{grid-column:span 1;font-size:14px;background:#e2e8f0}
.numeric-pad .pad-ok{grid-column:span 2;background:#16a34a;color:#fff;border-color:#15803d}
.boleta-pos-panel{margin-top:14px;border:1px solid var(--line);border-radius:18px;background:#f8fafc;overflow:hidden}
.boleta-pos-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid var(--line);background:#fff;font-size:13px}
.boleta-pos-head strong{color:#0f172a}.boleta-pos-head span{font-size:12px;color:#64748b;text-align:right}
.boleta-pos-preview{max-height:360px;overflow:auto;background:#fff;padding:12px;font-family:Consolas,monospace;font-size:12px;color:#111827}
.boleta-pos-preview .empty-ticket{font-family:Inter,Arial,sans-serif;color:#64748b;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px;padding:14px;text-align:center;line-height:1.45}
.boleta-pos-preview .ticket-logo{max-width:120px;max-height:60px}.boleta-pos-preview .line{border-top:1px dashed #111827;margin:8px 0}.boleta-pos-preview .ticket-row{display:flex;justify-content:space-between;gap:10px}.boleta-pos-preview .ticket-total{font-weight:900;text-align:right;font-size:16px;margin-top:8px}

/* ===== REPORTES SIMPLES ===== */
.reportes-simple .card-body{display:grid;gap:14px}
.report-simple-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 160px 160px auto;gap:10px;align-items:end}
.reportes-kpis.simple{grid-template-columns:repeat(4,1fr);margin-bottom:0}.simple-grid{grid-template-columns:1fr 1fr}.simple-table{max-height:360px}.compact-preview{margin-top:4px}.compact-preview .reporte-preview-ticket{max-height:360px;overflow:auto}
@media(max-width:1000px){.report-simple-toolbar{grid-template-columns:1fr 1fr}.reportes-kpis.simple,.simple-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.report-simple-toolbar,.reportes-kpis.simple,.simple-grid{grid-template-columns:1fr}.boleta-pos-head{flex-direction:column;align-items:flex-start}.numeric-pad button{padding:18px 10px;font-size:22px}}

/* ===== AJUSTE POS PRINCIPAL: PANEL COMPLETO + BOLETA VISIBLE ===== */
body{padding-bottom:88px!important;}
.pos-layout{
  display:grid!important;
  grid-template-columns:minmax(300px,.85fr) minmax(520px,1.25fr) minmax(320px,360px)!important;
  grid-template-areas:
    "search cart payment"
    "ticket ticket payment"!important;
  gap:16px!important;
  align-items:start!important;
}
.pos-search-card{grid-area:search!important;}
.pos-cart-card{grid-area:cart!important;}
.pos-payment-card{grid-area:payment!important;position:sticky;top:12px;}
.pos-ticket-card{grid-area:ticket!important;}
.pos-payment-card .card-body{display:grid;gap:9px;}
.pos-payment-card .total-box{padding:12px!important;margin-bottom:0!important;}
.pos-payment-card .total-box h1{font-size:36px!important;line-height:1!important;}
.pos-payment-card label{margin-top:0!important;}
.pos-payment-card input,.pos-payment-card select{padding:11px 12px!important;}
.pos-payment-card .vuelto{font-size:24px!important;margin:0!important;padding:10px!important;}
.pos-payment-card .pay-grid{margin-top:2px;}
.numeric-pad{gap:7px!important;margin:4px 0!important;padding:8px!important;}
.numeric-pad button{padding:12px 8px!important;font-size:18px!important;border-radius:12px!important;}
.numeric-pad .pad-wide{font-size:13px!important;}
.boleta-pos-panel{margin-top:0!important;}
.pos-ticket-card .boleta-pos-preview{max-height:430px!important;min-height:190px;}
.pos-cart-card .table-wrap{max-height:430px!important;}
.pos-search-card .product-list{max-height:300px!important;}
.ns-user-badge{bottom:12px!important;right:12px!important;border-radius:14px!important;padding:8px 10px!important;transform:scale(.92);transform-origin:bottom right;}
@media(max-width:1350px){
  .pos-layout{grid-template-columns:minmax(280px,.9fr) minmax(420px,1.1fr) minmax(300px,340px)!important;gap:12px!important;}
  .pos-payment-card .total-box h1{font-size:32px!important;}
  .numeric-pad button{padding:10px 6px!important;font-size:17px!important;}
}
@media(max-width:1200px){
  .pos-layout{grid-template-columns:1fr!important;grid-template-areas:"search" "cart" "payment" "ticket"!important;}
  .pos-payment-card{position:static!important;}
  .pos-ticket-card .boleta-pos-preview{max-height:360px!important;}
}
@media(max-width:700px){
  body{padding-bottom:110px!important;}
  .pos-payment-card .card-body{gap:8px;}
  .numeric-pad{grid-template-columns:repeat(3,1fr)!important;}
  .numeric-pad button{padding:15px 8px!important;font-size:21px!important;}
  .ns-user-badge{left:10px!important;right:10px!important;bottom:10px!important;justify-content:space-between;transform:none!important;}
}

/* ============================================================
   DESPEGA POS - REPORTE SIMPLE Y FUNCIONAL
   Diseño limpio para venta: periodo + KPIs + voucher + ventanas.
   ============================================================ */

#tab-reportes{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
}

.report-simple-page{
  height:calc(100vh - 196px)!important;
  min-height:0!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:58px 76px 84px minmax(0,1fr)!important;
  gap:10px!important;
  background:#f4f7fb!important;
}

/* Header */
.report-simple-header{
  background:#fff!important;
  border:1px solid #dbe4ee!important;
  border-radius:14px!important;
  padding:10px 14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  box-shadow:0 6px 18px rgba(15,23,42,.06)!important;
}

.report-simple-header h2{
  margin:0!important;
  font-size:22px!important;
  line-height:1!important;
  color:#0f172a!important;
}

.report-simple-header p{
  margin:4px 0 0!important;
  font-size:12px!important;
  color:#64748b!important;
}

.report-simple-actions{
  display:flex!important;
  gap:8px!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
}

.report-simple-actions button{
  height:36px!important;
  min-height:36px!important;
  padding:7px 12px!important;
  font-size:12px!important;
  border-radius:9px!important;
  margin:0!important;
}

/* Filtros */
.report-simple-filter{
  background:#fff!important;
  border:1px solid #dbe4ee!important;
  border-radius:14px!important;
  padding:10px!important;
  display:grid!important;
  grid-template-columns:190px 170px 170px minmax(280px,1fr)!important;
  gap:10px!important;
  align-items:end!important;
  box-shadow:0 6px 18px rgba(15,23,42,.06)!important;
}

.report-simple-filter label{
  margin:0 0 4px!important;
  font-size:10.5px!important;
  color:#334155!important;
  font-weight:900!important;
}

.report-simple-filter input,
.report-simple-filter select{
  height:35px!important;
  border-radius:8px!important;
  padding:7px 10px!important;
  font-size:12px!important;
  border:1px solid #cbd5e1!important;
  background:#fff!important;
}

.report-period-box{
  min-height:35px!important;
  border:1px solid #c7d2fe!important;
  background:#eef4ff!important;
  border-radius:10px!important;
  padding:7px 10px!important;
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  column-gap:10px!important;
  align-items:center!important;
}

.report-period-box strong{
  font-size:11px!important;
  color:#1d4ed8!important;
  white-space:nowrap!important;
}

.report-period-box span,
.report-period-box small{
  display:block!important;
  font-size:10.5px!important;
  line-height:1.2!important;
  color:#334155!important;
}

/* KPIs */
.report-simple-kpis,
#reporteKpis{
  display:grid!important;
  grid-template-columns:repeat(4,1fr)!important;
  gap:10px!important;
  min-height:0!important;
}

#reporteKpis .reporte-kpi{
  min-height:0!important;
  height:100%!important;
  border-radius:14px!important;
  background:#fff!important;
  border:1px solid #dbe4ee!important;
  box-shadow:0 7px 18px rgba(15,23,42,.07)!important;
  padding:12px 14px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  position:relative!important;
  overflow:hidden!important;
}

#reporteKpis .reporte-kpi::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:5px!important;
  background:#2563eb!important;
}
#reporteKpis .reporte-kpi:nth-child(2)::before{background:#16a34a!important;}
#reporteKpis .reporte-kpi:nth-child(3)::before{background:#7c3aed!important;}
#reporteKpis .reporte-kpi:nth-child(4)::before{background:#ef4444!important;}

#reporteKpis .reporte-kpi span{
  font-size:10px!important;
  color:#64748b!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  line-height:1.1!important;
}

#reporteKpis .reporte-kpi strong{
  font-size:25px!important;
  line-height:1!important;
  color:#0f172a!important;
  margin-top:5px!important;
}

#reporteKpis .reporte-kpi small{
  font-size:10.5px!important;
  line-height:1.2!important;
  color:#64748b!important;
  margin-top:4px!important;
}

/* Main */
.report-simple-main{
  min-height:0!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-columns:minmax(620px,1.1fr) minmax(420px,.9fr)!important;
  gap:10px!important;
}

.report-simple-voucher,
.report-simple-tabs{
  min-height:0!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #dbe4ee!important;
  border-radius:14px!important;
  box-shadow:0 8px 22px rgba(15,23,42,.07)!important;
  display:flex!important;
  flex-direction:column!important;
}

/* Voucher */
.report-simple-title{
  flex:0 0 auto!important;
  min-height:54px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:10px 13px!important;
  border-bottom:1px solid #e5edf6!important;
}

.report-simple-title h3,
.report-simple-panel h3{
  margin:0!important;
  font-size:16px!important;
  color:#0f172a!important;
  font-weight:900!important;
}

.report-simple-title p{
  margin:3px 0 0!important;
  font-size:11px!important;
  color:#64748b!important;
}

.report-simple-title button{
  height:32px!important;
  min-height:32px!important;
  padding:6px 11px!important;
  border-radius:8px!important;
  font-size:11px!important;
  margin:0!important;
}

.report-simple-ticket,
#previewReporteTermico{
  flex:1 1 auto!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:16px 22px!important;
  overflow:auto!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
  font-size:12px!important;
  line-height:1.38!important;
}

.reporte-preview-empty{
  height:100%!important;
  min-height:260px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:18px!important;
  text-align:center!important;
  color:#64748b!important;
  background:#f8fafc!important;
  border:1px dashed #cbd5e1!important;
  border-radius:12px!important;
  font-size:12px!important;
}

/* Tabs internas */
.report-simple-tab-buttons{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:repeat(5,1fr)!important;
  gap:6px!important;
  padding:10px!important;
  border-bottom:1px solid #e5edf6!important;
  background:#f8fafc!important;
}

.report-simple-tab-buttons button{
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:6px 8px!important;
  border-radius:8px!important;
  background:#e2e8f0!important;
  color:#0f172a!important;
  font-size:11px!important;
  font-weight:900!important;
}

.report-simple-tab-buttons button.active{
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  color:#fff!important;
}

.report-simple-tab-content{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:10px!important;
}

.report-simple-panel{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
}

.report-simple-panel h3{
  margin-bottom:10px!important;
}

/* Resumen limpio */
.report-summary-clean{
  display:grid!important;
  grid-template-columns:repeat(2,1fr)!important;
  gap:10px!important;
}

.report-summary-clean div{
  background:#f8fafc!important;
  border:1px solid #e5edf6!important;
  border-radius:12px!important;
  padding:14px!important;
}

.report-summary-clean span{
  display:block!important;
  color:#64748b!important;
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

.report-summary-clean strong{
  display:block!important;
  color:#0f172a!important;
  font-size:25px!important;
  margin-top:5px!important;
}

/* Tablas compactas */
.report-table-wrap{
  max-height:100%!important;
  overflow:auto!important;
  border-radius:10px!important;
}

.report-table-wrap-small{
  max-height:150px!important;
}

.report-table{
  min-width:760px!important;
}

.report-table th,
.report-mini-table th{
  background:#f8fafc!important;
  color:#334155!important;
  border-bottom:1px solid #e5edf6!important;
  font-size:10px!important;
  padding:7px 9px!important;
}

.report-table td,
.report-mini-table td{
  font-size:10.5px!important;
  padding:6px 9px!important;
  line-height:1.25!important;
  border-bottom:1px solid #eef2f7!important;
}

.report-empty{
  padding:16px!important;
  border:1px dashed #cbd5e1!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  color:#64748b!important;
  text-align:center!important;
  font-size:11px!important;
}

.stock-critical-row{
  padding:8px!important;
  font-size:11px!important;
}

.stock-chip{
  font-size:10px!important;
  padding:4px 7px!important;
}

/* Ocultar restos antiguos que ensucian */
.reporte-live,
.reporte-ayuda,
.report-note{
  display:none!important;
}

/* Responsive */
@media(max-width:1200px){
  #tab-reportes{
    overflow:auto!important;
  }

  .report-simple-page{
    height:auto!important;
    overflow:visible!important;
    display:flex!important;
    flex-direction:column!important;
  }

  .report-simple-filter,
  .report-simple-main{
    grid-template-columns:1fr!important;
  }

  #reporteKpis{
    grid-template-columns:repeat(2,1fr)!important;
  }

  .report-simple-ticket,
  #previewReporteTermico{
    max-height:380px!important;
  }
}

@media(max-width:760px){
  .report-simple-header{
    flex-direction:column!important;
    align-items:flex-start!important;
  }

  .report-simple-actions{
    justify-content:flex-start!important;
  }

  #reporteKpis,
  .report-summary-clean,
  .report-simple-tab-buttons{
    grid-template-columns:1fr!important;
  }
}

/* ===== CONFIGURACIÓN PRO SQLITE / MULTICAJA ===== */
#tab-config{overflow:auto!important;padding-bottom:18px!important;}
.config-admin{display:grid;gap:14px;width:100%;}
.config-top-grid{display:grid;grid-template-columns:1.15fr .75fr .95fr;gap:14px;align-items:stretch;}
.config-bottom-grid{display:grid;grid-template-columns:1.1fr 1fr .8fr;gap:14px;align-items:stretch;}
.full-row-card{width:100%;}
.config-card{box-shadow:0 10px 28px rgba(15,23,42,.08)!important;border-radius:16px!important;}
.config-card .card-header{padding:13px 16px!important;min-height:auto!important;}
.config-card .card-header h2{font-size:16px!important;}
.config-card .card-header p{font-size:11px!important;margin-top:4px!important;}
.config-card .card-body{padding:14px!important;}
.config-card label{margin:7px 0 4px!important;font-size:11px!important;}
.config-card input,.config-card select,.config-card textarea{height:38px!important;padding:9px 10px!important;border-radius:10px!important;font-size:12px!important;}
.config-card textarea{height:74px!important;min-height:74px!important;resize:vertical!important;}
.logo-config-body{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start;}
.logo-config-body input{grid-column:1/-1;height:auto!important;}
.logo-preview-shell{width:132px;height:92px;border:1px solid var(--line);border-radius:14px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.logo-preview-shell .logo-preview{width:118px!important;height:78px!important;margin:0!important;border:0!important;padding:0!important;object-fit:contain!important;}
.logo-config-body .notice{grid-column:1/-1;}
.compact{font-size:11px!important;line-height:1.35!important;padding:8px 10px!important;margin-top:8px!important;}
.config-terminal-active{display:grid;grid-template-columns:360px 1fr;gap:12px;align-items:end;margin-bottom:14px;}
.config-split-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.config-subpanel{border:1px solid var(--line);border-radius:14px;background:#f8fafc;padding:12px;}
.config-subpanel h3{margin:0 0 8px;font-size:15px;color:#0f172a;}
.config-list-card{margin-top:10px;display:grid;gap:8px;max-height:250px;overflow:auto;}
.config-row-card{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:10px 12px;}
.config-row-card strong{display:block;color:#0f172a;font-size:13px;}
.config-row-card span{display:block;color:#64748b;font-size:11px;margin-top:2px;}
.config-row-card button{height:31px!important;padding:6px 9px!important;font-size:11px!important;}
.backup-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.backup-actions button{height:38px!important;white-space:nowrap;}
.support-compact{margin:0!important;min-height:84px;}
.support-compact img{width:58px!important;height:58px!important;}
.support-compact p{font-size:11px!important;line-height:1.25!important;}
.danger-details summary{cursor:pointer;font-weight:900;color:#0f172a;background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:10px 12px;}
.danger-details[open] summary{margin-bottom:10px;}
#configPanel .layout-3{display:contents!important;}
@media(max-width:1150px){.config-top-grid,.config-bottom-grid,.config-split-grid{grid-template-columns:1fr!important}.config-terminal-active{grid-template-columns:1fr!important}}


/* ===== NS POS FINAL OPERATIVO: POS + REPORTES + LOGO ===== */
html,body{height:auto!important;min-height:100vh!important;overflow:auto!important;}
body{padding-bottom:0!important;background:#f4f7fb!important;}
.app{height:auto!important;min-height:100vh!important;overflow:visible!important;}
#tab-pos{overflow:visible!important;min-height:auto!important;}
#tab-pos .pos-layout,
.nspos-pos-operativo{
  display:grid!important;
  grid-template-columns:300px minmax(680px,1fr) 320px!important;
  grid-template-areas:"search cart payment"!important;
  gap:12px!important;
  align-items:stretch!important;
  width:100%!important;
  height:calc(100vh - 190px)!important;
  min-height:620px!important;
  overflow:visible!important;
}
#tab-pos .pos-search-card{grid-area:search!important;height:100%!important;min-height:0!important;}
#tab-pos .pos-cart-card{grid-area:cart!important;height:100%!important;min-height:0!important;}
#tab-pos .pos-payment-card{grid-area:payment!important;height:100%!important;position:relative!important;top:auto!important;min-height:0!important;}
#tab-pos .boleta-pos-panel,.pos-ticket-card,#previewBoletaPOS,#boletaPosEstado{display:none!important;}
#tab-pos .pos-cart-card .card-body{height:calc(100% - 45px)!important;display:block!important;overflow:hidden!important;}
#tab-pos .pos-cart-card .table-wrap,#tab-pos .pos-cart-table{height:100%!important;max-height:none!important;overflow:auto!important;}
#tab-pos .pos-payment-card .card-body{height:calc(100% - 45px)!important;display:flex!important;flex-direction:column!important;gap:8px!important;overflow:hidden!important;}
#tab-pos .pos-payment-card .total-box{margin:0!important;padding:13px!important;}
#tab-pos .pos-payment-card .total-box h1{font-size:34px!important;line-height:1!important;margin:4px 0 0!important;}
#tab-pos .pos-payment-card input,#tab-pos .pos-payment-card select{height:37px!important;}
#tab-pos .pos-payment-card .vuelto{margin:0!important;font-size:22px!important;padding:10px!important;}
#tab-pos .pos-payment-card .pay-grid{margin-top:auto!important;}
#tab-pos .pos-search-card .card-body{height:calc(100% - 45px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
#tab-pos .product-list{flex:1 1 auto!important;max-height:none!important;overflow:auto!important;}
@media(max-width:1250px){#tab-pos .pos-layout,.nspos-pos-operativo{grid-template-columns:270px minmax(460px,1fr) 300px!important;gap:10px!important;}}
@media(max-width:980px){#tab-pos .pos-layout,.nspos-pos-operativo{height:auto!important;grid-template-columns:1fr!important;grid-template-areas:"search" "cart" "payment"!important;}#tab-pos .pos-search-card,#tab-pos .pos-cart-card,#tab-pos .pos-payment-card{height:auto!important;}.pos-payment-card .card-body,.pos-cart-card .card-body,.pos-search-card .card-body{height:auto!important;}}

#tab-reportes{overflow:visible!important;padding-bottom:14px!important;}
.report-simple-page{display:grid!important;gap:12px!important;height:auto!important;overflow:visible!important;}
.report-simple-header{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:16px!important;padding:14px 16px!important;box-shadow:0 8px 22px rgba(15,23,42,.06)!important;}
.report-simple-header h2{margin:0!important;font-size:22px!important;color:#0f172a!important;}.report-simple-header p{margin:4px 0 0!important;color:#64748b!important;font-size:12px!important;}.report-simple-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;}
.report-simple-filter{display:grid!important;grid-template-columns:220px 180px 180px minmax(320px,1fr)!important;gap:10px!important;align-items:end!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:16px!important;padding:12px!important;}
.report-period-box{height:48px!important;border:1px solid #bfdbfe!important;background:#eff6ff!important;border-radius:12px!important;padding:7px 10px!important;display:grid!important;grid-template-columns:auto 1fr!important;gap:6px 12px!important;align-items:center!important;}
.report-period-box strong{color:#1d4ed8!important;font-size:11px!important;}.report-period-box span{font-size:12px!important;color:#0f172a!important;}.report-period-box small{grid-column:1/-1!important;font-size:10px!important;color:#475569!important;}
.report-simple-kpis,#reporteKpis{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:10px!important;}
.report-simple-main{display:grid!important;grid-template-columns:minmax(420px,.95fr) minmax(520px,1.05fr)!important;gap:12px!important;align-items:start!important;}
.report-simple-voucher,.report-simple-tabs{background:#fff!important;border:1px solid var(--line)!important;border-radius:16px!important;box-shadow:0 8px 22px rgba(15,23,42,.06)!important;overflow:hidden!important;}
.report-simple-title{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;padding:12px 14px!important;border-bottom:1px solid var(--line)!important;}
.report-simple-title h3{margin:0!important;font-size:17px!important;}.report-simple-title p{margin:3px 0 0!important;font-size:11px!important;color:#64748b!important;}
.report-simple-ticket,#previewReporteTermico{width:80mm!important;min-height:260px!important;max-height:520px!important;margin:16px auto!important;overflow:auto!important;background:#fff!important;}
.report-simple-tab-buttons{display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:8px!important;padding:12px!important;border-bottom:1px solid var(--line)!important;background:#f8fafc!important;}
.report-simple-tab-buttons button{height:36px!important;border-radius:10px!important;background:#e2e8f0!important;color:#0f172a!important;}.report-simple-tab-buttons button.active{background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;color:#fff!important;}
.report-simple-tab-content{padding:14px!important;min-height:340px!important;}.report-summary-clean{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;}.report-summary-clean>div{border:1px solid var(--line)!important;background:#f8fafc!important;border-radius:14px!important;padding:14px!important;}
@media(max-width:1100px){.report-simple-filter,.report-simple-main{grid-template-columns:1fr!important}.report-simple-kpis,#reporteKpis{grid-template-columns:1fr 1fr!important;}}
@media(max-width:700px){.report-simple-header{align-items:flex-start!important;flex-direction:column!important}.report-simple-kpis,#reporteKpis,.report-summary-clean,.report-simple-tab-buttons{grid-template-columns:1fr!important;}}

.ticket-logo,.reporte-preview-ticket .ticket-logo{display:block;max-width:44mm!important;max-height:22mm!important;object-fit:contain!important;margin:0 auto 4px!important;}
.ticket-logo.hidden{display:none!important;}
.logo-preview-shell{width:132px!important;height:92px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:#fff!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;}
.logo-preview-shell .logo-preview{display:block!important;width:118px!important;height:78px!important;object-fit:contain!important;margin:0!important;border:0!important;padding:0!important;}

/* ===== NS POS HOTFIX DEFINITIVO: POS DERECHO + REPORTES + CONFIG USUARIOS ===== */
@media (min-width: 900px){
  #tab-pos .pos-layout.nspos-pos-operativo{
    display:grid!important;
    grid-template-columns:280px minmax(520px,1fr) 300px!important;
    grid-template-areas:"search cart payment"!important;
    gap:12px!important;
    align-items:stretch!important;
    width:100%!important;
    height:calc(100vh - 190px)!important;
    min-height:610px!important;
    overflow:visible!important;
  }
  #tab-pos .pos-search-card{grid-area:search!important;height:100%!important;min-width:0!important;}
  #tab-pos .pos-cart-card{grid-area:cart!important;height:100%!important;min-width:0!important;}
  #tab-pos .pos-payment-card{grid-area:payment!important;height:100%!important;min-width:0!important;position:relative!important;top:auto!important;align-self:stretch!important;}
  #tab-pos .pos-payment-card .card-body{height:calc(100% - 45px)!important;display:flex!important;flex-direction:column!important;gap:8px!important;overflow:hidden!important;}
  #tab-pos .pos-payment-card .pay-grid{margin-top:auto!important;}
}
#tab-pos .boleta-pos-panel,
#tab-pos .pos-ticket-card,
#tab-pos #previewBoletaPOS,
#tab-pos #boletaPosEstado{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}
.nspos-user-badge{margin-left:auto;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);color:#fff;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:900;white-space:nowrap;}
.report-simple-page{display:grid!important;gap:12px!important;}
.report-simple-main{display:grid!important;grid-template-columns:minmax(420px,1.1fr) minmax(420px,.9fr)!important;gap:12px!important;align-items:start!important;}
.report-simple-voucher,.report-simple-tabs{background:#fff!important;border:1px solid var(--line)!important;border-radius:16px!important;overflow:hidden!important;box-shadow:0 8px 22px rgba(15,23,42,.06)!important;}
.report-simple-title{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;padding:12px 14px!important;border-bottom:1px solid var(--line)!important;}
.report-simple-title h3{margin:0!important;font-size:17px!important}.report-simple-title p{margin:4px 0 0!important;font-size:12px!important;color:#64748b!important;}
.report-simple-ticket{min-height:360px!important;margin:16px auto!important;}
.report-simple-tab-buttons{display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:8px!important;padding:12px!important;border-bottom:1px solid var(--line)!important;}
.report-simple-tab-buttons button{background:#e2e8f0!important;color:#0f172a!important;border-radius:12px!important;min-height:38px!important;}
.report-simple-tab-buttons button.active{background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;color:#fff!important;}
.report-simple-tab-content{padding:14px!important;}
.report-summary-clean{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;}
.report-summary-clean>div{background:#f8fafc!important;border:1px solid var(--line)!important;border-radius:14px!important;padding:16px!important;}
.report-summary-clean span{display:block!important;font-size:11px!important;text-transform:uppercase!important;font-weight:900!important;color:#64748b!important;}
.report-summary-clean strong{display:block!important;font-size:26px!important;margin-top:5px!important;color:#0f172a!important;}
@media(max-width:1100px){.report-simple-main{grid-template-columns:1fr!important}.report-simple-tab-buttons{grid-template-columns:1fr 1fr!important}.report-summary-clean{grid-template-columns:1fr!important}}

/* ===== NS POS FIX FINAL: reporte con voucher 80mm + detalle amplio ===== */
.report-simple-main{
  display:grid!important;
  grid-template-columns:360px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:stretch!important;
}
.report-simple-voucher{
  width:360px!important;
  max-width:360px!important;
  min-width:360px!important;
  overflow:hidden!important;
}
.report-simple-ticket,
#previewReporteTermico.reporte-preview-ticket{
  width:80mm!important;
  max-width:80mm!important;
  min-width:80mm!important;
  height:520px!important;
  max-height:520px!important;
  overflow:auto!important;
  margin:10px auto!important;
  background:#fff!important;
  border:1px dashed #94a3b8!important;
  border-radius:12px!important;
  padding:4mm!important;
  font-family:Consolas,monospace!important;
  font-size:12px!important;
  line-height:1.35!important;
  box-shadow:0 8px 20px rgba(15,23,42,.08)!important;
}
.report-simple-tabs{
  min-width:0!important;
  width:100%!important;
}
.report-simple-tab-content{
  min-width:0!important;
  overflow:hidden!important;
}
.report-simple-panel .report-table-wrap{
  max-height:520px!important;
  overflow:auto!important;
}
.report-simple-panel .report-table{
  min-width:980px!important;
}
.voucher-logo-img,
.preview-ticket-logo,
.preview-ticket-box .ticket-logo,
.preview-ticket-box img.voucher-logo-img{
  display:block!important;
  width:auto!important;
  max-width:44mm!important;
  max-height:22mm!important;
  object-fit:contain!important;
  margin:0 auto 8px!important;
}
.preview-ticket-box{
  width:80mm!important;
  max-width:100%!important;
  margin:0 auto!important;
  overflow:auto!important;
}
@media(max-width:1050px){
  .report-simple-main{grid-template-columns:1fr!important;}
  .report-simple-voucher{width:100%!important;max-width:100%!important;min-width:0!important;}
  #previewReporteTermico.reporte-preview-ticket,.report-simple-ticket{max-width:100%!important;}
}

/* ===== HOTFIX FINAL: SCROLL REAL EN VOUCHER DE REPORTE ===== */
#tab-reportes .report-simple-main{
  grid-template-columns: 390px minmax(760px,1fr)!important;
  align-items:start!important;
}
#tab-reportes .report-simple-voucher{
  width:100%!important;
  max-width:390px!important;
  display:flex!important;
  flex-direction:column!important;
  height:calc(100vh - 315px)!important;
  min-height:470px!important;
  max-height:690px!important;
  overflow:hidden!important;
}
#tab-reportes .report-simple-title{
  flex:0 0 auto!important;
}
#tab-reportes #previewReporteTermico.report-simple-ticket,
#tab-reportes #previewReporteTermico.reporte-preview-ticket{
  flex:1 1 auto!important;
  width:80mm!important;
  min-width:80mm!important;
  max-width:80mm!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:12px auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-gutter:stable!important;
  display:block!important;
  position:relative!important;
  pointer-events:auto!important;
  user-select:text!important;
}
#tab-reportes #previewReporteTermico::-webkit-scrollbar{
  width:10px!important;
}
#tab-reportes #previewReporteTermico::-webkit-scrollbar-track{
  background:#eef2f7!important;
  border-radius:999px!important;
}
#tab-reportes #previewReporteTermico::-webkit-scrollbar-thumb{
  background:#94a3b8!important;
  border-radius:999px!important;
  border:2px solid #eef2f7!important;
}
#tab-reportes .report-simple-tabs{
  min-width:0!important;
}
@media(max-width:1100px){
  #tab-reportes .report-simple-main{grid-template-columns:1fr!important;}
  #tab-reportes .report-simple-voucher{max-width:100%!important;height:520px!important;}
}

/* =========================================================
   HOTFIX FINAL CONTROLADO - SOLO MÓDULO REPORTES
   No toca POS ni Configuración.
   Objetivo: Voucher izquierda, detalle/tabla al centro ancho,
   KPIs en columna derecha.
   ========================================================= */
#tab-reportes .report-simple-page{
  display:grid!important;
  grid-template-columns:360px minmax(620px,1fr) 220px!important;
  grid-template-areas:
    "header header header"
    "filter filter filter"
    "main main kpis"!important;
  gap:12px!important;
  align-items:start!important;
  width:100%!important;
  min-width:0!important;
}
#tab-reportes .report-simple-header{grid-area:header!important;}
#tab-reportes .report-simple-filter{grid-area:filter!important;}
#tab-reportes #reporteKpis{
  grid-area:kpis!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
  margin:0!important;
  align-self:start!important;
  position:sticky!important;
  top:8px!important;
  z-index:1!important;
}
#tab-reportes #reporteKpis .reporte-kpi{
  min-height:92px!important;
  padding:14px!important;
  border-radius:14px!important;
}
#tab-reportes #reporteKpis .reporte-kpi strong{
  font-size:22px!important;
  line-height:1.1!important;
}
#tab-reportes .report-simple-main{
  grid-area:main!important;
  display:grid!important;
  grid-template-columns:360px minmax(650px,1fr)!important;
  gap:12px!important;
  align-items:start!important;
  min-width:0!important;
  width:100%!important;
}
#tab-reportes .report-simple-voucher{
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
  height:calc(100vh - 302px)!important;
  min-height:560px!important;
  max-height:760px!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#tab-reportes .report-simple-voucher .report-simple-title{
  flex:0 0 auto!important;
}
#tab-reportes #previewReporteTermico.report-simple-ticket,
#tab-reportes #previewReporteTermico.reporte-preview-ticket{
  flex:1 1 auto!important;
  width:80mm!important;
  min-width:80mm!important;
  max-width:80mm!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  margin:10px auto!important;
  display:block!important;
  scrollbar-gutter:stable!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
#tab-reportes #previewReporteTermico::-webkit-scrollbar{width:10px!important;}
#tab-reportes #previewReporteTermico::-webkit-scrollbar-track{background:#eef2f7!important;border-radius:999px!important;}
#tab-reportes #previewReporteTermico::-webkit-scrollbar-thumb{background:#94a3b8!important;border-radius:999px!important;border:2px solid #eef2f7!important;}
#tab-reportes .report-simple-tabs{
  min-width:0!important;
  width:100%!important;
}
#tab-reportes .report-simple-tab-content{
  min-width:0!important;
  overflow:hidden!important;
}
#tab-reportes .report-simple-panel .report-table-wrap,
#tab-reportes .report-table-wrap{
  max-height:640px!important;
  overflow:auto!important;
}
#tab-reportes .report-simple-panel .report-table,
#tab-reportes .report-table{
  min-width:980px!important;
}
@media(max-width:1250px){
  #tab-reportes .report-simple-page{
    grid-template-columns:1fr!important;
    grid-template-areas:"header" "filter" "kpis" "main"!important;
  }
  #tab-reportes #reporteKpis{position:static!important;grid-template-columns:repeat(2,1fr)!important;}
  #tab-reportes .report-simple-main{grid-template-columns:1fr!important;}
  #tab-reportes .report-simple-voucher{width:100%!important;min-width:0!important;max-width:100%!important;height:560px!important;}
}
@media(max-width:700px){
  #tab-reportes #reporteKpis{grid-template-columns:1fr!important;}
}


/* ===== CONFIGURACIÓN FINAL: LICENCIA + RESPALDOS S3 ===== */
.config-admin-grid-final{grid-template-columns:1fr 1.35fr .85fr .75fr!important;gap:14px!important;align-items:stretch!important;}
.licencia-card,.respaldos-card,.soporte-card,.mantenimiento-card{min-height:0!important;}
.licencia-card .notice,.respaldos-card .notice{word-break:break-word;}
.backup-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px;}
.backup-actions button{min-height:38px;}
#licEstadoBox.ok,#backupEstado.ok{background:#dcfce7;border-color:#86efac;color:#166534;}
#licEstadoBox.warn,#backupEstado.warn{background:#fef3c7;border-color:#fcd34d;color:#92400e;}
#licEstadoBox.bad,#backupEstado.bad{background:#fee2e2;border-color:#fecaca;color:#991b1b;}
@media(max-width:1300px){.config-admin-grid-final{grid-template-columns:1fr 1fr!important}.soporte-card,.mantenimiento-card{grid-column:auto!important;}}
@media(max-width:850px){.config-admin-grid-final{grid-template-columns:1fr!important}.config-top-grid{grid-template-columns:1fr!important}.config-split-grid{grid-template-columns:1fr!important}}

/* ===== VOUCHER Y REPORTES: mantener 80mm con scroll alto ===== */
.report-simple-main{grid-template-columns:360px minmax(0,1fr)!important;align-items:start!important;}
.report-simple-ticket{width:80mm!important;max-width:100%!important;max-height:calc(100vh - 330px)!important;min-height:420px!important;overflow:auto!important;margin:0 auto!important;}
.reporte-preview-ticket .ticket-logo,.preview-ticket-box .ticket-logo,.ticket-logo{display:block;max-width:44mm;max-height:22mm;object-fit:contain;margin:0 auto 4px;}
@media(max-width:1100px){.report-simple-main{grid-template-columns:1fr!important}.report-simple-ticket{min-height:300px!important;max-height:520px!important}}


/* =========================================================
   NS POS — Usuarios registrados · diseño profesional 2026
   Reglas aisladas para impedir interferencias de estilos globales.
   ========================================================= */

.ns-users-admin-card .card-body{
  padding:18px!important;
}

.ns-users-list-head{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin:22px 0 10px!important;
  padding-top:18px!important;
  border-top:1px solid #e2e8f0!important;
}

.ns-users-list-head h3{
  margin:0!important;
  color:#0f172a!important;
  font-size:16px!important;
  font-weight:900!important;
}

.ns-users-list-head p{
  margin:4px 0 0!important;
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.4!important;
}

#listaUsuariosConfig.ns-users-list,
.ns-users-admin-card #listaUsuariosConfig{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
  width:100%!important;
  max-height:440px!important;
  margin-top:0!important;
  padding:2px 4px 4px 0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  scrollbar-width:thin!important;
  scrollbar-color:#94a3b8 transparent!important;
}

#listaUsuariosConfig::-webkit-scrollbar{width:7px!important}
#listaUsuariosConfig::-webkit-scrollbar-track{background:transparent!important}
#listaUsuariosConfig::-webkit-scrollbar-thumb{
  background:#94a3b8!important;
  border-radius:999px!important;
}

/* Tarjeta de usuario */
#listaUsuariosConfig > .ns-user-record,
#listaUsuariosConfig > div:not(.report-empty):not(.empty-state){
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  min-height:88px!important;
  margin:0!important;
  padding:14px 14px 14px 70px!important;
  display:grid!important;
  grid-template-columns:minmax(230px,1.2fr) minmax(300px,1.6fr) auto!important;
  grid-template-areas:
    "identity meta status"
    "identity meta actions"!important;
  gap:6px 18px!important;
  align-items:center!important;
  border:1px solid #dbe4ee!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%)!important;
  box-shadow:0 5px 16px rgba(15,23,42,.055)!important;
  color:#0f172a!important;
  overflow:visible!important;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}

#listaUsuariosConfig > .ns-user-record:hover,
#listaUsuariosConfig > div:not(.report-empty):not(.empty-state):hover{
  border-color:#bfdbfe!important;
  box-shadow:0 10px 24px rgba(37,99,235,.09)!important;
  transform:translateY(-1px)!important;
}

/* Avatar */
#listaUsuariosConfig .ns-user-list-avatar,
#listaUsuariosConfig .ns-user-avatar,
#listaUsuariosConfig .user-avatar{
  position:absolute!important;
  left:14px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:42px!important;
  height:42px!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  border:0!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#3b82f6,#1d4ed8)!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:900!important;
  line-height:1!important;
  box-shadow:0 8px 18px rgba(37,99,235,.24)!important;
}

/* Nombre e identidad */
#listaUsuariosConfig .ns-user-record > strong:first-of-type,
#listaUsuariosConfig .ns-user-record h3,
#listaUsuariosConfig .ns-user-record h4,
#listaUsuariosConfig .ns-user-record .nombre,
#listaUsuariosConfig .ns-user-record .user-name{
  grid-area:identity!important;
  align-self:start!important;
  margin:0!important;
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1.25!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Metadatos */
#listaUsuariosConfig .ns-user-record-meta{
  grid-area:meta!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  align-content:center!important;
  flex-wrap:wrap!important;
  gap:6px 14px!important;
  color:#64748b!important;
}

#listaUsuariosConfig .ns-user-record-meta span,
#listaUsuariosConfig .ns-user-record-meta small,
#listaUsuariosConfig .ns-user-record-meta p{
  position:relative!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  padding-left:12px!important;
  color:#64748b!important;
  font-size:10.5px!important;
  font-weight:650!important;
  line-height:1.35!important;
  white-space:nowrap!important;
}

#listaUsuariosConfig .ns-user-record-meta span::before,
#listaUsuariosConfig .ns-user-record-meta small::before,
#listaUsuariosConfig .ns-user-record-meta p::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:50%!important;
  width:6px!important;
  height:6px!important;
  border-radius:50%!important;
  background:#22c55e!important;
  transform:translateY(-50%)!important;
  box-shadow:0 0 0 3px rgba(34,197,94,.10)!important;
}

/* Rol */
#listaUsuariosConfig .ns-user-record-role{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  margin:0 0 6px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  background:#dbeafe!important;
  color:#1d4ed8!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
}

#listaUsuariosConfig .ns-user-record-role[data-role="cajero"]{
  background:#ecfccb!important;
  color:#3f6212!important;
}
#listaUsuariosConfig .ns-user-record-role[data-role="supervisor"]{
  background:#dbeafe!important;
  color:#1d4ed8!important;
}
#listaUsuariosConfig .ns-user-record-role[data-role="administrador"]{
  background:#ede9fe!important;
  color:#6d28d9!important;
}

/* Estado */
#listaUsuariosConfig .ns-user-record-status{
  grid-area:status!important;
  justify-self:end!important;
  align-self:start!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  width:auto!important;
  margin:0!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
}

#listaUsuariosConfig .ns-user-record-status::before{
  content:""!important;
  width:7px!important;
  height:7px!important;
  border-radius:50%!important;
  background:currentColor!important;
}

#listaUsuariosConfig .ns-user-record-status.is-active{
  background:#dcfce7!important;
  color:#15803d!important;
}
#listaUsuariosConfig .ns-user-record-status.is-inactive{
  background:#fee2e2!important;
  color:#b91c1c!important;
}

/* Acciones */
#listaUsuariosConfig .ns-user-record-actions,
#listaUsuariosConfig .ns-user-actions,
#listaUsuariosConfig .user-actions{
  grid-area:actions!important;
  justify-self:end!important;
  align-self:end!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
}

#listaUsuariosConfig .ns-user-action-button,
#listaUsuariosConfig .ns-user-record-actions button,
#listaUsuariosConfig .ns-user-actions button,
#listaUsuariosConfig .user-actions button{
  all:unset!important;
  box-sizing:border-box!important;
  min-width:auto!important;
  min-height:32px!important;
  padding:7px 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #d7e0eb!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#334155!important;
  box-shadow:0 2px 7px rgba(15,23,42,.045)!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:10.5px!important;
  font-weight:850!important;
  line-height:1!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important;
}

#listaUsuariosConfig .ns-user-action-button:hover,
#listaUsuariosConfig .ns-user-record-actions button:hover{
  transform:translateY(-1px)!important;
  border-color:#93c5fd!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
}

#listaUsuariosConfig .ns-user-action-button.is-password{
  border-color:#c7d2fe!important;
  background:#eef2ff!important;
  color:#4338ca!important;
}

#listaUsuariosConfig .ns-user-action-button.is-danger{
  border-color:#fecaca!important;
  background:#fff1f2!important;
  color:#be123c!important;
}

#listaUsuariosConfig .ns-user-action-button.is-danger:hover{
  border-color:#fda4af!important;
  background:#ffe4e6!important;
  color:#9f1239!important;
}

#listaUsuariosConfig .ns-user-action-button.is-success{
  border-color:#bbf7d0!important;
  background:#f0fdf4!important;
  color:#15803d!important;
}

/* Evita botones sueltos deformados mientras se normaliza el DOM */
#listaUsuariosConfig > button,
#listaUsuariosConfig > .btn{
  width:auto!important;
  min-height:32px!important;
  margin:0!important;
}

/* Formulario de creación */
.ns-user-create-panel{
  padding:16px!important;
  border:1px solid #dbe4ee!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,#f8fafc,#ffffff)!important;
}

.ns-user-create-panel h3{
  margin:0 0 10px!important;
  color:#0f172a!important;
  font-size:15px!important;
  font-weight:900!important;
}

.ns-user-create-actions{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  margin-top:12px!important;
}

.ns-user-create-actions small{
  color:#64748b!important;
  font-size:11px!important;
  line-height:1.35!important;
}

/* Responsive */
@media(max-width:1100px){
  #listaUsuariosConfig > .ns-user-record,
  #listaUsuariosConfig > div:not(.report-empty):not(.empty-state){
    grid-template-columns:minmax(190px,1fr) minmax(230px,1.25fr) auto!important;
  }
}

@media(max-width:780px){
  #listaUsuariosConfig{
    max-height:none!important;
    overflow:visible!important;
  }

  #listaUsuariosConfig > .ns-user-record,
  #listaUsuariosConfig > div:not(.report-empty):not(.empty-state){
    min-height:0!important;
    padding:14px 14px 14px 68px!important;
    grid-template-columns:1fr auto!important;
    grid-template-areas:
      "identity status"
      "meta meta"
      "actions actions"!important;
    gap:9px 10px!important;
  }

  #listaUsuariosConfig .ns-user-record-meta{
    margin-top:2px!important;
  }

  #listaUsuariosConfig .ns-user-record-actions{
    justify-self:stretch!important;
    justify-content:flex-start!important;
    padding-top:4px!important;
    border-top:1px solid #edf2f7!important;
  }

  .ns-user-create-actions{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
}

@media(max-width:520px){
  #listaUsuariosConfig > .ns-user-record,
  #listaUsuariosConfig > div:not(.report-empty):not(.empty-state){
    padding:64px 12px 12px!important;
    grid-template-columns:1fr!important;
    grid-template-areas:
      "identity"
      "status"
      "meta"
      "actions"!important;
  }

  #listaUsuariosConfig .ns-user-list-avatar,
  #listaUsuariosConfig .ns-user-avatar,
  #listaUsuariosConfig .user-avatar{
    top:12px!important;
    left:12px!important;
    transform:none!important;
  }

  #listaUsuariosConfig .ns-user-record-status{
    justify-self:start!important;
  }

  #listaUsuariosConfig .ns-user-record-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }

  #listaUsuariosConfig .ns-user-action-button,
  #listaUsuariosConfig .ns-user-record-actions button{
    width:100%!important;
  }
}


/* ===== Corrección final: nombre completo visible en tarjetas de usuario ===== */
#listaUsuariosConfig .ns-user-record-name{
  grid-area:identity!important;
  display:block!important;
  align-self:center!important;
  min-width:0!important;
  margin:0!important;
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1.25!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

#listaUsuariosConfig .ns-user-record-name + .ns-user-record-role{
  margin-left:8px!important;
}

@media(max-width:780px){
  #listaUsuariosConfig .ns-user-record-name{
    align-self:start!important;
  }
}


/* ============================================================
   NS POS 2026 — Usuarios y accesos a ancho completo
   Elimina cualquier distribución antigua de dos columnas.
   ============================================================ */
#tab-config .ns-users-admin-card{
  width:100%!important;
  max-width:none!important;
  grid-column:1 / -1!important;
}
#tab-config .ns-users-admin-card > .card-body{
  display:block!important;
  grid-template-columns:none!important;
  width:100%!important;
}
#tab-config .ns-user-create-panel,
#tab-config .ns-users-list-head,
#tab-config #listaUsuariosConfig{
  width:100%!important;
  max-width:none!important;
  grid-column:1 / -1!important;
}
#tab-config .ns-user-create-panel{
  margin:0!important;
}
#tab-config .ns-users-list-head{
  margin-top:20px!important;
}
@media (min-width:1100px){
  #tab-config .ns-user-create-panel .grid-2{
    grid-template-columns:1fr 1fr!important;
  }
  #tab-config .ns-user-create-panel .grid-3{
    grid-template-columns:minmax(190px,.8fr) 1fr 1fr!important;
  }
}


/* NS POS — administración profesional de CAF DTE 39 y DTE 61 */
.sii-caf-manager .sii-card-title-row{align-items:flex-start!important;gap:16px}
.sii-caf-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.sii-caf-type-card{border:1px solid #d8e3f0;border-radius:14px;background:#fbfdff;padding:14px;box-shadow:0 5px 16px rgba(28,65,112,.05)}
.sii-caf-type-card.primary{border-top:4px solid #1f6fd6}.sii-caf-type-card.credit-note{border-top:4px solid #7c3aed}
.sii-caf-type-head{display:flex;align-items:center;gap:11px;padding-bottom:11px;margin-bottom:8px;border-bottom:1px solid #e4ebf4}
.sii-caf-code{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:#eaf3ff;color:#1459aa;font-size:15px;font-weight:950}
.sii-caf-type-card.credit-note .sii-caf-code{background:#f0eaff;color:#6d28d9}
.sii-caf-type-head strong,.sii-caf-type-head small{display:block}.sii-caf-type-head strong{font-size:12px;color:#10233f}.sii-caf-type-head small{margin-top:3px;font-size:9px;line-height:1.4;color:#687a92}
.sii-caf-empty{display:grid!important;gap:4px!important;padding:13px!important;border:1px dashed #c7d5e6!important;border-radius:11px!important;background:#f7faff!important}.sii-caf-empty strong{color:#334a69;font-size:11px}.sii-caf-empty span{color:#718198;font-size:9px;line-height:1.45}
.sii-caf-upload-box{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;gap:12px!important;padding:14px!important;border:1px solid #d6e1ee!important;border-radius:14px!important;background:#f6f9fd!important}
.sii-file-field{display:grid!important;gap:6px!important}.sii-file-field>span{font-size:10px;font-weight:900;color:#203856}.sii-file-field>small{font-size:9px;line-height:1.4;color:#718096}.sii-file-field input[type=file]{width:100%;padding:8px;border:1px solid #cbd8e8;border-radius:10px;background:#fff}
.sii-caf-upload-actions{display:flex;gap:8px;align-items:center}.sii-caf-upload-actions button{white-space:nowrap;margin:0!important}
@media(max-width:900px){.sii-caf-type-grid{grid-template-columns:1fr}.sii-caf-upload-box{grid-template-columns:1fr!important}.sii-caf-upload-actions{display:grid;grid-template-columns:1fr 1fr}.sii-caf-upload-actions button{width:100%}}
@media(max-width:520px){.sii-caf-upload-actions{grid-template-columns:1fr}}

/* Asistente seguro de anulación DTE39 mediante Nota de Crédito emitida en SII. */
.anulacion-sii-modal{max-width:720px}
.anulacion-sii-modal label{display:block;margin:12px 0 6px;color:#334155;font-size:12px;font-weight:800}
.anulacion-sii-modal input{width:100%;height:44px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:0 12px;font-size:15px}
.anulacion-sii-resumen{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.anulacion-sii-resumen>div{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}
.anulacion-sii-resumen span{color:#64748b;font-size:11px;font-weight:700}
.anulacion-sii-resumen strong{color:#0f2d58;font-size:15px}
.anulacion-sii-aviso{margin:14px 0;padding:14px;border-left:4px solid #2563eb;border-radius:10px;background:#eff6ff;color:#1e3a8a}
.anulacion-sii-aviso p{margin:5px 0 0;line-height:1.45}
.anulacion-sii-alerta{margin:12px 0;padding:12px;border:1px solid #f59e0b;border-radius:10px;background:#fffbeb;color:#92400e;font-weight:700}
.anulacion-sii-campos{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.anulacion-sii-footer{margin:16px -20px 0}
.anulacion-sii-modal button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:640px){.anulacion-sii-modal{width:calc(100vw - 20px);max-height:92vh;overflow:auto}.anulacion-sii-resumen,.anulacion-sii-campos{grid-template-columns:1fr}.anulacion-sii-footer{display:grid;grid-template-columns:1fr}.anulacion-sii-footer button{width:100%}}


/* Confirmación de guardado — módulo Productos y stock */
.nspos-save-confirm-overlay{
  position:fixed!important;inset:0!important;z-index:10050!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:20px!important;background:rgba(15,23,42,.48)!important;
  backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)
}
.nspos-save-confirm-overlay.hidden{display:none!important}
.nspos-save-confirm-card{
  width:min(390px,calc(100vw - 40px))!important;max-width:390px!important;
  box-sizing:border-box!important;margin:0!important;padding:30px 28px 24px!important;
  border:1px solid #dbe4ee!important;border-radius:18px!important;
  background:#fff!important;text-align:center!important;
  box-shadow:0 24px 70px rgba(15,23,42,.30)!important;overflow:hidden!important
}
.nspos-save-confirm-icon{
  width:64px!important;height:64px!important;margin:0 auto 17px!important;
  box-sizing:border-box!important;border-radius:50%!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  background:#ecfdf5!important;border:2px solid #86efac!important;
  color:#15803d!important;font-size:34px!important;font-weight:900!important;
  line-height:1!important;font-family:Arial,sans-serif!important
}
.nspos-save-confirm-card h3{margin:0 0 8px!important;color:#0f172a!important;font-size:20px!important;font-weight:900!important;text-align:center!important}
.nspos-save-confirm-card p{margin:0 auto 22px!important;max-width:310px!important;color:#475569!important;font-size:14px!important;line-height:1.5!important;text-align:center!important}
.nspos-save-confirm-button{
  min-width:132px!important;height:44px!important;margin:0 auto!important;padding:0 22px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border-radius:11px!important;font-weight:800!important
}
@media(max-width:520px){.nspos-save-confirm-overlay{padding:16px!important}.nspos-save-confirm-card{width:100%!important;padding:26px 20px 21px!important}}


/* Confirmación de eliminación — módulo Productos y stock */
.nspos-delete-confirm-overlay{
  position:fixed!important;inset:0!important;z-index:10060!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:20px!important;background:rgba(15,23,42,.48)!important;
  backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)
}
.nspos-delete-confirm-overlay.hidden{display:none!important}
.nspos-delete-confirm-card{
  width:min(390px,calc(100vw - 40px))!important;max-width:390px!important;
  box-sizing:border-box!important;margin:0!important;padding:30px 28px 24px!important;
  border:1px solid #dbe4ee!important;border-radius:18px!important;
  background:#fff!important;text-align:center!important;
  box-shadow:0 24px 70px rgba(15,23,42,.30)!important;overflow:hidden!important
}
.nspos-delete-confirm-icon{
  width:58px!important;height:58px!important;margin:0 auto 17px!important;
  box-sizing:border-box!important;border-radius:50%!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  background:#fff7ed!important;border:3px solid #f59e0b!important;
  color:#f59e0b!important;font-size:34px!important;font-weight:900!important;
  line-height:1!important;font-family:Arial,sans-serif!important
}
.nspos-delete-confirm-card h3{margin:0 0 9px!important;color:#0f172a!important;font-size:20px!important;font-weight:900!important;text-align:center!important}
.nspos-delete-confirm-card p{margin:0 auto 20px!important;max-width:330px!important;color:#475569!important;font-size:14px!important;line-height:1.55!important;text-align:center!important}
.nspos-delete-confirm-card p strong{color:#334155!important;font-weight:800!important}
.nspos-delete-confirm-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important}
.nspos-delete-cancel-button,.nspos-delete-action-button{
  min-width:118px!important;height:42px!important;padding:0 20px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border-radius:11px!important;font-weight:800!important
}
.nspos-delete-action-button{background:linear-gradient(135deg,#ef4444,#dc2626)!important;color:#fff!important}
.nspos-delete-action-button:disabled{opacity:.6!important;cursor:wait!important}
@media(max-width:520px){.nspos-delete-confirm-overlay{padding:16px!important}.nspos-delete-confirm-card{width:100%!important;padding:26px 20px 21px!important}.nspos-delete-confirm-actions{flex-direction:column-reverse!important}.nspos-delete-confirm-actions button{width:100%!important}}



/* NS POS · error de producto - estándar visual aprobado */
.nspos-product-error-card{text-align:center;}
.nspos-product-error-icon{
  width:58px;height:58px;margin:0 auto 18px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  border:2px solid #ef4444;background:#fff1f2;color:#dc2626;
  font-size:34px;line-height:1;font-weight:700;
}
.nspos-product-error-card h3{margin:0 0 10px;}
.nspos-product-error-card p{max-width:390px;margin:0 auto 22px;}


/* NS POS · confirmación superior de Respaldo */
.nspos-backup-action-button{
  min-width:112px!important;
  border-radius:13px!important;
  padding:10px 18px!important;
  border:1px solid #16a34a!important;
  background:linear-gradient(135deg,#22c55e,#16a34a)!important;
  color:#fff!important;
  font-weight:900!important;
  box-shadow:0 7px 16px rgba(22,163,74,.20)!important;
}
.nspos-backup-action-button:disabled{opacity:.6!important;cursor:wait!important}


/* NS POS · respaldo manual diario */
button.nspos-backup-daily-done,
button.nspos-backup-daily-done:hover{
  background:#e2e8f0!important;
  border-color:#cbd5e1!important;
  color:#64748b!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
  opacity:1!important;
}


/* Alta rápida Productos y Stock: autocompletado consistente con UI NS POS */
.nspos-autocomplete{position:relative;}
.nspos-autocomplete-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:1200;background:#fff;border:1px solid #d8dee8;border-radius:10px;box-shadow:0 10px 26px rgba(15,23,42,.16);max-height:260px;overflow:auto;padding:5px;}
.nspos-autocomplete-list.hidden{display:none!important;}
.nspos-autocomplete-list button{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:2px;border:0;background:transparent;border-radius:7px;padding:9px 11px;text-align:left;cursor:pointer;font:inherit;color:inherit;}
.nspos-autocomplete-list button:hover,.nspos-autocomplete-list button.active{background:#eef4ff;}
.nspos-autocomplete-list button small{font-size:11px;opacity:.68;}
.nspos-autocomplete-list .nspos-autocomplete-new{border-top:1px solid #edf0f5;}

/* Alta rápida de producto desde Punto de venta */
.nspos-pos-alta-card{max-width:520px;width:min(94vw,520px)}
.nspos-pos-alta-producto{max-width:650px;width:min(96vw,650px);max-height:92vh;overflow:auto}
.nspos-pos-alta-producto .ns-modal-body{overflow:visible}
.nspos-pos-alta-producto .nspos-autocomplete-list{z-index:1205}

/* NS POS: acciones profesionales en sugerencias de Categoría / Proveedor */
.nspos-autocomplete-list .nspos-autocomplete-row{display:flex;align-items:center;gap:4px;border-radius:7px;}
.nspos-autocomplete-list .nspos-autocomplete-row:hover,.nspos-autocomplete-list .nspos-autocomplete-row.active{background:#eef4ff;}
.nspos-autocomplete-list .nspos-autocomplete-row .nspos-autocomplete-select{flex:1;min-width:0;background:transparent;}
.nspos-autocomplete-list .nspos-autocomplete-row .nspos-autocomplete-delete{display:flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;margin-right:5px;border:0;border-radius:7px;background:transparent;font-size:21px;line-height:1;color:#6b7280;cursor:pointer;}
.nspos-autocomplete-list .nspos-autocomplete-row .nspos-autocomplete-delete:hover,.nspos-autocomplete-list .nspos-autocomplete-row .nspos-autocomplete-delete:focus{background:#fee2e2;color:#b91c1c;outline:none;}

/* ── PRODUCTOS POR KILOGRAMO v1.1.0 ─────────────────────────────────────── */
.nspos-pesable-label{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--ns-text,#1e293b);cursor:pointer;padding:4px 0;}
.nspos-pesable-label input[type="checkbox"]{width:16px;height:16px;accent-color:var(--ns-primary,#2563eb);cursor:pointer;}

/* badge "kg" junto al nombre del producto */
.badge-pesable{display:inline-block;padding:1px 6px;border-radius:6px;font-size:10px;font-weight:700;line-height:1.5;background:#dbeafe;color:#1d4ed8;vertical-align:middle;letter-spacing:.04em;}

/* Modal de peso */
.nspos-peso-modal{max-width:420px;width:min(94vw,420px);}
.nspos-peso-unidades{display:flex;gap:24px;margin:6px 0 14px;}
.nspos-peso-radio{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer;}
.nspos-peso-radio input[type="radio"]{width:16px;height:16px;accent-color:var(--ns-primary,#2563eb);cursor:pointer;}
.nspos-peso-total-box{display:flex;align-items:center;justify-content:space-between;background:var(--ns-bg,#f8fafc);border:1px solid var(--ns-line,#dbe4ee);border-radius:10px;padding:10px 16px;margin-top:8px;}
.nspos-peso-total-box span{font-size:13px;color:var(--muted,#64748b);}
.nspos-peso-total-box strong{font-size:22px;color:var(--ns-text,#1e293b);font-weight:700;}
/* ── FIN PRODUCTOS POR KILOGRAMO ─────────────────────────────────────────── */

/* ── BLOQUEO DE LICENCIA v1.0.0 ─────────────────────────────────────────── */
/* Overlay full-screen: z-index 9999 para cubrir absolutamente todo el sistema */
.nspos-license-lock{
  position:fixed;inset:0;z-index:9999;
  display:flex;align-items:center;justify-content:center;
  background:rgba(15,23,42,.92);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  padding:20px;
  animation:nsposLockFadeIn .25s ease;
}
@keyframes nsposLockFadeIn{from{opacity:0;}to{opacity:1;}}

/* Tarjeta central — diseño NS POS */
.nspos-license-lock-card{
  background:var(--ns-surface,#fff);
  border:1px solid var(--ns-line,#dbe4ee);
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  padding:40px 36px 32px;
  max-width:460px;width:100%;
  display:flex;flex-direction:column;align-items:center;gap:0;
  text-align:center;
}
.nspos-license-lock-logo{font-size:44px;line-height:1;margin-bottom:14px;}
.nspos-license-lock-title{
  font-size:20px;font-weight:700;
  color:var(--ns-text,#1e293b);margin:0 0 8px;
}
.nspos-license-lock-sub{
  font-size:14px;color:var(--muted,#64748b);margin:0 0 10px;line-height:1.5;
}
.nspos-license-lock-equipo{
  font-size:12px;color:var(--muted,#64748b);
  background:var(--ns-bg,#f8fafc);
  border:1px solid var(--ns-line,#dbe4ee);
  border-radius:8px;padding:5px 14px;margin-bottom:20px;
  display:none;width:100%;box-sizing:border-box;
}
.nspos-license-lock-step{width:100%;}
.nspos-license-lock-hint{
  font-size:13px;color:var(--ns-text,#1e293b);
  margin:0 0 14px;text-align:left;
}
.nspos-license-lock-filename{
  font-size:12px;color:var(--muted,#64748b);
  margin-top:6px;text-align:left;word-break:break-all;
}
.nspos-license-lock-actions{
  display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-start;
}
.nspos-license-lock-footer{
  margin-top:24px;padding-top:18px;
  border-top:1px solid var(--ns-line,#dbe4ee);
  width:100%;font-size:12px;color:var(--muted,#64748b);
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.nspos-license-lock-link{
  color:var(--ns-primary,#2563eb);text-decoration:none;font-weight:600;
}
.nspos-license-lock-link:hover{text-decoration:underline;}

/* Mientras el sistema está bloqueado el body NO hace scroll y el overflow queda oculto */
body.nspos-license-blocked{overflow:hidden;}
/* ── FIN BLOQUEO DE LICENCIA ──────────────────────────────────────────────── */

/* Ingreso rápido de stock: búsqueda por nombre (20260923) */
.stock-busqueda-wrap{position:relative}
.stock-sugerencias{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:30;max-height:280px;overflow-y:auto;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 14px 30px rgba(2,8,23,.18);padding:4px}
.stock-sugerencia{display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:9px;padding:9px 11px;cursor:pointer;color:#0f172a;font:inherit}
.stock-sugerencia strong{display:block;font-size:13px}
.stock-sugerencia small{display:block;font-size:11px;color:#64748b;margin-top:2px}
.stock-sugerencia:hover,.stock-sugerencia.activa{background:#eff6ff;outline:1px solid #bfdbfe}
@media(max-width:700px){.stock-sugerencias{max-height:190px}}

/* Ingreso rápido de stock: precio de venta destacado (20260923) */
.stock-precio-venta-box{margin:14px 0 4px;padding:12px 14px 12px;border:2px solid #86efac;border-radius:14px;background:linear-gradient(135deg,#f0fdf4,#ffffff)}
.stock-modal .ns-modal-body .stock-precio-venta-box label{margin:0 0 8px;color:#14532d;font-size:14px;font-weight:900}
.stock-precio-venta-input{position:relative}
.stock-precio-venta-input span{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:20px;font-weight:900;color:#15803d;pointer-events:none}
.stock-modal .ns-modal-body .stock-precio-venta-input input{height:54px;padding-left:34px;font-size:22px;font-weight:800;color:#14532d;border:2px solid #4ade80;background:#fff}
.stock-modal .ns-modal-body .stock-precio-venta-input input::placeholder{font-size:14px;font-weight:600;color:#64748b}
.stock-modal .ns-modal-body .stock-precio-venta-input input:focus{outline:3px solid rgba(22,163,74,.18);border-color:#16a34a}
.stock-modal .ns-modal-body .stock-precio-venta-input input:disabled{background:#f8fafc;border-color:#cbd5e1}
.stock-precio-venta-box small{display:block;margin-top:7px;font-size:12px;color:#166534;line-height:1.4}
.stock-precio-venta-box small.warn{color:#b45309;font-weight:700}
.stock-precio-venta-box small.error{color:#b91c1c;font-weight:700}
.stock-opcional{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:#e2e8f0;color:#475569;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.3px;vertical-align:middle}
.stock-precio-compra-ayuda{display:block;margin-top:5px;font-size:11px;color:#64748b}
.stock-fila-compra{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.stock-modal .stock-modal-footer{position:sticky;bottom:0;z-index:5;background:#fff}
@media(max-width:700px){.stock-fila-compra{grid-template-columns:1fr;gap:0}}
.stock-modal .ns-modal-body .stock-fila-compra label{min-height:34px;display:flex;align-items:flex-end;flex-wrap:wrap;column-gap:6px;row-gap:2px}
.stock-fila-compra .stock-opcional{margin-left:0}
@media(max-width:700px){.stock-modal .ns-modal-body .stock-fila-compra label{min-height:0}}
