:root{--bg:#f4f7fb;--panel:#fff;--text:#192233;--muted:#6c7788;--primary:#1769e0;--primary2:#0f4da8;--border:#e3e8ef;--danger:#d83b4b;--success:#16855b;--warn:#a96a00;--side:#10233f;--shadow:0 10px 30px rgba(30,55,90,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}.app-shell{min-height:100vh}.sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;background:linear-gradient(180deg,#10233f,#0a1830);color:#cbd7e8;padding:18px 14px;overflow:auto;z-index:30}.brand{display:flex;align-items:center;gap:11px;padding:7px 8px 22px;color:#fff}.brand-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#2c7df0;font-weight:900}.brand strong{display:block;font-size:15px}.brand small{color:#8fa8c9}.sidebar nav a{display:flex;gap:12px;align-items:center;padding:11px 12px;border-radius:9px;margin:3px 0;font-size:14px}.sidebar nav a:hover,.sidebar nav a.active{background:#1d3d68;color:white}.sidebar nav a span{width:20px;text-align:center}.nav-title{font-size:10px;letter-spacing:1.4px;color:#738aaa;margin:18px 10px 7px}.main{margin-left:260px;min-height:100vh}.topbar{height:70px;background:white;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 26px;position:sticky;top:0;z-index:20}.menu-btn{display:none;border:0;background:transparent;font-size:24px}.top-title{font-weight:700}.userbox{margin-left:auto;display:flex;align-items:center;gap:10px}.userbox small{display:block;color:var(--muted);font-size:11px}.avatar{width:36px;height:36px;border-radius:50%;background:#e9f2ff;color:var(--primary);display:grid;place-items:center;font-weight:800}.link-btn{border:0;background:none;color:var(--danger);cursor:pointer}.content{padding:26px}.footer{padding:18px 26px;color:var(--muted);font-size:12px}.page-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:20px}.page-head h1{font-size:25px;margin:0}.page-head p{margin:5px 0 0;color:var(--muted)}.btn{display:inline-flex;align-items:center;gap:6px;border:1px solid transparent;border-radius:8px;padding:10px 14px;font-weight:700;cursor:pointer;font-size:13px}.btn-primary{background:var(--primary);color:white}.btn-light{background:white;border-color:var(--border)}.btn-danger{background:#fff0f1;color:var(--danger);border-color:#ffd2d7}.btn-success{background:#e9f8f1;color:var(--success);border-color:#c8eedc}.btn-warning{background:#fff6e7;color:var(--warn);border-color:#fde2ae}.btn-sm{padding:7px 10px;font-size:12px}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,1fr)}.grid-2{grid-template-columns:repeat(2,1fr)}.stat{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:18px;box-shadow:var(--shadow)}.stat .label{color:var(--muted);font-size:12px}.stat .value{font-size:27px;font-weight:850;margin-top:8px}.stat .hint{margin-top:7px;font-size:11px;color:var(--muted)}.card{background:var(--panel);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.card-head{padding:16px 18px;border-bottom:1px solid var(--border);font-weight:800;display:flex;justify-content:space-between}.card-body{padding:18px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:13px}.table th{background:#f8fafc;color:#5c6879;text-align:left;padding:11px;border-bottom:1px solid var(--border);white-space:nowrap}.table td{padding:11px;border-bottom:1px solid #eef1f5;vertical-align:middle}.table tr:hover td{background:#fafcff}.num{text-align:right}.badge{display:inline-block;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800}.badge-success{background:#e4f6ee;color:#08794e}.badge-warning{background:#fff2d8;color:#996000}.badge-danger{background:#ffe7ea;color:#b51f36}.badge-info{background:#e8f2ff;color:#2161b6}.badge-gray{background:#eef1f5;color:#667182}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}.field{grid-column:span 4}.field.span-6{grid-column:span 6}.field.span-8{grid-column:span 8}.field.span-12{grid-column:span 12}.field label{display:block;font-size:12px;font-weight:700;margin-bottom:6px;color:#4f5c6d}.input,.select,.textarea{width:100%;border:1px solid #d7dee8;border-radius:8px;padding:10px 11px;background:white;color:var(--text);outline:none}.input:focus,.select:focus,.textarea:focus{border-color:#6ba3f4;box-shadow:0 0 0 3px #e8f1ff}.textarea{min-height:78px;resize:vertical}.actions{display:flex;gap:8px;flex-wrap:wrap}.alert{padding:12px 14px;border-radius:9px;margin-bottom:16px;font-size:13px}.alert-success{background:#e8f8f0;color:#116f4c}.alert-danger{background:#ffeaed;color:#a82a39}.alert-warning{background:#fff5df;color:#926109}.modal{display:none;position:fixed;inset:0;background:rgba(6,18,38,.56);z-index:60;align-items:center;justify-content:center;padding:18px}.modal.show{display:flex}.modal-box{background:#fff;border-radius:14px;max-width:720px;width:100%;max-height:90vh;overflow:auto}.modal-head{padding:16px 18px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between}.modal-body{padding:18px}.close{border:0;background:none;font-size:22px;cursor:pointer}.search{max-width:300px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.product-picker{display:grid;grid-template-columns:2fr .8fr 1fr auto;gap:8px;margin-bottom:12px}.line-total{font-weight:800}.total-box{margin-left:auto;max-width:360px}.total-row{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px dashed var(--border)}.total-row.grand{font-size:20px;font-weight:900;border:0;padding-top:13px}.stock-low{color:var(--danger);font-weight:800}.login-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;background:#f2f6fc}.login-hero{background:linear-gradient(135deg,#0c2141,#174b86);color:white;padding:64px;display:flex;flex-direction:column;justify-content:center}.login-hero h1{font-size:42px;margin:0 0 16px}.login-hero p{max-width:560px;color:#bfd0e6;line-height:1.6}.login-card-wrap{display:grid;place-items:center;padding:30px}.login-card{width:min(430px,100%);background:white;border:1px solid var(--border);border-radius:18px;padding:32px;box-shadow:var(--shadow)}.login-card h2{margin-top:0}.login-card .field{margin-bottom:14px}.invoice{max-width:900px;margin:20px auto;background:white;padding:38px;font-family:Arial;color:#111}.invoice-head{display:flex;justify-content:space-between;border-bottom:3px solid #111;padding-bottom:18px}.invoice-ruc{border:2px solid #111;padding:12px;text-align:center;min-width:300px}.invoice table{width:100%;border-collapse:collapse;margin-top:20px}.invoice th,.invoice td{border:1px solid #bbb;padding:8px;font-size:12px}.print-actions{text-align:center;margin:18px}@media print{.print-actions{display:none}.invoice{margin:0;padding:15px;box-shadow:none}}@media(max-width:1000px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}.field{grid-column:span 6}}@media(max-width:760px){.sidebar{transform:translateX(-102%);transition:.25s}.sidebar.open{transform:none}.main{margin-left:0}.menu-btn{display:block;margin-right:12px}.content{padding:16px}.grid-4{grid-template-columns:1fr}.field,.field.span-6,.field.span-8{grid-column:span 12}.userbox>div:not(.avatar){display:none}.product-picker{grid-template-columns:1fr 1fr}.login-page{grid-template-columns:1fr}.login-hero{display:none}}
.form-section-title{margin:22px 0 12px;padding-bottom:8px;border-bottom:1px solid #e8edf3;font-weight:800;color:#243447;font-size:14px;text-transform:uppercase;letter-spacing:.04em}.form-section-title:first-child{margin-top:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#4b596b}.muted{font-size:12px;color:#748197;font-weight:400}.advanced-config{margin-top:18px;border:1px solid #e4e9f0;border-radius:10px;padding:12px 14px;background:#fafbfd}.advanced-config summary{cursor:pointer;font-weight:700;color:#43516a}.badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.03em}.badge-success{background:#e8f7ef;color:#16824f}.badge-danger{background:#fdecec;color:#bd2e2e}.badge-gray{background:#eef1f5;color:#6d7785}.cert-info{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}.cert-info div{border:1px solid #edf0f4;border-radius:9px;padding:10px;background:#fbfcfd}.cert-info span{display:block;font-size:10px;color:#7b8797;text-transform:uppercase;margin-bottom:4px}.cert-info strong{font-size:12px;color:#27364a;word-break:break-word}@media(max-width:1000px){.form-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.form-grid,.form-grid-3{grid-template-columns:1fr}.form-grid label[style*="grid-column"]{grid-column:auto!important}.cert-info{grid-template-columns:1fr}}
/* v3 Configuración profesional */
.settings-grid{display:grid;gap:18px}.config-logo-row{display:flex;align-items:center;gap:18px}.config-logo{width:150px;height:80px;object-fit:contain;border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:8px}.config-logo-placeholder{width:150px;height:80px;display:grid;place-items:center;border:1px dashed #94a3b8;border-radius:12px;color:#64748b;font-weight:700}.brand-logo-wrap{width:42px;height:42px;border-radius:10px;background:#fff;display:grid;place-items:center;overflow:hidden;padding:3px}.brand-logo{width:100%;height:100%;object-fit:contain}.check-line{display:flex!important;align-items:center;gap:8px;min-height:42px}.actions-wrap{flex-wrap:wrap}.print-actions{max-width:900px;margin:14px auto;text-align:right}.print-doc{box-shadow:0 12px 35px rgba(15,23,42,.08)}
@media(max-width:760px){.config-logo-row{align-items:flex-start;flex-direction:column}.settings-grid .form-grid-3{grid-template-columns:1fr!important}.settings-grid .toolbar{align-items:stretch}.settings-grid .toolbar>*{width:100%}}

/* v6 - Configuración administrativa organizada */
.settings-page-head{margin-bottom:18px}.eyebrow{font-size:10px;font-weight:850;letter-spacing:.16em;color:var(--primary);margin-bottom:7px}.settings-head-actions{display:flex;gap:10px;align-items:center}.environment-pill{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:999px;font-size:11px;font-weight:850;border:1px solid}.environment-pill .status-dot{width:8px;height:8px;border-radius:50%;background:currentColor}.environment-pill.is-beta{color:#9a6500;background:#fff8e8;border-color:#f5dda5}.environment-pill.is-production{color:#b52b3d;background:#fff0f2;border-color:#f4c7ce}.settings-health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.settings-health-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:13px 14px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;box-shadow:0 5px 18px rgba(30,55,90,.045)}.health-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#eef4fd;color:#316dbd;font-size:11px;font-weight:900}.settings-health-card small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}.settings-health-card strong{display:block;font-size:12px;color:#243349}.health-state{font-size:9px;font-weight:900;letter-spacing:.07em;padding:4px 6px;border-radius:6px;background:#eef1f5;color:#697586}.settings-health-card.is-ok .health-icon{background:#e7f7ef;color:#16855b}.settings-health-card.is-ok .health-state{background:#e7f7ef;color:#16855b}.settings-health-card.is-pending .health-icon{background:#fff5df;color:#a96a00}.settings-health-card.is-pending .health-state{background:#fff5df;color:#946000}.settings-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}.settings-nav-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:10px;box-shadow:var(--shadow);position:sticky;top:88px}.settings-nav-title{padding:8px 10px 10px;font-size:10px;font-weight:900;letter-spacing:.11em;color:#8090a5;text-transform:uppercase}.settings-nav-item{width:100%;border:0;background:transparent;border-radius:10px;padding:10px;display:grid;grid-template-columns:34px 1fr;gap:10px;text-align:left;cursor:pointer;color:#526174;margin:2px 0;transition:.16s}.settings-nav-item:hover{background:#f5f8fd}.settings-nav-item.active{background:#eef5ff;color:#185faf}.settings-nav-icon{width:34px;height:34px;border-radius:8px;background:#f0f3f8;display:grid;place-items:center;font-size:10px;font-weight:900;color:#708097}.settings-nav-item.active .settings-nav-icon{background:#2e7dea;color:#fff}.settings-nav-item strong{display:block;font-size:12px;color:#26364b;margin-top:1px}.settings-nav-item.active strong{color:#185faf}.settings-nav-item small{display:block;font-size:10px;color:#8a96a8;margin-top:3px;line-height:1.25}.settings-nav-help{margin:12px 4px 2px;padding:12px;border-radius:10px;background:#f8fafc;border:1px solid #edf0f4}.settings-nav-help strong{font-size:11px}.settings-nav-help p{font-size:10px;line-height:1.5;color:#778499;margin:5px 0 0}.settings-content{min-width:0}.settings-panel{display:none}.settings-panel.active{display:block}.settings-panel-head{background:linear-gradient(135deg,#102b50,#184b82);color:#fff;border-radius:14px;padding:22px 24px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:flex-start;overflow:hidden;position:relative}.settings-panel-head:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;right:-70px;top:-100px;background:rgba(255,255,255,.06)}.section-kicker{font-size:9px;letter-spacing:.16em;font-weight:900;color:#a9cdf8}.settings-panel-head h2{margin:5px 0 5px;font-size:21px}.settings-panel-head p{margin:0;color:#c6d8ed;font-size:12px;max-width:660px}.panel-number{font-size:38px;font-weight:900;color:rgba(255,255,255,.13);line-height:1;position:relative;z-index:1}.settings-section-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:20px;margin-bottom:14px;box-shadow:0 6px 22px rgba(30,55,90,.05)}.settings-section-card.table-card{padding:0;overflow:hidden}.settings-section-card.table-card .subsection-heading{padding:18px 20px 12px;margin:0}.company-profile-block{display:flex;align-items:center;gap:20px}.company-logo-box{width:170px;min-width:170px;height:100px;border:1px solid #e5eaf1;background:#fbfcfe;border-radius:12px;padding:8px;display:grid;place-items:center}.company-logo-box .config-logo{width:100%;height:100%;border:0;padding:0;background:transparent}.company-logo-box .config-logo-placeholder{width:100%;height:100%;border-radius:8px}.company-profile-copy h3{font-size:18px;margin:4px 0 5px;color:#1e3049}.company-profile-copy p{font-size:12px;color:#718096;margin:0 0 8px}.micro-label{font-size:9px;font-weight:900;letter-spacing:.13em;color:#8390a4}.file-hint{display:inline-block;font-size:10px;color:#5e6e83;background:#f3f6fa;padding:5px 8px;border-radius:6px}.upload-form-professional{display:flex;gap:12px;align-items:center;border-top:1px solid #eef1f5;margin-top:18px;padding-top:16px}.file-drop-field{flex:1;border:1px dashed #b8c5d5;border-radius:10px;padding:11px 12px;position:relative;cursor:pointer;background:#fbfcfe}.file-drop-field input{position:absolute;inset:0;opacity:0;cursor:pointer}.file-drop-title{display:block;font-size:12px;font-weight:800;color:#34455c}.file-drop-subtitle{display:block;font-size:10px;color:#8793a4;margin-top:2px}.subsection-heading{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:16px}.subsection-heading.compact{margin-bottom:12px}.subsection-heading h3{margin:0 0 4px;font-size:14px;color:#26374d}.subsection-heading p{margin:0;font-size:11px;color:#7b8797;line-height:1.45}.subsection-tag{font-size:9px;font-weight:900;letter-spacing:.08em;color:#8c6200;background:#fff5da;border:1px solid #f4dda8;padding:5px 7px;border-radius:6px;white-space:nowrap}.subsection-tag.secure{color:#0b7750;background:#e8f7ef;border-color:#c8ead9}.modern-form-grid{gap:14px 16px}.modern-form-grid label,.block-label{font-size:11px;color:#4b596c}.modern-form-grid .input,.modern-form-grid .select,.block-label .input{margin-top:2px;background:#fcfdff;border-color:#d9e0e9;min-height:41px}.span-2-cols{grid-column:span 2}.required-star{color:#d83b4b}.security-notice{display:flex;gap:11px;align-items:flex-start;background:#f3f8ff;border:1px solid #d9e9ff;border-radius:10px;padding:11px 13px;margin-bottom:15px}.security-notice-icon{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#ddecff;color:#2268bc;font-weight:900}.security-notice strong{font-size:11px;color:#294768}.security-notice p{font-size:10px;color:#6f829a;margin:3px 0 0}.password-wrap{display:flex;position:relative}.password-wrap .input{padding-right:50px}.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:#edf3fb;color:#3f6fa7;border-radius:6px;padding:5px 7px;font-size:9px;font-weight:800;cursor:pointer}.modern-details{border-color:#e7ebf1;background:#fbfcfe}.modern-details summary{display:flex;align-items:center;gap:10px}.modern-details summary span{font-size:11px}.modern-details summary small{font-size:9px;color:#8995a6;font-weight:500}.details-body{margin-top:13px}.form-actions-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #edf0f4;margin-top:18px;padding-top:15px}.form-actions-bar>span{font-size:10px;color:#7e8998}.certificate-status{display:grid;grid-template-columns:42px 1fr auto;gap:13px;align-items:center;padding:14px;border-radius:11px;border:1px solid}.certificate-status-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;font-size:18px;font-weight:900}.certificate-status h3{margin:3px 0 2px;font-size:14px}.certificate-status p{margin:0;font-size:10px}.certificate-status.valid{background:#f2fbf7;border-color:#d1eedf}.certificate-status.valid .certificate-status-icon{background:#dcf4e8;color:#16855b}.certificate-status.valid h3{color:#146847}.certificate-status.valid p{color:#608371}.certificate-status.not-configured{background:#f8fafc;border-color:#e5eaf0}.certificate-status.not-configured .certificate-status-icon{background:#edf1f5;color:#718096}.certificate-status.expired{background:#fff5f6;border-color:#f3d3d8}.certificate-status.expired .certificate-status-icon{background:#fee5e9;color:#c42f45}.cert-info-pro{grid-template-columns:2fr 1fr 1fr;margin-top:14px}.inline-action-form{margin-top:12px}.divider{height:1px;background:#edf0f4;margin:18px 0}.series-form{display:grid;grid-template-columns:1.3fr 1.3fr .7fr .8fr auto;gap:10px;align-items:end}.series-form label{font-size:11px;font-weight:700;color:#4b596b}.series-form .input,.series-form .select{margin-top:6px}.professional-table th{font-size:10px;text-transform:uppercase;letter-spacing:.04em;padding:10px 18px;background:#fafbfd}.professional-table td{padding:12px 18px}.code-chip,.doc-type-chip{display:inline-flex;align-items:center;border-radius:6px;background:#eef4fc;color:#34679f;font-size:10px;font-weight:800;padding:4px 7px}.doc-type-chip{background:#f0f2f6;color:#657184}.empty-cell{text-align:center;color:#8b96a5;padding:24px!important}.check-card{border:1px solid #e2e7ee;border-radius:9px;padding:10px 11px;display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:9px!important;background:#fcfdff;min-height:64px}.check-card input{margin-top:3px}.check-card strong{display:block;font-size:11px;color:#34455b}.check-card small{display:block;font-size:9px;color:#8591a1;margin-top:3px;line-height:1.35}.smtp-test-form{display:grid;grid-template-columns:minmax(220px,420px) auto;gap:10px;align-items:center}
@media(max-width:1200px){.settings-health-grid{grid-template-columns:repeat(2,1fr)}.settings-layout{grid-template-columns:220px minmax(0,1fr)}.series-form{grid-template-columns:1fr 1fr}.series-form .btn{width:max-content}.span-2-cols{grid-column:auto}}
@media(max-width:900px){.settings-layout{grid-template-columns:1fr}.settings-nav-card{position:static;display:flex;overflow:auto;gap:5px}.settings-nav-title,.settings-nav-help{display:none}.settings-nav-item{min-width:145px;grid-template-columns:28px 1fr}.settings-nav-icon{width:28px;height:28px}.settings-panel-head{padding:18px}.settings-health-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.settings-health-grid{grid-template-columns:1fr}.settings-page-head{align-items:flex-start}.settings-head-actions{margin-top:8px}.company-profile-block{align-items:flex-start;flex-direction:column}.company-logo-box{width:100%;height:120px}.upload-form-professional{flex-direction:column;align-items:stretch}.form-actions-bar{align-items:stretch;flex-direction:column}.form-actions-bar .btn{justify-content:center}.certificate-status{grid-template-columns:40px 1fr}.certificate-status>.badge{grid-column:1/-1;width:max-content}.cert-info-pro{grid-template-columns:1fr}.series-form{grid-template-columns:1fr}.series-form .btn{width:100%;justify-content:center}.smtp-test-form{grid-template-columns:1fr}.settings-nav-card{margin:0 -2px}.settings-panel-head h2{font-size:18px}.panel-number{font-size:30px}}

/* v7 - acciones de edición de establecimientos */
.table-actions-col{width:110px;text-align:right}.professional-table td:last-child{text-align:right}.status-chip{display:inline-flex;align-items:center;margin-top:5px;padding:3px 7px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.05em}.status-off{background:#fff1f2;color:#be123c}.subsection-heading .btn[hidden]{display:none!important}

/* v8 - modo edición SUNAT */
.sunat-edit-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.sunat-editing .modern-form-grid .input,.sunat-editing .modern-form-grid .select{background:#fff;border-color:#b8cceb;box-shadow:0 0 0 2px rgba(46,125,234,.04)}#sunatConfigForm input:disabled,#sunatConfigForm select:disabled{opacity:1;color:#34455b;background:#f7f9fc;cursor:not-allowed}#sunatConfigForm .password-toggle:disabled{opacity:.45;cursor:not-allowed}#guardarSunatBtn:disabled{opacity:.5;cursor:not-allowed}

/* v9 - administración profesional de series */
.series-form{grid-template-columns:1.25fr 1.4fr .7fr .8fr auto}.series-form-heading{grid-column:1/-1;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:12px;border-bottom:1px solid #edf0f4}.series-form-heading h3{margin:0 0 4px;font-size:14px;color:#26374d}.series-form-heading p{margin:0;font-size:11px;color:#7b8797}.series-edit-hint{grid-column:1/-1;font-size:10px;color:#7e8998;background:#f8fafc;border:1px solid #edf0f4;border-radius:8px;padding:9px 11px}.series-editing .input,.series-editing .select{border-color:#b8cceb;background:#fff}.series-code{display:inline-flex;align-items:center;font-weight:900;letter-spacing:.06em;color:#173b67;background:#edf4fd;border:1px solid #dce9f8;border-radius:7px;padding:5px 8px}.status-on{background:#e8f7ef;color:#0b7750}.professional-table .doc-type-chip{margin-left:6px}
@media(max-width:1200px){.series-form{grid-template-columns:1fr 1fr}.series-form-heading,.series-edit-hint{grid-column:1/-1}}
@media(max-width:700px){.series-form{grid-template-columns:1fr}.series-form-heading,.series-edit-hint{grid-column:1}.series-form-heading{flex-direction:column}.series-form-heading .btn{width:100%}}


/* v10 - Nueva venta profesional y búsqueda dinámica */
.page-kicker{display:block;font-size:9px;letter-spacing:.15em;font-weight:900;color:#2d72cb;margin-bottom:5px}.sales-page-head{margin-bottom:16px}.sale-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px;align-items:start}.sale-main-card,.sale-detail-card{grid-column:1}.sale-summary-card{grid-column:2;grid-row:1/span 2;position:sticky;top:88px}.sale-section-title{padding:15px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(180deg,#fff,#fbfcfe)}.sale-section-title>div{display:grid;grid-template-columns:34px auto;column-gap:10px;align-items:center}.sale-section-title strong{font-size:14px;color:#24364e}.sale-section-title small{grid-column:2;color:#8190a3;font-size:10px;margin-top:2px}.sale-step{grid-row:1/span 2;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#eaf3ff;color:#1769e0;font-weight:900;font-size:11px}.sale-status-dot,.keyboard-hint{font-size:10px;font-weight:800;color:#53708f;background:#f1f5fa;border:1px solid #e1e8f0;border-radius:999px;padding:6px 9px}.sale-data-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:13px}.sale-data-grid .field{grid-column:auto}.sale-client-field{grid-column:span 2!important}.sale-observation{grid-column:span 2!important}.optional-label{font-size:9px;color:#8794a5;font-weight:600;margin-left:4px}.dynamic-product-search{position:relative;z-index:12}.product-search-box{height:50px;border:1px solid #cfd9e6;border-radius:11px;background:#fff;display:flex;align-items:center;box-shadow:0 4px 18px rgba(30,55,90,.05);transition:.15s}.product-search-box:focus-within{border-color:#6ba3f4;box-shadow:0 0 0 3px #e8f1ff,0 8px 24px rgba(30,80,150,.08)}.product-search-icon{font-size:25px;color:#6b7f98;width:48px;text-align:center}.product-search-box input{flex:1;border:0;outline:0;font-size:14px;color:#1f3047;background:transparent;height:100%;padding:0 10px 0 0}.product-search-loader{width:18px;height:18px;border:2px solid #dbe5f0;border-top-color:#1769e0;border-radius:50%;margin-right:15px;animation:saleSpin .7s linear infinite}@keyframes saleSpin{to{transform:rotate(360deg)}}.product-search-results{position:absolute;left:0;right:0;top:57px;background:#fff;border:1px solid #dce4ed;border-radius:12px;box-shadow:0 18px 42px rgba(25,51,85,.16);max-height:390px;overflow:auto;padding:6px;z-index:40}.product-result{width:100%;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:15px;text-align:left;padding:11px 12px;border-radius:9px;cursor:pointer;color:#26374d}.product-result:hover,.product-result.active{background:#edf5ff}.product-result-main{min-width:0;display:flex;flex-direction:column}.product-result-main strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-result-main small{font-size:10px;color:#7c899a;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-result-meta{min-width:105px;text-align:right;display:flex;flex-direction:column}.product-result-meta b{font-size:12px;color:#174f94}.product-result-meta em{font-style:normal;font-size:9px;color:#16855b;margin-top:4px}.product-result-meta em.low{color:#a96a00}.product-result-meta em.out{color:#c92f43}.product-no-results{padding:18px;text-align:center;display:flex;flex-direction:column;gap:4px}.product-no-results strong{font-size:12px}.product-no-results span{font-size:10px;color:#7d8998}.selected-product-tip{margin-top:9px;font-size:10px;color:#7c8998}.selected-product-tip span{font-weight:800;color:#416b9e;margin-right:4px}.sale-items-wrap{min-height:230px}.sale-items-table td{padding-top:10px;padding-bottom:10px}.sale-code{display:inline-flex;background:#eef4fb;color:#315e91;font-weight:800;font-size:10px;border-radius:6px;padding:5px 7px}.sale-product-name{display:flex;flex-direction:column;min-width:230px}.sale-product-name strong{font-size:12px;color:#25364c}.sale-product-name small{margin-top:4px;font-size:9px;color:#8490a0}.sale-number-input{min-width:90px}.sale-price-input{display:flex;align-items:center;border:1px solid #d7dee8;border-radius:8px;background:#fff;overflow:hidden}.sale-price-input span{padding-left:9px;font-size:11px;color:#788698}.sale-price-input .input{border:0;box-shadow:none;padding-left:5px}.sale-remove-btn{width:30px;height:30px;border:0;border-radius:7px;background:#fff0f1;color:#c22e42;font-size:18px;cursor:pointer}.sale-remove-btn:hover{background:#ffe2e5}.sale-empty-row td{background:#fff!important}.sale-empty-state{padding:34px;text-align:center;display:flex;flex-direction:column;gap:5px;color:#8793a3}.sale-empty-state strong{font-size:13px;color:#526174}.sale-empty-state span{font-size:10px}.sale-row-pulse td{animation:salePulse .45s ease}@keyframes salePulse{50%{background:#eaf4ff}}.sale-summary-card .card-body{padding:18px}.sale-summary-lines>div,.sale-item-counter{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px dashed #dfe5ec;font-size:11px;color:#68778a}.sale-summary-lines strong,.sale-item-counter strong{color:#24364d}.sale-grand-total{margin:17px -4px 8px;background:linear-gradient(135deg,#123c70,#1769e0);color:#fff;border-radius:12px;padding:17px 15px;display:flex;flex-direction:column;gap:5px}.sale-grand-total span{font-size:10px;color:#cfe1fb}.sale-grand-total strong{font-size:26px;letter-spacing:-.02em}.sale-submit-btn{width:100%;justify-content:center;margin-top:17px;padding:12px}.sale-submit-note{font-size:9px;line-height:1.5;text-align:center;color:#8a96a5;margin:9px 8px 0}
@media(max-width:1150px){.sale-layout{grid-template-columns:1fr}.sale-main-card,.sale-detail-card,.sale-summary-card{grid-column:1;grid-row:auto}.sale-summary-card{position:static}.sale-data-grid{grid-template-columns:1fr 1fr}.sale-client-field,.sale-observation{grid-column:span 2!important}}
@media(max-width:700px){.sale-data-grid{grid-template-columns:1fr}.sale-data-grid .field,.sale-client-field,.sale-observation{grid-column:1!important}.sale-section-title{align-items:flex-start}.sale-status-dot,.keyboard-hint{display:none}.product-result-main small{max-width:210px}.product-result-meta{min-width:82px}.sale-items-table{min-width:780px}}

/* v11 - Compras profesionales y búsqueda dinámica */
.purchase-page-head{margin-bottom:16px}.purchase-form{display:block}.purchase-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}.purchase-main-card{min-width:0}.purchase-summary-card{position:sticky;top:88px}.purchase-products-card{margin-top:16px}.purchase-section-head{padding:15px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(180deg,#fff,#fbfcfe)}.purchase-section-head>div:first-child{display:flex;align-items:center;gap:10px}.purchase-section-head h2{font-size:14px;margin:0;color:#24364e}.purchase-section-head p{font-size:10px;color:#8190a3;margin:3px 0 0}.purchase-section-head.compact{padding-bottom:13px}.purchase-step{width:34px;height:34px;flex:0 0 34px;border-radius:9px;display:grid;place-items:center;background:#eaf3ff;color:#1769e0;font-weight:900;font-size:11px}.purchase-badge,.purchase-shortcut{font-size:10px;font-weight:800;color:#53708f;background:#f1f5fa;border:1px solid #e1e8f0;border-radius:999px;padding:6px 9px}.purchase-card-body{padding:18px}.purchase-doc-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:14px}.purchase-doc-grid .field{grid-column:auto}.purchase-doc-grid .span-12{grid-column:1/-1}.purchase-card label b{color:#d83b4b;display:inline!important;line-height:1;vertical-align:baseline;margin-left:2px}.purchase-doc-grid .field>label{display:flex;flex-direction:row;align-items:center;gap:3px;min-height:17px;margin-bottom:6px}.purchase-doc-grid .field>label b{flex:0 0 auto}.dynamic-search{position:relative;z-index:15}.dynamic-search>.input{height:48px;padding-left:43px;padding-right:44px;border-radius:11px;box-shadow:0 4px 18px rgba(30,55,90,.04)}.search-icon{position:absolute;left:15px;top:50%;transform:translateY(-50%);font-size:22px;color:#6d8098;z-index:2;pointer-events:none}.search-loader{position:absolute;right:15px;top:15px;width:18px;height:18px;border:2px solid #dbe5f0;border-top-color:#1769e0;border-radius:50%;animation:saleSpin .7s linear infinite}.dynamic-results{position:absolute;left:0;right:0;top:55px;background:#fff;border:1px solid #dce4ed;border-radius:12px;box-shadow:0 18px 42px rgba(25,51,85,.16);max-height:360px;overflow:auto;padding:6px;z-index:50}.provider-result,.purchase-product-result{width:100%;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;padding:11px 12px;border-radius:9px;cursor:pointer;color:#26374d}.provider-result:hover,.provider-result.active,.purchase-product-result:hover,.purchase-product-result.active{background:#edf5ff}.provider-main,.purchase-result-main{display:flex;flex-direction:column;min-width:0}.provider-main strong,.purchase-result-main strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.provider-main small,.purchase-result-main small{font-size:10px;color:#7c899a;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.provider-meta,.purchase-result-meta{display:flex;flex-direction:column;text-align:right;min-width:100px}.provider-meta b,.purchase-result-meta b{font-size:11px;color:#174f94}.provider-meta small,.purchase-result-meta small{font-size:9px;color:#7d8998;margin-top:3px}.selected-provider{margin-top:8px;border:1px solid #cfe0f5;background:#f4f8fe;border-radius:10px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.selected-provider>div{display:flex;flex-direction:column}.selected-provider strong{font-size:12px;color:#24466f}.selected-provider small{font-size:10px;color:#73859a;margin-top:3px}.selected-provider .link-btn{color:#1769e0;font-weight:800}.purchase-search-body{padding:14px 18px}.purchase-table-wrap{min-height:230px}.purchase-table td{padding-top:10px;padding-bottom:10px}.purchase-stock{font-size:10px;font-weight:800;color:#52708e;background:#f2f6fa;border-radius:6px;padding:5px 7px;display:inline-flex}.purchase-number-input{min-width:88px}.purchase-cost-input{display:flex;align-items:center;border:1px solid #d7dee8;border-radius:8px;background:#fff;overflow:hidden;min-width:112px}.purchase-cost-input span{padding-left:9px;font-size:11px;color:#788698}.purchase-cost-input .input{border:0;box-shadow:none;padding-left:5px}.purchase-remove-btn{width:30px;height:30px;border:0;border-radius:7px;background:#fff0f1;color:#c22e42;font-size:18px;cursor:pointer}.purchase-remove-btn:hover{background:#ffe2e5}.purchase-empty-row td{background:#fff!important}.purchase-summary-content{padding:18px}.purchase-stat{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px dashed #dfe5ec;font-size:11px;color:#68778a}.purchase-stat strong{font-size:13px;color:#24364d}.purchase-grand-total{margin:17px 0 8px;background:linear-gradient(135deg,#123c70,#1769e0);color:#fff;border-radius:12px;padding:17px 15px;display:flex;flex-direction:column;gap:5px}.purchase-grand-total small{font-size:10px;color:#cfe1fb}.purchase-grand-total strong{font-size:26px}.purchase-submit{width:100%;justify-content:center;margin-top:14px;padding:12px}.purchase-summary-note{font-size:9px;line-height:1.5;text-align:center;color:#8a96a5;margin:10px 7px 0}.purchase-row-pulse td{animation:salePulse .45s ease}
@media(max-width:1150px){.purchase-grid{grid-template-columns:1fr}.purchase-summary-card{position:static}.purchase-doc-grid{grid-template-columns:1fr 1fr}.purchase-doc-grid .span-12{grid-column:1/-1}}
@media(max-width:700px){.purchase-doc-grid{grid-template-columns:1fr}.purchase-doc-grid .field,.purchase-doc-grid .span-12{grid-column:1}.purchase-section-head{align-items:flex-start}.purchase-shortcut,.purchase-badge{display:none}.purchase-table{min-width:880px}.provider-main small,.purchase-result-main small{max-width:210px}.provider-meta,.purchase-result-meta{min-width:80px}}

/* v13 - API dinámica de documentos y alta rápida de proveedores */
.settings-health-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.health-icon{min-width:34px;text-align:center}
.provider-search-toolbar{display:grid;grid-template-columns:170px minmax(0,1fr) auto;gap:10px;align-items:stretch}
.provider-doc-type{height:42px}
.provider-api-button{white-space:nowrap;min-width:170px}
.provider-search-help{font-size:12px;color:#718096;margin-top:7px}
.provider-api-card{margin-top:14px;border:1px solid #cfe0f6;background:linear-gradient(180deg,#f8fbff 0%,#fff 100%);border-radius:14px;padding:16px;box-shadow:0 8px 24px rgba(27,76,134,.06)}
.provider-api-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.provider-api-head>div{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:5px 10px}
.provider-api-head strong{font-size:15px;color:#14233b}
.provider-api-head small{grid-column:2;color:#66758d}
.provider-api-badge{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:30px;padding:0 10px;border-radius:999px;background:#e8f2ff;color:#1767ca;font-weight:800;font-size:11px}
.provider-api-close{border:0;background:#edf2f7;color:#526174;width:32px;height:32px;border-radius:9px;font-size:20px;cursor:pointer}
.provider-api-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.provider-api-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#34435b}
.provider-api-grid .span-2-cols{grid-column:span 2}.provider-api-grid .span-3-cols{grid-column:span 3}
.provider-api-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding-top:14px;border-top:1px solid #e4edf7;color:#66758d;font-size:12px}
.api-security-note{margin-top:14px;padding:12px 14px;border-radius:10px;background:#eef7ff;color:#35506d;font-size:12px;border:1px solid #d9eafa}
.api-test-form{display:grid;grid-template-columns:150px minmax(220px,1fr) auto;gap:10px;align-items:center}
@media(max-width:900px){.provider-search-toolbar{grid-template-columns:1fr}.provider-api-button{width:100%}.provider-api-grid{grid-template-columns:1fr}.provider-api-grid .span-2-cols,.provider-api-grid .span-3-cols{grid-column:auto}.provider-api-actions{align-items:stretch;flex-direction:column}.api-test-form{grid-template-columns:1fr}}

/* v15 - Cliente dinámico/API en Nueva venta */
.customer-search-toolbar{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:10px;align-items:stretch}.customer-doc-type{height:42px}.customer-api-button{white-space:nowrap;min-width:170px}.customer-search-help{font-size:11px;color:#718096;margin-top:7px;line-height:1.45}.selected-customer{margin-top:9px;border:1px solid #cfe0f5;background:linear-gradient(180deg,#f5f9ff,#f9fbfe);border-radius:11px;padding:11px 13px;display:flex;align-items:center;justify-content:space-between;gap:12px}.selected-customer>div{display:flex;flex-direction:column;min-width:0}.selected-customer strong{font-size:12px;color:#24466f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-customer small{font-size:10px;color:#73859a;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-customer .link-btn{color:#1769e0;font-weight:800}.customer-result{width:100%;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;padding:11px 12px;border-radius:9px;cursor:pointer;color:#26374d}.customer-result:hover,.customer-result.active{background:#edf5ff}.customer-main{display:flex;flex-direction:column;min-width:0}.customer-main strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-main small{font-size:10px;color:#7c899a;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-meta{display:flex;flex-direction:column;text-align:right;min-width:100px}.customer-meta b{font-size:11px;color:#174f94}.customer-meta small{font-size:9px;color:#7d8998;margin-top:3px}.customer-api-card{margin-top:14px;border:1px solid #cfe0f6;background:linear-gradient(180deg,#f8fbff 0%,#fff 100%);border-radius:14px;padding:16px;box-shadow:0 8px 24px rgba(27,76,134,.06)}.customer-api-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.customer-api-head>div{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:5px 10px}.customer-api-head strong{font-size:15px;color:#14233b}.customer-api-head small{grid-column:2;color:#66758d}.customer-api-badge{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:30px;padding:0 10px;border-radius:999px;background:#e8f2ff;color:#1767ca;font-weight:800;font-size:11px}.customer-api-close{border:0;background:#edf2f7;color:#526174;width:32px;height:32px;border-radius:9px;font-size:20px;cursor:pointer}.customer-api-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.customer-api-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#34435b}.customer-api-grid .span-2-cols{grid-column:span 2}.customer-api-grid .span-3-cols{grid-column:span 3}.customer-api-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding-top:14px;border-top:1px solid #e4edf7;color:#66758d;font-size:12px}.sale-client-field{grid-column:1/-1!important;padding-bottom:2px}.sale-main-card{overflow:visible}.sale-data-grid{overflow:visible}.sale-data-grid>.field:not(.sale-client-field){align-self:end}
@media(max-width:900px){.customer-search-toolbar{grid-template-columns:1fr}.customer-api-button{width:100%}.customer-api-grid{grid-template-columns:1fr}.customer-api-grid .span-2-cols,.customer-api-grid .span-3-cols{grid-column:auto}.customer-api-actions{align-items:stretch;flex-direction:column}.customer-meta{display:none}}

/* V16 · Punto de venta compacto */
.sales-page-head{margin-bottom:10px}.sales-page-head h1{margin-bottom:2px}.sale-main-card .sale-section-title{padding:10px 14px}.sale-main-card .sale-step{width:30px;height:30px}.sale-main-card .sale-section-title>div{grid-template-columns:30px auto;column-gap:8px}.sale-main-card .card-body{padding:11px 14px}.sale-data-grid{display:block}.sale-client-field{margin:0!important;padding:0!important}.customer-search-toolbar{grid-template-columns:120px minmax(0,1fr) auto;gap:8px}.customer-doc-type,.customer-search-toolbar .input,.customer-api-button{height:36px!important;min-height:36px}.customer-api-button{min-width:145px;padding:0 12px}.customer-search-help{font-size:9px;margin-top:4px}.selected-customer{margin-top:5px;padding:7px 10px;border-radius:8px}.selected-customer strong{font-size:11px}.selected-customer small{font-size:9px}.sale-operation-row{display:grid;grid-template-columns:1.45fr 1fr .85fr 1fr 1.15fr;gap:8px;margin-top:9px;align-items:end}.sale-operation-row .field{margin:0}.sale-operation-row label{font-size:9px;margin-bottom:4px}.sale-operation-row .select{height:36px;min-height:36px;padding-top:6px;padding-bottom:6px;font-size:11px}.sale-more-options{margin-top:7px;border-top:1px dashed #e0e6ee;padding-top:5px}.sale-more-options summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:7px;color:#34679f;font-size:10px;font-weight:800}.sale-more-options summary::-webkit-details-marker{display:none}.sale-more-options summary:before{content:"+";display:grid;place-items:center;width:18px;height:18px;border-radius:5px;background:#edf4fd;color:#1769e0}.sale-more-options[open] summary:before{content:"−"}.sale-more-options summary span{font-weight:500;color:#8a96a5}.sale-more-options .sale-observation{margin-top:7px;max-width:780px}.sale-more-options .input{height:36px}.sale-detail-card{margin-top:0}.sale-detail-card .sale-section-title{padding:11px 14px}.sale-detail-card .card-body{padding:11px 14px}.product-search-box{height:42px}.selected-product-tip{margin-top:5px}.sale-items-wrap{min-height:330px}
@media(max-width:1250px){.sale-operation-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.customer-search-toolbar{grid-template-columns:105px minmax(0,1fr)}.customer-api-button{grid-column:1/-1}.sale-operation-row{grid-template-columns:1fr 1fr}.sale-items-wrap{min-height:260px}}
@media(max-width:560px){.sale-operation-row{grid-template-columns:1fr}.customer-search-toolbar{grid-template-columns:1fr}.customer-doc-type,.customer-api-button{width:100%}.sale-main-card .sale-section-title small{display:none}}

/* V17 · Inventario inicial y entradas de stock */
.inventory-page-head{margin-bottom:14px}.inventory-eyebrow{font-size:10px;font-weight:900;letter-spacing:1.35px;color:#1769e0;margin-bottom:5px}.inventory-head-actions{display:flex;gap:8px}.inventory-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.inventory-stat{background:#fff;border:1px solid var(--border);border-radius:12px;padding:14px 16px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-between}.inventory-stat span{font-size:11px;color:#728095}.inventory-stat strong{font-size:20px;color:#18304f}.inventory-stat.danger strong{color:#c93647}.inventory-stat.warning strong{color:#9d6500}.inventory-action-strip{background:linear-gradient(90deg,#eef6ff,#fff);border:1px solid #d5e5f7;border-radius:12px;padding:11px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.inventory-action-info{display:flex;align-items:center;gap:11px}.inventory-action-icon{width:36px;height:36px;border-radius:10px;background:#1769e0;color:#fff;display:grid;place-items:center;font-weight:900;font-size:18px}.inventory-action-info>div:last-child{display:flex;flex-direction:column;gap:3px}.inventory-action-info strong{font-size:12px;color:#18304f}.inventory-action-info small{font-size:10px;color:#68778a}.inventory-action-buttons{display:flex;gap:8px;white-space:nowrap}.inventory-stock-card .card-head,.inventory-kardex-card .card-head{align-items:center}.inventory-filter{max-width:320px;height:34px;font-size:11px}.inventory-kardex-card{margin-top:14px}.inventory-kardex-card .card-head small{font-weight:500;color:#8591a0}.inventory-modal-box{max-width:760px}.inventory-modal-box .modal-head>div{display:flex;flex-direction:column;gap:3px}.inventory-modal-box .modal-head small{font-size:10px;color:#7a8798;font-weight:500}.inventory-mode-banner{border-radius:10px;padding:11px 13px;margin-bottom:13px;display:flex;flex-direction:column;gap:3px}.inventory-mode-banner strong{font-size:12px}.inventory-mode-banner span{font-size:10px}.inventory-mode-banner.initial{background:#edf4ff;border:1px solid #d2e2fb;color:#285a97}.inventory-mode-banner.entry{background:#eaf8f1;border:1px solid #cbeedc;color:#14714e}.inventory-product-field{margin-bottom:12px}.inventory-product-field select{margin-top:7px;min-height:145px;padding:6px}.inventory-product-field select option{padding:7px 8px}.inventory-selected-product{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:13px}.inventory-selected-product>div{background:#f7f9fc;border:1px solid #e1e7ef;border-radius:10px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center}.inventory-selected-product span{font-size:10px;color:#768397}.inventory-selected-product strong{font-size:17px;color:#173d70}.inventory-movement-grid .field{margin:0}.inventory-movement-grid label small{font-weight:500;color:#8a96a4}.inventory-audit-note{margin-top:12px;padding:9px 11px;background:#f7f9fc;border-radius:8px;color:#718096;font-size:10px}.inventory-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
@media(max-width:900px){.inventory-stats{grid-template-columns:1fr 1fr}.inventory-action-strip{align-items:flex-start;flex-direction:column}.inventory-head-actions{display:none}}
@media(max-width:560px){.inventory-stats{grid-template-columns:1fr}.inventory-action-buttons{width:100%}.inventory-action-buttons .btn{flex:1;justify-content:center}.inventory-selected-product{grid-template-columns:1fr}.inventory-filter{max-width:180px}}

/* V18 - acciones profesionales de comprobantes */
.cpe-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.cpe-actions form{margin:0}.btn-file{background:#eef7ff;border-color:#cfe6ff;color:#155a8a}.btn-outline-primary{background:#fff;border:1px solid #2f6fed;color:#1f5dcc}.btn-outline-primary:hover{background:#eef4ff}.table td:last-child{min-width:390px}


/* V20 - Legibilidad profesional en ventas */
.sale-page,
.venta-page,
.pos-page,
.checkout-page,
.sale-summary,
.resumen-venta {
    font-size: 15px;
}
.sale-page label,
.venta-page label,
.pos-page label,
.checkout-page label,
.sale-summary label,
.resumen-venta label {
    font-size: 13px;
    font-weight: 600;
}
.sale-page input,
.sale-page select,
.sale-page textarea,
.venta-page input,
.venta-page select,
.venta-page textarea,
.pos-page input,
.pos-page select,
.pos-page textarea {
    font-size: 14px;
}
.sale-summary,
.resumen-venta {
    line-height: 1.45;
}
.sale-summary .total,
.sale-summary .grand-total,
.resumen-venta .total,
.resumen-venta .grand-total {
    font-weight: 700;
}


/* V31 - Acciones compactas y profesionales en Comprobantes */
.cpe-actions-cell{min-width:0!important;width:1%;white-space:nowrap}
.cpe-actions-compact{display:flex;align-items:center;justify-content:flex-end;gap:6px;position:relative}
.cpe-actions-compact form{margin:0}
.btn-xs{padding:6px 9px;font-size:11px;border-radius:7px;line-height:1.15}
.cpe-main-action{box-shadow:none}
.cpe-whatsapp{background:#f1fff6;border:1px solid #9be7b8!important;color:#087a3e!important}
.cpe-whatsapp:hover{background:#e2fbed}
.cpe-more{position:relative;display:inline-flex}
.cpe-more-toggle{min-width:60px;justify-content:center;background:#fff}
.cpe-chevron{font-size:10px;color:#718096;transition:transform .15s ease}
.cpe-more.open .cpe-chevron{transform:rotate(180deg)}
.cpe-more-menu{display:none;position:absolute;right:0;top:calc(100% + 7px);width:218px;background:#fff;border:1px solid #dce4ee;border-radius:11px;box-shadow:0 18px 46px rgba(22,43,74,.18);padding:6px;z-index:150;text-align:left;white-space:normal}
.cpe-more.open .cpe-more-menu{display:block}
.cpe-menu-label{font-size:9px;font-weight:900;letter-spacing:.09em;color:#91a0b2;padding:8px 10px 4px}
.cpe-menu-item{width:100%;min-height:34px;display:flex;align-items:center;gap:9px;padding:8px 10px;border:0;border-radius:7px;background:#fff;color:#26384f;text-align:left;font:inherit;cursor:pointer}
.cpe-menu-item span{width:17px;text-align:center;color:#5f7898;font-size:14px}
.cpe-menu-item b{font-size:11px;font-weight:700}
.cpe-menu-item:hover{background:#f2f7fd;color:#145fbd}
.cpe-menu-form{display:block!important;width:100%}
.cpe-menu-button{appearance:none}
#tbCpe th:last-child,#tbCpe td:last-child{text-align:right}
#tbCpe td:last-child{min-width:145px!important}
#tbCpe td{padding-top:9px;padding-bottom:9px}
@media(max-width:1100px){
 .cpe-main-action{padding-left:7px;padding-right:7px}
 .cpe-actions-compact{gap:4px}
}
@media(max-width:760px){
 .cpe-actions-cell{min-width:145px!important}
 .cpe-more-menu{position:fixed;right:16px;left:auto;top:auto;width:min(260px,calc(100vw - 32px))}
}


/* V33 - Corrección visual menú Acciones / Más en Comprobantes */
#tbCpe .cpe-actions-cell{
    width:1%;
    min-width:190px!important;
    white-space:nowrap;
    vertical-align:middle;
    overflow:visible!important;
}
#tbCpe .cpe-actions-compact{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    position:relative!important;
}
#tbCpe .cpe-actions-compact > form{
    display:inline-flex!important;
    width:auto!important;
    margin:0!important;
}
#tbCpe .cpe-more{
    position:relative!important;
    display:inline-flex!important;
}
#tbCpe .cpe-more-menu{
    display:none!important;
    position:absolute!important;
    right:0!important;
    top:calc(100% + 7px)!important;
    width:230px!important;
    min-width:230px!important;
    padding:7px!important;
    background:#fff!important;
    border:1px solid #dce4ee!important;
    border-radius:11px!important;
    box-shadow:0 18px 46px rgba(22,43,74,.20)!important;
    z-index:9999!important;
    text-align:left!important;
    white-space:normal!important;
}
#tbCpe .cpe-more.open .cpe-more-menu{
    display:block!important;
}
#tbCpe .cpe-menu-label{
    display:block!important;
    margin:0!important;
    padding:8px 10px 4px!important;
    font-size:9px!important;
    font-weight:900!important;
    letter-spacing:.09em!important;
    color:#91a0b2!important;
}
#tbCpe .cpe-menu-item{
    box-sizing:border-box!important;
    width:100%!important;
    min-height:36px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:9px!important;
    padding:8px 10px!important;
    margin:0!important;
    border:0!important;
    border-radius:7px!important;
    background:#fff!important;
    color:#26384f!important;
    text-align:left!important;
    text-decoration:none!important;
    cursor:pointer!important;
}
#tbCpe .cpe-menu-item:hover{
    background:#f2f7fd!important;
    color:#145fbd!important;
}
#tbCpe .cpe-menu-item span{
    flex:0 0 18px!important;
    width:18px!important;
    text-align:center!important;
}
#tbCpe .cpe-menu-item b{
    font-size:11px!important;
    font-weight:700!important;
    white-space:normal!important;
}
#tbCpe .cpe-menu-form{
    display:block!important;
    width:100%!important;
    margin:0!important;
}
#tbCpe .cpe-menu-button{
    appearance:none!important;
    font-family:inherit!important;
}
.table-wrap{
    overflow-x:auto;
    overflow-y:visible!important;
}


/* V34 - Menú Más fuera del overflow de la tabla */
#tbCpe .cpe-more-menu{
    position:fixed!important;
    right:auto!important;
    top:auto!important;
    z-index:100000!important;
    max-height:min(440px,calc(100vh - 24px))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
}
#tbCpe .cpe-more.open .cpe-more-menu{display:block!important}
#tbCpe .cpe-more-menu.cpe-open-up{
    transform-origin:bottom right;
}


/* V35 - Acciones compactas también en listado de Ventas */
#tbVentas .cpe-actions-cell{width:1%;min-width:145px!important;white-space:nowrap;vertical-align:middle;overflow:visible!important}
#tbVentas .cpe-actions-compact{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:6px!important;position:relative!important}
#tbVentas .cpe-whatsapp{background:#f1fff6;border:1px solid #9be7b8!important;color:#087a3e!important}
#tbVentas .cpe-more{position:relative!important;display:inline-flex!important}
#tbVentas .cpe-more-menu{display:none!important;position:fixed!important;right:auto!important;top:auto!important;width:230px!important;min-width:230px!important;max-height:min(440px,calc(100vh - 24px))!important;overflow-y:auto!important;padding:7px!important;background:#fff!important;border:1px solid #dce4ee!important;border-radius:11px!important;box-shadow:0 18px 46px rgba(22,43,74,.20)!important;z-index:100000!important;text-align:left!important;white-space:normal!important}
#tbVentas .cpe-more.open .cpe-more-menu{display:block!important}
#tbVentas .cpe-menu-label{display:block!important;padding:8px 10px 4px!important;font-size:9px!important;font-weight:900!important;letter-spacing:.09em!important;color:#91a0b2!important}
#tbVentas .cpe-menu-item{box-sizing:border-box!important;width:100%!important;min-height:36px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;padding:8px 10px!important;margin:0!important;border:0!important;border-radius:7px!important;background:#fff!important;color:#26384f!important;text-align:left!important;text-decoration:none!important;cursor:pointer!important}
#tbVentas .cpe-menu-item:hover{background:#f2f7fd!important;color:#145fbd!important}
#tbVentas .cpe-menu-item span{flex:0 0 18px!important;width:18px!important;text-align:center!important}
#tbVentas .cpe-menu-item b{font-size:11px!important;font-weight:700!important;white-space:normal!important}
#tbVentas th:last-child,#tbVentas td:last-child{text-align:right}
#tbVentas td{padding-top:9px;padding-bottom:9px}


/* V36 - Paginación y exportación en Comprobantes */
.cpe-list-head{gap:14px;flex-wrap:wrap}
.cpe-list-head>div:first-child{display:flex;flex-direction:column;gap:2px}
.cpe-list-sub{font-size:10px;color:#8391a5;font-weight:500}
.cpe-list-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-left:auto}
.cpe-list-tools .search{width:270px}
.cpe-export-btn{min-width:66px;justify-content:center;font-weight:700}
.cpe-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;padding:12px 16px;border-top:1px solid #e4eaf2;background:#fff}
.cpe-page-size{display:flex;align-items:center;gap:7px;font-size:11px;color:#627187}
.cpe-page-size .input{width:68px;min-height:31px;padding:4px 7px}
.cpe-page-info{text-align:center;font-size:11px;color:#627187}
.cpe-page-buttons{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.cpe-page-numbers{display:flex;gap:4px}
.cpe-page-numbers .btn{min-width:31px;justify-content:center;padding-left:7px;padding-right:7px}
.cpe-pagination button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:780px){
 .cpe-list-tools{width:100%;justify-content:flex-start;flex-wrap:wrap}
 .cpe-list-tools .search{width:100%;order:-1}
 .cpe-pagination{grid-template-columns:1fr;justify-items:center}
 .cpe-page-buttons{justify-content:center;flex-wrap:wrap}
}


/* V37 - Administración profesional de permisos por usuario */
.user-access-hero{display:flex;align-items:center;gap:14px;padding:18px 20px;margin-bottom:14px;background:linear-gradient(135deg,#123b70,#1f5a9c);color:#fff;border-radius:14px}
.user-access-avatar{width:48px;height:48px;border-radius:13px;background:rgba(255,255,255,.14);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:900;flex:0 0 auto}
.user-access-info{min-width:0;flex:1}
.user-access-name{font-size:18px;font-weight:800}
.user-access-meta{font-size:11px;opacity:.88;margin-top:3px}
.user-access-count{text-align:right;padding-left:18px;border-left:1px solid rgba(255,255,255,.2)}
.user-access-count strong{display:block;font-size:22px}
.user-access-count span{display:block;font-size:10px;opacity:.8}
.perm-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;margin-bottom:12px;background:#fff;border:1px solid #dde6f0;border-radius:12px}
.perm-toolbar>div:first-child{display:flex;flex-direction:column;gap:3px}
.perm-toolbar small,.permission-module-head small,.permission-savebar small{font-size:10px;color:#718198}
.perm-toolbar-actions{display:flex;gap:7px}
.permission-modules{display:grid;gap:12px}
.permission-module{background:#fff;border:1px solid #dde6f0;border-radius:13px;overflow:hidden}
.permission-module-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;background:#f7f9fc;border-bottom:1px solid #e4eaf2}
.permission-module-head>div{display:flex;flex-direction:column;gap:2px}
.permission-module-head strong{font-size:12px;color:#17304f}
.perm-module-toggle{display:flex;align-items:center;gap:7px;font-size:10px;color:#53657b;cursor:pointer}
.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:12px}
.permission-card{position:relative;display:flex;gap:10px;min-height:82px;padding:12px;border:1px solid #dfe6ef;border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
.permission-card:hover{border-color:#a9c8ef;background:#fbfdff}
.permission-card.is-active{border-color:#7db1ef;background:#f3f8ff;box-shadow:0 0 0 1px rgba(42,119,212,.05)}
.permission-checkbox{position:absolute;opacity:0;pointer-events:none}
.permission-check-ui{width:22px;height:22px;border:1px solid #bdc9d8;border-radius:6px;background:#fff;display:flex;align-items:center;justify-content:center;color:transparent;font-weight:900;flex:0 0 auto;margin-top:1px}
.permission-card.is-active .permission-check-ui{background:#1f6fde;border-color:#1f6fde;color:#fff}
.permission-card-body{display:flex;flex-direction:column;min-width:0}
.permission-card-body>strong{font-size:11px;color:#1f3046;margin-bottom:3px}
.permission-card-body>small{font-size:10px;line-height:1.35;color:#687a91}
.permission-origin{font-size:9px;color:#8b99aa;margin-top:auto;padding-top:7px}
.permission-card.is-active .permission-origin{color:#3c6fae}
.permission-savebar{position:sticky;bottom:10px;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:14px;padding:13px 15px;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border:1px solid #dce5ef;border-radius:12px;box-shadow:0 10px 28px rgba(28,51,82,.12)}
.permission-savebar>div{display:flex;flex-direction:column;gap:2px}
.permission-savebar strong{font-size:11px}
@media(max-width:1000px){.permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){
 .permission-grid{grid-template-columns:1fr}
 .perm-toolbar,.permission-module-head,.permission-savebar,.user-access-hero{align-items:flex-start;flex-direction:column}
 .user-access-count{text-align:left;padding-left:0;border-left:0}
 .permission-savebar .btn{width:100%}
}


/* V38 - Notas de crédito y débito */
.note-new-actions{display:flex;gap:8px;align-items:center}.note-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}.note-actions form{margin:0}.note-select-source .card-body{padding:18px}.note-select-source label,.note-reason-grid label{display:block;font-size:11px;font-weight:700;margin-bottom:6px;color:#253950}.note-source-strip{display:grid;grid-template-columns:1.2fr 1.8fr .8fr .8fr;gap:10px;margin-bottom:12px;padding:15px 17px;background:linear-gradient(135deg,#123b70,#1f5a9c);color:#fff;border-radius:13px}.note-source-strip div{display:flex;flex-direction:column;gap:2px}.note-source-strip small{font-size:9px;letter-spacing:.07em;opacity:.75}.note-source-strip strong{font-size:12px}.note-source-strip span{font-size:10px;opacity:.82}.note-reason-grid{display:grid;grid-template-columns:1fr 2fr;gap:12px;padding:16px}.note-detail-table .note-qty{width:110px}.note-detail-table .note-price{width:125px}.note-detail-table input[type=checkbox]{width:17px;height:17px}.note-submit{position:sticky;bottom:10px;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:14px;padding:14px 16px;background:rgba(255,255,255,.97);border:1px solid #dce5ef;border-radius:12px;box-shadow:0 10px 28px rgba(28,51,82,.12)}.note-submit>div{display:flex;flex-direction:column}.note-submit small{font-size:9px;color:#728299;font-weight:800;letter-spacing:.06em}.note-submit strong{font-size:22px;color:#154f9f}.note-submit span{font-size:10px;color:#7c8999}@media(max-width:800px){.note-source-strip,.note-reason-grid{grid-template-columns:1fr 1fr}.note-new-actions{flex-wrap:wrap}}@media(max-width:560px){.note-source-strip,.note-reason-grid{grid-template-columns:1fr}.note-submit{align-items:stretch;flex-direction:column}.note-submit .btn{width:100%}}


/* V39 - Paginación y detalle dinámico en listado de Ventas */
.ventas-list-head{gap:14px;flex-wrap:wrap}
.ventas-list-head>div:first-child{display:flex;flex-direction:column;gap:2px}
.ventas-list-sub{font-size:10px;color:#8391a5;font-weight:500}
.ventas-list-tools{display:flex;align-items:center;justify-content:flex-end;margin-left:auto}
.ventas-list-tools .search{width:300px}
.ventas-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;padding:12px 16px;border-top:1px solid #e4eaf2;background:#fff}
.ventas-page-size{display:flex;align-items:center;gap:7px;font-size:11px;color:#627187}
.ventas-page-size .input{width:68px;min-height:31px;padding:4px 7px}
.ventas-page-info{text-align:center;font-size:11px;color:#627187}
.ventas-page-buttons{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.ventas-page-numbers{display:flex;gap:4px}
.ventas-page-numbers .btn{min-width:31px;justify-content:center;padding-left:7px;padding-right:7px}
.ventas-pagination button:disabled{opacity:.45;cursor:not-allowed}
#tbVentas .venta-row{cursor:pointer;transition:background .12s ease,box-shadow .12s ease}
#tbVentas .venta-row:hover{background:#f7faff}
#tbVentas .venta-row.is-selected{background:#eef6ff;box-shadow:inset 3px 0 0 #1f6fde}
.venta-detail-card{margin-top:14px}
.venta-detail-head{display:flex;align-items:center;justify-content:space-between}
.venta-detail-head>div:first-child{display:flex;flex-direction:column;gap:2px}
.venta-detail-head small{font-size:10px;color:#718198}
.venta-detail-content{padding:0}
.venta-detail-summary{display:grid;grid-template-columns:1fr 2fr 1fr 1fr;gap:1px;background:#e3eaf3;border-bottom:1px solid #e3eaf3}
.venta-detail-summary>div{background:#f8fafc;padding:11px 14px;display:flex;flex-direction:column;gap:2px}
.venta-detail-summary small,.venta-detail-observation small{font-size:9px;color:#8291a5;text-transform:uppercase;letter-spacing:.05em;font-weight:700}
.venta-detail-summary strong{font-size:11px;color:#20344e}
.venta-detail-summary span{font-size:9px;color:#6f8097}
.venta-detail-table-wrap{max-height:320px;overflow:auto}
.venta-detail-table th{position:sticky;top:0;z-index:2;background:#f5f8fc}
.venta-detail-noitems{text-align:center!important;color:#7b899c;padding:25px!important}
.venta-detail-footer{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:14px 16px;border-top:1px solid #e4eaf2;background:#fbfcfe}
.venta-detail-observation{display:flex;flex-direction:column;gap:4px;max-width:60%;color:#627187;font-size:10px}
.venta-detail-totals{width:260px;display:grid;gap:6px}
.venta-detail-totals>div{display:flex;justify-content:space-between;gap:20px;font-size:11px;color:#586a80}
.venta-detail-total{border-top:1px solid #d8e2ee;padding-top:8px;margin-top:2px;color:#183a68!important}
.venta-detail-total strong{font-size:18px;color:#165fc4}
@media(max-width:900px){
 .ventas-pagination{grid-template-columns:1fr;justify-items:center}
 .ventas-page-buttons{justify-content:center;flex-wrap:wrap}
 .venta-detail-summary{grid-template-columns:1fr 1fr}
}
@media(max-width:650px){
 .ventas-list-tools,.ventas-list-tools .search{width:100%}
 .venta-detail-summary{grid-template-columns:1fr}
 .venta-detail-footer{align-items:stretch;flex-direction:column}
 .venta-detail-observation{max-width:100%}
 .venta-detail-totals{width:100%}
}

/* V40 - Detalle de ventas más compacto */
.venta-detail-card{margin-top:10px}
.venta-detail-head{min-height:auto;padding-top:10px;padding-bottom:10px}
.venta-detail-summary>div{padding-top:9px;padding-bottom:9px}


/* V41 - Seguimiento rápido de movimientos por producto */
#tbProd .product-row{cursor:pointer;transition:background .12s ease,box-shadow .12s ease}
#tbProd .product-row:hover{background:#f7faff}
#tbProd .product-row.is-selected{background:#eef6ff;box-shadow:inset 3px 0 0 #1f6fde}
.card-head>div:first-child{min-width:0}
.product-list-help{display:block;margin-top:2px;font-size:9px;color:#8391a5;font-weight:500}
.product-movement-card{margin-top:10px}
.product-movement-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;padding-bottom:10px}
.product-movement-head>div:first-child{display:flex;flex-direction:column;gap:2px}
.product-movement-head small{font-size:9px;color:#718198;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:850px}
.product-movement-stock{flex:0 0 auto}
.product-movement-summary{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:1px;background:#e3eaf3;border-bottom:1px solid #e3eaf3}
.product-movement-summary>div{background:#f8fafc;padding:9px 13px;display:flex;flex-direction:column;gap:2px}
.product-movement-summary small{font-size:8px;color:#8291a5;text-transform:uppercase;letter-spacing:.05em;font-weight:800}
.product-movement-summary strong{font-size:11px;color:#20344e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-movement-summary span{font-size:9px;color:#73849a}
.product-movement-table-wrap{max-height:340px;overflow:auto}
.product-movement-table th{position:sticky;top:0;z-index:2;background:#f5f8fc}
.product-movement-table td,.product-movement-table th{padding-top:8px;padding-bottom:8px}
.product-movement-loading,.product-movement-empty{text-align:center!important;color:#7b899c;padding:22px!important}
.pm-entry{color:#087a3e;font-weight:700}
.pm-exit{color:#bf2633;font-weight:700}
@media(max-width:900px){
 .product-movement-summary{grid-template-columns:1fr 1fr}
 .product-movement-table-wrap{max-height:380px}
}
@media(max-width:600px){
 .product-movement-summary{grid-template-columns:1fr}
 .product-movement-head{align-items:flex-start;flex-direction:column}
}


/* V42 - Paginación en Productos y Movimientos */
.product-pagination,.movement-pagination{
 display:grid;
 grid-template-columns:1fr auto 1fr;
 align-items:center;
 gap:14px;
 padding:11px 14px;
 border-top:1px solid #e4eaf2;
 background:#fff;
}
.product-page-size,.movement-page-size{
 display:flex;
 align-items:center;
 gap:7px;
 font-size:10px;
 color:#627187;
}
.product-page-size .input,.movement-page-size .input{
 width:68px;
 min-height:30px;
 padding:4px 7px;
}
.product-page-info,.movement-page-info{
 text-align:center;
 font-size:10px;
 color:#627187;
}
.product-page-buttons,.movement-page-buttons{
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:5px;
}
.product-page-numbers,.movement-page-numbers{display:flex;gap:4px}
.product-page-numbers .btn,.movement-page-numbers .btn{
 min-width:30px;
 justify-content:center;
 padding-left:7px;
 padding-right:7px;
}
.product-pagination button:disabled,.movement-pagination button:disabled{
 opacity:.45;
 cursor:not-allowed;
}
@media(max-width:760px){
 .product-pagination,.movement-pagination{
  grid-template-columns:1fr;
  justify-items:center;
 }
 .product-page-buttons,.movement-page-buttons{
  justify-content:center;
  flex-wrap:wrap;
 }
}


/* V43 - Paginación Inventario y Kardex */
.inventory-pagination{
 display:grid;
 grid-template-columns:1fr auto 1fr;
 align-items:center;
 gap:14px;
 padding:11px 14px;
 border-top:1px solid #e4eaf2;
 background:#fff;
}
.inventory-page-size{
 display:flex;
 align-items:center;
 gap:7px;
 font-size:10px;
 color:#627187;
}
.inventory-page-size .input{
 width:68px;
 min-height:30px;
 padding:4px 7px;
}
.inventory-page-info{
 text-align:center;
 font-size:10px;
 color:#627187;
}
.inventory-page-buttons{
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:5px;
}
.inventory-page-numbers{
 display:flex;
 gap:4px;
}
.inventory-page-numbers .btn{
 min-width:30px;
 justify-content:center;
 padding-left:7px;
 padding-right:7px;
}
.inventory-pagination button:disabled{
 opacity:.45;
 cursor:not-allowed;
}
@media(max-width:760px){
 .inventory-pagination{
  grid-template-columns:1fr;
  justify-items:center;
 }
 .inventory-page-buttons{
  justify-content:center;
  flex-wrap:wrap;
 }
}


/* V44 - Evidencia visual de notas en Comprobantes */
.cpe-notes-cell{min-width:125px}
.cpe-no-notes{color:#a0acbb}
.cpe-note-summary{border:0;background:transparent;padding:3px 0;display:flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap}
.cpe-note-summary:hover .cpe-note-number{text-decoration:underline;color:#145fbd}
.cpe-note-badge{display:inline-flex;align-items:center;justify-content:center;min-width:29px;height:22px;padding:0 7px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:.03em}
.cpe-note-badge.nc{background:#fff0ef;color:#b42318;border:1px solid #ffd1cd}
.cpe-note-badge.nd{background:#eef5ff;color:#165db5;border:1px solid #cfe0f8}
.cpe-note-number{font-size:9px;color:#60738c;font-weight:700}
.cpe-document-situation{display:inline-block;margin-top:5px;padding:3px 6px;border-radius:6px;background:#fff0ef;color:#b42318;border:1px solid #ffd1cd;font-size:8px;font-weight:900}
.cpe-notes-dialog{border:0;border-radius:16px;padding:0;max-width:1050px;width:calc(100% - 32px);box-shadow:0 24px 80px rgba(15,35,65,.28)}
.cpe-notes-dialog::backdrop{background:rgba(15,30,50,.32)}
.cpe-notes-modal{background:#fff}
.cpe-notes-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid #e3eaf3}
.cpe-notes-modal-head small{font-size:9px;font-weight:900;letter-spacing:.08em;color:#6d7f96}
.cpe-notes-modal-head h3{margin:4px 0 2px;font-size:17px}
.cpe-notes-modal-head p{margin:0;color:#65758a;font-size:10px}
.cpe-notes-loading{padding:34px;text-align:center;color:#73849a;font-size:11px}
.cpe-notes-table th,.cpe-notes-table td{vertical-align:top}
.cpe-notes-table td small{font-size:9px;color:#687a91}
.cpe-note-cancelled{margin-top:4px;color:#b42318;font-size:8px;font-weight:800}
.cpe-note-files{display:flex;gap:4px;flex-wrap:wrap}
@media(max-width:900px){
 .cpe-notes-cell{min-width:100px}
 .cpe-note-number{display:none}
}


/* V45 - Categorías y marcas profesional + paginación */
.catalog-page-head{margin-bottom:14px}
.catalog-eyebrow{font-size:9px;font-weight:900;letter-spacing:.12em;color:#1b67c9;margin-bottom:6px}
.catalog-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.catalog-card{overflow:hidden}
.catalog-card-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-bottom:1px solid #e3eaf3;background:#fff}
.catalog-title-wrap{display:flex;align-items:center;gap:11px;min-width:0}
.catalog-icon{width:36px;height:36px;border-radius:10px;background:#edf5ff;color:#1769d2;display:flex;align-items:center;justify-content:center;font-weight:900;flex:0 0 auto}
.catalog-title-wrap h2{margin:0;font-size:14px;color:#172b45}
.catalog-title-wrap p{margin:3px 0 0;font-size:9px;color:#78889d;line-height:1.35}
.catalog-count{flex:0 0 auto;font-size:9px;color:#7a899d;background:#f6f8fb;border:1px solid #e2e8f0;border-radius:999px;padding:6px 9px}
.catalog-count strong{color:#243950}
.catalog-create{padding:13px 16px;background:#fbfcfe;border-bottom:1px solid #e5ebf3}
.catalog-create-form{display:grid;grid-template-columns:1fr auto;align-items:end;gap:9px}
.catalog-new-field{display:flex;flex-direction:column;gap:5px}
.catalog-new-field label{font-size:9px;font-weight:800;color:#61738b}
.catalog-create-form .btn{min-height:37px}
.catalog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;border-bottom:1px solid #e5ebf3}
.catalog-search-wrap{position:relative;max-width:320px;width:100%}
.catalog-search-wrap .input{padding-left:31px;width:100%}
.catalog-search-icon{position:absolute;left:11px;top:50%;transform:translateY(-50%);font-size:15px;color:#7890aa;pointer-events:none}
.catalog-toolbar-meta{font-size:9px;color:#8090a4;white-space:nowrap}
.catalog-toolbar-meta .catalog-filter-count{font-weight:800;color:#304963}
.catalog-table-wrap{min-height:110px}
.catalog-table thead th{font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:#6f8299;background:#f8fafc}
.catalog-table td{padding-top:10px;padding-bottom:10px}
.catalog-table td strong{font-size:11px;color:#20364f}
.catalog-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid #e3eaf3;background:#fff}
.catalog-page-size{display:flex;align-items:center;gap:6px;font-size:9px;color:#6d7e93}
.catalog-page-size .input{width:64px;min-height:30px;padding:4px 6px}
.catalog-page-info{text-align:center;font-size:9px;color:#6d7e93}
.catalog-page-buttons{display:flex;justify-content:flex-end;align-items:center;gap:5px}
.catalog-page-numbers{display:flex;gap:4px}
.catalog-page-numbers .btn{min-width:30px;justify-content:center;padding-left:7px;padding-right:7px}
.catalog-pagination button:disabled{opacity:.4;cursor:not-allowed}
.catalog-edit-dialog{border:0;border-radius:16px;padding:0;width:min(470px,calc(100% - 28px));box-shadow:0 24px 80px rgba(18,39,67,.25)}
.catalog-edit-dialog::backdrop{background:rgba(15,30,50,.30)}
.catalog-edit-form{background:#fff}
.catalog-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid #e4eaf2}
.catalog-edit-head small{font-size:9px;font-weight:900;letter-spacing:.08em;color:#71839a}
.catalog-edit-head h3{margin:4px 0 0;font-size:16px}
.catalog-edit-body{padding:18px 20px}
.catalog-edit-body label{display:block;margin-bottom:6px;font-size:10px;font-weight:800;color:#455b74}
.catalog-edit-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid #e4eaf2;background:#fafbfd}
@media(max-width:1000px){.catalog-grid{grid-template-columns:1fr}}
@media(max-width:680px){
 .catalog-card-head,.catalog-toolbar{align-items:flex-start;flex-direction:column}
 .catalog-count{align-self:flex-start}
 .catalog-create-form{grid-template-columns:1fr}
 .catalog-create-form .btn{width:100%}
 .catalog-pagination{grid-template-columns:1fr;justify-items:center}
 .catalog-page-buttons{justify-content:center;flex-wrap:wrap}
 .catalog-search-wrap{max-width:none}
}

/* V46 - Paginación estándar en todos los listados administrativos */
.standard-pagination{
 display:grid;
 grid-template-columns:1fr auto 1fr;
 align-items:center;
 gap:14px;
 padding:11px 14px;
 border-top:1px solid #e4eaf2;
 background:#fff;
 border-radius:0 0 12px 12px;
}
.standard-page-size{
 display:flex;
 align-items:center;
 gap:7px;
 font-size:10px;
 color:#627187;
}
.standard-page-size .input{
 width:68px;
 min-height:30px;
 padding:4px 7px;
}
.standard-page-info{
 text-align:center;
 font-size:10px;
 color:#627187;
}
.standard-page-buttons{
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:5px;
}
.standard-page-numbers{
 display:flex;
 gap:4px;
}
.standard-page-numbers .btn{
 min-width:30px;
 justify-content:center;
 padding-left:7px;
 padding-right:7px;
}
.standard-pagination button:disabled{
 opacity:.45;
 cursor:not-allowed;
}
.list-head-tools{
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:8px;
 margin-left:auto;
}
.list-head-tools .search{
 width:280px;
}
.list-head-main{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.list-head-main small{
 font-size:9px;
 color:#8391a5;
 font-weight:500;
}
@media(max-width:760px){
 .standard-pagination{
  grid-template-columns:1fr;
  justify-items:center;
 }
 .standard-page-buttons{
  justify-content:center;
  flex-wrap:wrap;
 }
 .list-head-tools{
  width:100%;
 }
 .list-head-tools .search{
  width:100%;
 }
}

/* V47 - Notas flexibles por motivo + inventario */
.note-page-head .note-eyebrow{display:block;font-size:9px;font-weight:900;letter-spacing:.12em;color:#1f6fde;margin-bottom:4px}
.note-reason-card{overflow:visible}
.note-reason-explainer{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin:0 16px 16px;padding:12px 14px;border:1px solid #d9e7f8;border-radius:11px;background:#f6faff}
.note-reason-icon{width:36px;height:36px;border-radius:10px;background:#e4f0ff;color:#1d66c5;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:900}
.note-reason-explainer strong{font-size:11px;color:#1e3552}
.note-reason-explainer p{margin:3px 0 0;font-size:10px;color:#687b93;line-height:1.4}
.note-mode-badge{font-size:8px;font-weight:900;letter-spacing:.06em;border-radius:999px;padding:5px 8px;background:#e8f2ff;color:#165fb8;white-space:nowrap}
.note-global-card .card-body{padding:16px}
.note-global-amount{max-width:360px}
.money-input{display:flex;align-items:center;border:1px solid #d6e0ec;border-radius:9px;overflow:hidden;background:#fff}
.money-input>span{padding:0 12px;font-weight:800;color:#4b607a}
.money-input .input{border:0;border-left:1px solid #e1e7ef;border-radius:0}
.note-inventory-card{border-color:#ccebd9}
.note-inventory-card .card-head{background:#f6fcf8}
.note-stock-toggle{display:flex;align-items:center;gap:11px;cursor:pointer}
.note-stock-toggle>input{position:absolute;opacity:0}
.note-stock-switch{width:42px;height:23px;border-radius:999px;background:#c9d3df;position:relative;transition:.15s}
.note-stock-switch:after{content:"";position:absolute;width:17px;height:17px;top:3px;left:3px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.16);transition:.15s}
.note-stock-toggle>input:checked+.note-stock-switch{background:#19a861}
.note-stock-toggle>input:checked+.note-stock-switch:after{left:22px}
.note-stock-toggle>span:last-child{display:flex;flex-direction:column;gap:2px}
.note-stock-toggle strong{font-size:11px}
.note-stock-toggle small{font-size:9px;color:#6e7e91}
.note-stock-toggle.is-mandatory{cursor:default}
.note-stock-warning{margin-top:12px;padding:9px 11px;background:#f5f8fb;border-radius:8px;color:#718197;font-size:9px}
.note-detail-tools{display:flex;gap:6px}
.note-item-description{font-size:10px;color:#627187}
.note-detail-table .note-qty,.note-detail-table .note-price,.note-detail-table .note-inventory-qty{min-width:95px}
.note-detail-table input[readonly]{background:#f5f7fa;color:#526277}
.note-stock-state{display:inline-flex;margin-top:4px;border-radius:999px;padding:3px 6px;font-size:8px;font-weight:900}
.note-stock-state.pending{background:#fff5dc;color:#a46a00}
.note-stock-state.applied{background:#e4f7ec;color:#087a3e}
@media(max-width:760px){
 .note-reason-explainer{grid-template-columns:auto 1fr}.note-mode-badge{grid-column:2}
 .note-detail-tools{display:none}
}

/* V48 - Edición segura de Nota de Crédito */
.note-edit-number{background:transparent!important}
.note-edit-number strong{color:inherit!important}
.note-edit-number span{font-size:8px;color:inherit}
.note-edit-btn{border-color:#b8cbea!important;color:#245d9c!important;background:#f6f9fd!important}
.note-edit-btn:hover{background:#eaf2fc!important}

/* V49 - Indicador claro del efecto de la Nota de Crédito en stock */
.note-stock-effect-panel{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:14px;
 margin:0 16px 16px;
 padding:11px 13px;
 border:1px solid #e0e7f0;
 border-radius:10px;
 background:#fbfcfe;
}
.note-stock-effect-panel>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.note-stock-effect-panel small{
 font-size:8px;
 color:#7a8ba0;
 font-weight:900;
 letter-spacing:.08em;
}
.note-stock-effect-panel strong{
 font-size:11px;
 color:#20364f;
}
.note-stock-effect-panel p{
 margin:0;
 font-size:9px;
 color:#6b7d92;
}
.note-stock-effect-badge{
 flex:0 0 auto;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 padding:5px 8px;
 border-radius:999px;
 font-size:8px;
 font-weight:900;
 letter-spacing:.04em;
}
.note-stock-effect-badge.increase{
 background:#e3f7eb;
 color:#087a3e;
 border:1px solid #bce9cd;
}
.note-stock-effect-badge.optional{
 background:#fff5db;
 color:#9a6500;
 border:1px solid #f2d996;
}
.note-stock-effect-badge.no-stock{
 background:#eef2f6;
 color:#65768b;
 border:1px solid #d9e1ea;
}
@media(max-width:650px){
 .note-stock-effect-panel{align-items:flex-start;flex-direction:column}
}

/* V50 - Nota de crédito compacta: máximo espacio para detalle */
.note-page-compact{
 --nc-gap:8px;
}
.note-page-compact .page-header,
.note-page-compact .content-header,
.note-page-compact .module-header{
 margin-bottom:8px !important;
 padding-top:6px !important;
 padding-bottom:6px !important;
}
.note-page-compact h1{
 margin-bottom:2px !important;
 line-height:1.1 !important;
}
.note-page-compact .page-subtitle,
.note-page-compact .subtitle{
 margin-top:2px !important;
 margin-bottom:4px !important;
}
.note-page-compact .note-document-summary,
.note-page-compact .note-reference-card,
.note-page-compact .document-summary{
 min-height:0 !important;
 padding:10px 14px !important;
 margin-bottom:8px !important;
}
.note-page-compact .note-document-summary > *,
.note-page-compact .note-reference-card > *,
.note-page-compact .document-summary > *{
 padding-top:0 !important;
 padding-bottom:0 !important;
}
.note-page-compact .card,
.note-page-compact .panel{
 margin-bottom:8px !important;
}
.note-page-compact .card-header,
.note-page-compact .panel-header{
 padding:9px 14px !important;
 min-height:0 !important;
}
.note-page-compact .card-body,
.note-page-compact .panel-body{
 padding:10px 14px !important;
}
.note-page-compact .note-reason-explainer{
 min-height:0 !important;
 margin-top:8px !important;
 padding:8px 10px !important;
}
.note-page-compact .note-reason-explainer p{
 margin:1px 0 0 !important;
 line-height:1.25 !important;
}
.note-page-compact .note-stock-effect-panel{
 margin:7px 0 0 !important;
 padding:7px 10px !important;
 min-height:0 !important;
}
.note-page-compact .note-stock-effect-panel > div{
 flex-direction:row !important;
 align-items:center !important;
 flex-wrap:wrap !important;
 column-gap:10px !important;
 row-gap:1px !important;
}
.note-page-compact .note-stock-effect-panel small{
 margin:0 !important;
}
.note-page-compact .note-stock-effect-panel p{
 flex-basis:100%;
}
.note-page-compact .inventory-card,
.note-page-compact .inventory-impact-card,
.note-page-compact .note-inventory-card{
 margin-top:7px !important;
 margin-bottom:8px !important;
}
.note-page-compact .inventory-card .card-header,
.note-page-compact .inventory-impact-card .card-header,
.note-page-compact .note-inventory-card .card-header{
 padding:7px 14px !important;
}
.note-page-compact .inventory-card .card-body,
.note-page-compact .inventory-impact-card .card-body,
.note-page-compact .note-inventory-card .card-body{
 padding:8px 14px !important;
}
.note-page-compact .form-group{
 margin-bottom:6px !important;
}
.note-page-compact input,
.note-page-compact select{
 min-height:34px !important;
}
.note-page-compact .note-section-help{
 margin-left:6px;
 font-size:10px;
 font-weight:500;
 color:#6d7e93;
}
.note-page-compact .table-responsive{
 max-height:calc(100vh - 430px);
 min-height:190px;
 overflow:auto;
}
.note-page-compact table{
 margin-bottom:0 !important;
}
.note-page-compact thead th{
 position:sticky;
 top:0;
 z-index:3;
 background:#f6f8fb;
}
.note-page-compact tbody td{
 padding-top:8px !important;
 padding-bottom:8px !important;
}
.note-page-compact .note-total,
.note-page-compact .totals-card,
.note-page-compact .note-footer-actions{
 margin-top:8px !important;
 padding-top:8px !important;
 padding-bottom:8px !important;
}
@media(min-width:1100px){
 .note-page-compact .inventory-card .card-body,
 .note-page-compact .inventory-impact-card .card-body,
 .note-page-compact .note-inventory-card .card-body{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
 }
}
@media(max-width:900px){
 .note-page-compact .table-responsive{
  max-height:none;
  min-height:0;
 }
 .note-page-compact .note-section-help{
  display:block;
  margin-left:0;
  margin-top:2px;
 }
}

/* V51 - Identidad profesional SOFTGESTION COMERCIAL */
.sg-login-body{margin:0;min-height:100vh;background:#eef3f9}
.sg-login-page{min-height:100vh;display:grid;grid-template-columns:minmax(520px,1.12fr) minmax(480px,.88fr);background:#eef3f9}
.sg-login-hero{position:relative;overflow:hidden;background:linear-gradient(145deg,#09213e 0%,#123d6c 55%,#17528f 100%);color:#fff;display:flex;align-items:center;padding:64px 7vw}
.sg-login-hero-content{position:relative;z-index:2;width:min(650px,100%);display:flex;flex-direction:column;min-height:690px}
.sg-login-brand{display:flex;align-items:center;gap:13px}
.sg-login-logo,.sg-access-icon{display:grid;place-items:center;font-weight:900;letter-spacing:-.04em;background:linear-gradient(135deg,#3a8cff,#1769e0);color:#fff;box-shadow:0 10px 25px rgba(23,105,224,.28)}
.sg-login-logo{width:52px;height:52px;border-radius:14px;font-size:17px;border:1px solid rgba(255,255,255,.18)}
.sg-login-brand>div:last-child{display:flex;flex-direction:column;line-height:1}
.sg-login-brand strong{font-size:16px;letter-spacing:.04em}
.sg-login-brand span{font-size:10px;letter-spacing:.22em;color:#9ec8f7;margin-top:6px;font-weight:700}
.sg-login-copy{margin:auto 0}
.sg-login-kicker{font-size:10px;letter-spacing:.2em;font-weight:900;color:#7eb8f5;margin-bottom:15px}
.sg-login-copy h1{font-size:47px;line-height:1.09;letter-spacing:-.035em;margin:0 0 20px;max-width:640px}
.sg-login-copy h1 span{color:#8fc4ff}
.sg-login-copy p{margin:0;max-width:560px;font-size:14px;line-height:1.75;color:#c6d8ed}
.sg-login-features{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}
.sg-login-features>div{display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid rgba(255,255,255,.12);border-radius:8px;background:rgba(255,255,255,.055);font-size:10px;color:#d9e7f5}
.sg-login-features>div span{width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:rgba(80,181,255,.16);color:#7ed1ff;font-size:9px}
.sg-login-version{margin-top:auto;font-size:9px;letter-spacing:.08em;color:#7fa3c9}
.sg-login-decoration{position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.06);pointer-events:none}
.sg-login-decoration-a{width:520px;height:520px;right:-280px;top:-180px}
.sg-login-decoration-b{width:330px;height:330px;right:-170px;bottom:-100px;background:rgba(255,255,255,.025)}
.sg-login-access{display:grid;place-items:center;padding:36px;background:radial-gradient(circle at 70% 15%,#f7faff,#edf3f9 55%,#eaf0f7 100%)}
.sg-login-access-inner{width:min(420px,100%)}
.sg-login-access-brand{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:18px;color:#24364d}
.sg-access-icon{width:38px;height:38px;border-radius:10px;font-size:12px}
.sg-login-access-brand>div:last-child{display:flex;flex-direction:column}
.sg-login-access-brand strong{font-size:11px;letter-spacing:.035em}
.sg-login-access-brand span{font-size:9px;color:#7b8aa0;margin-top:2px}
.sg-login-card{width:100%;background:rgba(255,255,255,.96);border:1px solid #dce4ee;border-radius:17px;padding:27px;box-shadow:0 18px 48px rgba(31,56,89,.12)}
.sg-login-card-head{margin-bottom:21px}
.sg-login-secure{display:inline-flex;padding:4px 7px;border-radius:5px;background:#ecf5ff;color:#1b67bd;font-size:8px;font-weight:900;letter-spacing:.11em;margin-bottom:8px}
.sg-login-card h2{font-size:21px;margin:0 0 6px;color:#152943;letter-spacing:-.02em}
.sg-login-card-head p{margin:0;font-size:11px;color:#7b899b}
.sg-login-field{display:block;margin-bottom:14px}
.sg-login-field>span{display:block;font-size:10px;font-weight:800;color:#43546a;margin-bottom:6px}
.sg-login-input-wrap{position:relative;display:flex;align-items:center}
.sg-login-input-wrap .input{height:43px;padding-left:37px;padding-right:54px;border-color:#d4deea;border-radius:9px;font-size:12px;background:#fcfdff}
.sg-login-input-wrap .input:focus{background:#fff}
.sg-login-field-icon{position:absolute;left:12px;z-index:1;width:15px;text-align:center;font-size:10px;color:#7c8da3;font-weight:900}
.sg-password-toggle{position:absolute;right:7px;border:0;background:#edf4fd;color:#316da9;border-radius:6px;padding:5px 7px;font-size:9px;font-weight:800;cursor:pointer}
.sg-login-submit{width:100%;height:43px;justify-content:center;margin-top:3px;border-radius:9px;box-shadow:0 8px 18px rgba(23,105,224,.18)}
.sg-login-submit span{font-size:14px;margin-left:2px}
.sg-login-help{margin-top:15px;padding:9px 10px;border-radius:8px;background:#f6f8fb;display:flex;align-items:center;gap:7px;color:#758499;font-size:9px}
.sg-login-help-icon{width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:#e4edf8;color:#4f739e;font-weight:900}
.sg-login-footer{text-align:center;margin-top:15px;color:#8b98a9;font-size:9px;letter-spacing:.035em}
.sg-sidebar-brand-copy{min-width:0}
.sg-sidebar-brand-copy strong{font-size:13px!important;letter-spacing:.02em}
.sg-sidebar-brand-copy b{display:block;font-size:9px;letter-spacing:.12em;color:#a8c5e9;margin-top:2px}
.sg-sidebar-brand-copy small{font-size:9px!important;color:#7fa0c8!important;margin-top:3px}
.top-title{display:flex;flex-direction:column;gap:1px}
.top-title strong{font-size:13px;color:#20324b}
.top-title small{font-size:9px;color:#8794a6;font-weight:500}
.footer strong{color:#52657d}
@media(max-width:1050px){
 .sg-login-page{grid-template-columns:1fr 1fr}
 .sg-login-hero{padding:48px}
 .sg-login-copy h1{font-size:39px}
}
@media(max-width:800px){
 .sg-login-page{grid-template-columns:1fr}
 .sg-login-hero{display:none}
 .sg-login-access{min-height:100vh;padding:22px}
 .sg-login-access-brand{margin-bottom:15px}
}

/* V52 - Corrección de registro/edición de Notas */
.note-submit-action{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:260px}
.note-submit-message{font-size:10px;color:#b42318;font-weight:700;text-align:right;max-width:320px}
.note-submit .btn.is-loading{opacity:.72;cursor:wait}
.note-submit .btn:disabled{pointer-events:none}
@media(max-width:650px){
 .note-submit-action{width:100%;min-width:0;flex-direction:column;align-items:stretch}
 .note-submit-message{text-align:left;max-width:none}
 .note-submit-action .btn{width:100%;justify-content:center}
}

/* V53 - Motivo de rechazo SUNAT visible */
.note-rejection-reason{
 margin-top:6px;
 padding:6px 8px;
 max-width:430px;
 border:1px solid #f2c7c7;
 border-radius:7px;
 background:#fff4f4;
 color:#a12626;
 line-height:1.3;
}
.note-rejection-reason strong{
 display:block;
 margin-bottom:2px;
 font-size:8px;
 text-transform:uppercase;
 letter-spacing:.05em;
}
.note-rejection-reason span{
 display:block;
 font-size:9px;
 font-weight:600;
}

/* V55 - Paginación independiente en listados del Dashboard */
.dashboard-lists-grid{margin-top:18px;align-items:start}
.dashboard-list-card{overflow:hidden}
.dashboard-list-head>div{display:flex;flex-direction:column;gap:2px}
.dashboard-list-head small{font-size:9px;color:#8190a4;font-weight:500}
.dashboard-table-wrap{max-height:410px;overflow:auto}
.dashboard-table-wrap thead th{position:sticky;top:0;z-index:2;background:#f6f8fb}
.dashboard-top-table .dashboard-rank{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 5px;border-radius:7px;background:#edf4fd;color:#1f67bd;font-size:9px;font-weight:900}
.dashboard-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:10px 12px;border-top:1px solid #e3e9f1;background:#fff}
.dashboard-page-size{display:flex;align-items:center;gap:6px;font-size:9px;color:#64758a}
.dashboard-page-size .input{width:66px;min-height:29px;padding:3px 6px}
.dashboard-page-info{text-align:center;font-size:9px;color:#64758a}
.dashboard-page-buttons{display:flex;align-items:center;justify-content:flex-end;gap:5px}
.dashboard-page-numbers{display:flex;gap:4px}
.dashboard-page-numbers .btn{min-width:29px;justify-content:center;padding-left:6px;padding-right:6px}
.dashboard-pagination button:disabled{opacity:.42;cursor:not-allowed}
@media(max-width:900px){.dashboard-pagination{grid-template-columns:1fr;justify-items:center}.dashboard-page-buttons{justify-content:center;flex-wrap:wrap}}

/* V56 - Nueva Cotización profesional, alineada al Punto de Venta */
.quote-layout{
 display:grid;
 grid-template-columns:minmax(0,1fr) 310px;
 gap:12px;
 align-items:start;
}
.quote-main-column{display:grid;gap:12px;min-width:0}
.quote-data-card,.quote-detail-card,.quote-summary-card{overflow:visible}
.quote-data-body{padding-top:11px!important;padding-bottom:11px!important}
.quote-data-grid{
 display:grid;
 grid-template-columns:minmax(0,1fr) 170px;
 gap:12px;
 align-items:end;
}
.quote-validity-input{position:relative}
.quote-validity-input .input{padding-right:44px}
.quote-validity-input>span{
 position:absolute;
 right:11px;
 top:50%;
 transform:translateY(-50%);
 font-size:9px;
 color:#7c8ca1;
 font-weight:700;
 pointer-events:none;
}
.quote-more-options{margin-top:8px}
.quote-product-picker{padding-top:10px!important;padding-bottom:9px!important}
.quote-picker-row{
 display:grid;
 grid-template-columns:minmax(0,1fr) auto;
 gap:9px;
 align-items:end;
}
.quote-product-field{margin:0}
.quote-select-wrap{position:relative}
.quote-select-wrap .select{padding-left:36px;height:39px}
.quote-search-icon{
 position:absolute;
 z-index:1;
 left:13px;
 top:50%;
 transform:translateY(-50%);
 color:#6e87a5;
 font-size:14px;
 pointer-events:none;
}
.quote-add-btn{height:39px;white-space:nowrap}
.quote-items-wrap{
 min-height:285px;
 max-height:calc(100vh - 405px);
 overflow:auto;
}
.quote-items-table thead th{
 position:sticky;
 top:0;
 z-index:3;
 background:#f5f8fc;
}
.quote-items-table tbody td{vertical-align:middle}
.quote-empty-state{min-height:190px}
.quote-summary-card{
 position:sticky;
 top:74px;
}
.quote-validity-summary{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 margin-top:10px;
 padding:10px 4px;
 border-top:1px dashed #dce5ef;
 border-bottom:1px dashed #dce5ef;
 font-size:10px;
 color:#718198;
}
.quote-validity-summary strong{font-size:11px;color:#233951}
.quote-summary-card .sale-submit-btn{margin-top:13px}
.quote-page-head{margin-bottom:10px}
@media(max-width:1050px){
 .quote-layout{grid-template-columns:1fr}
 .quote-summary-card{position:static}
 .quote-summary-card .card-body{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
 }
 .quote-summary-card .sale-section-title{grid-column:1/-1}
 .quote-summary-card .sale-submit-btn,
 .quote-summary-card .sale-submit-note{grid-column:1/-1}
}
@media(max-width:720px){
 .quote-data-grid,.quote-picker-row{grid-template-columns:1fr}
 .quote-add-btn{width:100%;justify-content:center}
 .quote-summary-card .card-body{display:block}
 .quote-items-wrap{max-height:none;min-height:220px}
}

/* V57 - Cotización compacta con búsqueda dinámica igual a Ventas */
.quote-compact-top .sale-section-title{padding-top:8px!important;padding-bottom:8px!important}
.quote-compact-body{padding:9px 12px!important}
.quote-client-validity-row{display:grid;grid-template-columns:minmax(0,1fr) 145px;gap:10px;align-items:end}
.quote-customer-toolbar{gap:7px}
.quote-customer-toolbar .customer-doc-type{width:92px;min-width:92px}
.quote-customer-toolbar .customer-api-button{height:36px;padding-left:12px;padding-right:12px}
.quote-client-field .dynamic-search .input{height:36px}
.quote-validity-field .input{height:36px}
.quote-selected-customer{margin-top:5px;padding:6px 9px;min-height:34px}
.quote-selected-customer strong{font-size:10px}
.quote-selected-customer small{font-size:8px}
.quote-more-options{margin-top:6px}
.quote-more-options summary{padding-top:6px!important;padding-bottom:6px!important}
.quote-api-card{margin-top:7px}
.quote-detail-card .sale-section-title{padding-top:8px!important;padding-bottom:8px!important}
.quote-dynamic-product-body{padding:8px 12px!important}
.quote-dynamic-product-body .product-search-box{min-height:38px}
.quote-items-wrap{min-height:330px;max-height:calc(100vh - 330px)}
.quote-page-head{margin-bottom:7px!important}
.quote-page-head h1{margin-bottom:1px!important}
.quote-page-head p{margin-top:2px!important}
@media(max-width:900px){
 .quote-client-validity-row{grid-template-columns:1fr}
 .quote-items-wrap{max-height:none}
}

/* V58 - Cliente + Validez en una fila y navegación por teclado */
.quote-client-validity-row{
 grid-template-columns:minmax(0,1fr) 112px!important;
 align-items:end!important;
}
.quote-validity-inline{min-width:0}
.quote-validity-inline label{margin-bottom:4px!important}
.quote-validity-inline .quote-validity-input .input{
 height:36px!important;
 padding-left:10px!important;
 padding-right:34px!important;
}
.quote-validity-inline .quote-validity-input>span{
 right:8px!important;
 font-size:8px!important;
}
.quote-client-result.active{
 background:#eaf3ff!important;
 border-color:#b8d3f6!important;
 box-shadow:inset 3px 0 0 #1f6fe5;
}
.quote-client-result.active strong{color:#145fb9}
.quote-customer-toolbar{grid-template-columns:82px minmax(0,1fr) auto}
.quote-customer-toolbar .customer-doc-type{
 width:82px!important;
 min-width:82px!important;
}
.quote-compact-body{padding-top:7px!important;padding-bottom:7px!important}
.quote-more-options{margin-top:4px!important}
.quote-selected-customer{margin-top:4px!important}
@media(max-width:700px){
 .quote-client-validity-row{grid-template-columns:1fr!important}
 .quote-validity-inline{max-width:130px}
}

/* V59 - Corrección definitiva: Cliente y Validez en la misma fila */
.quote-client-validity-row{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 112px!important;
 gap:10px!important;
 align-items:end!important;
}
.quote-client-validity-row > .field{
 grid-column:auto!important;
 width:auto!important;
 min-width:0!important;
 margin:0!important;
}
.quote-client-validity-row > .quote-client-field{
 grid-column:1!important;
}
.quote-client-validity-row > .quote-validity-field{
 grid-column:2!important;
 align-self:end!important;
}
.quote-validity-inline{
 width:112px!important;
 max-width:112px!important;
}
@media(max-width:700px){
 .quote-client-validity-row{
  grid-template-columns:1fr!important;
 }
 .quote-client-validity-row > .quote-client-field,
 .quote-client-validity-row > .quote-validity-field{
  grid-column:1!important;
 }
 .quote-validity-inline{
  width:120px!important;
  max-width:120px!important;
 }
}

/* V60 - Gestión integral de Cotizaciones */
.quote-actions{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.quote-inline-status{margin-top:4px}
.quote-inline-status select{border:0;background:#f4f7fa;border-radius:6px;padding:3px 5px;font-size:8px;color:#52667e;max-width:105px}
.quote-linked-doc{display:block;font-size:9px;font-weight:800;color:#225895}
.quote-linked-status{display:block;margin-top:2px;font-size:8px;color:#718197}
.quote-view-head-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.quote-view-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:12px;align-items:start}
.quote-view-info{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;border-top:1px solid #e4eaf2}
.quote-view-info>div{padding:14px;border-right:1px solid #e4eaf2;display:flex;flex-direction:column;gap:3px}
.quote-view-info>div:last-child{border-right:0}
.quote-view-info small,.quote-view-observation small{font-size:8px;font-weight:900;letter-spacing:.07em;color:#7a8ca3}
.quote-view-info strong{font-size:11px;color:#1d3550}
.quote-view-info span{font-size:9px;color:#718197}
.quote-view-observation{padding:12px 14px;border-top:1px solid #e4eaf2}
.quote-view-observation p{margin:4px 0 0;font-size:10px;color:#52667d}
.quote-view-summary{position:sticky;top:72px}
.quote-view-summary .card-body>span{font-size:9px;color:#718197}
.quote-view-summary .card-body>strong{display:block;margin:5px 0;font-size:25px;color:#175fb8}
.quote-view-summary .card-body>small{font-size:9px;color:#8090a4}
.quote-converted-box{margin-top:14px;padding:11px;border-radius:9px;background:#eff8f3;border:1px solid #cce9d7;display:flex;flex-direction:column;gap:5px}
.quote-converted-box small{font-size:8px;font-weight:900;color:#358158}
.quote-converted-box strong{font-size:10px;color:#175d38}
.quote-converted-box span{font-size:9px;color:#5f796b}
.quote-view-detail{margin-top:12px}
.quote-convert-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:12px;align-items:start}
.quote-convert-summary{position:sticky;top:72px}
.quote-convert-source{display:grid;grid-template-columns:1fr 2fr 1fr;gap:1px;background:#e4eaf2;border:1px solid #e4eaf2;border-radius:10px;overflow:hidden;margin-bottom:14px}
.quote-convert-source>div{background:#f8fafc;padding:11px;display:flex;flex-direction:column;gap:3px}
.quote-convert-source small{font-size:8px;font-weight:900;color:#7b8ba0}
.quote-convert-source strong{font-size:10px;color:#263d57}
.quote-convert-source span{font-size:8px;color:#718197}
.quote-convert-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.quote-convert-fields .field{grid-column:auto!important;margin:0!important}
.quote-convert-warning{margin-top:14px;padding:10px 12px;border-radius:9px;background:#eef6ff;border:1px solid #cfe2f8;display:flex;gap:8px;font-size:9px;color:#53718f}
.quote-convert-warning strong{color:#195d9e}
.quote-convert-note{margin-top:7px;padding:8px 10px;border-radius:8px;background:#f7f8fa;color:#7a8798;font-size:8px}
@media(max-width:1000px){
 .quote-view-grid,.quote-convert-layout{grid-template-columns:1fr}
 .quote-view-summary,.quote-convert-summary{position:static}
}
@media(max-width:720px){
 .quote-view-info,.quote-convert-source,.quote-convert-fields{grid-template-columns:1fr}
}

/* V61 - Cotización precargada dentro de Nueva Venta */
.sale-quote-source{
 display:grid;
 grid-template-columns:170px 150px 120px minmax(0,1fr);
 gap:1px;
 margin:0 0 8px;
 border:1px solid #cfe0f5;
 border-radius:9px;
 overflow:hidden;
 background:#cfe0f5;
}
.sale-quote-source>div{
 background:#f4f9ff;
 padding:7px 9px;
 display:flex;
 flex-direction:column;
 gap:2px;
}
.sale-quote-source small{
 font-size:7px;
 font-weight:900;
 color:#6f88a4;
 letter-spacing:.06em;
}
.sale-quote-source strong{
 font-size:9px;
 color:#145d9f;
}
.sale-quote-source .sale-quote-source-note{
 justify-content:center;
 font-size:8px;
 color:#607994;
 background:#f8fbff;
}
@media(max-width:850px){
 .sale-quote-source{grid-template-columns:1fr 1fr}
 .sale-quote-source .sale-quote-source-note{grid-column:1/-1}
}

/* V62 - Indicadores NC/ND en Ventas */
.venta-notes-cell{white-space:nowrap}
.venta-note-chip{
 display:inline-flex;
 align-items:center;
 gap:4px;
 padding:4px 7px;
 margin-right:3px;
 border-radius:999px;
 font-size:8px;
 font-weight:900;
 text-decoration:none;
 border:1px solid transparent;
}
.venta-note-chip.credit{background:#fff2f2;color:#b52a2a;border-color:#f4caca}
.venta-note-chip.debit{background:#eef5ff;color:#225fa9;border-color:#c9dcf5}
.venta-note-chip b{font-size:9px}
.venta-no-notes{color:#a5afbc}
.venta-related-notes{
 margin:10px 12px 0;
 border:1px solid #dbe5f0;
 border-radius:10px;
 overflow:hidden;
 background:#fbfcfe;
}
.venta-related-notes-head{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 padding:8px 10px;
 border-bottom:1px solid #e4eaf2;
 background:#f5f8fc;
}
.venta-related-notes-head>div{display:flex;flex-direction:column;gap:1px}
.venta-related-notes-head small{font-size:7px;font-weight:900;letter-spacing:.07em;color:#7b8da3}
.venta-related-notes-head strong{font-size:10px;color:#263c56}
.venta-related-notes-list{display:flex;flex-direction:column}
.venta-related-note{
 display:grid;
 grid-template-columns:38px minmax(0,1fr) auto auto;
 align-items:center;
 gap:9px;
 padding:8px 10px;
 border-bottom:1px solid #edf1f5;
 text-decoration:none;
 color:inherit;
}
.venta-related-note:last-child{border-bottom:0}
.venta-related-note:hover{background:#f7faff}
.venta-related-note-type{
 display:grid;
 place-items:center;
 min-height:28px;
 border-radius:7px;
 font-size:9px;
 font-weight:900;
}
.venta-related-note.credit .venta-related-note-type{background:#feeaea;color:#b52626}
.venta-related-note.debit .venta-related-note-type{background:#e8f1ff;color:#225fa9}
.venta-related-note-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.venta-related-note-main strong{font-size:10px;color:#1d344f}
.venta-related-note-main small{font-size:8px;color:#718197;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.venta-related-note>b{font-size:10px;color:#223750;white-space:nowrap}
@media(max-width:760px){
 .venta-related-note{grid-template-columns:34px minmax(0,1fr) auto}
 .venta-related-note>b{grid-column:2}
}

/* V63 - Control de vendedores */
.client-seller-chip,.sale-seller-chip{
 display:inline-flex;
 align-items:center;
 padding:4px 7px;
 border-radius:999px;
 background:#eef5ff;
 border:1px solid #cfdef3;
 color:#245f9f;
 font-size:8px;
 font-weight:800;
 white-space:nowrap;
}
.sale-seller-field small{
 display:block;
 margin-top:3px;
 font-size:7px;
 line-height:1.25;
 color:#7a8aa0;
}
.seller-report-filter{
 display:flex;
 align-items:end;
 gap:9px;
 padding:10px 12px;
 margin-bottom:12px;
}
.seller-report-filter .field{grid-column:auto!important;margin:0!important;max-width:170px}
.seller-layout{
 display:grid;
 grid-template-columns:minmax(0,1fr) 285px;
 gap:12px;
 align-items:start;
}
.seller-summary{position:sticky;top:72px}
.seller-summary-name{
 display:block;
 padding-bottom:10px;
 margin-bottom:7px;
 border-bottom:1px solid #e6ebf1;
 color:#1e3958;
 font-size:13px;
}
.seller-summary-line{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 padding:8px 0;
 border-bottom:1px dashed #e1e7ef;
 font-size:9px;
 color:#718197;
}
.seller-summary-line b{font-size:12px;color:#1f3651}
.seller-summary .card-body>small{display:block;margin-top:10px;font-size:8px;color:#8794a5}
.seller-count{
 display:inline-grid;
 place-items:center;
 min-width:27px;
 height:23px;
 padding:0 6px;
 border-radius:999px;
 background:#f1f5f9;
 color:#52667e;
 font-size:9px;
 font-weight:900;
}
.seller-sales-detail{margin-top:12px}
#tbVendedores tr.is-selected td{background:#f1f7ff}
.venta-detail-summary{grid-template-columns:repeat(5,minmax(0,1fr))!important}
@media(max-width:1000px){
 .seller-layout{grid-template-columns:1fr}
 .seller-summary{position:static}
}
@media(max-width:760px){
 .seller-report-filter{align-items:stretch;flex-direction:column}
 .seller-report-filter .field{max-width:none}
 .venta-detail-summary{grid-template-columns:1fr 1fr!important}
}

/* V65 - Forma de pago SUNAT */
.sale-payment-sunat-hint,.sale-credit-due small{display:block;margin-top:3px;font-size:7px;color:#7a8ba0}
.sale-credit-due[hidden]{display:none!important}
.sale-credit-due{background:#fffaf0;border-radius:7px;padding:5px 7px!important;border:1px solid #f2dfb6}

/* V67 - Cabecera profesional de Nota de Crédito/Débito */
.note-source-strip.note-source-strip-pro{
 grid-template-columns:1.25fr 1.9fr .78fr .82fr !important;
 gap:0 !important;
 padding:0 !important;
 overflow:hidden;
 background:linear-gradient(135deg,#103b70 0%,#1b5898 58%,#2467aa 100%) !important;
 border:1px solid rgba(255,255,255,.08);
 box-shadow:0 8px 22px rgba(23,58,100,.10);
}
.note-source-strip-pro .note-source-item{
 position:relative;
 min-height:68px;
 padding:12px 15px;
 justify-content:center;
 border-right:1px solid rgba(255,255,255,.13);
 background:transparent !important;
}
.note-source-strip-pro .note-source-item:last-child{border-right:0}
.note-source-strip-pro .note-source-item small{
 font-size:7px !important;
 font-weight:900;
 letter-spacing:.085em !important;
 opacity:.72 !important;
 color:#dcecff;
}
.note-source-strip-pro .note-source-item strong{
 margin-top:2px;
 font-size:10px !important;
 line-height:1.25;
 color:#fff !important;
}
.note-source-strip-pro .note-source-item span{
 margin-top:1px;
 font-size:8px !important;
 color:#c6ddf5 !important;
 opacity:1 !important;
}
.note-source-strip-pro .note-source-client strong{max-width:420px}
.note-source-strip-pro .note-edit-number{
 background:rgba(5,28,56,.18) !important;
 padding-left:17px !important;
}
.note-source-strip-pro .note-edit-number strong{
 color:#fff !important;
 font-size:11px !important;
}
.note-source-strip-pro .note-edit-number span{
 color:#c5def8 !important;
 font-size:7px !important;
}
.note-edit-badge{
 align-self:flex-start;
 display:inline-flex !important;
 width:auto;
 margin-bottom:4px;
 padding:3px 6px;
 border-radius:999px;
 background:rgba(255,255,255,.13) !important;
 border:1px solid rgba(255,255,255,.16);
 color:#fff !important;
 font-size:6px !important;
 line-height:1;
 font-weight:900;
 letter-spacing:.08em;
}
.note-section-head>div{display:flex;flex-direction:column;gap:2px}
.note-section-head>div>span{font-size:11px;font-weight:900;color:#172c46}
.note-section-head>div>small{display:block;font-size:8px;color:#7a899c;font-weight:500}
@media(min-width:1200px){
 .note-source-strip-pro:has(.note-edit-number){grid-template-columns:1.15fr 1.75fr .72fr .78fr 1.12fr !important}
}
@media(max-width:950px){
 .note-source-strip.note-source-strip-pro,
 .note-source-strip-pro:has(.note-edit-number){grid-template-columns:1fr 1fr !important}
 .note-source-strip-pro .note-source-item{border-bottom:1px solid rgba(255,255,255,.11)}
}
@media(max-width:560px){
 .note-source-strip.note-source-strip-pro,
 .note-source-strip-pro:has(.note-edit-number){grid-template-columns:1fr !important}
}

\n\n/* V68 - Cabecera notas uniforme, sin resaltado crema */\n.note-source-strip.note-source-strip-pro.note-source-strip-editing{\n grid-template-columns:1.15fr 1.75fr .72fr .78fr 1.12fr !important;\n}\n.note-source-strip-pro .note-edit-number,\n.note-source-strip-pro .note-edit-number:hover,\n.note-source-strip-pro .note-edit-number:focus{\n background:transparent !important;\n color:#fff !important;\n border-radius:0 !important;\n box-shadow:none !important;\n}\n.note-source-strip-pro .note-edit-number small{color:#dcecff !important;opacity:.72 !important}\n.note-source-strip-pro .note-edit-number strong{color:#fff !important}\n.note-source-strip-pro .note-edit-number span{color:#c6ddf5 !important}\n.note-section-head .note-section-title-wrap{display:block !important}\n.note-section-head .note-section-title{display:block !important;font-size:11px !important;font-weight:900 !important;line-height:1.25 !important;color:#172c46 !important}\n.note-section-head .note-section-subtitle{display:block !important;margin-top:3px !important;font-size:8px !important;font-weight:500 !important;line-height:1.3 !important;color:#7a899c !important}\n@media(max-width:950px){.note-source-strip.note-source-strip-pro.note-source-strip-editing{grid-template-columns:1fr 1fr !important}}\n@media(max-width:560px){.note-source-strip.note-source-strip-pro.note-source-strip-editing{grid-template-columns:1fr !important}}\n

/* V69 - Nota de crédito/débito: zona superior ultracompacta */
.note-page-compact .note-source-strip.note-source-strip-pro{
 margin-bottom:6px !important;
 border-radius:10px !important;
}
.note-page-compact .note-source-strip-pro .note-source-item{
 min-height:48px !important;
 padding:7px 12px !important;
}
.note-page-compact .note-source-strip-pro .note-source-item small{font-size:6px !important}
.note-page-compact .note-source-strip-pro .note-source-item strong{font-size:9px !important;margin-top:1px !important}
.note-page-compact .note-source-strip-pro .note-source-item span{font-size:7px !important}
.note-page-compact .note-reason-card{margin-bottom:6px !important}
.note-page-compact .note-reason-card .card-head{
 padding:7px 12px !important;
 min-height:0 !important;
}
.note-page-compact .note-section-head .note-section-title{font-size:10px !important}
.note-page-compact .note-section-head .note-section-subtitle{font-size:7px !important;margin-top:1px !important}
.note-page-compact .note-reason-grid{
 grid-template-columns:minmax(260px,.72fr) minmax(420px,1.45fr) !important;
 gap:8px !important;
 padding:7px 12px !important;
}
.note-page-compact .note-reason-grid label{font-size:9px !important;margin-bottom:3px !important}
.note-page-compact .note-reason-grid .input{min-height:32px !important;height:32px !important;padding-top:5px !important;padding-bottom:5px !important}
.note-page-compact .note-reason-explainer{
 grid-template-columns:28px minmax(0,1fr) auto !important;
 gap:8px !important;
 margin:0 12px 6px !important;
 padding:6px 9px !important;
 border-radius:8px !important;
}
.note-page-compact .note-reason-icon{width:28px !important;height:28px !important;border-radius:7px !important;font-size:15px !important}
.note-page-compact .note-reason-explainer strong{font-size:9px !important}
.note-page-compact .note-reason-explainer p{font-size:8px !important;line-height:1.15 !important}
.note-page-compact .note-mode-badge{font-size:6px !important;padding:3px 6px !important}
.note-page-compact .note-stock-effect-panel{
 margin:0 12px 6px !important;
 padding:5px 9px !important;
 border-radius:8px !important;
}
.note-page-compact .note-stock-effect-panel > div{
 display:grid !important;
 grid-template-columns:auto auto 1fr !important;
 align-items:center !important;
 gap:7px !important;
 width:100% !important;
}
.note-page-compact .note-stock-effect-panel small{font-size:6px !important}
.note-page-compact .note-stock-effect-panel strong{font-size:8px !important}
.note-page-compact .note-stock-effect-panel p{font-size:7px !important;margin:0 !important;line-height:1.15 !important;flex-basis:auto !important}
.note-page-compact .note-stock-effect-badge{font-size:6px !important;padding:3px 6px !important}
.note-page-compact .note-inventory-card{
 margin-top:0 !important;
 margin-bottom:6px !important;
 display:grid;
 grid-template-columns:auto 1fr;
 align-items:center;
 border-radius:9px !important;
 overflow:hidden;
}
.note-page-compact .note-inventory-card .card-head{
 padding:6px 10px !important;
 border-bottom:0 !important;
 border-right:1px solid #dcebe2;
 background:#f6fcf8 !important;
 min-width:250px;
}
.note-page-compact .note-inventory-card .card-head>div{display:flex !important;align-items:center !important;gap:7px !important}
.note-page-compact .note-inventory-card .card-head span{font-size:9px !important;white-space:nowrap}
.note-page-compact .note-inventory-card .card-head small{font-size:7px !important;white-space:nowrap}
.note-page-compact .note-inventory-card .card-head>.badge{font-size:6px !important;padding:3px 6px !important;margin-left:8px}
.note-page-compact .note-inventory-card .card-body{
 padding:5px 10px !important;
 display:flex !important;
 align-items:center !important;
 justify-content:space-between !important;
 gap:10px !important;
 min-width:0;
}
.note-page-compact .note-stock-toggle{gap:7px !important;white-space:nowrap}
.note-page-compact .note-stock-switch{width:36px !important;height:20px !important;flex:0 0 auto}
.note-page-compact .note-stock-switch:after{width:14px !important;height:14px !important}
.note-page-compact .note-stock-toggle>input:checked+.note-stock-switch:after{left:19px !important}
.note-page-compact .note-stock-toggle strong{font-size:9px !important}
.note-page-compact .note-stock-toggle small{font-size:7px !important}
.note-page-compact .note-stock-warning{
 margin:0 !important;
 padding:5px 8px !important;
 font-size:7px !important;
 line-height:1.15 !important;
 white-space:normal;
 text-align:right;
 max-width:430px;
}
.note-page-compact #detailCard{margin-top:0 !important}
.note-page-compact #detailCard>.card-head{padding:7px 12px !important}
@media(max-width:1000px){
 .note-page-compact .note-inventory-card{grid-template-columns:1fr}
 .note-page-compact .note-inventory-card .card-head{border-right:0;border-bottom:1px solid #dcebe2;min-width:0}
 .note-page-compact .note-reason-grid{grid-template-columns:1fr !important}
}
@media(max-width:700px){
 .note-page-compact .note-stock-effect-panel > div{grid-template-columns:1fr !important}
 .note-page-compact .note-inventory-card .card-body{align-items:flex-start !important;flex-direction:column !important}
 .note-page-compact .note-stock-toggle{white-space:normal}
 .note-page-compact .note-stock-warning{text-align:left;max-width:none}
}

/* V70 - Notas: mayor legibilidad con campos más compactos */
.note-page-compact .note-reason-card .card-head{
 padding:8px 13px !important;
}
.note-page-compact .note-section-head .note-section-title{
 font-size:12px !important;
 line-height:1.2 !important;
 color:#172d47 !important;
}
.note-page-compact .note-section-head .note-section-subtitle{
 font-size:8.5px !important;
 line-height:1.25 !important;
 color:#6b7d93 !important;
 margin-top:2px !important;
}
.note-page-compact .note-reason-grid{
 grid-template-columns:minmax(300px,.72fr) minmax(380px,1.35fr) !important;
 gap:10px !important;
 padding:7px 13px 6px !important;
}
.note-page-compact .note-reason-grid label{
 font-size:10px !important;
 line-height:1.2 !important;
 margin-bottom:4px !important;
 color:#20364f !important;
}
.note-page-compact .note-reason-grid .input{
 min-height:30px !important;
 height:30px !important;
 padding:4px 11px !important;
 font-size:11px !important;
 border-radius:7px !important;
}
.note-page-compact .note-reason-explainer{
 grid-template-columns:30px minmax(0,1fr) auto !important;
 margin:0 13px 6px !important;
 padding:6px 9px !important;
 gap:9px !important;
 min-height:42px !important;
}
.note-page-compact .note-reason-icon{
 width:30px !important;
 height:30px !important;
 font-size:16px !important;
}
.note-page-compact .note-reason-explainer strong{
 font-size:10.5px !important;
 line-height:1.2 !important;
}
.note-page-compact .note-reason-explainer p{
 font-size:9px !important;
 line-height:1.25 !important;
 color:#61748c !important;
}
.note-page-compact .note-mode-badge{
 font-size:7.5px !important;
 padding:4px 7px !important;
}
.note-page-compact .note-stock-effect-panel{
 margin:0 13px 6px !important;
 padding:6px 9px !important;
 min-height:30px !important;
}
.note-page-compact .note-stock-effect-panel > div{
 grid-template-columns:auto auto minmax(0,1fr) !important;
 gap:8px !important;
}
.note-page-compact .note-stock-effect-panel small{
 font-size:7px !important;
}
.note-page-compact .note-stock-effect-panel strong{
 font-size:9px !important;
}
.note-page-compact .note-stock-effect-panel p{
 font-size:8px !important;
 line-height:1.2 !important;
 color:#66798f !important;
}
.note-page-compact .note-stock-effect-badge{
 font-size:7px !important;
 padding:4px 7px !important;
}
.note-page-compact .note-inventory-card{
 min-height:42px !important;
}
.note-page-compact .note-inventory-card .card-head{
 min-width:315px !important;
 padding:6px 12px !important;
}
.note-page-compact .note-inventory-card .card-head>div{
 gap:9px !important;
}
.note-page-compact .note-inventory-card .card-head span{
 font-size:10px !important;
 font-weight:800 !important;
}
.note-page-compact .note-inventory-card .card-head small{
 font-size:8px !important;
 color:#60758c !important;
}
.note-page-compact .note-inventory-card .card-head>.badge{
 font-size:7px !important;
 padding:4px 7px !important;
}
.note-page-compact .note-inventory-card .card-body{
 padding:5px 12px !important;
 gap:12px !important;
}
.note-page-compact .note-stock-toggle{
 gap:8px !important;
}
.note-page-compact .note-stock-switch{
 width:37px !important;
 height:20px !important;
}
.note-page-compact .note-stock-toggle strong{
 font-size:10px !important;
 line-height:1.2 !important;
}
.note-page-compact .note-stock-toggle small{
 font-size:8px !important;
 line-height:1.2 !important;
 color:#65778d !important;
}
.note-page-compact .note-stock-warning{
 padding:5px 9px !important;
 font-size:8px !important;
 line-height:1.2 !important;
 max-width:390px !important;
}
.note-page-compact #detailCard>.card-head span{
 font-size:11px !important;
}
.note-page-compact #detailCard>.card-head small{
 font-size:8px !important;
}
@media(min-width:1200px){
 .note-page-compact .note-reason-grid > div:first-child{
  max-width:520px;
 }
}
@media(max-width:1000px){
 .note-page-compact .note-reason-grid{
  grid-template-columns:1fr !important;
 }
 .note-page-compact .note-inventory-card .card-head{
  min-width:0 !important;
 }
}

/* V71 - Nueva Venta compacta y profesional */
.sales-page-head{
 margin-bottom:8px !important;
}
.sales-page-head h1{
 margin-bottom:2px !important;
 line-height:1.08 !important;
}
.sales-page-head p{
 margin-top:2px !important;
 margin-bottom:0 !important;
 font-size:12px !important;
}
.sale-layout{
 gap:10px !important;
 grid-template-columns:minmax(0,1fr) 300px !important;
}
.sale-main-card{
 margin-bottom:0 !important;
}
.sale-main-card .sale-section-title,
.sale-detail-card .sale-section-title{
 padding:8px 13px !important;
 min-height:0 !important;
}
.sale-main-card .sale-section-title>div,
.sale-detail-card .sale-section-title>div{
 grid-template-columns:28px auto !important;
 column-gap:8px !important;
}
.sale-main-card .sale-step,
.sale-detail-card .sale-step{
 width:28px !important;
 height:28px !important;
 border-radius:7px !important;
 font-size:9px !important;
}
.sale-main-card .sale-section-title strong,
.sale-detail-card .sale-section-title strong{
 font-size:12px !important;
}
.sale-main-card .sale-section-title small,
.sale-detail-card .sale-section-title small{
 font-size:8px !important;
 margin-top:1px !important;
}
.sale-status-dot,.keyboard-hint{
 padding:4px 7px !important;
 font-size:8px !important;
}
.sale-main-card .card-body.sale-data-grid{
 display:block !important;
 padding:8px 13px !important;
}
.sale-client-field label,
.sale-operation-row label{
 font-size:10px !important;
 font-weight:800 !important;
 color:#253a53 !important;
 margin-bottom:3px !important;
}
.customer-search-toolbar{
 grid-template-columns:105px minmax(0,1fr) auto !important;
 gap:7px !important;
}
.customer-doc-type,
.customer-search-toolbar .input,
.customer-api-button{
 height:32px !important;
 min-height:32px !important;
 border-radius:7px !important;
 font-size:10px !important;
}
.customer-api-button{
 min-width:135px !important;
 padding:0 10px !important;
 font-size:9px !important;
}
.customer-search-help{
 margin-top:3px !important;
 font-size:7.5px !important;
 line-height:1.2 !important;
 color:#77879b !important;
}
.selected-customer{
 margin-top:4px !important;
 min-height:30px !important;
 padding:5px 8px !important;
 border-radius:7px !important;
}
.selected-customer strong{
 font-size:10px !important;
}
.selected-customer small{
 margin-top:1px !important;
 font-size:8px !important;
}
.selected-customer .link-btn{
 font-size:9px !important;
}
.sale-operation-row{
 display:grid !important;
 grid-template-columns:
  minmax(150px,1.25fr)
  minmax(145px,1.08fr)
  minmax(135px,.95fr)
  minmax(120px,.8fr)
  minmax(130px,.95fr)
  minmax(165px,1.15fr) !important;
 gap:7px !important;
 margin-top:7px !important;
 align-items:end !important;
}
.sale-operation-row .field{
 min-width:0 !important;
}
.sale-operation-row .select,
.sale-operation-row .input{
 height:32px !important;
 min-height:32px !important;
 padding-top:4px !important;
 padding-bottom:4px !important;
 font-size:10px !important;
 border-radius:7px !important;
}
.sale-seller-field small,
.sale-payment-sunat-hint,
.sale-credit-due small{
 margin-top:2px !important;
 font-size:7px !important;
 line-height:1.1 !important;
 min-height:8px;
}
.sale-more-options{
 margin-top:5px !important;
 padding-top:4px !important;
}
.sale-more-options summary{
 font-size:8.5px !important;
 gap:5px !important;
}
.sale-more-options summary:before{
 width:15px !important;
 height:15px !important;
 border-radius:4px !important;
}
.sale-more-options .sale-observation{
 margin-top:5px !important;
}
.sale-more-options .input{
 height:30px !important;
 min-height:30px !important;
 font-size:10px !important;
}
.sale-quote-source{
 margin-bottom:6px !important;
}
.sale-detail-card{
 margin-top:0 !important;
}
.sale-detail-card .card-body{
 padding:7px 13px !important;
}
.product-search-box{
 height:36px !important;
 min-height:36px !important;
 border-radius:8px !important;
}
.product-search-icon{
 width:38px !important;
 font-size:18px !important;
}
.product-search-box input{
 font-size:11px !important;
}
.product-search-results{
 top:41px !important;
}
.selected-product-tip{
 margin-top:3px !important;
 font-size:8px !important;
}
.sale-items-wrap{
 min-height:390px !important;
 max-height:calc(100vh - 315px) !important;
 overflow:auto !important;
}
.sale-items-table th{
 position:sticky;
 top:0;
 z-index:3;
 background:#f5f8fc;
 font-size:9px !important;
 padding-top:7px !important;
 padding-bottom:7px !important;
}
.sale-items-table td{
 padding-top:7px !important;
 padding-bottom:7px !important;
}
.sale-items-table .input{
 min-height:30px !important;
 height:30px !important;
 font-size:10px !important;
}
.sale-summary-card{
 top:70px !important;
}
.sale-summary-card .sale-section-title{
 padding:8px 12px !important;
}
.sale-summary-card .card-body{
 padding:12px !important;
}
.sale-summary-lines>div,
.sale-item-counter{
 padding:7px 0 !important;
 font-size:9px !important;
}
.sale-grand-total{
 margin:11px -2px 6px !important;
 padding:12px !important;
 border-radius:10px !important;
}
.sale-grand-total span{
 font-size:8px !important;
}
.sale-grand-total strong{
 font-size:22px !important;
}
.sale-submit-btn{
 margin-top:11px !important;
 padding:9px !important;
}
.sale-submit-note{
 margin-top:6px !important;
 font-size:7.5px !important;
}
@media(max-width:1380px){
 .sale-operation-row{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
 }
}
@media(max-width:1150px){
 .sale-layout{
  grid-template-columns:1fr !important;
 }
 .sale-summary-card{
  position:static !important;
 }
}
@media(max-width:800px){
 .customer-search-toolbar{
  grid-template-columns:95px minmax(0,1fr) !important;
 }
 .customer-api-button{
  grid-column:1/-1;
  width:100%;
 }
 .sale-operation-row{
  grid-template-columns:1fr 1fr !important;
 }
 .sale-items-wrap{
  min-height:280px !important;
  max-height:none !important;
 }
}
@media(max-width:560px){
 .sale-operation-row,
 .customer-search-toolbar{
  grid-template-columns:1fr !important;
 }
}

/* V72 - Alta rápida de producto desde Nueva Venta */
.sale-product-quick-head{
 display:flex;
 align-items:center;
 gap:7px;
 margin-bottom:4px;
}
.sale-product-quick-head label{
 margin:0;
 font-size:10px;
 font-weight:800;
 color:#253a53;
}
.sale-quick-new{
 border:0;
 padding:0;
 background:transparent;
 color:#1769e0;
 font-size:9px;
 font-weight:900;
 cursor:pointer;
}
.sale-quick-new:hover{
 text-decoration:underline;
}
.sale-quick-product-modal .modal-box{
 width:min(860px,calc(100vw - 28px));
 max-height:calc(100vh - 34px);
 overflow:auto;
}
.sale-quick-product-modal .modal-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.sale-quick-product-modal .modal-head strong{
 font-size:14px;
}
.sale-quick-product-modal .modal-head small{
 font-size:9px;
 color:#7d8a9b;
 font-weight:500;
}
.quick-product-grid{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:9px;
}
.quick-product-grid .field{
 grid-column:auto!important;
 margin:0!important;
 min-width:0;
}
.quick-product-grid .quick-product-description{
 grid-column:span 2!important;
}
.quick-product-grid label{
 font-size:9px;
 margin-bottom:4px;
}
.quick-product-grid .input,
.quick-product-grid .select{
 min-height:33px;
 height:33px;
 padding-top:5px;
 padding-bottom:5px;
 font-size:10px;
}
.quick-product-info{
 display:flex;
 align-items:center;
 gap:8px;
 margin-top:11px;
 padding:8px 10px;
 border:1px solid #dce6f1;
 border-radius:8px;
 background:#f7faff;
}
.quick-product-info strong{
 flex:0 0 auto;
 font-size:9px;
 color:#285b92;
}
.quick-product-info span{
 font-size:8px;
 color:#6e8096;
 line-height:1.3;
}
.quick-product-actions{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 margin-top:12px;
 padding-top:10px;
 border-top:1px solid #e5eaf0;
}
.quick-product-actions>span{
 font-size:9px;
 color:#bf3144;
}
.quick-product-actions>div{
 display:flex;
 gap:7px;
 margin-left:auto;
}
@media(max-width:760px){
 .quick-product-grid{
  grid-template-columns:1fr 1fr;
 }
 .quick-product-grid .quick-product-description{
  grid-column:1/-1!important;
 }
}
@media(max-width:500px){
 .quick-product-grid{
  grid-template-columns:1fr;
 }
 .quick-product-grid .quick-product-description{
  grid-column:1!important;
 }
 .quick-product-actions{
  align-items:stretch;
  flex-direction:column;
 }
 .quick-product-actions>div{
  width:100%;
 }
 .quick-product-actions .btn{
  flex:1;
 }
}

/* V73 - Política de stock en ventas */
.stock-policy-options{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:10px;
}
.stock-policy-option{
 position:relative;
 display:grid;
 grid-template-columns:34px minmax(0,1fr);
 gap:10px;
 align-items:center;
 padding:12px;
 border:1px solid #dbe4ef;
 border-radius:10px;
 background:#fff;
 cursor:pointer;
}
.stock-policy-option input{
 position:absolute;
 opacity:0;
 pointer-events:none;
}
.stock-policy-option.selected{
 border-color:#9fc8ad;
 background:#f4fbf6;
 box-shadow:0 0 0 2px rgba(43,139,78,.06);
}
.stock-policy-option.selected.danger{
 border-color:#efc7a4;
 background:#fff8f1;
}
.stock-policy-icon{
 width:34px;
 height:34px;
 border-radius:9px;
 display:grid;
 place-items:center;
 background:#edf5ff;
 color:#1769e0;
 font-size:17px;
 font-weight:900;
}
.stock-policy-option.selected .stock-policy-icon{
 background:#e5f6ea;
 color:#16824b;
}
.stock-policy-option.selected.danger .stock-policy-icon{
 background:#fff0df;
 color:#b66b00;
}
.stock-policy-option>span:last-child{
 display:flex;
 flex-direction:column;
 gap:3px;
}
.stock-policy-option strong{
 font-size:11px;
 color:#223a57;
}
.stock-policy-option small{
 font-size:9px;
 color:#718197;
 line-height:1.35;
}
.stock-policy-note{
 margin-top:9px;
 padding:8px 10px;
 border-radius:8px;
 background:#f6f8fb;
 font-size:8.5px;
 color:#6d7e92;
}
.sale-stock-policy{
 display:inline-flex;
 align-items:center;
 padding:3px 6px;
 border-radius:999px;
 font-size:7.5px;
 font-weight:900;
 margin-left:2px;
}
.sale-stock-policy.block{
 background:#e9f7ee;
 color:#137746;
}
.sale-stock-policy.allow{
 background:#fff2df;
 color:#a86000;
}
@media(max-width:760px){
 .stock-policy-options{grid-template-columns:1fr}
}

/* V74 - Nueva Venta: alta visibilidad + operación por teclado */
.sale-keyboard-bar{
 display:flex;
 align-items:center;
 gap:12px;
 flex-wrap:wrap;
 margin:-1px 0 8px;
 padding:7px 12px;
 border:1px solid #d6e3f2;
 border-radius:9px;
 background:#f7fbff;
 color:#47627f;
 font-size:10px;
 line-height:1.2;
}
.sale-keyboard-bar strong{
 color:#155da9;
 font-size:10px;
 margin-right:2px;
}
.sale-keyboard-bar span{
 display:inline-flex;
 align-items:center;
 gap:4px;
 white-space:nowrap;
}
.sale-keyboard-bar kbd{
 min-width:24px;
 padding:3px 5px;
 border:1px solid #c8d7e8;
 border-bottom-width:2px;
 border-radius:5px;
 background:#fff;
 color:#173f6b;
 font:800 9px/1 system-ui,sans-serif;
 text-align:center;
 box-shadow:0 1px 1px rgba(0,0,0,.03);
}

/* Textos operativos más legibles */
#ventaForm .sale-section-title strong{
 font-size:13px !important;
}
#ventaForm .sale-section-title small{
 font-size:9.5px !important;
 line-height:1.25 !important;
 color:#61758d !important;
}
#ventaForm label,
#ventaForm .sale-product-quick-head label{
 font-size:11px !important;
 line-height:1.2 !important;
 color:#1d334e !important;
}
#ventaForm .customer-search-help,
#ventaForm .sale-seller-field small,
#ventaForm .sale-payment-sunat-hint,
#ventaForm .sale-credit-due small,
#ventaForm .selected-product-tip{
 font-size:8.5px !important;
 line-height:1.25 !important;
 color:#677c94 !important;
}
#ventaForm .input,
#ventaForm .select,
#ventaForm .product-search-box input,
#ventaForm .customer-search-toolbar .input{
 font-size:11.5px !important;
}
#ventaForm .customer-search-toolbar .input,
#ventaForm .customer-doc-type,
#ventaForm .customer-api-button,
#ventaForm .sale-operation-row .select,
#ventaForm .sale-operation-row .input{
 min-height:34px !important;
 height:34px !important;
}
#ventaForm .product-search-box{
 min-height:38px !important;
 height:38px !important;
}
#ventaForm .product-search-box input{
 font-size:12px !important;
}
#ventaForm .sale-items-table th{
 font-size:10px !important;
}
#ventaForm .sale-items-table td,
#ventaForm .sale-items-table .input{
 font-size:11px !important;
}
#ventaForm .sale-product-name strong{
 font-size:11.5px !important;
 line-height:1.25 !important;
}
#ventaForm .sale-product-name small{
 font-size:8.5px !important;
 line-height:1.25 !important;
}
#ventaForm .sale-code{
 font-size:10px !important;
}
#ventaForm .line-total{
 font-size:12px !important;
 font-weight:800 !important;
}
#ventaForm .sale-stock-policy,
#ventaForm .sale-quick-new,
#ventaForm .keyboard-hint{
 font-size:8.5px !important;
}

/* El foco del teclado debe ser imposible de perder visualmente */
#ventaForm input:focus,
#ventaForm select:focus,
#ventaForm button:focus,
#ventaForm summary:focus{
 outline:3px solid rgba(28,111,225,.22) !important;
 outline-offset:1px !important;
 border-color:#2879e6 !important;
 box-shadow:0 0 0 1px #2879e6 !important;
}
#ventaForm tr[data-product-id]:focus-within{
 background:#f2f7ff !important;
}
#ventaForm .qty:focus,
#ventaForm .price:focus{
 background:#fff !important;
 font-weight:800 !important;
}
.customer-result.active,
.product-result.active{
 background:#eaf3ff !important;
 box-shadow:inset 3px 0 0 #2375df !important;
}
.customer-result.active strong,
.product-result.active strong{
 color:#155ca7 !important;
}
@media(max-width:900px){
 .sale-keyboard-bar{
  gap:7px;
  font-size:9px;
 }
}

/* V75 - Sistema completo: textos visibles y navegación por teclado */
body{
 font-size:13px;
}
.content{
 font-size:13px;
}
.page-head h1{
 font-size:24px !important;
 line-height:1.15 !important;
}
.page-head p{
 font-size:13px !important;
 line-height:1.35 !important;
}
.page-kicker,.section-kicker{
 font-size:9px !important;
 letter-spacing:.11em !important;
}
.card-head,
.card-head>span,
.card-head strong,
.list-head-main>span{
 font-size:13px !important;
}
.card-head small,
.list-head-main>small{
 font-size:9px !important;
 line-height:1.3 !important;
}
.field label,
.block-label,
.form-grid label,
.modern-form-grid label,
.modal-body label{
 font-size:10.5px !important;
 line-height:1.25 !important;
 color:#253a53 !important;
}
.input,.select,
input.input,select.select,textarea.input{
 font-size:11.5px !important;
 line-height:1.25 !important;
}
.input:not(textarea),.select{
 min-height:34px;
}
.btn{
 font-size:10.5px !important;
 line-height:1.15 !important;
}
.btn-sm{
 font-size:9.5px !important;
}
.link-btn{
 font-size:10px !important;
}
.table{
 font-size:11px !important;
}
.table th{
 font-size:10px !important;
 line-height:1.2 !important;
 color:#445b76 !important;
}
.table td{
 font-size:11px !important;
 line-height:1.3 !important;
}
.table td small,
.table td .muted{
 font-size:9px !important;
 line-height:1.25 !important;
}
.badge{
 font-size:8.5px !important;
 line-height:1.1 !important;
}
.sidebar nav a{
 font-size:12px !important;
}
.sidebar .nav-title{
 font-size:9px !important;
 letter-spacing:.12em !important;
}
.top-title strong,
.userbox strong{
 font-size:12px !important;
}
.top-title small,
.userbox small{
 font-size:9px !important;
}
.settings-nav-item strong{
 font-size:10.5px !important;
}
.settings-nav-item small{
 font-size:8.5px !important;
 line-height:1.25 !important;
}
.subsection-heading h3{
 font-size:12px !important;
}
.subsection-heading p{
 font-size:9px !important;
 line-height:1.35 !important;
}
.alert{
 font-size:11px !important;
 line-height:1.35 !important;
}

/* Foco visual uniforme en todo el sistema */
.content input:focus-visible,
.content select:focus-visible,
.content textarea:focus-visible,
.content button:focus-visible,
.content a:focus-visible,
.content summary:focus-visible,
.sidebar a:focus-visible,
.topbar button:focus-visible{
 outline:3px solid rgba(34,116,225,.22) !important;
 outline-offset:1px !important;
 border-color:#2879e6 !important;
 box-shadow:0 0 0 1px #2879e6 !important;
}
.table tbody tr.keyboard-row-active td{
 background:#f1f6ff !important;
}
.table tbody tr.keyboard-row-active td:first-child{
 box-shadow:inset 3px 0 0 #2879e6;
}

/* Botón discreto de ayuda de teclado */
.global-keyboard-trigger{
 display:inline-flex;
 align-items:center;
 gap:5px;
 margin-left:10px;
 padding:5px 8px;
 border:1px solid #d9e3ef;
 border-radius:7px;
 background:#f8fafc;
 color:#52677f;
 cursor:pointer;
 font:700 9px/1 system-ui,sans-serif;
}
.global-keyboard-trigger:hover{
 background:#eef5ff;
 color:#1d65b5;
}
.global-keyboard-trigger kbd,
.global-keyboard-help kbd{
 display:inline-grid;
 place-items:center;
 min-width:27px;
 padding:4px 6px;
 border:1px solid #cbd7e5;
 border-bottom-width:2px;
 border-radius:5px;
 background:#fff;
 color:#1c4f86;
 font:800 9px/1 system-ui,sans-serif;
}
.global-keyboard-modal .modal-box{
 width:min(560px,calc(100vw - 28px));
}
.global-keyboard-modal .modal-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.global-keyboard-modal .modal-head strong{
 font-size:14px;
}
.global-keyboard-modal .modal-head small{
 font-size:9px;
 color:#718197;
}
.global-keyboard-help{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:7px 10px;
}
.global-keyboard-help>div{
 display:grid;
 grid-template-columns:92px minmax(0,1fr);
 gap:8px;
 align-items:center;
 padding:7px 8px;
 border:1px solid #e2e8f0;
 border-radius:8px;
 background:#fafcff;
}
.global-keyboard-help span{
 font-size:10px;
 line-height:1.25;
 color:#50667e;
}
@media(max-width:700px){
 .global-keyboard-trigger span{display:none}
 .global-keyboard-help{grid-template-columns:1fr}
 .page-head h1{font-size:21px!important}
}


/* V76 - Teclas rápidas visibles por formulario */
.context-shortcuts{margin:0 0 10px;border:1px solid #d8e4f1;border-radius:9px;background:#fff;overflow:hidden}
.context-shortcuts summary{display:flex;align-items:center;gap:7px;min-height:34px;padding:6px 10px;cursor:pointer;list-style:none;color:#193c63}
.context-shortcuts summary::-webkit-details-marker{display:none}
.context-shortcuts-icon{display:grid;place-items:center;width:23px;height:23px;border-radius:6px;background:#eaf3ff;color:#1268d8;font-size:12px}
.context-shortcuts summary strong{font-size:10.5px}
.context-shortcuts-hint{margin-left:auto;font-size:9px;color:#657b93;font-weight:600}
.context-shortcuts-body{display:flex;flex-wrap:wrap;gap:6px 12px;padding:7px 10px;border-top:1px solid #e5edf6;background:#f9fbfe}
.context-shortcuts-body>div{display:flex;align-items:center;gap:5px;white-space:nowrap}
.context-shortcuts-body kbd{min-width:30px;padding:4px 6px;text-align:center;border:1px solid #c8d6e5;border-bottom-width:2px;border-radius:5px;background:#fff;color:#0e5eb9;font:800 9px/1 system-ui,sans-serif}
.context-shortcuts-body span{font-size:9.5px;color:#425a73}

/* V78 - Una sola barra de teclas rápidas por formulario */
.sale-keyboard-bar,
.context-shortcuts{
 display:none !important;
}
.shortcut-unified-bar{
 display:flex;
 align-items:center;
 gap:12px;
 min-height:36px;
 margin:0 0 9px;
 padding:6px 10px;
 border:1px solid #d5e2f0;
 border-radius:9px;
 background:#f8fbff;
 box-shadow:0 1px 2px rgba(26,56,91,.03);
}
.shortcut-unified-title{
 display:flex;
 align-items:center;
 gap:6px;
 flex:0 0 auto;
 white-space:nowrap;
 color:#173d68;
}
.shortcut-unified-icon{
 display:grid;
 place-items:center;
 width:24px;
 height:24px;
 border-radius:6px;
 background:#e7f1ff;
 color:#1268d8;
 font-size:12px;
}
.shortcut-unified-title strong{
 font-size:10px;
 line-height:1;
}
.shortcut-unified-items{
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:5px 11px;
 min-width:0;
}
.shortcut-unified-items>span{
 display:inline-flex;
 align-items:center;
 gap:4px;
 white-space:nowrap;
}
.shortcut-unified-items kbd{
 min-width:25px;
 padding:3px 5px;
 border:1px solid #c8d6e5;
 border-bottom-width:2px;
 border-radius:5px;
 background:#fff;
 color:#0e5eb9;
 font:800 8.5px/1 system-ui,sans-serif;
 text-align:center;
}
.shortcut-unified-items b{
 font-size:9px;
 color:#536a82;
 font-weight:600;
}
.shortcut-unified-toggle{
 margin-left:auto;
 border:0;
 background:transparent;
 color:#50759e;
 font-size:8.5px;
 font-weight:700;
 cursor:pointer;
 white-space:nowrap;
}
.shortcut-unified-toggle:hover{
 color:#0e62bc;
 text-decoration:underline;
}
.shortcut-unified-bar.is-collapsed{
 min-height:32px;
}
@media(max-width:1050px){
 .shortcut-unified-bar{
  align-items:flex-start;
  flex-wrap:wrap;
  gap:6px 10px;
 }
 .shortcut-unified-items{
  order:3;
  width:100%;
 }
 .shortcut-unified-toggle{
  margin-left:auto;
 }
}

/* V79 - Inventario avanzado */
.inventory-advanced-stats{
 display:grid;
 grid-template-columns:repeat(7,minmax(0,1fr));
 gap:8px;
 margin-bottom:10px;
}
.inventory-advanced-stats>div{
 min-height:76px;
 padding:10px 12px;
 border:1px solid #dde6ef;
 border-radius:10px;
 background:#fff;
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:3px;
}
.inventory-advanced-stats span{font-size:9px;color:#6c7f95}
.inventory-advanced-stats strong{font-size:18px;color:#172f4b;line-height:1.05}
.inventory-advanced-stats small{font-size:8px;color:#8796a7}
.inventory-advanced-stats .danger strong{color:#c43545}
.inventory-advanced-stats .warning strong{color:#b56a00}
.inventory-advanced-stats .info strong{color:#266bb1}
.inventory-advanced-nav{
 display:flex;
 gap:4px;
 margin:0 0 9px;
 padding:4px;
 border:1px solid #dce5ef;
 border-radius:9px;
 background:#f7f9fc;
 overflow-x:auto;
}
.inventory-advanced-nav button{
 flex:0 0 auto;
 border:0;
 border-radius:7px;
 padding:7px 11px;
 background:transparent;
 color:#526981;
 font-size:9.5px;
 font-weight:800;
 cursor:pointer;
}
.inventory-advanced-nav button.active{
 background:#176be0;
 color:#fff;
 box-shadow:0 2px 6px rgba(23,107,224,.16);
}
.inventory-tab-panel{display:none}
.inventory-tab-panel.active{display:block}
.inventory-tab-panel .card{margin-bottom:10px}
.physical-count-summary{
 display:grid;
 grid-template-columns:repeat(4,1fr);
 gap:8px;
 margin-bottom:10px;
}
.physical-count-summary>div{
 padding:9px 11px;
 border:1px solid #dde6ef;
 border-radius:9px;
 background:#fff;
 display:flex;
 flex-direction:column;
 gap:2px;
}
.physical-count-summary span{font-size:8px;color:#74869b}
.physical-count-summary strong{font-size:11px;color:#1e3856}
.physical-count-table .physical-input{
 min-width:110px;
 font-weight:800;
 text-align:right;
}
.physical-count-table tr.physical-difference td{
 background:#fff9ee;
}
.physical-count-table .diff-cell{font-weight:800}
.physical-count-actions{
 display:flex;
 justify-content:flex-end;
 align-items:center;
 gap:12px;
 padding:9px 12px;
 border-top:1px solid #e3e9f0;
}
.physical-count-actions span{font-size:8.5px;color:#718197;margin-right:auto}
.physical-send-form{
 display:flex;
 justify-content:flex-end;
 margin-top:9px;
}
.inventory-modal-actions{
 display:flex;
 justify-content:flex-end;
 gap:7px;
 margin-top:13px;
 padding-top:10px;
 border-top:1px solid #e5eaf0;
}
@media(max-width:1400px){
 .inventory-advanced-stats{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:800px){
 .inventory-advanced-stats{grid-template-columns:repeat(2,1fr)}
 .physical-count-summary{grid-template-columns:repeat(2,1fr)}
}

/* V80 - Kardex valorizado */
.inventory-valued-summary{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px;
 margin-bottom:9px;
}
.inventory-valued-summary>div{
 padding:10px 12px;
 border:1px solid #dce6f0;
 border-radius:9px;
 background:#fff;
 display:flex;
 flex-direction:column;
 gap:3px;
}
.inventory-valued-summary span{
 font-size:9px;
 color:#6c7e92;
}
.inventory-valued-summary strong{
 font-size:17px;
 line-height:1.1;
 color:#183a60;
}
.inventory-valued-summary small{
 font-size:8px;
 color:#8795a6;
}
.valued-kardex-table{
 min-width:1450px;
}
.valued-kardex-table .valued-entry{
 color:#137a49;
}
.valued-kardex-table .valued-exit{
 color:#bc3443;
}
.valued-kardex-table .valued-balance{
 background:#f3f8ff;
 color:#155da8;
}
.valued-kardex-note{
 padding:8px 12px;
 border-top:1px solid #e3e9f0;
 background:#f8fafc;
 color:#64778e;
 font-size:8.5px;
 line-height:1.35;
}
.valued-kardex-note strong{
 color:#2b4d71;
}
@media(max-width:800px){
 .inventory-valued-summary{
  grid-template-columns:1fr;
 }
}

/* V81 - Edición controlada de compras */
.purchase-edit-warning{
 margin:0 0 9px;
 padding:8px 11px;
 border:1px solid #f0d59d;
 border-radius:9px;
 background:#fff9ed;
 color:#72531b;
 font-size:9.5px;
 line-height:1.35;
}
.purchase-edit-warning strong{
 color:#9a6500;
}

/* V82 - Nueva Compra uniforme, compacta y profesional */
.purchase-page-head{
 margin-bottom:9px !important;
}
.purchase-page-head h1{
 margin-bottom:2px !important;
 line-height:1.08 !important;
}
.purchase-page-head p{
 margin:2px 0 0 !important;
 font-size:12px !important;
 color:#657991 !important;
}
.purchase-grid{
 grid-template-columns:minmax(0,1fr) 300px !important;
 gap:12px !important;
}
.purchase-main-card,
.purchase-summary-card,
.purchase-products-card{
 border:1px solid #dce5ef !important;
 border-radius:12px !important;
 box-shadow:0 5px 16px rgba(26,57,91,.045) !important;
 overflow:visible;
}
.purchase-section-head{
 min-height:50px !important;
 padding:9px 13px !important;
 background:#fff !important;
 border-bottom:1px solid #e3eaf2 !important;
}
.purchase-section-head>div:first-child{
 gap:8px !important;
}
.purchase-section-head h2{
 font-size:13px !important;
 line-height:1.1 !important;
 color:#172f4b !important;
}
.purchase-section-head p{
 margin-top:2px !important;
 font-size:8.5px !important;
 line-height:1.2 !important;
 color:#74869b !important;
}
.purchase-step{
 width:29px !important;
 height:29px !important;
 flex-basis:29px !important;
 border-radius:8px !important;
 font-size:9px !important;
 background:#eaf3ff !important;
 color:#1769e0 !important;
}
.purchase-badge,
.purchase-shortcut{
 padding:4px 7px !important;
 font-size:8px !important;
 border-radius:999px !important;
}
.purchase-card-body{
 padding:11px 13px 10px !important;
}
.purchase-card-body>.field>label{
 margin-bottom:4px !important;
 font-size:10px !important;
 font-weight:800 !important;
 color:#233a55 !important;
}
.provider-search-toolbar{
 grid-template-columns:140px minmax(0,1fr) 160px !important;
 gap:7px !important;
 align-items:center !important;
}
.provider-doc-type,
.provider-search-toolbar .dynamic-search>.input,
.provider-api-button{
 height:35px !important;
 min-height:35px !important;
 border-radius:8px !important;
 font-size:10.5px !important;
}
.provider-search-toolbar .dynamic-search>.input{
 padding-left:38px !important;
 padding-right:34px !important;
 box-shadow:none !important;
}
.provider-search-toolbar .search-icon{
 left:13px !important;
 font-size:17px !important;
}
.provider-api-button{
 min-width:0 !important;
 padding:0 10px !important;
 font-size:9px !important;
 font-weight:800 !important;
}
.provider-search-help{
 margin-top:4px !important;
 font-size:8.5px !important;
 line-height:1.25 !important;
 color:#74869a !important;
}
.selected-provider{
 margin-top:5px !important;
 min-height:31px !important;
 padding:5px 8px !important;
 border-radius:8px !important;
 background:#f6f9fd !important;
}
.selected-provider strong{
 font-size:10px !important;
 color:#203b5a !important;
}
.selected-provider small{
 margin-top:1px !important;
 font-size:8px !important;
}
.selected-provider .link-btn{
 font-size:8.5px !important;
}
.purchase-doc-grid-v82{
 display:grid !important;
 grid-template-columns:minmax(145px,.9fr) minmax(180px,1fr) minmax(160px,.95fr) !important;
 gap:8px !important;
 margin-top:8px !important;
 padding-top:8px !important;
 border-top:1px dashed #dce5ef !important;
}
.purchase-doc-grid-v82 .field{
 margin:0 !important;
 min-width:0 !important;
}
.purchase-doc-grid-v82 .field>label{
 min-height:0 !important;
 margin-bottom:4px !important;
 font-size:9.5px !important;
 line-height:1.1 !important;
 color:#324a64 !important;
}
.purchase-doc-grid-v82 .field>label small{
 margin-left:4px;
 font-size:7.5px;
 font-weight:600;
 color:#91a0af;
}
.purchase-doc-grid-v82 .input,
.purchase-doc-grid-v82 .select{
 height:34px !important;
 min-height:34px !important;
 border-radius:8px !important;
 font-size:10.5px !important;
}
.purchase-observation-field{
 grid-column:1/-1 !important;
 margin-top:0 !important;
}
.purchase-observation-field .input{
 height:32px !important;
 min-height:32px !important;
}
.purchase-summary-card{
 top:72px !important;
}
.purchase-summary-card .purchase-section-head{
 min-height:50px !important;
}
.purchase-summary-content{
 padding:11px 13px 12px !important;
}
.purchase-stat{
 padding:8px 0 !important;
 font-size:9.5px !important;
}
.purchase-stat span{
 color:#6b7d91 !important;
}
.purchase-stat strong{
 font-size:12px !important;
 color:#1c3654 !important;
}
.purchase-grand-total{
 margin:10px 0 5px !important;
 padding:13px 12px !important;
 border-radius:10px !important;
 background:linear-gradient(135deg,#174d88,#1769e0) !important;
 box-shadow:0 6px 16px rgba(23,105,224,.16);
}
.purchase-grand-total small{
 font-size:8.5px !important;
}
.purchase-grand-total strong{
 font-size:23px !important;
 letter-spacing:-.02em;
}
.purchase-submit{
 height:36px !important;
 min-height:36px !important;
 margin-top:9px !important;
 padding:0 10px !important;
 border-radius:8px !important;
 font-size:10px !important;
}
.purchase-summary-note{
 margin:7px 3px 0 !important;
 font-size:7.5px !important;
 line-height:1.35 !important;
 color:#8190a1 !important;
}
.purchase-products-card{
 margin-top:10px !important;
}
.purchase-search-body{
 padding:8px 13px !important;
}
.purchase-search-body .dynamic-search>.input{
 height:37px !important;
 min-height:37px !important;
 border-radius:8px !important;
 font-size:11px !important;
 box-shadow:none !important;
}
.purchase-search-body .search-icon{
 font-size:17px !important;
}
.purchase-table-wrap{
 min-height:320px !important;
 max-height:calc(100vh - 430px) !important;
 overflow:auto !important;
}
.purchase-table th{
 position:sticky;
 top:0;
 z-index:3;
 background:#f6f8fb !important;
 padding-top:7px !important;
 padding-bottom:7px !important;
 font-size:9.5px !important;
}
.purchase-table td{
 padding-top:7px !important;
 padding-bottom:7px !important;
}
.purchase-table .qty,
.purchase-table .price{
 height:31px !important;
 min-height:31px !important;
 font-size:10px !important;
}
.purchase-cost-input{
 min-height:31px !important;
 border-radius:7px !important;
}
.purchase-remove-btn{
 width:28px !important;
 height:28px !important;
}
.purchase-edit-warning{
 margin:9px 0 0 !important;
}
@media(max-width:1200px){
 .purchase-grid{
  grid-template-columns:1fr !important;
 }
 .purchase-summary-card{
  position:static !important;
 }
 .purchase-summary-content{
  display:grid;
  grid-template-columns:1fr 1fr 1.2fr auto;
  gap:10px;
  align-items:center;
 }
 .purchase-stat{
  border:0 !important;
 }
 .purchase-grand-total{
  margin:0 !important;
 }
 .purchase-submit{
  margin:0 !important;
 }
 .purchase-summary-note{
  grid-column:1/-1;
 }
}
@media(max-width:850px){
 .provider-search-toolbar{
  grid-template-columns:110px minmax(0,1fr) !important;
 }
 .provider-api-button{
  grid-column:1/-1;
 }
 .purchase-doc-grid-v82{
  grid-template-columns:1fr 1fr !important;
 }
 .purchase-date-field{
  grid-column:1/-1;
 }
 .purchase-summary-content{
  grid-template-columns:1fr 1fr !important;
 }
}
@media(max-width:560px){
 .provider-search-toolbar,
 .purchase-doc-grid-v82,
 .purchase-summary-content{
  grid-template-columns:1fr !important;
 }
 .purchase-date-field,
 .purchase-observation-field{
  grid-column:1 !important;
 }
}

/* V83 - Edición profesional y trazable de ventas */
.sale-edit-audit-card{
 display:grid;
 grid-template-columns:36px minmax(260px,.8fr) minmax(340px,1.2fr);
 gap:10px;
 align-items:center;
 margin:0 0 9px;
 padding:8px 11px;
 border:1px solid #cfe0f3;
 border-radius:10px;
 background:linear-gradient(180deg,#f8fbff,#f4f8fd);
}
.sale-edit-audit-icon{
 width:32px;
 height:32px;
 border-radius:8px;
 display:grid;
 place-items:center;
 background:#e6f1ff;
 color:#1269d8;
 font-size:15px;
 font-weight:900;
}
.sale-edit-audit-main{
 display:flex;
 flex-direction:column;
 gap:2px;
 min-width:0;
}
.sale-edit-audit-main strong{
 font-size:10.5px;
 color:#183c65;
}
.sale-edit-audit-main span{
 font-size:8.5px;
 line-height:1.3;
 color:#647a92;
}
.sale-edit-reason{
 display:grid;
 grid-template-columns:auto minmax(0,1fr);
 gap:7px;
 align-items:center;
}
.sale-edit-reason label{
 margin:0!important;
 white-space:nowrap;
 font-size:9px!important;
 color:#29445f!important;
}
.sale-edit-reason label b{
 color:#cb3447;
}
.sale-edit-reason .input{
 height:32px!important;
 min-height:32px!important;
 font-size:10px!important;
}
.sale-edited-chip{
 display:inline-flex;
 align-items:center;
 margin-top:3px;
 padding:2px 5px;
 border-radius:999px;
 background:#edf4ff;
 color:#376b9f;
 font-size:7.5px;
 font-weight:800;
}
.venta-edit-history{
 margin:8px 12px;
 border:1px solid #dce6f0;
 border-radius:9px;
 background:#fafcff;
 overflow:hidden;
}
.venta-edit-history-head{
 display:flex;
 align-items:center;
 gap:7px;
 padding:7px 10px;
 border-bottom:1px solid #e5ebf2;
}
.venta-edit-history-head small{
 font-size:7px;
 letter-spacing:.08em;
 color:#7c8da0;
}
.venta-edit-history-head strong{
 font-size:10px;
 color:#294562;
}
.venta-edit-history-list{
 display:flex;
 flex-wrap:wrap;
 gap:6px 12px;
 padding:7px 10px;
}
.venta-edit-history-item{
 display:grid;
 grid-template-columns:9px auto;
 gap:6px;
 align-items:start;
 min-width:220px;
}
.venta-edit-history-dot{
 width:7px;
 height:7px;
 margin-top:4px;
 border-radius:50%;
 background:#2c79da;
 box-shadow:0 0 0 3px #e8f2ff;
}
.venta-edit-history-item>div{
 display:flex;
 flex-direction:column;
 gap:1px;
}
.venta-edit-history-item strong{
 font-size:8.5px;
 color:#344d68;
}
.venta-edit-history-item small{
 font-size:7.5px;
 color:#7a8a9c;
}
@media(max-width:1000px){
 .sale-edit-audit-card{
  grid-template-columns:34px 1fr;
 }
 .sale-edit-reason{
  grid-column:1/-1;
 }
}
@media(max-width:620px){
 .sale-edit-reason{
  grid-template-columns:1fr;
 }
}

/* V84 - Motivo obligatorio de edición de compras */
.purchase-edit-reason-card{
 display:grid;
 grid-template-columns:minmax(300px,.85fr) minmax(420px,1.15fr);
 gap:12px;
 align-items:center;
 margin:0 0 9px;
 padding:8px 11px;
 border:1px solid #cfe0f3;
 border-radius:10px;
 background:linear-gradient(180deg,#f8fbff,#f4f8fd);
}
.purchase-edit-reason-info{
 display:flex;
 gap:8px;
 align-items:center;
 min-width:0;
}
.purchase-edit-reason-icon{
 flex:0 0 31px;
 width:31px;height:31px;
 border-radius:8px;
 display:grid;place-items:center;
 background:#e6f1ff;color:#1269d8;
 font-size:14px;font-weight:900;
}
.purchase-edit-reason-info>div{
 display:flex;flex-direction:column;gap:1px;min-width:0;
}
.purchase-edit-reason-info strong{
 font-size:10.5px;color:#183c65;
}
.purchase-edit-reason-info small{
 font-size:8.5px;line-height:1.3;color:#647a92;
}
.purchase-edit-reason-field{
 display:grid;
 grid-template-columns:auto minmax(0,1fr);
 gap:8px;align-items:center;
}
.purchase-edit-reason-field label{
 margin:0!important;white-space:nowrap;
 font-size:9px!important;color:#29445f!important;
}
.purchase-edit-reason-field label b{color:#cb3447}
.purchase-edit-reason-field .input{
 height:32px!important;min-height:32px!important;font-size:10px!important;
}
@media(max-width:900px){
 .purchase-edit-reason-card{grid-template-columns:1fr}
}
@media(max-width:620px){
 .purchase-edit-reason-field{grid-template-columns:1fr}
}

/* V85 - Caja profesional */
.cash-page-head{margin-bottom:9px!important}
.cash-head-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.cash-selector-card{
 display:flex;align-items:center;gap:12px;
 padding:9px 11px;margin-bottom:9px;
 border:1px solid #dce5ef;border-radius:10px;background:#fff;
 box-shadow:0 3px 12px rgba(23,52,82,.035)
}
.cash-selector-card form{display:flex;align-items:center;gap:7px;min-width:280px}
.cash-selector-card label{font-size:9px;font-weight:800;color:#536a82}
.cash-selector-card .select{height:33px;min-height:33px;font-size:10px}
.cash-session-status{display:flex;align-items:center;gap:7px;padding:5px 8px;border-radius:8px;background:#f7f9fc}
.cash-session-status>div{display:flex;flex-direction:column;gap:1px}
.cash-session-status strong{font-size:9px;color:#334d68}
.cash-session-status small{font-size:7.5px;color:#7b8b9d}
.cash-status-dot{width:8px;height:8px;border-radius:50%;background:#a5b0bd}
.cash-session-status.open .cash-status-dot{background:#20a464;box-shadow:0 0 0 3px #e5f7ed}
.cash-session-status.open{background:#f4fbf7}
.cash-user-open-warning{margin-left:auto;padding:5px 8px;border-radius:7px;background:#fff5e7;color:#8e650d;font-size:8px}
.cash-session-hero{
 display:grid;grid-template-columns:minmax(260px,1.5fr) repeat(4,minmax(130px,.7fr));
 gap:0;margin-bottom:9px;border:1px solid #d8e4f1;border-radius:11px;background:#fff;overflow:hidden;
 box-shadow:0 5px 15px rgba(25,54,86,.045)
}
.cash-session-main,.cash-session-kpi{padding:10px 12px;border-right:1px solid #e5ebf2}
.cash-session-main{display:flex;flex-direction:column;justify-content:center;gap:2px;background:linear-gradient(135deg,#173f70,#1d65ae);color:#fff}
.cash-session-main span{font-size:8px;opacity:.8}
.cash-session-main strong{font-size:15px}
.cash-session-main small{font-size:8px;opacity:.82}
.cash-session-kpi{display:flex;flex-direction:column;justify-content:center;gap:3px}
.cash-session-kpi span{font-size:8px;color:#718298}
.cash-session-kpi strong{font-size:14px;color:#203a56}
.cash-session-kpi.total{background:#f4f8fd}
.cash-session-kpi.total strong{color:#1768cd}
.cash-method-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:9px}
.cash-method-card{position:relative;padding:10px 11px;border:1px solid #dde6ef;border-radius:10px;background:#fff;overflow:hidden}
.cash-method-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#8ca3ba}
.cash-method-card.cash:before{background:#269861}.cash-method-card.yape:before{background:#6f45af}
.cash-method-card.plin:before{background:#25a5a6}.cash-method-card.card:before{background:#2b71cf}.cash-method-card.transfer:before{background:#d18722}
.cash-method-card span{display:block;font-size:8.5px;color:#718399;margin-bottom:3px}
.cash-method-card strong{display:block;font-size:15px;color:#213c58}
.cash-method-card small{display:block;margin-top:2px;font-size:7.5px;color:#93a0ae}
.cash-empty-session{
 display:flex;align-items:center;gap:11px;padding:14px;margin-bottom:9px;
 border:1px dashed #cad8e8;border-radius:10px;background:#fbfdff
}
.cash-empty-icon{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:#eaf3ff;color:#1769df;font-size:17px}
.cash-empty-session>div:nth-child(2){display:flex;flex-direction:column;gap:2px;flex:1}
.cash-empty-session strong{font-size:11px;color:#294560}.cash-empty-session span{font-size:8.5px;color:#708298}
.cash-tabs{display:flex;gap:4px;padding:4px;margin-bottom:8px;border:1px solid #dce5ef;border-radius:9px;background:#f6f8fb;width:max-content}
.cash-tabs button{border:0;background:transparent;padding:6px 10px;border-radius:6px;font-size:9px;font-weight:800;color:#5d7188;cursor:pointer}
.cash-tabs button.active{background:#1769df;color:#fff}
.cash-tab-panel{display:none}.cash-tab-panel.active{display:block}
.cash-pay-chip{display:inline-flex;padding:3px 6px;border-radius:999px;background:#edf3fa;color:#3e5d7c;font-size:7.5px;font-weight:800}
.cash-positive{color:#138154!important}.cash-negative{color:#c13d4b!important}
.cash-diff{display:inline-flex;padding:3px 6px;border-radius:999px;font-size:8px;font-weight:900}
.cash-diff.ok{background:#e8f7ee;color:#167a48}.cash-diff.surplus{background:#eef5ff;color:#1768c5}.cash-diff.shortage{background:#fff0f1;color:#bd3444}
.cash-reconcile-mini{display:flex;flex-wrap:wrap;gap:3px 5px;max-width:190px}
.cash-reconcile-mini span{display:inline-flex;gap:3px;padding:2px 4px;border-radius:5px;background:#f4f7fa;font-size:7px;color:#6b7e91}
.cash-reconcile-mini b{font-weight:800;color:#334f6b}
.cash-modal{width:min(720px,calc(100vw - 28px))}
.cash-close-modal{width:min(820px,calc(100vw - 28px))}
.cash-modal .modal-head>div,.cash-close-modal .modal-head>div{display:flex;flex-direction:column;gap:2px}
.cash-modal .modal-head strong,.cash-close-modal .modal-head strong{font-size:13px}
.cash-modal .modal-head small,.cash-close-modal .modal-head small{font-size:8px;color:#718399}
.cash-form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.cash-form-grid .span-all{grid-column:1/-1}.cash-form-grid .span-2{grid-column:span 2}
.cash-money-input{display:flex;align-items:center;border:1px solid #d4deea;border-radius:8px;background:#fff;overflow:hidden}
.cash-money-input>span{padding:0 8px;font-size:9px;font-weight:800;color:#526a83;border-right:1px solid #e2e8ef}
.cash-money-input .input{border:0!important;box-shadow:none!important;border-radius:0!important}
.cash-modal-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid #e6ebf1}
.cash-reconcile-head,.cash-reconcile-row{display:grid;grid-template-columns:1.1fr .8fr 1fr .8fr;gap:8px;align-items:center}
.cash-reconcile-head{padding:0 8px 5px;color:#7c8d9f;font-size:7.5px;font-weight:800;text-transform:uppercase}
.cash-reconcile-row{padding:6px 8px;border-top:1px solid #edf1f5}
.cash-reconcile-row>strong{font-size:9px;color:#2e4965}.cash-reconcile-row>span{font-size:9px;color:#536b83}
.cash-reconcile-row .input{height:31px!important;min-height:31px!important;font-size:9.5px!important}
.cash-live-diff{font-size:9px}.cash-live-diff.ok,#cashTotalDifference.ok{color:#188052}.cash-live-diff.surplus,#cashTotalDifference.surplus{color:#1768c5}.cash-live-diff.shortage,#cashTotalDifference.shortage{color:#c13d4b}
.cash-close-total{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:9px 8px;border-top:1px solid #dce5ef;background:#f8fafc}
.cash-close-total span{font-size:9px;color:#62758b}.cash-close-total strong{font-size:15px}
@media(max-width:1200px){
 .cash-session-hero{grid-template-columns:1.5fr repeat(2,1fr)}
 .cash-method-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
 .cash-selector-card{align-items:stretch;flex-direction:column}.cash-selector-card form{min-width:0}
 .cash-session-hero{grid-template-columns:1fr 1fr}.cash-session-main{grid-column:1/-1}
 .cash-method-grid{grid-template-columns:1fr 1fr}.cash-form-grid{grid-template-columns:1fr}
 .cash-form-grid .span-all,.cash-form-grid .span-2{grid-column:1}
 .cash-reconcile-head,.cash-reconcile-row{grid-template-columns:1fr 1fr}.cash-reconcile-head span:nth-child(4){display:none}
}

/* V86 - Reapertura controlada y auditoría histórica de caja */
.cash-reopen-btn{
 border-color:#dfb55f !important;
 background:#fff8e9 !important;
 color:#94620b !important;
}
.cash-empty-actions{
 display:flex;
 gap:7px;
 align-items:center;
 flex-wrap:wrap;
}
.cash-reopen-modal{
 width:min(760px,calc(100vw - 28px));
}
.cash-reopen-modal .modal-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.cash-reopen-modal .modal-head strong{
 font-size:13px;
 color:#253f5d;
}
.cash-reopen-modal .modal-head small{
 font-size:8.5px;
 color:#728398;
}
.cash-reopen-summary{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:7px;
 margin-bottom:10px;
}
.cash-reopen-summary>div{
 padding:8px 9px;
 border:1px solid #e0e7ef;
 border-radius:8px;
 background:#f9fbfd;
 display:flex;
 flex-direction:column;
 gap:2px;
}
.cash-reopen-summary span{
 font-size:7.5px;
 color:#7c8da0;
}
.cash-reopen-summary strong{
 font-size:10px;
 color:#2b4662;
}
.cash-reopen-policy{
 display:flex;
 flex-direction:column;
 gap:3px;
 margin-bottom:10px;
 padding:9px 10px;
 border:1px solid #ecd59e;
 border-radius:9px;
 background:#fff9eb;
}
.cash-reopen-policy strong{
 font-size:9.5px;
 color:#8d620d;
}
.cash-reopen-policy span{
 font-size:8.5px;
 line-height:1.35;
 color:#765f32;
}
.cash-reopen-modal textarea.input{
 min-height:70px;
 resize:vertical;
 font-size:10px!important;
}
.cash-reopen-modal .field>small{
 display:block;
 margin-top:4px;
 font-size:7.5px;
 color:#8190a1;
}
.cash-audit-timeline{
 padding:10px 12px;
}
.cash-audit-event{
 position:relative;
 display:grid;
 grid-template-columns:30px minmax(0,1fr);
 gap:9px;
 padding:4px 0 11px;
}
.cash-audit-event:not(:last-child):after{
 content:"";
 position:absolute;
 left:14px;
 top:31px;
 bottom:-1px;
 width:1px;
 background:#dde6ef;
}
.cash-audit-mark{
 position:relative;
 z-index:1;
 width:28px;
 height:28px;
 border-radius:50%;
 display:grid;
 place-items:center;
 font-size:8px;
 font-weight:900;
 background:#eef3f8;
 color:#47627d;
 border:1px solid #dae4ee;
}
.cash-audit-event.apertura .cash-audit-mark{
 background:#e9f7ef;
 color:#16794a;
 border-color:#cce9d8;
}
.cash-audit-event.cierre .cash-audit-mark{
 background:#eef3f8;
 color:#466078;
}
.cash-audit-event.reapertura .cash-audit-mark{
 background:#fff4df;
 color:#a66a00;
 border-color:#efd7aa;
}
.cash-audit-body{
 min-width:0;
 padding-top:2px;
}
.cash-audit-body>div{
 display:flex;
 gap:8px;
 justify-content:space-between;
 align-items:center;
}
.cash-audit-body strong{
 font-size:9.5px;
 color:#2c4661;
}
.cash-audit-body time{
 font-size:7.5px;
 color:#8997a7;
 white-space:nowrap;
}
.cash-audit-body>span{
 display:block;
 margin-top:1px;
 font-size:8px;
 color:#667b91;
}
.cash-audit-body p{
 margin:3px 0 0;
 font-size:8.5px;
 line-height:1.35;
 color:#50677f;
}
.cash-audit-empty{
 padding:12px;
 text-align:center;
 color:#7d8d9e;
 font-size:9px;
}
@media(max-width:760px){
 .cash-reopen-summary{
  grid-template-columns:1fr 1fr;
 }
 .cash-audit-body>div{
  align-items:flex-start;
  flex-direction:column;
  gap:1px;
 }
}

/* V88 - Turno TODO EL DÍA */
.cash-field-help{
 display:block;
 margin-top:4px;
 font-size:7.5px;
 line-height:1.3;
 color:#7a8b9e;
}

/* V89 - Aviso global de caja abierta persistente */
.global-cash-alert{
 display:grid;
 grid-template-columns:auto minmax(0,1fr) auto;
 align-items:center;
 gap:10px;
 margin:0 0 10px;
 padding:8px 10px;
 border:1px solid #bfe3cf;
 border-radius:10px;
 background:linear-gradient(180deg,#f6fcf8,#f1faf5);
 box-shadow:0 3px 10px rgba(25,85,55,.035);
}
.global-cash-alert.admin-view{
 border-color:#cadced;
 background:linear-gradient(180deg,#f7fbff,#f2f7fc);
}
.global-cash-alert-status{
 display:flex;
 align-items:center;
 gap:6px;
 padding-right:9px;
 border-right:1px solid #d8e9df;
 white-space:nowrap;
}
.global-cash-alert.admin-view .global-cash-alert-status{
 border-right-color:#d9e4ef;
}
.global-cash-alert-status>span{
 width:8px;
 height:8px;
 border-radius:50%;
 background:#20a363;
 box-shadow:0 0 0 3px #dff4e8;
}
.global-cash-alert.admin-view .global-cash-alert-status>span{
 background:#2877cc;
 box-shadow:0 0 0 3px #e1effd;
}
.global-cash-alert-status strong{
 font-size:8px;
 letter-spacing:.05em;
 color:#187a4c;
}
.global-cash-alert.admin-view .global-cash-alert-status strong{
 color:#2b669e;
}
.global-cash-alert-main{
 display:flex;
 flex-direction:column;
 gap:1px;
 min-width:0;
}
.global-cash-alert-main strong{
 font-size:10px;
 color:#294a3b;
}
.global-cash-alert.admin-view .global-cash-alert-main strong{
 color:#294a69;
}
.global-cash-alert-main small{
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 font-size:8.5px;
 color:#667e71;
}
.global-cash-alert.admin-view .global-cash-alert-main small{
 color:#657b91;
}
.global-cash-alert-actions{
 display:flex;
 align-items:center;
 gap:6px;
 white-space:nowrap;
}
.global-cash-alert-actions .btn{
 min-height:29px!important;
 height:29px!important;
 padding:0 9px!important;
 font-size:8.5px!important;
}
@media(max-width:800px){
 .global-cash-alert{
  grid-template-columns:auto 1fr;
 }
 .global-cash-alert-actions{
  grid-column:1/-1;
  justify-content:flex-end;
 }
 .global-cash-alert-main small{
  white-space:normal;
 }
}


/* V90 - Centro operativo de caja: estilos críticos también definidos en la vista Caja para evitar caché. */

/* V92 - Mensajes flotantes globales */
.app-toast{
 position:fixed;
 top:72px;
 right:18px;
 z-index:99999;
 width:min(430px,calc(100vw - 28px));
 display:grid;
 grid-template-columns:32px minmax(0,1fr) 24px;
 gap:9px;
 align-items:start;
 padding:10px 10px 10px 11px;
 border:1px solid #bfe4ce;
 border-radius:11px;
 background:#f1fbf5;
 box-shadow:0 12px 30px rgba(21,48,77,.18);
 opacity:1;
 transform:translateY(0);
 transition:opacity .28s ease,transform .28s ease;
}
.app-toast.is-hiding{
 opacity:0;
 transform:translateY(-10px);
 pointer-events:none;
}
.app-toast-icon{
 width:30px;
 height:30px;
 border-radius:8px;
 display:grid;
 place-items:center;
 font-size:13px;
 font-weight:900;
 background:#d9f3e4;
 color:#137a47;
}
.app-toast-content{
 display:flex;
 flex-direction:column;
 gap:2px;
 min-width:0;
 padding-top:1px;
}
.app-toast-content strong{
 font-size:10px;
 color:#1c5535;
}
.app-toast-content span{
 font-size:9px;
 line-height:1.35;
 color:#526f5e;
 word-break:break-word;
}
.app-toast-close{
 width:22px;
 height:22px;
 border:0;
 border-radius:6px;
 background:transparent;
 color:#6e8576;
 font-size:15px;
 line-height:1;
 cursor:pointer;
}
.app-toast-close:hover{background:rgba(0,0,0,.05)}

/* Error: rojo suave */
.app-toast-danger,
.app-toast-error{
 border-color:#edc4ca;
 background:#fff1f3;
}
.app-toast-danger .app-toast-icon,
.app-toast-error .app-toast-icon{
 background:#f9dce1;
 color:#b63142;
}
.app-toast-danger .app-toast-content strong,
.app-toast-error .app-toast-content strong{color:#9f2e3c}
.app-toast-danger .app-toast-content span,
.app-toast-error .app-toast-content span{color:#80565d}
.app-toast-danger .app-toast-close,
.app-toast-error .app-toast-close{color:#9a6b72}

/* Advertencia */
.app-toast-warning{
 border-color:#edd8a6;
 background:#fff8e9;
}
.app-toast-warning .app-toast-icon{
 background:#ffefc5;
 color:#9a6805;
}
.app-toast-warning .app-toast-content strong{color:#7b5408}
.app-toast-warning .app-toast-content span{color:#786641}

@media(max-width:650px){
 .app-toast{
  top:62px;
  right:10px;
  width:calc(100vw - 20px);
 }
}

/* V93 - Cierre y arqueo profesional */
.cash-close-modal-v93{
 width:min(900px,calc(100vw - 24px))!important;
}
.cash-close-head{
 padding:12px 14px!important;
 background:#fff!important;
 border-bottom:1px solid #e2e8f0!important;
}
.cash-close-kicker{
 display:block;
 margin-bottom:3px;
 font-size:7.5px;
 font-weight:900;
 letter-spacing:.08em;
 color:#1769d9;
}
.cash-close-head strong{
 font-size:15px!important;
 color:#203a56!important;
}
.cash-close-head small{
 margin-top:2px!important;
 font-size:8.5px!important;
 color:#718398!important;
}
.cash-close-context{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:7px;
 margin-bottom:10px;
}
.cash-close-context>div{
 display:flex;
 flex-direction:column;
 gap:2px;
 padding:8px 9px;
 border:1px solid #e0e7ef;
 border-radius:8px;
 background:#f8fafc;
}
.cash-close-context span{
 font-size:7.5px;
 color:#7c8da0;
}
.cash-close-context strong{
 font-size:9.5px;
 color:#2a4663;
}
.cash-close-summary{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px;
 margin-bottom:11px;
}
.cash-close-summary>div{
 position:relative;
 display:flex;
 flex-direction:column;
 gap:3px;
 padding:11px 12px;
 border:1px solid #dce5ee;
 border-radius:10px;
 background:#fff;
 overflow:hidden;
}
.cash-close-summary>div:before{
 content:"";
 position:absolute;
 left:0;top:0;bottom:0;
 width:3px;
 background:#7e9bb7;
}
.cash-close-summary .expected:before{background:#2c77cf}
.cash-close-summary .counted:before{background:#3f8c72}
.cash-close-summary .difference:before{background:#b88a25}
.cash-close-summary span{
 font-size:7.5px;
 font-weight:800;
 color:#7b8b9c;
}
.cash-close-summary strong{
 font-size:18px;
 line-height:1.1;
 color:#203b58;
}
.cash-close-summary small{
 font-size:7.5px;
 color:#8795a4;
}
.cash-close-summary .difference strong.ok{color:#168052}
.cash-close-summary .difference strong.surplus{color:#1768c5}
.cash-close-summary .difference strong.shortage{color:#bd3545}
.cash-close-summary .difference small.ok{color:#168052}
.cash-close-summary .difference small.surplus{color:#1768c5}
.cash-close-summary .difference small.shortage{color:#bd3545}
.cash-reconcile-table{
 border:1px solid #dfe6ee;
 border-radius:10px;
 overflow:hidden;
 background:#fff;
}
.cash-reconcile-head,
.cash-reconcile-row{
 grid-template-columns:1.45fr .75fr 1fr .7fr!important;
}
.cash-reconcile-head{
 padding:7px 10px!important;
 background:#f5f8fb!important;
 border-bottom:1px solid #dfe6ee!important;
}
.cash-reconcile-head span{
 font-size:7.5px!important;
 font-weight:900!important;
 color:#75879a!important;
}
.cash-reconcile-row{
 padding:7px 10px!important;
 border-top:0!important;
 border-bottom:1px solid #edf1f5!important;
}
.cash-reconcile-row:last-child{
 border-bottom:0!important;
}
.cash-method-label{
 display:flex;
 flex-direction:column;
 gap:1px;
}
.cash-method-label strong{
 font-size:9.5px;
 color:#294560;
}
.cash-method-label small{
 font-size:7.5px;
 color:#8897a7;
}
.cash-expected-value{
 font-size:9.5px!important;
 color:#4d6379!important;
}
.cash-reconcile-row .cash-money-input{
 height:34px!important;
}
.cash-reconcile-row .cash-counted{
 height:32px!important;
 min-height:32px!important;
 font-size:10px!important;
}
.cash-live-diff{
 justify-self:end;
 font-size:9px!important;
 font-weight:900!important;
}
.cash-close-observation{
 display:grid;
 grid-template-columns:minmax(0,1.4fr) minmax(260px,.6fr);
 gap:10px;
 margin-top:11px;
}
.cash-close-observation textarea{
 min-height:74px!important;
 resize:vertical;
}
.cash-close-note{
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:3px;
 padding:9px 10px;
 border:1px solid #e5dfbf;
 border-radius:9px;
 background:#fffaf0;
}
.cash-close-note strong{
 font-size:9px;
 color:#865d0e;
}
.cash-close-note span{
 font-size:8px;
 line-height:1.4;
 color:#746545;
}
.cash-close-actions{
 margin-top:12px!important;
}
.cash-close-actions .btn{
 min-height:34px!important;
 height:34px!important;
 padding:0 12px!important;
 font-size:9px!important;
}
@media(max-width:760px){
 .cash-close-context,
 .cash-close-summary{
  grid-template-columns:1fr 1fr;
 }
 .cash-close-summary .difference{
  grid-column:1/-1;
 }
 .cash-close-observation{
  grid-template-columns:1fr;
 }
 .cash-reconcile-head,
 .cash-reconcile-row{
  grid-template-columns:1.1fr .8fr 1fr!important;
 }
 .cash-reconcile-head span:nth-child(4),
 .cash-reconcile-row .cash-live-diff{
  display:none!important;
 }
}

/* V94 - Créditos y cobranzas integrados con Caja */
.cash-credit-summary{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr)) auto;
 gap:8px;
 align-items:stretch;
 margin:0 0 9px;
}
.cash-credit-summary>div{
 position:relative;
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:3px;
 padding:9px 11px;
 border:1px solid #dce5ee;
 border-radius:10px;
 background:#fff;
 overflow:hidden;
}
.cash-credit-summary>div:before{
 content:"";
 position:absolute;
 left:0;top:0;bottom:0;
 width:3px;
}
.cash-credit-summary .generated:before{background:#c18a20}
.cash-credit-summary .collected:before{background:#21855b}
.cash-credit-summary .pending:before{background:#3b72b4}
.cash-credit-summary span{
 font-size:7.5px;
 font-weight:900;
 letter-spacing:.03em;
 color:#77899c;
}
.cash-credit-summary strong{
 font-size:14px;
 color:#203b58;
}
.cash-credit-summary small{
 font-size:7.5px;
 line-height:1.3;
 color:#8796a6;
}
.cash-credit-summary small b{color:#b83c4b}
.cash-credit-go{
 border:1px solid #d8e3ee;
 border-radius:10px;
 padding:0 12px;
 background:#f6f9fd;
 color:#2869ad;
 font-size:8.5px;
 font-weight:900;
 cursor:pointer;
 white-space:nowrap;
}
.cash-credit-go:hover{background:#eef5fd}

.cash-credit-card .card-head{align-items:center}
.cash-credit-legend{
 display:flex;
 flex-wrap:wrap;
 gap:12px;
 padding:7px 12px;
 border-bottom:1px solid #e7edf3;
 background:#fbfcfe;
 font-size:7.5px;
 color:#73869a;
}
.cash-credit-legend span{display:inline-flex;align-items:center;gap:5px}
.cash-credit-legend .dot{
 width:7px;height:7px;border-radius:50%;display:inline-block;
}
.cash-credit-legend .dot.pending{background:#d69a2e}
.cash-credit-legend .dot.partial{background:#3979c5}
.cash-credit-legend .dot.overdue{background:#c74350}
.cash-credit-legend .dot.paid{background:#27905f}
.cash-credit-table td small{font-size:7.5px;color:#8493a3}
.cash-credit-paid{color:#28825c!important}
.credit-status{
 display:inline-flex;
 padding:3px 6px;
 border-radius:999px;
 font-size:7.5px;
 font-weight:900;
}
.credit-status.pendiente{background:#fff4dd;color:#986407}
.credit-status.parcial{background:#eaf3ff;color:#2869ad}
.credit-status.vencida{background:#fff0f2;color:#b93243}
.credit-status.pagada{background:#e8f7ee;color:#167a4a}
.credit-status.anulada{background:#f0f2f5;color:#66788a}
.cash-credit-open-required{
 display:inline-block;
 max-width:90px;
 font-size:7px;
 line-height:1.25;
 color:#8a7780;
 text-align:right;
}
.cash-credit-pay{
 min-height:28px!important;
 height:28px!important;
 padding:0 8px!important;
 font-size:7.8px!important;
}

.cash-credit-modal{
 width:min(720px,calc(100vw - 24px));
}
.cash-credit-modal .modal-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.cash-credit-modal .modal-head strong{font-size:13px}
.cash-credit-modal .modal-head small{font-size:8px;color:#74869a}
.cash-credit-modal-doc{
 display:flex;
 flex-direction:column;
 gap:2px;
 padding:9px 10px;
 border:1px solid #dbe5ef;
 border-radius:9px;
 background:#f8fbff;
}
.cash-credit-modal-doc span{
 font-size:7px;
 font-weight:900;
 letter-spacing:.06em;
 color:#3670ad;
}
.cash-credit-modal-doc strong{
 font-size:11px;
 color:#1f3c5a;
}
.cash-credit-modal-doc small{
 font-size:8px;
 color:#718399;
}
.cash-credit-modal-balance{
 display:flex;
 justify-content:space-between;
 align-items:center;
 gap:12px;
 margin:8px 0 10px;
 padding:9px 10px;
 border-radius:9px;
 background:linear-gradient(135deg,#173f72,#1c68b5);
 color:#fff;
}
.cash-credit-modal-balance span{font-size:8px;opacity:.85}
.cash-credit-modal-balance strong{font-size:17px}
.cash-credit-modal-note{
 display:flex;
 flex-direction:column;
 gap:3px;
 margin-top:10px;
 padding:8px 10px;
 border:1px solid #cfe6d9;
 border-radius:9px;
 background:#f3fbf6;
}
.cash-credit-modal-note strong{font-size:8.5px;color:#20734c}
.cash-credit-modal-note span{font-size:8px;line-height:1.35;color:#577565}

@media(max-width:1050px){
 .cash-credit-summary{grid-template-columns:1fr 1fr}
 .cash-credit-go{min-height:50px}
}
@media(max-width:650px){
 .cash-credit-summary{grid-template-columns:1fr}
 .cash-credit-go{min-height:36px}
}

/* V95 - Campos comerciales normalizados a MAYÚSCULAS */
input.auto-uppercase,
textarea.auto-uppercase{
 text-transform:uppercase;
}
input.auto-uppercase::placeholder,
textarea.auto-uppercase::placeholder{
 text-transform:none;
}

/* V96 - Transferencia bancaria con evidencia */
.cash-transfer-evidence{
 border:1px solid #cfddec;
 border-radius:10px;
 background:#f8fbff;
 overflow:hidden;
}
.cash-transfer-evidence-head{
 display:flex;
 justify-content:space-between;
 gap:12px;
 align-items:center;
 padding:9px 10px;
 border-bottom:1px solid #dce7f2;
 background:#f2f7fd;
}
.cash-transfer-evidence-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.cash-transfer-evidence-head strong{
 font-size:9.5px;
 color:#264867;
}
.cash-transfer-evidence-head small{
 font-size:7.8px;
 color:#74899e;
}
.cash-transfer-evidence-head>span{
 padding:3px 6px;
 border-radius:999px;
 background:#e4effd;
 color:#2869ad;
 font-size:7px;
 font-weight:900;
 letter-spacing:.05em;
 white-space:nowrap;
}
.cash-transfer-grid{
 display:grid;
 grid-template-columns:1fr 1fr 1.25fr;
 gap:9px;
 padding:10px;
}
.cash-transfer-grid .field label b{color:#c33b4b}
.cash-voucher-field>input[type=file]{display:none!important}
.cash-voucher-picker{
 min-height:48px;
 display:flex!important;
 align-items:center;
 gap:8px;
 padding:7px 9px;
 margin:0!important;
 border:1px dashed #9ebadb;
 border-radius:8px;
 background:#fff;
 cursor:pointer;
 transition:border-color .18s,background .18s,box-shadow .18s;
}
.cash-voucher-picker:hover{
 border-color:#4e8dd4;
 background:#f7fbff;
}
.cash-voucher-picker.is-error{
 border-color:#c53f4f;
 background:#fff3f4;
 box-shadow:0 0 0 3px rgba(197,63,79,.08);
}
.cash-voucher-picker-icon{
 width:27px;
 height:27px;
 display:grid;
 place-items:center;
 border-radius:7px;
 background:#e8f2ff;
 color:#236fc2;
 font-size:14px;
 font-weight:900;
}
.cash-voucher-picker-text{
 display:flex;
 flex-direction:column;
 gap:1px;
 min-width:0;
}
.cash-voucher-picker-text strong{
 font-size:8.7px;
 color:#31516f;
}
.cash-voucher-picker-text small{
 font-size:7.2px;
 color:#8292a3;
}
.cash-voucher-selected{
 display:flex;
 align-items:center;
 gap:6px;
 margin-top:5px;
 padding:5px 7px;
 border-radius:7px;
 background:#eaf7ef;
 color:#28734f;
 font-size:7.5px;
}
.cash-voucher-selected span{
 flex:1;
 min-width:0;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}
.cash-voucher-selected button{
 width:19px;
 height:19px;
 border:0;
 border-radius:5px;
 background:rgba(31,109,72,.08);
 color:#38775a;
 cursor:pointer;
}
.cash-transfer-note{
 display:flex;
 gap:6px;
 align-items:center;
 padding:6px 10px;
 border-top:1px solid #e1eaf3;
 color:#6c8094;
 font-size:7.5px;
}
.cash-transfer-note strong{
 color:#35688f;
 white-space:nowrap;
}
.cash-transfer-proof{
 display:flex;
 flex-direction:column;
 gap:1px;
 min-width:105px;
}
.cash-transfer-proof strong{
 font-size:7.8px;
 color:#2b4b68;
}
.cash-transfer-proof small{
 font-size:7.2px;
 color:#76899d;
}
.cash-transfer-proof a{
 width:max-content;
 margin-top:2px;
 padding:2px 5px;
 border:1px solid #bed7f1;
 border-radius:5px;
 background:#f2f8ff;
 color:#216bb6;
 font-size:7px;
 font-weight:800;
 text-decoration:none;
}
.cash-transfer-proof a:hover{
 background:#e6f2ff;
}
.cash-transfer-proof>span{
 font-size:7px;
 color:#9b6d75;
}
@media(max-width:800px){
 .cash-transfer-grid{grid-template-columns:1fr}
 .cash-transfer-evidence-head{align-items:flex-start;flex-direction:column}
}


/* V97 - Modo de envío SUNAT */
.sunat-send-mode-card{margin-top:12px;padding:14px;border:1px solid #cfe0f2;border-radius:12px;background:#f8fbff}.sunat-send-mode-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:10px}.sunat-send-mode-head h3{margin:2px 0 3px;font-size:14px}.sunat-send-mode-head p{margin:0;color:#687f96;font-size:10px}.sunat-send-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sunat-send-option{display:flex!important;gap:10px;align-items:flex-start;padding:12px!important;border:1px solid #d6e1ec;border-radius:10px;background:#fff;cursor:pointer}.sunat-send-option:has(input:checked){border-color:#3985da;box-shadow:0 0 0 2px rgba(57,133,218,.08);background:#f7fbff}.sunat-send-option input{margin-top:3px}.sunat-send-option span{display:flex;flex-direction:column;gap:3px}.sunat-send-option strong{font-size:11px}.sunat-send-option strong em{font-style:normal;font-size:7px;padding:2px 5px;border-radius:999px;background:#e8f4ff;color:#1767b4}.sunat-send-option small{font-size:9px;line-height:1.4;color:#6d8093}.sunat-send-warning{margin-top:9px;padding:8px 10px;border-radius:8px;background:#fff7e8;color:#805d18;font-size:9px}@media(max-width:800px){.sunat-send-options{grid-template-columns:1fr}}

/* V98 - Selector profesional de modo de envío SUNAT */
.sunat-send-mode-card-v98{
 margin-top:14px;
 padding:14px;
 border:1px solid #d9e4ef;
 border-radius:12px;
 background:#fbfdff;
}
.sunat-send-mode-card-v98 .sunat-send-mode-head{
 display:flex;
 justify-content:space-between;
 align-items:flex-start;
 gap:18px;
 margin-bottom:11px;
}
.sunat-send-mode-card-v98 .sunat-send-mode-head h3{
 margin:3px 0 3px;
 font-size:15px;
 line-height:1.25;
 color:#152c45;
}
.sunat-send-mode-card-v98 .sunat-send-mode-head p{
 margin:0;
 font-size:11px;
 color:#667b90;
}
.sunat-send-options-v98{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:10px!important;
}
.sunat-send-option-v98{
 position:relative;
 display:grid!important;
 grid-template-columns:22px minmax(0,1fr);
 gap:10px;
 align-items:flex-start;
 min-height:82px;
 margin:0!important;
 padding:12px!important;
 border:1px solid #d5e0eb!important;
 border-radius:10px!important;
 background:#fff!important;
 cursor:pointer;
 transition:.18s ease;
}
.sunat-send-option-v98:hover{
 border-color:#9fc0e5!important;
 background:#f8fbff!important;
}
.sunat-send-option-v98 input{
 position:absolute!important;
 opacity:0!important;
 pointer-events:none;
}
.sunat-send-radio-ui{
 width:19px;
 height:19px;
 margin-top:1px;
 border:2px solid #a9bacb;
 border-radius:50%;
 background:#fff;
 box-shadow:inset 0 0 0 4px #fff;
}
.sunat-send-option-v98:has(input:checked){
 border-color:#3d86d8!important;
 background:#f4f9ff!important;
 box-shadow:0 0 0 2px rgba(61,134,216,.08);
}
.sunat-send-option-v98:has(input:checked) .sunat-send-radio-ui{
 border-color:#2475cf;
 background:#2475cf;
}
.sunat-send-option-content{
 display:flex;
 flex-direction:column;
 gap:6px;
 min-width:0;
}
.sunat-send-option-title{
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:7px;
}
.sunat-send-option-title strong{
 font-size:12px;
 color:#17324d;
}
.sunat-send-option-title em{
 padding:3px 6px;
 border-radius:999px;
 background:#fff1c9;
 color:#8a5c00;
 font-size:8px;
 font-style:normal;
 font-weight:900;
 letter-spacing:.03em;
}
.sunat-send-option-title em.auto{
 background:#e8f2ff;
 color:#2168b0;
}
.sunat-send-option-content small{
 display:block;
 font-size:10px;
 line-height:1.45;
 color:#65798d;
}
.sunat-send-warning-v98{
 display:flex!important;
 align-items:center;
 gap:8px;
 margin-top:10px!important;
 padding:8px 10px!important;
 border:1px solid #dce7f2!important;
 border-radius:8px!important;
 background:#f7fafc!important;
 color:#5c7084!important;
 font-size:9.5px!important;
 line-height:1.4;
}
.sunat-send-warning-icon{
 flex:0 0 20px;
 width:20px;
 height:20px;
 display:grid;
 place-items:center;
 border-radius:50%;
 background:#e6f1fd;
 color:#236dbd;
 font-weight:900;
}
@media(max-width:760px){
 .sunat-send-options-v98{grid-template-columns:1fr}
 .sunat-send-mode-card-v98 .sunat-send-mode-head{flex-direction:column;gap:8px}
}

/* V100 - Estados financieros globales */
.fin-status{
 display:inline-flex;
 align-items:center;
 padding:3px 6px;
 border-radius:999px;
 font-size:7px;
 font-weight:900;
 white-space:nowrap;
}
.fin-status.contado{background:#eef2f6;color:#5e7287}
.fin-status.pendiente{background:#fff3d8;color:#946108}
.fin-status.parcial{background:#eaf3ff;color:#286aaa}
.fin-status.vencida{background:#fff0f2;color:#b73343}
.fin-status.pagada{background:#e8f7ee;color:#187a4b}
.fin-status.anulada{background:#eef1f4;color:#68798b}

/* V102 - Modelo financiero documento != dinero */
.sale-finance-info .sale-finance-badge{
 display:flex;align-items:center;height:34px;padding:0 10px;border:1px solid #efd7a6;border-radius:8px;
 background:#fff8e9;color:#936108;font-size:8px;font-weight:900;letter-spacing:.03em;
}
.sale-finance-actions,.purchase-finance-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:6px}
.sale-submit-secondary,.purchase-submit-secondary{min-height:36px!important;height:36px!important}
@media(max-width:650px){.sale-finance-actions,.purchase-finance-actions{grid-template-columns:1fr}}


/* V103 - Abonos clientes */
.fin-payment-live-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 14px}
.fin-payment-live-summary>div{padding:9px 11px;border:1px solid #dce6f3;border-radius:9px;background:#f8fbff}
.fin-payment-live-summary small{display:block;font-size:8px;color:#65748b;text-transform:uppercase;font-weight:800;margin-bottom:3px}
.fin-payment-live-summary strong{font-size:13px;color:#102a4c}.fin-payment-live-summary strong.is-paid{color:#078047}
.fin-voucher-preview{display:flex;align-items:center;gap:10px;margin-top:7px;padding:8px;border:1px solid #dce6f3;border-radius:9px;background:#f8fbff}
.fin-voucher-thumb{width:54px;height:42px;border-radius:7px;background:#eaf2ff;display:flex;align-items:center;justify-content:center;overflow:hidden;font-size:9px;font-weight:900;color:#1766c2;flex:0 0 auto}
.fin-voucher-thumb img{width:100%;height:100%;object-fit:cover}.fin-voucher-meta{display:flex;flex-direction:column;min-width:0;flex:1}
.fin-voucher-meta strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fin-voucher-meta small{font-size:8px;color:#6b7b91}
.fin-voucher-remove{height:30px!important;min-height:30px!important;padding:0 10px!important;font-size:9px!important}
@media(max-width:650px){.fin-payment-live-summary{grid-template-columns:1fr}}

/* V104 - Selector de voucher profesional */
.fin-file-native-hidden{
 position:absolute!important;
 width:1px!important;
 height:1px!important;
 opacity:0!important;
 overflow:hidden!important;
 pointer-events:none!important;
}
.fin-file-upload{
 display:flex;
 align-items:center;
 gap:10px;
 min-height:48px;
 padding:7px;
 border:1px solid #cfdaea;
 border-radius:9px;
 background:#fff;
}
.fin-file-upload-btn{
 display:inline-flex!important;
 align-items:center;
 gap:7px;
 min-height:34px;
 padding:0 12px!important;
 margin:0!important;
 border:1px solid #9cc0ec;
 border-radius:7px;
 background:#edf5ff;
 color:#1769c9!important;
 font-size:9px!important;
 font-weight:900!important;
 cursor:pointer;
 white-space:nowrap;
 transition:.16s ease;
}
.fin-file-upload-btn:hover{
 background:#e2efff;
 border-color:#6ea4e5;
}
.fin-file-upload-icon{
 display:grid;
 place-items:center;
 width:20px;
 height:20px;
 border-radius:5px;
 background:#d9eaff;
 color:#1769c9;
 font-size:12px;
 font-weight:900;
}
.fin-file-upload-info{
 min-width:0;
 display:flex;
 flex-direction:column;
 gap:2px;
}
.fin-file-upload-info strong{
 max-width:410px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 color:#28445f;
 font-size:9px;
 font-weight:800;
}
.fin-file-upload-info small{
 color:#7b8c9e;
 font-size:7.5px;
}
.fin-voucher-preview[hidden]{display:none!important}
@media(max-width:650px){
 .fin-file-upload{align-items:stretch;flex-direction:column}
 .fin-file-upload-btn{justify-content:center}
 .fin-file-upload-info strong{max-width:100%}
}

/* V105 - Maestro / detalle de Cuentas por Cobrar */
.fin-master-detail{display:grid;grid-template-columns:minmax(0,1fr) 355px;gap:10px;align-items:start}
.fin-master-list{min-width:0}.fin-master-table-wrap{min-height:430px}
.fin-account-row{cursor:pointer;transition:background .14s,border-color .14s}
.fin-account-row:hover td{background:#f8fbff}
.fin-account-row.is-selected td{background:#edf5ff!important}
.fin-account-row.is-selected td:first-child{box-shadow:inset 3px 0 0 #1f72df}
.fin-row-done{font-size:7px;color:#7b8b9d}
.fin-detail-panel{position:sticky;top:8px;border:1px solid #dbe5ef;border-radius:11px;background:#fff;overflow:hidden;min-height:430px}
.fin-detail-empty{min-height:430px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;color:#7a8b9c}
.fin-detail-empty-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#eaf3ff;color:#1769cc;font-size:20px;margin-bottom:10px}
.fin-detail-empty strong{font-size:11px;color:#29445f}.fin-detail-empty span{max-width:240px;font-size:8px;line-height:1.5;margin-top:4px}
.fin-detail-content{padding-bottom:10px}
.fin-detail-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:12px;border-bottom:1px solid #e3eaf1;background:#fbfdff}
.fin-detail-head>div{min-width:0;display:flex;flex-direction:column;gap:2px}.fin-detail-head>div>span{font-size:7px;font-weight:900;color:#8293a6}.fin-detail-head strong{font-size:11px;color:#1e3c59}.fin-detail-head small{font-size:8px;color:#667c91;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fin-detail-totals{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;padding:10px 10px 6px}.fin-detail-totals>div{padding:8px;border:1px solid #e0e7ef;border-radius:8px;background:#f9fbfd}.fin-detail-totals span,.fin-detail-meta span{display:block;font-size:6.8px;color:#7d8fa2;text-transform:uppercase;font-weight:800}.fin-detail-totals strong{display:block;margin-top:2px;font-size:10px;color:#29445f}.fin-detail-totals .positive{color:#168155}.fin-detail-totals .balance{background:#1c66c5;border-color:#1c66c5}.fin-detail-totals .balance span,.fin-detail-totals .balance strong{color:#fff}
.fin-detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:3px 10px 9px}.fin-detail-meta>div{padding:6px 8px;border-left:2px solid #dbe6f2}.fin-detail-meta strong{display:block;margin-top:2px;font-size:8px;color:#405a73}
.fin-detail-actions{display:grid;grid-template-columns:1.25fr .75fr;gap:6px;padding:0 10px 10px}.fin-detail-actions .btn{height:32px!important;min-height:32px!important;font-size:8px!important}
.fin-detail-section{border-top:1px solid #e5ebf1;padding:10px}.fin-detail-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.fin-detail-section-title>div{display:flex;flex-direction:column}.fin-detail-section-title strong{font-size:9px;color:#29445f}.fin-detail-section-title small{font-size:7px;color:#8493a3}.fin-detail-section-title>span{min-width:22px;padding:3px 6px;border-radius:999px;background:#edf4fc;color:#2768ab;text-align:center;font-size:7px;font-weight:900}
.fin-payment-history{display:flex;flex-direction:column;gap:6px;max-height:270px;overflow:auto;padding-right:2px}
.fin-payment-history-item{padding:8px;border:1px solid #dfe7ef;border-radius:8px;background:#fbfcfe}.fin-payment-history-top,.fin-payment-history-bottom{display:flex;justify-content:space-between;gap:8px}.fin-payment-history-top strong{font-size:10px;color:#147c50}.fin-payment-history-top span{font-size:7px;color:#7e8d9d}.fin-payment-history-method{display:flex;align-items:center;gap:5px;margin:4px 0;font-size:7.5px;color:#496178}.fin-payment-history-method b{color:#29465f}.fin-payment-history-method span{padding-left:5px;border-left:1px solid #d8e2ec}.fin-payment-history-bottom{font-size:7px;color:#8291a1}.fin-payment-history-proof{margin-top:5px}.fin-voucher-link{display:inline-flex;padding:3px 6px;border:1px solid #bcd7f4;border-radius:5px;background:#f1f7ff;color:#1768bc;font-size:7px;font-weight:900;text-decoration:none}
.fin-detail-no-data,.fin-detail-loading,.fin-detail-error{padding:14px;text-align:center;border:1px dashed #d9e3ed;border-radius:8px;color:#7d8d9d;font-size:8px}.fin-detail-no-data{display:flex;flex-direction:column;gap:2px}.fin-detail-no-data strong{color:#4b6278}.fin-detail-error{color:#ad3c4a;background:#fff5f6}
.fin-detail-installments{margin:0 10px;border:1px solid #dfe7ef;border-radius:8px;overflow:hidden}.fin-detail-installments summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;padding:8px 9px;background:#f7fafc;color:#38546e;font-size:8px;font-weight:900}.fin-detail-installments summary::-webkit-details-marker{display:none}.fin-detail-installments summary span{color:#1769c9}.fin-installments-list{padding:6px}.fin-installment-row{display:flex;justify-content:space-between;gap:8px;padding:7px 4px;border-bottom:1px solid #edf1f5}.fin-installment-row:last-child{border-bottom:0}.fin-installment-row>div{display:flex;flex-direction:column;gap:2px}.fin-installment-row strong{font-size:8px;color:#29465f}.fin-installment-row span:not(.fin-status){font-size:7px;color:#8292a2}.fin-installment-row .num{align-items:flex-end}
@media(max-width:1150px){.fin-master-detail{grid-template-columns:1fr}.fin-detail-panel{position:static;min-height:auto}.fin-detail-empty{min-height:180px}.fin-payment-history{max-height:320px}}

/* V107 - Panel de detalle CxC alineado arriba */
.fin-detail-panel{
  min-height:0!important;
}
.fin-detail-panel.has-selection{
  min-height:0!important;
}
.fin-detail-empty[hidden],
.fin-detail-empty.is-hidden{
  display:none!important;
}
.fin-detail-content[hidden]{
  display:none!important;
}
.fin-detail-content.is-visible,
.fin-detail-content-top{
  display:block;
  padding-top:0!important;
}
.fin-detail-panel.has-selection .fin-detail-content{
  display:block!important;
}
.fin-detail-panel.has-selection .fin-detail-empty{
  display:none!important;
}
.fin-detail-panel.has-selection .fin-detail-head{
  margin-top:0!important;
}
.fin-detail-empty{
  min-height:360px;
}
.fin-detail-panel.has-selection{
  align-self:start;
}
@media(max-width:1150px){
  .fin-detail-empty{min-height:160px}
}

/* V108 - Edición auditada de abonos */
.fin-payment-history-actions{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:6px;padding-top:5px;border-top:1px dashed #dfe7ef}
.fin-payment-history-actions>span:last-child{display:flex;align-items:center;gap:5px;margin-left:auto}
.fin-edit-payment-btn{height:22px;padding:0 7px;border:1px solid #b9d3f0;border-radius:5px;background:#f3f8ff;color:#1769c4;font-size:7px;font-weight:900;cursor:pointer}
.fin-edit-payment-btn:hover{background:#e7f2ff;border-color:#7cafe5}
.fin-edited-badge{display:inline-flex;padding:3px 6px;border-radius:999px;background:#fff4d7;color:#8b610d;font-size:6.8px;font-weight:900}
.fin-edit-warning{display:flex;flex-direction:column;gap:2px;margin-bottom:10px;padding:8px 10px;border:1px solid #efd9a9;border-radius:8px;background:#fff9ec;color:#76561f}
.fin-edit-warning strong{font-size:8.5px}.fin-edit-warning span{font-size:7.5px;line-height:1.45}
.fin-edit-reason{min-height:68px!important;height:68px!important;resize:vertical}
.fin-edit-payment-modal .modal-body{max-height:75vh;overflow:auto}

/* V109 - Notas de Crédito integradas a CxC */
.fin-nc-amount{color:#b04a56!important;font-weight:800}
.fin-detail-totals-4{grid-template-columns:1fr 1fr!important}
.fin-detail-totals .nc{background:#fff6f7;border-color:#f0d9dc}
.fin-detail-totals .nc strong{color:#b34452}
.fin-credit-balance{margin:0 10px 9px;padding:9px 10px;border:1px solid #e6c77c;border-radius:8px;background:#fff8e7}
.fin-credit-balance>span{display:block;font-size:6.8px;font-weight:900;color:#8b620e;letter-spacing:.04em}
.fin-credit-balance>strong{display:block;margin:2px 0;font-size:13px;color:#7d5709}
.fin-credit-balance>small{display:block;font-size:7px;line-height:1.45;color:#7a6a45}
.fin-payment-history-item-nc{background:#fff7f8;border-color:#efdadd}
.fin-payment-history-item-nc .fin-payment-history-top strong{color:#b13f4e}
.fin-payment-history-item-nc .fin-payment-history-method b{color:#a63c49}
.fin-nc-ref{padding-left:5px;border-left:1px solid #e2c9cc;color:#8d5b62}
.fin-status.anulada_nc{background:#fcebed;color:#a83242}
.fin-status.compensada{background:#eaf5ff;color:#2468a9}
.fin-status.saldo_favor{background:#fff4d8;color:#8b610c}

/* V110 - Condición de venta en Cuentas por Cobrar */
.fin-condition{
 display:inline-flex;align-items:center;justify-content:center;
 min-width:54px;padding:3px 7px;border-radius:999px;
 font-size:6.8px;font-weight:900;letter-spacing:.03em;
}
.fin-condition.contado{background:#edf5ff;color:#2166ac}
.fin-condition.credito{background:#fff3d7;color:#8b610c}
.fin-detail-meta-3{grid-template-columns:1fr 1fr 1fr!important}
@media(max-width:650px){.fin-detail-meta-3{grid-template-columns:1fr!important}}

/* V111 - Mejor legibilidad en Cuentas por Cobrar */
.fin-master-detail .fin-card-head strong{
 font-size:12px!important;
 line-height:1.25!important;
}
.fin-master-detail .fin-card-head small{
 font-size:8.5px!important;
 line-height:1.4!important;
}
.fin-master-detail .fin-card-head .input{
 font-size:10px!important;
 min-height:36px!important;
 height:36px!important;
}
.fin-master-detail .fin-table{
 font-size:9px!important;
}
.fin-master-detail .fin-table thead th{
 font-size:8px!important;
 font-weight:900!important;
 padding:9px 10px!important;
 white-space:nowrap;
}
.fin-master-detail .fin-table tbody td{
 font-size:9px!important;
 padding:10px 10px!important;
 line-height:1.35!important;
 vertical-align:middle!important;
}
.fin-master-detail .fin-table tbody td strong{
 font-size:9px!important;
 line-height:1.35!important;
}
.fin-master-detail .fin-table tbody td small{
 font-size:7.8px!important;
 line-height:1.3!important;
}
.fin-master-detail .fin-condition{
 min-width:62px!important;
 padding:4px 8px!important;
 font-size:7.5px!important;
}
.fin-master-detail .fin-status{
 padding:4px 7px!important;
 font-size:7.3px!important;
}
.fin-master-detail .fin-pay-btn{
 min-height:31px!important;
 height:31px!important;
 padding:0 11px!important;
 font-size:8px!important;
}
.fin-master-detail .fin-row-done{
 font-size:7.5px!important;
}

/* Panel derecho */
.fin-detail-head>div>span{
 font-size:7.5px!important;
}
.fin-detail-head strong{
 font-size:12px!important;
 line-height:1.3!important;
}
.fin-detail-head small{
 font-size:8.5px!important;
}
.fin-detail-totals span,
.fin-detail-meta span{
 font-size:7.3px!important;
}
.fin-detail-totals strong{
 font-size:11px!important;
}
.fin-detail-meta strong{
 font-size:9px!important;
 line-height:1.35!important;
}
.fin-detail-actions .btn{
 height:34px!important;
 min-height:34px!important;
 font-size:8.5px!important;
}
.fin-detail-section-title strong{
 font-size:10px!important;
}
.fin-detail-section-title small{
 font-size:7.8px!important;
}
.fin-detail-section-title>span{
 font-size:7.5px!important;
}
.fin-payment-history-top strong{
 font-size:11px!important;
}
.fin-payment-history-top span{
 font-size:7.7px!important;
}
.fin-payment-history-method{
 font-size:8px!important;
}
.fin-payment-history-bottom{
 font-size:7.7px!important;
 line-height:1.4!important;
}
.fin-payment-history-item{
 padding:9px!important;
}
.fin-detail-installments summary{
 font-size:8.5px!important;
}
.fin-installment-row strong{
 font-size:8.5px!important;
}
.fin-installment-row span:not(.fin-status){
 font-size:7.5px!important;
}

/* Paginación / pie del listado */
.fin-master-detail .dt-footer,
.fin-master-detail .dataTables_info,
.fin-master-detail .pagination,
.fin-master-detail .table-footer{
 font-size:8.5px!important;
}

@media(max-width:1366px){
 .fin-master-detail .fin-table tbody td{
   padding:8px 8px!important;
 }
 .fin-master-detail .fin-table thead th{
   padding:8px 8px!important;
 }
}

/* V113 - Fuente ampliada para mejor visualización en Finanzas / CxC */
.fin-master-detail .fin-card-head strong{font-size:14px!important}
.fin-master-detail .fin-card-head small{font-size:10px!important}
.fin-master-detail .fin-card-head .input{font-size:12px!important;min-height:40px!important;height:40px!important}

.fin-master-detail .fin-table{font-size:11px!important}
.fin-master-detail .fin-table thead th{
 font-size:10px!important;
 padding:11px 10px!important;
 line-height:1.3!important;
}
.fin-master-detail .fin-table tbody td{
 font-size:11px!important;
 padding:12px 10px!important;
 line-height:1.4!important;
}
.fin-master-detail .fin-table tbody td strong{font-size:11px!important}
.fin-master-detail .fin-table tbody td small{font-size:9px!important}
.fin-master-detail .fin-condition{font-size:9px!important;padding:5px 9px!important;min-width:68px!important}
.fin-master-detail .fin-status{font-size:8.5px!important;padding:5px 8px!important}
.fin-master-detail .fin-pay-btn{
 font-size:10px!important;
 min-height:34px!important;
 height:34px!important;
 padding:0 13px!important;
}

/* Panel derecho */
.fin-detail-head>div>span{font-size:9px!important}
.fin-detail-head strong{font-size:14px!important}
.fin-detail-head small{font-size:10px!important}
.fin-detail-totals span,.fin-detail-meta span{font-size:8.5px!important}
.fin-detail-totals strong{font-size:13px!important}
.fin-detail-meta strong{font-size:10.5px!important}
.fin-detail-actions .btn{font-size:10px!important;height:37px!important;min-height:37px!important}
.fin-detail-section-title strong{font-size:12px!important}
.fin-detail-section-title small{font-size:9px!important}
.fin-detail-section-title>span{font-size:9px!important}
.fin-payment-history-top strong{font-size:13px!important}
.fin-payment-history-top span{font-size:9px!important}
.fin-payment-history-method{font-size:9.5px!important}
.fin-payment-history-bottom{font-size:9px!important}
.fin-detail-installments summary{font-size:10px!important}
.fin-installment-row strong{font-size:10px!important}
.fin-installment-row span:not(.fin-status){font-size:9px!important}

/* Formularios y modales financieros */
.fin-modal label,
.fin-modal .field-label,
.fin-modal .form-label{font-size:11px!important}
.fin-modal input,
.fin-modal select,
.fin-modal textarea{font-size:12px!important;min-height:40px!important}
.fin-modal textarea{min-height:70px!important}
.fin-modal .btn{font-size:11px!important;min-height:38px!important}
.fin-modal small,.fin-modal .help-text{font-size:9px!important}

/* Pie, paginación y controles */
.fin-master-detail .dt-footer,
.fin-master-detail .dataTables_info,
.fin-master-detail .pagination,
.fin-master-detail .table-footer{font-size:10px!important}

/* V114 - Finanzas: apariencia corporativa profesional */
.fin-page-pro{
 --fin-border:#d8e3ef;
 --fin-border-soft:#e8eef5;
 --fin-bg:#f4f7fb;
 --fin-surface:#ffffff;
 --fin-text:#16324d;
 --fin-muted:#708397;
 --fin-primary:#1769d1;
 --fin-primary-dark:#0f57b7;
 --fin-shadow:0 8px 24px rgba(31,60,93,.055);
 --fin-shadow-soft:0 3px 10px rgba(31,60,93,.045);
}

/* Navegación superior */
.fin-page-pro .fin-tabs,
.fin-page-pro .tabs{
 padding:5px!important;
 border:1px solid var(--fin-border)!important;
 border-radius:11px!important;
 background:#f8fafc!important;
 box-shadow:0 1px 2px rgba(30,55,80,.03)!important;
 gap:4px!important;
}
.fin-page-pro .fin-tabs a,
.fin-page-pro .tabs a,
.fin-page-pro .fin-tabs button,
.fin-page-pro .tabs button{
 min-height:34px!important;
 padding:0 13px!important;
 border-radius:7px!important;
 border:0!important;
 font-size:9.5px!important;
 font-weight:800!important;
 color:#405a72!important;
 background:transparent!important;
 transition:background .15s,color .15s,box-shadow .15s!important;
}
.fin-page-pro .fin-tabs .active,
.fin-page-pro .tabs .active,
.fin-page-pro .fin-tabs a.active,
.fin-page-pro .tabs a.active{
 background:var(--fin-primary)!important;
 color:#fff!important;
 box-shadow:0 3px 8px rgba(23,105,209,.22)!important;
}

/* Tarjetas de resumen financiero */
.fin-page-pro .fin-stat{
 border:1px solid var(--fin-border)!important;
 border-radius:12px!important;
 background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
 box-shadow:var(--fin-shadow-soft)!important;
 padding:13px 15px!important;
 min-height:88px!important;
 position:relative!important;
 overflow:hidden!important;
}
.fin-page-pro .fin-stat:before{
 content:"";
 position:absolute;
 left:0;top:0;bottom:0;
 width:4px;
 border-radius:12px 0 0 12px;
 background:#9fb2c7;
}
.fin-page-pro .fin-stat.receivable:before{background:#2376df}
.fin-page-pro .fin-stat.overdue:before{background:#e35d6a}
.fin-page-pro .fin-stat.payable:before{background:#e2a526}
.fin-page-pro .fin-stat.balance:before{background:#24a06b}
.fin-page-pro .fin-stat span{
 font-size:8.5px!important;
 font-weight:900!important;
 letter-spacing:.045em!important;
 color:#5d7288!important;
}
.fin-page-pro .fin-stat strong{
 display:block!important;
 margin-top:5px!important;
 font-size:19px!important;
 line-height:1.05!important;
 color:#123759!important;
 letter-spacing:-.02em!important;
}
.fin-page-pro .fin-stat small{
 display:block!important;
 margin-top:5px!important;
 font-size:8.5px!important;
 color:#7a8da1!important;
}

/* Maestro / detalle */
.fin-page-pro .fin-master-detail{
 grid-template-columns:minmax(0,1fr) 370px!important;
 gap:12px!important;
}
.fin-page-pro .fin-card,
.fin-page-pro .fin-master-list,
.fin-page-pro .fin-detail-panel{
 border:1px solid var(--fin-border)!important;
 border-radius:12px!important;
 background:var(--fin-surface)!important;
 box-shadow:var(--fin-shadow)!important;
 overflow:hidden!important;
}
.fin-page-pro .fin-card-head{
 min-height:66px!important;
 padding:12px 14px!important;
 border-bottom:1px solid var(--fin-border)!important;
 background:linear-gradient(180deg,#fff,#fbfdff)!important;
 display:flex!important;
 align-items:center!important;
 gap:12px!important;
}
.fin-page-pro .fin-card-head>div{
 flex:1!important;
 min-width:0!important;
}
.fin-page-pro .fin-card-head strong{
 color:#173754!important;
 font-weight:900!important;
 letter-spacing:-.01em!important;
}
.fin-page-pro .fin-card-head small{
 color:#7a8ea3!important;
}
.fin-page-pro .fin-card-head .input{
 width:min(320px,38vw)!important;
 border:1px solid #cfdbea!important;
 border-radius:9px!important;
 background:#fff!important;
 padding:0 12px!important;
 box-shadow:inset 0 1px 2px rgba(28,54,81,.025)!important;
}
.fin-page-pro .fin-card-head .input:focus{
 border-color:#6da7eb!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.10)!important;
}

/* Tabla */
.fin-page-pro .fin-table{
 border-collapse:separate!important;
 border-spacing:0!important;
 width:100%!important;
}
.fin-page-pro .fin-table thead th{
 background:#f4f7fb!important;
 color:#496178!important;
 border-bottom:1px solid #d8e3ef!important;
 text-transform:uppercase!important;
 letter-spacing:.035em!important;
}
.fin-page-pro .fin-table tbody td{
 border-bottom:1px solid #e7edf4!important;
 color:#28445f!important;
 background:#fff!important;
}
.fin-page-pro .fin-table tbody tr:hover td{
 background:#f8fbff!important;
}
.fin-page-pro .fin-table tbody tr.is-selected td{
 background:#edf5ff!important;
}
.fin-page-pro .fin-table tbody tr.is-selected td:first-child{
 box-shadow:inset 4px 0 0 var(--fin-primary)!important;
}
.fin-page-pro .fin-table tbody td.num,
.fin-page-pro .fin-table .num{
 font-variant-numeric:tabular-nums!important;
}
.fin-page-pro .fin-table tbody td strong{
 color:#173d60!important;
}

/* Condición y estados */
.fin-page-pro .fin-condition{
 border:1px solid transparent!important;
 box-shadow:none!important;
}
.fin-page-pro .fin-condition.contado{
 background:#eaf3ff!important;
 color:#1765b7!important;
 border-color:#d5e7fa!important;
}
.fin-page-pro .fin-condition.credito{
 background:#fff5dd!important;
 color:#8d6212!important;
 border-color:#f4e3b7!important;
}
.fin-page-pro .fin-status{
 border:1px solid transparent!important;
 letter-spacing:.03em!important;
}
.fin-page-pro .fin-status.pendiente{background:#fff5df!important;color:#9a6708!important;border-color:#f3e0ad!important}
.fin-page-pro .fin-status.parcial{background:#eaf3ff!important;color:#286aaa!important;border-color:#d7e8fa!important}
.fin-page-pro .fin-status.vencida{background:#fff0f2!important;color:#ba3546!important;border-color:#f4d8dc!important}
.fin-page-pro .fin-status.pagada{background:#e9f8ef!important;color:#14794a!important;border-color:#d1eedc!important}
.fin-page-pro .fin-status.anulada_nc{background:#fbecef!important;color:#ab3344!important;border-color:#efd6da!important}
.fin-page-pro .fin-status.compensada{background:#eaf5ff!important;color:#216aa8!important;border-color:#d4e7f7!important}
.fin-page-pro .fin-status.saldo_favor{background:#fff4d9!important;color:#91620d!important;border-color:#efdca9!important}

/* Botones */
.fin-page-pro .btn{
 border-radius:8px!important;
 font-weight:850!important;
 box-shadow:none!important;
 transition:background .15s,border-color .15s,transform .08s!important;
}
.fin-page-pro .btn:hover{transform:translateY(-1px)}
.fin-page-pro .btn-primary{
 background:linear-gradient(180deg,#2378e5,#1768d2)!important;
 border:1px solid #1762c3!important;
 color:#fff!important;
}
.fin-page-pro .btn-primary:hover{
 background:linear-gradient(180deg,#1d70da,#125dbf)!important;
}
.fin-page-pro .btn-light{
 background:#fff!important;
 border:1px solid #d3dfeb!important;
 color:#35516b!important;
}
.fin-page-pro .btn-light:hover{background:#f7faff!important}

/* Panel derecho */
.fin-page-pro .fin-detail-panel{
 position:sticky!important;
 top:10px!important;
}
.fin-page-pro .fin-detail-head{
 padding:13px 14px!important;
 border-bottom:1px solid var(--fin-border)!important;
 background:linear-gradient(180deg,#fff,#f9fbfe)!important;
}
.fin-page-pro .fin-detail-totals{
 gap:7px!important;
 padding:11px 11px 7px!important;
}
.fin-page-pro .fin-detail-totals>div{
 padding:9px 10px!important;
 border:1px solid #dce6f0!important;
 border-radius:9px!important;
 background:#f8fafc!important;
}
.fin-page-pro .fin-detail-totals .balance{
 background:linear-gradient(145deg,#1769d1,#235fb0)!important;
 border-color:#1769d1!important;
 box-shadow:0 5px 12px rgba(23,105,209,.16)!important;
}
.fin-page-pro .fin-detail-meta{
 gap:8px!important;
 padding:5px 11px 10px!important;
}
.fin-page-pro .fin-detail-meta>div{
 padding:7px 9px!important;
 border-left:3px solid #dce8f4!important;
 background:#fafcff!important;
 border-radius:0 7px 7px 0!important;
}
.fin-page-pro .fin-detail-actions{
 padding:0 11px 11px!important;
 gap:7px!important;
}
.fin-page-pro .fin-detail-section{
 padding:11px!important;
 border-top:1px solid #e4ebf2!important;
}
.fin-page-pro .fin-detail-section-title{
 margin-bottom:8px!important;
}
.fin-page-pro .fin-payment-history{
 gap:7px!important;
}
.fin-page-pro .fin-payment-history-item{
 border:1px solid #dde6ef!important;
 border-radius:9px!important;
 background:#fcfdff!important;
 box-shadow:0 2px 6px rgba(30,60,90,.025)!important;
}
.fin-page-pro .fin-payment-history-item:hover{
 border-color:#c7d9eb!important;
 background:#f8fbff!important;
}
.fin-page-pro .fin-payment-history-item-nc{
 background:#fff8f9!important;
 border-color:#efdadd!important;
}
.fin-page-pro .fin-detail-installments{
 border:1px solid #dce6ef!important;
 border-radius:9px!important;
 background:#fff!important;
}
.fin-page-pro .fin-detail-installments summary{
 background:#f6f9fc!important;
}

/* Saldo a favor */
.fin-page-pro .fin-credit-balance{
 border:1px solid #e8cf91!important;
 border-left:4px solid #dca62e!important;
 background:linear-gradient(180deg,#fffaf0,#fff6df)!important;
 box-shadow:0 2px 6px rgba(153,105,19,.04)!important;
}

/* Paginación */
.fin-page-pro .pagination button,
.fin-page-pro .pagination a,
.fin-page-pro .dt-pagination button{
 border-radius:7px!important;
 border:1px solid #d4dfeb!important;
 background:#fff!important;
 color:#3b5670!important;
}
.fin-page-pro .pagination .active,
.fin-page-pro .dt-pagination .active{
 background:var(--fin-primary)!important;
 color:#fff!important;
 border-color:var(--fin-primary)!important;
}

/* Modales financieros */
.fin-page-pro .modal-box,
.fin-edit-payment-modal{
 border:1px solid #d6e1ec!important;
 border-radius:13px!important;
 box-shadow:0 20px 55px rgba(20,44,69,.16)!important;
 overflow:hidden!important;
}
.fin-page-pro .modal-head,
.fin-edit-payment-modal .modal-head{
 padding:14px 16px!important;
 border-bottom:1px solid #e0e8f0!important;
 background:linear-gradient(180deg,#fff,#fafcff)!important;
}
.fin-page-pro .modal-body,
.fin-edit-payment-modal .modal-body{
 padding:14px 16px!important;
}
.fin-page-pro .field label,
.fin-edit-payment-modal .field label{
 color:#29455f!important;
 font-weight:850!important;
}
.fin-page-pro .input,
.fin-page-pro .select,
.fin-edit-payment-modal .input,
.fin-edit-payment-modal .select{
 border:1px solid #ccd9e7!important;
 border-radius:8px!important;
 background:#fff!important;
}
.fin-page-pro .input:focus,
.fin-page-pro .select:focus,
.fin-edit-payment-modal .input:focus,
.fin-edit-payment-modal .select:focus{
 border-color:#6da7eb!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.09)!important;
 outline:none!important;
}

@media(max-width:1250px){
 .fin-page-pro .fin-master-detail{grid-template-columns:minmax(0,1fr) 340px!important}
}
@media(max-width:1100px){
 .fin-page-pro .fin-master-detail{grid-template-columns:1fr!important}
 .fin-page-pro .fin-detail-panel{position:static!important}
 .fin-page-pro .fin-card-head .input{width:300px!important;max-width:45vw!important}
}
@media(max-width:680px){
 .fin-page-pro .fin-card-head{align-items:stretch!important;flex-direction:column!important}
 .fin-page-pro .fin-card-head .input{width:100%!important;max-width:none!important}
}

/* V115 - Modal profesional de envío por correo */
.mail-modal-title-row{
 display:flex;
 align-items:center;
 gap:10px;
}
.mail-modal-icon{
 width:36px;
 height:36px;
 display:grid;
 place-items:center;
 border-radius:9px;
 background:#eaf3ff;
 color:#1769d1;
 font-size:17px;
 font-weight:900;
 flex:0 0 auto;
}
.mail-modal-title-row>div:last-child{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.mail-modal-eyebrow{
 font-size:7.5px;
 font-weight:900;
 letter-spacing:.06em;
 color:#6e8297;
}
.mail-modal-title-row strong{
 font-size:15px!important;
 line-height:1.15!important;
 color:#173a59!important;
 letter-spacing:-.01em;
}

/* Modal */
.modal-box:has(.mail-modal-title-row){
 max-width:560px!important;
 border:1px solid #d4e0ec!important;
 border-radius:14px!important;
 background:#fff!important;
 box-shadow:0 22px 60px rgba(25,48,72,.18)!important;
 overflow:hidden!important;
}
.modal-box:has(.mail-modal-title-row) .modal-head{
 min-height:74px!important;
 padding:14px 16px!important;
 background:linear-gradient(180deg,#ffffff 0%,#f9fbfe 100%)!important;
 border-bottom:1px solid #e1e8f0!important;
 align-items:center!important;
}
.modal-box:has(.mail-modal-title-row) .modal-head>.close,
.modal-box:has(.mail-modal-title-row) .close{
 width:34px!important;
 height:34px!important;
 min-width:34px!important;
 border:1px solid #d7e1eb!important;
 border-radius:8px!important;
 background:#fff!important;
 color:#526a80!important;
 font-size:0!important;
 display:grid!important;
 place-items:center!important;
 cursor:pointer!important;
 box-shadow:none!important;
}
.modal-box:has(.mail-modal-title-row) .modal-head>.close:after,
.modal-box:has(.mail-modal-title-row) .close:after{
 content:"×";
 font-size:18px;
 line-height:1;
 font-weight:500;
}
.modal-box:has(.mail-modal-title-row) .modal-head>.close:hover,
.modal-box:has(.mail-modal-title-row) .close:hover{
 background:#f5f8fb!important;
 border-color:#c7d5e2!important;
 color:#223e58!important;
}

/* Body */
.modal-box:has(.mail-modal-title-row) .modal-body{
 padding:16px!important;
}
.modal-box:has(.mail-modal-title-row) label{
 display:block!important;
 margin-bottom:6px!important;
 color:#294760!important;
 font-size:10px!important;
 font-weight:850!important;
}
.mail-recipient-input,
.modal-box:has(.mail-modal-title-row) input[type="email"]{
 height:42px!important;
 min-height:42px!important;
 border:1px solid #cad7e5!important;
 border-radius:9px!important;
 background:#fff!important;
 padding:0 12px!important;
 font-size:11.5px!important;
 color:#213f5a!important;
 box-shadow:inset 0 1px 2px rgba(30,55,80,.025)!important;
}
.mail-recipient-input:focus,
.modal-box:has(.mail-modal-title-row) input[type="email"]:focus{
 outline:none!important;
 border-color:#6da7eb!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.09)!important;
}

/* Documento / referencia */
.modal-box:has(.mail-modal-title-row) .modal-body>small,
.modal-box:has(.mail-modal-title-row) .modal-head small{
 color:#72869a!important;
 font-size:9px!important;
}
.modal-box:has(.mail-modal-title-row) .modal-head small{
 margin-top:2px!important;
}

/* Nota de adjuntos */
.mail-attach-note{
 display:flex;
 align-items:flex-start;
 gap:7px;
 margin-top:9px;
 padding:9px 10px;
 border:1px solid #d9e6f2;
 border-radius:8px;
 background:#f7fbff;
 color:#5f7489;
 font-size:9px;
 line-height:1.4;
}
.mail-attach-icon{
 width:18px;
 height:18px;
 display:grid;
 place-items:center;
 border-radius:50%;
 background:#e5f5eb;
 color:#16814c;
 font-size:10px;
 font-weight:900;
 flex:0 0 auto;
}

/* Footer / acciones */
.modal-box:has(.mail-modal-title-row) .cash-modal-actions,
.modal-box:has(.mail-modal-title-row) .modal-actions{
 margin-top:16px!important;
 padding-top:12px!important;
 border-top:1px solid #e8edf3!important;
 display:flex!important;
 justify-content:flex-end!important;
 gap:8px!important;
}
.modal-box:has(.mail-modal-title-row) .btn{
 min-height:38px!important;
 height:38px!important;
 padding:0 15px!important;
 border-radius:8px!important;
 font-size:10px!important;
 font-weight:850!important;
}
.modal-box:has(.mail-modal-title-row) .btn-light{
 background:#fff!important;
 border:1px solid #d3deea!important;
 color:#35506a!important;
}
.modal-box:has(.mail-modal-title-row) .btn-primary{
 background:linear-gradient(180deg,#287ae6,#1769d1)!important;
 border:1px solid #1762c2!important;
 color:#fff!important;
 box-shadow:0 4px 10px rgba(23,105,209,.16)!important;
}
.modal-box:has(.mail-modal-title-row) .btn-primary:hover{
 background:linear-gradient(180deg,#2072db,#115fc2)!important;
}

/* Ocultar texto de cierre antiguo si el botón lo conserva */
.modal-box:has(.mail-modal-title-row) .close{
 overflow:hidden!important;
}

@media(max-width:620px){
 .modal-box:has(.mail-modal-title-row){
   max-width:calc(100vw - 24px)!important;
 }
 .mail-modal-title-row strong{font-size:14px!important}
}

/* V116 - Listado de Comprobantes SUNAT profesional */
.cpe-page-pro{
 --cpe-border:#d8e3ef;
 --cpe-border-soft:#e9eef4;
 --cpe-text:#173754;
 --cpe-muted:#718497;
 --cpe-blue:#1769d1;
 --cpe-bg:#f5f8fc;
}
.cpe-page-pro .cpe-page-head{
 margin-bottom:14px!important;
 align-items:flex-end!important;
}
.cpe-page-pro .cpe-page-eyebrow{
 display:block;
 margin-bottom:5px;
 font-size:8px;
 font-weight:900;
 letter-spacing:.09em;
 color:#1769d1;
}
.cpe-page-pro .cpe-page-head h1{
 margin:0!important;
 color:#163754!important;
 font-size:24px!important;
 line-height:1.15!important;
 letter-spacing:-.025em;
}
.cpe-page-pro .cpe-page-head p{
 margin:5px 0 0!important;
 color:#708397!important;
 font-size:11px!important;
}
.cpe-page-pro .cpe-page-head>.btn{
 min-height:40px!important;
 height:40px!important;
 padding:0 16px!important;
 border-radius:9px!important;
 font-size:10px!important;
 font-weight:900!important;
 box-shadow:0 5px 12px rgba(23,105,209,.14)!important;
}

/* Contenedor principal */
.cpe-page-pro .cpe-list-card{
 border:1px solid var(--cpe-border)!important;
 border-radius:13px!important;
 overflow:visible!important;
 background:#fff!important;
 box-shadow:0 9px 28px rgba(29,57,85,.055)!important;
}
.cpe-page-pro .cpe-list-head{
 min-height:72px!important;
 padding:13px 15px!important;
 border-bottom:1px solid var(--cpe-border)!important;
 border-radius:13px 13px 0 0!important;
 background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
 display:flex!important;
 align-items:center!important;
 gap:12px!important;
}
.cpe-page-pro .cpe-list-head>div:first-child{
 display:flex;
 flex-direction:column;
 gap:3px;
 flex:1;
}
.cpe-page-pro .cpe-list-head>div:first-child>span{
 font-size:13px!important;
 font-weight:900!important;
 color:#183b59!important;
}
.cpe-page-pro .cpe-list-sub{
 font-size:9px!important;
 color:#7a8da0!important;
}
.cpe-page-pro .cpe-list-tools{
 display:flex!important;
 align-items:center!important;
 gap:7px!important;
}
.cpe-page-pro .cpe-export-btn{
 min-height:36px!important;
 height:36px!important;
 padding:0 11px!important;
 border:1px solid #d3deea!important;
 border-radius:8px!important;
 background:#fff!important;
 color:#405c75!important;
 font-size:9px!important;
 font-weight:850!important;
}
.cpe-page-pro #cpeSearch{
 width:285px!important;
 height:38px!important;
 min-height:38px!important;
 border:1px solid #cbd8e6!important;
 border-radius:9px!important;
 padding:0 12px!important;
 background:#fff!important;
 font-size:10.5px!important;
}
.cpe-page-pro #cpeSearch:focus{
 outline:none!important;
 border-color:#6ea8e9!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.09)!important;
}

/* Tabla */
.cpe-page-pro .cpe-table-wrap{
 overflow:visible!important;
}
.cpe-page-pro .cpe-table{
 width:100%!important;
 border-collapse:separate!important;
 border-spacing:0!important;
 font-size:10px!important;
}
.cpe-page-pro .cpe-table thead th{
 padding:10px 11px!important;
 background:#f3f7fb!important;
 color:#526a80!important;
 border-bottom:1px solid #d9e3ed!important;
 font-size:8.5px!important;
 font-weight:900!important;
 text-transform:uppercase!important;
 letter-spacing:.045em!important;
 white-space:nowrap!important;
}
.cpe-page-pro .cpe-table tbody td{
 padding:11px 11px!important;
 border-bottom:1px solid #e7edf4!important;
 background:#fff!important;
 color:#29455f!important;
 vertical-align:middle!important;
 line-height:1.35!important;
}
.cpe-page-pro .cpe-table tbody tr{
 transition:background .14s ease,box-shadow .14s ease;
}
.cpe-page-pro .cpe-table tbody tr:hover td{
 background:#f8fbff!important;
}
.cpe-page-pro .cpe-table tbody tr:last-child td{
 border-bottom:0!important;
}
.cpe-page-pro .cpe-row-error td:first-child,
.cpe-page-pro .cpe-row-rechazado td:first-child{
 box-shadow:inset 3px 0 0 #db4c5d;
}
.cpe-page-pro .cpe-row-pendiente td:first-child,
.cpe-page-pro .cpe-row-enviando td:first-child{
 box-shadow:inset 3px 0 0 #dea52c;
}
.cpe-page-pro .cpe-row-aceptado td:first-child{
 box-shadow:inset 3px 0 0 #28a06a;
}

/* Comprobante */
.cpe-page-pro .cpe-doc-cell{
 min-width:138px;
}
.cpe-page-pro .cpe-doc-type{
 display:inline-flex;
 align-items:center;
 padding:3px 7px;
 margin-bottom:5px;
 border-radius:999px;
 font-size:7px;
 font-weight:900;
 letter-spacing:.055em;
}
.cpe-page-pro .cpe-doc-type.invoice{
 background:#eaf3ff;
 color:#1765b7;
 border:1px solid #d5e7fa;
}
.cpe-page-pro .cpe-doc-type.receipt{
 background:#f1f5f8;
 color:#536a7e;
 border:1px solid #e0e7ed;
}
.cpe-page-pro .cpe-doc-number{
 display:block;
 color:#173b5b!important;
 font-size:10.5px!important;
 font-weight:900!important;
 white-space:nowrap;
}

/* Cliente */
.cpe-page-pro .cpe-client-cell{
 min-width:190px;
}
.cpe-page-pro .cpe-client-cell .cpe-client-doc{
 display:block;
 margin-bottom:2px;
 color:#6b8094;
 font-size:8.5px;
 font-weight:800;
}
.cpe-page-pro .cpe-client-cell strong{
 display:block;
 color:#193b59!important;
 font-size:10px!important;
 font-weight:850!important;
 line-height:1.3;
}
.cpe-page-pro .cpe-client-cell small{
 display:block;
 margin-top:2px;
 max-width:210px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 color:#8091a2!important;
 font-size:8px!important;
}

/* Sucursal y fecha */
.cpe-page-pro .cpe-branch-cell{
 color:#50677c!important;
 font-size:9.5px!important;
 font-weight:750;
}
.cpe-page-pro .cpe-date-cell{
 white-space:nowrap;
}
.cpe-page-pro .cpe-date-cell strong{
 display:block;
 font-size:9.5px!important;
 color:#29465f!important;
}
.cpe-page-pro .cpe-date-cell small{
 display:block;
 margin-top:2px;
 color:#8091a2!important;
 font-size:8px!important;
}

/* Total */
.cpe-page-pro .cpe-total-cell{
 min-width:105px;
 white-space:nowrap;
 font-variant-numeric:tabular-nums;
}
.cpe-page-pro .cpe-total-cell strong{
 font-size:11px!important;
 color:#173b5b!important;
}

/* SUNAT */
.cpe-page-pro .cpe-sunat-cell{
 min-width:255px;
 max-width:340px;
}
.cpe-page-pro .cpe-sunat-badge{
 display:inline-flex!important;
 align-items:center!important;
 gap:5px!important;
 min-height:24px!important;
 padding:3px 8px!important;
 border-radius:999px!important;
 border:1px solid transparent!important;
 font-size:7.5px!important;
 font-weight:900!important;
 letter-spacing:.035em!important;
}
.cpe-page-pro .cpe-status-dot{
 width:6px;
 height:6px;
 border-radius:50%;
 background:currentColor;
 opacity:.8;
}
.cpe-page-pro .cpe-sunat-badge.badge-success{
 background:#e9f8ef!important;
 color:#14794a!important;
 border-color:#d0eddb!important;
}
.cpe-page-pro .cpe-sunat-badge.badge-danger{
 background:#fff0f2!important;
 color:#b73345!important;
 border-color:#f1d5da!important;
}
.cpe-page-pro .cpe-sunat-badge.badge-warning{
 background:#fff5de!important;
 color:#93650d!important;
 border-color:#f0dfb4!important;
}
.cpe-page-pro .cpe-sunat-message{
 display:block!important;
 margin-top:5px!important;
 color:#64798d!important;
 font-size:8px!important;
 line-height:1.35!important;
 max-width:330px;
}
.cpe-page-pro .cpe-document-situation{
 display:inline-flex!important;
 margin-top:6px!important;
 padding:3px 6px!important;
 border:1px solid #efcfd4!important;
 border-radius:6px!important;
 background:#fff4f5!important;
 color:#b13c4b!important;
 font-size:6.8px!important;
 font-weight:900!important;
 letter-spacing:.025em!important;
}

/* Notas */
.cpe-page-pro .cpe-notes-cell{
 min-width:135px;
}
.cpe-page-pro .cpe-note-summary{
 display:inline-flex!important;
 align-items:center!important;
 flex-wrap:wrap!important;
 gap:4px!important;
 padding:5px 7px!important;
 border:1px solid #d9e3ed!important;
 border-radius:8px!important;
 background:#fff!important;
 cursor:pointer!important;
}
.cpe-page-pro .cpe-note-summary:hover{
 background:#f7faff!important;
 border-color:#bfd3e8!important;
}
.cpe-page-pro .cpe-note-badge{
 padding:3px 5px!important;
 border-radius:999px!important;
 font-size:7px!important;
 font-weight:900!important;
}
.cpe-page-pro .cpe-note-badge.nc{
 background:#fff0f2!important;
 color:#b23a49!important;
}
.cpe-page-pro .cpe-note-badge.nd{
 background:#eef5ff!important;
 color:#286aaa!important;
}
.cpe-page-pro .cpe-note-number{
 color:#536b80!important;
 font-size:7.5px!important;
}

/* Acciones */
.cpe-page-pro .cpe-actions-cell{
 min-width:205px;
}
.cpe-page-pro .cpe-actions-compact{
 display:flex!important;
 align-items:center!important;
 justify-content:flex-end!important;
 gap:6px!important;
 flex-wrap:nowrap!important;
}
.cpe-page-pro .cpe-actions-compact .btn{
 min-height:30px!important;
 height:30px!important;
 padding:0 9px!important;
 border-radius:7px!important;
 font-size:8px!important;
 font-weight:850!important;
 white-space:nowrap!important;
 box-shadow:none!important;
}
.cpe-page-pro .cpe-main-action{
 background:#e8f8ef!important;
 border:1px solid #c9ead7!important;
 color:#127548!important;
}
.cpe-page-pro .cpe-main-action:hover{
 background:#dcf4e6!important;
}
.cpe-page-pro .cpe-whatsapp{
 background:#ecfbf1!important;
 border:1px solid #c8ecd5!important;
 color:#128248!important;
}
.cpe-page-pro .cpe-more-toggle{
 background:#fff!important;
 border:1px solid #d3deea!important;
 color:#39546e!important;
}
.cpe-page-pro .cpe-more-menu{
 min-width:220px!important;
 border:1px solid #d8e2ec!important;
 border-radius:10px!important;
 background:#fff!important;
 box-shadow:0 14px 36px rgba(27,52,78,.15)!important;
 padding:6px!important;
 z-index:50!important;
}
.cpe-page-pro .cpe-menu-label{
 padding:7px 8px 4px!important;
 color:#8392a2!important;
 font-size:6.8px!important;
 font-weight:900!important;
 letter-spacing:.08em!important;
}
.cpe-page-pro .cpe-menu-item{
 min-height:32px!important;
 padding:6px 8px!important;
 border-radius:6px!important;
 color:#34516b!important;
 font-size:8.5px!important;
 gap:7px!important;
}
.cpe-page-pro .cpe-menu-item:hover{
 background:#f2f7fd!important;
 color:#1766be!important;
}

/* Paginación */
.cpe-page-pro .cpe-pagination{
 min-height:58px!important;
 padding:10px 13px!important;
 border-top:1px solid #dde6ef!important;
 background:#fbfcfe!important;
 border-radius:0 0 13px 13px!important;
}
.cpe-page-pro .cpe-pagination,
.cpe-page-pro .cpe-page-size,
.cpe-page-pro .cpe-page-info{
 color:#6b7f92!important;
 font-size:9px!important;
}
.cpe-page-pro #cpePageSize{
 height:34px!important;
 min-height:34px!important;
 border-radius:7px!important;
 font-size:9px!important;
}
.cpe-page-pro .cpe-page-buttons .btn,
.cpe-page-pro .cpe-page-numbers .btn{
 min-height:32px!important;
 height:32px!important;
 border-radius:7px!important;
 font-size:8.5px!important;
}

/* Empty / responsive */
@media(max-width:1350px){
 .cpe-page-pro .cpe-table thead th,
 .cpe-page-pro .cpe-table tbody td{padding-left:8px!important;padding-right:8px!important}
 .cpe-page-pro .cpe-sunat-cell{min-width:220px}
 .cpe-page-pro .cpe-actions-cell{min-width:190px}
}
@media(max-width:1050px){
 .cpe-page-pro .cpe-table-wrap{overflow:auto!important}
 .cpe-page-pro .cpe-table{min-width:1080px!important}
}
@media(max-width:700px){
 .cpe-page-pro .cpe-page-head{align-items:flex-start!important;flex-direction:column!important;gap:10px!important}
 .cpe-page-pro .cpe-list-head{align-items:stretch!important;flex-direction:column!important}
 .cpe-page-pro .cpe-list-tools{flex-wrap:wrap!important}
 .cpe-page-pro #cpeSearch{width:100%!important}
}

/* V117 - Modal Enviar por correo profesional */
.cpe-mail-dialog{
 border:0!important;
 padding:0!important;
 width:min(590px,calc(100% - 28px))!important;
 max-width:590px!important;
 border-radius:16px!important;
 background:#fff!important;
 box-shadow:0 26px 80px rgba(19,43,67,.24)!important;
 overflow:hidden!important;
}
.cpe-mail-dialog::backdrop{
 background:rgba(24,39,55,.38)!important;
 backdrop-filter:blur(1.5px);
}
.cpe-mail-form{margin:0!important}
.cpe-mail-header{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:14px;
 padding:18px 20px 16px;
 border-bottom:1px solid #e2e9f0;
 background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);
}
.cpe-mail-heading{
 display:flex;
 align-items:flex-start;
 gap:11px;
 min-width:0;
}
.cpe-mail-icon{
 width:42px;
 height:42px;
 flex:0 0 auto;
 display:grid;
 place-items:center;
 border-radius:11px;
 background:linear-gradient(145deg,#e7f2ff,#dcecff);
 border:1px solid #cfe2f7;
 color:#1769d1;
 font-size:18px;
 font-weight:900;
}
.cpe-mail-heading>div:last-child{
 display:flex;
 flex-direction:column;
 gap:2px;
 min-width:0;
}
.cpe-mail-kicker{
 font-size:7.5px;
 font-weight:900;
 letter-spacing:.09em;
 color:#6e8295;
}
.cpe-mail-heading h3{
 margin:1px 0 0!important;
 color:#173a59!important;
 font-size:17px!important;
 line-height:1.18!important;
 font-weight:900!important;
 letter-spacing:-.015em;
}
.cpe-mail-heading p{
 margin:3px 0 0!important;
 color:#7b8fa2!important;
 font-size:9px!important;
 line-height:1.4!important;
}
.cpe-mail-close{
 width:34px;
 height:34px;
 flex:0 0 auto;
 display:grid;
 place-items:center;
 border:1px solid #d5e0ea;
 border-radius:9px;
 background:#fff;
 color:#5b7287;
 font-size:19px;
 line-height:1;
 cursor:pointer;
 transition:.15s ease;
}
.cpe-mail-close:hover{
 background:#f4f8fc;
 color:#223f59;
 border-color:#c3d3e1;
}
.cpe-mail-body{padding:17px 20px 18px}
.cpe-mail-document-card{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 margin-bottom:15px;
 padding:10px 12px;
 border:1px solid #dce6f0;
 border-radius:10px;
 background:#f8fbff;
}
.cpe-mail-document-card>div:first-child{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.cpe-mail-document-card>div:first-child span{
 color:#7c90a3;
 font-size:7px;
 font-weight:900;
 letter-spacing:.06em;
}
.cpe-mail-document-card>div:first-child strong{
 color:#274a68;
 font-size:11px;
 font-weight:900;
}
.cpe-mail-ready{
 display:inline-flex;
 align-items:center;
 gap:5px;
 padding:5px 8px;
 border:1px solid #d2eadb;
 border-radius:999px;
 background:#ecf8f0;
 color:#167a49;
 font-size:7.5px;
 font-weight:900;
 white-space:nowrap;
}
.cpe-mail-ready span{
 width:15px;
 height:15px;
 display:grid;
 place-items:center;
 border-radius:50%;
 background:#d8f1e2;
}
.cpe-mail-field{
 display:flex;
 flex-direction:column;
 gap:3px;
}
.cpe-mail-field label{
 color:#294760!important;
 font-size:10.5px!important;
 font-weight:900!important;
}
.cpe-mail-field label b{color:#d24958}
.cpe-mail-field>small{
 margin-bottom:5px;
 color:#7d90a3;
 font-size:8px;
}
.cpe-mail-input-wrap{
 position:relative;
 display:flex;
 align-items:center;
}
.cpe-mail-input-wrap>span{
 position:absolute;
 left:12px;
 z-index:1;
 color:#7190ad;
 font-size:12px;
 pointer-events:none;
}
.cpe-mail-input-wrap input{
 width:100%!important;
 height:44px!important;
 min-height:44px!important;
 padding:0 13px 0 36px!important;
 border:1px solid #cbd8e5!important;
 border-radius:9px!important;
 background:#fff!important;
 color:#213f5a!important;
 font-size:11.5px!important;
 box-shadow:inset 0 1px 2px rgba(29,53,76,.025)!important;
}
.cpe-mail-input-wrap input:focus{
 outline:none!important;
 border-color:#4d95e7!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.10)!important;
}
.cpe-mail-attachments{
 display:flex;
 align-items:flex-start;
 gap:9px;
 margin-top:13px;
 padding:10px 11px;
 border:1px solid #dce7f1;
 border-radius:9px;
 background:#f8fbfe;
}
.cpe-mail-attachments-icon{
 width:21px;
 height:21px;
 flex:0 0 auto;
 display:grid;
 place-items:center;
 border-radius:50%;
 background:#e2f4e9;
 color:#16814c;
 font-size:10px;
 font-weight:900;
}
.cpe-mail-attachments>div:last-child{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.cpe-mail-attachments strong{
 color:#35566f;
 font-size:9px;
}
.cpe-mail-attachments span{
 color:#74889b;
 font-size:8px;
 line-height:1.35;
}
.cpe-mail-footer{
 display:flex;
 justify-content:flex-end;
 align-items:center;
 gap:8px;
 padding:13px 20px 16px;
 border-top:1px solid #e5ecf2;
 background:#fbfcfe;
}
.cpe-mail-footer .btn{
 min-height:39px!important;
 height:39px!important;
 padding:0 16px!important;
 border-radius:8px!important;
 font-size:10px!important;
 font-weight:900!important;
}
.cpe-mail-footer .btn-light{
 background:#fff!important;
 border:1px solid #d1dce8!important;
 color:#36516b!important;
}
.cpe-mail-send{
 min-width:136px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:5px!important;
 background:linear-gradient(180deg,#287ae6,#1769d1)!important;
 border:1px solid #1762c3!important;
 color:#fff!important;
 box-shadow:0 5px 12px rgba(23,105,209,.16)!important;
}
.cpe-mail-send:hover{
 background:linear-gradient(180deg,#2172db,#115fc0)!important;
}
@media(max-width:600px){
 .cpe-mail-dialog{width:calc(100% - 18px)!important}
 .cpe-mail-header{padding:15px!important}
 .cpe-mail-body{padding:14px 15px!important}
 .cpe-mail-footer{padding:12px 15px 14px!important}
 .cpe-mail-document-card{align-items:flex-start;flex-direction:column!important}
 .cpe-mail-footer{display:grid!important;grid-template-columns:1fr 1fr!important}
 .cpe-mail-footer .btn{width:100%!important}
}

/* =========================================================
   V118 - SISTEMA VISUAL CORPORATIVO GLOBAL
   Línea visual basada en Comprobantes SUNAT V116/V117
   ========================================================= */
:root{
 --ui-primary:#1769d1;
 --ui-primary-dark:#0f57b7;
 --ui-primary-soft:#eaf3ff;
 --ui-success:#16814c;
 --ui-success-soft:#e9f8ef;
 --ui-warning:#93650d;
 --ui-warning-soft:#fff5de;
 --ui-danger:#b73345;
 --ui-danger-soft:#fff0f2;
 --ui-text:#173754;
 --ui-text-2:#294760;
 --ui-muted:#718497;
 --ui-border:#d8e3ef;
 --ui-border-soft:#e7edf4;
 --ui-surface:#fff;
 --ui-bg:#f4f7fb;
 --ui-shadow:0 8px 26px rgba(29,57,85,.055);
 --ui-shadow-soft:0 3px 10px rgba(29,57,85,.04);
 --ui-radius:12px;
 --ui-radius-sm:8px;
}

/* Base */
body{
 background:var(--ui-bg)!important;
 color:var(--ui-text-2)!important;
}
main,.main-content,.content,.page-content{
 color:var(--ui-text-2);
}
h1,h2,h3,h4,h5,h6{
 color:var(--ui-text)!important;
 letter-spacing:-.01em;
}

/* Encabezados de página */
.page-head{
 margin-bottom:14px!important;
 align-items:flex-end!important;
 gap:12px!important;
}
.page-head h1{
 margin:0!important;
 color:var(--ui-text)!important;
 font-size:24px!important;
 line-height:1.14!important;
 font-weight:900!important;
 letter-spacing:-.025em!important;
}
.page-head p{
 margin:5px 0 0!important;
 color:var(--ui-muted)!important;
 font-size:11px!important;
 line-height:1.45!important;
}
.page-head>.btn,
.page-head .btn-primary{
 min-height:40px!important;
 height:40px!important;
 padding:0 16px!important;
 border-radius:9px!important;
 font-size:10px!important;
 font-weight:900!important;
}

/* Tarjetas / paneles */
.card,
.panel,
.box,
.section-card,
.form-card,
.summary-card{
 border:1px solid var(--ui-border)!important;
 border-radius:var(--ui-radius)!important;
 background:var(--ui-surface)!important;
 box-shadow:var(--ui-shadow)!important;
}
.card-head,
.panel-head,
.section-head,
.box-head{
 min-height:62px;
 padding:12px 14px!important;
 border-bottom:1px solid var(--ui-border)!important;
 background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
}
.card-head strong,
.panel-head strong,
.section-head strong{
 color:var(--ui-text)!important;
 font-weight:900!important;
}
.card-head small,
.panel-head small,
.section-head small{
 color:var(--ui-muted)!important;
}

/* Tablas */
.table-wrap{
 border-radius:0 0 var(--ui-radius) var(--ui-radius);
}
.table{
 width:100%;
 border-collapse:separate!important;
 border-spacing:0!important;
 background:#fff!important;
}
.table thead th{
 padding:10px 11px!important;
 background:#f3f7fb!important;
 color:#526a80!important;
 border-bottom:1px solid var(--ui-border)!important;
 font-size:8.5px!important;
 font-weight:900!important;
 text-transform:uppercase!important;
 letter-spacing:.04em!important;
 white-space:nowrap;
}
.table tbody td{
 padding:11px 11px!important;
 border-bottom:1px solid var(--ui-border-soft)!important;
 background:#fff!important;
 color:#29455f!important;
 font-size:10px!important;
 line-height:1.35!important;
 vertical-align:middle!important;
}
.table tbody tr:hover td{
 background:#f8fbff!important;
}
.table tbody tr:last-child td{
 border-bottom:0!important;
}
.table td strong{
 color:#173b5b!important;
 font-weight:850!important;
}
.table td small{
 color:#7f91a2!important;
}
.table .num{
 font-variant-numeric:tabular-nums;
}

/* Formularios */
.field label,
.form-group label,
.form-label{
 display:block;
 margin-bottom:5px;
 color:#294760!important;
 font-size:9.5px!important;
 font-weight:850!important;
}
.field small,
.form-group small,
.help-text,
.form-help{
 color:#7b8ea1!important;
 font-size:8px!important;
 line-height:1.4!important;
}
.input,
.select,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="password"],
select{
 border:1px solid #cbd8e6!important;
 border-radius:8px!important;
 background:#fff!important;
 color:#223f5a!important;
 font-size:10.5px!important;
 box-shadow:inset 0 1px 2px rgba(30,55,80,.025)!important;
 transition:border-color .15s,box-shadow .15s,background .15s!important;
}
.input,
.select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="password"],
select{
 min-height:38px!important;
}
textarea{
 min-height:72px!important;
 padding:10px 11px!important;
}
.input:focus,
.select:focus,
textarea:focus,
input:focus,
select:focus{
 outline:none!important;
 border-color:#5a9ce7!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.09)!important;
}
input::placeholder,textarea::placeholder{
 color:#9aa9b7!important;
}

/* Botones */
.btn{
 border-radius:8px!important;
 font-weight:850!important;
 box-shadow:none!important;
 transition:background .15s,border-color .15s,transform .08s,box-shadow .15s!important;
}
.btn:hover{
 transform:translateY(-1px);
}
.btn-primary{
 background:linear-gradient(180deg,#287ae6,#1769d1)!important;
 border:1px solid #1762c3!important;
 color:#fff!important;
 box-shadow:0 4px 10px rgba(23,105,209,.13)!important;
}
.btn-primary:hover{
 background:linear-gradient(180deg,#2172db,#115fc0)!important;
}
.btn-light,.btn-secondary{
 background:#fff!important;
 border:1px solid #d1dce8!important;
 color:#36516b!important;
}
.btn-light:hover,.btn-secondary:hover{
 background:#f7faff!important;
 border-color:#c3d2e1!important;
}

/* Badges / estados */
.badge,
.status,
.status-badge,
.fin-status{
 border-radius:999px!important;
 font-weight:900!important;
 letter-spacing:.025em!important;
}
.badge-success,.status-success,.success{
 background:var(--ui-success-soft)!important;
 color:#14794a!important;
}
.badge-danger,.status-danger,.danger{
 background:var(--ui-danger-soft)!important;
 color:#b73345!important;
}
.badge-warning,.status-warning,.warning{
 background:var(--ui-warning-soft)!important;
 color:#93650d!important;
}

/* Navegación tipo tabs */
.tabs,.nav-tabs,.module-tabs,.fin-tabs{
 padding:5px!important;
 border:1px solid var(--ui-border)!important;
 border-radius:11px!important;
 background:#f8fafc!important;
 gap:4px!important;
}
.tabs a,.nav-tabs a,.module-tabs a,.fin-tabs a,
.tabs button,.nav-tabs button,.module-tabs button,.fin-tabs button{
 min-height:34px!important;
 padding:0 13px!important;
 border-radius:7px!important;
 font-size:9px!important;
 font-weight:850!important;
 color:#405a72!important;
}
.tabs .active,.nav-tabs .active,.module-tabs .active,.fin-tabs .active{
 background:var(--ui-primary)!important;
 color:#fff!important;
 box-shadow:0 3px 8px rgba(23,105,209,.18)!important;
}

/* Modales generales */
.modal-box,
dialog:not(.cpe-mail-dialog){
 border:1px solid #d6e1ec!important;
 border-radius:14px!important;
 background:#fff!important;
 box-shadow:0 22px 60px rgba(20,44,69,.17)!important;
 overflow:hidden;
}
.modal-head{
 padding:14px 16px!important;
 border-bottom:1px solid #e1e8f0!important;
 background:linear-gradient(180deg,#fff,#fafcff)!important;
}
.modal-head strong{
 color:#173a59!important;
 font-size:14px!important;
 font-weight:900!important;
}
.modal-head small{
 color:#7b8fa2!important;
 font-size:8.5px!important;
}
.modal-body{
 padding:15px 16px!important;
}
.close{
 border-radius:8px!important;
}

/* Alertas */
.alert,
.notice,
.message-box{
 border-radius:9px!important;
 border-width:1px!important;
 box-shadow:none!important;
}
.alert-success{
 background:#eef9f2!important;
 border-color:#cfead9!important;
 color:#176c45!important;
}
.alert-danger{
 background:#fff2f4!important;
 border-color:#efd1d7!important;
 color:#a93646!important;
}
.alert-warning{
 background:#fff8e8!important;
 border-color:#eedaa8!important;
 color:#845d10!important;
}

/* Buscadores / toolbars */
.toolbar,
.list-toolbar,
.table-toolbar{
 display:flex;
 align-items:center;
 gap:8px;
}
.toolbar .input,
.list-toolbar .input,
.table-toolbar .input{
 border-radius:9px!important;
}

/* Resúmenes / KPI */
.stat-card,
.kpi-card,
.dashboard-card,
.metric-card{
 border:1px solid var(--ui-border)!important;
 border-radius:12px!important;
 background:linear-gradient(180deg,#fff,#fbfdff)!important;
 box-shadow:var(--ui-shadow-soft)!important;
}
.stat-card strong,
.kpi-card strong,
.metric-card strong{
 color:#123759!important;
 font-weight:900!important;
}

/* Paginación */
.pagination,
.table-pagination,
.dt-footer{
 border-top-color:#dde6ef!important;
}
.pagination .btn,
.pagination button,
.table-pagination button{
 border-radius:7px!important;
 min-height:32px!important;
}
.pagination .active,
.table-pagination .active{
 background:var(--ui-primary)!important;
 color:#fff!important;
 border-color:var(--ui-primary)!important;
}

/* File upload */
.fin-file-upload,
.file-upload,
.upload-box{
 border:1px solid #d6e1ec!important;
 border-radius:9px!important;
 background:#fbfdff!important;
}

/* Menús desplegables */
.dropdown-menu,
.menu-popover,
.cpe-more-menu{
 border:1px solid #d8e2ec!important;
 border-radius:10px!important;
 background:#fff!important;
 box-shadow:0 14px 36px rgba(27,52,78,.14)!important;
}
.dropdown-menu a,
.dropdown-menu button,
.menu-popover a,
.menu-popover button{
 border-radius:6px!important;
}

/* Encabezados de pasos / bloques */
.step-head,
.section-title,
.form-section-title{
 color:var(--ui-text)!important;
 font-weight:900!important;
}
.step-number,
.section-number{
 border-radius:8px!important;
 background:var(--ui-primary-soft)!important;
 color:var(--ui-primary)!important;
 font-weight:900!important;
}

/* Scrollbars discretos */
*{
 scrollbar-width:thin;
 scrollbar-color:#c6d4e2 transparent;
}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#c6d4e2;border-radius:999px}
::-webkit-scrollbar-track{background:transparent}

/* Responsive */
@media(max-width:900px){
 .page-head{
  align-items:flex-start!important;
  flex-direction:column!important;
 }
 .card-head,.panel-head,.section-head{
  min-height:auto!important;
 }
 .table-wrap{overflow:auto!important}
}
@media(max-width:650px){
 .page-head h1{font-size:21px!important}
 .card,.panel,.box{border-radius:10px!important}
}

/* Módulos de configuración */
.settings-card,
.config-card,
.config-section{
 border:1px solid var(--ui-border)!important;
 border-radius:12px!important;
 background:#fff!important;
 box-shadow:var(--ui-shadow)!important;
}
.settings-sidebar,
.config-sidebar{
 border:1px solid var(--ui-border)!important;
 border-radius:12px!important;
 background:#fff!important;
}
.settings-sidebar .active,
.config-sidebar .active{
 background:#eaf3ff!important;
 color:#1769d1!important;
}

/* Caja / compras / ventas / inventario / clientes / proveedores */
.sale-card,.purchase-card,.cash-card,.inventory-card,.client-card,.supplier-card{
 border:1px solid var(--ui-border)!important;
 border-radius:12px!important;
 background:#fff!important;
 box-shadow:var(--ui-shadow)!important;
}
.sale-section,.purchase-section,.cash-section,.inventory-section{
 border-color:var(--ui-border)!important;
}

/* Homogeneizar tablas de todos los módulos específicos */
#tbCpe,
#tbProductos,
#tbClientes,
#tbProveedores,
#tbCompras,
#tbVentas,
#tbKardex,
#tbCaja,
#tbCotizaciones{
 font-size:10px!important;
}

/* =========================================================
   V119 - LISTADOS ERP PROFESIONALES GLOBALES
   Apariencia uniforme basada en la referencia del usuario
   ========================================================= */

/* Tarjeta de listado */
.ui-pro-system .card:has(.table),
.ui-pro-system .panel:has(.table),
.ui-pro-system .box:has(.table){
 border:1px solid #dce5ef!important;
 border-radius:12px!important;
 background:#fff!important;
 box-shadow:0 6px 22px rgba(29,57,85,.045)!important;
 overflow:visible!important;
}

/* Tabla: más limpia, compacta y legible */
.ui-pro-system .table{
 border-collapse:separate!important;
 border-spacing:0!important;
 background:#fff!important;
}
.ui-pro-system .table thead th{
 height:42px!important;
 padding:10px 12px!important;
 background:#f7f9fc!important;
 color:#3c536a!important;
 border-top:0!important;
 border-bottom:1px solid #dce5ee!important;
 font-size:9.5px!important;
 line-height:1.15!important;
 font-weight:900!important;
 text-transform:none!important;
 letter-spacing:.01em!important;
 vertical-align:middle!important;
 white-space:nowrap!important;
}
.ui-pro-system .table tbody td{
 min-height:48px!important;
 padding:11px 12px!important;
 background:#fff!important;
 color:#3c4b59!important;
 border-bottom:1px solid #edf1f5!important;
 font-size:10px!important;
 line-height:1.25!important;
 vertical-align:middle!important;
}
.ui-pro-system .table tbody tr{
 transition:background .12s ease;
}
.ui-pro-system .table tbody tr:hover td{
 background:#f9fbfd!important;
}
.ui-pro-system .table tbody tr:last-child td{
 border-bottom:0!important;
}
.ui-pro-system .table tbody td strong{
 color:#22384f!important;
 font-size:10.3px!important;
 font-weight:850!important;
}
.ui-pro-system .table tbody td small{
 color:#7e8e9d!important;
 font-size:8px!important;
}
.ui-pro-system .table .num,
.ui-pro-system .table td.num{
 text-align:right!important;
 font-variant-numeric:tabular-nums!important;
 white-space:nowrap!important;
}

/* Columna Acciones */
.ui-pro-system .table th:last-child{
 text-align:center!important;
}
.ui-pro-system .table td:last-child{
 position:relative!important;
 text-align:right!important;
 white-space:nowrap!important;
}

/* Botones pequeños de acción tipo referencia */
.ui-pro-system .table .btn.btn-sm,
.ui-pro-system .table .btn-icon,
.ui-pro-system .table .cpe-actions-compact .btn,
.ui-pro-system .table .table-action-btn,
.ui-pro-system .table .actions-cell .btn,
.ui-pro-system .table .cpe-more-toggle{
 width:32px!important;
 min-width:32px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 display:inline-grid!important;
 place-items:center!important;
 border:1px solid #d7e8f7!important;
 border-radius:10px!important;
 background:#edf7ff!important;
 color:#3ca0e8!important;
 font-size:11px!important;
 box-shadow:none!important;
 transform:none!important;
}
.ui-pro-system .table .btn.btn-sm:hover,
.ui-pro-system .table .btn-icon:hover,
.ui-pro-system .table .cpe-actions-compact .btn:hover,
.ui-pro-system .table .table-action-btn:hover,
.ui-pro-system .table .actions-cell .btn:hover,
.ui-pro-system .table .cpe-more-toggle:hover{
 background:#e2f2ff!important;
 border-color:#bedef6!important;
 color:#167fc7!important;
 transform:none!important;
}

/* Cuando una acción principal tiene texto, conservar formato compacto rectangular */
.ui-pro-system .table .btn.btn-primary:not(.btn-icon):not(.cpe-more-toggle),
.ui-pro-system .table .btn.btn-light:not(.btn-icon):not(.cpe-more-toggle){
 width:auto!important;
 min-width:0!important;
 padding:0 10px!important;
 border-radius:8px!important;
}

/* Grupo de acciones */
.ui-pro-system .table .actions,
.ui-pro-system .table .table-actions,
.ui-pro-system .table .cpe-actions-compact,
.ui-pro-system .table .action-buttons{
 display:flex!important;
 justify-content:flex-end!important;
 align-items:center!important;
 gap:5px!important;
 flex-wrap:nowrap!important;
}

/* Menú flotante tipo "Personalizar acciones" */
.ui-pro-system .dropdown-menu,
.ui-pro-system .menu-popover,
.ui-pro-system .cpe-more-menu,
.ui-pro-system .table-actions-menu,
.ui-pro-system .actions-menu{
 min-width:210px!important;
 max-height:355px!important;
 overflow-y:auto!important;
 padding:7px!important;
 border:1px solid #d8e2ec!important;
 border-radius:9px!important;
 background:#fff!important;
 box-shadow:0 12px 32px rgba(28,49,70,.18)!important;
 z-index:9999!important;
}
.ui-pro-system .dropdown-menu:before,
.ui-pro-system .menu-popover:before,
.ui-pro-system .cpe-more-menu:before,
.ui-pro-system .table-actions-menu:before,
.ui-pro-system .actions-menu:before{
 content:"Personalizar acciones";
 display:block;
 margin:0 -1px 6px!important;
 padding:5px 7px 7px!important;
 border-bottom:1px solid #e7edf3!important;
 color:#415469!important;
 font-size:9px!important;
 font-weight:900!important;
 line-height:1.2!important;
}
.ui-pro-system .dropdown-menu a,
.ui-pro-system .dropdown-menu button,
.ui-pro-system .menu-popover a,
.ui-pro-system .menu-popover button,
.ui-pro-system .cpe-more-menu a,
.ui-pro-system .cpe-more-menu button,
.ui-pro-system .table-actions-menu a,
.ui-pro-system .table-actions-menu button,
.ui-pro-system .actions-menu a,
.ui-pro-system .actions-menu button{
 width:100%!important;
 min-height:30px!important;
 display:flex!important;
 align-items:center!important;
 gap:7px!important;
 padding:6px 7px!important;
 border:0!important;
 border-radius:6px!important;
 background:#fff!important;
 color:#41566d!important;
 font-size:9px!important;
 font-weight:600!important;
 text-align:left!important;
 white-space:nowrap!important;
 box-shadow:none!important;
}
.ui-pro-system .dropdown-menu a:hover,
.ui-pro-system .dropdown-menu button:hover,
.ui-pro-system .menu-popover a:hover,
.ui-pro-system .menu-popover button:hover,
.ui-pro-system .cpe-more-menu a:hover,
.ui-pro-system .cpe-more-menu button:hover,
.ui-pro-system .table-actions-menu a:hover,
.ui-pro-system .table-actions-menu button:hover,
.ui-pro-system .actions-menu a:hover,
.ui-pro-system .actions-menu button:hover{
 background:#f5f9fd!important;
 color:#176fc1!important;
 transform:none!important;
}

/* Iconos de menú */
.ui-pro-system .dropdown-menu a>span:first-child,
.ui-pro-system .dropdown-menu button>span:first-child,
.ui-pro-system .cpe-more-menu .cpe-menu-icon,
.ui-pro-system .menu-popover .menu-icon{
 color:#38a0ec!important;
}

/* Acciones críticas */
.ui-pro-system .dropdown-menu .danger,
.ui-pro-system .dropdown-menu .text-danger,
.ui-pro-system .cpe-more-menu .danger,
.ui-pro-system .cpe-more-menu .text-danger{
 color:#d84a58!important;
}
.ui-pro-system .dropdown-menu .danger:hover,
.ui-pro-system .cpe-more-menu .danger:hover{
 background:#fff3f5!important;
 color:#c63b49!important;
}

/* Barra superior de listados */
.ui-pro-system .card-head:has(.input),
.ui-pro-system .list-toolbar,
.ui-pro-system .table-toolbar{
 background:#fff!important;
 border-bottom:1px solid #e1e8ef!important;
}
.ui-pro-system .card-head .input,
.ui-pro-system .list-toolbar .input,
.ui-pro-system .table-toolbar .input{
 height:38px!important;
 border-radius:8px!important;
}

/* Paginación limpia */
.ui-pro-system .pagination,
.ui-pro-system .table-pagination,
.ui-pro-system .dt-footer{
 background:#fff!important;
 border-top:1px solid #e8edf3!important;
}
.ui-pro-system .pagination button,
.ui-pro-system .pagination .btn,
.ui-pro-system .table-pagination button{
 min-width:32px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 9px!important;
 border:1px solid #dde5ed!important;
 border-radius:8px!important;
 background:#fff!important;
 color:#4c6277!important;
}
.ui-pro-system .pagination .active,
.ui-pro-system .table-pagination .active{
 background:#1769d1!important;
 border-color:#1769d1!important;
 color:#fff!important;
}

/* Scroll del menú de acciones */
.ui-pro-system .dropdown-menu::-webkit-scrollbar,
.ui-pro-system .cpe-more-menu::-webkit-scrollbar,
.ui-pro-system .menu-popover::-webkit-scrollbar{
 width:7px;
}
.ui-pro-system .dropdown-menu::-webkit-scrollbar-thumb,
.ui-pro-system .cpe-more-menu::-webkit-scrollbar-thumb,
.ui-pro-system .menu-popover::-webkit-scrollbar-thumb{
 background:#a9aeb3;
 border-radius:999px;
}

/* Responsive */
@media(max-width:1100px){
 .ui-pro-system .table-wrap{
   overflow:auto!important;
 }
 .ui-pro-system .table{
   min-width:900px;
 }
}

/* V120 - Corrección profesional de botones de acciones en listados */
.ui-pro-system .cpe-actions-cell{
 min-width:245px!important;
}
.ui-pro-system .cpe-actions-compact{
 display:flex!important;
 justify-content:flex-end!important;
 align-items:center!important;
 gap:6px!important;
 flex-wrap:nowrap!important;
}
.ui-pro-system .cpe-actions-compact .cpe-action-text,
.ui-pro-system .cpe-actions-compact .cpe-main-action,
.ui-pro-system .cpe-actions-compact .cpe-whatsapp{
 width:auto!important;
 min-width:74px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 10px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:5px!important;
 border-radius:9px!important;
 font-size:8.5px!important;
 font-weight:850!important;
 line-height:1!important;
 white-space:nowrap!important;
 overflow:visible!important;
 text-overflow:clip!important;
}
.ui-pro-system .cpe-actions-compact .cpe-main-action{
 background:#eaf8ef!important;
 border:1px solid #c9ead6!important;
 color:#14784a!important;
}
.ui-pro-system .cpe-actions-compact .cpe-main-action:hover{
 background:#def4e7!important;
 border-color:#b9dfc8!important;
}
.ui-pro-system .cpe-actions-compact .cpe-whatsapp{
 min-width:86px!important;
 background:#ecfaf2!important;
 border:1px solid #ccebd8!important;
 color:#14844d!important;
}
.ui-pro-system .cpe-actions-compact .cpe-whatsapp:hover{
 background:#e2f7eb!important;
 border-color:#bfe3cc!important;
}
.ui-pro-system .cpe-actions-compact .cpe-action-more,
.ui-pro-system .cpe-actions-compact .cpe-more-toggle{
 width:34px!important;
 min-width:34px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 border:1px solid #d6e4f0!important;
 border-radius:9px!important;
 background:#f1f7fc!important;
 color:#3d6f9b!important;
 font-size:0!important;
}
.ui-pro-system .cpe-actions-compact .cpe-action-more::before,
.ui-pro-system .cpe-actions-compact .cpe-more-toggle::before{
 content:"⋮";
 font-size:18px!important;
 line-height:1!important;
 font-weight:700!important;
 color:#4b7da8!important;
}
.ui-pro-system .cpe-actions-compact .cpe-action-more:hover,
.ui-pro-system .cpe-actions-compact .cpe-more-toggle:hover{
 background:#e7f2fb!important;
 border-color:#bfd7ea!important;
}
.ui-pro-system .cpe-actions-compact .btn svg,
.ui-pro-system .cpe-actions-compact .btn i{
 flex:0 0 auto!important;
}

/* Evitar que la regla global V119 convierta botones con texto en cuadrados */
.ui-pro-system .table .cpe-actions-compact .cpe-action-text{
 width:auto!important;
 min-width:74px!important;
 padding:0 10px!important;
 display:inline-flex!important;
}

/* Menú Más mejor posicionado y con ancho estable */
.ui-pro-system .cpe-actions-cell .cpe-more-menu{
 min-width:225px!important;
 right:0!important;
 left:auto!important;
 top:calc(100% + 5px)!important;
}
.ui-pro-system .cpe-actions-cell .cpe-more-menu:before{
 content:"Acciones del comprobante"!important;
}

/* En pantallas medianas ocultar texto secundario antes de apretar botones */
@media(max-width:1280px){
 .ui-pro-system .cpe-actions-cell{min-width:220px!important}
 .ui-pro-system .cpe-actions-compact .cpe-action-text,
 .ui-pro-system .cpe-actions-compact .cpe-main-action{
   min-width:68px!important;
   padding:0 8px!important;
   font-size:8px!important;
 }
 .ui-pro-system .cpe-actions-compact .cpe-whatsapp{
   min-width:80px!important;
 }
}
@media(max-width:1050px){
 .ui-pro-system .cpe-table{min-width:1120px!important}
}

/* =========================================================
   V121 - CORRECCION DEFINITIVA COLUMNA ACCIONES
   Evita solapamiento, salto de línea y botones deformados
   ========================================================= */

/* Dar espacio real a la columna de acciones */
.ui-pro-system .cpe-table th:last-child,
.ui-pro-system .cpe-table td:last-child,
.ui-pro-system #tbCpe th:last-child,
.ui-pro-system #tbCpe td:last-child{
 width:285px!important;
 min-width:285px!important;
 max-width:285px!important;
 text-align:right!important;
 white-space:nowrap!important;
}

/* Contenedor siempre horizontal */
.ui-pro-system .cpe-actions-cell,
.ui-pro-system .cpe-actions-compact{
 min-width:270px!important;
 width:100%!important;
 display:flex!important;
 flex-direction:row!important;
 flex-wrap:nowrap!important;
 justify-content:flex-end!important;
 align-items:center!important;
 gap:6px!important;
 overflow:visible!important;
 white-space:nowrap!important;
}

/* Acciones principales: nunca convertirlas en cuadrados */
.ui-pro-system .cpe-actions-compact .btn:not(.cpe-more-toggle):not(.cpe-action-more),
.ui-pro-system .cpe-actions-cell .btn:not(.cpe-more-toggle):not(.cpe-action-more){
 width:auto!important;
 min-width:max-content!important;
 max-width:none!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 10px!important;
 display:inline-flex!important;
 flex:0 0 auto!important;
 align-items:center!important;
 justify-content:center!important;
 gap:5px!important;
 border-radius:9px!important;
 white-space:nowrap!important;
 word-break:keep-all!important;
 overflow:visible!important;
 text-overflow:clip!important;
 line-height:1!important;
 font-size:8.5px!important;
}

/* WhatsApp */
.ui-pro-system .cpe-actions-compact .cpe-whatsapp{
 min-width:86px!important;
 color:#147e4b!important;
 background:#ecfaf2!important;
 border-color:#ccebd8!important;
}

/* Enviar SUNAT / acción principal */
.ui-pro-system .cpe-actions-compact .cpe-main-action{
 min-width:92px!important;
 color:#1769d1!important;
 background:#edf5ff!important;
 border-color:#cee1f5!important;
}

/* Más: únicamente tres puntos, sin texto debajo */
.ui-pro-system .cpe-actions-compact .cpe-more-toggle,
.ui-pro-system .cpe-actions-compact .cpe-action-more{
 position:relative!important;
 width:34px!important;
 min-width:34px!important;
 max-width:34px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 flex:0 0 34px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 overflow:hidden!important;
 font-size:0!important;
 line-height:0!important;
 color:transparent!important;
 background:#eef6fc!important;
 border:1px solid #d2e2ef!important;
 border-radius:9px!important;
}
.ui-pro-system .cpe-actions-compact .cpe-more-toggle::before,
.ui-pro-system .cpe-actions-compact .cpe-action-more::before{
 content:"⋮"!important;
 position:static!important;
 display:block!important;
 color:#3578ad!important;
 font-size:18px!important;
 font-weight:800!important;
 line-height:1!important;
}
.ui-pro-system .cpe-actions-compact .cpe-more-toggle::after,
.ui-pro-system .cpe-actions-compact .cpe-action-more::after{
 content:none!important;
 display:none!important;
}

/* Evitar elementos internos que provoquen segunda línea */
.ui-pro-system .cpe-actions-compact .cpe-more-toggle span,
.ui-pro-system .cpe-actions-compact .cpe-action-more span{
 display:none!important;
}
.ui-pro-system .cpe-actions-compact .btn span{
 white-space:nowrap!important;
}

/* El menú Más queda flotante y no altera ancho/alto de la fila */
.ui-pro-system .cpe-actions-cell{
 position:relative!important;
}
.ui-pro-system .cpe-actions-cell .cpe-more-menu{
 position:absolute!important;
 right:0!important;
 left:auto!important;
 top:36px!important;
 width:230px!important;
 min-width:230px!important;
 max-width:230px!important;
 max-height:360px!important;
 overflow-y:auto!important;
 z-index:10000!important;
}

/* La tabla conserva ancho suficiente; si la ventana es menor, scroll horizontal */
.ui-pro-system .cpe-table,
.ui-pro-system #tbCpe{
 min-width:1180px!important;
 table-layout:auto!important;
}
.ui-pro-system .table-wrap:has(.cpe-table),
.ui-pro-system .table-wrap:has(#tbCpe){
 overflow-x:auto!important;
 overflow-y:visible!important;
}

/* No reducir botones en resoluciones medianas: desplazar tabla es preferible */
@media(max-width:1400px){
 .ui-pro-system .cpe-table th:last-child,
 .ui-pro-system .cpe-table td:last-child,
 .ui-pro-system #tbCpe th:last-child,
 .ui-pro-system #tbCpe td:last-child{
   width:285px!important;
   min-width:285px!important;
 }
 .ui-pro-system .cpe-actions-cell,
 .ui-pro-system .cpe-actions-compact{
   min-width:270px!important;
 }
}

/* =========================================================
   V122 - ACCIONES: BOTON SOLO ⋮ + MENU HACIA LA IZQUIERDA
   ========================================================= */

/* El botón Más queda únicamente como tres puntos */
.ui-pro-system .cpe-actions-compact .cpe-more-toggle,
.ui-pro-system .cpe-actions-compact .cpe-action-more{
 position:relative!important;
 width:34px!important;
 min-width:34px!important;
 max-width:34px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 margin:0!important;
 flex:0 0 34px!important;
 overflow:hidden!important;
 color:transparent!important;
 font-size:0!important;
 line-height:0!important;
 text-indent:-9999px!important;
 white-space:nowrap!important;
}
.ui-pro-system .cpe-actions-compact .cpe-more-toggle *,
.ui-pro-system .cpe-actions-compact .cpe-action-more *{
 display:none!important;
}
.ui-pro-system .cpe-actions-compact .cpe-more-toggle::before,
.ui-pro-system .cpe-actions-compact .cpe-action-more::before{
 content:"⋮"!important;
 position:absolute!important;
 inset:0!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 text-indent:0!important;
 color:#3578ad!important;
 font-size:18px!important;
 font-weight:900!important;
 line-height:32px!important;
}
.ui-pro-system .cpe-actions-compact .cpe-more-toggle::after,
.ui-pro-system .cpe-actions-compact .cpe-action-more::after{
 display:none!important;
 content:none!important;
}

/* Menú: anclado al borde derecho del botón y creciendo hacia la izquierda */
.ui-pro-system .cpe-actions-cell{
 position:relative!important;
 overflow:visible!important;
}
.ui-pro-system .cpe-actions-cell .cpe-more-menu,
.ui-pro-system .cpe-actions-cell .dropdown-menu,
.ui-pro-system .cpe-actions-cell .actions-menu{
 position:absolute!important;
 top:36px!important;
 right:0!important;
 left:auto!important;
 width:250px!important;
 min-width:250px!important;
 max-width:250px!important;
 max-height:390px!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 z-index:20000!important;
 transform:none!important;
 margin:0!important;
}

/* El contenedor de la tabla no debe recortar el popup verticalmente */
.ui-pro-system .card:has(.cpe-table),
.ui-pro-system .panel:has(.cpe-table),
.ui-pro-system .box:has(.cpe-table){
 overflow:visible!important;
}
.ui-pro-system .table-wrap:has(.cpe-table),
.ui-pro-system .table-wrap:has(#tbCpe){
 overflow-x:auto!important;
 overflow-y:visible!important;
}

/* Menú más compacto y legible */
.ui-pro-system .cpe-more-menu:before{
 content:"Acciones del comprobante"!important;
 padding:8px 9px!important;
 margin:-1px -1px 5px!important;
 background:#f8fafc!important;
 border-bottom:1px solid #e3eaf1!important;
 color:#40556a!important;
 font-size:9px!important;
 font-weight:900!important;
}
.ui-pro-system .cpe-more-menu a,
.ui-pro-system .cpe-more-menu button{
 min-height:32px!important;
 padding:6px 9px!important;
 gap:8px!important;
 font-size:9px!important;
 white-space:nowrap!important;
}

/* Mantener acciones principales en una línea */
.ui-pro-system .cpe-actions-compact{
 display:flex!important;
 flex-wrap:nowrap!important;
 align-items:center!important;
 justify-content:flex-end!important;
 gap:6px!important;
 white-space:nowrap!important;
}
.ui-pro-system .cpe-actions-compact .cpe-main-action,
.ui-pro-system .cpe-actions-compact .cpe-whatsapp{
 flex:0 0 auto!important;
 white-space:nowrap!important;
}

/* En móvil/tablet, conservar el popup dentro del área visible */
@media(max-width:700px){
 .ui-pro-system .cpe-actions-cell .cpe-more-menu{
   width:230px!important;
   min-width:230px!important;
   max-width:230px!important;
   right:0!important;
   left:auto!important;
 }
}

/* =========================================================
   V123 - MENU ACCIONES INTELIGENTE / SIN RECORTES
   El JS posiciona el menú respecto al viewport.
   ========================================================= */
.ui-pro-system .cpe-more-menu.cpe-menu-floating{
 position:fixed!important;
 right:auto!important;
 bottom:auto!important;
 margin:0!important;
 width:260px!important;
 min-width:260px!important;
 max-width:260px!important;
 max-height:min(430px, calc(100vh - 24px))!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 z-index:999999!important;
 transform:none!important;
 visibility:visible!important;
}
.ui-pro-system .cpe-more-menu.cpe-menu-floating[hidden]{
 display:none!important;
}
.ui-pro-system .cpe-actions-cell,
.ui-pro-system .cpe-actions-compact{
 overflow:visible!important;
}
@media(max-width:520px){
 .ui-pro-system .cpe-more-menu.cpe-menu-floating{
   width:min(260px, calc(100vw - 20px))!important;
   min-width:0!important;
   max-width:calc(100vw - 20px)!important;
 }
}

/* =========================================================
   V124 - MENU DE ACCIONES PORTAL AL BODY
   Nunca queda recortado por tabla, card, layout u overflow.
   ========================================================= */
body > .cpe-more-menu.cpe-menu-portal{
 position:fixed!important;
 width:260px!important;
 min-width:260px!important;
 max-width:260px!important;
 max-height:calc(100vh - 24px)!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 margin:0!important;
 border:1px solid #d8e2ec!important;
 border-radius:10px!important;
 background:#fff!important;
 box-shadow:0 16px 42px rgba(23,43,64,.20)!important;
 z-index:999999!important;
 transform:none!important;
 contain:none!important;
 clip:auto!important;
 clip-path:none!important;
}
body > .cpe-more-menu.cpe-menu-portal:before{
 content:"Acciones del comprobante"!important;
 display:block!important;
 position:sticky!important;
 top:0!important;
 z-index:2!important;
 margin:0 0 5px!important;
 padding:9px 10px!important;
 border-bottom:1px solid #e4ebf2!important;
 background:#f8fafc!important;
 color:#40556a!important;
 font-size:9px!important;
 font-weight:900!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-label{
 padding:7px 9px 4px!important;
 color:#8a99a8!important;
 font-size:7px!important;
 font-weight:900!important;
 letter-spacing:.07em!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item{
 width:100%!important;
 min-height:33px!important;
 display:flex!important;
 align-items:center!important;
 gap:8px!important;
 padding:6px 9px!important;
 border:0!important;
 border-radius:6px!important;
 background:#fff!important;
 color:#3f566d!important;
 font-size:9px!important;
 font-weight:600!important;
 text-align:left!important;
 white-space:nowrap!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item:hover{
 background:#f3f8fd!important;
 color:#176bc1!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-form{
 margin:0!important;
 padding:0!important;
}
body > .cpe-more-menu.cpe-menu-portal::-webkit-scrollbar{width:7px}
body > .cpe-more-menu.cpe-menu-portal::-webkit-scrollbar-thumb{
 background:#aeb8c1;
 border-radius:999px;
}
@media(max-width:500px){
 body > .cpe-more-menu.cpe-menu-portal{
  width:calc(100vw - 24px)!important;
  min-width:0!important;
  max-width:calc(100vw - 24px)!important;
 }
}

/* =========================================================
   V125 - GARANTIA DE MENU COMPLETO DENTRO DEL VIEWPORT
   ========================================================= */
body > .cpe-more-menu.cpe-menu-portal{
 box-sizing:border-box!important;
 overflow-x:hidden!important;
 overscroll-behavior:contain!important;
 margin:0!important;
 transform:none!important;
 translate:none!important;
}
body > .cpe-more-menu.cpe-menu-portal,
body > .cpe-more-menu.cpe-menu-portal *{
 box-sizing:border-box!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item,
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-label{
 max-width:100%!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item{
 white-space:nowrap!important;
}

/* =========================================================
   V126 - APARIENCIA GLOBAL MÁS PROFESIONAL Y VISIBLE
   Mejora general de legibilidad, jerarquía y consistencia UI
   ========================================================= */
:root{
 --v126-bg:#f3f6fa;
 --v126-surface:#ffffff;
 --v126-border:#d6e1ec;
 --v126-border-soft:#e7edf3;
 --v126-text:#183754;
 --v126-text-2:#294861;
 --v126-muted:#70859a;
 --v126-primary:#1769d1;
 --v126-primary-dark:#105ab7;
 --v126-primary-soft:#eaf3ff;
 --v126-success:#14804c;
 --v126-warning:#97660b;
 --v126-danger:#b83849;
 --v126-shadow:0 8px 24px rgba(31,58,84,.055);
 --v126-shadow-strong:0 16px 38px rgba(31,58,84,.11);
}

/* Base visual */
.ui-pro-system{
 background:var(--v126-bg)!important;
 color:var(--v126-text-2)!important;
 font-size:14px!important;
 line-height:1.45!important;
}
.ui-pro-system main,
.ui-pro-system .main-content,
.ui-pro-system .page-content,
.ui-pro-system .content{
 background:transparent!important;
}
.ui-pro-system h1{
 font-size:26px!important;
 line-height:1.15!important;
 font-weight:900!important;
 color:var(--v126-text)!important;
 letter-spacing:-.025em!important;
}
.ui-pro-system h2{font-size:20px!important;font-weight:900!important}
.ui-pro-system h3{font-size:16px!important;font-weight:900!important}
.ui-pro-system p{color:var(--v126-muted)}

/* Encabezados de módulos */
.ui-pro-system .page-head{
 padding:4px 0 2px!important;
 margin-bottom:15px!important;
}
.ui-pro-system .page-head h1{
 margin:0!important;
}
.ui-pro-system .page-head p{
 margin-top:5px!important;
 font-size:12px!important;
 color:#6f8398!important;
}
.ui-pro-system .page-head .eyebrow,
.ui-pro-system .page-eyebrow{
 font-size:8.5px!important;
 font-weight:900!important;
 letter-spacing:.08em!important;
 color:var(--v126-primary)!important;
}

/* Tarjetas / paneles */
.ui-pro-system .card,
.ui-pro-system .panel,
.ui-pro-system .box,
.ui-pro-system .form-card,
.ui-pro-system .summary-card,
.ui-pro-system .settings-card,
.ui-pro-system .config-card{
 border:1px solid var(--v126-border)!important;
 border-radius:13px!important;
 background:var(--v126-surface)!important;
 box-shadow:var(--v126-shadow)!important;
}
.ui-pro-system .card-head,
.ui-pro-system .panel-head,
.ui-pro-system .section-head,
.ui-pro-system .box-head{
 min-height:64px!important;
 padding:13px 15px!important;
 border-bottom:1px solid var(--v126-border)!important;
 background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
}
.ui-pro-system .card-head strong,
.ui-pro-system .panel-head strong,
.ui-pro-system .section-head strong{
 font-size:12px!important;
 color:var(--v126-text)!important;
}
.ui-pro-system .card-head small,
.ui-pro-system .panel-head small,
.ui-pro-system .section-head small{
 font-size:9px!important;
 color:#7b8ea1!important;
}

/* Formularios: mayor visibilidad */
.ui-pro-system .field label,
.ui-pro-system .form-group label,
.ui-pro-system .form-label{
 margin-bottom:6px!important;
 font-size:10.5px!important;
 font-weight:850!important;
 color:#294760!important;
}
.ui-pro-system .input,
.ui-pro-system .select,
.ui-pro-system input[type="text"],
.ui-pro-system input[type="email"],
.ui-pro-system input[type="number"],
.ui-pro-system input[type="date"],
.ui-pro-system input[type="datetime-local"],
.ui-pro-system input[type="tel"],
.ui-pro-system input[type="password"],
.ui-pro-system select{
 min-height:42px!important;
 height:42px!important;
 padding-left:12px!important;
 padding-right:12px!important;
 border:1px solid #c8d6e4!important;
 border-radius:9px!important;
 background:#fff!important;
 color:#223f59!important;
 font-size:12px!important;
}
.ui-pro-system textarea{
 min-height:82px!important;
 padding:10px 12px!important;
 border:1px solid #c8d6e4!important;
 border-radius:9px!important;
 font-size:12px!important;
}
.ui-pro-system input:focus,
.ui-pro-system select:focus,
.ui-pro-system textarea:focus{
 border-color:#5c9de6!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.10)!important;
 outline:none!important;
}
.ui-pro-system input::placeholder,
.ui-pro-system textarea::placeholder{
 color:#98a8b7!important;
}

/* Ayudas y textos secundarios */
.ui-pro-system .field small,
.ui-pro-system .form-group small,
.ui-pro-system .help-text,
.ui-pro-system .form-help{
 font-size:8.5px!important;
 line-height:1.45!important;
 color:#7d90a3!important;
}

/* Botones globales */
.ui-pro-system .btn{
 min-height:36px!important;
 border-radius:8px!important;
 font-size:10px!important;
 font-weight:850!important;
}
.ui-pro-system .btn-primary{
 background:linear-gradient(180deg,#287ae6,#1769d1)!important;
 border:1px solid #1762c3!important;
 color:#fff!important;
 box-shadow:0 4px 10px rgba(23,105,209,.12)!important;
}
.ui-pro-system .btn-primary:hover{
 background:linear-gradient(180deg,#2172db,#115fc0)!important;
}
.ui-pro-system .btn-light,
.ui-pro-system .btn-secondary{
 background:#fff!important;
 border:1px solid #d0dbe7!important;
 color:#36516b!important;
}

/* Listados: más legibles */
.ui-pro-system .table thead th{
 height:44px!important;
 padding:10px 12px!important;
 background:#f5f8fb!important;
 color:#415970!important;
 border-bottom:1px solid #d9e3ed!important;
 font-size:9.5px!important;
 font-weight:900!important;
}
.ui-pro-system .table tbody td{
 padding:12px 12px!important;
 border-bottom:1px solid #e9eef4!important;
 background:#fff!important;
 color:#344b60!important;
 font-size:10.5px!important;
 line-height:1.35!important;
}
.ui-pro-system .table tbody td strong{
 font-size:10.7px!important;
 color:#173b5b!important;
}
.ui-pro-system .table tbody td small{
 font-size:8.3px!important;
 color:#8192a2!important;
}
.ui-pro-system .table tbody tr:hover td{
 background:#f7fbff!important;
}

/* Estados */
.ui-pro-system .badge,
.ui-pro-system .status,
.ui-pro-system .fin-status,
.ui-pro-system .status-badge{
 min-height:23px!important;
 padding:4px 8px!important;
 border-radius:999px!important;
 font-size:7.8px!important;
 font-weight:900!important;
}
.ui-pro-system .badge-success,
.ui-pro-system .status-success{background:#e9f8ef!important;color:#14794a!important}
.ui-pro-system .badge-warning,
.ui-pro-system .status-warning{background:#fff5de!important;color:#93650d!important}
.ui-pro-system .badge-danger,
.ui-pro-system .status-danger{background:#fff0f2!important;color:#b73345!important}

/* Tabs */
.ui-pro-system .tabs,
.ui-pro-system .nav-tabs,
.ui-pro-system .module-tabs,
.ui-pro-system .fin-tabs{
 padding:5px!important;
 border:1px solid var(--v126-border)!important;
 border-radius:11px!important;
 background:#f8fafc!important;
}
.ui-pro-system .tabs a,
.ui-pro-system .tabs button,
.ui-pro-system .nav-tabs a,
.ui-pro-system .nav-tabs button,
.ui-pro-system .module-tabs a,
.ui-pro-system .module-tabs button,
.ui-pro-system .fin-tabs a,
.ui-pro-system .fin-tabs button{
 min-height:35px!important;
 padding:0 13px!important;
 font-size:9.5px!important;
 font-weight:850!important;
}
.ui-pro-system .tabs .active,
.ui-pro-system .nav-tabs .active,
.ui-pro-system .module-tabs .active,
.ui-pro-system .fin-tabs .active{
 background:var(--v126-primary)!important;
 color:#fff!important;
 border-radius:7px!important;
}

/* Modales */
.ui-pro-system .modal-box,
.ui-pro-system dialog:not(.cpe-mail-dialog){
 border:1px solid #d5e0eb!important;
 border-radius:15px!important;
 background:#fff!important;
 box-shadow:var(--v126-shadow-strong)!important;
}
.ui-pro-system .modal-head{
 min-height:66px!important;
 padding:14px 16px!important;
 background:linear-gradient(180deg,#fff,#fafcff)!important;
 border-bottom:1px solid #e2e9f0!important;
}
.ui-pro-system .modal-head strong{
 font-size:15px!important;
 color:#173a59!important;
}
.ui-pro-system .modal-head small{
 font-size:9px!important;
 color:#7b8fa2!important;
}
.ui-pro-system .modal-body{
 padding:16px!important;
}

/* Buscadores */
.ui-pro-system .card-head .input,
.ui-pro-system .toolbar .input,
.ui-pro-system .list-toolbar .input,
.ui-pro-system .table-toolbar .input{
 min-height:40px!important;
 height:40px!important;
 font-size:11px!important;
}

/* KPI */
.ui-pro-system .stat-card,
.ui-pro-system .kpi-card,
.ui-pro-system .dashboard-card,
.ui-pro-system .metric-card{
 min-height:88px!important;
 border:1px solid var(--v126-border)!important;
 border-radius:12px!important;
 background:linear-gradient(180deg,#fff,#fbfdff)!important;
 box-shadow:0 4px 14px rgba(31,58,84,.045)!important;
}
.ui-pro-system .stat-card strong,
.ui-pro-system .kpi-card strong,
.ui-pro-system .metric-card strong{
 font-size:19px!important;
 color:#123759!important;
}

/* Sidebar / configuración */
.ui-pro-system .settings-sidebar,
.ui-pro-system .config-sidebar{
 border:1px solid var(--v126-border)!important;
 border-radius:12px!important;
 background:#fff!important;
 box-shadow:var(--v126-shadow)!important;
}
.ui-pro-system .settings-sidebar a,
.ui-pro-system .config-sidebar a{
 min-height:42px!important;
 font-size:10px!important;
 border-radius:8px!important;
}
.ui-pro-system .settings-sidebar .active,
.ui-pro-system .config-sidebar .active{
 background:#eaf3ff!important;
 color:#1769d1!important;
}

/* Alertas */
.ui-pro-system .alert,
.ui-pro-system .notice,
.ui-pro-system .message-box{
 padding:10px 12px!important;
 border-radius:9px!important;
 font-size:10px!important;
}

/* Paginación */
.ui-pro-system .pagination,
.ui-pro-system .table-pagination,
.ui-pro-system .dt-footer{
 min-height:54px!important;
 font-size:9px!important;
 background:#fff!important;
}
.ui-pro-system .pagination button,
.ui-pro-system .pagination .btn,
.ui-pro-system .table-pagination button{
 min-width:34px!important;
 height:34px!important;
 min-height:34px!important;
 border-radius:8px!important;
}

/* Encabezado principal del sistema */
.ui-pro-system header,
.ui-pro-system .topbar,
.ui-pro-system .app-header{
 background:#fff!important;
 border-bottom:1px solid #dce5ee!important;
 box-shadow:0 2px 8px rgba(31,58,84,.025)!important;
}

/* Responsive */
@media(max-width:900px){
 .ui-pro-system h1{font-size:23px!important}
 .ui-pro-system .page-head{align-items:flex-start!important}
 .ui-pro-system .table-wrap{overflow:auto!important}
}
@media(max-width:650px){
 .ui-pro-system{
   font-size:13px!important;
 }
 .ui-pro-system .input,
 .ui-pro-system .select,
 .ui-pro-system input,
 .ui-pro-system select{
   font-size:11.5px!important;
 }
}

/* Mejora de contraste para módulos principales */
.ui-pro-system .sale-card,
.ui-pro-system .purchase-card,
.ui-pro-system .cash-card,
.ui-pro-system .inventory-card,
.ui-pro-system .client-card,
.ui-pro-system .supplier-card{
 border-color:var(--v126-border)!important;
 box-shadow:var(--v126-shadow)!important;
}

/* V127 - Menú flotante visible también en Ventas */
body > .cpe-more-menu.cpe-menu-portal{
 position:fixed!important;
 box-sizing:border-box!important;
 width:260px!important;
 max-width:calc(100vw - 32px)!important;
 max-height:calc(100vh - 32px)!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 margin:0!important;
 border:1px solid #d6e1eb!important;
 border-radius:11px!important;
 background:#fff!important;
 box-shadow:0 18px 48px rgba(22,45,68,.22)!important;
 z-index:2147483647!important;
 transform:none!important;
 clip:auto!important;
 clip-path:none!important;
}
body > .cpe-more-menu.cpe-menu-portal:before{
 content:"Acciones del documento"!important;
 display:block!important;
 position:sticky!important;
 top:0!important;
 z-index:2!important;
 padding:9px 10px!important;
 margin:0 0 5px!important;
 border-bottom:1px solid #e4ebf2!important;
 background:#f8fafc!important;
 color:#40566b!important;
 font-size:9px!important;
 font-weight:900!important;
}

/* =========================================================
   V128 - SOFTGESTION ULTRA PROFESSIONAL UI
   Capa canónica final: coherencia, legibilidad y densidad ERP
   ========================================================= */
:root{
 --sg-bg:#f4f7fb;
 --sg-surface:#ffffff;
 --sg-surface-2:#f8fbff;
 --sg-border:#d9e3ed;
 --sg-border-soft:#e9eef4;
 --sg-text:#173754;
 --sg-text-2:#314b63;
 --sg-muted:#76899b;
 --sg-primary:#1769d1;
 --sg-primary-hover:#105cbf;
 --sg-primary-soft:#eaf3ff;
 --sg-success:#187b4c;
 --sg-success-soft:#e9f8ef;
 --sg-warning:#90630e;
 --sg-warning-soft:#fff5df;
 --sg-danger:#b83b4b;
 --sg-danger-soft:#fff0f2;
 --sg-info:#246cae;
 --sg-info-soft:#edf6ff;
 --sg-shadow-xs:0 1px 2px rgba(26,51,76,.025);
 --sg-shadow-sm:0 4px 14px rgba(26,51,76,.045);
 --sg-shadow-md:0 10px 28px rgba(26,51,76,.07);
 --sg-radius:12px;
 --sg-radius-sm:8px;
 --sg-control-h:40px;
}

/* Tipografía y fondo */
.ui-pro-system{
 background:var(--sg-bg)!important;
 color:var(--sg-text-2)!important;
 font-size:13px!important;
 line-height:1.45!important;
 -webkit-font-smoothing:antialiased;
 text-rendering:optimizeLegibility;
}
.ui-pro-system h1,.ui-pro-system h2,.ui-pro-system h3,
.ui-pro-system h4,.ui-pro-system h5,.ui-pro-system h6{
 color:var(--sg-text)!important;
 font-weight:900!important;
}
.ui-pro-system h1{font-size:25px!important;line-height:1.15!important;letter-spacing:-.025em!important}
.ui-pro-system h2{font-size:19px!important;line-height:1.2!important}
.ui-pro-system h3{font-size:15px!important;line-height:1.25!important}

/* Layout de página */
.ui-pro-system .page-head{
 display:flex!important;
 align-items:flex-end!important;
 justify-content:space-between!important;
 gap:16px!important;
 margin:0 0 14px!important;
}
.ui-pro-system .page-head h1{margin:0!important}
.ui-pro-system .page-head p{
 margin:5px 0 0!important;
 color:var(--sg-muted)!important;
 font-size:11px!important;
}
.ui-pro-system .page-eyebrow,
.ui-pro-system .eyebrow,
.ui-pro-system .cpe-page-eyebrow{
 display:block!important;
 margin-bottom:4px!important;
 color:var(--sg-primary)!important;
 font-size:8px!important;
 font-weight:900!important;
 letter-spacing:.08em!important;
}

/* Superficies */
.ui-pro-system .card,
.ui-pro-system .panel,
.ui-pro-system .box,
.ui-pro-system .form-card,
.ui-pro-system .summary-card,
.ui-pro-system .settings-card,
.ui-pro-system .config-card,
.ui-pro-system .sale-card,
.ui-pro-system .purchase-card,
.ui-pro-system .cash-card,
.ui-pro-system .inventory-card{
 border:1px solid var(--sg-border)!important;
 border-radius:var(--sg-radius)!important;
 background:var(--sg-surface)!important;
 box-shadow:var(--sg-shadow-sm)!important;
}
.ui-pro-system .card-head,
.ui-pro-system .panel-head,
.ui-pro-system .section-head,
.ui-pro-system .box-head{
 min-height:60px!important;
 padding:12px 14px!important;
 border-bottom:1px solid var(--sg-border)!important;
 background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
}
.ui-pro-system .card-head strong,
.ui-pro-system .panel-head strong,
.ui-pro-system .section-head strong{
 font-size:12px!important;
 color:var(--sg-text)!important;
}
.ui-pro-system .card-head small,
.ui-pro-system .panel-head small,
.ui-pro-system .section-head small{
 font-size:8.5px!important;
 color:var(--sg-muted)!important;
}

/* Formularios */
.ui-pro-system .field label,
.ui-pro-system .form-group label,
.ui-pro-system .form-label{
 display:block!important;
 margin-bottom:5px!important;
 color:#294760!important;
 font-size:10px!important;
 font-weight:850!important;
}
.ui-pro-system .input,
.ui-pro-system .select,
.ui-pro-system input[type="text"],
.ui-pro-system input[type="email"],
.ui-pro-system input[type="number"],
.ui-pro-system input[type="date"],
.ui-pro-system input[type="datetime-local"],
.ui-pro-system input[type="tel"],
.ui-pro-system input[type="password"],
.ui-pro-system select{
 min-height:var(--sg-control-h)!important;
 height:var(--sg-control-h)!important;
 padding:0 12px!important;
 border:1px solid #cbd8e5!important;
 border-radius:var(--sg-radius-sm)!important;
 background:#fff!important;
 color:#223f59!important;
 font-size:11.5px!important;
 box-shadow:var(--sg-shadow-xs)!important;
}
.ui-pro-system textarea{
 min-height:78px!important;
 padding:10px 12px!important;
 border:1px solid #cbd8e5!important;
 border-radius:var(--sg-radius-sm)!important;
 font-size:11.5px!important;
}
.ui-pro-system input:focus,
.ui-pro-system select:focus,
.ui-pro-system textarea:focus{
 outline:none!important;
 border-color:#5e9fe7!important;
 box-shadow:0 0 0 3px rgba(23,105,209,.10)!important;
}
.ui-pro-system .field small,
.ui-pro-system .form-group small,
.ui-pro-system .help-text,
.ui-pro-system .form-help{
 color:#7d90a3!important;
 font-size:8.2px!important;
 line-height:1.4!important;
}

/* Botones: un solo lenguaje */
.ui-pro-system .btn{
 min-height:36px!important;
 padding:0 12px!important;
 border-radius:8px!important;
 font-size:9.5px!important;
 font-weight:850!important;
 line-height:1!important;
 box-shadow:none!important;
}
.ui-pro-system .btn-primary{
 background:var(--sg-primary)!important;
 border:1px solid var(--sg-primary)!important;
 color:#fff!important;
 box-shadow:0 4px 10px rgba(23,105,209,.12)!important;
}
.ui-pro-system .btn-primary:hover{
 background:var(--sg-primary-hover)!important;
 border-color:var(--sg-primary-hover)!important;
}
.ui-pro-system .btn-light,
.ui-pro-system .btn-secondary{
 background:#fff!important;
 border:1px solid #d1dce8!important;
 color:#36516b!important;
}
.ui-pro-system .btn-light:hover,
.ui-pro-system .btn-secondary:hover{
 background:#f6f9fc!important;
 border-color:#c3d2e1!important;
}
.ui-pro-system .btn-danger{
 background:#fff2f4!important;
 border-color:#efcfd5!important;
 color:#b63a49!important;
}

/* Tablas ERP */
.ui-pro-system .table{
 width:100%!important;
 border-collapse:separate!important;
 border-spacing:0!important;
 background:#fff!important;
}
.ui-pro-system .table thead th{
 height:42px!important;
 padding:10px 12px!important;
 background:#f5f8fb!important;
 color:#415970!important;
 border-bottom:1px solid var(--sg-border)!important;
 font-size:9px!important;
 font-weight:900!important;
 letter-spacing:.01em!important;
 text-transform:none!important;
 white-space:nowrap!important;
 vertical-align:middle!important;
}
.ui-pro-system .table tbody td{
 padding:11px 12px!important;
 border-bottom:1px solid var(--sg-border-soft)!important;
 background:#fff!important;
 color:#344b60!important;
 font-size:10px!important;
 line-height:1.3!important;
 vertical-align:middle!important;
}
.ui-pro-system .table tbody tr:hover td{background:#f8fbff!important}
.ui-pro-system .table tbody tr:last-child td{border-bottom:0!important}
.ui-pro-system .table tbody td strong{font-size:10.2px!important;color:#173b5b!important}
.ui-pro-system .table tbody td small{font-size:8px!important;color:#8192a2!important}
.ui-pro-system .table .num,
.ui-pro-system .table td.num{
 text-align:right!important;
 font-variant-numeric:tabular-nums!important;
 white-space:nowrap!important;
}

/* Selección */
.ui-pro-system .table tbody tr.is-selected td,
.ui-pro-system .table tbody tr.selected td{
 background:#eef5ff!important;
}
.ui-pro-system .table tbody tr.is-selected td:first-child,
.ui-pro-system .table tbody tr.selected td:first-child{
 box-shadow:inset 3px 0 0 var(--sg-primary)!important;
}

/* Estados */
.ui-pro-system .badge,
.ui-pro-system .status,
.ui-pro-system .fin-status,
.ui-pro-system .status-badge{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 min-height:22px!important;
 padding:3px 8px!important;
 border-radius:999px!important;
 font-size:7.4px!important;
 font-weight:900!important;
 letter-spacing:.025em!important;
}
.ui-pro-system .badge-success,.ui-pro-system .status-success{background:var(--sg-success-soft)!important;color:var(--sg-success)!important}
.ui-pro-system .badge-warning,.ui-pro-system .status-warning{background:var(--sg-warning-soft)!important;color:var(--sg-warning)!important}
.ui-pro-system .badge-danger,.ui-pro-system .status-danger{background:var(--sg-danger-soft)!important;color:var(--sg-danger)!important}
.ui-pro-system .badge-info,.ui-pro-system .status-info{background:var(--sg-info-soft)!important;color:var(--sg-info)!important}

/* Acciones de tabla */
.ui-pro-system .table .actions,
.ui-pro-system .table .table-actions,
.ui-pro-system .table .action-buttons,
.ui-pro-system .table .cpe-actions-compact{
 display:flex!important;
 justify-content:flex-end!important;
 align-items:center!important;
 gap:6px!important;
 flex-wrap:nowrap!important;
 white-space:nowrap!important;
}
.ui-pro-system .table .cpe-more-toggle,
.ui-pro-system .table .btn-icon,
.ui-pro-system .table .table-action-btn{
 width:34px!important;
 min-width:34px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 border-radius:9px!important;
}
.ui-pro-system .table .cpe-main-action,
.ui-pro-system .table .cpe-whatsapp{
 width:auto!important;
 min-width:max-content!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 10px!important;
 border-radius:9px!important;
 font-size:8.2px!important;
 white-space:nowrap!important;
}

/* Menú flotante: estilo canónico */
body > .cpe-more-menu.cpe-menu-portal{
 box-sizing:border-box!important;
 position:fixed!important;
 width:260px!important;
 min-width:260px!important;
 max-width:calc(100vw - 32px)!important;
 max-height:calc(100vh - 32px)!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 margin:0!important;
 border:1px solid #d6e1eb!important;
 border-radius:11px!important;
 background:#fff!important;
 box-shadow:0 18px 48px rgba(22,45,68,.20)!important;
 z-index:2147483647!important;
 transform:none!important;
}
body > .cpe-more-menu.cpe-menu-portal:before{
 content:"Acciones del documento"!important;
 display:block!important;
 position:sticky!important;
 top:0!important;
 z-index:2!important;
 padding:9px 10px!important;
 margin:0 0 5px!important;
 border-bottom:1px solid #e4ebf2!important;
 background:#f8fafc!important;
 color:#40566b!important;
 font-size:9px!important;
 font-weight:900!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item{
 min-height:33px!important;
 padding:6px 9px!important;
 border-radius:6px!important;
 color:#40576e!important;
 font-size:9px!important;
 font-weight:600!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item:hover{
 background:#f3f8fd!important;
 color:#176bc1!important;
}

/* Modales */
.ui-pro-system .modal-box,
.ui-pro-system dialog:not(.cpe-mail-dialog){
 border:1px solid #d6e1ec!important;
 border-radius:14px!important;
 background:#fff!important;
 box-shadow:0 20px 56px rgba(20,44,69,.16)!important;
}
.ui-pro-system .modal-head{
 min-height:64px!important;
 padding:14px 16px!important;
 border-bottom:1px solid #e1e8f0!important;
 background:linear-gradient(180deg,#fff,#fafcff)!important;
}
.ui-pro-system .modal-head strong{font-size:14px!important;color:#173a59!important}
.ui-pro-system .modal-head small{font-size:8.5px!important;color:#7b8fa2!important}
.ui-pro-system .modal-body{padding:15px 16px!important}

/* Alertas / toasts */
.ui-pro-system .alert,
.ui-pro-system .notice,
.ui-pro-system .message-box{
 padding:10px 12px!important;
 border-radius:9px!important;
 font-size:9.5px!important;
}
.ui-pro-system .alert-success{background:#eef9f2!important;border-color:#cfead9!important;color:#176c45!important}
.ui-pro-system .alert-danger{background:#fff2f4!important;border-color:#efd1d7!important;color:#a93646!important}
.ui-pro-system .alert-warning{background:#fff8e8!important;border-color:#eedaa8!important;color:#845d10!important}

/* Tabs */
.ui-pro-system .tabs,
.ui-pro-system .nav-tabs,
.ui-pro-system .module-tabs,
.ui-pro-system .fin-tabs{
 padding:5px!important;
 border:1px solid var(--sg-border)!important;
 border-radius:10px!important;
 background:#f8fafc!important;
 gap:4px!important;
}
.ui-pro-system .tabs a,.ui-pro-system .tabs button,
.ui-pro-system .nav-tabs a,.ui-pro-system .nav-tabs button,
.ui-pro-system .module-tabs a,.ui-pro-system .module-tabs button,
.ui-pro-system .fin-tabs a,.ui-pro-system .fin-tabs button{
 min-height:34px!important;
 padding:0 12px!important;
 border-radius:7px!important;
 font-size:9px!important;
 font-weight:850!important;
}
.ui-pro-system .tabs .active,.ui-pro-system .nav-tabs .active,
.ui-pro-system .module-tabs .active,.ui-pro-system .fin-tabs .active{
 background:var(--sg-primary)!important;
 color:#fff!important;
}

/* KPI */
.ui-pro-system .stat-card,
.ui-pro-system .kpi-card,
.ui-pro-system .dashboard-card,
.ui-pro-system .metric-card,
.ui-pro-system .fin-stat{
 border:1px solid var(--sg-border)!important;
 border-radius:11px!important;
 background:linear-gradient(180deg,#fff,#fbfdff)!important;
 box-shadow:var(--sg-shadow-sm)!important;
}
.ui-pro-system .stat-card strong,
.ui-pro-system .kpi-card strong,
.ui-pro-system .metric-card strong,
.ui-pro-system .fin-stat strong{
 color:#123759!important;
 font-weight:900!important;
}

/* Paginación */
.ui-pro-system .pagination,
.ui-pro-system .table-pagination,
.ui-pro-system .dt-footer,
.ui-pro-system .cpe-pagination{
 min-height:52px!important;
 border-top:1px solid #e4eaf1!important;
 background:#fff!important;
 font-size:8.5px!important;
}
.ui-pro-system .pagination button,
.ui-pro-system .pagination .btn,
.ui-pro-system .table-pagination button{
 min-width:32px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 9px!important;
 border-radius:8px!important;
}
.ui-pro-system .pagination .active,
.ui-pro-system .table-pagination .active{
 background:var(--sg-primary)!important;
 color:#fff!important;
 border-color:var(--sg-primary)!important;
}

/* Header */
.ui-pro-system header,
.ui-pro-system .topbar,
.ui-pro-system .app-header{
 background:#fff!important;
 border-bottom:1px solid #dce5ee!important;
 box-shadow:0 2px 8px rgba(31,58,84,.025)!important;
}

/* Densidad y adaptación */
@media(max-width:1180px){
 .ui-pro-system .table-wrap{overflow-x:auto!important}
}
@media(max-width:900px){
 .ui-pro-system .page-head{align-items:flex-start!important;flex-direction:column!important}
 .ui-pro-system h1{font-size:22px!important}
}
@media(max-width:650px){
 :root{--sg-control-h:42px}
 .ui-pro-system{font-size:13px!important}
 .ui-pro-system .table{min-width:900px}
}
.ui-pro-system .table tbody tr.keyboard-focus-row td{
 background:#f3f8ff!important;
}

/* =========================================================
   V129 - LEGIBILIDAD PROFESIONAL
   Conserva el diseño V128 y mejora lectura en escritorio.
   ========================================================= */
.ui-pro-system{
 font-size:14px!important;
 line-height:1.5!important;
}
.ui-pro-system h1{font-size:27px!important}
.ui-pro-system h2{font-size:20px!important}
.ui-pro-system h3{font-size:16px!important}

.ui-pro-system .page-head p{
 font-size:12.5px!important;
 line-height:1.45!important;
}
.ui-pro-system .page-eyebrow,
.ui-pro-system .eyebrow,
.ui-pro-system .cpe-page-eyebrow{
 font-size:9.5px!important;
}

/* Formularios */
.ui-pro-system .field label,
.ui-pro-system .form-group label,
.ui-pro-system .form-label{
 font-size:11.5px!important;
}
.ui-pro-system .input,
.ui-pro-system .select,
.ui-pro-system input[type="text"],
.ui-pro-system input[type="email"],
.ui-pro-system input[type="number"],
.ui-pro-system input[type="date"],
.ui-pro-system input[type="datetime-local"],
.ui-pro-system input[type="tel"],
.ui-pro-system input[type="password"],
.ui-pro-system select,
.ui-pro-system textarea{
 font-size:12.5px!important;
}
.ui-pro-system .field small,
.ui-pro-system .form-group small,
.ui-pro-system .help-text,
.ui-pro-system .form-help{
 font-size:9.5px!important;
}

/* Botones */
.ui-pro-system .btn{
 font-size:10.5px!important;
}
.ui-pro-system .table .cpe-main-action,
.ui-pro-system .table .cpe-whatsapp{
 font-size:9.5px!important;
}

/* Tablas */
.ui-pro-system .table thead th{
 font-size:10.5px!important;
}
.ui-pro-system .table tbody td{
 font-size:11.5px!important;
 line-height:1.4!important;
}
.ui-pro-system .table tbody td strong{
 font-size:11.7px!important;
}
.ui-pro-system .table tbody td small{
 font-size:9.2px!important;
}

/* Estados */
.ui-pro-system .badge,
.ui-pro-system .status,
.ui-pro-system .fin-status,
.ui-pro-system .status-badge{
 font-size:8.5px!important;
}

/* Tarjetas y secciones */
.ui-pro-system .card-head strong,
.ui-pro-system .panel-head strong,
.ui-pro-system .section-head strong{
 font-size:13.5px!important;
}
.ui-pro-system .card-head small,
.ui-pro-system .panel-head small,
.ui-pro-system .section-head small{
 font-size:9.5px!important;
}

/* Menús */
body > .cpe-more-menu.cpe-menu-portal:before{
 font-size:10.5px!important;
}
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item{
 font-size:10.5px!important;
 min-height:35px!important;
}

/* Modales */
.ui-pro-system .modal-head strong{
 font-size:15px!important;
}
.ui-pro-system .modal-head small{
 font-size:10px!important;
}
.ui-pro-system .alert,
.ui-pro-system .notice,
.ui-pro-system .message-box{
 font-size:10.5px!important;
}

/* Tabs y paginación */
.ui-pro-system .tabs a,.ui-pro-system .tabs button,
.ui-pro-system .nav-tabs a,.ui-pro-system .nav-tabs button,
.ui-pro-system .module-tabs a,.ui-pro-system .module-tabs button,
.ui-pro-system .fin-tabs a,.ui-pro-system .fin-tabs button{
 font-size:10.5px!important;
}
.ui-pro-system .pagination,
.ui-pro-system .table-pagination,
.ui-pro-system .dt-footer,
.ui-pro-system .cpe-pagination{
 font-size:10px!important;
}

/* Placeholders: visibles sin competir con el contenido */
.ui-pro-system input::placeholder,
.ui-pro-system textarea::placeholder{
 color:#7a8da0!important;
 opacity:1!important;
 font-size:11.5px!important;
}

/* Mantener textos auxiliares realmente legibles */
.ui-pro-system .text-muted,
.ui-pro-system .muted{
 color:#687e92!important;
}

/* Resoluciones grandes: evitar interfaz demasiado diminuta */
@media(min-width:1400px){
 .ui-pro-system{font-size:14px!important}
 .ui-pro-system .table thead th{font-size:10.7px!important}
 .ui-pro-system .table tbody td{font-size:11.7px!important}
}

/* =========================================================
   V130 - ACCIONES PROFESIONALES EN LISTADO DE NOTAS
   Mismo patrón visual que Comprobantes SUNAT.
   ========================================================= */
.ui-pro-system #tbNotas th:last-child{
 width:220px!important;
 min-width:220px!important;
 text-align:right!important;
}
.ui-pro-system #tbNotas .note-actions-cell{
 min-width:220px!important;
 text-align:right!important;
 white-space:nowrap!important;
 overflow:visible!important;
}
.ui-pro-system #tbNotas .note-actions{
 display:flex!important;
 align-items:center!important;
 justify-content:flex-end!important;
 gap:6px!important;
 flex-wrap:nowrap!important;
}
.ui-pro-system #tbNotas .note-action-main-form,
.ui-pro-system #tbNotas .cpe-menu-form{
 margin:0!important;
 padding:0!important;
}
.ui-pro-system #tbNotas .note-action-main,
.ui-pro-system #tbNotas .note-action-ticket{
 width:auto!important;
 min-width:max-content!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 11px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 border-radius:9px!important;
 font-size:9px!important;
 font-weight:850!important;
 white-space:nowrap!important;
}
.ui-pro-system #tbNotas .note-action-main{
 background:#edf5ff!important;
 border:1px solid #cee1f5!important;
 color:#1769d1!important;
 box-shadow:none!important;
}
.ui-pro-system #tbNotas .note-action-ticket{
 background:#fff!important;
 border:1px solid #d3dfeb!important;
 color:#405a72!important;
}
.ui-pro-system #tbNotas .cpe-more-toggle{
 width:34px!important;
 min-width:34px!important;
 max-width:34px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 flex:0 0 34px!important;
 border:1px solid #d4e3ef!important;
 border-radius:9px!important;
 background:#eef6fc!important;
 color:#3578ad!important;
 font-size:18px!important;
 font-weight:900!important;
 line-height:1!important;
 text-indent:0!important;
 overflow:hidden!important;
}
.ui-pro-system #tbNotas .cpe-more-toggle:hover{
 background:#e5f1fb!important;
 border-color:#bfd7ea!important;
}
body > .note-more-menu.note-menu-portal:before{
 content:"Acciones de la nota"!important;
}
body > .note-more-menu.note-menu-portal{
 width:260px!important;
 min-width:260px!important;
 max-width:calc(100vw - 32px)!important;
}
body > .note-more-menu.note-menu-portal .cpe-menu-label{
 padding:7px 9px 4px!important;
 color:#8b99a8!important;
 font-size:7.5px!important;
 font-weight:900!important;
 letter-spacing:.07em!important;
}
body > .note-more-menu.note-menu-portal .cpe-menu-item{
 width:100%!important;
 min-height:34px!important;
 display:flex!important;
 align-items:center!important;
 gap:8px!important;
 padding:6px 9px!important;
 border:0!important;
 border-radius:6px!important;
 background:#fff!important;
 color:#40576e!important;
 font-size:10px!important;
 font-weight:600!important;
 text-align:left!important;
 white-space:nowrap!important;
}
body > .note-more-menu.note-menu-portal .cpe-menu-item:hover{
 background:#f3f8fd!important;
 color:#176bc1!important;
}
body > .note-more-menu.note-menu-portal .cpe-menu-icon{
 width:16px!important;
 display:inline-flex!important;
 justify-content:center!important;
 color:#397fb6!important;
 font-size:11px!important;
}

/* =========================================================
   V131 - BOTONES DE LISTADOS UNIFICADOS TIPO COMPROBANTES SUNAT
   ========================================================= */

/* Celdas de acciones en cualquier listado */
.ui-pro-system .table th:last-child{
 text-align:center!important;
}
.ui-pro-system .table td:last-child{
 text-align:right!important;
 white-space:nowrap!important;
}

/* Contenedores comunes de acciones */
.ui-pro-system .table .actions,
.ui-pro-system .table .table-actions,
.ui-pro-system .table .action-buttons,
.ui-pro-system .table .actions-cell,
.ui-pro-system .table .note-actions,
.ui-pro-system .table .cpe-actions-compact,
.ui-pro-system .table .list-actions,
.ui-pro-system .table .row-actions{
 display:flex!important;
 align-items:center!important;
 justify-content:flex-end!important;
 gap:6px!important;
 flex-wrap:nowrap!important;
 white-space:nowrap!important;
}

/* Botones visibles dentro de listados: patrón SUNAT */
.ui-pro-system .table td:last-child .btn,
.ui-pro-system .table .actions .btn,
.ui-pro-system .table .table-actions .btn,
.ui-pro-system .table .action-buttons .btn,
.ui-pro-system .table .actions-cell .btn,
.ui-pro-system .table .note-actions .btn,
.ui-pro-system .table .list-actions .btn,
.ui-pro-system .table .row-actions .btn{
 width:auto!important;
 min-width:max-content!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 10px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:5px!important;
 flex:0 0 auto!important;
 border:1px solid #d3e2ef!important;
 border-radius:9px!important;
 background:#eef6fc!important;
 color:#2472ad!important;
 font-size:9px!important;
 font-weight:850!important;
 line-height:1!important;
 white-space:nowrap!important;
 overflow:visible!important;
 text-overflow:clip!important;
 box-shadow:none!important;
 transform:none!important;
}
.ui-pro-system .table td:last-child .btn:hover,
.ui-pro-system .table .actions .btn:hover,
.ui-pro-system .table .table-actions .btn:hover,
.ui-pro-system .table .action-buttons .btn:hover,
.ui-pro-system .table .actions-cell .btn:hover,
.ui-pro-system .table .note-actions .btn:hover,
.ui-pro-system .table .list-actions .btn:hover,
.ui-pro-system .table .row-actions .btn:hover{
 background:#e4f1fb!important;
 border-color:#bed8eb!important;
 color:#1764a0!important;
 transform:none!important;
}

/* Acción principal */
.ui-pro-system .table td:last-child .btn-primary,
.ui-pro-system .table td:last-child .btn-success,
.ui-pro-system .table .action-primary,
.ui-pro-system .table .cpe-main-action,
.ui-pro-system .table .note-action-main{
 background:#eaf4ff!important;
 border-color:#c9def3!important;
 color:#1769d1!important;
}

/* WhatsApp mantiene semántica verde */
.ui-pro-system .table .cpe-whatsapp,
.ui-pro-system .table .btn-whatsapp,
.ui-pro-system .table [class*="whatsapp"]{
 background:#ecfaf2!important;
 border-color:#c8ead6!important;
 color:#14814b!important;
}

/* Acciones peligrosas */
.ui-pro-system .table .btn-danger,
.ui-pro-system .table .danger,
.ui-pro-system .table .text-danger{
 background:#fff2f4!important;
 border-color:#efcfd5!important;
 color:#bd3c4b!important;
}

/* Botones solo icono */
.ui-pro-system .table .btn-icon,
.ui-pro-system .table .table-action-btn,
.ui-pro-system .table .cpe-more-toggle,
.ui-pro-system .table .action-more{
 width:34px!important;
 min-width:34px!important;
 max-width:34px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 border-radius:9px!important;
 background:#eef6fc!important;
 border-color:#d3e2ef!important;
 color:#3578ad!important;
}

/* Botón Más siempre uniforme */
.ui-pro-system .table .cpe-more-toggle{
 position:relative!important;
 overflow:hidden!important;
 font-size:0!important;
 color:transparent!important;
 text-indent:-9999px!important;
}
.ui-pro-system .table .cpe-more-toggle *{
 display:none!important;
}
.ui-pro-system .table .cpe-more-toggle::before{
 content:"⋮"!important;
 position:absolute!important;
 inset:0!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 text-indent:0!important;
 color:#3578ad!important;
 font-size:18px!important;
 font-weight:900!important;
 line-height:1!important;
}

/* Formularios dentro de la celda no agregan espacios */
.ui-pro-system .table td:last-child form,
.ui-pro-system .table .actions form,
.ui-pro-system .table .table-actions form,
.ui-pro-system .table .action-buttons form,
.ui-pro-system .table .note-actions form,
.ui-pro-system .table .list-actions form,
.ui-pro-system .table .row-actions form{
 display:inline-flex!important;
 margin:0!important;
 padding:0!important;
}

/* Menús de acciones: misma apariencia */
body > .cpe-more-menu.cpe-menu-portal,
.ui-pro-system .dropdown-menu,
.ui-pro-system .menu-popover,
.ui-pro-system .actions-menu,
.ui-pro-system .table-actions-menu{
 border:1px solid #d6e1eb!important;
 border-radius:11px!important;
 background:#fff!important;
 box-shadow:0 18px 48px rgba(22,45,68,.18)!important;
}
.ui-pro-system .dropdown-menu a,
.ui-pro-system .dropdown-menu button,
.ui-pro-system .menu-popover a,
.ui-pro-system .menu-popover button,
.ui-pro-system .actions-menu a,
.ui-pro-system .actions-menu button,
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item{
 min-height:34px!important;
 padding:6px 9px!important;
 border-radius:6px!important;
 color:#40576e!important;
 font-size:10px!important;
 font-weight:600!important;
}
.ui-pro-system .dropdown-menu a:hover,
.ui-pro-system .dropdown-menu button:hover,
.ui-pro-system .menu-popover a:hover,
.ui-pro-system .menu-popover button:hover,
.ui-pro-system .actions-menu a:hover,
.ui-pro-system .actions-menu button:hover,
body > .cpe-more-menu.cpe-menu-portal .cpe-menu-item:hover{
 background:#f3f8fd!important;
 color:#176bc1!important;
}

/* Evitar deformación cuando hay muchas acciones */
.ui-pro-system .table-wrap{
 overflow-x:auto!important;
}
.ui-pro-system .table td:last-child{
 min-width:140px;
}

/* Módulos con muchas acciones */
.ui-pro-system #tbCpe td:last-child,
.ui-pro-system #tbNotas td:last-child{
 min-width:220px!important;
}

/* Responsive: preferir scroll antes que romper botones */
@media(max-width:1100px){
 .ui-pro-system .table{
   min-width:900px;
 }
}

/* =========================================================
   V134 - COMPROBANTES SUNAT: LINEAS DE FILA UNIFORMES
   ========================================================= */

/* Una sola línea continua para TODA la fila, incluyendo Notas y Acciones */
.cpe-page-pro #tbCpe{
 border-collapse:collapse!important;
 border-spacing:0!important;
}

.cpe-page-pro #tbCpe tbody tr{
 position:relative!important;
 background:#fff!important;
}

.cpe-page-pro #tbCpe tbody td{
 border-bottom:1px solid #e5ebf1!important;
 background-clip:padding-box!important;
}

/* Corregir específicamente las dos últimas columnas */
.cpe-page-pro #tbCpe tbody td.cpe-notes-cell,
.cpe-page-pro #tbCpe tbody td.cpe-actions-cell,
.cpe-page-pro #tbCpe tbody td:nth-last-child(2),
.cpe-page-pro #tbCpe tbody td:last-child{
 border-bottom:1px solid #e5ebf1!important;
}

/* La celda de acciones no debe crear bloques visuales separados */
.cpe-page-pro #tbCpe .cpe-actions-cell{
 background:inherit!important;
 box-shadow:none!important;
}

/* Mantener el color de selección/hover de forma continua en toda la fila */
.cpe-page-pro #tbCpe tbody tr:hover td{
 background:#f8fbff!important;
}

.cpe-page-pro #tbCpe tbody tr:first-child td{
 background-clip:padding-box!important;
}

/* Los bordes verticales de estado permanecen solo al inicio de la fila */
.cpe-page-pro #tbCpe tbody tr.cpe-row-aceptado td:first-child{
 border-left:3px solid #36aa70!important;
}
.cpe-page-pro #tbCpe tbody tr.cpe-row-pendiente td:first-child{
 border-left:3px solid #dca531!important;
}
.cpe-page-pro #tbCpe tbody tr.cpe-row-rechazado td:first-child,
.cpe-page-pro #tbCpe tbody tr.cpe-row-error td:first-child{
 border-left:3px solid #d94d5d!important;
}

/* Evitar que wrappers internos oculten visualmente la línea */
.cpe-page-pro #tbCpe .cpe-actions-compact,
.cpe-page-pro #tbCpe .cpe-more,
.cpe-page-pro #tbCpe .cpe-note-summary{
 margin-bottom:0!important;
}

/* Última fila: mantener la línea superior a la paginación */
.cpe-page-pro #tbCpe tbody tr:last-child td{
 border-bottom:1px solid #dfe7ef!important;
}

/* =========================================================
   V135 - CPE: DIVISOR HORIZONTAL ÚNICO DE INICIO A FIN
   ========================================================= */

/* Quitar divisores parciales por celda */
.cpe-page-pro #tbCpe{
 border-collapse:separate!important;
 border-spacing:0!important;
}
.cpe-page-pro #tbCpe tbody td,
.cpe-page-pro #tbCpe tbody td.cpe-notes-cell,
.cpe-page-pro #tbCpe tbody td.cpe-actions-cell,
.cpe-page-pro #tbCpe tbody td:nth-last-child(2),
.cpe-page-pro #tbCpe tbody td:last-child{
 border-bottom:0!important;
}

/* Cada TR dibuja UNA sola línea continua en la misma coordenada Y */
.cpe-page-pro #tbCpe tbody tr{
 position:relative!important;
}
.cpe-page-pro #tbCpe tbody tr::after{
 content:""!important;
 position:absolute!important;
 left:0!important;
 right:0!important;
 bottom:0!important;
 height:1px!important;
 background:#dfe7ef!important;
 pointer-events:none!important;
 z-index:5!important;
}

/* La última fila también conserva el divisor continuo */
.cpe-page-pro #tbCpe tbody tr:last-child::after{
 background:#d8e2eb!important;
}

/* Evitar que fondos internos tapen visualmente el divisor */
.cpe-page-pro #tbCpe tbody td{
 position:relative!important;
}
.cpe-page-pro #tbCpe .cpe-actions-compact,
.cpe-page-pro #tbCpe .cpe-note-summary{
 position:relative!important;
 z-index:1!important;
}

/* V136 - Ajuste interno de precio por crédito */
.credit-surcharge-settings .credit-rate-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:9px;margin-top:12px}
.credit-rate-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px;border:1px solid #dce6ef;border-radius:9px;background:#fbfdff}
.credit-rate-row label{font-size:9px;font-weight:800;color:#40566b}
.credit-surcharge-toggle{margin-top:4px}
.sale-credit-internal-box{display:flex;align-items:center;gap:9px;min-height:40px;padding:7px 10px;border:1px solid #d7e5f1;border-radius:9px;background:#f7fbff}
.sale-credit-internal-box strong{color:#1769d1;font-size:13px}
.sale-credit-internal-box span{color:#5f768b;font-size:9px}
@media(max-width:1200px){.credit-surcharge-settings .credit-rate-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}}
@media(max-width:650px){.credit-surcharge-settings .credit-rate-grid{grid-template-columns:1fr}}

/* =========================================================
   V137 - ORDEN VISUAL PROFESIONAL: CREDITO INTERNO
   ========================================================= */
.credit-surcharge-settings{
 padding:0!important;
 overflow:hidden;
}
.credit-surcharge-header{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:16px;
 padding:16px 18px;
 border-bottom:1px solid #e2e9f0;
 background:linear-gradient(180deg,#fff,#fbfdff);
}
.credit-surcharge-title{
 display:flex;
 align-items:center;
 gap:12px;
 min-width:0;
}
.credit-surcharge-icon{
 width:42px;
 height:42px;
 flex:0 0 42px;
 display:grid;
 place-items:center;
 border-radius:11px;
 background:#eaf3ff;
 color:#1769d1;
 font-size:17px;
 font-weight:900;
}
.credit-surcharge-title h3{
 margin:2px 0 3px!important;
 font-size:14px!important;
}
.credit-surcharge-title p{
 margin:0!important;
 color:#718598!important;
 font-size:9.5px!important;
}
.credit-surcharge-switch{
 display:flex;
 align-items:center;
 gap:11px;
 margin:14px 18px;
 padding:12px 13px;
 border:1px solid #dbe6ef;
 border-radius:10px;
 background:#f9fbfd;
 cursor:pointer;
}
.credit-surcharge-switch>input{
 position:absolute;
 opacity:0;
 pointer-events:none;
}
.credit-surcharge-switch-ui{
 position:relative;
 width:38px;
 height:22px;
 flex:0 0 38px;
 border-radius:999px;
 background:#cbd6e0;
 transition:.18s ease;
}
.credit-surcharge-switch-ui:after{
 content:"";
 position:absolute;
 top:3px;
 left:3px;
 width:16px;
 height:16px;
 border-radius:50%;
 background:#fff;
 box-shadow:0 1px 3px rgba(30,50,70,.18);
 transition:.18s ease;
}
.credit-surcharge-switch>input:checked+.credit-surcharge-switch-ui{
 background:#1769d1;
}
.credit-surcharge-switch>input:checked+.credit-surcharge-switch-ui:after{
 transform:translateX(16px);
}
.credit-surcharge-switch-copy{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.credit-surcharge-switch-copy strong{
 color:#26445f;
 font-size:10.5px;
}
.credit-surcharge-switch-copy small{
 color:#7b8ea1;
 font-size:8.5px;
 line-height:1.4;
}
.credit-surcharge-info{
 display:grid;
 grid-template-columns:repeat(3,1fr);
 gap:10px;
 padding:0 18px 14px;
}
.credit-surcharge-info>div{
 padding:11px 12px;
 border:1px solid #e2e9f0;
 border-radius:9px;
 background:#fff;
}
.credit-surcharge-info strong{
 display:block;
 margin-bottom:4px;
 color:#36516b;
 font-size:9.5px;
}
.credit-surcharge-info span{
 display:block;
 color:#7a8c9f;
 font-size:8.2px;
 line-height:1.4;
}
.credit-rate-card{
 margin:0 18px 18px;
 border:1px solid #dce5ee;
 border-radius:10px;
 overflow:hidden;
 background:#fff;
}
.credit-rate-card-head{
 display:flex;
 justify-content:space-between;
 align-items:center;
 gap:10px;
 padding:11px 13px;
 border-bottom:1px solid #e5ebf1;
 background:#f8fafc;
}
.credit-rate-card-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.credit-rate-card-head strong{
 color:#294760;
 font-size:10px;
}
.credit-rate-card-head small{
 color:#7b8ea1;
 font-size:8px;
}
.credit-rate-card-head>span{
 padding:4px 8px;
 border-radius:999px;
 background:#eaf3ff;
 color:#1769d1;
 font-size:7.5px;
 font-weight:900;
}
.credit-rate-table{
 width:100%;
}
.credit-rate-table-head,
.credit-rate-row{
 display:grid;
 grid-template-columns:70px minmax(180px,1fr) minmax(180px,1fr);
 align-items:center;
 gap:12px;
}
.credit-rate-table-head{
 min-height:34px;
 padding:0 13px;
 border-bottom:1px solid #edf1f5;
 color:#74879a;
 font-size:7.8px;
 font-weight:900;
 text-transform:uppercase;
 letter-spacing:.05em;
}
.credit-rate-row{
 padding:8px 13px;
 border-bottom:1px solid #edf1f5;
 background:#fff;
}
.credit-rate-row:last-child{
 border-bottom:0;
}
.credit-rate-index{
 width:28px;
 height:28px;
 display:grid;
 place-items:center;
 border-radius:8px;
 background:#f0f5fa;
 color:#5d7489;
 font-size:8px;
 font-weight:900;
}
.credit-rate-row label{
 position:relative;
 display:flex;
 align-items:center;
 margin:0!important;
}
.credit-rate-row label .input{
 width:100%;
 padding-right:42px!important;
}
.credit-rate-row label>span{
 position:absolute;
 right:12px;
 color:#7d8fa1;
 font-size:8.5px;
 font-weight:800;
 pointer-events:none;
}
.credit-rate-note{
 display:flex;
 align-items:flex-start;
 gap:8px;
 padding:9px 12px;
 border-top:1px solid #e5ebf1;
 background:#fbfdff;
}
.credit-rate-note>span{
 width:20px;
 height:20px;
 display:grid;
 place-items:center;
 border-radius:50%;
 background:#eaf3ff;
 color:#1769d1;
 font-size:9px;
 font-weight:900;
}
.credit-rate-note p{
 margin:1px 0 0!important;
 color:#6e8295!important;
 font-size:8.3px!important;
}

/* Nueva venta */
.sale-credit-internal{
 grid-column:span 2;
}
.sale-credit-internal-box{
 display:grid!important;
 grid-template-columns:130px 1fr;
 gap:0!important;
 min-height:48px!important;
 padding:0!important;
 border:1px solid #d7e5f1!important;
 border-radius:9px!important;
 overflow:hidden;
 background:#fff!important;
}
.sale-credit-internal-rate,
.sale-credit-internal-term{
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:2px;
 padding:8px 11px;
}
.sale-credit-internal-rate{
 background:#edf5ff;
 border-right:1px solid #d7e5f1;
}
.sale-credit-internal-rate span,
.sale-credit-internal-term span{
 color:#7b8ea1;
 font-size:7px;
 font-weight:900;
 letter-spacing:.05em;
}
.sale-credit-internal-rate strong{
 color:#1769d1!important;
 font-size:14px!important;
}
.sale-credit-internal-term strong{
 color:#36516b;
 font-size:9px;
}
@media(max-width:1000px){
 .credit-surcharge-info{grid-template-columns:1fr}
 .credit-rate-table-head,.credit-rate-row{grid-template-columns:55px 1fr 1fr}
}
@media(max-width:650px){
 .credit-surcharge-header{align-items:flex-start}
 .credit-rate-table-head{display:none}
 .credit-rate-row{grid-template-columns:42px 1fr;gap:8px}
 .credit-rate-row label:last-child{grid-column:2}
 .sale-credit-internal{grid-column:auto}
 .sale-credit-internal-box{grid-template-columns:1fr}
 .sale-credit-internal-rate{border-right:0;border-bottom:1px solid #d7e5f1}
}

/* =========================================================
   V138 - CRONOGRAMA PROFESIONAL DE CUOTAS
   ========================================================= */
.sale-credit-schedule-trigger{
 min-width:190px;
}
.credit-schedule-open{
 width:100%;
 height:40px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:8px!important;
 padding:0 11px!important;
 background:#f8fbff!important;
 border-color:#d4e2ef!important;
 color:#315878!important;
}
.credit-schedule-open>span{
 width:24px;height:24px;display:grid;place-items:center;
 border-radius:7px;background:#eaf3ff;color:#1769d1;font-size:12px;
}
.credit-schedule-open strong{font-size:9.5px}

.credit-schedule-modal{
 z-index:100100!important;
}
.credit-schedule-modal-box{
 width:min(820px,calc(100vw - 28px))!important;
 max-width:820px!important;
}
.credit-schedule-summary{
 display:grid;
 grid-template-columns:1.35fr .7fr 1.1fr 1fr;
 gap:9px;
 margin-bottom:13px;
}
.credit-schedule-summary>div{
 min-height:64px;
 padding:10px 11px;
 border:1px solid #dce6ef;
 border-radius:10px;
 background:#fbfdff;
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:4px;
}
.credit-schedule-summary span{
 color:#7b8ea1;
 font-size:7.5px;
 font-weight:900;
 letter-spacing:.05em;
}
.credit-schedule-summary strong{
 color:#24445f;
 font-size:12px;
}
.credit-schedule-summary>div:first-child{
 background:#edf5ff;
 border-color:#cfe0f2;
}
.credit-schedule-summary>div:first-child strong{
 color:#1769d1;
 font-size:16px;
}
#cronogramaDiferencia.has-error{color:#b73545!important}

.credit-schedule-table-wrap{
 border:1px solid #dce5ee;
 border-radius:10px;
 overflow:auto;
 max-height:360px;
}
.credit-schedule-table{
 margin:0!important;
 min-width:620px!important;
}
.credit-schedule-table thead th{
 position:sticky;
 top:0;
 z-index:2;
 background:#f7f9fc!important;
}
.credit-schedule-table tbody td{
 padding:8px 10px!important;
}
.credit-installment-number{
 width:28px;height:28px;display:grid;place-items:center;
 border-radius:8px;background:#eef4fa;color:#49677f;
 font-size:8px;font-weight:900;
}
.credit-installment-date{
 width:180px!important;
}
.credit-installment-money{
 position:relative;
 width:170px;
 margin-left:auto;
}
.credit-installment-money>span{
 position:absolute;left:10px;top:50%;transform:translateY(-50%);
 z-index:1;color:#71869a;font-size:9px;font-weight:800;
}
.credit-installment-money .input{
 padding-left:32px!important;
 text-align:right;
 font-variant-numeric:tabular-nums;
}
.credit-installment-status{
 display:inline-flex;align-items:center;justify-content:center;
 min-height:24px;padding:3px 8px;border-radius:999px;
 background:#fff5df;color:#91630d;font-size:7px;font-weight:900;
}
.credit-schedule-help{
 display:flex;
 align-items:flex-start;
 gap:8px;
 margin-top:11px;
 padding:10px 11px;
 border:1px solid #dce7f0;
 border-radius:9px;
 background:#f8fbfe;
}
.credit-schedule-help>span{
 width:22px;height:22px;display:grid;place-items:center;
 flex:0 0 22px;border-radius:50%;background:#eaf3ff;
 color:#1769d1;font-size:9px;font-weight:900;
}
.credit-schedule-help p{
 margin:2px 0 0!important;color:#6f8295!important;
 font-size:8.5px!important;line-height:1.45!important;
}
.credit-schedule-footer{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 padding:12px 16px;
 border-top:1px solid #e2e9f0;
 background:#fbfdff;
}
.credit-schedule-footer>div{
 display:flex;gap:8px;
}
@media(max-width:700px){
 .credit-schedule-summary{grid-template-columns:1fr 1fr}
 .credit-schedule-footer{align-items:stretch;flex-direction:column}
 .credit-schedule-footer>div{display:grid;grid-template-columns:1fr 1fr}
 .credit-schedule-footer>.btn{width:100%}
}

/* =========================================================
   V139 - CREDITO: CUOTAS Y AJUSTE INTERNO SEPARADOS
   ========================================================= */
.sale-credit-planner{
 grid-column:1/-1;
 margin-top:2px;
 border:1px solid #d7e3ee;
 border-radius:12px;
 overflow:hidden;
 background:#f8fbff;
}
.sale-credit-planner[hidden]{
 display:none!important;
}
.sale-credit-planner-head{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:14px;
 padding:12px 14px;
 border-bottom:1px solid #dce6ef;
 background:linear-gradient(180deg,#f9fcff,#f4f8fc);
}
.sale-credit-planner-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.sale-credit-planner-kicker{
 color:#1769d1;
 font-size:7px;
 font-weight:900;
 letter-spacing:.07em;
}
.sale-credit-planner-head strong{
 color:#203f5a;
 font-size:12.5px;
}
.sale-credit-planner-head small{
 color:#75899d;
 font-size:8.5px;
}
.sale-credit-planner-status{
 padding:5px 9px;
 border-radius:999px;
 background:#fff2da;
 color:#94640d;
 font-size:7.5px;
 font-weight:900;
 white-space:nowrap;
}
.sale-credit-planner-grid{
 display:grid;
 grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr);
 gap:12px;
 padding:12px;
}
.sale-credit-panel{
 border:1px solid #dce6ef;
 border-radius:10px;
 background:#fff;
 overflow:hidden;
}
.sale-credit-panel-head{
 display:flex;
 align-items:center;
 gap:9px;
 min-height:50px;
 padding:9px 11px;
 border-bottom:1px solid #e5ebf1;
 background:#fbfdff;
}
.sale-credit-panel-step{
 width:28px;
 height:28px;
 display:grid;
 place-items:center;
 flex:0 0 28px;
 border-radius:8px;
 background:#eaf3ff;
 color:#1769d1;
 font-size:8px;
 font-weight:900;
}
.sale-credit-panel-head>div{
 display:flex;
 flex-direction:column;
 gap:2px;
}
.sale-credit-panel-head strong{
 color:#27465f;
 font-size:10.5px;
}
.sale-credit-panel-head small{
 color:#7a8da0;
 font-size:8px;
}
.sale-credit-panel-body{
 padding:11px;
}
.sale-credit-fields{
 display:grid;
 grid-template-columns:1fr .8fr 1fr;
 gap:9px;
}
.sale-credit-fields .field{
 min-width:0;
}
.sale-credit-schedule-box{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 margin-top:10px;
 padding:9px 10px;
 border:1px solid #d8e5ef;
 border-radius:9px;
 background:#f8fbff;
}
.sale-credit-schedule-copy{
 display:flex;
 align-items:center;
 gap:9px;
 min-width:0;
}
.sale-credit-schedule-icon{
 width:32px;
 height:32px;
 display:grid;
 place-items:center;
 flex:0 0 32px;
 border-radius:8px;
 background:#eaf3ff;
 color:#1769d1;
 font-size:13px;
}
.sale-credit-schedule-copy>div{
 min-width:0;
 display:flex;
 flex-direction:column;
 gap:2px;
}
.sale-credit-schedule-copy strong{
 color:#31516b;
 font-size:9.5px;
}
.sale-credit-schedule-copy small{
 color:#72879a;
 font-size:8px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}
.sale-credit-schedule-box .credit-schedule-open{
 width:auto!important;
 min-width:132px!important;
 justify-content:center!important;
 flex:0 0 auto;
}

/* Ajuste interno */
.sale-credit-surcharge-panel{
 background:#fffdfa;
 border-color:#eadcb8;
}
.sale-credit-surcharge-panel .sale-credit-panel-head{
 background:#fffaf0;
 border-bottom-color:#f0e3c1;
}
.sale-credit-surcharge-panel .sale-credit-panel-step{
 background:#fff0cd;
 color:#8f610c;
}
.sale-credit-surcharge-summary{
 display:grid;
 grid-template-columns:1fr;
 gap:8px;
}
.sale-credit-surcharge-summary>div{
 min-height:58px;
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:3px;
 padding:9px 10px;
 border:1px solid #eadfca;
 border-radius:9px;
 background:#fffdf9;
}
.sale-credit-surcharge-summary>div:first-child{
 background:#fff6e2;
}
.sale-credit-surcharge-summary span{
 color:#897555;
 font-size:7px;
 font-weight:900;
 letter-spacing:.05em;
}
.sale-credit-surcharge-summary strong{
 color:#6c4a0b;
 font-size:12px;
 line-height:1.25;
}
.sale-credit-surcharge-summary>div:first-child strong{
 font-size:18px;
 color:#a46b00;
}
.sale-credit-surcharge-note{
 display:flex;
 align-items:flex-start;
 gap:8px;
 margin-top:9px;
 padding:8px 9px;
 border-radius:8px;
 background:#fffaf0;
}
.sale-credit-surcharge-note>span{
 width:20px;
 height:20px;
 display:grid;
 place-items:center;
 flex:0 0 20px;
 border-radius:50%;
 background:#ffeab6;
 color:#95640a;
 font-size:8px;
 font-weight:900;
}
.sale-credit-surcharge-note p{
 margin:1px 0 0!important;
 color:#806f52!important;
 font-size:7.8px!important;
 line-height:1.4!important;
}

/* Ocultar el bloque visual antiguo si quedó alguna regla heredada */
.sale-credit-internal{
 grid-column:auto!important;
}

@media(max-width:1050px){
 .sale-credit-planner-grid{
   grid-template-columns:1fr;
 }
 .sale-credit-fields{
   grid-template-columns:repeat(3,minmax(0,1fr));
 }
 .sale-credit-surcharge-summary{
   grid-template-columns:1fr 1fr;
 }
}
@media(max-width:720px){
 .sale-credit-planner-head{
   align-items:flex-start;
 }
 .sale-credit-fields{
   grid-template-columns:1fr;
 }
 .sale-credit-schedule-box{
   align-items:stretch;
   flex-direction:column;
 }
 .sale-credit-schedule-box .credit-schedule-open{
   width:100%!important;
 }
 .sale-credit-surcharge-summary{
   grid-template-columns:1fr;
 }
}

/* =========================================================
   V140 - CUOTAS + RECARGO EN UNA FILA, COLAPSABLES
   ========================================================= */
.sale-credit-planner-grid{
 grid-template-columns:minmax(0,1.35fr) minmax(360px,.9fr)!important;
 align-items:start!important;
}
.sale-credit-panel-head{
 justify-content:space-between!important;
}
.sale-credit-panel-title{
 display:flex;
 align-items:center;
 gap:9px;
 min-width:0;
}
.sale-credit-panel-title>div{
 display:flex;
 flex-direction:column;
 gap:2px;
 min-width:0;
}
.sale-credit-panel-toggle{
 height:30px;
 min-width:62px;
 padding:0 9px;
 flex:0 0 auto;
 border:1px solid #d6e2ed;
 border-radius:8px;
 background:#fff;
 color:#46708f;
 font-size:8px;
 font-weight:850;
 cursor:pointer;
 transition:.15s ease;
}
.sale-credit-panel-toggle:hover{
 background:#f1f7fd;
 border-color:#c4d8e8;
 color:#1769d1;
}
.sale-credit-panel.is-collapsed{
 min-height:auto;
}
.sale-credit-panel.is-collapsed .sale-credit-panel-head{
 border-bottom:0!important;
}
.sale-credit-panel-collapsed-summary{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 padding:9px 11px;
 border-top:1px solid #e5ebf1;
 background:#fbfdff;
}
.sale-credit-panel-collapsed-summary[hidden]{
 display:none!important;
}
.sale-credit-panel-collapsed-summary span{
 color:#7b8ea0;
 font-size:7px;
 font-weight:900;
 letter-spacing:.05em;
}
.sale-credit-panel-collapsed-summary strong{
 color:#36516b;
 font-size:8.5px;
 text-align:right;
}
.sale-credit-surcharge-panel .sale-credit-panel-collapsed-summary{
 background:#fffaf0;
 border-top-color:#f0e3c1;
}
.sale-credit-surcharge-panel .sale-credit-panel-collapsed-summary strong{
 color:#82590d;
}

/* Compactar un poco el panel de cuotas para convivir en la misma fila */
.sale-credit-fields{
 grid-template-columns:1.15fr .8fr 1fr!important;
}
.sale-credit-schedule-box{
 min-height:54px;
}
.sale-credit-surcharge-summary{
 grid-template-columns:1fr 1fr!important;
}
.sale-credit-surcharge-summary>div{
 min-height:66px;
}
@media(max-width:1180px){
 .sale-credit-planner-grid{
   grid-template-columns:1fr!important;
 }
}
@media(max-width:760px){
 .sale-credit-fields{
   grid-template-columns:1fr!important;
 }
 .sale-credit-surcharge-summary{
   grid-template-columns:1fr!important;
 }
}

/* =========================================================
   V141 - RESUMEN ARRIBA / PLAN DE CUOTAS DEBAJO
   ========================================================= */
.sale-credit-summary-row{
 display:grid;
 grid-template-columns:minmax(0,1fr) 260px;
 gap:10px;
 padding:12px 12px 0;
}
.sale-credit-main-summary,
.sale-credit-summary-adjustment{
 border:1px solid #dce6ef;
 border-radius:10px;
 background:#fff;
 padding:10px 12px;
}
.sale-credit-summary-label{
 display:block;
 margin-bottom:7px;
 color:#6d8296;
 font-size:7px;
 font-weight:900;
 letter-spacing:.07em;
}
.sale-credit-summary-items{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:8px;
}
.sale-credit-summary-items>div{
 min-width:0;
 padding-right:8px;
 border-right:1px solid #e6edf3;
}
.sale-credit-summary-items>div:last-child{
 border-right:0;
}
.sale-credit-summary-items span{
 display:block;
 margin-bottom:3px;
 color:#8495a5;
 font-size:6.8px;
 font-weight:850;
}
.sale-credit-summary-items strong{
 display:block;
 overflow:hidden;
 color:#27465f;
 font-size:9px;
 font-weight:900;
 text-overflow:ellipsis;
 white-space:nowrap;
}
.sale-credit-summary-adjustment{
 background:#fffaf0;
 border-color:#eadfca;
}
.sale-credit-summary-adjustment-value{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
}
.sale-credit-summary-adjustment-value strong{
 color:#a46b00;
 font-size:17px;
}
.sale-credit-summary-adjustment-value small{
 color:#806f52;
 font-size:7.5px;
 text-align:right;
}
.sale-credit-planner-grid-v141{
 grid-template-columns:1fr!important;
 padding-top:10px!important;
}
.sale-credit-installments-below-summary{
 width:100%;
}
.sale-credit-adjustment-below{
 width:100%;
}
.sale-credit-installments-below-summary .sale-credit-fields{
 grid-template-columns:1.15fr .8fr 1fr!important;
}
.sale-credit-adjustment-below .sale-credit-surcharge-summary{
 grid-template-columns:1fr 1fr!important;
}
@media(min-width:1181px){
 .sale-credit-installments-below-summary .sale-credit-panel-body{
   display:grid;
   grid-template-columns:minmax(0,1fr) minmax(330px,.7fr);
   gap:12px;
   align-items:end;
 }
 .sale-credit-installments-below-summary .sale-credit-schedule-box{
   margin-top:0!important;
   min-height:100%;
 }
}
@media(max-width:900px){
 .sale-credit-summary-row{
   grid-template-columns:1fr;
 }
 .sale-credit-summary-items{
   grid-template-columns:1fr 1fr;
 }
 .sale-credit-summary-items>div:nth-child(2){
   border-right:0;
 }
}
@media(max-width:620px){
 .sale-credit-summary-items{
   grid-template-columns:1fr;
 }
 .sale-credit-summary-items>div{
   padding:0 0 7px;
   border-right:0;
   border-bottom:1px solid #e6edf3;
 }
 .sale-credit-summary-items>div:last-child{
   padding-bottom:0;
   border-bottom:0;
 }
 .sale-credit-installments-below-summary .sale-credit-fields{
   grid-template-columns:1fr!important;
 }
}
/* V142 - Resumen del plan de cuotas debajo de Registrar venta */
.sale-sidebar-credit-summary{margin-top:10px;border:1px solid #d8e4ef;border-radius:10px;overflow:hidden;background:#f8fbff}.sale-sidebar-credit-summary[hidden]{display:none!important}
.sale-sidebar-credit-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border-bottom:1px solid #dfe8f0;background:#f3f8fe}.sale-sidebar-credit-head>div{display:flex;flex-direction:column;gap:1px}.sale-sidebar-credit-kicker{color:#1769d1;font-size:6.5px;font-weight:900;letter-spacing:.08em}.sale-sidebar-credit-head strong{color:#24445e;font-size:9.5px}
.sale-sidebar-credit-toggle{height:27px;padding:0 8px;border:1px solid #d3e0eb;border-radius:7px;background:#fff;color:#47708f;font-size:7.5px;font-weight:850;cursor:pointer}.sale-sidebar-credit-body{padding:9px}.sale-sidebar-credit-body[hidden]{display:none!important}
.sale-sidebar-credit-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.sale-sidebar-credit-grid>div{min-width:0;padding:7px;border:1px solid #e0e8ef;border-radius:8px;background:#fff}.sale-sidebar-credit-grid span,.sale-sidebar-credit-total span,.sale-sidebar-credit-adjustment span{display:block;color:#8092a3;font-size:6.3px;font-weight:900;letter-spacing:.04em}.sale-sidebar-credit-grid strong{display:block;margin-top:2px;color:#294861;font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sale-sidebar-credit-total{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px;padding:8px 9px;border-radius:8px;background:#2168c9}.sale-sidebar-credit-total span{color:#dcecff}.sale-sidebar-credit-total strong{color:#fff;font-size:11px}
.sale-sidebar-credit-adjustment{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px;padding:7px 8px;border:1px solid #eadfca;border-radius:8px;background:#fffaf0}.sale-sidebar-credit-adjustment strong{display:block;margin-top:2px;color:#a46b00;font-size:10px}.sale-sidebar-credit-adjustment small{color:#806f52;font-size:6.8px;text-align:right}
.sale-sidebar-credit-view{width:100%!important;margin-top:7px!important;justify-content:center!important;min-height:31px!important}.sale-sidebar-credit-collapsed{padding:8px 10px;color:#536f87;font-size:7.5px;font-weight:800;background:#fff}.sale-sidebar-credit-collapsed[hidden]{display:none!important}

/* =========================================================
   V143 - NUEVA VENTA ERP COMPACTA / PRODUCTOS PRIORITARIOS
   ========================================================= */

/* Layout general: más espacio para productos */
.sale-erp-compact .sale-main-grid,
.sale-erp-compact .sale-layout,
.sale-erp-compact .sale-workspace{
 grid-template-columns:minmax(0,1fr) 250px!important;
 gap:10px!important;
 align-items:start!important;
}

/* Cabecera y datos de operación más compactos */
.sale-erp-compact .sale-section-title{
 min-height:44px!important;
 padding:8px 11px!important;
}
.sale-erp-compact .sale-section-title strong{
 font-size:11.5px!important;
}
.sale-erp-compact .sale-section-title small{
 font-size:7.8px!important;
}
.sale-erp-compact .card-body{
 padding:10px!important;
}
.sale-erp-compact .sale-operation-card .card-body,
.sale-erp-compact .sale-data-card .card-body{
 padding:9px 10px!important;
}

/* Controles superiores más bajos */
.sale-erp-compact .field label{
 margin-bottom:4px!important;
 font-size:9.5px!important;
}
.sale-erp-compact .input,
.sale-erp-compact .select,
.sale-erp-compact input[type="text"],
.sale-erp-compact input[type="search"],
.sale-erp-compact input[type="date"],
.sale-erp-compact input[type="number"],
.sale-erp-compact select{
 min-height:36px!important;
 height:36px!important;
 font-size:10.5px!important;
}
.sale-erp-compact .field small{
 font-size:7.5px!important;
}

/* Datos generales en una franja ERP */
.sale-erp-compact .sale-operation-grid,
.sale-erp-compact .sale-data-grid,
.sale-erp-compact .sale-fields-grid{
 gap:7px!important;
}
.sale-erp-compact .sale-client-selected{
 min-height:32px!important;
 padding:6px 9px!important;
}

/* Plan financiero global colapsable */
.sale-credit-planner{
 margin-top:7px!important;
}
.sale-credit-planner-head{
 min-height:43px!important;
 padding:8px 10px!important;
}
.sale-credit-planner-head-actions{
 display:flex;
 align-items:center;
 gap:7px;
}
.sale-credit-planner-toggle{
 height:27px;
 padding:0 9px;
 border:1px solid #cfdce8;
 border-radius:7px;
 background:#fff;
 color:#315b7a;
 font-size:7.5px;
 font-weight:850;
 cursor:pointer;
}
.sale-credit-planner-toggle:hover{
 background:#f2f7fc;
}
.sale-credit-planner-body[hidden]{
 display:none!important;
}
.sale-credit-planner-body{
 border-top:1px solid #dce6ef;
}
.sale-credit-planner-grid-v141{
 padding:8px!important;
 gap:8px!important;
}
.sale-credit-panel-head{
 min-height:42px!important;
 padding:7px 9px!important;
}
.sale-credit-panel-body{
 padding:8px!important;
}
.sale-credit-fields{
 gap:6px!important;
}
.sale-credit-schedule-box{
 min-height:46px!important;
 padding:7px 8px!important;
}

/* Resumen lateral tipo ERP: angosto y compacto */
.sale-summary-card{
 position:sticky!important;
 top:10px!important;
}
.sale-summary-card .card-body{
 padding:9px!important;
}
.sale-summary-lines>div{
 min-height:27px!important;
 font-size:8px!important;
}
.sale-grand-total{
 margin-top:7px!important;
 padding:10px!important;
 border-radius:9px!important;
}
.sale-grand-total span{
 font-size:7px!important;
}
.sale-grand-total strong{
 font-size:18px!important;
}
.sale-item-counter{
 min-height:28px!important;
 font-size:8px!important;
}
.sale-finance-actions{
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:6px!important;
}
.sale-finance-actions .btn{
 width:100%!important;
 min-height:34px!important;
 height:34px!important;
 font-size:8.5px!important;
}
.sale-submit-note{
 margin-top:6px!important;
 font-size:6.8px!important;
 line-height:1.35!important;
}

/* Resumen de crédito lateral aún más compacto */
.sale-sidebar-credit-summary{
 margin-top:7px!important;
}
.sale-sidebar-credit-head{
 padding:7px 8px!important;
}
.sale-sidebar-credit-body{
 padding:7px!important;
}
.sale-sidebar-credit-grid{
 gap:4px!important;
}
.sale-sidebar-credit-grid>div{
 padding:5px!important;
}
.sale-sidebar-credit-total{
 margin-top:5px!important;
 padding:6px 7px!important;
}
.sale-sidebar-credit-adjustment{
 margin-top:5px!important;
 padding:6px!important;
}
.sale-sidebar-credit-view{
 margin-top:5px!important;
 min-height:29px!important;
}

/* Productos: dominar la pantalla */
.sale-products-card,
.sale-items-section,
.sale-products-section{
 min-height:calc(100vh - 250px)!important;
}
.sale-items-wrap{
 min-height:calc(100vh - 390px)!important;
 max-height:calc(100vh - 300px)!important;
 overflow:auto!important;
}
.sale-items-table thead th{
 position:sticky!important;
 top:0!important;
 z-index:5!important;
 background:#f5f8fb!important;
}
.sale-items-table tbody td{
 padding-top:10px!important;
 padding-bottom:10px!important;
}
.sale-product-name strong{
 font-size:11.5px!important;
}
.sale-product-name small{
 font-size:8px!important;
}
.sale-number-input,
.sale-price-input .input{
 height:36px!important;
 min-height:36px!important;
}

/* Buscador de producto visible pero compacto */
.product-search-box,
#dynamicProductSearch{
 margin-bottom:5px!important;
}
#productoBuscar{
 height:38px!important;
 min-height:38px!important;
}
.selected-product-tip{
 margin-top:3px!important;
 font-size:7.5px!important;
}

/* En resoluciones grandes, reducir aún más el bloque superior */
@media(min-width:1366px){
 .sale-erp-compact .sale-section-title{
   min-height:40px!important;
 }
 .sale-erp-compact .sale-operation-card,
 .sale-erp-compact .sale-data-card{
   margin-bottom:8px!important;
 }
 .sale-items-wrap{
   max-height:calc(100vh - 285px)!important;
 }
}

/* Tablet / móvil */
@media(max-width:1100px){
 .sale-erp-compact .sale-main-grid,
 .sale-erp-compact .sale-layout,
 .sale-erp-compact .sale-workspace{
   grid-template-columns:1fr!important;
 }
 .sale-summary-card{
   position:static!important;
 }
 .sale-items-wrap{
   max-height:none!important;
 }
}

/* =========================================================
   V144 - PLAN DE CUOTAS IZQUIERDA / RECARGO DERECHA
   ========================================================= */

/* Escritorio ERP: dos columnas reales dentro del Plan financiero */
.sale-credit-planner-grid-v141{
 display:grid!important;
 grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr)!important;
 align-items:start!important;
 gap:10px!important;
}

/* Quitar reglas anteriores que forzaban ancho completo */
.sale-credit-left,
.sale-credit-right,
.sale-credit-installments-below-summary,
.sale-credit-adjustment-below{
 width:auto!important;
 min-width:0!important;
}

/* Cuotas = izquierda */
.sale-credit-left{
 grid-column:1!important;
}

/* Recargo = derecha */
.sale-credit-right{
 grid-column:2!important;
}

/* Panel izquierdo aprovecha la columna sin crecer demasiado en altura */
.sale-credit-left .sale-credit-panel-body{
 display:block!important;
}
.sale-credit-left .sale-credit-fields{
 grid-template-columns:1.1fr .75fr 1fr!important;
}
.sale-credit-left .sale-credit-schedule-box{
 margin-top:8px!important;
 min-height:48px!important;
}

/* Recargo compacto en la derecha */
.sale-credit-right .sale-credit-panel-body{
 display:block!important;
}
.sale-credit-right .sale-credit-surcharge-summary{
 grid-template-columns:1fr!important;
 gap:6px!important;
}
.sale-credit-right .sale-credit-surcharge-summary>div{
 min-height:52px!important;
}
.sale-credit-right .sale-credit-surcharge-summary>div:first-child strong{
 font-size:16px!important;
}
.sale-credit-right .sale-credit-surcharge-note{
 margin-top:6px!important;
}

/* Cuando Cuotas se oculta, Recargo puede ocupar toda la fila */
.sale-credit-planner-grid-v141.left-collapsed{
 grid-template-columns:minmax(220px,.42fr) minmax(0,1fr)!important;
}
.sale-credit-planner-grid-v141.left-collapsed .sale-credit-left{
 grid-column:1!important;
}
.sale-credit-planner-grid-v141.left-collapsed .sale-credit-right{
 grid-column:2!important;
}

/* Cuando Recargo se oculta, Cuotas aprovecha casi todo el ancho */
.sale-credit-planner-grid-v141.right-collapsed{
 grid-template-columns:minmax(0,1fr) minmax(220px,.32fr)!important;
}

/* Si ambos están colapsados, quedan dos cabeceras compactas */
.sale-credit-planner-grid-v141.left-collapsed.right-collapsed{
 grid-template-columns:1fr 1fr!important;
}

/* Resumen colapsado compacto */
.sale-credit-panel.is-collapsed{
 align-self:start!important;
}
.sale-credit-panel.is-collapsed .sale-credit-panel-collapsed-summary{
 min-height:36px!important;
 padding:7px 9px!important;
}

/* En pantallas medias pasan a una columna */
@media(max-width:1180px){
 .sale-credit-planner-grid-v141,
 .sale-credit-planner-grid-v141.left-collapsed,
 .sale-credit-planner-grid-v141.right-collapsed,
 .sale-credit-planner-grid-v141.left-collapsed.right-collapsed{
   grid-template-columns:1fr!important;
 }
 .sale-credit-left,
 .sale-credit-right{
   grid-column:1!important;
 }
}

/* V145 - Plan de cuotas izquierda / Ajuste interno derecha */
.sale-credit-planner-grid-v141{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 gap:10px!important;width:100%!important;align-items:start!important;
}
.sale-credit-left{grid-column:1!important;display:block!important;min-width:0!important;}
.sale-credit-right,#ventaRecargoInterno{
 grid-column:2!important;display:block!important;min-width:0!important;
 visibility:visible!important;opacity:1!important;width:100%!important;
 max-width:none!important;margin:0!important;
}
.sale-credit-left .sale-credit-panel-head,
.sale-credit-right .sale-credit-panel-head{min-height:58px!important;}
.sale-credit-left .sale-credit-panel-body,
.sale-credit-right .sale-credit-panel-body{padding:8px!important;}
.sale-credit-right .sale-credit-surcharge-summary{
 display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;
}
.sale-credit-planner-grid-v141.left-collapsed,
.sale-credit-planner-grid-v141.right-collapsed,
.sale-credit-planner-grid-v141.left-collapsed.right-collapsed{
 grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
}
@media(max-width:900px){
 .sale-credit-planner-grid-v141,
 .sale-credit-planner-grid-v141.left-collapsed,
 .sale-credit-planner-grid-v141.right-collapsed,
 .sale-credit-planner-grid-v141.left-collapsed.right-collapsed{grid-template-columns:1fr!important;}
 .sale-credit-left,.sale-credit-right,#ventaRecargoInterno{grid-column:1!important;}
}

/* =========================================================
   V146 - CABECERAS ERP COMPACTAS GLOBALES
   Reduce espacio superior en formularios/listados del sistema
   ========================================================= */

/* Cabecera principal de páginas */
.page-header,
.page-heading,
.module-header,
.content-header,
.erp-page-header{
 margin-top:0!important;
 margin-bottom:10px!important;
 padding-top:6px!important;
 padding-bottom:6px!important;
 min-height:52px!important;
}

/* Títulos principales */
.page-header h1,
.page-heading h1,
.module-header h1,
.content-header h1,
.erp-page-header h1,
.page-title{
 margin:0!important;
 line-height:1.08!important;
 font-size:24px!important;
}

/* Eyebrow / ruta superior */
.page-header .eyebrow,
.page-heading .eyebrow,
.module-header .eyebrow,
.content-header .eyebrow,
.page-kicker,
.page-overline{
 margin:0 0 3px!important;
 line-height:1!important;
 font-size:8px!important;
 letter-spacing:.08em!important;
}

/* Subtítulo */
.page-header p,
.page-heading p,
.module-header p,
.content-header p,
.page-subtitle{
 margin:3px 0 0!important;
 line-height:1.2!important;
 font-size:10px!important;
}

/* Botones de acciones del encabezado */
.page-header .btn,
.page-heading .btn,
.module-header .btn,
.content-header .btn,
.erp-page-header .btn{
 min-height:34px!important;
 height:34px!important;
 padding:0 12px!important;
}

/* Barra global de caja/turno */
.cash-session-banner,
.cash-open-banner,
.caja-session-banner,
.caja-open-banner,
.pos-session-banner,
.shift-session-banner,
.sale-cash-banner,
.alert-caja-abierta{
 min-height:46px!important;
 margin:8px 0!important;
 padding:7px 10px!important;
 border-radius:9px!important;
}

/* Contenido de la barra de caja en horizontal y compacto */
.cash-session-banner .cash-session-content,
.cash-open-banner .cash-session-content,
.caja-session-banner .cash-session-content,
.pos-session-banner .cash-session-content,
.shift-session-banner .cash-session-content{
 gap:8px!important;
}
.cash-session-banner strong,
.cash-open-banner strong,
.caja-session-banner strong,
.pos-session-banner strong,
.shift-session-banner strong{
 line-height:1.1!important;
}
.cash-session-banner small,
.cash-open-banner small,
.caja-session-banner small,
.pos-session-banner small,
.shift-session-banner small{
 line-height:1.15!important;
 font-size:7.5px!important;
}

/* Acciones de caja más pequeñas */
.cash-session-banner .btn,
.cash-open-banner .btn,
.caja-session-banner .btn,
.pos-session-banner .btn,
.shift-session-banner .btn,
.sale-cash-banner .btn,
.alert-caja-abierta .btn{
 min-height:34px!important;
 height:34px!important;
 padding:0 12px!important;
}

/* Reducir espacios antes del primer bloque funcional */
.page-header + .card,
.page-heading + .card,
.module-header + .card,
.content-header + .card,
.page-header + form,
.page-heading + form{
 margin-top:6px!important;
}

/* Evitar alturas excesivas generadas por wrappers */
main .container-fluid,
.main-content .container-fluid,
.content-wrapper .container-fluid{
 padding-top:8px!important;
}

/* Escritorio amplio: aún más compacto */
@media(min-width:1366px){
 .page-header,
 .page-heading,
 .module-header,
 .content-header,
 .erp-page-header{
   min-height:48px!important;
   margin-bottom:8px!important;
 }
 .cash-session-banner,
 .cash-open-banner,
 .caja-session-banner,
 .caja-open-banner,
 .pos-session-banner,
 .shift-session-banner,
 .sale-cash-banner,
 .alert-caja-abierta{
   min-height:42px!important;
   margin:6px 0!important;
 }
}

/* Móvil: conservar legibilidad */
@media(max-width:700px){
 .page-header,
 .page-heading,
 .module-header,
 .content-header,
 .erp-page-header{
   min-height:auto!important;
 }
 .page-header h1,
 .page-heading h1,
 .module-header h1,
 .content-header h1,
 .erp-page-header h1,
 .page-title{
   font-size:21px!important;
 }
}

/* =========================================================
   V147 - ESTADO DE CAJA EN TOPBAR / SIN BARRA EN CONTENIDO
   ========================================================= */
.topbar{
 position:relative!important;
 z-index:1000!important;
}
.top-cash-widget{
 position:relative;
 margin-left:auto;
 margin-right:12px;
}
.top-cash-trigger{
 height:34px;
 max-width:260px;
 display:flex;
 align-items:center;
 gap:7px;
 padding:4px 9px;
 border:1px solid #d7e2ec;
 border-radius:9px;
 background:#fff;
 color:#36526a;
 cursor:pointer;
 transition:.15s ease;
}
.top-cash-trigger:hover,
.top-cash-widget.open .top-cash-trigger{
 background:#f7faff;
 border-color:#bfd4e7;
 box-shadow:0 3px 10px rgba(30,55,80,.07);
}
.top-cash-dot{
 width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#a7b4c0;
}
.top-cash-trigger.open .top-cash-dot,
.top-cash-menu-head.open .top-cash-dot{background:#20ad68;box-shadow:0 0 0 3px rgba(32,173,104,.10)}
.top-cash-trigger.admin .top-cash-dot,
.top-cash-menu-head.admin .top-cash-dot{background:#2f7ed8;box-shadow:0 0 0 3px rgba(47,126,216,.10)}
.top-cash-trigger.closed .top-cash-dot,
.top-cash-menu-head.closed .top-cash-dot{background:#d75a68;box-shadow:0 0 0 3px rgba(215,90,104,.10)}
.top-cash-copy{
 min-width:0;
 display:flex;
 flex-direction:column;
 align-items:flex-start;
 gap:0;
}
.top-cash-copy strong{
 max-width:190px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 color:#294760;
 font-size:8.5px;
 line-height:1.15;
}
.top-cash-copy small{
 color:#8393a3;
 font-size:6.5px;
 line-height:1.1;
}
.top-cash-chevron{
 margin-left:2px;
 color:#7d90a1;
 font-size:11px;
}
.top-cash-menu{
 position:absolute;
 top:calc(100% + 7px);
 right:0;
 width:310px;
 padding:0;
 border:1px solid #d7e2ec;
 border-radius:11px;
 background:#fff;
 box-shadow:0 18px 45px rgba(24,49,72,.16);
 overflow:hidden;
 z-index:2147480000;
}
.top-cash-menu[hidden]{display:none!important}
.top-cash-menu-head{
 display:flex;
 align-items:center;
 gap:9px;
 padding:10px 11px;
 border-bottom:1px solid #e6edf3;
 background:#f8fbfd;
}
.top-cash-menu-head>div{display:flex;flex-direction:column;gap:1px}
.top-cash-menu-head strong{color:#294760;font-size:10px}
.top-cash-menu-head small{color:#7e91a3;font-size:7px}
.top-cash-menu-info{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:6px;
 padding:10px;
}
.top-cash-menu-info>div{
 padding:7px 8px;
 border:1px solid #e3eaf1;
 border-radius:8px;
 background:#fbfdff;
}
.top-cash-menu-info span{display:block;color:#8999a8;font-size:6.3px;font-weight:900;letter-spacing:.05em}
.top-cash-menu-info strong{display:block;margin-top:2px;color:#36516a;font-size:8.5px}
.top-cash-menu>p{
 margin:0!important;
 padding:0 10px 9px;
 color:#788b9d!important;
 font-size:7.2px!important;
 line-height:1.35!important;
}
.top-cash-menu-actions{
 display:flex;
 justify-content:flex-end;
 gap:6px;
 padding:9px 10px;
 border-top:1px solid #e5ebf1;
 background:#fbfdff;
}
.top-cash-menu-actions .btn{
 min-height:31px!important;
 height:31px!important;
 padding:0 9px!important;
 font-size:7.7px!important;
}
.top-cash-active-list{
 padding:7px 10px;
}
.top-cash-active-list a{
 display:flex;
 justify-content:space-between;
 gap:8px;
 padding:7px 2px;
 border-bottom:1px solid #edf1f5;
 text-decoration:none;
}
.top-cash-active-list a:last-child{border-bottom:0}
.top-cash-active-list span{color:#48647c;font-size:8px}
.top-cash-active-list strong{color:#24455f;font-size:8px}

/* La alerta anterior queda deshabilitada aunque exista CSS heredado */
.global-cash-alert{display:none!important}

@media(max-width:850px){
 .top-cash-copy small{display:none}
 .top-cash-trigger{max-width:170px}
 .top-cash-copy strong{max-width:120px}
}
@media(max-width:620px){
 .top-cash-copy{display:none}
 .top-cash-trigger{width:34px;padding:0;justify-content:center}
 .top-cash-chevron{display:none}
 .top-cash-menu{position:fixed;top:54px;right:8px;width:min(310px,calc(100vw - 16px))}
}

/* =========================================================
   V148 - OCULTAR TITULOS GRANDES DE FORMULARIOS
   Conserva solo el contenido funcional para ganar altura.
   ========================================================= */

/* Oculta el bloque visual de título/ruta/subtítulo de página.
   No elimina el HTML para no afectar lógica ni navegación. */
.page-header,
.page-heading,
.module-header,
.content-header,
.erp-page-header{
 display:none!important;
}

/* Variantes habituales de cabecera de módulo */
.page-title-wrap,
.page-heading-wrap,
.module-title-wrap{
 display:none!important;
}

/* Evitar espacio residual */
.content > .page-header + *,
.content > .page-heading + *,
.content > .module-header + *,
.content > .content-header + *,
.content > .erp-page-header + *{
 margin-top:0!important;
}

/* El primer bloque funcional comienza inmediatamente */
.content{
 padding-top:8px!important;
}

/* =========================================================
   V149 - TECLAS RAPIDAS EN TOPBAR
   Elimina la franja del contenido y usa menú flotante.
   ========================================================= */
.shortcut-unified-bar,.sale-keyboard-bar,.context-shortcuts{display:none!important}

.top-shortcut-widget{
 position:relative;
 flex:0 0 auto;
 margin-right:8px;
}
.top-shortcut-trigger{
 height:34px;
 display:flex;
 align-items:center;
 gap:6px;
 padding:0 9px;
 border:1px solid #d7e2ec;
 border-radius:9px;
 background:#fff;
 color:#36526a;
 cursor:pointer;
 transition:.15s ease;
}
.top-shortcut-trigger:hover,.top-shortcut-widget.open .top-shortcut-trigger{
 background:#f7faff;
 border-color:#bfd4e7;
 box-shadow:0 3px 10px rgba(30,55,80,.07);
}
.top-shortcut-icon{color:#176be0;font-size:13px;line-height:1}
.top-shortcut-label{font-size:8.5px;font-weight:800;color:#35536e}
.top-shortcut-chevron{font-size:10px;color:#7d90a1}
.top-shortcut-menu{
 position:absolute;
 top:calc(100% + 7px);
 right:0;
 width:285px;
 border:1px solid #d7e2ec;
 border-radius:11px;
 background:#fff;
 box-shadow:0 18px 45px rgba(24,49,72,.16);
 overflow:hidden;
 z-index:2147480000;
}
.top-shortcut-menu[hidden]{display:none!important}
.top-shortcut-head{
 display:flex;align-items:center;gap:9px;
 padding:10px 11px;
 border-bottom:1px solid #e6edf3;
 background:#f8fbfd;
}
.top-shortcut-head>div{display:flex;flex-direction:column;gap:1px}
.top-shortcut-head strong{font-size:9.5px;color:#294760}
.top-shortcut-head small{font-size:7px;color:#7e91a3}
.top-shortcut-items{padding:6px 10px 8px}
.top-shortcut-items>div{
 display:grid;
 grid-template-columns:76px 1fr;
 align-items:center;
 gap:8px;
 min-height:34px;
 border-bottom:1px solid #edf1f5;
}
.top-shortcut-items>div:last-child{border-bottom:0}
.top-shortcut-items kbd{
 justify-self:start;
 min-width:30px;
 padding:4px 6px;
 border:1px solid #c8d6e5;
 border-bottom-width:2px;
 border-radius:5px;
 background:#f8fbff;
 color:#0e5eb9;
 font:800 8px/1 system-ui,sans-serif;
 text-align:center;
}
.top-shortcut-items span{font-size:8.5px;font-weight:650;color:#48627a}
@media(max-width:700px){
 .top-shortcut-label,.top-shortcut-chevron{display:none}
 .top-shortcut-trigger{width:34px;padding:0;justify-content:center}
 .top-shortcut-menu{position:fixed;top:54px;right:8px;width:min(285px,calc(100vw - 16px))}
}

/* =========================================================
   V150 - TOPBAR ERP COMPACTO + ATAJOS VISUALMENTE UNIFICADOS
   ========================================================= */

/* Barra superior: una sola línea compacta */
.topbar{
 min-height:48px!important;
 height:48px!important;
 padding-top:6px!important;
 padding-bottom:6px!important;
 align-items:center!important;
}

/* Caja y Atajos comparten exactamente la misma geometría */
.top-cash-widget,
.top-shortcut-widget{
 margin-top:0!important;
 margin-bottom:0!important;
 align-self:center!important;
}
.top-cash-trigger,
.top-shortcut-trigger{
 appearance:none!important;
 -webkit-appearance:none!important;
 box-sizing:border-box!important;
 height:34px!important;
 min-height:34px!important;
 border:1px solid #d7e2ec!important;
 border-radius:9px!important;
 background:#fff!important;
 box-shadow:none!important;
 font-family:inherit!important;
 line-height:1!important;
 outline:none!important;
}

/* Atajos: apariencia ERP, nunca botón nativo */
button.top-shortcut-trigger{
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:6px!important;
 min-width:82px!important;
 padding:0 10px!important;
 color:#35536e!important;
 cursor:pointer!important;
}
button.top-shortcut-trigger:hover,
.top-shortcut-widget.open button.top-shortcut-trigger{
 background:#f6faff!important;
 border-color:#bcd4ea!important;
 box-shadow:0 3px 10px rgba(31,79,121,.08)!important;
}
.top-shortcut-icon{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 width:16px!important;
 height:16px!important;
 color:#176be0!important;
 font-size:13px!important;
}
.top-shortcut-label{
 display:inline!important;
 font-size:9px!important;
 font-weight:800!important;
 color:#294b68!important;
}
.top-shortcut-chevron{
 display:inline!important;
 margin-left:1px!important;
 font-size:9px!important;
 color:#8294a5!important;
}

/* Eliminar visualmente caracteres/estilos heredados de controles nativos */
.top-shortcut-trigger::-moz-focus-inner{border:0!important;padding:0!important}

/* Recuperar altura del contenido tras ocultar títulos grandes */
.content,
.main-content,
.content-wrapper{
 margin-top:0!important;
}
.content{
 padding-top:6px!important;
}
.content > :first-child{
 margin-top:0!important;
}

/* Las cabeceras grandes V148 no deben reservar absolutamente ningún espacio */
.page-header,.page-heading,.module-header,.content-header,.erp-page-header,
.page-title-wrap,.page-heading-wrap,.module-title-wrap{
 display:none!important;
 height:0!important;
 min-height:0!important;
 margin:0!important;
 padding:0!important;
 border:0!important;
 overflow:hidden!important;
}

/* No dejar hueco de la antigua barra de teclas */
.shortcut-unified-bar,.sale-keyboard-bar,.context-shortcuts{
 display:none!important;
 height:0!important;
 min-height:0!important;
 margin:0!important;
 padding:0!important;
 border:0!important;
}

/* Menús flotantes por encima del contenido */
.top-cash-menu,.top-shortcut-menu{
 z-index:2147483000!important;
}

/* Pantallas pequeñas */
@media(max-width:700px){
 button.top-shortcut-trigger{
   min-width:34px!important;
   width:34px!important;
   padding:0!important;
 }
 .top-shortcut-label,.top-shortcut-chevron{display:none!important}
}

/* =========================================================
   V151 - TECLAS RAPIDAS: MENU FLOTANTE PROFESIONAL
   ========================================================= */
.top-shortcut-widget{
 position:relative!important;
 display:flex!important;
 align-items:center!important;
 flex:0 0 auto!important;
 margin-right:8px!important;
}
.top-shortcut-trigger{
 appearance:none!important;
 -webkit-appearance:none!important;
 height:34px!important;
 min-height:34px!important;
 min-width:86px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:6px!important;
 padding:0 10px!important;
 border:1px solid #d5e0ea!important;
 border-radius:9px!important;
 background:#fff!important;
 color:#2d4c67!important;
 box-shadow:none!important;
 font-family:inherit!important;
 cursor:pointer!important;
}
.top-shortcut-trigger:hover,
.top-shortcut-widget.open .top-shortcut-trigger{
 background:#f2f7fd!important;
 border-color:#b8d1e6!important;
 color:#1769c4!important;
}
.top-shortcut-trigger .top-shortcut-icon{
 width:17px!important;
 height:17px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 color:#176be0!important;
 font-size:13px!important;
 line-height:1!important;
}
.top-shortcut-trigger .top-shortcut-label{
 display:inline!important;
 color:#294b68!important;
 font-size:9px!important;
 font-weight:850!important;
 line-height:1!important;
}
.top-shortcut-trigger .top-shortcut-chevron{
 display:inline!important;
 margin-left:1px!important;
 color:#7b8fa2!important;
 font-size:8px!important;
 line-height:1!important;
}

/* Portal: no depende del overflow del topbar */
body > .top-shortcut-menu-portal{
 position:fixed!important;
 right:auto!important;
 bottom:auto!important;
 min-width:300px!important;
 max-width:calc(100vw - 20px)!important;
 border:1px solid #d5e0ea!important;
 border-radius:12px!important;
 background:#fff!important;
 box-shadow:0 20px 55px rgba(27,49,70,.20)!important;
 overflow:hidden!important;
 z-index:2147483646!important;
}
body > .top-shortcut-menu-portal[hidden]{
 display:none!important;
}
body > .top-shortcut-menu-portal .top-shortcut-head{
 min-height:52px!important;
 display:grid!important;
 grid-template-columns:30px minmax(0,1fr) 28px!important;
 align-items:center!important;
 gap:8px!important;
 padding:9px 10px!important;
 border-bottom:1px solid #e3eaf1!important;
 background:#f7fafe!important;
}
body > .top-shortcut-menu-portal .top-shortcut-head>.top-shortcut-icon{
 width:30px!important;
 height:30px!important;
 display:grid!important;
 place-items:center!important;
 border-radius:8px!important;
 background:#e8f2ff!important;
 color:#176be0!important;
 font-size:15px!important;
}
body > .top-shortcut-menu-portal .top-shortcut-head>div{
 min-width:0!important;
 display:flex!important;
 flex-direction:column!important;
 gap:2px!important;
}
body > .top-shortcut-menu-portal .top-shortcut-head strong{
 color:#203e59!important;
 font-size:10.5px!important;
 line-height:1.15!important;
 white-space:nowrap!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
}
body > .top-shortcut-menu-portal .top-shortcut-head small{
 color:#7b8ea0!important;
 font-size:7.5px!important;
 line-height:1.2!important;
}
body > .top-shortcut-menu-portal .top-shortcut-close{
 width:28px!important;
 height:28px!important;
 display:grid!important;
 place-items:center!important;
 padding:0!important;
 border:0!important;
 border-radius:7px!important;
 background:transparent!important;
 color:#7890a4!important;
 font-size:16px!important;
 cursor:pointer!important;
}
body > .top-shortcut-menu-portal .top-shortcut-close:hover{
 background:#edf3f8!important;
 color:#294b68!important;
}
body > .top-shortcut-menu-portal .top-shortcut-items{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:0!important;
 padding:6px 10px 9px!important;
}
body > .top-shortcut-menu-portal .top-shortcut-row{
 min-height:42px!important;
 display:grid!important;
 grid-template-columns:minmax(54px,76px) minmax(0,1fr)!important;
 align-items:center!important;
 gap:8px!important;
 padding:5px 3px!important;
 border-bottom:1px solid #edf1f5!important;
}
body > .top-shortcut-menu-portal .top-shortcut-row:nth-last-child(-n+2){
 border-bottom:0!important;
}
body > .top-shortcut-menu-portal kbd{
 justify-self:start!important;
 min-width:34px!important;
 max-width:76px!important;
 padding:5px 7px!important;
 border:1px solid #c6d5e3!important;
 border-bottom-width:2px!important;
 border-radius:6px!important;
 background:#f8fbff!important;
 color:#0e62bd!important;
 font:800 8.5px/1 system-ui,sans-serif!important;
 text-align:center!important;
 white-space:nowrap!important;
}
body > .top-shortcut-menu-portal .top-shortcut-row>span{
 color:#405b73!important;
 font-size:8.8px!important;
 font-weight:650!important;
 line-height:1.25!important;
}

/* En pantallas angostas, una sola columna */
@media(max-width:640px){
 .top-shortcut-trigger{
   min-width:34px!important;
   width:34px!important;
   padding:0!important;
 }
 .top-shortcut-trigger .top-shortcut-label,
 .top-shortcut-trigger .top-shortcut-chevron{
   display:none!important;
 }
 body > .top-shortcut-menu-portal .top-shortcut-items{
   grid-template-columns:1fr!important;
 }
 body > .top-shortcut-menu-portal .top-shortcut-row:nth-last-child(-n+2){
   border-bottom:1px solid #edf1f5!important;
 }
 body > .top-shortcut-menu-portal .top-shortcut-row:last-child{
   border-bottom:0!important;
 }
}

/* =========================================================
   V152 - ATAJOS TOPBAR MISMA LINEA VISUAL QUE CAJA
   ========================================================= */

/* Neutralizar por completo cualquier apariencia nativa */
.top-shortcut-widget button,
button.top-shortcut-trigger{
 all:unset!important;
 box-sizing:border-box!important;
 font-family:inherit!important;
}

/* Tarjeta de Atajos igual de profesional que Caja */
.top-shortcut-widget{
 position:relative!important;
 display:flex!important;
 align-items:center!important;
 flex:0 0 auto!important;
 margin:0 10px 0 0!important;
}

button.top-shortcut-trigger{
 width:184px!important;
 height:36px!important;
 min-height:36px!important;
 display:grid!important;
 grid-template-columns:28px minmax(0,1fr) 14px!important;
 align-items:center!important;
 gap:7px!important;
 padding:4px 8px!important;
 border:1px solid #d5e1eb!important;
 border-radius:10px!important;
 background:#fff!important;
 color:#294760!important;
 cursor:pointer!important;
 box-shadow:none!important;
 transition:background .15s ease,border-color .15s ease,box-shadow .15s ease!important;
}

button.top-shortcut-trigger:hover,
.top-shortcut-widget.open button.top-shortcut-trigger{
 background:#f7fbff!important;
 border-color:#bcd4e8!important;
 box-shadow:0 3px 10px rgba(31,76,116,.08)!important;
}

/* Icono profesional, ya no emoji suelto */
.top-shortcut-key-icon{
 width:28px!important;
 height:28px!important;
 display:grid!important;
 place-items:center!important;
 border-radius:8px!important;
 background:#eaf3ff!important;
 color:#176be0!important;
 font-size:13px!important;
 line-height:1!important;
 font-family:"Segoe UI Symbol","Segoe UI",sans-serif!important;
}

/* Texto en dos niveles como Caja */
.top-shortcut-copy{
 min-width:0!important;
 display:flex!important;
 flex-direction:column!important;
 align-items:flex-start!important;
 justify-content:center!important;
 gap:1px!important;
 overflow:hidden!important;
}

.top-shortcut-copy strong{
 display:block!important;
 max-width:100%!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
 color:#294760!important;
 font-size:7.7px!important;
 font-weight:900!important;
 line-height:1.1!important;
 letter-spacing:.01em!important;
}

.top-shortcut-copy small{
 display:block!important;
 max-width:100%!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
 color:#8394a4!important;
 font-size:6.5px!important;
 font-weight:500!important;
 line-height:1.1!important;
}

.top-shortcut-chevron{
 display:grid!important;
 place-items:center!important;
 width:14px!important;
 height:18px!important;
 color:#8193a3!important;
 font-size:8px!important;
 line-height:1!important;
}

/* Menú: ancho suficiente y tipografía clara */
body > .top-shortcut-menu-portal{
 width:360px!important;
 min-width:360px!important;
 max-width:calc(100vw - 20px)!important;
}

body > .top-shortcut-menu-portal .top-shortcut-items{
 grid-template-columns:1fr 1fr!important;
 gap:4px 10px!important;
 padding:8px 10px 10px!important;
}

body > .top-shortcut-menu-portal .top-shortcut-row{
 min-height:40px!important;
 grid-template-columns:76px minmax(0,1fr)!important;
 padding:5px 3px!important;
}

body > .top-shortcut-menu-portal .top-shortcut-row>span{
 font-size:9px!important;
 line-height:1.25!important;
 color:#38556e!important;
}

body > .top-shortcut-menu-portal kbd{
 min-width:38px!important;
 padding:5px 7px!important;
 font-size:8.5px!important;
}

/* Mantener Caja + Atajos correctamente alineados */
.topbar .top-cash-widget,
.topbar .top-shortcut-widget{
 align-self:center!important;
}

/* Resoluciones intermedias */
@media(max-width:1100px){
 button.top-shortcut-trigger{
   width:132px!important;
   grid-template-columns:28px minmax(0,1fr)!important;
 }
 .top-shortcut-chevron{
   display:none!important;
 }
 .top-shortcut-copy strong{
   font-size:7px!important;
 }
}

/* Móvil: solo icono, menú completo flotante */
@media(max-width:700px){
 button.top-shortcut-trigger{
   width:36px!important;
   min-width:36px!important;
   height:34px!important;
   grid-template-columns:1fr!important;
   padding:3px!important;
 }
 .top-shortcut-copy,
 .top-shortcut-chevron{
   display:none!important;
 }
 .top-shortcut-key-icon{
   width:28px!important;
   height:28px!important;
 }
 body > .top-shortcut-menu-portal{
   width:calc(100vw - 16px)!important;
   min-width:0!important;
 }
 body > .top-shortcut-menu-portal .top-shortcut-items{
   grid-template-columns:1fr!important;
 }
}

/* =========================================================
   V153 - ATAJOS TOPBAR ULTRACOMPACTO ERP
   ========================================================= */

/* Neutralizar reglas anteriores de V152 */
.top-shortcut-copy{display:none!important}

/* Botón corto, limpio y del mismo alto que Caja */
button.top-shortcut-trigger{
 width:auto!important;
 min-width:88px!important;
 max-width:100px!important;
 height:34px!important;
 min-height:34px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:6px!important;
 padding:0 10px!important;
 border:1px solid #d5e1eb!important;
 border-radius:9px!important;
 background:#fff!important;
 color:#294760!important;
 box-shadow:none!important;
 white-space:nowrap!important;
 overflow:hidden!important;
 cursor:pointer!important;
}

button.top-shortcut-trigger:hover,
.top-shortcut-widget.open button.top-shortcut-trigger{
 background:#f4f8fd!important;
 border-color:#bdd3e5!important;
 color:#1769c4!important;
}

/* Icono integrado, sin caja grande */
.top-shortcut-key-icon{
 width:16px!important;
 height:16px!important;
 display:inline-grid!important;
 place-items:center!important;
 border-radius:0!important;
 background:transparent!important;
 color:#176be0!important;
 font-size:13px!important;
 line-height:1!important;
}

/* Texto simple */
.top-shortcut-trigger .top-shortcut-label{
 display:inline!important;
 color:#2d4d68!important;
 font-size:8.5px!important;
 font-weight:850!important;
 line-height:1!important;
}

/* Flecha mínima */
.top-shortcut-trigger .top-shortcut-chevron{
 display:inline!important;
 width:auto!important;
 height:auto!important;
 margin-left:0!important;
 color:#8293a3!important;
 font-size:7px!important;
 line-height:1!important;
}

/* Separación correcta respecto a Caja y usuario */
.top-shortcut-widget{
 margin-left:0!important;
 margin-right:10px!important;
}

/* Menú flotante: encabezado contiene el nombre del módulo, no el botón */
body > .top-shortcut-menu-portal{
 width:340px!important;
 min-width:340px!important;
 max-width:calc(100vw - 20px)!important;
}
body > .top-shortcut-menu-portal .top-shortcut-head strong{
 font-size:10px!important;
}
body > .top-shortcut-menu-portal .top-shortcut-items{
 grid-template-columns:1fr 1fr!important;
}

/* Móvil: solo icono */
@media(max-width:700px){
 button.top-shortcut-trigger{
   min-width:34px!important;
   width:34px!important;
   max-width:34px!important;
   padding:0!important;
 }
 .top-shortcut-trigger .top-shortcut-label,
 .top-shortcut-trigger .top-shortcut-chevron{
   display:none!important;
 }
 body > .top-shortcut-menu-portal{
   width:calc(100vw - 16px)!important;
   min-width:0!important;
 }
 body > .top-shortcut-menu-portal .top-shortcut-items{
   grid-template-columns:1fr!important;
 }
}

/* =========================================================
   V154 - ATAJOS FUNCIONAL + ESTILO NATIVO SOFTGESTION
   ========================================================= */

/* Ocultar componentes heredados de versiones anteriores */
.top-shortcut-widget,
.top-shortcut-menu,
.top-shortcut-menu-portal,
.shortcut-unified-bar,
.sale-keyboard-bar,
.context-shortcuts{
 display:none!important;
}

/* Widget del topbar */
.sg-shortcut-widget{
 position:relative!important;
 display:flex!important;
 align-items:center!important;
 flex:0 0 auto!important;
 margin:0 10px 0 0!important;
}

.sg-shortcut-trigger{
 box-sizing:border-box!important;
 appearance:none!important;
 -webkit-appearance:none!important;
 height:34px!important;
 min-height:34px!important;
 min-width:86px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:6px!important;
 padding:0 10px!important;
 border:1px solid #d5e1eb!important;
 border-radius:9px!important;
 background:#ffffff!important;
 color:#294760!important;
 box-shadow:none!important;
 font-family:inherit!important;
 font-size:9px!important;
 font-weight:800!important;
 line-height:1!important;
 text-transform:none!important;
 cursor:pointer!important;
 outline:none!important;
}

.sg-shortcut-trigger:hover,
.sg-shortcut-widget.is-open .sg-shortcut-trigger{
 background:#f3f8fd!important;
 border-color:#bdd3e5!important;
 color:#1769c4!important;
 box-shadow:0 3px 10px rgba(28,75,115,.08)!important;
}

.sg-shortcut-icon{
 display:inline-grid!important;
 place-items:center!important;
 width:16px!important;
 height:16px!important;
 color:#176be0!important;
 font-size:13px!important;
 line-height:1!important;
}

.sg-shortcut-text{
 display:inline!important;
 color:inherit!important;
 font-size:9px!important;
 font-weight:850!important;
 line-height:1!important;
}

.sg-shortcut-arrow{
 display:inline!important;
 color:#8494a3!important;
 font-size:7px!important;
 line-height:1!important;
}

/* Menú flotante en BODY */
body > .sg-shortcut-menu{
 position:fixed!important;
 width:320px!important;
 min-width:320px!important;
 max-width:calc(100vw - 16px)!important;
 border:1px solid #d7e2ec!important;
 border-radius:11px!important;
 background:#fff!important;
 box-shadow:0 18px 46px rgba(24,49,72,.18)!important;
 overflow:hidden!important;
 z-index:2147483646!important;
}

body > .sg-shortcut-menu[hidden]{
 display:none!important;
}

.sg-shortcut-menu-head{
 min-height:50px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:8px!important;
 padding:9px 10px!important;
 border-bottom:1px solid #e5ebf1!important;
 background:#f7fafe!important;
}

.sg-shortcut-menu-title{
 min-width:0!important;
 display:flex!important;
 align-items:center!important;
 gap:8px!important;
}

.sg-shortcut-menu-icon{
 width:30px!important;
 height:30px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 30px!important;
 border-radius:8px!important;
 background:#eaf3ff!important;
 color:#176be0!important;
 font-size:14px!important;
}

.sg-shortcut-menu-title>div{
 min-width:0!important;
 display:flex!important;
 flex-direction:column!important;
 gap:2px!important;
}

.sg-shortcut-menu-title strong{
 color:#203f59!important;
 font-size:10px!important;
 font-weight:900!important;
 line-height:1.1!important;
}

.sg-shortcut-menu-title small{
 color:#7d8fa1!important;
 font-size:7.5px!important;
 line-height:1.1!important;
}

.sg-shortcut-close{
 width:28px!important;
 height:28px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 28px!important;
 padding:0!important;
 border:0!important;
 border-radius:7px!important;
 background:transparent!important;
 color:#7890a4!important;
 font-size:16px!important;
 line-height:1!important;
 cursor:pointer!important;
}

.sg-shortcut-close:hover{
 background:#edf3f8!important;
 color:#294b68!important;
}

.sg-shortcut-list{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:0 10px!important;
 padding:7px 10px 9px!important;
}

.sg-shortcut-item{
 min-height:39px!important;
 display:grid!important;
 grid-template-columns:minmax(55px,72px) minmax(0,1fr)!important;
 align-items:center!important;
 gap:7px!important;
 padding:4px 2px!important;
 border-bottom:1px solid #edf1f5!important;
}

.sg-shortcut-item kbd{
 justify-self:start!important;
 min-width:34px!important;
 padding:5px 6px!important;
 border:1px solid #c6d5e3!important;
 border-bottom-width:2px!important;
 border-radius:6px!important;
 background:#f8fbff!important;
 color:#0e62bd!important;
 font:800 8px/1 system-ui,sans-serif!important;
 text-align:center!important;
 white-space:nowrap!important;
}

.sg-shortcut-item span{
 color:#405a72!important;
 font-size:8.5px!important;
 font-weight:650!important;
 line-height:1.2!important;
}

@media(max-width:700px){
 .sg-shortcut-trigger{
   min-width:34px!important;
   width:34px!important;
   padding:0!important;
 }
 .sg-shortcut-text,
 .sg-shortcut-arrow{
   display:none!important;
 }
 body > .sg-shortcut-menu{
   width:calc(100vw - 16px)!important;
   min-width:0!important;
 }
 .sg-shortcut-list{
   grid-template-columns:1fr!important;
 }
}

/* =========================================================
   V155 - ATAJOS NATIVO, MISMO COMPONENTE QUE CAJA
   ========================================================= */

/* Ocultar cualquier implementación dinámica previa */
.sg-shortcut-widget,
.sg-shortcut-menu,
.top-shortcut-widget,
.top-shortcut-menu,
.top-shortcut-menu-portal{
 display:none!important;
}

/* Pero permitir explícitamente el nuevo componente servidor */
.top-shortcut-native{
 display:block!important;
 position:relative!important;
 margin-left:0!important;
 margin-right:10px!important;
}

.top-shortcut-native .shortcut-native-trigger{
 display:flex!important;
}

.shortcut-native-trigger{
 min-width:128px!important;
 max-width:160px!important;
}

.shortcut-native-icon{
 width:24px!important;
 height:24px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 24px!important;
 border-radius:7px!important;
 background:#eaf3ff!important;
 color:#176be0!important;
 font-size:12px!important;
 line-height:1!important;
}

.shortcut-native-menu{
 width:310px!important;
}

.shortcut-native-menu .top-cash-menu-head.shortcut{
 background:#f7fafe!important;
}

.shortcut-native-menu-icon{
 width:30px!important;
 height:30px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 30px!important;
 border-radius:8px!important;
 background:#eaf3ff!important;
 color:#176be0!important;
 font-size:14px!important;
}

.shortcut-native-list{
 padding:7px 10px 9px!important;
}

.shortcut-native-row{
 min-height:38px!important;
 display:grid!important;
 grid-template-columns:74px minmax(0,1fr)!important;
 align-items:center!important;
 gap:8px!important;
 padding:4px 2px!important;
 border-bottom:1px solid #edf1f5!important;
}

.shortcut-native-row:last-child{
 border-bottom:0!important;
}

.shortcut-native-row kbd{
 justify-self:start!important;
 min-width:34px!important;
 padding:5px 7px!important;
 border:1px solid #c6d5e3!important;
 border-bottom-width:2px!important;
 border-radius:6px!important;
 background:#f8fbff!important;
 color:#0e62bd!important;
 font:800 8px/1 system-ui,sans-serif!important;
 text-align:center!important;
 white-space:nowrap!important;
}

.shortcut-native-row span{
 color:#405a72!important;
 font-size:8.5px!important;
 font-weight:650!important;
 line-height:1.2!important;
}

/* Alinear Caja + Atajos + Usuario */
.topbar{
 overflow:visible!important;
}
.topbar .top-cash-widget{
 flex:0 0 auto!important;
}

/* Responsive */
@media(max-width:760px){
 .shortcut-native-trigger{
  min-width:34px!important;
  width:34px!important;
  max-width:34px!important;
  padding:0!important;
  justify-content:center!important;
 }
 .shortcut-native-trigger .top-cash-copy,
 .shortcut-native-trigger .top-cash-chevron{
  display:none!important;
 }
 .shortcut-native-icon{
  width:26px!important;
  height:26px!important;
  background:transparent!important;
 }
 .shortcut-native-menu{
  position:fixed!important;
  top:54px!important;
  right:8px!important;
  width:min(310px,calc(100vw - 16px))!important;
 }
}

/* =========================================================
   V156 - NUEVA VENTA REDISEÑO ERP FLEXIBLE
   ========================================================= */

/* Base visual */
.sale-erp-v156{
 --sale-gap:10px;
 --sale-border:#dbe5ee;
 --sale-soft:#f7f9fc;
 --sale-blue:#176be0;
 --sale-text:#17324d;
 --sale-muted:#74889b;
}

/* Barra de contexto compacta */
.sale-erp-v156 .sale-erp-commandbar{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 min-height:36px;
 margin:0 0 8px;
 padding:6px 10px;
 border:1px solid #dbe5ee;
 border-radius:9px;
 background:#fff;
}
.sale-erp-command-left{
 display:flex;
 align-items:center;
 gap:7px;
 min-width:0;
}
.sale-erp-command-dot{
 width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#176be0;
}
.sale-erp-command-left strong{
 color:#24425d;font-size:9.5px;font-weight:900;white-space:nowrap;
}
.sale-erp-command-left small{
 color:#8293a3;font-size:7.5px;white-space:nowrap;
}
.sale-erp-command-state{
 display:inline-flex;align-items:center;justify-content:center;
 min-height:22px;padding:3px 8px;border-radius:999px;
 background:#edf4fb;color:#55718b;font-size:6.8px;font-weight:900;
}

/* Layout ERP: área de trabajo + resumen estrecho */
.sale-erp-v156 .sale-layout{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 220px!important;
 gap:10px!important;
 align-items:start!important;
}

/* Columna principal */
.sale-erp-v156 .sale-main-card{
 border-radius:10px!important;
 overflow:hidden!important;
 box-shadow:none!important;
}

/* Secciones internas más limpias */
.sale-erp-v156 .sale-section-title{
 min-height:38px!important;
 padding:6px 9px!important;
 border-bottom:1px solid #e3eaf1!important;
 background:#fbfcfe!important;
}
.sale-erp-v156 .sale-section-title>div{
 gap:7px!important;
}
.sale-erp-v156 .sale-step{
 width:25px!important;
 height:25px!important;
 flex:0 0 25px!important;
 border-radius:7px!important;
 font-size:8px!important;
}
.sale-erp-v156 .sale-section-title strong{
 font-size:10.5px!important;
}
.sale-erp-v156 .sale-section-title small{
 font-size:7.2px!important;
 margin-top:1px!important;
}

/* Datos de la operación como grilla horizontal compacta */
.sale-erp-v156 .sale-main-card .card-body{
 padding:8px 9px!important;
}
.sale-erp-v156 .sale-operation-grid,
.sale-erp-v156 .sale-data-grid,
.sale-erp-v156 .sale-fields-grid{
 gap:6px!important;
}
.sale-erp-v156 .field{
 margin-bottom:0!important;
}
.sale-erp-v156 .field label{
 margin-bottom:3px!important;
 font-size:8.5px!important;
}
.sale-erp-v156 .field small{
 margin-top:2px!important;
 font-size:6.8px!important;
 line-height:1.15!important;
}
.sale-erp-v156 .input,
.sale-erp-v156 .select,
.sale-erp-v156 input[type="text"],
.sale-erp-v156 input[type="search"],
.sale-erp-v156 input[type="date"],
.sale-erp-v156 input[type="number"],
.sale-erp-v156 select{
 min-height:33px!important;
 height:33px!important;
 border-radius:7px!important;
 font-size:9.5px!important;
}

/* Cliente */
.sale-erp-v156 .client-search-row,
.sale-erp-v156 .sale-client-search{
 gap:6px!important;
}
.sale-erp-v156 .selected-client,
.sale-erp-v156 .sale-client-selected{
 min-height:28px!important;
 padding:5px 8px!important;
 border-radius:7px!important;
}

/* Plan financiero = franja horizontal, no gran bloque vacío */
.sale-erp-v156 .sale-credit-planner{
 margin-top:7px!important;
 border-radius:9px!important;
 background:#fbfdff!important;
}
.sale-erp-v156 .sale-credit-planner-head{
 min-height:36px!important;
 padding:6px 8px!important;
}
.sale-erp-v156 .sale-credit-planner-head strong{
 font-size:9.5px!important;
}
.sale-erp-v156 .sale-credit-planner-head small,
.sale-erp-v156 .sale-credit-planner-kicker{
 font-size:6.8px!important;
}
.sale-erp-v156 .sale-credit-planner-status{
 padding:3px 7px!important;
 font-size:6.2px!important;
}
.sale-erp-v156 .sale-credit-planner-toggle{
 height:25px!important;
 min-height:25px!important;
 padding:0 8px!important;
 font-size:7px!important;
}
.sale-erp-v156 .sale-credit-planner-grid-v141{
 grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr)!important;
 gap:7px!important;
 padding:7px!important;
}
.sale-erp-v156 .sale-credit-panel{
 border-radius:8px!important;
}
.sale-erp-v156 .sale-credit-panel-head{
 min-height:34px!important;
 padding:5px 7px!important;
}
.sale-erp-v156 .sale-credit-panel-step{
 width:22px!important;height:22px!important;flex:0 0 22px!important;font-size:7px!important;
}
.sale-erp-v156 .sale-credit-panel-head strong{font-size:8.8px!important}
.sale-erp-v156 .sale-credit-panel-head small{font-size:6.6px!important}
.sale-erp-v156 .sale-credit-panel-toggle{
 height:24px!important;min-width:52px!important;font-size:6.8px!important;
}
.sale-erp-v156 .sale-credit-panel-body{
 padding:6px!important;
}
.sale-erp-v156 .sale-credit-fields{
 grid-template-columns:1.05fr .72fr 1fr!important;
 gap:5px!important;
}
.sale-erp-v156 .sale-credit-schedule-box{
 min-height:40px!important;
 margin-top:6px!important;
 padding:5px 6px!important;
}
.sale-erp-v156 .sale-credit-schedule-icon{
 width:26px!important;height:26px!important;flex:0 0 26px!important;
}
.sale-erp-v156 .sale-credit-schedule-copy strong{font-size:8px!important}
.sale-erp-v156 .sale-credit-schedule-copy small{font-size:6.5px!important}
.sale-erp-v156 .sale-credit-schedule-box .credit-schedule-open{
 min-width:110px!important;
 min-height:29px!important;
 height:29px!important;
 font-size:7.5px!important;
}

/* Ajuste interno más discreto */
.sale-erp-v156 .sale-credit-surcharge-summary{
 grid-template-columns:1fr 1fr!important;
 gap:5px!important;
}
.sale-erp-v156 .sale-credit-surcharge-summary>div{
 min-height:48px!important;
 padding:6px 7px!important;
}
.sale-erp-v156 .sale-credit-surcharge-summary span{font-size:6px!important}
.sale-erp-v156 .sale-credit-surcharge-summary strong{font-size:9.5px!important}
.sale-erp-v156 .sale-credit-surcharge-summary>div:first-child strong{font-size:14px!important}
.sale-erp-v156 .sale-credit-surcharge-note{
 margin-top:5px!important;padding:5px 6px!important;
}
.sale-erp-v156 .sale-credit-surcharge-note p{font-size:6.5px!important}

/* Pie de datos generales: moneda/estado/establecimiento en línea */
.sale-erp-v156 .sale-main-card .sale-bottom-fields,
.sale-erp-v156 .sale-main-card .sale-footer-fields{
 display:grid!important;
 grid-template-columns:1fr 1fr 1fr!important;
 gap:6px!important;
}

/* Resumen lateral tipo ERP */
.sale-erp-v156 .sale-summary-card{
 position:sticky!important;
 top:8px!important;
 border-radius:10px!important;
 box-shadow:none!important;
}
.sale-erp-v156 .sale-summary-card .sale-section-title{
 min-height:36px!important;
}
.sale-erp-v156 .sale-summary-card .card-body{
 padding:7px!important;
}
.sale-erp-v156 .sale-summary-lines{
 display:grid!important;
 gap:2px!important;
}
.sale-erp-v156 .sale-summary-lines>div{
 min-height:23px!important;
 padding:3px 1px!important;
 font-size:7px!important;
}
.sale-erp-v156 .sale-grand-total{
 margin-top:5px!important;
 padding:8px!important;
 min-height:52px!important;
}
.sale-erp-v156 .sale-grand-total span{font-size:6px!important}
.sale-erp-v156 .sale-grand-total strong{font-size:16px!important}
.sale-erp-v156 .sale-finance-actions{
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:5px!important;
}
.sale-erp-v156 .sale-finance-actions .btn{
 min-height:31px!important;height:31px!important;font-size:7.5px!important;
}
.sale-erp-v156 .sale-sidebar-credit-summary{
 margin-top:5px!important;
}
.sale-erp-v156 .sale-sidebar-credit-head{
 padding:5px 6px!important;
}
.sale-erp-v156 .sale-sidebar-credit-body{
 padding:5px!important;
}
.sale-erp-v156 .sale-sidebar-credit-grid{
 grid-template-columns:1fr 1fr!important;
 gap:3px!important;
}
.sale-erp-v156 .sale-sidebar-credit-grid>div{
 padding:4px!important;
}
.sale-erp-v156 .sale-sidebar-credit-grid span{font-size:5.7px!important}
.sale-erp-v156 .sale-sidebar-credit-grid strong{font-size:7.5px!important}
.sale-erp-v156 .sale-sidebar-credit-total{
 margin-top:4px!important;padding:5px 6px!important;
}
.sale-erp-v156 .sale-sidebar-credit-adjustment{
 margin-top:4px!important;padding:5px!important;
}
.sale-erp-v156 .sale-sidebar-credit-view{
 min-height:27px!important;margin-top:4px!important;font-size:7px!important;
}

/* Productos = área protagonista */
.sale-erp-v156 .sale-detail-card{
 margin-top:8px!important;
 min-height:calc(100vh - 285px)!important;
 border-radius:10px!important;
 overflow:hidden!important;
}
.sale-erp-v156 .sale-detail-card .sale-section-title{
 min-height:38px!important;
}
.sale-erp-v156 .sale-detail-card .card-body{
 padding:7px 9px!important;
}
.sale-erp-v156 .sale-product-quick-head{
 min-height:24px!important;
 margin-bottom:4px!important;
}
.sale-erp-v156 .sale-product-quick-head label{
 font-size:9px!important;
}
.sale-erp-v156 .sale-stock-policy{
 padding:3px 6px!important;
 font-size:6.5px!important;
}
.sale-erp-v156 #productoBuscar{
 min-height:35px!important;
 height:35px!important;
 font-size:9.5px!important;
}
.sale-erp-v156 .selected-product-tip{
 margin-top:2px!important;
 font-size:6.5px!important;
}
.sale-erp-v156 .sale-items-wrap{
 min-height:calc(100vh - 390px)!important;
 max-height:calc(100vh - 285px)!important;
 overflow:auto!important;
}
.sale-erp-v156 .sale-items-table thead th{
 position:sticky!important;
 top:0!important;
 z-index:5!important;
 background:#f5f8fb!important;
 padding-top:7px!important;
 padding-bottom:7px!important;
 font-size:7.5px!important;
}
.sale-erp-v156 .sale-items-table tbody td{
 padding-top:7px!important;
 padding-bottom:7px!important;
}
.sale-erp-v156 .sale-product-name strong{
 font-size:9.5px!important;
}
.sale-erp-v156 .sale-product-name small{
 font-size:6.8px!important;
}
.sale-erp-v156 .sale-code{
 font-size:7.5px!important;
}
.sale-erp-v156 .qty,
.sale-erp-v156 .price{
 min-height:32px!important;
 height:32px!important;
}

/* En pantallas grandes, todavía más aire para productos */
@media(min-width:1440px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:minmax(0,1fr) 210px!important;
 }
 .sale-erp-v156 .sale-detail-card{
   min-height:calc(100vh - 260px)!important;
 }
 .sale-erp-v156 .sale-items-wrap{
   max-height:calc(100vh - 270px)!important;
 }
}

/* Responsive */
@media(max-width:1180px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-summary-card{
   position:static!important;
 }
 .sale-erp-v156 .sale-credit-planner-grid-v141{
   grid-template-columns:1fr!important;
 }
}
@media(max-width:760px){
 .sale-erp-v156 .sale-erp-command-left small{display:none}
 .sale-erp-v156 .sale-credit-fields{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-items-wrap{
   min-height:auto!important;
   max-height:none!important;
 }
}

/* =========================================================
   V157 - CREDITO DEBAJO DE PRODUCTOS AGREGADOS / RESUMEN
   ========================================================= */

/* El plan financiero ya no ocupa espacio dentro de Datos de la operación */
.sale-erp-v156 .sale-credit-sidebar-zone{
 margin-top:6px!important;
}

/* Adaptar el bloque completo al ancho del panel Resumen */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner{
 margin:0!important;
 border-radius:9px!important;
 background:#fbfdff!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head{
 min-height:34px!important;
 padding:6px 7px!important;
 align-items:flex-start!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head>div:first-child{
 min-width:0!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head strong{
 font-size:8.5px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head small,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-kicker{
 font-size:6.2px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head-actions{
 gap:4px!important;
 flex-direction:column!important;
 align-items:flex-end!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-status{
 font-size:5.8px!important;
 padding:3px 5px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-toggle{
 height:23px!important;
 min-height:23px!important;
 padding:0 6px!important;
 font-size:6.3px!important;
}

/* Dentro del resumen lateral, cuotas y ajuste se apilan para no forzar ancho */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.left-collapsed,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.right-collapsed,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.left-collapsed.right-collapsed{
 grid-template-columns:1fr!important;
 gap:5px!important;
 padding:5px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-left,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-right,
.sale-erp-v156 .sale-credit-sidebar-zone #ventaRecargoInterno{
 grid-column:1!important;
 width:100%!important;
}

/* Panel cuotas compacto */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head{
 min-height:31px!important;
 padding:5px 6px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-step{
 width:20px!important;height:20px!important;flex:0 0 20px!important;
 font-size:6.3px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head strong{
 font-size:7.8px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head small{
 display:none!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-toggle{
 height:22px!important;
 min-width:48px!important;
 padding:0 5px!important;
 font-size:6.2px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-body{
 padding:5px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
 grid-template-columns:1fr!important;
 gap:4px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .field label{
 font-size:7px!important;
 margin-bottom:2px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .input,
.sale-erp-v156 .sale-credit-sidebar-zone .select{
 min-height:29px!important;
 height:29px!important;
 font-size:8px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .field small{
 font-size:5.8px!important;
}

/* Cronograma compacto */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{
 min-height:auto!important;
 margin-top:4px!important;
 padding:5px!important;
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:5px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy{
 gap:5px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-icon{
 width:23px!important;height:23px!important;flex:0 0 23px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy strong{
 font-size:7px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy small{
 font-size:5.8px!important;
 white-space:normal!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{
 width:100%!important;
 min-width:0!important;
 height:27px!important;
 min-height:27px!important;
 font-size:6.8px!important;
}

/* Ajuste interno muy compacto */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary{
 grid-template-columns:1fr 1fr!important;
 gap:4px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div{
 min-height:42px!important;
 padding:5px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary span{
 font-size:5.5px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary strong{
 font-size:8px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div:first-child strong{
 font-size:12px!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note{
 margin-top:4px!important;
 padding:4px 5px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note p{
 font-size:5.8px!important;
}

/* Evitar doble resumen: ocultar la tarjeta antigua de resumen de crédito lateral */
.sale-erp-v156 .sale-sidebar-credit-summary{
 display:none!important;
}

/* En móvil/tablet el bloque sigue debajo de Productos agregados */
@media(max-width:1180px){
 .sale-erp-v156 .sale-credit-sidebar-zone{
   margin-top:8px!important;
 }
}

/* =========================================================
   V158 - PANEL DERECHO AMPLIO + CREDITO ERP PROFESIONAL
   ========================================================= */

/* Dar más ancho útil al resumen sin sacrificar demasiado Productos */
.sale-erp-v156 .sale-layout{
 grid-template-columns:minmax(0,1fr) 330px!important;
 gap:10px!important;
}

/* Resumen lateral */
.sale-erp-v156 .sale-summary-card{
 width:100%!important;
 min-width:0!important;
}

/* Crédito debajo de Productos agregados */
.sale-erp-v156 .sale-credit-sidebar-zone{
 width:100%!important;
 margin-top:7px!important;
}

/* El contenedor financiero usa todo el ancho */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner{
 width:100%!important;
 min-width:0!important;
 overflow:visible!important;
}

/* Cabecera compacta y legible */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head{
 display:flex!important;
 flex-direction:row!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:8px!important;
 min-height:43px!important;
 padding:7px 8px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head strong{
 font-size:9.5px!important;
 line-height:1.15!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head small{
 display:block!important;
 margin-top:2px!important;
 font-size:6.7px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-head-actions{
 flex-direction:row!important;
 align-items:center!important;
 gap:5px!important;
}

/* Plan de cuotas y ajuste interno, uno debajo del otro */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.left-collapsed,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.right-collapsed,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.left-collapsed.right-collapsed{
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 gap:7px!important;
 width:100%!important;
 padding:7px!important;
}

/* Cada panel debe ocupar el 100% */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-left,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-right,
.sale-erp-v156 .sale-credit-sidebar-zone #ventaRecargoInterno{
 grid-column:1!important;
 width:100%!important;
 min-width:0!important;
 max-width:none!important;
}

/* Cabecera de Plan de cuotas */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head{
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:6px!important;
 min-height:38px!important;
 padding:6px 7px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head strong{
 font-size:8.8px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head small{
 display:block!important;
 font-size:6.3px!important;
}

/* Los tres datos de cuotas ahora sí caben horizontalmente */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
 display:grid!important;
 grid-template-columns:1.18fr .72fr 1fr!important;
 gap:5px!important;
 align-items:start!important;
 width:100%!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field{
 min-width:0!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields label{
 display:block!important;
 margin-bottom:3px!important;
 font-size:7.2px!important;
 white-space:nowrap!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields input,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields select{
 width:100%!important;
 min-width:0!important;
 height:31px!important;
 min-height:31px!important;
 padding-left:7px!important;
 padding-right:7px!important;
 font-size:8px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields small{
 display:block!important;
 margin-top:2px!important;
 font-size:5.7px!important;
 white-space:normal!important;
}

/* Cronograma en una fila clara */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 112px!important;
 align-items:center!important;
 gap:6px!important;
 width:100%!important;
 min-height:44px!important;
 margin-top:6px!important;
 padding:6px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy{
 min-width:0!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy small{
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{
 width:112px!important;
 min-width:112px!important;
 height:29px!important;
 min-height:29px!important;
}

/* Ajuste interno: porcentaje y monto lado a lado */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:6px!important;
 width:100%!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div{
 min-width:0!important;
 min-height:50px!important;
 padding:6px 7px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary span{
 font-size:6.2px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary strong{
 font-size:10px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div:first-child strong{
 font-size:13px!important;
}

/* Evitar cualquier recorte horizontal */
.sale-erp-v156 .sale-summary-card,
.sale-erp-v156 .sale-summary-card .card-body,
.sale-erp-v156 .sale-credit-sidebar-zone,
.sale-erp-v156 .sale-credit-sidebar-zone *{
 box-sizing:border-box!important;
}

/* Productos sigue teniendo prioridad */
.sale-erp-v156 .sale-detail-card{
 min-width:0!important;
}

/* En monitores muy anchos, panel derecho aún más cómodo */
@media(min-width:1600px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:minmax(0,1fr) 360px!important;
 }
}

/* En resoluciones intermedias mantener suficiente espacio para productos */
@media(max-width:1350px) and (min-width:1181px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:minmax(0,1fr) 300px!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
   grid-template-columns:1fr 1fr!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field:last-child{
   grid-column:1 / -1!important;
 }
}

/* Tablet: resumen debajo del área principal */
@media(max-width:1180px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-summary-card{
   position:static!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
   grid-template-columns:1fr 1fr 1fr!important;
 }
}

/* Móvil */
@media(max-width:650px){
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field:last-child{
   grid-column:auto!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{
   width:100%!important;
   min-width:0!important;
 }
}

/* =========================================================
   V159 - TEMA ERP GLOBAL SOFTGESTION
   Estándar visual basado en Nueva Venta de referencia
   ========================================================= */

:root{
 --sg-navy:#0f2948;
 --sg-navy-2:#15385f;
 --sg-blue:#176be0;
 --sg-blue-2:#0f5fcf;
 --sg-blue-soft:#eaf3ff;
 --sg-bg:#f3f6f9;
 --sg-card:#ffffff;
 --sg-border:#dbe5ee;
 --sg-border-2:#e7edf3;
 --sg-text:#17324d;
 --sg-muted:#74889b;
 --sg-success:#15945f;
 --sg-warning:#b77a0a;
 --sg-danger:#d04452;
 --sg-shadow:0 4px 16px rgba(20,48,74,.05);
 --sg-radius:10px;
 --sg-radius-sm:7px;
}

/* Fondo general */
html,body{
 background:var(--sg-bg)!important;
 color:var(--sg-text)!important;
 font-family:"Segoe UI",Inter,Arial,sans-serif!important;
}

/* SIDEBAR */
.sidebar{
 background:linear-gradient(180deg,#102b4b 0%,#0b223d 100%)!important;
 border-right:1px solid rgba(255,255,255,.04)!important;
 box-shadow:none!important;
}
.sidebar .brand,
.sidebar .sidebar-brand{
 background:transparent!important;
 border-bottom:0!important;
}
.sidebar .brand strong,
.sidebar .sidebar-brand strong{
 color:#fff!important;
 font-weight:850!important;
 letter-spacing:.01em!important;
}
.sidebar .brand small,
.sidebar .sidebar-brand small{
 color:#96badf!important;
}
.sidebar .nav-section-title,
.sidebar .menu-section-title{
 color:#7297bf!important;
 font-size:7px!important;
 letter-spacing:.10em!important;
 font-weight:800!important;
}
.sidebar a,
.sidebar .nav-link{
 color:#edf4fb!important;
 border-radius:8px!important;
 transition:.15s ease!important;
}
.sidebar a:hover,
.sidebar .nav-link:hover{
 background:rgba(255,255,255,.06)!important;
 color:#fff!important;
}
.sidebar a.active,
.sidebar .nav-link.active,
.sidebar .active>a{
 background:#1e4f85!important;
 color:#fff!important;
 box-shadow:inset 3px 0 0 #4aa0ff!important;
}

/* TOPBAR */
.topbar{
 background:#fff!important;
 border-bottom:1px solid var(--sg-border)!important;
 box-shadow:none!important;
}
.top-title strong{
 color:#233f59!important;
}
.top-title small{
 color:#7f91a2!important;
}

/* Área de contenido */
.content,
.main-content,
.content-wrapper{
 background:var(--sg-bg)!important;
}
.content{
 padding:10px 12px 16px!important;
}

/* Tarjetas y paneles */
.card,
.panel,
.widget,
.box,
.settings-section-card,
.sale-main-card,
.sale-detail-card,
.sale-summary-card{
 background:#fff!important;
 border:1px solid var(--sg-border)!important;
 border-radius:var(--sg-radius)!important;
 box-shadow:var(--sg-shadow)!important;
}

/* Encabezados de sección */
.card-header,
.panel-header,
.section-header,
.sale-section-title,
.settings-section-card>.subsection-heading{
 background:#fbfcfe!important;
 border-bottom:1px solid var(--sg-border-2)!important;
 color:var(--sg-text)!important;
}
.card-header h1,.card-header h2,.card-header h3,
.panel-header h1,.panel-header h2,.panel-header h3,
.section-header h1,.section-header h2,.section-header h3{
 color:var(--sg-text)!important;
}

/* Step badges 01/02/03 */
.sale-step,
.section-step,
.step-badge{
 background:var(--sg-blue-soft)!important;
 color:var(--sg-blue)!important;
 border-radius:7px!important;
 font-weight:900!important;
}

/* Inputs / selects / textarea */
.input,
.select,
.form-control,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea{
 background:#fff!important;
 border:1px solid #cfdce8!important;
 border-radius:7px!important;
 color:#29445c!important;
 box-shadow:none!important;
 transition:.14s ease!important;
}
.input:hover,
.select:hover,
.form-control:hover,
input:hover,
select:hover,
textarea:hover{
 border-color:#b8cddd!important;
}
.input:focus,
.select:focus,
.form-control:focus,
input:focus,
select:focus,
textarea:focus{
 border-color:#2680eb!important;
 box-shadow:0 0 0 3px rgba(38,128,235,.12)!important;
 outline:none!important;
}

/* Labels */
label{
 color:#203d57!important;
 font-weight:700!important;
}

/* Botones */
.btn,
button.btn,
a.btn{
 border-radius:7px!important;
 font-weight:800!important;
 transition:.14s ease!important;
}
.btn-primary,
.btn.btn-primary{
 background:linear-gradient(180deg,#2377df,#1768cf)!important;
 border:1px solid #1768cf!important;
 color:#fff!important;
 box-shadow:0 2px 5px rgba(23,104,207,.14)!important;
}
.btn-primary:hover{
 background:linear-gradient(180deg,#1c70d8,#115fc4)!important;
}
.btn-light,
.btn-secondary,
.btn-outline{
 background:#fff!important;
 border:1px solid #d3dfeb!important;
 color:#294961!important;
 box-shadow:none!important;
}
.btn-light:hover,
.btn-secondary:hover,
.btn-outline:hover{
 background:#f5f9fd!important;
 border-color:#bfd2e3!important;
 color:#1769c4!important;
}

/* Botones icono */
.icon-btn,
.btn-icon,
.action-btn{
 border:1px solid #d7e3ed!important;
 border-radius:8px!important;
 background:#f7fbff!important;
 color:#176be0!important;
}

/* Tablas */
.table,
table.data-table,
.data-table,
.list-table{
 width:100%!important;
 border-collapse:separate!important;
 border-spacing:0!important;
 background:#fff!important;
}
.table thead th,
.data-table thead th,
.list-table thead th{
 background:#f5f8fb!important;
 color:#39546c!important;
 border-top:1px solid var(--sg-border-2)!important;
 border-bottom:1px solid var(--sg-border)!important;
 font-weight:850!important;
}
.table tbody td,
.data-table tbody td,
.list-table tbody td{
 border-bottom:1px solid #edf1f5!important;
 color:#334f67!important;
}
.table tbody tr:hover,
.data-table tbody tr:hover,
.list-table tbody tr:hover{
 background:#f8fbff!important;
}

/* Fila seleccionada */
.table tbody tr.selected,
.data-table tbody tr.selected,
.list-table tbody tr.selected{
 background:#edf5ff!important;
 box-shadow:inset 3px 0 0 var(--sg-blue)!important;
}

/* Badges */
.badge,
.status,
.pill{
 border-radius:999px!important;
 font-weight:850!important;
}
.badge-success,.status-success,.pill-success{
 background:#e8f7ef!important;
 color:#118452!important;
}
.badge-warning,.status-warning,.pill-warning{
 background:#fff3d9!important;
 color:#97620a!important;
}
.badge-danger,.status-danger,.pill-danger{
 background:#ffedf0!important;
 color:#c43c4b!important;
}
.badge-info,.status-info,.pill-info{
 background:#e9f3ff!important;
 color:#1769c4!important;
}

/* Modales */
.modal-box,
.dialog,
.modal-content{
 border:1px solid var(--sg-border)!important;
 border-radius:12px!important;
 background:#fff!important;
 box-shadow:0 24px 70px rgba(21,46,70,.22)!important;
}
.modal-head,
.modal-header{
 background:#fbfcfe!important;
 border-bottom:1px solid var(--sg-border-2)!important;
}
.modal-footer{
 background:#fbfcfe!important;
 border-top:1px solid var(--sg-border-2)!important;
}

/* Menús flotantes */
.dropdown-menu,
.action-menu,
.context-menu,
.top-cash-menu,
.shortcut-native-menu{
 border:1px solid var(--sg-border)!important;
 border-radius:10px!important;
 background:#fff!important;
 box-shadow:0 16px 45px rgba(23,47,71,.16)!important;
}

/* Paginación */
.pagination .page-link,
.pagination button,
.pager button{
 border:1px solid #d5e1eb!important;
 border-radius:7px!important;
 background:#fff!important;
 color:#395873!important;
}
.pagination .active,
.pagination .page-link.active,
.pager .active{
 background:var(--sg-blue)!important;
 color:#fff!important;
 border-color:var(--sg-blue)!important;
}

/* Alertas */
.alert{
 border-radius:9px!important;
 box-shadow:none!important;
}
.alert-success{background:#effaf4!important;border-color:#cdebd9!important;color:#277551!important}
.alert-warning{background:#fff8e8!important;border-color:#f0deb6!important;color:#8b631c!important}
.alert-danger{background:#fff0f2!important;border-color:#f3cbd1!important;color:#a53f4b!important}
.alert-info{background:#eef6ff!important;border-color:#cfe1f4!important;color:#315f8a!important}

/* Zona vacía / empty state */
.empty-state,
.table-empty,
.no-data{
 color:#7c8fa1!important;
}
.empty-state strong,
.table-empty strong,
.no-data strong{
 color:#27465f!important;
}

/* Resumen financiero */
.sale-grand-total,
.summary-total,
.total-card{
 background:linear-gradient(180deg,#2372d6,#1767ca)!important;
 color:#fff!important;
 border-radius:9px!important;
}
.sale-grand-total *{
 color:#fff!important;
}

/* Crédito / planes */
.sale-credit-panel,
.sale-credit-planner,
.sale-sidebar-credit-summary{
 border-color:#dbe6ef!important;
 background:#fbfdff!important;
}
.sale-credit-surcharge-panel{
 border-color:#eadfca!important;
 background:#fffdfa!important;
}
.sale-credit-surcharge-panel .sale-credit-panel-head{
 background:#fffaf0!important;
}

/* Dashboard KPI cards */
.kpi-card,
.stat-card,
.metric-card{
 border:1px solid var(--sg-border)!important;
 border-radius:10px!important;
 background:#fff!important;
 box-shadow:var(--sg-shadow)!important;
}

/* Listados: toolbar */
.list-toolbar,
.table-toolbar,
.card-toolbar{
 background:#fff!important;
 border-bottom:1px solid var(--sg-border-2)!important;
}

/* Configuración */
.settings-layout{
 gap:12px!important;
}
.settings-sidebar{
 background:#fff!important;
 border:1px solid var(--sg-border)!important;
 border-radius:10px!important;
 box-shadow:var(--sg-shadow)!important;
}
.settings-sidebar .active{
 background:#eaf3ff!important;
 color:#176be0!important;
}

/* Consistencia de tamaños */
small,.help-text,.hint{
 color:#7b8ea0!important;
}

/* Scrollbars discretas */
*{
 scrollbar-width:thin;
 scrollbar-color:#aebdca transparent;
}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:#b8c5d0;border-radius:999px}
*::-webkit-scrollbar-thumb:hover{background:#9fadb9}

/* Responsive global */
@media(max-width:900px){
 .content{padding:8px!important}
 .card,.panel,.widget,.box{border-radius:8px!important}
}

/* =========================================================
   V160 - PANEL DERECHO IGUAL A REFERENCIA
   ========================================================= */
.sale-erp-v156 .sale-layout{grid-template-columns:minmax(0,1fr) 350px!important;gap:12px!important;align-items:start!important}
.sale-erp-v156 .sale-summary-card{width:100%!important;min-width:350px!important;max-width:350px!important;position:sticky!important;top:8px!important;border-radius:10px!important;overflow:hidden!important}
.sale-erp-v156 .sale-summary-card .sale-section-title{min-height:44px!important;padding:8px 10px!important}
.sale-erp-v156 .sale-summary-card .card-body{padding:10px!important}
.sale-erp-v156 .sale-summary-lines{display:grid!important;gap:0!important}
.sale-erp-v156 .sale-summary-lines>div{min-height:34px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:7px 2px!important;border-bottom:1px solid #edf1f5!important;font-size:8.5px!important}
.sale-erp-v156 .sale-grand-total{min-height:86px!important;margin:8px 0 9px!important;padding:11px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;border-radius:9px!important}
.sale-erp-v156 .sale-grand-total span{font-size:7px!important;font-weight:800!important}.sale-erp-v156 .sale-grand-total strong{margin-top:4px!important;font-size:21px!important;line-height:1!important}
.sale-erp-v156 .sale-item-counter{min-height:33px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:5px 1px!important;border-bottom:1px solid #edf1f5!important;font-size:8px!important}
.sale-erp-v156 .sale-finance-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-top:9px!important}
.sale-erp-v156 .sale-finance-actions .btn{width:100%!important;min-height:39px!important;height:39px!important;font-size:9px!important;border-radius:8px!important}
.sale-erp-v156 .sale-credit-sidebar-zone{margin-top:10px!important;width:100%!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner{margin:0!important;width:100%!important;background:transparent!important;border:0!important}
.sale-credit-reference-head{min-height:42px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:7px 9px!important;border:1px solid #dbe6ef!important;border-radius:9px!important;background:#f7fbff!important}
.sale-credit-reference-head .sale-credit-planner-kicker{color:#176be0!important;font-size:7px!important;font-weight:900!important;letter-spacing:.05em!important}
.sale-credit-reference-head .sale-credit-planner-status{padding:4px 8px!important;border-radius:999px!important;background:#fff2d4!important;color:#9a6708!important;font-size:6.7px!important;font-weight:900!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:9px 0 0!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel{grid-column:1!important;width:100%!important;margin:0!important;border:1px solid #dbe5ee!important;border-radius:9px!important;background:#fff!important;overflow:hidden!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head{min-height:54px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:9px 10px!important;border-bottom:1px solid #e5ebf1!important;background:#fff!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title>div{display:flex!important;flex-direction:column!important;gap:3px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title strong{color:#1f3e58!important;font-size:9.5px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title small{display:block!important;color:#7b8da0!important;font-size:7px!important;line-height:1.25!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-toggle{height:29px!important;min-width:58px!important;padding:0 8px!important;border:1px solid #d2deea!important;border-radius:7px!important;background:#fff!important;color:#35536d!important;font-size:7px!important;font-weight:850!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-body{padding:10px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{display:grid!important;grid-template-columns:1.35fr .68fr 1fr!important;gap:7px!important;align-items:start!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field{min-width:0!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields label{display:block!important;margin-bottom:4px!important;font-size:7.5px!important;white-space:nowrap!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .input,.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .select{width:100%!important;min-width:0!important;height:38px!important;min-height:38px!important;padding:0 8px!important;border-radius:7px!important;font-size:8.5px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields small{display:block!important;margin-top:3px!important;font-size:6px!important;line-height:1.15!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{min-height:60px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 110px!important;align-items:center!important;gap:8px!important;margin-top:9px!important;padding:8px!important;border:1px solid #dfe8f0!important;border-radius:8px!important;background:#f9fbfd!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy{min-width:0!important;display:flex!important;align-items:center!important;gap:8px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-icon{width:30px!important;height:30px!important;flex:0 0 30px!important;display:grid!important;place-items:center!important;border-radius:7px!important;background:#eaf3ff!important;color:#176be0!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy strong{font-size:8px!important;color:#294a65!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy small{font-size:6.3px!important;color:#71869a!important;white-space:normal!important}
.sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{width:110px!important;min-width:110px!important;height:34px!important;min-height:34px!important;padding:0 8px!important;font-size:7.3px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div{min-height:58px!important;padding:8px!important;border:1px solid #dfe7ef!important;border-radius:8px!important;background:#fff!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div:first-child{border-color:#f0bf82!important;background:#fff8ee!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary span{display:block!important;color:#7c8ea0!important;font-size:6.2px!important;font-weight:850!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary strong{display:block!important;margin-top:5px!important;color:#48627a!important;font-size:10px!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div:first-child strong{color:#ef7e00!important;font-size:12px!important}
.sale-credit-hidden-plazo{display:none!important}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note{margin-top:7px!important;padding:0!important;background:transparent!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note>span{display:none!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note p{margin:0!important;color:#7b8da0!important;font-size:6.5px!important;line-height:1.3!important}
.sale-credit-reference-note{display:flex!important;align-items:flex-start!important;gap:8px!important;margin-top:10px!important;padding:10px!important;border:1px solid #d7e6f5!important;border-radius:9px!important;background:#f4f9ff!important}
.sale-credit-reference-note>span{width:18px!important;height:18px!important;display:grid!important;place-items:center!important;flex:0 0 18px!important;border-radius:50%!important;background:#176be0!important;color:#fff!important;font-size:7px!important;font-weight:900!important}.sale-credit-reference-note p{margin:0!important;color:#47708f!important;font-size:7.2px!important;line-height:1.4!important}.sale-credit-reference-note strong{color:#1769c4!important}
.sale-sidebar-credit-summary{display:none!important}
@media(min-width:1600px){.sale-erp-v156 .sale-layout{grid-template-columns:minmax(0,1fr) 370px!important}.sale-erp-v156 .sale-summary-card{min-width:370px!important;max-width:370px!important}}
@media(max-width:1350px) and (min-width:1181px){.sale-erp-v156 .sale-layout{grid-template-columns:minmax(0,1fr) 330px!important}.sale-erp-v156 .sale-summary-card{min-width:330px!important;max-width:330px!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{grid-template-columns:1fr 1fr!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field:last-child{grid-column:1/-1!important}}
@media(max-width:1180px){.sale-erp-v156 .sale-layout{grid-template-columns:1fr!important}.sale-erp-v156 .sale-summary-card{min-width:0!important;max-width:none!important;position:static!important}}
@media(max-width:650px){.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{grid-template-columns:1fr!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field:last-child{grid-column:auto!important}.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{grid-template-columns:1fr!important}.sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{width:100%!important;min-width:0!important}}

/* =========================================================
   V161 - PANEL DERECHO CALCADO A LA REFERENCIA VISUAL
   ========================================================= */

/* Ancho final de la columna derecha */
.sale-erp-v156 .sale-layout{
 grid-template-columns:minmax(0,1fr) 326px!important;
 gap:11px!important;
 align-items:start!important;
}

.sale-erp-v156 .sale-summary-card{
 width:326px!important;
 min-width:326px!important;
 max-width:326px!important;
 position:sticky!important;
 top:8px!important;
 border:1px solid #dbe5ee!important;
 border-radius:10px!important;
 overflow:hidden!important;
 background:#fff!important;
 box-shadow:0 4px 14px rgba(20,48,74,.05)!important;
}

/* Cabecera Resumen */
.sale-erp-v156 .sale-summary-card .sale-section-title{
 min-height:43px!important;
 padding:7px 9px!important;
 background:#fbfcfe!important;
}
.sale-erp-v156 .sale-summary-card .sale-step{
 width:25px!important;
 height:25px!important;
 flex:0 0 25px!important;
 font-size:8px!important;
}
.sale-erp-v156 .sale-summary-card .sale-section-title strong{
 font-size:10px!important;
}
.sale-erp-v156 .sale-summary-card .sale-section-title small{
 font-size:6.8px!important;
}

/* Cuerpo */
.sale-erp-v156 .sale-summary-card .card-body{
 padding:9px!important;
}

/* Base/IGV */
.sale-erp-v156 .sale-summary-lines{
 display:grid!important;
 gap:0!important;
 margin:0!important;
}
.sale-erp-v156 .sale-summary-lines>div{
 min-height:31px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 padding:6px 2px!important;
 border-bottom:1px solid #edf1f5!important;
 color:#647b8f!important;
 font-size:7.8px!important;
}
.sale-erp-v156 .sale-summary-lines>div strong{
 color:#183b58!important;
 font-size:8.2px!important;
}

/* Total azul */
.sale-erp-v156 .sale-grand-total{
 min-height:77px!important;
 margin:7px 0 8px!important;
 padding:10px!important;
 display:flex!important;
 flex-direction:column!important;
 justify-content:center!important;
 border-radius:8px!important;
 background:linear-gradient(180deg,#1f70d3,#1663c5)!important;
 box-shadow:none!important;
}
.sale-erp-v156 .sale-grand-total>span{
 color:#dcecff!important;
 font-size:6.7px!important;
 font-weight:850!important;
 letter-spacing:.02em!important;
}
.sale-erp-v156 .sale-grand-total>strong{
 display:flex!important;
 align-items:baseline!important;
 gap:3px!important;
 margin-top:4px!important;
 color:#fff!important;
 font-size:20px!important;
 line-height:1!important;
}
.sale-erp-v156 .sale-grand-total>strong span{
 color:#fff!important;
 font-size:9px!important;
}

/* Productos agregados */
.sale-erp-v156 .sale-item-counter{
 min-height:30px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 padding:5px 2px!important;
 margin-bottom:7px!important;
 border-bottom:0!important;
 color:#6f8497!important;
 font-size:7.4px!important;
}
.sale-erp-v156 .sale-item-counter strong{
 color:#23435e!important;
 font-size:7.8px!important;
}

/* Acciones exactamente una sobre otra */
.sale-erp-v156 .sale-finance-actions{
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:8px!important;
 margin:0 0 9px!important;
}
.sale-erp-v156 .sale-finance-actions .btn{
 width:100%!important;
 min-height:36px!important;
 height:36px!important;
 border-radius:8px!important;
 font-size:8.5px!important;
 font-weight:850!important;
}
.sale-erp-v156 .sale-finance-actions .sale-submit-secondary{
 background:#fff!important;
 border:1px solid #cfdce8!important;
 color:#25445f!important;
}
.sale-erp-v156 .sale-finance-actions .sale-submit-btn{
 background:linear-gradient(180deg,#2376df,#1768cf)!important;
 border:1px solid #1768cf!important;
 color:#fff!important;
}

/* Área crédito */
.sale-erp-v156 .sale-credit-sidebar-zone{
 width:100%!important;
 margin-top:0!important;
 display:block!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner{
 width:100%!important;
 margin:0!important;
 padding:0!important;
 border:0!important;
 background:transparent!important;
}

/* Banda superior VENTA A CRÉDITO */
.sale-erp-v156 .sale-credit-reference-head{
 min-height:40px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 padding:7px 8px!important;
 margin-bottom:7px!important;
 border:1px solid #dbe6ef!important;
 border-radius:8px!important;
 background:#f7fbff!important;
}
.sale-erp-v156 .sale-credit-reference-head .sale-credit-planner-kicker{
 color:#176be0!important;
 font-size:6.5px!important;
 font-weight:900!important;
 letter-spacing:.05em!important;
}
.sale-erp-v156 .sale-credit-reference-head .sale-credit-planner-status{
 min-height:22px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 padding:3px 7px!important;
 border-radius:999px!important;
 background:#fff2d4!important;
 color:#9a6708!important;
 font-size:6.2px!important;
 font-weight:900!important;
}

/* Cuotas y ajuste: tarjetas separadas */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.left-collapsed,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.right-collapsed,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-planner-grid-v141.left-collapsed.right-collapsed{
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:10px!important;
 padding:0!important;
}

.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel{
 width:100%!important;
 min-width:0!important;
 margin:0!important;
 grid-column:1!important;
 border:1px solid #dbe5ee!important;
 border-radius:8px!important;
 background:#fff!important;
 overflow:hidden!important;
}

/* Encabezado tarjetas */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-head{
 min-height:50px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:8px!important;
 padding:8px 9px!important;
 border-bottom:1px solid #e7edf3!important;
 background:#fff!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title{
 min-width:0!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title>div{
 min-width:0!important;
 display:flex!important;
 flex-direction:column!important;
 gap:2px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title strong{
 color:#203e58!important;
 font-size:8.8px!important;
 font-weight:900!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-title small{
 display:block!important;
 color:#7b8da0!important;
 font-size:6.5px!important;
 line-height:1.25!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-toggle{
 min-width:54px!important;
 height:27px!important;
 min-height:27px!important;
 padding:0 7px!important;
 border:1px solid #d2deea!important;
 border-radius:7px!important;
 background:#fff!important;
 color:#34536d!important;
 font-size:6.5px!important;
 font-weight:850!important;
}

/* Cuerpo Plan de cuotas */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-panel-body{
 padding:9px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
 display:grid!important;
 grid-template-columns:1.22fr .68fr 1fr!important;
 gap:6px!important;
 align-items:start!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field{
 min-width:0!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields label{
 display:block!important;
 margin:0 0 4px!important;
 color:#203d57!important;
 font-size:7px!important;
 font-weight:800!important;
 white-space:nowrap!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .input,
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .select{
 width:100%!important;
 min-width:0!important;
 height:36px!important;
 min-height:36px!important;
 padding:0 7px!important;
 border:1px solid #cfdce8!important;
 border-radius:7px!important;
 background:#fff!important;
 font-size:8px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields small{
 display:block!important;
 margin-top:3px!important;
 color:#7e91a2!important;
 font-size:5.7px!important;
 line-height:1.15!important;
}

/* Cronograma */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{
 min-height:56px!important;
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 105px!important;
 align-items:center!important;
 gap:7px!important;
 margin-top:8px!important;
 padding:7px!important;
 border:1px solid #dfe8f0!important;
 border-radius:8px!important;
 background:#f9fbfd!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy{
 min-width:0!important;
 display:flex!important;
 align-items:center!important;
 gap:7px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-icon{
 width:28px!important;
 height:28px!important;
 flex:0 0 28px!important;
 display:grid!important;
 place-items:center!important;
 border-radius:7px!important;
 background:#eaf3ff!important;
 color:#176be0!important;
 font-size:11px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy strong{
 color:#294a65!important;
 font-size:7.6px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-copy small{
 color:#71869a!important;
 font-size:5.9px!important;
 line-height:1.2!important;
 white-space:normal!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{
 width:105px!important;
 min-width:105px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0 7px!important;
 font-size:6.8px!important;
}

/* Ajuste interno */
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:7px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div{
 min-height:55px!important;
 padding:8px!important;
 border:1px solid #dfe7ef!important;
 border-radius:7px!important;
 background:#fff!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div:first-child{
 border-color:#f2bd7c!important;
 background:#fff8ee!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary span{
 display:block!important;
 color:#7c8ea0!important;
 font-size:6px!important;
 font-weight:850!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary strong{
 display:block!important;
 margin-top:5px!important;
 color:#48627a!important;
 font-size:9.2px!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-summary>div:first-child strong{
 color:#ef7e00!important;
 font-size:11px!important;
}
.sale-credit-hidden-plazo{
 display:none!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note{
 margin-top:7px!important;
 padding:0!important;
 background:transparent!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note>span{
 display:none!important;
}
.sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-surcharge-note p{
 margin:0!important;
 color:#7b8da0!important;
 font-size:6.2px!important;
 line-height:1.3!important;
}

/* Nota informativa */
.sale-credit-reference-note{
 display:flex!important;
 align-items:flex-start!important;
 gap:7px!important;
 margin-top:9px!important;
 padding:9px!important;
 border:1px solid #d7e6f5!important;
 border-radius:8px!important;
 background:#f4f9ff!important;
}
.sale-credit-reference-note>span{
 width:17px!important;
 height:17px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 17px!important;
 border-radius:50%!important;
 background:#176be0!important;
 color:#fff!important;
 font-size:6.5px!important;
 font-weight:900!important;
}
.sale-credit-reference-note p{
 margin:0!important;
 color:#47708f!important;
 font-size:6.8px!important;
 line-height:1.35!important;
}
.sale-credit-reference-note strong{
 color:#1769c4!important;
}

/* Eliminar duplicados heredados */
.sale-sidebar-credit-summary{
 display:none!important;
}

/* Pantallas grandes */
@media(min-width:1600px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:minmax(0,1fr) 340px!important;
 }
 .sale-erp-v156 .sale-summary-card{
   width:340px!important;
   min-width:340px!important;
   max-width:340px!important;
 }
}

/* Intermedia */
@media(max-width:1350px) and (min-width:1181px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:minmax(0,1fr) 310px!important;
 }
 .sale-erp-v156 .sale-summary-card{
   width:310px!important;
   min-width:310px!important;
   max-width:310px!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
   grid-template-columns:1fr 1fr!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field:last-child{
   grid-column:1/-1!important;
 }
}

/* Tablet */
@media(max-width:1180px){
 .sale-erp-v156 .sale-layout{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-summary-card{
   width:100%!important;
   min-width:0!important;
   max-width:none!important;
   position:static!important;
 }
}

/* Móvil */
@media(max-width:650px){
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-fields .field:last-child{
   grid-column:auto!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .sale-credit-schedule-box{
   grid-template-columns:1fr!important;
 }
 .sale-erp-v156 .sale-credit-sidebar-zone .credit-schedule-open{
   width:100%!important;
   min-width:0!important;
 }
}

/* =========================================================
   V162 - CREDITO EXACTO A LA IMAGEN DE REFERENCIA
   ========================================================= */

.sale-credit-exact-reference{
 width:100%!important;
 margin-top:9px!important;
 display:grid!important;
 gap:10px!important;
}

.sale-credit-exact-reference[hidden]{
 display:none!important;
}

/* Tarjeta 1: Venta a crédito + Plan de cuotas */
.sale-credit-exact-card{
 width:100%!important;
 border:1px solid #dbe5ee!important;
 border-radius:8px!important;
 background:#fff!important;
 overflow:hidden!important;
 box-shadow:none!important;
}

.sale-credit-exact-main{
 display:block!important;
}

.sale-credit-exact-main[hidden]{
 display:none!important;
}

.sale-credit-exact-top{
 min-height:38px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:8px!important;
 padding:7px 8px!important;
 border-bottom:1px solid #e8eef4!important;
 background:#f7fbff!important;
}

.sale-credit-exact-top>span{
 color:#176be0!important;
 font-size:6.5px!important;
 font-weight:900!important;
 letter-spacing:.05em!important;
}

.sale-credit-exact-top>strong{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 min-height:21px!important;
 padding:3px 7px!important;
 border-radius:999px!important;
 background:#fff2d4!important;
 color:#9a6708!important;
 font-size:6px!important;
 font-weight:900!important;
}

/* Panel cuotas sin tarjeta extra */
.sale-credit-exact-main .sale-credit-panel{
 border:0!important;
 border-radius:0!important;
 margin:0!important;
 background:#fff!important;
}

.sale-credit-exact-main .sale-credit-panel-head{
 min-height:49px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:8px!important;
 padding:8px 9px!important;
 border-bottom:1px solid #e8eef4!important;
 background:#fff!important;
}

.sale-credit-exact-main .sale-credit-panel-title>div{
 display:flex!important;
 flex-direction:column!important;
 gap:2px!important;
}

.sale-credit-exact-main .sale-credit-panel-title strong{
 color:#203e58!important;
 font-size:8.5px!important;
 font-weight:900!important;
}

.sale-credit-exact-main .sale-credit-panel-title small{
 display:block!important;
 color:#7b8da0!important;
 font-size:6.2px!important;
 line-height:1.2!important;
}

.sale-credit-exact-main .sale-credit-panel-toggle{
 height:27px!important;
 min-width:54px!important;
 padding:0 7px!important;
 border:1px solid #d2deea!important;
 border-radius:7px!important;
 background:#fff!important;
 color:#35536d!important;
 font-size:6.3px!important;
 font-weight:850!important;
}

.sale-credit-exact-main .sale-credit-panel-body{
 padding:9px!important;
}

/* Exactamente 3 campos en una fila */
.sale-credit-exact-main .sale-credit-fields{
 display:grid!important;
 grid-template-columns:1.25fr .7fr 1fr!important;
 gap:6px!important;
 align-items:start!important;
}

.sale-credit-exact-main .sale-credit-fields .field{
 min-width:0!important;
}

.sale-credit-exact-main .sale-credit-fields label{
 display:block!important;
 margin:0 0 4px!important;
 color:#203d57!important;
 font-size:6.8px!important;
 font-weight:800!important;
 white-space:nowrap!important;
}

.sale-credit-exact-main .sale-credit-fields .input,
.sale-credit-exact-main .sale-credit-fields .select{
 width:100%!important;
 min-width:0!important;
 height:35px!important;
 min-height:35px!important;
 padding:0 7px!important;
 border:1px solid #cfdce8!important;
 border-radius:7px!important;
 background:#fff!important;
 font-size:7.8px!important;
}

.sale-credit-exact-main .sale-credit-fields small{
 display:block!important;
 margin-top:3px!important;
 color:#7e91a2!important;
 font-size:5.5px!important;
 line-height:1.15!important;
}

/* Cronograma exactamente debajo */
.sale-credit-exact-main .sale-credit-schedule-box{
 min-height:55px!important;
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 104px!important;
 align-items:center!important;
 gap:7px!important;
 margin-top:8px!important;
 padding:7px!important;
 border:1px solid #dfe8f0!important;
 border-radius:7px!important;
 background:#f9fbfd!important;
}

.sale-credit-exact-main .sale-credit-schedule-copy{
 min-width:0!important;
 display:flex!important;
 align-items:center!important;
 gap:7px!important;
}

.sale-credit-exact-main .sale-credit-schedule-icon{
 width:27px!important;
 height:27px!important;
 flex:0 0 27px!important;
 display:grid!important;
 place-items:center!important;
 border-radius:7px!important;
 background:#eaf3ff!important;
 color:#176be0!important;
 font-size:10px!important;
}

.sale-credit-exact-main .sale-credit-schedule-copy strong{
 color:#294a65!important;
 font-size:7.4px!important;
}

.sale-credit-exact-main .sale-credit-schedule-copy small{
 color:#71869a!important;
 font-size:5.6px!important;
 line-height:1.2!important;
 white-space:normal!important;
}

.sale-credit-exact-main .credit-schedule-open{
 width:104px!important;
 min-width:104px!important;
 height:31px!important;
 min-height:31px!important;
 padding:0 6px!important;
 font-size:6.5px!important;
}

/* Tarjeta 2: Ajuste interno */
.sale-credit-exact-adjustment .sale-credit-panel{
 border:0!important;
 border-radius:0!important;
 margin:0!important;
 background:#fff!important;
}

.sale-credit-exact-adjustment .sale-credit-panel-head{
 min-height:50px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:8px!important;
 padding:8px 9px!important;
 border-bottom:1px solid #e8eef4!important;
 background:#fff!important;
}

.sale-credit-exact-adjustment .sale-credit-panel-title>div{
 display:flex!important;
 flex-direction:column!important;
 gap:2px!important;
}

.sale-credit-exact-adjustment .sale-credit-panel-title strong{
 color:#203e58!important;
 font-size:8.5px!important;
 font-weight:900!important;
}

.sale-credit-exact-adjustment .sale-credit-panel-title small{
 display:block!important;
 color:#7b8da0!important;
 font-size:6.2px!important;
 line-height:1.2!important;
}

.sale-credit-exact-adjustment .sale-credit-panel-toggle{
 height:27px!important;
 min-width:54px!important;
 padding:0 7px!important;
 border:1px solid #d2deea!important;
 border-radius:7px!important;
 background:#fff!important;
 color:#35536d!important;
 font-size:6.3px!important;
 font-weight:850!important;
}

.sale-credit-exact-adjustment .sale-credit-panel-body{
 padding:9px!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-summary{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:7px!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-summary>div{
 min-height:54px!important;
 padding:8px!important;
 border:1px solid #dfe7ef!important;
 border-radius:7px!important;
 background:#fff!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-summary>div:first-child{
 border-color:#f2bd7c!important;
 background:#fff8ee!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-summary span{
 display:block!important;
 color:#7c8ea0!important;
 font-size:5.9px!important;
 font-weight:850!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-summary strong{
 display:block!important;
 margin-top:5px!important;
 color:#48627a!important;
 font-size:9px!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-summary>div:first-child strong{
 color:#ef7e00!important;
 font-size:10.8px!important;
}

.sale-credit-hidden-plazo{
 display:none!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-note{
 margin-top:7px!important;
 padding:0!important;
 background:transparent!important;
}

.sale-credit-exact-adjustment .sale-credit-surcharge-note p{
 margin:0!important;
 color:#7b8da0!important;
 font-size:6px!important;
 line-height:1.3!important;
}

/* Tarjeta 3: aviso */
.sale-credit-exact-note{
 display:flex!important;
 align-items:flex-start!important;
 gap:7px!important;
 padding:9px!important;
 border:1px solid #d7e6f5!important;
 border-radius:8px!important;
 background:#f4f9ff!important;
}

.sale-credit-exact-note>span{
 width:17px!important;
 height:17px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 17px!important;
 border-radius:50%!important;
 background:#176be0!important;
 color:#fff!important;
 font-size:6.3px!important;
 font-weight:900!important;
}

.sale-credit-exact-note p{
 margin:0!important;
 color:#47708f!important;
 font-size:6.5px!important;
 line-height:1.35!important;
}

.sale-credit-exact-note strong{
 color:#1769c4!important;
}

/* Eliminar cualquier duplicado heredado */
.sale-sidebar-credit-summary,
.sale-credit-reference-note,
.sale-credit-reference-head{
 display:none!important;
}

/* Responsive */
@media(max-width:650px){
 .sale-credit-exact-main .sale-credit-fields{
   grid-template-columns:1fr!important;
 }
 .sale-credit-exact-main .sale-credit-schedule-box{
   grid-template-columns:1fr!important;
 }
 .sale-credit-exact-main .credit-schedule-open{
   width:100%!important;
   min-width:0!important;
 }
}

/* =========================================================
   V163 - AUTOMATIZACION DE CREDITO POR FRECUENCIA
   ========================================================= */
#ventaFechaVencimiento{
 background:#f8fbff!important;
}
.sale-credit-exact-main .sale-credit-fields .field:first-child small{
 color:#3973a7!important;
}
#ventaRecargoPct{
 color:#ef7e00!important;
}
#ventaRecargoMonto{
 color:#35536d!important;
}

/* =========================================================
   V164 - CREDITO AUTOMATICO CORREGIDO
   ========================================================= */
#ventaFechaVencimiento{
 font-weight:700!important;
 color:#244c70!important;
}
#ventaRecargoReglaTexto{
 color:#4c7597!important;
 font-weight:600!important;
}

/* =========================================================
   V165 - LEGIBILIDAD PANEL RESUMEN / CREDITO
   Mantiene distribución y dimensiones generales.
   ========================================================= */

/* Encabezados principales del panel derecho */
.sale-summary-card h2,
.sale-summary-card h3,
.sale-credit-exact-main h3,
.sale-credit-surcharge-card h3{
    font-size:15px!important;
    line-height:1.25!important;
    font-weight:800!important;
}

/* Etiquetas de campos: Primera cuota, N.° cuotas, Frecuencia, etc. */
.sale-credit-exact-main label,
.sale-credit-surcharge-card label,
.sale-credit-fields label{
    font-size:13px!important;
    line-height:1.25!important;
    font-weight:800!important;
}

/* Valores dentro de inputs/selects */
.sale-credit-exact-main input,
.sale-credit-exact-main select,
.sale-credit-surcharge-card input,
.sale-credit-surcharge-card select{
    font-size:14px!important;
    font-weight:600!important;
}

/* Textos descriptivos secundarios */
.sale-credit-exact-main small,
.sale-credit-surcharge-card small,
.sale-credit-exact-main p,
.sale-credit-surcharge-card p,
.sale-credit-surcharge-note p{
    font-size:10.5px!important;
    line-height:1.35!important;
}

/* Título y detalle de cronograma */
.sale-credit-schedule-title,
.sale-credit-schedule strong,
.sale-credit-schedule b{
    font-size:12px!important;
    font-weight:800!important;
}
.sale-credit-schedule small,
.sale-credit-schedule span{
    line-height:1.35!important;
}

/* Botones del panel */
.sale-credit-exact-main button,
.sale-credit-surcharge-card button{
    font-size:11.5px!important;
    font-weight:800!important;
}

/* Porcentaje y monto del ajuste interno */
#ventaRecargoPct,
#ventaRecargoMonto{
    font-size:15px!important;
    line-height:1.2!important;
    font-weight:800!important;
}

/* Resumen: importes y etiquetas */
.sale-summary-card,
.sale-summary-card label,
.sale-summary-card span,
.sale-summary-card p{
    font-size:11.5px;
}
.sale-summary-card .total,
.sale-summary-card [class*="total"]{
    font-weight:800;
}

/* Aviso inferior */
.sale-credit-info,
.sale-credit-info p,
.sale-credit-info span{
    font-size:10.5px!important;
    line-height:1.4!important;
}

/* =========================================================
   V166 - PLAN DE CUOTAS Y AJUSTE INTERNO SIEMPRE VISIBLES
   ========================================================= */
#ventaCreditoPlanner .sale-credit-panel-head{
    grid-template-columns:1fr!important;
}
#ventaCreditoPlanner .sale-credit-panel-head .sale-credit-panel-title{
    width:100%!important;
}
#creditPanelCuotasBody,
#creditPanelRecargoBody{
    display:block!important;
}

/* =========================================================
   V167 - RESUMEN MAS VISIBLE Y PROFESIONAL
   ========================================================= */

/* Cabecera Resumen */
.sale-summary-card .sale-section-title{
    min-height:50px!important;
    padding:9px 11px!important;
}
.sale-summary-card .sale-section-title strong{
    font-size:15px!important;
    font-weight:900!important;
    color:#17324d!important;
}
.sale-summary-card .sale-section-title small{
    font-size:10.5px!important;
    color:#71869a!important;
}

/* Base imponible e IGV: más legibles y con importes destacados */
.sale-summary-card .sale-summary-lines{
    margin-top:2px!important;
}
.sale-summary-card .sale-summary-lines>div{
    min-height:42px!important;
    padding:8px 3px!important;
    border-bottom:1px solid #e8eef4!important;
    font-size:12px!important;
    color:#627a8e!important;
}
.sale-summary-card .sale-summary-lines>div span:first-child{
    font-size:12px!important;
    font-weight:650!important;
}
.sale-summary-card .sale-summary-lines>div strong{
    font-size:15px!important;
    font-weight:900!important;
    color:#153c5c!important;
    letter-spacing:.01em!important;
}
.sale-summary-card .sale-summary-lines>div strong span{
    font-size:15px!important;
    font-weight:900!important;
    color:#153c5c!important;
}

/* Total a pagar: protagonista */
.sale-summary-card .sale-grand-total{
    min-height:96px!important;
    margin:10px 0 10px!important;
    padding:13px 14px!important;
    border-radius:10px!important;
    background:linear-gradient(135deg,#2879df 0%,#1765c8 100%)!important;
    box-shadow:0 7px 18px rgba(23,101,200,.16)!important;
}
.sale-summary-card .sale-grand-total>span{
    font-size:9px!important;
    font-weight:900!important;
    letter-spacing:.05em!important;
    color:#e8f3ff!important;
}
.sale-summary-card .sale-grand-total>strong{
    margin-top:8px!important;
    font-size:29px!important;
    line-height:1!important;
    font-weight:900!important;
    color:#fff!important;
}
.sale-summary-card .sale-grand-total>strong span{
    font-size:19px!important;
    font-weight:900!important;
    color:#fff!important;
}

/* Productos agregados */
.sale-summary-card .sale-item-counter{
    min-height:38px!important;
    padding:7px 2px!important;
    margin-bottom:10px!important;
    font-size:11px!important;
    color:#71869a!important;
}
.sale-summary-card .sale-item-counter span{
    font-size:11px!important;
    font-weight:650!important;
}
.sale-summary-card .sale-item-counter strong{
    min-width:26px!important;
    height:24px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0 7px!important;
    border-radius:999px!important;
    background:#eef5fc!important;
    color:#1769c4!important;
    font-size:11px!important;
    font-weight:900!important;
}

/* Botones de acción */
.sale-summary-card .sale-finance-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    margin-top:2px!important;
}

/* Registrar venta: centrado y limpio */
.sale-summary-card .sale-finance-actions .sale-submit-secondary{
    min-height:42px!important;
    height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    padding:0 16px!important;
    border:1px solid #cbd9e5!important;
    border-radius:9px!important;
    background:#fff!important;
    color:#24455f!important;
    font-size:12px!important;
    font-weight:900!important;
    box-shadow:0 2px 6px rgba(22,50,75,.04)!important;
}
.sale-summary-card .sale-finance-actions .sale-submit-secondary:hover{
    background:#f7fbff!important;
    border-color:#aac9e3!important;
    color:#1769c4!important;
}

/* Registrar y cobrar ahora: acción principal */
.sale-summary-card .sale-finance-actions .sale-submit-btn{
    min-height:44px!important;
    height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    padding:0 16px!important;
    border-radius:9px!important;
    background:linear-gradient(135deg,#2879df 0%,#1765c8 100%)!important;
    border:1px solid #1765c8!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:900!important;
    box-shadow:0 5px 13px rgba(23,101,200,.16)!important;
}
.sale-summary-card .sale-finance-actions .sale-submit-btn:hover{
    background:linear-gradient(135deg,#2372d7 0%,#115dbe 100%)!important;
    transform:translateY(-1px)!important;
}

/* Mejor aire interior del resumen */
.sale-summary-card .card-body{
    padding:11px!important;
}

/* =========================================================
   V168 - EDICION PROFESIONAL DE CUOTAS
   ========================================================= */
.credit-edit-protected-note{
 margin-top:7px;
 padding:8px 9px;
 border:1px solid #f0d9aa;
 border-radius:7px;
 background:#fff9ed;
 color:#8a641a;
 font-size:10.5px;
 line-height:1.35;
}
.credit-schedule-open:disabled{
 opacity:.65;
 cursor:not-allowed;
}

/* =========================================================
   V169 - SIDEBAR COLAPSABLE / SOLO ICONOS
   ========================================================= */

.sidebar,
.main{
 transition:width .18s ease,margin-left .18s ease!important;
}

.sidebar-collapse-btn{
 width:calc(100% - 16px)!important;
 height:34px!important;
 min-height:34px!important;
 margin:0 8px 10px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:8px!important;
 padding:0 10px!important;
 border:1px solid rgba(255,255,255,.10)!important;
 border-radius:8px!important;
 background:rgba(255,255,255,.05)!important;
 color:#d9e7f8!important;
 font-family:inherit!important;
 font-size:11px!important;
 font-weight:750!important;
 cursor:pointer!important;
}
.sidebar-collapse-btn:hover{
 background:rgba(255,255,255,.10)!important;
}
.sidebar-collapse-icon{
 width:20px!important;
 height:20px!important;
 display:grid!important;
 place-items:center!important;
 flex:0 0 20px!important;
 color:#8ec2ff!important;
 font-size:16px!important;
}
.sidebar-collapse-text{
 white-space:nowrap!important;
 overflow:hidden!important;
}

/* Contraído: 72px y solo iconos */
body.sidebar-collapsed .sidebar{
 width:72px!important;
 padding-left:8px!important;
 padding-right:8px!important;
}
body.sidebar-collapsed .main{
 margin-left:72px!important;
}

/* Marca */
body.sidebar-collapsed .sidebar .brand{
 justify-content:center!important;
 gap:0!important;
 padding-left:0!important;
 padding-right:0!important;
}
body.sidebar-collapsed .sidebar .sg-sidebar-brand-copy{
 display:none!important;
}
body.sidebar-collapsed .sidebar .brand-logo-wrap,
body.sidebar-collapsed .sidebar .brand-mark{
 margin:0 auto!important;
}
body.sidebar-collapsed .sidebar .brand-logo{
 width:40px!important;
 height:40px!important;
 object-fit:contain!important;
}

/* Botón */
body.sidebar-collapsed .sidebar-collapse-btn{
 width:42px!important;
 min-width:42px!important;
 max-width:42px!important;
 margin-left:auto!important;
 margin-right:auto!important;
 padding:0!important;
 justify-content:center!important;
}
body.sidebar-collapsed .sidebar-collapse-text{
 display:none!important;
}

/* Títulos de grupos */
body.sidebar-collapsed .sidebar .nav-title{
 display:none!important;
}

/* Links solo iconos */
body.sidebar-collapsed .sidebar nav a{
 width:46px!important;
 height:42px!important;
 min-height:42px!important;
 margin:4px auto!important;
 padding:0!important;
 gap:0!important;
 justify-content:center!important;
 overflow:hidden!important;
 white-space:nowrap!important;
 font-size:0!important;
 border-radius:9px!important;
}
body.sidebar-collapsed .sidebar nav a span{
 width:22px!important;
 min-width:22px!important;
 margin:0!important;
 font-size:16px!important;
 line-height:1!important;
 text-align:center!important;
}

/* Resaltar activo sin perder icono */
body.sidebar-collapsed .sidebar nav a.active{
 box-shadow:inset 3px 0 0 #59a8ff!important;
}

/* El contenido aprovecha el espacio recuperado */
body.sidebar-collapsed .content{
 max-width:none!important;
}

/* Mantener comportamiento móvil existente */
@media(max-width:900px){
 body.sidebar-collapsed .sidebar{
   width:64px!important;
 }
 body.sidebar-collapsed .main{
   margin-left:64px!important;
 }
}

/* =========================================================
   V170 - DETALLE DE PRODUCTOS PROFESIONAL + DESCUENTOS
   ========================================================= */
.sale-items-detailed{
 min-width:1180px!important;
}
.sale-items-detailed thead th{
 font-size:10.5px!important;
 font-weight:850!important;
 vertical-align:middle!important;
}
.sale-items-detailed tbody td{
 vertical-align:middle!important;
 font-size:11.5px!important;
}
.sale-unit{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-width:42px;
 min-height:26px;
 padding:3px 7px;
 border:1px solid #d9e5ef;
 border-radius:7px;
 background:#f7fafc;
 color:#47647d;
 font-size:10px;
 font-weight:850;
}
.unit-value,.line-igv,.line-total{
 white-space:nowrap!important;
 font-variant-numeric:tabular-nums;
}
.unit-value{
 color:#42627c!important;
 font-weight:700!important;
}
.line-igv{
 color:#577087!important;
 font-weight:700!important;
}
.sale-price-input{
 min-width:108px!important;
}
.sale-price-input .price-list{
 width:82px!important;
 font-weight:750!important;
}
.sale-discount-input{
 position:relative;
 min-width:80px;
}
.sale-discount-input .discount-pct{
 width:100%!important;
 padding-right:24px!important;
 text-align:right!important;
 font-weight:800!important;
}
.sale-discount-input>span{
 position:absolute;
 right:8px;
 top:50%;
 transform:translateY(-50%);
 color:#7a8da0;
 font-size:10px;
 font-weight:850;
 pointer-events:none;
}
.sale-items-detailed tbody tr[data-product-id]:hover{
 background:#f8fbff!important;
}
.sale-items-detailed .line-total{
 color:#173b5a!important;
 font-weight:900!important;
 font-size:12px!important;
}

/* =========================================================
   V171 - AJUSTE INTERNO + DESCUENTO CORREGIDO
   ========================================================= */
.sale-items-detailed .price-list{
 color:#153e62!important;
 font-weight:850!important;
}
.sale-items-detailed tr[data-product-id] .price-list:focus{
 border-color:#2780e8!important;
 box-shadow:0 0 0 3px rgba(39,128,232,.10)!important;
}

/* V174 - Importación de productos Excel */
.product-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.product-import-modal{width:min(720px,calc(100vw - 28px))!important;max-width:720px!important}.product-import-body{padding:16px!important}.product-import-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:13px}.product-import-steps>div{padding:10px;border:1px solid #e0e8f0;border-radius:9px;background:#fbfdff}.product-import-steps span{width:23px;height:23px;display:grid;place-items:center;border-radius:7px;background:#eaf3ff;color:#176be0;font-size:10px;font-weight:900;margin-bottom:6px}.product-import-steps strong{display:block;color:#24445f;font-size:11px}.product-import-steps small{display:block;color:#788b9d;font-size:9px;line-height:1.35;margin-top:3px}.product-template-link{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;margin-bottom:12px;border:1px solid #cfe0f1;border-radius:9px;background:#f4f9ff;color:#1769c4;text-decoration:none}.product-template-link strong{font-size:11px}.product-template-link small{font-size:9px;color:#6987a3}.product-import-drop{min-height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:14px;border:1.5px dashed #b8cde0;border-radius:10px;background:#fbfdff;cursor:pointer}.product-import-drop:hover,.product-import-drop.has-file{border-color:#3180da;background:#f2f8ff}.product-import-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#eaf3ff;color:#176be0;font-size:18px;font-weight:900;margin-bottom:6px}.product-import-drop strong{font-size:12px;color:#24445f}.product-import-drop small{margin-top:3px;color:#75899c;font-size:9.5px}.product-import-options{display:grid;gap:7px;margin-top:12px}.product-import-option{display:flex;align-items:flex-start;gap:9px;padding:9px 10px;border:1px solid #e2e9f0;border-radius:8px;background:#fff;cursor:pointer}.product-import-option input{margin-top:3px}.product-import-option strong{display:block;font-size:10.5px;color:#294861}.product-import-option small{display:block;margin-top:2px;font-size:9px;color:#7b8da0;line-height:1.3}.product-import-warning{display:flex;gap:8px;align-items:flex-start;margin-top:11px;padding:9px 10px;border:1px solid #f0dcb4;border-radius:8px;background:#fff9ec}.product-import-warning strong{color:#8a6318;font-size:9.5px}.product-import-warning span{color:#806c47;font-size:9px;line-height:1.35}.product-import-foot{display:flex;justify-content:flex-end;gap:8px}@media(max-width:720px){.product-import-steps{grid-template-columns:1fr}.product-template-link{align-items:flex-start;flex-direction:column}.product-head-actions{width:100%}}

/* =========================================================
   V175 - UNIDADES COMERCIALES Y PRESENTACIONES
   ========================================================= */
.product-commercial-unit,.sale-unit{font-weight:850;color:#244b69}
.sale-unit-sunat{display:block;margin-top:2px;color:#7b8da0;font-size:8px;white-space:nowrap}
.product-result-main mark{display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;background:#eaf3ff;color:#1769c4;font-size:8px;font-weight:900}
.product-presentation-modal{width:min(820px,calc(100vw - 30px))!important;max-width:820px!important}
.product-presentation-body{padding:14px}
.product-presentation-info{margin-bottom:10px;padding:9px 10px;border:1px solid #d7e6f5;border-radius:8px;background:#f4f9ff;color:#47708f;font-size:10px}
.product-presentation-form{display:grid;grid-template-columns:1.4fr .7fr .7fr .8fr;gap:8px;align-items:end;margin-top:12px;padding-top:12px;border-top:1px solid #e5edf4}
.product-presentation-actions{display:flex;gap:6px;grid-column:1/-1;justify-content:flex-end}
.presentation-primary{display:inline-flex;margin-left:7px;padding:2px 5px;border-radius:999px;background:#e8f7ef;color:#148251;font-size:7px;font-weight:900}
.product-presentation-table td,.product-presentation-table th{font-size:10.5px!important}
@media(max-width:760px){.product-presentation-form{grid-template-columns:1fr 1fr}.product-presentation-actions{grid-column:1/-1}}

/* =========================================================
   V176 - ADMINISTRACION DE UNIDADES DE MEDIDA
   ========================================================= */
.unit-admin-modal{width:min(720px,calc(100vw - 28px))!important;max-width:720px!important}
.unit-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.unit-admin-grid .span-2{grid-column:1/-1}
.unit-decimal-check{grid-column:1/-1;display:flex;gap:9px;align-items:flex-start;padding:10px;border:1px solid #e1e9f0;border-radius:8px;background:#fbfdff}
.unit-decimal-check strong{display:block;font-size:11px;color:#284861}.unit-decimal-check small{display:block;margin-top:2px;font-size:9px;color:#7b8da0}
.unit-sunat-badge{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#eaf3ff;color:#1769c4;font-size:9px;font-weight:900}
.product-unit-select,.presentation-unit-select{font-weight:700}
@media(max-width:650px){.unit-admin-grid{grid-template-columns:1fr}.unit-admin-grid .span-2{grid-column:auto}}

/* =========================================================
   V177 - MODAL PRODUCTO ERP PROFESIONAL
   ========================================================= */
.product-pro-modal{
 width:min(900px,calc(100vw - 28px))!important;
 max-width:900px!important;
 max-height:92vh!important;
 overflow:hidden!important;
 border-radius:14px!important;
 box-shadow:0 22px 60px rgba(17,49,77,.18)!important;
}
.product-pro-head{
 min-height:62px!important;
 padding:12px 16px!important;
 border-bottom:1px solid #dfe8f0!important;
 background:#fff!important;
}
.product-pro-title{display:flex;align-items:center;gap:10px}
.product-pro-title>div{display:flex;flex-direction:column;gap:2px}
.product-pro-title strong{font-size:15px!important;font-weight:900!important;color:#173650!important}
.product-pro-title small{font-size:9.5px!important;color:#7890a4!important}
.product-pro-icon{
 width:34px;height:34px;display:grid;place-items:center;border-radius:10px;
 background:#eaf3ff;color:#176ed4;font-size:16px;font-weight:900
}
.product-pro-form{display:flex;flex-direction:column;max-height:calc(92vh - 62px)}
.product-pro-body{padding:13px 16px 10px!important;overflow:auto;background:#f8fbfd}
.product-pro-section{
 border:1px solid #dfe8f0;border-radius:10px;background:#fff;margin-bottom:10px;overflow:hidden
}
.product-pro-section-head{
 min-height:46px;display:flex;align-items:center;gap:9px;padding:8px 11px;border-bottom:1px solid #edf2f6;background:#fbfdff
}
.product-pro-section-head>span{
 width:27px;height:27px;display:grid;place-items:center;border-radius:8px;background:#eaf3ff;
 color:#176ed4;font-size:9px;font-weight:900
}
.product-pro-section-head>div{display:flex;flex-direction:column;gap:1px}
.product-pro-section-head strong{font-size:11.5px;color:#203f59;font-weight:900}
.product-pro-section-head small{font-size:8.5px;color:#8294a4}
.product-pro-grid{display:grid;gap:10px;padding:11px}
.product-pro-grid-ident{grid-template-columns:150px 220px 1fr}
.product-pro-grid-class{grid-template-columns:1fr 1fr 1.6fr .8fr}
.product-pro-grid-finance{grid-template-columns:1fr 1fr 1fr 1fr 1.2fr}
.product-pro-span-full{grid-column:1/-1}
.product-pro-grid .field{min-width:0}
.product-pro-grid .field label{
 display:flex;align-items:center;gap:3px;margin-bottom:5px;font-size:10.5px!important;
 font-weight:850!important;color:#264762!important
}
.product-pro-grid .field label b{color:#d64242}
.product-pro-grid .input,.product-pro-grid .select{
 min-height:39px!important;height:39px!important;border-radius:8px!important;
 font-size:11.5px!important
}
.product-description-input{font-weight:700!important}
.product-pro-grid .field small{display:block;margin-top:4px;font-size:8.5px!important;color:#8093a3!important;line-height:1.3}
.product-pro-grid .field small a{color:#176ed4;font-weight:700;text-decoration:none}
.product-money-input{position:relative}
.product-money-input>span{
 position:absolute;left:10px;top:50%;transform:translateY(-50%);color:#788ea1;font-size:10px;font-weight:800;z-index:2
}
.product-money-input .input{padding-left:31px!important;font-weight:800!important}
.product-price-sale .product-money-input .input{
 border-color:#a8c9ec!important;background:#f8fbff!important;color:#174a78!important
}
.product-sunat-box{
 height:39px;display:grid;grid-template-columns:54px 1fr;border:1px solid #ccdbe7;border-radius:8px;overflow:hidden;background:#f7fafc
}
.product-sunat-box>span{
 display:grid;place-items:center;background:#eaf3ff;color:#176ed4;font-size:8px;font-weight:900;border-right:1px solid #d7e4ef
}
.product-sunat-box .input{
 border:0!important;border-radius:0!important;background:#f7fafc!important;font-weight:900!important;color:#305671!important
}
.product-tax-field{min-width:150px}
.product-pro-footer{
 min-height:67px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;
 border-top:1px solid #dfe8f0;background:#fff
}
.product-pro-footer-note{display:flex;align-items:flex-start;gap:8px;max-width:560px}
.product-pro-footer-note>span{
 width:20px;height:20px;display:grid;place-items:center;flex:0 0 20px;border-radius:50%;
 background:#eaf3ff;color:#176ed4;font-size:10px;font-weight:900
}
.product-pro-footer-note small{font-size:8.5px;color:#788c9d;line-height:1.4}
.product-pro-footer-actions{display:flex;gap:8px;align-items:center;white-space:nowrap}
.product-pro-footer-actions .btn{min-height:38px!important;padding:0 16px!important}
.product-save-btn{min-width:145px!important;font-weight:900!important}

@media(max-width:900px){
 .product-pro-grid-ident{grid-template-columns:1fr 1fr}
 .product-pro-grid-ident .product-pro-span-full{grid-column:1/-1}
 .product-pro-grid-class{grid-template-columns:1fr 1fr}
 .product-pro-grid-finance{grid-template-columns:1fr 1fr 1fr}
}
@media(max-width:650px){
 .product-pro-modal{width:calc(100vw - 16px)!important}
 .product-pro-grid-ident,.product-pro-grid-class,.product-pro-grid-finance{grid-template-columns:1fr}
 .product-pro-grid-ident .product-pro-span-full{grid-column:auto}
 .product-pro-footer{align-items:stretch;flex-direction:column}
 .product-pro-footer-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .product-save-btn{min-width:0!important}
}

/* V178 - FORMULARIO PRODUCTO COMPACTO */
.product-pro-modal{max-width:860px!important;max-height:90vh!important}
.product-pro-head{min-height:52px!important;padding:8px 13px!important}
.product-pro-icon{width:29px!important;height:29px!important;border-radius:8px!important;font-size:13px!important}
.product-pro-title strong{font-size:13px!important}.product-pro-title small{font-size:8.5px!important}
.product-pro-form{max-height:calc(90vh - 52px)!important}
.product-pro-body{padding:9px 12px 7px!important}
.product-pro-section{margin-bottom:7px!important;border-radius:8px!important}
.product-pro-section-head{min-height:38px!important;padding:5px 9px!important;gap:7px!important}
.product-pro-section-head>span{width:23px!important;height:23px!important;border-radius:6px!important;font-size:8px!important}
.product-pro-section-head strong{font-size:10.5px!important}.product-pro-section-head small{font-size:7.8px!important}
.product-pro-grid{gap:7px 9px!important;padding:8px 9px!important}
.product-pro-grid-ident{grid-template-columns:125px 190px 1fr!important}
.product-pro-grid-class{grid-template-columns:.9fr .9fr 1.55fr .72fr!important}
.product-pro-grid-finance{grid-template-columns:1fr 1fr .85fr .85fr 1.15fr!important}
.product-pro-grid .field label{margin-bottom:3px!important;font-size:9.5px!important}
.product-pro-grid .input,.product-pro-grid .select{min-height:32px!important;height:32px!important;padding-top:4px!important;padding-bottom:4px!important;font-size:10.5px!important;border-radius:7px!important}
.product-pro-grid .field small{margin-top:2px!important;font-size:7.5px!important;line-height:1.2!important}
.product-sunat-box{height:32px!important;grid-template-columns:47px 1fr!important;border-radius:7px!important}
.product-sunat-box>span{font-size:7.5px!important}
.product-money-input>span{left:9px!important;font-size:9px!important}.product-money-input .input{padding-left:27px!important}
.product-pro-footer{min-height:54px!important;padding:7px 12px!important;gap:10px!important}
.product-pro-footer-note>span{width:18px!important;height:18px!important;flex-basis:18px!important;font-size:8px!important}
.product-pro-footer-note small{font-size:7.5px!important;line-height:1.25!important}
.product-pro-footer-actions .btn{min-height:32px!important;height:32px!important;padding:0 13px!important;font-size:9.5px!important}
.product-save-btn{min-width:125px!important}.product-description-input{height:32px!important;min-height:32px!important}
@media(max-width:900px){.product-pro-grid-ident{grid-template-columns:1fr 1fr!important}.product-pro-grid-class{grid-template-columns:1fr 1fr!important}.product-pro-grid-finance{grid-template-columns:1fr 1fr 1fr!important}}
@media(max-width:650px){.product-pro-grid-ident,.product-pro-grid-class,.product-pro-grid-finance{grid-template-columns:1fr!important}.product-pro-grid .input,.product-pro-grid .select{height:36px!important;min-height:36px!important}}

/* =========================================================
   V179 - FORMULARIO PRODUCTO ULTRA COMPACTO
   Dos campos por fila y mínimo uso vertical.
   ========================================================= */

.product-pro-modal{
 max-width:760px!important;
 max-height:88vh!important;
}

.product-pro-head{
 min-height:46px!important;
 padding:6px 11px!important;
}
.product-pro-icon{
 width:26px!important;
 height:26px!important;
 font-size:12px!important;
}
.product-pro-title strong{font-size:12px!important}
.product-pro-title small{font-size:7.8px!important}

.product-pro-form{
 max-height:calc(88vh - 46px)!important;
}
.product-pro-body{
 padding:7px 9px 5px!important;
}

.product-pro-section{
 margin-bottom:5px!important;
}
.product-pro-section-head{
 min-height:32px!important;
 padding:4px 7px!important;
}
.product-pro-section-head>span{
 width:20px!important;
 height:20px!important;
 font-size:7px!important;
}
.product-pro-section-head strong{
 font-size:9.8px!important;
}
.product-pro-section-head small{
 font-size:7px!important;
}

/* Base general: dos campos por fila */
.product-pro-two-col{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:5px 8px!important;
 padding:6px 8px!important;
}

/* Descripción ocupa todo el ancho */
.product-pro-span-full{
 grid-column:1/-1!important;
}

/* Unidad comercial y SUNAT: una al lado de la otra */
.product-unit-field,
.product-sunat-field{
 grid-column:auto!important;
}

/* Precios y stock también de dos en dos */
.product-pro-grid-finance{
 grid-template-columns:1fr 1fr!important;
}

/* IGV ocupa media fila, no toda */
.product-tax-field{
 grid-column:auto!important;
 min-width:0!important;
}

/* Campos más bajos */
.product-pro-grid .field label{
 margin-bottom:2px!important;
 font-size:8.8px!important;
 line-height:1.05!important;
}

.product-pro-grid .input,
.product-pro-grid .select{
 height:29px!important;
 min-height:29px!important;
 padding-top:2px!important;
 padding-bottom:2px!important;
 font-size:9.8px!important;
 border-radius:6px!important;
}

.product-pro-grid .field small{
 margin-top:1px!important;
 font-size:6.8px!important;
 line-height:1.1!important;
}

.product-sunat-box{
 height:29px!important;
 grid-template-columns:43px 1fr!important;
}
.product-sunat-box>span{
 font-size:6.8px!important;
}
.product-money-input>span{
 left:8px!important;
 font-size:8px!important;
}
.product-money-input .input{
 padding-left:25px!important;
}

.product-description-input{
 height:29px!important;
 min-height:29px!important;
}

/* Footer mínimo */
.product-pro-footer{
 min-height:46px!important;
 padding:5px 9px!important;
}
.product-pro-footer-note{
 max-width:430px!important;
}
.product-pro-footer-note small{
 font-size:6.8px!important;
 line-height:1.15!important;
}
.product-pro-footer-actions .btn{
 height:29px!important;
 min-height:29px!important;
 padding:0 11px!important;
 font-size:8.8px!important;
}
.product-save-btn{
 min-width:112px!important;
}

/* En pantallas medianas sigue compacto */
@media(max-width:800px){
 .product-pro-modal{
   max-width:700px!important;
 }
 .product-pro-two-col{
   grid-template-columns:1fr 1fr!important;
 }
}

/* En móvil: una columna para evitar campos demasiado estrechos */
@media(max-width:560px){
 .product-pro-two-col,
 .product-pro-grid-finance{
   grid-template-columns:1fr!important;
 }
 .product-pro-span-full{
   grid-column:auto!important;
 }
 .product-pro-grid .input,
 .product-pro-grid .select{
   height:34px!important;
   min-height:34px!important;
   font-size:10.5px!important;
 }
 .product-pro-footer{
   flex-direction:column!important;
   align-items:stretch!important;
 }
 .product-pro-footer-actions{
   display:grid!important;
   grid-template-columns:1fr 1fr!important;
 }
}

/* V180 - PRECIOS Y STOCK: DOS CAMPOS POR FILA */
.product-pro-grid-finance{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 gap:5px 8px!important;
}
/* Precio compra + Precio venta */
.product-pro-grid-finance .field:nth-child(1),
.product-pro-grid-finance .field:nth-child(2){
 grid-column:auto!important;
}
/* Stock mínimo + Stock máximo */
.product-pro-grid-finance .field:nth-child(3),
.product-pro-grid-finance .field:nth-child(4){
 grid-column:auto!important;
}
/* IGV compacto: media fila */
.product-pro-grid-finance .product-tax-field{
 grid-column:1/2!important;
 max-width:none!important;
}
@media(max-width:560px){
 .product-pro-grid-finance{grid-template-columns:1fr!important}
 .product-pro-grid-finance .product-tax-field{grid-column:auto!important}
}

/* V181 - TEXTOS PRODUCTO MAS VISIBLES */
.product-pro-title strong{font-size:14px!important}
.product-pro-title small{font-size:9px!important}
.product-pro-section-head strong{font-size:11px!important}
.product-pro-section-head small{font-size:8px!important}
.product-pro-grid .field label{font-size:10.5px!important;font-weight:850!important}
.product-pro-grid .input,.product-pro-grid .select{font-size:11.5px!important;font-weight:600!important}
.product-pro-grid .field small{font-size:8px!important}
.product-sunat-box>span{font-size:8px!important}
.product-pro-footer-note small{font-size:8px!important}
.product-pro-footer-actions .btn{font-size:10px!important}

/* V182 - EDICION/REGISTRO RAPIDO DE UNIDADES */
.product-unit-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:3px}
.product-unit-actions a,.product-unit-action-btn{border:0;background:transparent;padding:0;color:#176ed4;font-size:8.5px;font-weight:800;text-decoration:none;cursor:pointer;font-family:inherit}
.product-unit-action-btn:hover,.product-unit-actions a:hover{text-decoration:underline}
.product-unit-action-btn:disabled{color:#9cacba;cursor:not-allowed;text-decoration:none}
.quick-unit-modal{width:min(620px,calc(100vw - 26px))!important;max-width:620px!important;border-radius:12px!important}
.quick-unit-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 10px!important;padding:12px!important}
.quick-unit-grid .field label{font-size:10px!important;font-weight:850!important;margin-bottom:4px!important}
.quick-unit-grid .input,.quick-unit-grid .select{height:34px!important;min-height:34px!important;font-size:10.5px!important}
.quick-unit-span{grid-column:1/-1}
.quick-unit-decimal{grid-column:1/-1;display:flex;gap:8px;align-items:flex-start;padding:8px 9px;border:1px solid #e1e9f0;border-radius:8px;background:#fbfdff}
.quick-unit-decimal strong{display:block;font-size:9.5px;color:#284861}.quick-unit-decimal small{display:block;margin-top:1px;font-size:8px;color:#7d8fa0}
.quick-unit-foot{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:560px){.quick-unit-grid{grid-template-columns:1fr!important}.quick-unit-span,.quick-unit-decimal{grid-column:auto}}

/* =========================================================
   V183 - BOTONES UNIDAD FUNCIONALES Y VISIBLES
   ========================================================= */
.product-unit-actions{
 position:relative!important;
 z-index:8!important;
 pointer-events:auto!important;
}
.product-unit-action-btn,
.product-unit-admin-link{
 display:inline-flex!important;
 align-items:center!important;
 min-height:22px!important;
 padding:2px 5px!important;
 border-radius:5px!important;
 pointer-events:auto!important;
 cursor:pointer!important;
 line-height:1.15!important;
}
.product-unit-action-btn:hover,
.product-unit-admin-link:hover{
 background:#eaf3ff!important;
 text-decoration:none!important;
}
.product-unit-action-btn:disabled{
 pointer-events:none!important;
 opacity:.55!important;
}

/* =========================================================
   V184 - MODAL UNIDAD SIEMPRE ENCIMA DE PRODUCTO
   ========================================================= */
#mQuickUnit.modal{
 position:fixed!important;
 inset:0!important;
 z-index:12050!important;
 display:none;
 align-items:center!important;
 justify-content:center!important;
 padding:14px!important;
 background:rgba(15,35,55,.42)!important;
}
#mQuickUnit.modal.show{
 display:flex!important;
}
#mQuickUnit .quick-unit-modal{
 position:relative!important;
 z-index:12060!important;
 margin:0!important;
 max-height:88vh!important;
 overflow:auto!important;
 box-shadow:0 24px 70px rgba(12,39,62,.28)!important;
}
#mProd.modal{
 z-index:11000!important;
}
#mProd.modal.show{
 z-index:11000!important;
}

/* V185 - Unidad rápida integrada */
#quickUnitForm button[type="submit"]:disabled{opacity:.65;cursor:wait}


/* =========================================================
   V186 - LOGIN PRODUCCION / ERP CORPORATIVO
   ========================================================= */
.sg-login-production{background:#eef3f8;color:#17304a}
.sg-login-page-v186{min-height:100vh;display:grid;grid-template-columns:minmax(620px,1.15fr) minmax(520px,.85fr);background:#eef3f8}
.sg-login-hero-v186{position:relative;overflow:hidden;display:flex;align-items:stretch;padding:0;background:linear-gradient(145deg,#09233f 0%,#103b68 48%,#15528c 100%);color:#fff}
.sg-login-hero-v186:before{content:"";position:absolute;inset:0;background:linear-gradient(115deg,rgba(255,255,255,.025),transparent 38%),radial-gradient(circle at 96% 8%,rgba(65,151,238,.18),transparent 32%);pointer-events:none}
.sg-login-hero-v186:after{content:"";position:absolute;width:430px;height:430px;border:1px solid rgba(255,255,255,.055);border-radius:50%;right:-250px;bottom:-225px;pointer-events:none}
.sg-login-hero-inner{position:relative;z-index:2;width:100%;min-height:100vh;padding:54px clamp(58px,7vw,118px) 44px;display:flex;flex-direction:column}
.sg-login-brand-v186{gap:12px;padding:0}
.sg-login-logo-v186{width:46px;height:46px;border-radius:11px;font-size:15px;box-shadow:none;border:1px solid rgba(255,255,255,.17);background:linear-gradient(145deg,#2e83ee,#1769d2)}
.sg-login-brand-v186 strong{font-size:14px;letter-spacing:.025em}.sg-login-brand-v186 span{font-size:9px;letter-spacing:.22em;margin-top:5px;color:#a8cef4}
.sg-login-copy-v186{margin:auto 0;max-width:690px;padding:70px 0}
.sg-login-copy-v186 .sg-login-kicker{font-size:10px;letter-spacing:.18em;color:#83bdf5;margin-bottom:17px}
.sg-login-copy-v186 h1{margin:0 0 22px;font-size:clamp(42px,4.15vw,64px);line-height:1.03;letter-spacing:-.04em;font-weight:850;color:#f8fbff}
.sg-login-copy-v186 h1 span{color:#91c6fb}
.sg-login-copy-v186 p{max-width:660px;margin:0;color:#cbdded;font-size:15px;line-height:1.7}
.sg-login-capabilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:36px;max-width:720px}
.sg-login-capabilities>div{min-width:0;display:flex;gap:10px;align-items:center;padding:11px 12px;border:1px solid rgba(255,255,255,.11);border-radius:9px;background:rgba(255,255,255,.045)}
.sg-cap-icon{width:26px;height:26px;flex:0 0 26px;display:grid;place-items:center;border-radius:7px;background:rgba(86,172,255,.12);color:#8cc9ff;font-size:8px;font-weight:900;border:1px solid rgba(120,190,255,.14)}
.sg-login-capabilities strong{display:block;color:#edf6ff;font-size:10px}.sg-login-capabilities small{display:block;color:#9eb9d4;font-size:8px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-login-hero-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:18px;padding-top:20px;border-top:1px solid rgba(255,255,255,.08);color:#80a6c9;font-size:8.5px;letter-spacing:.035em}
.sg-login-hero-footer>div{display:flex;align-items:center;gap:7px;color:#a9c4dd}.sg-login-hero-footer strong{font-size:8.5px;font-weight:700}
.sg-status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:#20b779;box-shadow:0 0 0 4px rgba(32,183,121,.1)}

.sg-login-access-v186{display:grid;place-items:center;padding:48px clamp(42px,5vw,88px);background:linear-gradient(155deg,#f8fbfe 0%,#eef4fa 55%,#e9f0f7 100%)}
.sg-login-access-inner-v186{width:min(460px,100%)}
.sg-login-access-brand-v186{justify-content:flex-start;margin:0 0 18px;padding-left:2px;gap:10px}
.sg-access-icon-v186{width:36px;height:36px;border-radius:9px;font-size:10px;box-shadow:none}
.sg-login-access-brand-v186 strong{font-size:11.5px;color:#193650}.sg-login-access-brand-v186 span{font-size:9px;color:#7a8da0}
.sg-login-card-v186{width:100%;padding:30px 31px 27px;border-radius:14px;border:1px solid #d9e3ec;background:#fff;box-shadow:0 18px 45px rgba(34,63,91,.105)}
.sg-login-card-head-v186{margin-bottom:25px}
.sg-login-card-eyebrow{display:flex;align-items:center;gap:8px;font-size:8px;font-weight:900;letter-spacing:.12em;color:#4b6985;margin-bottom:9px}
.sg-login-card-v186 h2{margin:0 0 6px;font-size:25px;line-height:1.1;color:#17334d;letter-spacing:-.025em}.sg-login-card-head-v186 p{font-size:11px;color:#7c8b9a}
.sg-login-field-v186{margin-bottom:16px}.sg-login-field-v186>span{font-size:10.5px;color:#324f69;margin-bottom:6px}
.sg-login-input-wrap-v186 .input{height:46px;border-radius:8px;border-color:#cfdbe7;padding-left:39px;padding-right:58px;font-size:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.sg-login-input-wrap-v186 .input:hover{border-color:#b9cad9}.sg-login-input-wrap-v186 .input:focus{border-color:#4a91e2;box-shadow:0 0 0 3px rgba(49,130,222,.1)}
.sg-login-field-icon{left:13px;color:#6f8499}.sg-password-dot{font-size:16px;line-height:1}
.sg-password-toggle{position:absolute;right:8px;height:30px;min-width:42px;padding:0 8px;border:0;border-radius:6px;background:#edf4fb;color:#376b9a;font-size:9px;font-weight:800;cursor:pointer}.sg-password-toggle:hover{background:#e3eef8}
.sg-login-submit-v186{height:46px;width:100%;margin-top:4px;border-radius:8px;display:flex;justify-content:space-between;padding:0 15px 0 18px;background:linear-gradient(135deg,#287de4,#1667cf);box-shadow:0 8px 18px rgba(23,105,224,.16);font-size:11px}.sg-login-submit-v186:hover{filter:brightness(.985);transform:translateY(-1px)}.sg-login-submit-v186 b{font-size:14px;font-weight:700}
.sg-login-security-row{margin-top:17px;padding:10px 11px;display:flex;gap:9px;align-items:center;border:1px solid #e5edf4;border-radius:8px;background:#f8fafc}.sg-login-security-icon{width:23px;height:23px;display:grid;place-items:center;border-radius:7px;background:#e7f6ef;color:#19855c;font-size:10px;font-weight:900}.sg-login-security-row strong{display:block;font-size:9px;color:#425d74}.sg-login-security-row small{display:block;font-size:8px;color:#8493a1;margin-top:1px}
.sg-login-alert{font-size:10px;margin-bottom:15px;padding:10px 11px}
.sg-login-footer-v186{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:17px;color:#8696a6;font-size:8px;letter-spacing:.02em}.sg-login-footer-sep{color:#bdc8d2}

@media(max-width:1180px){.sg-login-page-v186{grid-template-columns:1fr 1fr}.sg-login-hero-inner{padding-left:48px;padding-right:48px}.sg-login-copy-v186 h1{font-size:42px}.sg-login-capabilities{grid-template-columns:1fr}.sg-login-capabilities>div{max-width:360px}.sg-login-capabilities small{white-space:normal}}
@media(max-width:860px){.sg-login-page-v186{grid-template-columns:1fr}.sg-login-hero-v186{display:none}.sg-login-access-v186{min-height:100vh;padding:24px}.sg-login-access-inner-v186{width:min(470px,100%)}.sg-login-card-v186{padding:27px 24px}.sg-login-access-brand-v186{justify-content:center}}
@media(max-width:480px){.sg-login-access-v186{padding:16px}.sg-login-card-v186{padding:24px 18px;border-radius:12px}.sg-login-card-v186 h2{font-size:22px}.sg-login-input-wrap-v186 .input{height:44px}.sg-login-submit-v186{height:44px}.sg-login-footer-v186{flex-wrap:wrap}}

/* =========================================================
   V187 - PULIDO FINAL LOGIN PRODUCCION
   ========================================================= */
@media (min-width: 1100px){
  .login-card,.auth-card,.login-panel-card{
    transform:scale(1.055);
    transform-origin:center center;
  }
}
.login-hero h1,.auth-hero h1,.login-left h1{
  color:#d9ecff!important;
  text-shadow:0 2px 18px rgba(0,0,0,.10);
}
.login-hero h1 strong,.auth-hero h1 strong,.login-left h1 strong{
  color:#8fc8ff!important;
}
.login-card label,.auth-card label,.login-panel-card label{
  font-size:13px!important;
  font-weight:700!important;
  color:#17324d!important;
}
.login-card input,.auth-card input,.login-panel-card input{
  font-size:14px!important;
}
.login-card .muted,.auth-card .muted,.login-panel-card .muted,
.login-card small,.auth-card small,.login-panel-card small{
  font-size:11.5px!important;
  line-height:1.45!important;
}
@media (max-width:1099px){
  .login-card,.auth-card,.login-panel-card{transform:none!important}
}

/* =========================================================
   V188 - FILA DE OPERACION ERP COMPACTA + AYUDA CONTEXTUAL
   ========================================================= */
.sale-operation-row-pro{
 display:grid!important;
 grid-template-columns:minmax(165px,1.08fr) minmax(155px,1fr) minmax(170px,.95fr) minmax(130px,.78fr) minmax(160px,.92fr) minmax(175px,1.12fr)!important;
 gap:10px!important;
 align-items:end!important;
}
.sale-operation-row-pro>.field{
 min-width:0!important;
 display:flex!important;
 flex-direction:column!important;
 justify-content:flex-end!important;
 margin:0!important;
}
.sale-operation-row-pro>.field>label{
 min-height:21px!important;
 display:flex!important;
 align-items:center!important;
 gap:5px!important;
 margin:0 0 5px!important;
 line-height:1.15!important;
}
.sale-operation-row-pro .select,
.sale-operation-row-pro .sale-finance-badge{
 height:42px!important;
 min-height:42px!important;
 margin:0!important;
 box-sizing:border-box!important;
}
.sale-operation-row-pro .sale-help-source{
 display:none!important;
}
.sale-operation-row-pro .sale-finance-badge{
 display:flex!important;
 align-items:center!important;
 gap:7px!important;
 padding:0 12px!important;
 white-space:nowrap!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 border:1px solid #f0cc7b!important;
 background:#fff8e8!important;
 color:#9a6200!important;
 border-radius:8px!important;
 font-weight:800!important;
 font-size:11px!important;
}
.sale-finance-dot{
 width:7px;height:7px;border-radius:50%;
 background:#e8a317;flex:0 0 7px;
}
.sale-help{
 position:relative!important;
 width:17px!important;height:17px!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 padding:0!important;border:1px solid #bcd2ea!important;border-radius:50%!important;
 background:#f4f9ff!important;color:#1769c2!important;
 font-size:10px!important;font-weight:800!important;line-height:1!important;
 cursor:help!important;
}
.sale-help::after{
 content:attr(data-help);
 position:absolute;
 left:50%;bottom:calc(100% + 9px);
 transform:translateX(-50%) translateY(4px);
 width:260px;
 padding:9px 11px;
 border-radius:8px;
 background:#102d4d;
 color:#fff;
 font-size:11px;
 font-weight:500;
 line-height:1.4;
 box-shadow:0 10px 28px rgba(15,43,72,.22);
 opacity:0;
 visibility:hidden;
 pointer-events:none;
 z-index:10050;
 transition:.14s ease;
 white-space:normal;
 text-align:left;
}
.sale-help::before{
 content:"";
 position:absolute;
 left:50%;bottom:calc(100% + 4px);
 transform:translateX(-50%);
 border:5px solid transparent;
 border-top-color:#102d4d;
 opacity:0;visibility:hidden;
 z-index:10051;
}
.sale-help:hover::after,.sale-help:focus::after,
.sale-help:hover::before,.sale-help:focus::before{
 opacity:1;visibility:visible;transform:translateX(-50%) translateY(0);
}
.sale-help:hover::before,.sale-help:focus::before{transform:translateX(-50%)}
@media(max-width:1250px){
 .sale-operation-row-pro{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:end!important}
}
@media(max-width:760px){
 .sale-operation-row-pro{grid-template-columns:1fr 1fr!important}
}
@media(max-width:520px){
 .sale-operation-row-pro{grid-template-columns:1fr!important}
}


/* =========================================================
   V189 - TIPOGRAFIA PROFESIONAL EN LISTADOS ERP
   Reduce el exceso de negrita sin perder jerarquia visual.
   ========================================================= */
.table tbody td,
.table tbody td a,
.table tbody td span,
.table tbody td div{
  font-weight:400;
}
.table tbody td strong,
.table tbody td b{
  font-weight:500;
}
.table thead th,
.table th{
  font-weight:600;
}
/* Elementos que sí deben conservar énfasis */
.table tbody .badge,
.table tbody [class*="badge"],
.table tbody .status,
.table tbody [class*="status"],
.table tbody .stock-low,
.table tbody .line-total,
.table tbody .total,
.table tbody [class*="total"],
.table tbody .pm-entry,
.table tbody .pm-exit,
.table tbody .cpe-note-number,
.table tbody .cpe-document-situation{
  font-weight:700;
}
/* Códigos/enlaces principales: énfasis moderado, no negrita pesada */
.table tbody td:first-child strong,
.table tbody td:first-child b,
.table tbody td:first-child a{
  font-weight:600;
}
/* Tablas específicas y DataTables conservan el mismo criterio */
.dataTable tbody td,
table.dataTable tbody td{font-weight:400;}
.dataTable tbody td strong,.dataTable tbody td b,
table.dataTable tbody td strong,table.dataTable tbody td b{font-weight:500;}
.dataTable thead th,table.dataTable thead th{font-weight:600;}

/* =========================================================
   V190 - JERARQUIA VISUAL GLOBAL DE LISTADOS ERP
   ========================================================= */

/* Base de lectura: datos normales sin exceso de negrita */
.table tbody td,
.data-table tbody td,
.list-table tbody td,
.table-list tbody td{
  font-weight:400!important;
  color:#2e4b63!important;
}

/* Encabezados semibold, no excesivamente pesados */
.table thead th,
.data-table thead th,
.list-table thead th,
.table-list thead th{
  font-weight:650!important;
  color:#29465f!important;
  letter-spacing:.005em!important;
}

/* Los strong dentro de filas dejan de competir visualmente */
.table tbody td strong,
.data-table tbody td strong,
.list-table tbody td strong,
.table-list tbody td strong{
  font-weight:600!important;
  color:#183d5a!important;
}

/* Códigos principales: visibles, pero sin peso extremo */
.table tbody .sale-code,
.table tbody .product-code,
.table tbody .doc-number,
.table tbody .code,
.table tbody [class*="code"],
.table tbody [class*="numero"]{
  font-weight:650!important;
}

/* Totales e importes: un nivel de énfasis, no negrita excesiva */
.table tbody td.num,
.table tbody td.total,
.table tbody [class*="total"],
.table tbody [class*="importe"],
.table tbody [class*="amount"]{
  font-weight:600!important;
  color:#173e5e!important;
}

/* Textos secundarios: fechas auxiliares, RUC, descripciones y ayudas */
.table tbody small,
.table tbody .muted,
.table tbody .secondary,
.table tbody .subtext,
.table tbody [class*="meta"],
.table tbody [class*="help"]{
  font-weight:400!important;
  color:#7c8fa1!important;
  line-height:1.3!important;
}

/* Estados: el color y badge hacen el trabajo, no la tipografía extrema */
.table tbody .badge,
.data-table tbody .badge,
.list-table tbody .badge,
.table tbody [class*="badge"],
.table tbody [class*="status"],
.table tbody [class*="estado"]{
  font-weight:650!important;
}

/* Botones de acción: peso medio y tamaño consistente */
.table tbody .btn,
.data-table tbody .btn,
.list-table tbody .btn,
.table tbody button,
.table tbody a.btn{
  font-weight:600!important;
}

/* Menús de tres puntos / acciones secundarias visualmente discretos */
.table tbody .actions,
.table tbody [class*="action"]{
  font-weight:500!important;
}

/* Evitar que enlaces ordinarios parezcan títulos */
.table tbody a:not(.btn):not([class*="badge"]){
  font-weight:500!important;
}

/* Celdas con nombre/razón social: jerarquía intermedia */
.table tbody [class*="client"] strong,
.table tbody [class*="cliente"] strong,
.table tbody [class*="name"] strong,
.table tbody [class*="nombre"] strong{
  font-weight:550!important;
}

/* SUNAT: resumen corto y detalle técnico bajo demanda por tooltip nativo */
.sunat-message-compact{
  display:block!important;
  max-width:250px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  color:#7c8fa1!important;
  font-weight:400!important;
  cursor:help!important;
}

/* Reducir ruido visual de filas aceptadas: el badge basta */
.table tbody tr.is-accepted,
.table tbody tr.accepted,
.table tbody tr[data-status="ACEPTADO"]{
  border-left-color:transparent!important;
}

/* Mantener color de alerta solo en estados que realmente requieren atención */
.table tbody tr.is-rejected,
.table tbody tr.rejected,
.table tbody tr[data-status="RECHAZADO"]{
  border-left-color:#d85a5a!important;
}
.table tbody tr.is-pending,
.table tbody tr.pending,
.table tbody tr[data-status="PENDIENTE"]{
  border-left-color:#e3a52f!important;
}

/* Mejor ritmo visual de filas */
.table tbody td{
  line-height:1.28!important;
}
.table tbody tr{
  transition:background .12s ease!important;
}
.table tbody tr:hover{
  background:#f8fbfe!important;
}

/* Mantener accesibilidad en pantallas pequeñas */
@media(max-width:760px){
  .table tbody td,
  .data-table tbody td{
    font-weight:400!important;
  }
  .table tbody td strong{
    font-weight:600!important;
  }
}

/* =========================================================
   V191 - AYUDAS CONTEXTUALES FLOTANTES EN FORMULARIOS
   ========================================================= */

/* El texto fuente continúa en el DOM para accesibilidad/lógica,
   pero deja de ocupar espacio debajo del control. */
.global-help-source{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.label-with-global-help{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  width:max-content;
  max-width:100%;
}

.global-help-trigger{
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #bcd2e8!important;
  border-radius:50%!important;
  background:#f3f8fd!important;
  color:#1769c2!important;
  font-family:inherit!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:800!important;
  cursor:help!important;
  vertical-align:middle!important;
  box-shadow:none!important;
  transition:.14s ease!important;
}
.global-help-trigger:hover,
.global-help-trigger:focus,
.global-help-trigger[aria-expanded="true"]{
  background:#e5f1ff!important;
  border-color:#83b7e8!important;
  color:#0f5faa!important;
  outline:none!important;
}

.field-with-floating-help{
  position:relative!important;
}
.field-with-floating-help>.global-help-trigger{
  position:absolute!important;
  top:0!important;
  right:0!important;
  z-index:3!important;
}

/* Tooltip portal: no queda atrapado por modales, overflow o grids. */
.global-field-help-tooltip{
  position:fixed!important;
  z-index:20050!important;
  width:max-content;
  max-width:min(310px,calc(100vw - 20px));
  padding:9px 11px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:8px!important;
  background:#102f4f!important;
  color:#fff!important;
  box-shadow:0 12px 34px rgba(10,35,58,.24)!important;
  font-size:10.5px!important;
  font-weight:450!important;
  line-height:1.42!important;
  text-align:left!important;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(3px);
  transition:opacity .12s ease,transform .12s ease,visibility .12s ease;
}
.global-field-help-tooltip.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.global-field-help-tooltip-text{
  position:relative;
  z-index:2;
}
.global-field-help-arrow{
  position:absolute;
  left:var(--help-arrow-left,50%);
  bottom:-5px;
  width:10px;
  height:10px;
  background:#102f4f;
  transform:translateX(-50%) rotate(45deg);
}
.global-field-help-tooltip.below .global-field-help-arrow{
  top:-5px;
  bottom:auto;
}

/* Al desaparecer las ayudas inferiores, mantener los grids alineados. */
.field:has(>.global-help-source){
  align-self:end;
}

/* Los tooltips específicos de Ventas mantienen su funcionamiento actual. */
.sale-help-source{
  display:none!important;
}

@media(max-width:600px){
  .global-field-help-tooltip{
    max-width:calc(100vw - 24px)!important;
    font-size:11px!important;
  }
  .global-help-trigger{
    width:19px!important;
    height:19px!important;
    min-width:19px!important;
  }
}

/* =========================================================
   V192 - COMPROBANTES SUNAT: JERARQUIA ERP PROFESIONAL
   ========================================================= */
.cpe-table tbody td{
  font-weight:400!important;
  color:#314d64!important;
}
.cpe-table thead th{
  font-weight:600!important;
  color:#29465d!important;
}
.cpe-doc-number{
  display:block!important;
  margin-top:5px!important;
  font-weight:650!important;
  color:#0f3c61!important;
}
.cpe-doc-type{
  font-weight:600!important;
}
.cpe-branch-cell{
  font-weight:400!important;
  color:#496278!important;
}
.cpe-client-doc{
  display:block!important;
  font-weight:400!important;
  color:#70869a!important;
}
.cpe-client-name{
  display:block!important;
  margin-top:2px!important;
  font-weight:500!important;
  color:#173f5f!important;
}
.cpe-date-main{
  display:block!important;
  font-weight:500!important;
  color:#274a65!important;
}
.cpe-date-cell small{
  font-weight:400!important;
  color:#8394a3!important;
}
.cpe-total-main{
  font-weight:600!important;
  color:#123f62!important;
}
.cpe-sunat-badge{
  font-weight:650!important;
}
.cpe-sunat-message-pro{
  display:block!important;
  margin-top:5px!important;
  max-width:180px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-weight:400!important;
  color:#7a8e9f!important;
  cursor:help!important;
}
.cpe-whatsapp{
  font-weight:550!important;
}
/* En aceptados el badge ya comunica el estado: eliminamos la barra verde repetitiva. */
.cpe-row-aceptado{
  border-left:0!important;
  box-shadow:none!important;
}
.cpe-row-aceptado>td:first-child{
  border-left:0!important;
}
/* Alertas sí conservan señal visual lateral. */
.cpe-row-rechazado>td:first-child,
.cpe-row-error>td:first-child{
  border-left:3px solid #d95b5b!important;
}
.cpe-row-pendiente>td:first-child{
  border-left:3px solid #e2a638!important;
}
/* Menú de acciones: textos normales, títulos de grupo discretos. */
.cpe-menu-item b{
  font-weight:500!important;
}
.cpe-menu-label{
  font-weight:600!important;
}
/* Hover muy ligero para seguir visualmente una fila sin recargarla. */
.cpe-table tbody tr:hover td{
  background:#f8fbfe!important;
}

/* V193 - Tipo de comprobante en columna independiente */
.cpe-table .cpe-type-cell{width:88px!important;min-width:88px!important;white-space:nowrap!important}
.cpe-table .cpe-doc-cell{min-width:145px!important}
.cpe-type-cell .cpe-doc-type{margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
.cpe-doc-cell .cpe-doc-number{margin-top:0!important}

/* =========================================================
   V194 - COMPROBANTES SUNAT ERP: LEGIBILIDAD Y ESPACIADO FINAL
   ========================================================= */

/* Aumentar ligeramente la tipografía sin perder densidad ERP */
.cpe-table{
  font-size:13.25px!important;
}
.cpe-table thead th{
  font-size:12.5px!important;
  font-weight:600!important;
  padding-top:12px!important;
  padding-bottom:12px!important;
}
.cpe-table tbody td{
  font-size:13.25px!important;
  padding-top:12px!important;
  padding-bottom:12px!important;
  vertical-align:middle!important;
}

/* Tipo y sucursal compactos: liberar espacio para Cliente y SUNAT */
.cpe-table th:nth-child(1),
.cpe-table td:nth-child(1){
  width:76px!important;
  min-width:76px!important;
}
.cpe-table th:nth-child(3),
.cpe-table td:nth-child(3){
  width:100px!important;
  min-width:100px!important;
}
.cpe-table th:nth-child(4),
.cpe-table td:nth-child(4){
  min-width:220px!important;
}
.cpe-table th:nth-child(7),
.cpe-table td:nth-child(7){
  min-width:205px!important;
}

/* Jerarquía: comprobante, total y estado son los tres focos */
.cpe-doc-number{
  font-size:13.5px!important;
  font-weight:650!important;
}
.cpe-client-name{
  font-size:13.25px!important;
  font-weight:500!important;
}
.cpe-client-doc{
  font-size:10.75px!important;
  font-weight:400!important;
}
.cpe-date-main{
  font-size:13.25px!important;
  font-weight:500!important;
}
.cpe-date-cell small{
  font-size:10.75px!important;
}
.cpe-total-cell{
  text-align:right!important;
}
.cpe-total-main{
  display:block!important;
  font-size:13.5px!important;
  font-weight:650!important;
  white-space:nowrap!important;
  text-align:right!important;
}
.cpe-sunat-badge{
  font-size:11.25px!important;
  font-weight:650!important;
}

/* El badge comunica el estado; explicación solo como tooltip/title */
.cpe-sunat-message-pro{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* Eliminar definitivamente la barra verde de aceptados */
.cpe-row-aceptado,
.cpe-row-aceptado>td,
.cpe-row-aceptado>td:first-child{
  border-left-width:0!important;
  box-shadow:none!important;
}
/* Mantener señal lateral solo para situaciones que requieren atención */
.cpe-row-rechazado>td:first-child,
.cpe-row-error>td:first-child{
  border-left:3px solid #d95b5b!important;
}
.cpe-row-pendiente>td:first-child{
  border-left:3px solid #e2a638!important;
}

/* Etiqueta de tipo visible pero secundaria */
.cpe-doc-type{
  font-size:10.75px!important;
  font-weight:600!important;
  padding:4px 7px!important;
}

/* Acciones legibles sin competir con datos principales */
.cpe-whatsapp,
.cpe-more-toggle{
  font-size:11.5px!important;
  font-weight:550!important;
}

/* Hover discreto para seguimiento horizontal */
.cpe-table tbody tr:hover td{
  background:#f7fbff!important;
}

/* =========================================================
   V195 - CONTROL FINANCIERO: CAJA ABIERTA PARA MOVIMIENTOS
   ========================================================= */
.sale-cash-required-disabled{
  opacity:.58!important;
  cursor:not-allowed!important;
  filter:saturate(.55)!important;
}
.sale-cash-control-note{
  display:flex!important;
  align-items:flex-start!important;
  gap:8px!important;
  margin-top:8px!important;
  padding:9px 10px!important;
  border:1px solid #d7e5f2!important;
  border-radius:9px!important;
  background:#f7fbff!important;
  color:#34536c!important;
}
.sale-cash-control-note>span{
  width:18px!important;height:18px!important;min-width:18px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border-radius:50%!important;background:#e5f2ff!important;color:#1468bd!important;
  font-size:10px!important;font-weight:800!important;
}
.sale-cash-control-note strong{
  display:block!important;font-size:11.5px!important;font-weight:650!important;color:#25465f!important;
}
.sale-cash-control-note small{
  display:block!important;margin-top:2px!important;font-size:10.5px!important;line-height:1.35!important;color:#688096!important;
}

/* =========================================================
   V196 - REGISTRO RAPIDO PRODUCTO SINCRONIZADO CON UNIDADES
   ========================================================= */
#quickProductUnidad{
  font-weight:600!important;
}
#quickProductUnidadSunat{
  background:#f7fafc!important;
  color:#45637b!important;
  font-weight:650!important;
}

/* =========================================================
   V197 - DASHBOARD GERENCIAL ERP CON GRAFICOS
   ========================================================= */
.dashboard-pro-head{margin-bottom:12px!important}
.dashboard-filter-card{background:#fff;border:1px solid #dde7ef;border-radius:11px;padding:10px 12px;margin-bottom:12px;box-shadow:0 2px 10px rgba(27,63,91,.04)}
.dashboard-filter-main{display:grid;grid-template-columns:1.05fr .9fr .9fr 1fr 1fr auto;gap:9px;align-items:end}
.dashboard-filter-main .field{margin:0}.dashboard-filter-main label{font-size:9px!important;margin-bottom:3px!important}.dashboard-filter-main .input,.dashboard-filter-main .select{height:34px!important;min-height:34px!important;font-size:10.5px!important}
.dashboard-filter-btn{height:34px!important;min-width:90px}
.dashboard-filter-note{font-size:8.5px;color:#7a8d9e;margin-top:7px}.dashboard-filter-note strong{font-weight:600;color:#456078}
.dashboard-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:12px}
.dashboard-kpi{display:flex;flex-direction:column;min-width:0;padding:12px 13px;border:1px solid #e0e9f0;border-radius:10px;background:#fff;text-decoration:none!important;box-shadow:0 2px 9px rgba(28,63,90,.035);transition:.15s ease}
.dashboard-kpi:hover{transform:translateY(-1px);box-shadow:0 7px 20px rgba(25,65,96,.08);border-color:#bfd7ea}
.dashboard-kpi>span{font-size:8px;font-weight:700;color:#7b8f9f;letter-spacing:.04em}.dashboard-kpi>strong{font-size:18px;font-weight:650;color:#173f60;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-kpi>small{font-size:8.5px;color:#8192a1;margin-top:3px}
.dashboard-kpi.primary{border-top:3px solid #267bc4}.dashboard-kpi.warning{border-top:3px solid #e2a638}.dashboard-kpi.danger{border-top:3px solid #d85c5c}
.dashboard-charts-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:10px;margin-bottom:12px}
.dashboard-chart-card{position:relative;min-width:0;background:#fff;border:1px solid #dde7ef;border-radius:11px;padding:12px;box-shadow:0 2px 10px rgba(26,62,90,.035);overflow:hidden}
.dashboard-chart-wide{min-height:320px}.dashboard-chart-card:not(.dashboard-chart-wide){min-height:320px}
.dashboard-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.dashboard-chart-head>div{display:flex;flex-direction:column;gap:2px}.dashboard-chart-head strong{font-size:11.5px;font-weight:650;color:#203f59}.dashboard-chart-head small{font-size:8.5px;color:#7c8f9f}.dashboard-chart-head>a,.dashboard-chart-head>span{font-size:8.5px;color:#3977ab;text-decoration:none;white-space:nowrap}
.dashboard-chart{position:relative;height:250px;min-width:0;--dash-c1:#2e7cc0;--dash-c2:#64a7dc;--dash-c3:#df6b63;--dash-c4:#63a879}
.dash-svg{width:100%;height:100%;overflow:visible}.dash-grid{stroke:#e7eef4;stroke-width:1}.dash-axis{fill:#8192a0;font-size:9px;font-family:inherit}.dash-line{fill:none;stroke:#2e7cc0;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.dash-point{fill:#fff;stroke:#2e7cc0;stroke-width:3;cursor:pointer}.dash-bar-primary{fill:#347fbe}.dash-bar-secondary{fill:#a8bfd2}
.dash-chart-tooltip{position:absolute;z-index:5;display:none;min-width:145px;max-width:190px;padding:7px 9px;border-radius:7px;background:#102f4f;color:#fff;font-size:9px;line-height:1.4;box-shadow:0 10px 25px rgba(10,37,61,.22);pointer-events:none}.dash-chart-tooltip.show{display:block}.dash-chart-tooltip strong{font-weight:650}
.dash-legend{position:absolute;right:6px;bottom:-2px;display:flex;gap:10px;font-size:8px;color:#708497}.dash-legend span{display:flex;align-items:center;gap:4px}.dash-legend i{width:8px;height:8px;border-radius:2px}.dash-legend i.primary{background:#347fbe}.dash-legend i.secondary{background:#a8bfd2}
.dash-simple-bars,.dash-hbars{height:100%;display:flex;flex-direction:column;justify-content:center;gap:12px}.dash-simple-bar{display:flex;flex-direction:column;gap:5px}.dash-simple-label,.dash-hbar-label{display:flex;justify-content:space-between;gap:10px;font-size:9.5px;color:#49647a}.dash-simple-label strong,.dash-hbar-label strong{font-weight:600;color:#284c67}.dash-track{height:7px;background:#edf3f7;border-radius:999px;overflow:hidden}.dash-track>span{display:block;height:100%;background:#4385bd;border-radius:999px}.dash-hbar-row{display:flex;align-items:center;gap:8px}.dash-rank{width:18px;height:18px;display:grid;place-items:center;flex:0 0 18px;border-radius:50%;background:#eef5fb;color:#4f7899;font-size:8px;font-weight:700}.dash-hbar-main{flex:1;min-width:0}.dash-hbar-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:68%}
.dash-donut-wrap{height:100%;display:grid;grid-template-columns:170px 1fr;align-items:center;gap:18px;justify-content:center}.dash-donut-chart{width:160px;height:160px;border-radius:50%;display:grid;place-items:center;position:relative}.dash-donut-chart:after{content:"";position:absolute;inset:25px;background:#fff;border-radius:50%}.dash-donut-chart>div{position:relative;z-index:2;text-align:center;display:flex;flex-direction:column}.dash-donut-chart strong{font-size:21px;font-weight:650;color:#1e4765}.dash-donut-chart small{font-size:8px;color:#8294a3}.dash-donut-legend{display:flex;flex-direction:column;gap:10px}.dash-donut-legend>div{display:grid;grid-template-columns:9px 1fr auto;align-items:center;gap:6px;font-size:9px;color:#567086}.dash-donut-legend i{width:8px;height:8px;border-radius:2px}.dash-donut-legend strong{font-weight:650;color:#294b64}
.dashboard-chart-empty{height:100%;display:grid;place-items:center;color:#8495a4;font-size:10px}
.dashboard-recent-card .table td,.dashboard-recent-card .table th{font-size:10.5px!important}
@media(max-width:1250px){.dashboard-kpis{grid-template-columns:repeat(3,1fr)}.dashboard-filter-main{grid-template-columns:repeat(3,1fr)}.dashboard-filter-btn{width:100%}}
@media(max-width:900px){.dashboard-charts-grid{grid-template-columns:1fr}.dashboard-kpis{grid-template-columns:repeat(2,1fr)}.dashboard-filter-main{grid-template-columns:1fr 1fr}.dash-donut-wrap{grid-template-columns:150px 1fr}}
@media(max-width:580px){.dashboard-kpis{grid-template-columns:1fr}.dashboard-filter-main{grid-template-columns:1fr}.dashboard-chart-card,.dashboard-chart-wide{min-height:300px}.dash-donut-wrap{grid-template-columns:1fr}.dash-donut-chart{margin:auto}.dashboard-chart{height:235px}}

/* =========================================================
   V198 - DASHBOARD: FILTROS COMPACTOS EN UNA SOLA FILA
   ========================================================= */
.dashboard-filter-compact{padding:10px 12px!important}
.dashboard-filter-compact .dashboard-filter-main{
 display:grid!important;
 grid-template-columns:minmax(155px,1.15fr) minmax(145px,1fr) minmax(145px,1fr) minmax(145px,1fr) auto!important;
 gap:10px!important;
 align-items:end!important;
}
.dashboard-filter-compact .dashboard-filter-main .field{min-width:0!important}
.dashboard-filter-compact .dashboard-filter-main .select,
.dashboard-filter-compact .dashboard-filter-main .input{
 width:100%!important;height:36px!important;min-height:36px!important;
}
.dashboard-filter-compact .dashboard-filter-btn{
 width:auto!important;min-width:110px!important;height:36px!important;
 padding-left:18px!important;padding-right:18px!important;
}
.dashboard-filter-compact .dashboard-filter-note{
 margin-top:6px!important;padding-top:0!important;border-top:0!important;
}
.dashboard-filter-compact .dash-custom-date{display:none}
.dashboard-filter-compact:has(#dashPeriodo option[value="personalizado"]:checked) .dashboard-filter-main{
 grid-template-columns:minmax(135px,.9fr) minmax(125px,.75fr) minmax(125px,.75fr) minmax(135px,.9fr) minmax(135px,.9fr) auto!important;
}
@media(min-width:901px){
 .dashboard-filter-compact .dashboard-filter-main{grid-auto-flow:column!important}
}
@media(max-width:1100px){
 .dashboard-filter-compact .dashboard-filter-main{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
 .dashboard-filter-compact .dashboard-filter-btn{width:100%!important}
}
@media(max-width:620px){
 .dashboard-filter-compact .dashboard-filter-main{grid-template-columns:1fr!important}
}

/* V199 - Exportación Kardex valorizado */
.valued-kardex-actions{display:flex;align-items:center;gap:7px;margin-left:auto}
.valued-kardex-actions .search{min-width:260px}
@media(max-width:760px){.valued-kardex-actions{width:100%;flex-wrap:wrap}.valued-kardex-actions .search{min-width:100%;width:100%}}

/* =========================================================
   V200 - REPORTES ERP DE INVENTARIO
   ========================================================= */
.inventory-report-shell{display:flex;flex-direction:column;gap:10px}
.inventory-report-title h2{margin:2px 0 2px;font-size:17px;color:#173d5b}.inventory-report-title p{margin:0;color:#75899a;font-size:9.5px}
.inventory-report-filters{display:grid;grid-template-columns:1.05fr .9fr 1fr 1.45fr .95fr .85fr .85fr auto;gap:7px;align-items:end;padding:10px;background:#fff;border:1px solid #dce7ef;border-radius:10px}
.inventory-report-filters .field{margin:0;min-width:0}.inventory-report-filters label{font-size:8.5px!important;margin-bottom:3px!important}.inventory-report-filters .input,.inventory-report-filters .select{height:34px!important;min-height:34px!important;font-size:9.5px!important;padding-left:8px!important;padding-right:24px!important}
.inventory-report-search{height:34px!important;min-width:78px!important;padding:0 12px!important}
.inventory-report-tabs{display:flex;gap:5px;padding:4px;background:#edf4f9;border-radius:9px;width:max-content;max-width:100%;overflow:auto}
.inventory-report-tabs button{border:0;background:transparent;padding:8px 12px;border-radius:7px;color:#587187;font-size:9.5px;font-weight:600;white-space:nowrap;cursor:pointer}
.inventory-report-tabs button.active{background:#fff;color:#1769b2;box-shadow:0 1px 6px rgba(24,64,94,.1)}
.inventory-report-panel{display:none}.inventory-report-panel.active{display:block}
.inventory-report-head{align-items:center!important}.inventory-report-actions{display:flex;gap:6px}
.inventory-report-migration{padding:14px;border:1px solid #f0cd7a;background:#fff8e9;border-radius:10px;color:#765213}.inventory-report-migration strong{font-size:11px}.inventory-report-migration p{font-size:9.5px;margin:5px 0 0}.inventory-report-migration code{font-weight:650}
.inventory-report-panel .table th{white-space:nowrap}.inventory-report-panel .table td{font-size:10.5px!important}
@media(max-width:1450px){.inventory-report-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.inventory-report-search{width:100%}}
@media(max-width:850px){.inventory-report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.inventory-report-filters{grid-template-columns:1fr}.inventory-report-search{width:100%}}

/* V206 - Inventario/Kardex server-side, sin dependencia de JavaScript */
.inventory-advanced-nav a,
.inventory-report-tabs a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  cursor:pointer;
}
.inventory-advanced-nav a{color:inherit}
.inventory-advanced-nav a.active{color:#fff}
.inventory-report-tabs a{color:inherit}
.inventory-report-tabs a.active{color:#fff}
.inventory-head-actions a.btn{white-space:nowrap}
.modal .close[href]{text-decoration:none}


/* =========================================================
   V208 - Inventario/Kardex apariencia ERP profesional
   ========================================================= */

.inventory-advanced-nav.erp-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  padding:6px;
  margin:10px 0 12px;
  border:1px solid #d9e2ec;
  border-radius:12px;
  background:#f8fafc;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

.inventory-advanced-nav.erp-tabs a{
  min-height:36px;
  padding:8px 12px;
  border:1px solid transparent;
  border-radius:8px;
  font-size:13px;
  font-weight:700;
  line-height:1;
  color:#334155 !important;
  background:transparent;
  transition:all .15s ease;
  gap:7px;
  white-space:nowrap;
}

.inventory-advanced-nav.erp-tabs a:hover{
  background:#eef4fb;
  border-color:#cbd9e8;
  color:#0f3f73 !important;
}

.inventory-advanced-nav.erp-tabs a.active{
  background:#1976d2;
  border-color:#1976d2;
  color:#fff !important;
  box-shadow:0 3px 8px rgba(25,118,210,.22);
}

.erp-tab-icon{
  min-width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  border-radius:5px;
  background:rgba(15,23,42,.06);
}

.inventory-advanced-nav.erp-tabs a.active .erp-tab-icon{
  background:rgba(255,255,255,.18);
}

.erp-actionbar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.erp-actionbar .btn{
  min-height:38px;
  padding:9px 14px;
  border-radius:8px;
  font-weight:700;
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}

.erp-actionbar .btn-primary{
  box-shadow:0 4px 10px rgba(25,118,210,.18);
}

/* Tarjetas KPI más ERP */
.inventory-kpis,
.inventory-summary{
  gap:10px;
}

.inventory-kpi,
.inventory-summary > div,
.inventory-metric{
  border-radius:10px;
  border:1px solid #dce5ef;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

/* Paneles */
.inventory-tab-panel.active{
  animation:none;
}

.inventory-tab-panel .card,
.inventory-tab-panel .panel,
.inventory-tab-panel .table-card{
  border-radius:12px;
  border:1px solid #dce5ef;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
}

/* Tablas con jerarquía visual */
.inventory-tab-panel table thead th{
  background:#f4f7fb;
  color:#1e293b;
  font-size:12px;
  font-weight:800;
  border-bottom:1px solid #dbe5ef;
}

.inventory-tab-panel table tbody tr:hover{
  background:#f8fbff;
}

/* Reportes ERP */
.inventory-report-tabs{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  padding:5px;
  border:1px solid #d9e2ec;
  border-radius:10px;
  background:#f8fafc;
  margin-bottom:12px;
}

.inventory-report-tabs a{
  min-height:34px;
  padding:8px 12px;
  border-radius:7px;
  font-size:12px;
  font-weight:700;
  color:#475569 !important;
  border:1px solid transparent;
}

.inventory-report-tabs a:hover{
  background:#edf4fb;
  color:#0f3f73 !important;
}

.inventory-report-tabs a.active{
  background:#1976d2;
  border-color:#1976d2;
  color:#fff !important;
}

/* Títulos de secciones */
.inventory-tab-panel h2,
.inventory-tab-panel h3{
  color:#0f2742;
  letter-spacing:-.01em;
}

/* Responsive */
@media (max-width: 1100px){
  .inventory-advanced-nav.erp-tabs{
    overflow-x:auto;
    flex-wrap:nowrap;
    scrollbar-width:thin;
  }
  .inventory-advanced-nav.erp-tabs a{
    flex:0 0 auto;
  }
}

@media (max-width: 700px){
  .erp-actionbar{
    justify-content:stretch;
  }
  .erp-actionbar .btn{
    flex:1 1 100%;
    text-align:center;
  }
}

