/* H26 cartera v1 */
#notasCredito .cr-filters{display:flex;flex-wrap:wrap;gap:16px;align-items:end;margin:24px 0}#notasCredito .cr-filters label:first-child{flex:1;min-width:220px}#notasCredito label{display:grid;gap:8px;margin-bottom:12px;font-weight:600}#notasCredito .cr-actions{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}#notasCredito .cr-scroll{overflow-x:auto}#notasCredito .cr-table{border-collapse:collapse;width:100%;text-align:left;font-variant-numeric:tabular-nums}#notasCredito th{font-size:13px;color:#66516e;background:#f5f0f6}#notasCredito th,#notasCredito td{padding:16px 12px;border-bottom:1px solid #e7dfe9;vertical-align:middle}#notasCredito td small,#notasCredito .cr-client small{display:block;font-size:13px;color:#66516e;margin-top:5px}#notasCredito .cr-table input{min-width:120px;width:140px}#notasCredito .cr-new{margin-top:24px;max-width:920px}#notasCredito textarea{min-height:78px;resize:vertical}#notasCredito .cr-client{display:block;text-align:left;width:100%;padding:14px;background:#fff;border:0;border-bottom:1px solid #e7dfe9;color:#392144}#notasCredito .cr-client:hover{background:#f5f0f6}#notasCredito .cr-receipt{margin-top:28px;max-width:900px}#notasCredito .cr-cancel{margin-top:30px;padding-top:20px;border-top:1px solid #e7dfe9}#notasCredito h2{margin-top:28px}#notasCredito button:disabled{opacity:.55;cursor:not-allowed}#notasCredito a.secondary{display:inline-flex;align-items:center;text-decoration:none;padding:12px 16px;border:1px solid #d9cddd;border-radius:8px;color:#392144}#notasCredito :focus-visible{outline:3px solid #9a6aaa;outline-offset:3px}@media(max-width:600px){#notasCredito .cr-filters label{flex:1 1 130px}#notasCredito th,#notasCredito td{padding:12px 8px}#notasCredito .cr-actions button{flex:1}#notasCredito .cr-table{font-size:14px}}

/* H26 estados suaves v1 */
#notasCredito .cr-status{display:inline-flex;align-items:center;padding:4px 10px;border-radius:6px;font-size:13px;font-weight:650;line-height:1.5;white-space:nowrap;background:#f0edf1;color:#584b5e}
#notasCredito .cr-status-A{background:#e8f2ea;color:#28563a}
#notasCredito .cr-status-C{background:#f5ebe5;color:#834d35}
#notasCredito .cr-status-E{background:#f8eaea;color:#913d43}

/* H26 acciones recibos v1 */
#notasCredito .cr-row-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:125px}
#notasCredito .cr-row-actions button{white-space:nowrap;min-height:42px}
#notasCredito .cr-danger-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#913d43;background:transparent;border:1px solid #e7ced0;border-radius:8px;padding:9px 12px;font:inherit;font-weight:600;cursor:pointer}
#notasCredito .cr-danger-link:hover{background:#f8eaea}
#notasCredito .cr-navigation{margin:12px 0 24px;padding-bottom:16px;border-bottom:1px solid #e7dfe9}
#notasCredito .cr-back{display:inline-flex;align-items:center;gap:10px;padding:8px 0;border:0;background:none;color:#664973;font:inherit;font-weight:600;cursor:pointer}
#notasCredito .cr-back:hover{text-decoration:underline}
#notasCredito .cr-back span{font-size:22px}
#notasCredito .cr-annul-dialog{box-sizing:border-box;width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #e7dfe9;border-radius:14px;background:#fffdf8;color:#392144;box-shadow:0 16px 48px #27162f33}
#notasCredito .cr-annul-dialog::backdrop{background:#21162966}
#notasCredito .cr-annul-dialog header{display:flex;align-items:start;gap:16px;justify-content:space-between}
#notasCredito .cr-annul-dialog h2{margin:0;font-size:22px}
#notasCredito .cr-dialog-close{font:inherit;font-size:25px;background:none;border:0;color:#66516e;min-width:44px;min-height:44px;cursor:pointer}
#notasCredito .cr-annul-dialog dl{background:#f5f0f6;border-radius:8px;padding:16px;margin:20px 0}
#notasCredito .cr-annul-dialog dt{font-size:13px;color:#66516e;margin-top:10px}
#notasCredito .cr-annul-dialog dt:first-child{margin-top:0}
#notasCredito .cr-annul-dialog dd{margin:4px 0 0;font-weight:600;overflow-wrap:anywhere}
#notasCredito .cr-annul-dialog textarea{box-sizing:border-box;width:100%;min-height:96px}
#notasCredito .cr-annul-dialog footer{display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap;margin-top:20px}
#notasCredito .cr-danger{font:inherit;font-weight:600;background:#913d43;color:#fff;border:1px solid #913d43;border-radius:8px;padding:12px 16px;cursor:pointer}
@media(max-width:480px){#notasCredito .cr-annul-dialog{padding:18px}#notasCredito .cr-annul-dialog footer button{width:100%}}

#notasCredito .cr-table input:disabled{background:#f3f0f3;color:#85788b;cursor:not-allowed;opacity:1}

/* H26 interfaz unificada v1 */
.ui-action-icon{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
button.ui-action,a.ui-action{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;border-radius:8px;line-height:1.3;font-weight:650;vertical-align:middle}
button.ui-action:disabled{cursor:not-allowed;opacity:.55}
button.ui-action:focus-visible,a.ui-action:focus-visible{outline:3px solid #815697;outline-offset:3px}
#notasCredito .cr-client{display:grid;grid-template-columns:20px 1fr;text-align:left;justify-content:start;column-gap:12px}
#notasCredito .cr-client small{grid-column:2}
#notasCredito .cr-row-actions button{min-height:44px}
#notasCredito [data-receipt]>button{margin:8px 8px 0 0}
#notasCredito [data-cancel]{color:#913d43;border:1px solid #e7ced0}
#notasCredito tfoot th,#notasCredito tfoot td{background:#f2edf3;border-top:2px solid #ddd4df;font-weight:750}
#notasCredito [data-total-balance]{white-space:nowrap}
.ui-client-balance,#notasCredito [data-current-balance]{display:block;font-size:13px;font-weight:650;color:#392144;margin-top:8px;line-height:1.5;font-variant-numeric:tabular-nums}
.ui-mobile-bar{display:none}.ui-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
#ui-mobile-menu{inset:0 auto 0 0;margin:0;width:min(320px,88vw);height:100dvh;max-height:100dvh;padding:0;border:0;border-radius:0;background:#392144;color:#fff;box-shadow:12px 0 36px #21162933}
#ui-mobile-menu::backdrop{background:#21162966}
#ui-mobile-menu .ui-menu-close{display:flex;align-items:center;gap:8px;min-height:44px;margin:12px 16px 0 auto;padding:10px 12px;color:#fff;background:transparent}
#ui-mobile-menu .ui-menu-close:hover{background:#51365d}
#ui-mobile-menu .sidebar{position:static;width:100%;height:auto;min-height:calc(100% - 68px);padding:20px 16px max(20px,env(safe-area-inset-bottom));border:0;background:#392144;color:#fff;display:flex;flex-direction:column}
#ui-mobile-menu .brand{display:flex;margin-bottom:24px;padding:0 8px;font-size:16px}
#ui-mobile-menu nav{display:grid;grid-template-columns:1fr;gap:6px}
#ui-mobile-menu nav button{flex-direction:row;justify-content:flex-start;gap:12px;min-height:48px;padding:12px;border-radius:8px;font-size:16px;color:#eee5f0}
#ui-mobile-menu nav button:hover{background:#51365d}
#ui-mobile-menu nav button[aria-current=page]{background:#ffda3d;color:#392144}
#ui-mobile-menu nav svg{width:22px;height:22px}
#ui-mobile-menu .count{position:static;margin-left:auto;background:transparent;font-size:12px}
#ui-mobile-menu .side-bottom{display:block;margin-top:24px;padding-top:20px;border-top:1px solid #715c79}
#ui-mobile-menu .side-bottom button{color:#fff;padding:10px 0}
@media(max-width:800px){
 .workspace{margin-left:0!important;min-width:0}
 .ui-mobile-bar{display:flex;position:sticky;top:0;z-index:5;align-items:center;justify-content:space-between;gap:16px;padding:10px 16px;background:#fffdf8;border-bottom:1px solid #ddd4df}
 .ui-current-module{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .ui-menu-toggle{display:inline-flex;gap:8px;align-items:center;min-height:44px;flex-shrink:0}
 main{padding:24px 16px max(32px,env(safe-area-inset-bottom))!important;max-width:100%;min-width:0}
 .workspace>.store-return{margin:12px 16px}
 .page-heading{flex-wrap:wrap;gap:16px} .page-heading h1{font-size:28px}
 .page-heading p{max-width:none} .page-heading button{font-size:14px}
 .tools,.date-tools form{flex-wrap:wrap} .tools>*{min-width:0}
 .form-pair{grid-template-columns:1fr}
 #notasCredito .cr-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px}
 #notasCredito .cr-filters label:first-child{grid-column:1/-1;min-width:0}
 #notasCredito .cr-filters label{min-width:0} #notasCredito .cr-filters input,#notasCredito .cr-filters select{width:100%;min-width:0}
 #notasCredito .cr-table{min-width:620px} #notasCredito .cr-scroll{max-width:100%;overscroll-behavior-x:contain}
 #notasCredito .cr-scroll::before{content:'Desliza para ver todas las columnas';display:block;font-size:12px;color:#66586b;margin:0 0 8px}
 #notasCredito .cr-actions{gap:10px} #notasCredito .cr-actions button,#notasCredito .cr-actions a{flex:1 1 180px}
 #notasCredito [data-receipt]>button{width:100%;margin:8px 0 0}
 .extra-row{grid-template-columns:minmax(0,1fr) auto;gap:12px}.extra-row>div:first-child{grid-column:1/-1}
 .ui-table-scroll table{min-width:560px}
 #mobile-account{display:none!important}
}
@media(prefers-reduced-motion:no-preference){#ui-mobile-menu[open]{animation:ui-drawer-enter .18s ease-out}@keyframes ui-drawer-enter{from{transform:translateX(-24px);opacity:.5}to{transform:translateX(0);opacity:1}}}
#notasCredito .cr-report{margin-top:24px}#notasCredito .cr-report td{white-space:nowrap;font-variant-numeric:tabular-nums}#notasCredito .cr-report th{min-width:105px}#notasCredito [data-print-report]{margin-top:24px}
@media print{
 @page{size:A4 landscape;margin:10mm}
 body:has(.cr-report) .sidebar,body:has(.cr-report) .ui-mobile-bar,body:has(.cr-report) .store-return,body:has(.cr-report) #environment,body:has(.cr-report) .cr-navigation,body:has(.cr-report) [data-report-form],body:has(.cr-report) [data-print-report],body:has(.cr-report) .skip{display:none!important}
 body:has(.cr-report) .workspace{margin:0!important}body:has(.cr-report) main{padding:0!important;max-width:none}
 #notasCredito .cr-report .cr-scroll{overflow:visible}#notasCredito .cr-report table{width:100%;min-width:0;font-size:9px}#notasCredito .cr-report th,#notasCredito .cr-report td{min-width:0;padding:5px;white-space:normal}#notasCredito .cr-report thead{display:table-header-group}#notasCredito .cr-report tr{break-inside:avoid}#notasCredito .cr-scroll::before{display:none}
}

.cr-pos-report{display:none}
@media print{
 body.cr-print-pos{width:72mm!important;max-width:72mm!important;margin:0!important;background:white!important;color:black!important}
 body.cr-print-pos .cr-report,body.cr-print-pos [data-report-output]>button{display:none!important}
 body.cr-print-pos .cr-pos-report{display:block!important;font:11px/1.4 Arial,sans-serif!important;width:72mm!important}
 body.cr-print-pos .workspace,body.cr-print-pos #main,body.cr-print-pos #cartera,body.cr-print-pos #notasCredito{width:72mm!important;max-width:72mm!important;padding:0!important;margin:0!important}
 body.cr-print-pos .cr-pos-report section{border-bottom:1px dashed black;padding-bottom:3mm;margin-bottom:3mm}
 body.cr-print-pos .cr-pos-report article{border-top:1px dotted black;break-inside:avoid;padding-top:2mm}
 body.cr-print-pos .cr-pos-report h1{font-size:15px!important}body.cr-print-pos .cr-pos-report h2{font-size:13px!important}body.cr-print-pos .cr-pos-report h3{font-size:12px!important}
}
@media print{
 body:has(.cr-report) [data-report-output]>button,body:has(.cr-report) #cartera>.page-heading,body:has(.cr-report) #notasCredito>.page-heading{display:none!important}
 body.cr-print-pos [data-report-output]>hr{display:none!important}
}

[data-report-output]>button{margin:16px 8px 16px 0}
