/* Paleta logo: verde #00A050, negro estructural, blanco de lienzo */

.fi-logo {
    width: auto;
    max-width: 12rem;
    object-fit: contain;
}

.fi-simple-header .fi-logo {
    height: 4.25rem !important;
    max-width: 14rem;
}

html.fi:not(.dark):not(.lr-glass) .fi-sidebar {
    border-inline-end: 1px solid rgb(17 17 17 / 0.12);
}

html.fi:not(.dark):not(.lr-glass) .fi-topbar {
    border-bottom: 1px solid rgb(17 17 17 / 0.12);
}

html.dark:not(.lr-glass) .fi-modal-window {
    border: 2px solid #00a050 !important;
    box-shadow: 0 0 0 1px #00a050, 0 24px 48px rgb(0 0 0 / 0.45) !important;
    --tw-ring-color: #00a050;
    --tw-ring-shadow: 0 0 0 1px #00a050;
}

/* Spinner de widgets lazy (Filament solo deja un recuadro vacÃ­o) */
.fi-loading-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fi-loading-section::after {
    content: "";
    width: 2rem;
    height: 2rem;
    border: 3px solid #222222;
    border-top-color: #00a050;
    border-radius: 50%;
    animation: lr-spin 0.65s linear infinite;
}

html.fi:not(.dark) .fi-loading-section::after {
    border-color: #dddddd;
    border-top-color: #00a050;
}

.lr-chart-loading,
.lr-chart-wrap {
    position: relative;
}

.lr-chart-loading-title {
    padding: 1rem 1.25rem 0;
    font-weight: 600;
}

.lr-chart-spinner,
.lr-chart-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 220px;
    color: #00a050;
}

.lr-chart-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgb(10 10 10 / 0.55);
    border-radius: 0.75rem;
    display: none;
}

html.fi:not(.dark) .lr-chart-overlay {
    background: rgb(255 255 255 / 0.7);
}

@keyframes lr-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Date nativo: el Flatpickr de Filament no abre en este panel */
input[type="date"] {
    min-height: 2.5rem;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    display: block;
    cursor: pointer;
    width: 1.25rem;
    height: 1.25rem;
}

.lr-resultados-filtro {
    position: relative;
}

/* Consulta en curso: overlay + spinner (botones, filtros, tablas, modales) */
.lr-consultando {
    cursor: wait;
}

.fi-page.lr-consultando .fi-main,
.fi-modal.lr-consultando .fi-modal-content,
.lr-resultados-filtro.is-loading,
.lr-resultados-filtro.lr-consultando,
.lr-chart-wrap.lr-consultando {
    position: relative;
}

.fi-page.lr-consultando .fi-main::before,
.fi-modal.lr-consultando .fi-modal-content::before,
.lr-resultados-filtro.is-loading::before,
.lr-resultados-filtro.lr-consultando::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 40;
    pointer-events: all;
    border-radius: inherit;
    background: rgb(255 255 255 / 0.5);
}

html.dark .fi-page.lr-consultando .fi-main::before,
html.dark .fi-modal.lr-consultando .fi-modal-content::before,
html.dark .lr-resultados-filtro.is-loading::before,
html.dark .lr-resultados-filtro.lr-consultando::before {
    background: rgb(10 10 10 / 0.45);
}

.fi-page.lr-consultando .fi-main::after,
.fi-modal.lr-consultando .fi-modal-content::after,
.lr-resultados-filtro.is-loading::after,
.lr-resultados-filtro.lr-consultando::after {
    content: "";
    position: absolute;
    top: 40%;
    left: 50%;
    z-index: 41;
    width: 2.25rem;
    height: 2.25rem;
    margin: -1.125rem 0 0 -1.125rem;
    border: 3px solid #dddddd;
    border-top-color: #00a050;
    border-radius: 50%;
    animation: lr-spin 0.65s linear infinite;
}

html.dark .fi-page.lr-consultando .fi-main::after,
html.dark .fi-modal.lr-consultando .fi-modal-content::after,
html.dark .lr-resultados-filtro.is-loading::after,
html.dark .lr-resultados-filtro.lr-consultando::after {
    border-color: #333333;
    border-top-color: #00a050;
}

/* Formularios en modal: Filament parte en 2 columnas y las secciones quedan a la mitad */
.fi-modal-content .fi-sc-section {
    grid-column: 1 / -1;
}

.fi-modal-content .fi-section-content {
    gap: 0.85rem 1.15rem;
}

.fi-modal-footer-actions .fi-btn {
    min-height: 2.5rem;
}

/* Expandir / colapsar: Filament usa display:none; lo animamos */
.fi-section.fi-collapsible > .fi-section-content-ctn {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    overflow: hidden;
    transition: grid-template-rows 0.28s ease, opacity 0.22s ease;
}

.fi-section.fi-collapsible > .fi-section-content-ctn > * {
    min-height: 0;
}

.fi-section.fi-collapsible.fi-collapsed > .fi-section-content-ctn {
    display: grid !important;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}

.fi-section-collapse-btn,
.fi-section.fi-collapsible .fi-section-collapse-btn {
    transition: transform 0.25s ease;
}

.fi-section-header,
.fi-sc-section-header,
.fi-fo-section-header {
    background-color: #00a050 !important;
    color: #ffffff !important;
    border-radius: 0.5rem 0.5rem 0 0;
    padding-block: 0.7rem;
    padding-inline: 1rem;
}

.fi-section-header .fi-section-header-heading,
.fi-section-header .fi-section-header-description,
.fi-section-header .fi-icon,
.fi-section-header svg,
.fi-section-header .fi-icon-btn,
.fi-sc-section-header .fi-section-header-heading,
.fi-sc-section-header .fi-section-header-description,
.fi-sc-section-header .fi-icon,
.fi-sc-section-header svg,
.fi-sc-section-header .fi-icon-btn {
    color: #ffffff !important;
}

.fi-section-header .fi-section-collapse-btn,
.fi-sc-section-header .fi-section-collapse-btn {
    color: #ffffff !important;
}

html.dark .fi-section-header,
html.dark .fi-sc-section-header {
    background-color: #00a050 !important;
}

/* MenÃº de fila + checkbox fijos a la izquierda.
   Sticky crea un stacking context: el dropdown queda recortado por overflow-x
   del listado y tapado por el checkbox de las filas de abajo.
   Si el usuario no tiene editar/borrar, Filament no pinta el â®: el checkbox
   tiene que pegarse a left:0. Si no, el fondo blanco tapa el nombre (waleska â ska). */
.fi-ta-table .fi-ta-cell:has(.fi-ta-actions),
.fi-ta-table .fi-ta-header-cell:has(.fi-ta-actions),
.fi-ta-table .fi-ta-actions-header-cell {
    position: sticky;
    left: 0;
    z-index: 4;
    overflow: visible;
    background-color: #ffffff;
}

.fi-ta-table .fi-ta-selection-cell {
    position: sticky;
    left: 0;
    z-index: 4;
    background-color: #ffffff;
}

.fi-ta-table:has(tbody .fi-ta-actions :is(button, a, summary, .fi-dropdown-trigger, [role="button"])) .fi-ta-selection-cell {
    left: 2.75rem;
}

.fi-ta-table:not(:has(tbody .fi-ta-actions :is(button, a, summary, .fi-dropdown-trigger, [role="button"]))) .fi-ta-actions-header-cell,
.fi-ta-table:not(:has(tbody .fi-ta-actions :is(button, a, summary, .fi-dropdown-trigger, [role="button"]))) tbody .fi-ta-cell:has(.fi-ta-actions) {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.fi-ta-content:has(.fi-dropdown-panel[style*="display: block"]),
.fi-ta-ctn:has(.fi-dropdown-panel[style*="display: block"]) {
    overflow: visible !important;
}

.fi-ta-table .fi-ta-cell:has(.fi-ta-actions):has(.fi-dropdown-panel[style*="display: block"]) {
    z-index: 50;
}

.fi-ta-actions .fi-dropdown-panel {
    z-index: 80;
    min-width: 14rem;
    width: max-content;
    max-width: 18rem;
}

.fi-ta-actions .fi-dropdown-list-item-label,
.fi-ta-actions .fi-ac-btn-label {
    white-space: nowrap;
}

html.dark .fi-ta-table .fi-ta-cell:has(.fi-ta-actions),
html.dark .fi-ta-table .fi-ta-header-cell:has(.fi-ta-actions),
html.dark .fi-ta-table .fi-ta-selection-cell {
    background-color: #0a0a0a;
}

.fi-ta-table tr.fi-selected .fi-ta-cell:has(.fi-ta-actions),
.fi-ta-table tr.fi-selected .fi-ta-selection-cell {
    background-color: color-mix(in srgb, #00a050 12%, #ffffff);
}

html.dark .fi-ta-table tr.fi-selected .fi-ta-cell:has(.fi-ta-actions),
html.dark .fi-ta-table tr.fi-selected .fi-ta-selection-cell {
    background-color: color-mix(in srgb, #00a050 18%, #0a0a0a);
}

/* Traer cliente: overlay + spinner; inputs bloqueados */
.lr-seccion-cliente {
    position: relative;
}

.fi-page[aria-busy="true"] .lr-seccion-cliente {
    pointer-events: none;
}

.fi-page[aria-busy="true"] .lr-seccion-cliente::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: 0.5rem;
    background: rgb(255 255 255 / 0.55);
}

html.dark .fi-page[aria-busy="true"] .lr-seccion-cliente::after {
    background: rgb(10 10 10 / 0.45);
}

.fi-page[aria-busy="true"] .lr-seccion-cliente::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 6;
    width: 1.75rem;
    height: 1.75rem;
    margin: -0.875rem 0 0 -0.875rem;
    border: 3px solid #dddddd;
    border-top-color: #00a050;
    border-radius: 50%;
    animation: lr-spin 0.65s linear infinite;
}

html.dark .fi-page[aria-busy="true"] .lr-seccion-cliente::before {
    border-color: #333333;
    border-top-color: #00a050;
}

.lr-historial {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(70vh, 32rem);
    overflow: auto;
    padding-right: 0.25rem;
}

.lr-historial-item {
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    padding: 0;
    background: #fff;
    overflow: hidden;
}

html.dark .lr-historial-item {
    border-color: rgb(255 255 255 / 0.1);
    background: #141414;
}

.lr-historial-cabeza {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0.9rem;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lr-historial-titulo {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lr-historial-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.lr-historial-chevron {
    display: inline-block;
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.28s ease;
}

.lr-historial-chevron.is-open {
    transform: rotate(225deg);
}

.lr-historial-cuerpo {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.28s ease, opacity 0.22s ease;
}

.lr-historial-cuerpo.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.lr-historial-cuerpo-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 0.9rem 0.8rem;
}

.lr-historial-cabeza time,
.lr-historial-quien,
.lr-historial-detalle,
.lr-historial-vacio {
    color: #525252;
    font-size: 0.85rem;
}

html.dark .lr-historial-cabeza time,
html.dark .lr-historial-quien,
html.dark .lr-historial-detalle,
html.dark .lr-historial-vacio {
    color: #a3a3a3;
}

.lr-historial-quien {
    margin: 0;
}

.lr-historial-detalle strong,
.lr-historial-vals strong,
.fi-ta-text.fi-font-bold {
    font-weight: 700;
}

.lr-historial-cambios {
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.lr-historial-campo {
    display: block;
    font-weight: 600;
}

.lr-historial-flecha {
    color: #00a050;
    margin: 0 0.25rem;
}

.lr-historial-vacio {
    margin: 0;
}

/* Tarifario: 1/4 formulario + 3/4 tabla */
.lr-tarifario {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    min-height: min(68vh, 42rem);
    align-items: stretch;
}

@media (min-width: 900px) {
    .lr-tarifario {
        grid-template-columns: minmax(15rem, 1fr) 3fr;
    }
}

.lr-tarifario-titulo {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 650;
}

.lr-tarifario-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.lr-tarifario-tabla-ctn {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.lr-tarifario-tabla {
    flex: 1;
    overflow: auto;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: #fff;
}

html.dark .lr-tarifario-tabla {
    border-color: rgb(255 255 255 / 0.12);
    background: #141414;
}

.lr-tarifario-tabla table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.lr-tarifario-tabla th,
.lr-tarifario-tabla td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

html.dark .lr-tarifario-tabla th,
html.dark .lr-tarifario-tabla td {
    border-bottom-color: rgb(255 255 255 / 0.08);
}

.lr-tarifario-tabla th {
    position: sticky;
    top: 0;
    background: #fafafa;
    font-weight: 650;
    z-index: 1;
}

html.dark .lr-tarifario-tabla th {
    background: #1a1a1a;
}

.lr-tarifario-tabla tbody tr {
    cursor: pointer;
}

.lr-tarifario-tabla tbody tr:hover {
    background: color-mix(in srgb, #00a050 8%, transparent);
}

.lr-tarifario-tabla tr.lr-tarifario-sel {
    background: color-mix(in srgb, #00a050 14%, transparent);
}

.lr-tarifario-tabla tr.lr-tarifario-off td {
    opacity: 0.55;
}

.lr-tarifario-precio {
    font-variant-numeric: tabular-nums;
}

.lr-tarifario-td-acc {
    text-align: right;
}

.lr-tarifario-borrar {
    background: none;
    border: 0;
    color: #b91c1c;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.15rem 0.25rem;
}

html.dark .lr-tarifario-borrar {
    color: #fca5a5;
}

.lr-tarifario-vacio {
    margin: 0;
    padding: 1.25rem;
    color: #525252;
}

html.dark .lr-tarifario-vacio {
    color: #a3a3a3;
}

.fi-page-sub-navigation-item .fi-badge,
.fi-sidebar-item .fi-badge {
    min-width: 1.25rem;
    justify-content: center;
}

.fi-page-has-sub-navigation-top .fi-page-sub-navigation-tabs {
    position: sticky;
    top: 4.25rem;
    z-index: 20;
    padding: 0.4rem 0.5rem;
    background: #fff;
    border: 3px solid transparent;
    border-radius: 0.85rem;
    gap: 0.35rem;
}

html.dark .fi-page-has-sub-navigation-top .fi-page-sub-navigation-tabs {
    background: #0a0a0a;
}

.fi-page-has-sub-navigation-top .fi-page-sub-navigation-tabs.is-flotando {
    border-color: #00a050;
    box-shadow: 0 6px 18px rgb(0 160 80 / 0.28);
}

.fi-page-sub-navigation-tabs .fi-tabs-item,
.fi-tabs .fi-tabs-item {
    border-radius: 999px;
    padding: 0.48rem 0.95rem;
    box-shadow: none;
}

.fi-page-sub-navigation-tabs .fi-tabs-item.fi-active,
.fi-tabs .fi-tabs-item.fi-active {
    font-weight: 700;
    color: #00a050;
    background: color-mix(in srgb, #00a050 14%, #ffffff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #00a050 45%, transparent);
}

html.dark .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active,
html.dark .fi-tabs .fi-tabs-item.fi-active {
    background: color-mix(in srgb, #00a050 22%, #0a0a0a);
    color: #5ee9a0;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #00a050 55%, transparent);
}

.fi-ta-row.lr-cxc-pagado,
.lr-fin-grupo.lr-cxc-pagado > .lr-fin-grupo-celda {
    background: transparent;
    box-shadow: inset 3px 0 0 #00a050;
}

.fi-ta-row.lr-cxc-vencido,
.lr-fin-grupo.lr-cxc-vencido > .lr-fin-grupo-celda {
    background: transparent;
    box-shadow: inset 3px 0 0 #7c4dce;
}

.fi-ta-row.lr-cxc-por-vencer,
.lr-fin-grupo.lr-cxc-por-vencer > .lr-fin-grupo-celda {
    background: transparent;
    box-shadow: inset 3px 0 0 #e67e22;
}

.fi-ta-row.lr-cxc-pendiente,
.lr-fin-grupo.lr-cxc-pendiente > .lr-fin-grupo-celda {
    background: transparent;
    box-shadow: inset 3px 0 0 #94a3b8;
}

.lr-fin-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    vertical-align: middle;
    text-transform: none;
}

.lr-fin-badge-pagado {
    color: #008f2a;
    background: rgb(0 160 80 / 0.12);
}

.lr-fin-badge-vencido {
    color: #5b21b6;
    background: rgb(124 77 206 / 0.14);
}

.lr-fin-badge-por-vencer {
    color: #c05614;
    background: rgb(230 126 34 / 0.14);
}

.lr-fin-badge-pendiente {
    color: #525252;
    background: rgb(0 0 0 / 0.06);
}

.lr-fin-sub {
    display: block;
    margin-top: 0.12rem;
    font-weight: 500;
    font-size: 0.78rem;
    opacity: 0.72;
    text-transform: none;
    letter-spacing: 0;
}

.lr-fin-agrupado {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lr-fin-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.lr-fin-filtros label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #404040;
}

html.dark .lr-fin-filtros label {
    color: #d4d4d4;
}

.lr-fin-filtros input {
    min-height: 2.4rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: #fff;
    font-weight: 500;
}

html.dark .lr-fin-filtros input {
    background: #171717;
    border-color: #404040;
    color: #f5f5f5;
}

.lr-fin-filtros-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.lr-fin-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.9rem;
}

.lr-fin-kpis article {
    border: 1px solid #cdebd8;
    background: #f4fbf6;
    border-radius: 0.5rem;
    padding: 0.95rem 1.05rem;
}

html.dark .lr-fin-kpis article {
    background: #16351c;
    border-color: #1f5c32;
}

.lr-fin-kpis p {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
}

html.dark .lr-fin-kpis p {
    color: #a3a3a3;
}

.lr-fin-kpis strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.15rem;
}

.lr-fin-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.lr-fin-charts article {
    border: 1px solid #cdebd8;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
}

.lr-fin-chart-box {
    position: relative;
    height: 220px;
}

.lr-btn-spin {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgb(255 255 255 / 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lr-spin 0.65s linear infinite;
}

html.dark .lr-fin-charts article {
    background: #f4fbf6;
    border-color: #1f5c32;
    color: #111;
}

.lr-fin-charts h2 {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.lr-fin-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #fff;
    border: 0;
    border-radius: 0.4rem;
    padding: 0.32rem 0.45rem;
    cursor: pointer;
    line-height: 1;
}

.lr-fin-pdf-btn:hover {
    background: #b91c1c;
}

.lr-fin-pdf-btn.is-loading,
.lr-fin-pdf-btn:disabled {
    position: relative;
    color: transparent;
}

.lr-fin-pdf-btn.is-loading svg,
.lr-fin-pdf-btn:disabled svg,
.lr-fin-pdf-btn.is-loading > span,
.lr-fin-pdf-btn:disabled > span {
    visibility: hidden;
}

.lr-fin-pdf-btn.is-loading::after,
.lr-fin-pdf-btn:disabled::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid rgb(255 255 255 / 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lr-spin 0.65s linear infinite;
}

.lr-fin-cliente {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 1.2rem;
    border: 1px solid #cdebd8;
    padding: 0.85rem;
    margin: 0 0 1rem;
    border-radius: 0.5rem;
}

html.dark .lr-fin-cliente {
    border-color: #1f5c32;
}

.lr-fin-cliente h2 {
    grid-column: 1 / -1;
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: #00a050;
}

.lr-fin-cliente label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
}

html.dark .lr-fin-cliente label {
    color: #a3a3a3;
}

.lr-fin-cliente span {
    font-size: 0.9rem;
    font-weight: 600;
}

.lr-fin-cliente-wide {
    grid-column: 1 / -1;
}

.lr-fin-reporte {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.lr-fin-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.lr-fin-modal-fondo {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgb(0 0 0 / 0.45);
    cursor: pointer;
}

.lr-fin-modal-caja {
    position: relative;
    z-index: 1;
    width: min(68rem, 100%);
    max-height: min(90vh, 900px);
    overflow: auto;
    background: #fff;
    border-radius: 0.7rem;
    box-shadow: 0 16px 40px rgb(0 0 0 / 0.2);
}

html.dark .lr-fin-modal-caja {
    background: #171717;
}

.lr-fin-modal-cabeza {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: #00a050;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.lr-fin-modal-marca {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.lr-fin-modal-marca img {
    height: 40px;
    width: auto;
    background: #fff;
    border-radius: 0.35rem;
    padding: 0.15rem 0.3rem;
}

.lr-fin-modal-cabeza h2 {
    margin: 0;
    font-size: 1rem;
}

.lr-fin-modal-marca p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    opacity: 0.92;
}

.lr-fin-modal-acciones {
    display: flex;
    gap: 0.45rem;
    flex-shrink: 0;
}

.lr-fin-imprimir,
.lr-fin-modal-cerrar {
    display: inline-flex;
    align-items: center;
    background: rgb(255 255 255 / 0.18);
    color: #fff;
    border: 0;
    border-radius: 0.4rem;
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
}

.lr-fin-imprimir {
    background: #fff;
    color: #00a050;
}

.lr-fin-modal-cuerpo {
    padding: 1.1rem 1.2rem 1.35rem;
}

.lr-fin-reporte-tabla thead th {
    background: #f4fbf6;
    padding: 0.55rem 0.6rem;
}

.lr-fin-reporte-tabla td {
    padding: 0.45rem 0.6rem;
}

@media (max-width: 900px) {
    .lr-fin-charts {
        grid-template-columns: 1fr;
    }
}

.lr-fin-tabla-wrap {
    overflow-x: auto;
    border: 1px solid #e5e5e5;
    border-radius: 0.55rem;
}

html.dark .lr-fin-tabla-wrap {
    border-color: #333;
}

.lr-fin-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.lr-fin-tabla > thead th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    background: #f4fbf6;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #404040;
}

html.dark .lr-fin-tabla > thead th {
    background: #16351c;
    color: #d4d4d4;
}

.lr-fin-grupo-celda {
    padding: 0;
}

.lr-fin-grupo-fila {
    display: grid;
    grid-template-columns: 1.6rem minmax(10rem, 1.6fr) 8rem minmax(8rem, 1fr) 4rem 7rem 7.5rem 4.2rem;
    gap: 0.4rem;
    align-items: center;
    padding: 0.7rem 0.75rem;
    cursor: pointer;
}

.lr-fin-cabeza {
    cursor: default;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.lr-fin-grupo-fila:hover {
    background: #f4fbf6;
}

html.dark .lr-fin-grupo-fila:hover {
    background: #16351c;
}

.lr-fin-nombre {
    font-weight: 700;
}

.lr-fin-num {
    text-align: right;
    white-space: nowrap;
}

.lr-fin-total {
    font-weight: 700;
}

.lr-fin-chevron {
    display: inline-block;
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid #00a050;
    border-bottom: 2px solid #00a050;
    transform: rotate(-45deg);
    transition: transform 0.26s ease;
    justify-self: center;
}

.lr-fin-chevron.is-open {
    transform: rotate(45deg);
}

.lr-fin-detalle {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.26s ease, opacity 0.22s ease;
}

.lr-fin-detalle.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.lr-fin-detalle-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 0.75rem 0.85rem 2.2rem;
}

.lr-fin-detalle table {
    width: 100%;
    border-collapse: collapse;
    background: #fafafa;
    border-radius: 0.4rem;
}

html.dark .lr-fin-detalle table {
    background: #141414;
}

.lr-fin-detalle th,
.lr-fin-detalle td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #ececec;
    text-align: left;
}

html.dark .lr-fin-detalle th,
html.dark .lr-fin-detalle td {
    border-bottom-color: #2a2a2a;
}

.lr-fin-acciones {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
}

.lr-fin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 0;
    border-radius: 0.4rem;
    background: #e8f7ee;
    color: #00a050;
    cursor: pointer;
    line-height: 1;
}

.lr-fin-icon-btn:hover {
    background: #d4f0de;
}

.lr-fin-icon-btn-danger {
    background: #fdecec;
    color: #b42318;
}

.lr-fin-icon-btn-danger:hover {
    background: #f8d4d4;
}

html.dark .lr-fin-icon-btn {
    background: #16351c;
    color: #3ddc84;
}

html.dark .lr-fin-icon-btn-danger {
    background: #3a1515;
    color: #f0a0a0;
}

.lr-fin-vacio {
    margin: 0;
    padding: 1.5rem 0.25rem;
    color: #737373;
}

.lr-fin-col-chevron {
    width: 1.6rem;
}

@media (max-width: 900px) {
    .lr-fin-grupo-fila {
        grid-template-columns: 1.4rem 1fr;
        grid-auto-rows: min-content;
    }

    .lr-fin-grupo-fila > :nth-child(n+3) {
        grid-column: 2;
    }
}

.lr-ir-arriba {
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 40;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: #00a050;
    color: #fff;
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.22);
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.6rem);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.lr-ir-arriba.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.lr-ir-arriba:hover {
    background: #008f2a;
}

html.dark .lr-ir-arriba {
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.45);
}

/* Glasmorfismo: vidrio oscuro semitransparente + orbes detrÃ¡s. No pisa claro/oscuro. */
html.lr-glass,
html.lr-glass .fi-body,
html.lr-glass .fi-simple-layout {
    background: #070a12 !important;
    color: rgb(255 255 255 / 0.92);
    color-scheme: dark;
}

html.lr-glass .fi-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 46% 38% at 10% 16%, rgb(0 200 58 / 0.42) 0%, transparent 58%),
        radial-gradient(ellipse 40% 34% at 88% 8%, rgb(0 160 80 / 0.38) 0%, transparent 55%),
        radial-gradient(ellipse 42% 36% at 74% 90%, rgb(0 143 42 / 0.34) 0%, transparent 55%);
}

html.lr-glass .fi-main-ctn,
html.lr-glass .fi-main,
html.lr-glass .fi-page,
html.lr-glass .fi-page-content,
html.lr-glass .fi-simple-main,
html.lr-glass .fi-sidebar-nav,
html.lr-glass .fi-sidebar-header,
html.lr-glass .fi-sidebar-header-ctn {
    background: transparent !important;
    box-shadow: none !important;
}

html.lr-glass .fi-header-heading,
html.lr-glass .fi-header-subheading {
    color: #fff !important;
    text-shadow: 0 1px 16px rgb(0 0 0 / 0.35);
}

html.lr-glass .fi-breadcrumbs,
html.lr-glass .fi-breadcrumbs-item,
html.lr-glass .fi-breadcrumbs-item-label,
html.lr-glass .fi-breadcrumbs-item-separator {
    color: rgb(255 255 255 / 0.55) !important;
}

html.lr-glass .fi-sidebar,
html.lr-glass .fi-topbar,
html.lr-glass .fi-topbar-ctn {
    background: rgb(255 255 255 / 0.07) !important;
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

html.lr-glass .fi-sidebar {
    border-inline-end: 1px solid rgb(255 255 255 / 0.12) !important;
}

html.lr-glass .fi-topbar,
html.lr-glass .fi-topbar-ctn {
    border: 0 !important;
    border-bottom: 1px solid rgb(255 255 255 / 0.12) !important;
}

html.lr-glass .fi-sidebar-item-label,
html.lr-glass .fi-sidebar-item-btn,
html.lr-glass .fi-sidebar-item-btn > .fi-icon,
html.lr-glass .fi-sidebar-item-btn svg,
html.lr-glass .fi-sidebar-group-label,
html.lr-glass .fi-sidebar-group-btn,
html.lr-glass .fi-sidebar-group-btn .fi-icon,
html.lr-glass .fi-sidebar-group-btn svg,
html.lr-glass .fi-sidebar-footer,
html.lr-glass .fi-sidebar a,
html.lr-glass .fi-user-menu-trigger,
html.lr-glass .fi-user-menu-trigger svg {
    color: rgb(255 255 255 / 0.92) !important;
}

html.lr-glass .fi-sidebar-group-label {
    color: rgb(255 255 255 / 0.5) !important;
    letter-spacing: 0.04em;
}

html.lr-glass .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: rgb(0 160 80 / 0.22) !important;
}

html.lr-glass .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
html.lr-glass .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon,
html.lr-glass .fi-sidebar-item.fi-active > .fi-sidebar-item-btn svg {
    color: #8ff0b8 !important;
}

html.lr-glass .fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover,
html.lr-glass .fi-sidebar-item-btn:hover {
    background: rgb(255 255 255 / 0.08) !important;
}

html.lr-glass .fi-topbar .fi-icon,
html.lr-glass .fi-topbar svg,
html.lr-glass .fi-theme-switcher-btn,
html.lr-glass .fi-theme-switcher-btn svg {
    color: rgb(255 255 255 / 0.82) !important;
}

html.lr-glass .fi-dropdown-panel,
html.lr-glass .fi-user-menu .fi-dropdown-panel {
    background: rgb(10 16 24 / 0.82) !important;
    background-color: rgb(10 16 24 / 0.82) !important;
    backdrop-filter: blur(36px) saturate(1.8);
    -webkit-backdrop-filter: blur(36px) saturate(1.8);
    color: #e8fff0 !important;
}

html.lr-glass .fi-dropdown-list-item-label,
html.lr-glass .fi-dropdown-list-item,
html.lr-glass .fi-user-menu .fi-dropdown-list-item {
    color: #e8fff0 !important;
}

html.lr-glass .fi-dropdown-list-item:not(.fi-disabled):hover,
html.lr-glass .fi-dropdown-list-item:not(.fi-disabled):focus-visible,
html.lr-glass .fi-dropdown-list-item.fi-selected {
    background: rgb(0 160 80 / 0.28) !important;
    color: #e8fff0 !important;
}

html.lr-glass .fi-theme-switcher {
    background: rgb(255 255 255 / 0.04);
    border-radius: 0.75rem;
    padding: 0.15rem;
}

html.lr-glass .fi-theme-switcher-btn {
    background: transparent !important;
    color: rgb(232 255 240 / 0.7) !important;
}

html.lr-glass .fi-theme-switcher-btn.fi-active,
html.lr-glass .fi-theme-switcher-btn.fi-active svg {
    color: #fff !important;
    background: #00a050 !important;
}

html.lr-glass .fi-tabs-item.fi-active {
    background: rgb(0 160 80 / 0.3) !important;
    box-shadow: inset 0 0 0 1px rgb(94 233 160 / 0.45) !important;
}

html.lr-glass .fi-tabs-item.fi-active,
html.lr-glass .fi-tabs-item.fi-active .fi-tabs-item-label,
html.lr-glass .fi-tabs-item.fi-active > .fi-icon,
html.lr-glass .fi-tabs-item.fi-active svg {
    color: #c8f8dc !important;
}

html.lr-glass .fi-tabs-item {
    padding: 0.5rem 1rem;
    background: transparent !important;
}

html.lr-glass .fi-tabs-item:hover:not(.fi-active),
html.lr-glass .fi-tabs-item:hover:not(.fi-active) .fi-tabs-item-label,
html.lr-glass .fi-tabs-item:hover:not(.fi-active) > .fi-icon,
html.lr-glass .fi-tabs-item:hover:not(.fi-active) svg {
    background: rgb(0 160 80 / 0.2) !important;
    color: #c8f8dc !important;
}

html.lr-glass .fi-page-has-sub-navigation-top .fi-page-sub-navigation-tabs,
html.lr-glass .fi-tabs:not(.fi-contained) {
    padding: 0.45rem 0.55rem;
    gap: 0.4rem;
    background: rgb(255 255 255 / 0.04) !important;
    backdrop-filter: blur(32px) saturate(1.9);
    -webkit-backdrop-filter: blur(32px) saturate(1.9);
    border: 1px solid rgb(255 255 255 / 0.14) !important;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16) !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

html.lr-glass .lr-fin-agrupado {
    padding: 1.4rem 1.5rem;
    gap: 1.4rem;
}

html.lr-glass .lr-fin-filtros {
    gap: 1rem 1.2rem;
}

html.lr-glass .lr-fin-kpis,
html.lr-glass .lr-fin-charts,
html.lr-glass .fi-wi-stats-overview {
    gap: 1rem;
}

html.lr-glass .fi-section-content,
html.lr-glass .fi-sc-section-content {
    padding: 1.2rem 1.35rem 1.4rem;
    gap: 1.05rem 1.2rem;
}

html.lr-glass .fi-ta-ctn {
    padding: 0.9rem 1rem 1.1rem;
}

html.lr-glass .fi-wi-stats-overview-stat {
    padding: 1.1rem 1.2rem !important;
}

html.lr-glass .fi-modal-content {
    padding: 1.15rem 1.3rem 1.35rem;
}

html.lr-glass .fi-modal-close-overlay {
    background: rgb(0 0 0 / 0.28) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.lr-glass .fi-modal > .fi-modal-window-ctn > .fi-modal-window,
html.lr-glass .lr-filtros-sidebar {
    background: rgb(10 16 24 / 0.92) !important;
    background-color: rgb(10 16 24 / 0.92) !important;
    color: #e8fff0 !important;
}

html.lr-glass .fi-modal-slide-over .fi-modal-header,
html.lr-glass .fi-modal-slide-over .fi-modal-content,
html.lr-glass .fi-modal-slide-over .fi-modal-footer,
html.lr-glass .fi-ta-filters,
html.lr-glass .fi-ta-filters-header {
    background: rgb(10 16 24 / 0.92) !important;
    color: #e8fff0 !important;
}

html.lr-glass .fi-ta-filters-heading,
html.lr-glass .fi-ta-filters-header .fi-ta-filters-heading {
    color: #e8fff0 !important;
}

html.lr-glass .fi-modal-footer,
html.lr-glass .fi-modal-has-sticky-footer .fi-modal-window > .fi-modal-footer,
html.lr-glass .fi-modal-header,
html.lr-glass .fi-modal-has-sticky-header .fi-modal-window > .fi-modal-header {
    background: rgb(10 16 24 / 0.92) !important;
    border-color: rgb(255 255 255 / 0.12) !important;
}

html.lr-glass .fi-modal-heading,
html.lr-glass .fi-modal-close-btn,
html.lr-glass .fi-modal-close-btn svg {
    color: #e8fff0 !important;
}

html.lr-glass .fi-modal-footer .fi-btn:not(.fi-btn-color-primary):not(.fi-color-primary) {
    background: rgb(255 255 255 / 0.08) !important;
    color: #e8fff0 !important;
    border: 1px solid rgb(255 255 255 / 0.16);
}

html.lr-glass .fi-section,
html.lr-glass .fi-wi-stats-overview-stat,
html.lr-glass .fi-simple-card,
html.lr-glass .fi-dropdown-panel,
html.lr-glass .lr-fin-agrupado {
    background: rgb(255 255 255 / 0.05) !important;
    backdrop-filter: blur(28px) saturate(1.85);
    -webkit-backdrop-filter: blur(28px) saturate(1.85);
    border: 1px solid rgb(255 255 255 / 0.14) !important;
    box-shadow:
        0 10px 36px rgb(0 0 0 / 0.18),
        inset 0 1px 0 rgb(255 255 255 / 0.12);
    color: rgb(255 255 255 / 0.92);
}

/* Sin backdrop-filter: si no, el slide-over de Filtros queda preso en la tabla. */
html.lr-glass .fi-ta-ctn {
    background: rgb(255 255 255 / 0.05) !important;
    border: 1px solid rgb(255 255 255 / 0.14) !important;
    box-shadow:
        0 10px 36px rgb(0 0 0 / 0.18),
        inset 0 1px 0 rgb(255 255 255 / 0.12);
    color: rgb(255 255 255 / 0.92);
}

html.lr-glass .fi-dropdown-panel,
html.lr-glass .fi-ta-filters-dropdown,
html.lr-glass .fi-ta-col-manager-dropdown,
html.lr-glass .fi-ta-filters-after-content-ctn,
html.lr-glass .fi-ta-filters-before-content-ctn {
    background: rgb(10 16 24 / 0.82) !important;
    background-color: rgb(10 16 24 / 0.82) !important;
    color: #e8fff0 !important;
}

html.lr-glass .fi-ta-col-manager,
html.lr-glass .fi-ta-col-manager-heading,
html.lr-glass .fi-ta-col-manager-label,
html.lr-glass .fi-ta-col-manager-item,
html.lr-glass .fi-ta-col-manager-header {
    color: #e8fff0 !important;
    background: transparent !important;
}

html.lr-glass .fi-ta-col-manager-item:hover,
html.lr-glass .fi-ta-col-manager-item:hover .fi-ta-col-manager-label {
    background: rgb(0 160 80 / 0.22) !important;
    color: #e8fff0 !important;
}

/* Ventanas flotantes: borde verde un poco mÃ¡s grueso. */
html.lr-glass .fi-modal-window,
html.lr-glass .fi-dropdown-panel,
html.lr-glass .fi-ta-filters-dropdown,
html.lr-glass .fi-ta-col-manager-dropdown,
html.lr-glass .fi-fo-date-time-picker-panel {
    border: 2px solid #00a050 !important;
    box-shadow: 0 0 0 1px #00a050 !important;
    --tw-ring-color: #00a050;
    --tw-ring-shadow: 0 0 0 1px #00a050;
}

html.lr-glass .fi-section,
html.lr-glass .fi-ta-ctn,
html.lr-glass .fi-wi-stats-overview-stat,
html.lr-glass .fi-simple-card,
html.lr-glass .lr-fin-agrupado,
html.lr-glass .fi-modal:not(.fi-modal-slide-over) .fi-modal-window {
    border-radius: 1.25rem !important;
}

html.lr-glass .lr-fin-agrupado,
html.lr-glass .lr-fin-agrupado label,
html.lr-glass .lr-fin-kpis,
html.lr-glass .lr-fin-kpis p,
html.lr-glass .lr-fin-kpis strong,
html.lr-glass .lr-fin-tabla,
html.lr-glass .lr-fin-vacio,
html.lr-glass .fi-ta-ctn,
html.lr-glass .fi-ta-text,
html.lr-glass .fi-wi-stats-overview-stat-label,
html.lr-glass .fi-wi-stats-overview-stat-value {
    color: rgb(255 255 255 / 0.9) !important;
}

html.lr-glass .lr-fin-kpis article,
html.lr-glass .lr-fin-charts article {
    background: rgb(255 255 255 / 0.07);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 1.1rem;
    padding: 1.05rem 1.2rem;
}

html.lr-glass .lr-fin-tabla-wrap,
html.lr-glass .lr-fin-detalle table,
html.lr-glass .lr-fin-tabla > thead th {
    background: rgb(255 255 255 / 0.05) !important;
    border-color: rgb(255 255 255 / 0.1) !important;
    color: rgb(255 255 255 / 0.72) !important;
}

html.lr-glass .lr-fin-grupo-fila:hover {
    background: rgb(255 255 255 / 0.06);
}

html.lr-glass .fi-fo-field-label,
html.lr-glass .fi-fo-field-label-content,
html.lr-glass .fi-fo-field-label-ctn,
html.lr-glass .fi-sc-field-label,
html.lr-glass .fi-fieldset-legend,
html.lr-glass .fi-wi-widget-heading,
html.lr-glass .fi-simple-page label,
html.lr-glass .fi-simple-main .fi-fo-field-label-content,
html.lr-glass .lr-fin-filtros label {
    color: #e8fff0 !important;
}

html.lr-glass .fi-input-wrp,
html.lr-glass .fi-select-wrp,
html.lr-glass .fi-textarea-wrp,
html.lr-glass .fi-fo-date-time-picker,
html.lr-glass .lr-fin-filtros input,
html.lr-glass .fi-input,
html.lr-glass .fi-select-input,
html.lr-glass .fi-fo-text-input input,
html.lr-glass input:not([type="checkbox"]):not([type="radio"]),
html.lr-glass select,
html.lr-glass textarea {
    background: rgb(0 160 80 / 0.1) !important;
    border: 1px solid rgb(0 160 80 / 0.32) !important;
    color: #f4fff8 !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

html.lr-glass .lr-fin-filtros input::placeholder,
html.lr-glass input::placeholder,
html.lr-glass textarea::placeholder {
    color: rgb(232 255 240 / 0.45);
}

html.lr-glass input[type="date"],
html.lr-glass input[type="datetime-local"],
html.lr-glass input[type="time"],
html.lr-glass .fi-fo-date-time-picker-display-text-input {
    color-scheme: dark !important;
    background: transparent !important;
    color: #f4fff8 !important;
    -webkit-text-fill-color: #f4fff8;
}

html.lr-glass input[type="date"]::-webkit-calendar-picker-indicator,
html.lr-glass input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
    opacity: 0.75;
    cursor: pointer;
}

html.lr-glass .fi-fo-date-time-picker-panel {
    background: rgb(10 16 24 / 0.88) !important;
    color: #e8fff0 !important;
}

html.lr-glass .fi-fo-date-time-picker-calendar-day,
html.lr-glass .fi-fo-date-time-picker-month-select,
html.lr-glass .fi-fo-date-time-picker-year-input,
html.lr-glass .fi-fo-date-time-picker-display-text-input {
    color: #e8fff0 !important;
}

html.lr-glass .fi-fo-date-time-picker-month-select,
html.lr-glass .fi-fo-date-time-picker-year-input {
    color-scheme: dark !important;
    background: transparent !important;
}

html.lr-glass .fi-fo-date-time-picker-calendar-day:hover,
html.lr-glass .fi-fo-date-time-picker-calendar-day.fi-focused {
    background: rgb(0 160 80 / 0.32) !important;
    color: #e8fff0 !important;
}

html.lr-glass .fi-fo-date-time-picker-calendar-day.fi-selected {
    background: rgb(0 160 80 / 0.5) !important;
    color: #fff !important;
}

/* Tablas glass: primero se apaga el blanco/gray-50 de Filament (si no, el verde encima es mint). */
html.lr-glass .fi-ta-table,
html.lr-glass .fi-ta-row,
html.lr-glass .fi-ta-row.fi-striped,
html.lr-glass .fi-ta-row.fi-selected,
html.lr-glass .fi-ta-row.fi-clickable,
html.lr-glass .fi-ta-cell,
html.lr-glass .fi-ta-header-cell,
html.lr-glass .fi-ta-content-header,
html.lr-glass .fi-ta-record,
html.lr-glass .fi-ta-table > thead,
html.lr-glass .fi-ta-table > thead > tr,
html.lr-glass .fi-ta-table > tfoot,
html.lr-glass .fi-ta-selection-indicator,
html.lr-glass .fi-ta-filter-indicators,
html.lr-glass .fi-ta-reorder-indicator,
html.lr-glass .fi-ta-table tr.fi-selected .fi-ta-cell:has(.fi-ta-actions),
html.lr-glass .fi-ta-table tr.fi-selected .fi-ta-selection-cell {
    background: transparent !important;
    background-color: transparent !important;
}

html.lr-glass .fi-ta-cell,
html.lr-glass .fi-ta-text {
    color: rgb(244 255 248 / 0.92) !important;
}

html.lr-glass .fi-ta-table > thead > tr,
html.lr-glass .fi-ta-header-cell,
html.lr-glass .fi-ta-table thead th,
html.lr-glass .fi-ta-table thead .fi-ta-selection-cell,
html.lr-glass .fi-ta-content-header,
html.lr-glass .fi-ta-selection-indicator,
html.lr-glass .fi-ta-filter-indicators {
    background: rgb(255 255 255 / 0.05) !important;
    backdrop-filter: blur(22px) saturate(1.7);
    -webkit-backdrop-filter: blur(22px) saturate(1.7);
    color: #e8fff0 !important;
    border-bottom-color: rgb(255 255 255 / 0.1) !important;
}

html.lr-glass .fi-ta-row:hover > .fi-ta-cell,
html.lr-glass .fi-ta-table tbody tr:hover > .fi-ta-cell,
html.lr-glass .fi-ta-table tbody tr:hover > td,
html.lr-glass .fi-ta-row:hover .fi-ta-cell:has(.fi-ta-actions),
html.lr-glass .fi-ta-row:hover .fi-ta-selection-cell {
    background: rgb(255 255 255 / 0.07) !important;
    backdrop-filter: blur(30px) saturate(1.9);
    -webkit-backdrop-filter: blur(30px) saturate(1.9);
    color: #f4fff8 !important;
}

html.lr-glass .fi-ta-row:hover .fi-ta-text,
html.lr-glass .fi-ta-row:hover .fi-ta-cell a,
html.lr-glass .fi-ta-table tbody tr:hover .fi-ta-text {
    color: #f4fff8 !important;
}

html.lr-glass .fi-ta-row.fi-selected > .fi-ta-cell,
html.lr-glass .fi-ta-table tr.fi-selected > .fi-ta-cell,
html.lr-glass .fi-ta-table tr.fi-selected > td,
html.lr-glass .fi-ta-table tr.fi-selected .fi-ta-cell:has(.fi-ta-actions),
html.lr-glass .fi-ta-table tr.fi-selected .fi-ta-selection-cell {
    background: rgb(255 255 255 / 0.1) !important;
    backdrop-filter: blur(38px) saturate(2);
    -webkit-backdrop-filter: blur(38px) saturate(2);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16);
    color: #f4fff8 !important;
}

html.lr-glass .fi-ta-row.fi-selected .fi-ta-text,
html.lr-glass .fi-ta-table tr.fi-selected .fi-ta-text,
html.lr-glass .fi-ta-table tr.fi-selected a {
    color: #f4fff8 !important;
}

html.lr-glass .lr-fin-grupo.lr-cxc-pagado > .lr-fin-grupo-celda,
html.lr-glass .lr-fin-grupo.lr-cxc-vencido > .lr-fin-grupo-celda,
html.lr-glass .lr-fin-grupo.lr-cxc-por-vencer > .lr-fin-grupo-celda,
html.lr-glass .lr-fin-grupo.lr-cxc-pendiente > .lr-fin-grupo-celda,
html.lr-glass .fi-ta-row.lr-cxc-pagado,
html.lr-glass .fi-ta-row.lr-cxc-vencido,
html.lr-glass .fi-ta-row.lr-cxc-por-vencer,
html.lr-glass .fi-ta-row.lr-cxc-pendiente {
    background: transparent !important;
}

html.lr-glass .lr-fin-badge-pagado {
    color: #5ee9a0;
    background: rgb(0 160 80 / 0.22);
}

html.lr-glass .lr-fin-badge-vencido {
    color: #ddd6fe;
    background: rgb(124 77 206 / 0.28);
}

html.lr-glass .lr-fin-badge-por-vencer {
    color: #fdba74;
    background: rgb(230 126 34 / 0.25);
}

html.lr-glass .lr-fin-badge-pendiente {
    color: rgb(255 255 255 / 0.72);
    background: rgb(255 255 255 / 0.08);
}

html.lr-glass .lr-fin-grupo-fila:hover,
html.lr-glass .lr-fin-grupo-fila:hover .lr-fin-nombre,
html.lr-glass .lr-fin-grupo-fila:hover .lr-fin-num {
    background: rgb(255 255 255 / 0.07);
    backdrop-filter: blur(30px) saturate(1.9);
    -webkit-backdrop-filter: blur(30px) saturate(1.9);
    color: #f4fff8 !important;
}

html.lr-glass .fi-wi-chart,
html.lr-glass .fi-wi-widget,
html.lr-glass .lr-chart-wrap {
    color: #e8fff0;
}

.fi-btn.fi-btn-color-primary,
.fi-btn.fi-color-primary,
.lr-fin-filtros button[type="submit"] {
    background-color: #00a050 !important;
    color: #fff !important;
}

html.lr-glass .fi-tabs-item:not(.fi-active),
html.lr-glass .fi-tabs-item:not(.fi-active) .fi-tabs-item-label,
html.lr-glass .fi-tabs-item:not(.fi-active) > .fi-icon {
    color: rgb(255 255 255 / 0.62) !important;
}

.lr-estilo-velo {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    background: rgb(8 18 14 / 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    opacity: 0;
    transition: opacity 0.32s ease, backdrop-filter 0.32s ease, background 0.32s ease;
}

.lr-estilo-velo.is-on {
    opacity: 1;
    background: rgb(8 18 14 / 0.28);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.lr-estilo-velo.is-off {
    opacity: 0;
    background: rgb(8 18 14 / 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
}

.lr-creado-por {
    margin: 0;
    color: rgb(17 17 17 / 0.55);
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
}

.lr-creado-por-card {
    margin-top: 1.25rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgb(17 17 17 / 0.1);
}

.lr-footer-sistema {
    padding: 0.85rem 1rem 1.25rem;
}

.fi-simple-layout .lr-footer-sistema {
    display: none;
}

html.dark .lr-creado-por,
html.lr-glass .lr-creado-por {
    color: rgb(232 255 240 / 0.55);
}

html.dark .lr-creado-por-card,
html.lr-glass .lr-creado-por-card {
    border-top-color: rgb(255 255 255 / 0.14);
}

/* Acciones y filtros: una sola fila (mobile y escritorio) */
.fi-header-actions-ctn,
.fi-header-actions,
.fi-ta-header-toolbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    max-width: 100%;
}

/* .fi-ta-actions tambiÃ©n es el â® de cada fila. overflow:auto ahÃ­ pinta
   el scrollbar clÃ¡sico de Windows (â²â¼) al lado del menÃº. */
.fi-ta-table .fi-ta-actions,
.fi-ta-cell .fi-ta-actions {
    overflow: visible !important;
}

.fi-header-actions-ctn .fi-btn,
.fi-header-actions .fi-btn,
.fi-ta-header-toolbar .fi-btn,
.fi-ta-actions .fi-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.lr-filtros-sidebar .fi-modal-footer-actions,
.fi-modal-slide-over .fi-modal-footer-actions,
.fi-ta-filters-footer {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
}

.lr-filtros-sidebar .fi-modal-footer-actions .fi-btn,
.fi-modal-slide-over .fi-modal-footer-actions .fi-btn {
    flex: 1 1 auto;
    white-space: nowrap;
}

.lr-ayuda-lead { margin: 0 0 1rem; font-size: 0.92rem; }
.lr-ayuda h2 { margin: 1.25rem 0 0.5rem; font-size: 1.05rem; color: #00a050; }
.lr-ayuda-h3 { margin: 0.85rem 0 0.35rem; font-size: 0.95rem; font-weight: 650; }

.lr-permisos-rol { display: flex; flex-direction: column; gap: 1.15rem; }
.lr-permisos-rol-bloque {
    border: 1px solid #cdebd8;
    border-radius: 0.65rem;
    padding: 0.9rem 1rem 1.05rem;
    background: #f7fcf9;
}
.lr-permisos-rol-cabeza {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #cdebd8;
}
.lr-permisos-rol-cabeza h3 { margin: 0; font-size: 1.05rem; color: #00a050; }
.lr-permisos-rol-cabeza span { font-size: 0.8rem; color: #666; }
.lr-permisos-rol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 0.75rem;
}
.lr-permisos-rol-modulo {
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
}
.lr-permisos-rol-modulo h4 {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: #111;
}
.lr-permisos-rol-modulo ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.lr-permisos-rol-modulo li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3rem 0;
    border-top: 1px solid #f0f0f0;
}
.lr-permisos-rol-modulo li:first-child { border-top: 0; padding-top: 0; }
.lr-permisos-rol-accion { font-size: 0.8rem; font-weight: 600; color: #00a050; }
.lr-permisos-rol-modulo code {
    font-size: 0.72rem;
    color: #555;
    word-break: break-all;
}
.lr-permisos-rol-vacio { margin: 0; font-size: 0.9rem; color: #666; }
.lr-permisos-rol-nota {
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.45rem;
    background: rgb(0 160 80 / 0.08);
    border: 1px solid #cdebd8;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
}
.lr-permisos-rol-form { margin-top: 0.25rem; }

html.dark .lr-permisos-rol-bloque,
html.lr-glass .lr-permisos-rol-bloque {
    background: rgb(255 255 255 / 0.04);
    border-color: rgb(255 255 255 / 0.14);
}
html.dark .lr-permisos-rol-cabeza,
html.lr-glass .lr-permisos-rol-cabeza { border-bottom-color: rgb(255 255 255 / 0.14); }
html.dark .lr-permisos-rol-cabeza span,
html.lr-glass .lr-permisos-rol-cabeza span,
html.dark .lr-permisos-rol-nota,
html.lr-glass .lr-permisos-rol-nota {
    background: rgb(0 160 80 / 0.12);
    border-color: rgb(255 255 255 / 0.14);
    color: #e8fff0;
}
html.dark .lr-permisos-rol-modulo,
html.lr-glass .lr-permisos-rol-modulo {
    background: rgb(255 255 255 / 0.05);
    border-color: rgb(255 255 255 / 0.12);
}
html.dark .lr-permisos-rol-modulo h4,
html.lr-glass .lr-permisos-rol-modulo h4 { color: #e8fff0; }
html.dark .lr-permisos-rol-modulo li,
html.lr-glass .lr-permisos-rol-modulo li { border-top-color: rgb(255 255 255 / 0.08); }
html.dark .lr-permisos-rol-modulo code,
html.lr-glass .lr-permisos-rol-modulo code { color: rgb(232 255 240 / 0.75); }

.fi-ta-cell:has(.fi-badge) .fi-badge { cursor: pointer; }
.lr-ayuda-lista { margin: 0 0 1rem; padding-left: 1.15rem; font-size: 0.9rem; }
.lr-ayuda-tabla-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.lr-ayuda-tabla { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.lr-ayuda-tabla th, .lr-ayuda-tabla td { text-align: left; padding: 0.4rem 0.45rem; border-bottom: 1px solid #e5e5e5; white-space: nowrap; }
.lr-ayuda-tabla thead th { background: #00a050; color: #fff; font-weight: 600; }
.lr-ayuda-tabla tbody th { font-weight: 600; }
.lr-ayuda-nivel-total, .lr-ayuda-nivel-ejecutar { color: #00a050; font-weight: 600; }
.lr-ayuda-nivel-modificar { color: #2563eb; }
.lr-ayuda-nivel-ver { color: #555; }
.lr-ayuda-nivel-no { color: #bbb; }
.lr-ayuda-indice { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.1rem; }
.lr-ayuda-indice-btn {
    border: 1px solid #cdebd8;
    background: #fff;
    color: #111;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.lr-ayuda-indice-btn.is-activo { background: #00a050; border-color: #00a050; color: #fff; }
.lr-ayuda-prosa { font-size: 0.92rem; line-height: 1.5; }
.lr-ayuda-prosa h1, .lr-ayuda-prosa h2 { color: #00a050; }
.lr-ayuda-prosa table { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1rem; font-size: 0.85rem; }
.lr-ayuda-prosa th, .lr-ayuda-prosa td { text-align: left; padding: 0.35rem 0.45rem; border-bottom: 1px solid #e5e5e5; }

html.dark .lr-ayuda-tabla th, html.dark .lr-ayuda-tabla td,
html.lr-glass .lr-ayuda-tabla th, html.lr-glass .lr-ayuda-tabla td { border-color: rgb(255 255 255 / 0.12); }
html.dark .lr-ayuda-indice-btn, html.lr-glass .lr-ayuda-indice-btn {
    background: transparent;
    border-color: rgb(255 255 255 / 0.22);
    color: #e8fff0;
}
html.dark .lr-ayuda-indice-btn.is-activo, html.lr-glass .lr-ayuda-indice-btn.is-activo {
    background: #00a050;
    border-color: #00a050;
    color: #fff;
}

@media print {
    html.lr-glass,
    html.lr-glass .fi-body,
    html.lr-glass .fi-main,
    html.lr-glass .lr-fin-modal-caja {
        background: #fff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        color: #111 !important;
    }

    html.lr-glass .fi-body::before,
    .lr-estilo-velo {
        display: none;
    }
}

/* Campana de notificaciones (topbar, izquierda del menú usuario) */
.lr-campana {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-inline-end: 0.35rem;
}

.lr-campana-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.lr-campana-btn:hover {
    background: rgb(0 160 80 / 0.12);
}

.lr-campana-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.lr-campana-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.05rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: #00a050;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.lr-campana-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    left: auto;
    z-index: 80;
    width: min(22rem, calc(100vw - 1.5rem));
    max-height: min(28rem, 70vh);
    display: flex;
    flex-direction: column;
    border-radius: 0.85rem;
    border: 1px solid rgb(0 0 0 / 0.08);
    background: #fff;
    box-shadow: 0 12px 40px rgb(0 0 0 / 0.14);
    overflow: hidden;
}

/* Móvil: fixed bajo el topbar (el absolute se corta por overflow del topbar) */
@media (max-width: 768px) {
    .lr-campana-panel {
        position: fixed;
        top: 3.75rem;
        right: 0.75rem;
        left: auto;
        width: min(22rem, calc(100vw - 1.5rem));
        max-width: calc(100vw - 1.5rem);
        max-height: min(70vh, calc(100dvh - 4.5rem));
        z-index: 90;
    }
}

.lr-campana-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgb(0 0 0 / 0.06);
    flex-shrink: 0;
}

.lr-campana-link {
    border: 0;
    background: transparent;
    color: #00a050;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.lr-campana-lista {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.lr-campana-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid rgb(0 0 0 / 0.05);
    background: transparent;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.lr-campana-item:hover {
    background: rgb(0 160 80 / 0.06);
}

.lr-campana-item.is-nueva {
    background: rgb(0 160 80 / 0.08);
}

.lr-campana-item-titulo {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111;
    word-break: break-word;
}

.lr-campana-item-cuerpo {
    font-size: 0.8rem;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.lr-campana-item-meta {
    font-size: 0.72rem;
    color: #888;
}

.lr-campana-vacia {
    margin: 0;
    padding: 1.25rem 1rem;
    color: #888;
    font-size: 0.875rem;
}

.lr-notif-lectores {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.lr-notif-lector {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgb(0 0 0 / 0.06);
}

.lr-notif-lector-nombre {
    font-weight: 600;
}

.lr-notif-lector-cuando {
    color: #777;
    font-size: 0.8rem;
}

html.dark .lr-campana-panel,
html.lr-glass .lr-campana-panel {
    background: rgb(10 16 24 / 0.92);
    border-color: rgb(255 255 255 / 0.12);
    color: #e8fff0;
    backdrop-filter: blur(28px);
}

html.dark .lr-campana-header,
html.lr-glass .lr-campana-header {
    border-bottom-color: rgb(255 255 255 / 0.1);
}

html.dark .lr-campana-item,
html.lr-glass .lr-campana-item {
    border-bottom-color: rgb(255 255 255 / 0.08);
}

html.dark .lr-campana-item-titulo,
html.lr-glass .lr-campana-item-titulo {
    color: #e8fff0;
}

html.dark .lr-campana-item-cuerpo,
html.lr-glass .lr-campana-item-cuerpo {
    color: rgb(232 255 240 / 0.75);
}

html.dark .lr-campana-item.is-nueva,
html.lr-glass .lr-campana-item.is-nueva {
    background: rgb(0 160 80 / 0.18);
}

html.lr-glass .lr-campana-btn:hover {
    background: rgb(255 255 255 / 0.1);
}
