/* ======================================================
   n8n-LIKE UI – CORE / HOME
   Sidebar profesional tipo n8n
====================================================== */

/* =========================
   VARIABLES
========================= */
html {
    font-size: 13px;
    --mat-table-background-color: white;
    --mat-table-header-headline-color: rgba(0, 0, 0, .87);
    --mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);
    --mat-table-row-item-outline-color: rgba(0, 0, 0, .12);
}

:root {
    --bg-app: #F4F6F9;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --primary: #1E5F8C;
    --primary-hover: #164A6B;
    --primary-list: #009FA8;
    --primary-list-hover: #009FA8;
    --secondary: #4B5563;
    --secondary-hover: #374151;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --success: #15803D;
    --warning: #B45309;
    --danger: #B91C1C;
    --info: #0369A1;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .08);
    --focus-ring: #93C5FD;
    --table-header-bg: #F1F3F7;
    --table-row-bg: #FFFFFF;
    --table-row-alt-bg: #F8FAFD;
    --table-row-hover-bg: #EEF4FF;
    --table-border: #E8ECF2;
    --table-text: #1F2937;
    --table-link: #0B63B6;
    --status-success-bg: #D9F5DF;
    --status-success-text: #216B3A;
    --status-success-border: #BDE8C7;
    --status-warning-bg: #FFE6BF;
    --status-warning-text: #87500F;
    --status-warning-border: #F6D49F;
    --status-danger-bg: #FCDCDD;
    --status-danger-text: #9A2935;
    --status-danger-border: #F3BEC2;
    --status-info-bg: #D8EEFC;
    --status-info-text: #245E87;
    --status-info-border: #B9DCF2;
    --status-neutral-bg: #E9ECEF;
    --status-neutral-text: #424A55;
    --status-neutral-border: #DCE0E4;
    --status-primary-bg: #E1E8FF;
    --status-primary-text: #344F9A;
    --status-primary-border: #C8D3F8;
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

body {
    margin: 0;
    background-color: #f4f6f9 !important;
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif !important;
    font-optical-sizing: auto !important;
    font-style: normal !important;
    background-color: var(--bg-app) !important;
    color: var(--text-main) !important;
}

body,
button,
input,
select,
textarea,
.table,
.modal,
.dropdown-menu,
.nav-link,
.form-control,
.form-select {
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif !important;
}


select,
textarea,
button {
    /*font-size: 13px;*/
    min-height: 30px;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-menu {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: width 0.28s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.main-menu ul {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.main-menu li {
    margin: 0.25rem 0.5rem;
}

.main-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main) !important;
    font-size: 0.875rem;
    width: 100%;
    background-color: transparent;
    transition: background-color .18s ease, color .18s ease;
}

.nav-icon {
    font-size: 24px !important;
    color: #2A3F54;
    min-width: 24px;
    text-align: center;
    margin-right: 12px;
    transition: color .18s ease;
}

.nav-text {
    white-space: nowrap;
}

.main-menu .nav-link:hover,
.main-menu .nav-link.active {
    background-color: #1B3457 !important;
    color: #FFFFFF !important;
}

.nav-link:hover .nav-icon,
.nav-link:hover .bi-chevron-down,
.nav-link.active .nav-icon,
.nav-link.active .bi-chevron-down {
    color: #FFFFFF !important;
}

.main-menu .collapse .nav-link {
    color: var(--text-muted) !important;
    background-color: transparent;
}

.main-menu .collapse .nav-link:hover,
.main-menu .collapse .nav-link.active {
    background-color: #1B3457 !important;
    color: #FFFFFF !important;
}

.main-menu .collapse .nav-link:hover .nav-icon,
.main-menu .collapse .nav-link.active .nav-icon,
.main-menu .collapse .nav-link:hover .bi,
.main-menu .collapse .nav-link.active .bi {
    color: #FFFFFF !important;
}

.menu-collapsed .main-menu {
    width: 70px;
}

.menu-collapsed .nav-text,
.menu-collapsed .bi-chevron-down,
.menu-collapsed .collapse {
    display: none !important;
}

.collapsing {
    transition: height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.menu-collapsed .nav-link {
    justify-content: center;
}

.menu-collapsed .nav-icon {
    font-size: 22px;
    color: #3A78D4 !important;
}

.menu-collapsed .nav-link:hover .nav-icon,
.menu-collapsed .nav-link.active .nav-icon {
    color: #FFFFFF !important;
}

/* =========================
   DYNAMIC LOGO
========================= */
.logo-full {
    height: 55px;
    max-width: 60%;
    object-fit: contain;
    display: block;
}

.logo-compact {
    height: 48px; /* Slightly smaller for the 70px sidebar */
    max-width: 100%;
    object-fit: contain;
    display: none;
}

.menu-collapsed .logo-full {
    display: none;
}

.menu-collapsed .logo-compact {
    display: block;
}


.menu-collapsed .nav-link {
    position: relative;
}

.menu-collapsed .nav-text {
    display: none;
}

.menu-collapsed .nav-link::after {
    content: attr(aria-label);
    position: absolute;
    left: 70px;
    background: #0B1F36;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.menu-collapsed .nav-link:hover::after {
    opacity: 1;
}

.sidebar-toggler {
    position: fixed;
    top: 50vh;
    left: 234px; /* Centered on the 250px border (250 - 16) */
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    color: var(--secondary);
    transition: left 0.28s cubic-bezier(0.4, 0.0, 0.2, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sidebar-toggler:hover {
    background: #F8F9FA;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-50%) scale(1.05);
}

.sidebar-toggler i {
    font-size: 14px;
    font-weight: 900;
}

.menu-collapsed .sidebar-toggler {
    left: 54px; /* Centered on the 70px border (70 - 16) */
}

.nav-svg-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    transition: all 0.2s ease;
    filter: invert(48%) sepia(13%) saturate(362%) hue-rotate(182deg) brightness(91%) contrast(85%);
}

.nav-link:hover .nav-svg-icon,
.nav-link.active .nav-svg-icon {
    filter: brightness(0) invert(1);
}

.menu-collapsed .nav-svg-icon {
    margin-right: 0;
    filter: invert(43%) sepia(87%) saturate(1209%) hue-rotate(190deg);
}

.menu-collapsed .nav-icon {
    color: #3A78D4 !important;
}

.menu-collapsed .nav-text {
    display: none !important;
}

.collapse-btn {
    display: none;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
}


.spantexto {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 85px;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 0;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.header-icon-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.header-icon-item,
.header-icon-item span {
    color: #6B7280 !important;
    transition: all 0.3s ease;
}

.header-icon-item i {
    color: #6B7280 !important;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

#profileDropdown i {
    color: #6B7280 !important;
}

.header-icon-item:hover i,
#profileDropdown:hover i,
.header-icon-item:hover,
.header-icon-item:hover span {
    color: #3A78D4 !important;
}

.header-icon-item:hover {
    transform: translateY(-2px);
}

.header-icon-item span {
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1;
}

.header-icon-item .notification-count-badge {
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.32rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    transform: translate(-50%, -48%);
    transform-origin: center bottom;
    animation: notification-badge-bounce 1.8s ease-in-out infinite;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.35);
}

@keyframes notification-badge-bounce {
    0%,
    100% {
        transform: translate(-50%, -48%) scale(1);
    }

    35% {
        transform: translate(-50%, -62%) scale(1.08);
    }

    55% {
        transform: translate(-50%, -45%) scale(0.98);
    }

    72% {
        transform: translate(-50%, -52%) scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-icon-item .notification-count-badge {
        animation: none;
    }
}

.no-caret::after {
    display: none !important;
}

.app-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.top-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}




    50% { transform: translate(-50%, -50%) scale(1.02); }
    100% { transform: translate(-50%, -50%) scale(1); }
}




}







.montserrat-header {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 12;
    font-style: normal;
}

.text-header {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 12;
    font-style: normal;
    color: #FFFFFF !important;
}

.btn-primary {
    background-color: var(--primary) !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
}

.btn-primary-list {
    background-color: var(--primary-list) !important;
}

.btn-primary-list:hover {
    background-color: var(--primary-list-hover) !important;
}

.app-export-btn {
    color: #475569;
    background-color: #FFFFFF;
    border-color: #94A3B8;
}

.app-export-btn:hover,
.app-export-btn:focus,
.app-export-btn:active,
.app-export-btn.show {
    color: #1B3457 !important;
    background-color: #F8FAFC !important;
    border-color: #1B3457 !important;
}

.app-export-btn:hover i,
.app-export-btn:focus i,
.app-export-btn:active i,
.app-export-btn.show i {
    color: #1B3457 !important;
}

.texto-grande {
    color: white;
    font-size: x-large;
    font-weight: bold;
}

.breadcrumb {
    background: transparent;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    text-decoration: none;
}

.container {
    max-width: 84rem !important;
    width: 90% !important;
}

.btn-nuevo {
    --bs-btn-color: #fff !important;
    --bs-btn-bg: #2A3F54 !important;
    --bs-btn-border-color: #2A3F54 !important;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #ffca2c;
    --bs-btn-hover-border-color: #ffc720;
    --bs-btn-focus-shadow-rgb: 217, 164, 6;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #ffcd39;
    --bs-btn-active-border-color: #ffc720;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #2A3F54 !important;
    --bs-btn-disabled-border-color: #2A3F54 !important;
}

/*TABLA*/

.filter-box {
    margin: 30px 20px 10px 20px;
}

.filter-input {
    border: none;
    border-bottom: 1px solid #999;
    width: 100%;
    padding: 8px 0;
    background: transparent;
    outline: none;
}

.card-custom,
.app-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-sm);
}

.bg-org-icon,
.app-icon-box {
    background-color: rgba(30, 58, 138, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #1e3a8a;
    flex: 0 0 auto;
}

.bg-org-icon i,
.app-icon-box i {
    color: #1e3a8a !important;
    font-size: 1.35rem;
}

.table {
    --bs-table-color: var(--table-text);
    --bs-table-bg: var(--table-row-bg);
    --bs-table-border-color: var(--table-border);
    --bs-table-striped-color: var(--table-text);
    --bs-table-striped-bg: transparent;
    --bs-table-hover-color: var(--table-text);
    --bs-table-hover-bg: var(--table-row-hover-bg);
    width: 100%;
    margin-bottom: 0;
    border: 1px solid var(--table-border);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: visible !important;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .07);
}

.table > thead {
    background-color: var(--table-header-bg);
}

.table > thead > tr > th {
    background-color: var(--table-header-bg);
    color: #1D2533;
    font-weight: 700;
    text-transform: none;
    font-size: .92rem;
    letter-spacing: .01em;
    padding: .35rem 1.15rem;
    border-bottom: 1px solid var(--table-border);
    white-space: nowrap;
    vertical-align: middle;
}

.table.table-headers-wrap > thead > tr > th {
    white-space: normal !important;
}

.table > tbody > tr > td {
    color: var(--table-text);
    background-color: var(--table-row-bg);
    vertical-align: middle;
    padding: .65rem 1.15rem;
    border-bottom: 1px solid var(--table-border);
    font-size: .92rem;
    font-weight: 500;
}

.table > tbody > tr:nth-child(even) > td {
    background-color: var(--table-row-alt-bg);
}

.table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.table.table-sm > :not(caption) > * > * {
    padding: .3rem .8rem;
}

.table-responsive {
    overflow-x: auto !important;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    background: var(--table-row-bg);
    border: 1px solid var(--table-border);
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .07);
}

.app-table-wrapper {
    overflow: visible !important;
    width: 100%;
    background: var(--table-row-bg);
    border: 1px solid var(--table-border);
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .07);
}

.table-responsive > .table,
.app-table-wrapper > .table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.app-card > .table-responsive,
.card-custom > .table-responsive,
.card > .table-responsive {
    overflow-x: auto !important;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
}

@media (min-width: 992px) {
    .table-responsive,
    .app-card > .table-responsive,
    .card-custom > .table-responsive,
    .card > .table-responsive {
        overflow: visible !important;
    }
}

.table a:not(.btn):not(.dropdown-item) {
    color: var(--table-link);
    text-decoration-color: rgba(11, 99, 182, .45);
    text-underline-offset: 2px;
}

.table a:not(.btn):not(.dropdown-item):hover {
    color: #084F91;
    text-decoration-thickness: 2px;
}

table.dataTable thead span.sort-icon {
    float: right;
    width: 15.5px;
    height: 15.5px;
    padding-left: 5px;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Sidebar Custom Scrollbar ('cierre' style) */
.main-menu::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.main-menu::-webkit-scrollbar-track {
    background: transparent;
}
.main-menu::-webkit-scrollbar-thumb {
    background-color: #CBD5E1; 
    border-radius: 10px;
}
.main-menu::-webkit-scrollbar-thumb:hover {
    background-color: #94A3B8;
}

/* Custom Socio Badges */
.badge-natural {
    background-color: var(--status-success-bg) !important;
    color: var(--status-success-text) !important;
}
.badge-juridico {
    background-color: var(--status-warning-bg) !important;
    color: var(--status-warning-text) !important;
}
.badge-activo {
    background-color: var(--status-success-bg) !important;
    color: var(--status-success-text) !important;
}
.badge-inactivo {
    background-color: var(--status-danger-bg) !important;
    color: var(--status-danger-text) !important;
}

.table .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: .38rem .7rem !important;
    border: 1px solid transparent;
    border-radius: 8px !important;
    font-size: .75rem !important;
    font-weight: 700 !important;
    line-height: 1;
}

.table .badge.bg-success,
.table .badge.bg-success-subtle,
.table .badge.text-bg-success {
    background-color: var(--status-success-bg) !important;
    color: var(--status-success-text) !important;
    border-color: var(--status-success-border) !important;
}

.table .badge.bg-warning,
.table .badge.bg-warning-subtle,
.table .badge.text-bg-warning {
    background-color: var(--status-warning-bg) !important;
    color: var(--status-warning-text) !important;
    border-color: var(--status-warning-border) !important;
}

.table .badge.bg-danger,
.table .badge.bg-danger-subtle,
.table .badge.text-bg-danger {
    background-color: var(--status-danger-bg) !important;
    color: var(--status-danger-text) !important;
    border-color: var(--status-danger-border) !important;
}

.table .badge.bg-info,
.table .badge.bg-info-subtle,
.table .badge.text-bg-info {
    background-color: var(--status-info-bg) !important;
    color: var(--status-info-text) !important;
    border-color: var(--status-info-border) !important;
}

.table .badge.bg-secondary,
.table .badge.bg-secondary-subtle,
.table .badge.text-bg-secondary,
.table .badge.bg-light,
.table .badge.bg-dark,
.table .badge.badge-light {
    background-color: var(--status-neutral-bg) !important;
    color: var(--status-neutral-text) !important;
    border-color: var(--status-neutral-border) !important;
}

.table .badge.bg-primary,
.table .badge.bg-primary-subtle,
.table .badge.text-bg-primary,
.table .badge.badge-info {
    background-color: var(--status-primary-bg) !important;
    color: var(--status-primary-text) !important;
    border-color: var(--status-primary-border) !important;
}

.table .badge.rounded-pill,
.table .badge.badge-pill {
    border-radius: 8px !important;
}

.pagination-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 15px;
    /*font-size: 13px;*/
    color: #555;
}

.items-select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    background: #f7f7f7;
}

.page-icons i {
    /*font-size: 16px;*/
    color: #777;
    cursor: pointer;
    margin: 0 5px;
}

.page-icons i:hover {
    color: #000;
}

.table > tbody > tr {
    transition: background-color .15s ease, color .15s ease;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-color-state: var(--table-text);
    --bs-table-bg-state: var(--table-row-hover-bg);
    background-color: var(--table-row-hover-bg);
}

.table > tbody > tr.active-row > * {
    background-color: #1f3a5f;
    color: white;
    font-weight: 500;
}

.input-readonly {
    border: none !important;
    background: transparent;
    outline: none;
    box-shadow: none;
    padding-left: 0;
    height: 30px;
}

.required::after {
    content: " *";
    color: red;
}

/* =========================
   MODERN TABS (Socio Module & General)
   Diseño según capturas (Línea azul)
========================= */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}
.nav-tabs .nav-link {
    border: none !important;
    color: #64748b !important;
    font-weight: 500;
    padding: 12px 20px;
    margin-bottom: -2px;
    background-color: transparent !important;
    transition: all 0.3s ease;
}
.nav-tabs .nav-link:hover {
    color: #3A78D4 !important;
    background: transparent !important;
}
.nav-tabs .nav-link.active {
    color: #3A78D4 !important;
    background-color: transparent !important;
    border-bottom: 2px solid #3A78D4 !important;
    font-weight: 600;
}

/* Fix padding inside tab panels */
.tab-content-fixed {
    padding: 0 0 12px 0;
}

/* =========================
   CUSTOM RECONNECT UI
========================= */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

.reconnect-content {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.reconnect-logo {
    width: 150px;
    margin-bottom: 25px;
    animation: elegant-pulse 2.5s infinite ease-in-out;
}

.reconnect-text {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 1.25rem;
    margin-top: 1rem;
}

@keyframes elegant-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* =========================
   MOBILE RESPONSIVE TWEAKS
========================= */
@media (max-width: 768px) {
    .main-menu {
        position: fixed;
        left: -260px; /* Hide by default */
        top: 0;
        z-index: 1050;
        width: 260px !important;
        transition: left 0.3s ease-in-out;
    }

    .main-menu.mobile-open {
        left: 0;
    }

    /* Override collapsed state for mobile to ensure full menu is shown when open */
    .menu-collapsed .main-menu.mobile-open {
        width: 260px !important;
    }
    
    .menu-collapsed .main-menu.mobile-open .nav-text,
    .menu-collapsed .main-menu.mobile-open .bi-chevron-down,
    .menu-collapsed .main-menu.mobile-open .collapse {
        display: block !important;
    }
    
    .menu-collapsed .main-menu.mobile-open .logo-full {
        display: block !important;
    }
    
    .menu-collapsed .main-menu.mobile-open .logo-compact {
        display: none !important;
    }

    .sidebar-toggler {
        display: none !important; /* Hide desktop side toggler on mobile */
    }

    .top-left {
        max-width: 100%;
    }

    /* General responsive form fixes */
    input.form-control, select.form-select {
        /*font-size: 16px;*/ 
        /* Prevents auto-zoom on iOS */
    }

}




.auth-card {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 300px;
    padding: 9px 10px;
    border-radius: 5px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    /*font-family: "Segoe UI", sans-serif;*/
}

.auth-divider {
    width: 1px;
    height: 25px;
    background: #e5e7eb;
}

/* =========================
   APP STANDARD UI
   Pantallas, tablas, botones y estados reutilizables
========================= */
.app-page {
    margin-top: 1rem;
}

.app-card-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.app-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-title-group {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.app-title-text h5 {
    margin: 0;
    color: var(--text-main);
    font-weight: 700;
}

.app-title-text small {
    color: var(--text-muted);
}

.app-toolbar {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.app-search {
    max-width: 320px;
}

.app-search .input-group-text,
.app-search .form-control {
    border-color: #DDE3EA;
}

.app-search .form-control:focus {
    border-color: #DDE3EA;
    box-shadow: none;
}

.app-table {
    margin-bottom: 0;
}

.app-table-icon-btn {
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.app-table-icon-btn i {
    font-size: .85rem;
}

.app-table-total td {
    background: #F8FAFC !important;
    color: #111827 !important;
    font-weight: 800;
}

.app-footer-bar {
    background: #F8FAFC;
    border-top: 1px solid var(--border);
    padding: 1rem;
}

/* Apertura de caja: impresión y vista previa de respaldos */
.arqueo-print-document {
    font-family: inherit;
    color: #111827;
}

.arqueo-file-preview {
    min-height: 220px;
    max-height: 420px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 12px;
}

.arqueo-file-preview img {
    display: block;
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.arqueo-file-preview iframe {
    width: 100%;
    height: 380px;
    border: 0;
}

.arqueo-file-placeholder {
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
}

.arqueo-print-table td,
.arqueo-print-table th {
    padding: 7px 8px;
}

.print-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.print-summary-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 10px;
    min-height: 54px;
    background: #fff;
}

.print-summary-item span {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    /* text-transform: uppercase; removed */
}

.print-summary-item strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.print-status {
    display: inline-block !important;
    width: fit-content;
    border-radius: 999px;
    padding: 3px 9px;
    color: #fff;
    font-size: 12px;
}

.print-status-open {
    background: #198754;
}

.print-status-closed {
    background: #dc3545;
}

@media (max-width: 768px) {
    .print-summary {
        grid-template-columns: 1fr;
    }
}

@media print {
    .arqueo-file-preview {
        max-height: 240px;
        min-height: 120px;
        page-break-inside: avoid;
    }

    .arqueo-file-preview img {
        max-height: 220px;
    }

    .arqueo-file-preview iframe {
        display: none;
    }

    .arqueo-print-table {
        page-break-inside: avoid;
    }
}

.workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-start;
}

.solicitud-grid-observation-column {
    width: 108px;
    min-width: 108px;
    text-align: center;
}

.solicitud-grid-observation-button {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.observation-view {
    display: flex;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.observation-view-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 1.2rem;
}

.observation-view-label {
    display: block;
    margin-bottom: .35rem;
    color: #64748b;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.observation-view-content {
    color: #1e293b;
    line-height: 1.65;
    white-space: pre-wrap;
}

.observation-view-empty {
    color: #64748b;
    font-style: italic;
}

.workflow-actions-inline {
    display: inline-grid;
    vertical-align: middle;
}

.workflow-action-btn {
    min-width: auto;
    height: 36px;
    padding: 0 1rem;
    border-radius: 8px; /* Bordes suaves */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 1px solid transparent;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    /* text-transform: uppercase; removed */
    white-space: nowrap;
    transition: all 0.3s ease; /* Animacion */
}

.workflow-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.workflow-action-btn:disabled {
    opacity: .65;
    box-shadow: none;
}

/* PASTEL COLORS MATCHING ESTADO-PILL */
.workflow-action-darkgreen { /* Aprobar */
    color: #14532d !important;
    background-color: #bbf7d0 !important;
    border-color: transparent !important;
}
.workflow-action-darkgreen:hover {
    color: #fff !important;
    background-color: #166534 !important;
    border-color: #166534 !important;
}

.workflow-action-info { /* Observar (Azul) */
    color: var(--status-info-text) !important;
    background-color: var(--status-info-bg) !important;
    border-color: transparent !important;
}
.workflow-action-info:hover {
    color: #fff !important;
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
}

.workflow-action-orange { /* Escalar (Naranja) */
    color: #9a3412 !important;
    background-color: #ffedd5 !important;
    border-color: transparent !important;
}
.workflow-action-orange:hover {
    color: #fff !important;
    background-color: #ea580c !important;
    border-color: #ea580c !important;
}

.workflow-action-danger { /* Rechazar (Rojo) */
    color: var(--status-danger-text) !important;
    background-color: var(--status-danger-bg) !important;
    border-color: transparent !important;
}
.workflow-action-danger:hover {
    color: #fff !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.workflow-action-success { /* Iniciar Desembolso (Verde Normal) */
    color: var(--status-success-text) !important;
    background-color: var(--status-success-bg) !important;
    border-color: transparent !important;
}
.workflow-action-success:hover {
    color: #fff !important;
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

.workflow-action-warning { /* Confirmar Desembolso (Amarillo) */
    color: var(--status-warning-text) !important;
    background-color: var(--status-warning-bg) !important;
    border-color: transparent !important;
}
.workflow-action-warning:hover {
    color: #fff !important;
    background-color: #d97706 !important;
    border-color: #d97706 !important;
}

.workflow-action-outline-success {
    --bs-btn-color: #047857;
    --bs-btn-bg: #ECFDF5;
    --bs-btn-border-color: #10B981;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #10B981;
    --bs-btn-hover-border-color: #10B981;
    color: #047857;
    background-color: #ECFDF5;
    border-color: #10B981;
}

.workflow-action-outline-danger {
    --bs-btn-color: #B91C1C;
    --bs-btn-bg: #FEF2F2;
    --bs-btn-border-color: #DC3545;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #DC3545;
    --bs-btn-hover-border-color: #DC3545;
    color: #B91C1C;
    background-color: #FEF2F2;
    border-color: #DC3545;
}

.app-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0;
}

.app-action-edit {
    --bs-btn-color: #7C4A03;
    --bs-btn-bg: #FEF3C7;
    --bs-btn-border-color: #FCD34D;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #B45309;
    --bs-btn-hover-border-color: #B45309;
}

.app-action-delete {
    --bs-btn-color: #991B1B;
    --bs-btn-bg: #FEE2E2;
    --bs-btn-border-color: #FCA5A5;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #B91C1C;
    --bs-btn-hover-border-color: #B91C1C;
}

.app-action-print {
    --bs-btn-color: #1B3457;
    --bs-btn-bg: #EAF1F8;
    --bs-btn-border-color: #C7D7EA;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1B3457;
    --bs-btn-hover-border-color: #1B3457;
}

.cursor-pointer {
    cursor: pointer;
}

.app-status,
.estado-pill {
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: .38rem .7rem;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
}

.app-status-open,
.app-status-active,
.estado-autorizado,
.estado-acreditado {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border-color: var(--status-success-border);
}

.app-status-closed,
.app-status-inactive,
.estado-rechazado {
    background: var(--status-danger-bg);
    color: var(--status-danger-text);
    border-color: var(--status-danger-border);
}

.estado-pendiente,
.estado-entregado {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border-color: var(--status-warning-border);
}

.estado-aprobado {
    background: var(--status-info-bg);
    color: var(--status-info-text);
    border-color: var(--status-info-border);
}

.estado-recibido,
.estado-utilizado,
.estado-anulado {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
    border-color: var(--status-neutral-border);
}

.estado-anulado {
    text-decoration: line-through;
}

.table > tbody > tr.retiro-pendiente-resaltado > td {
    background: #FFF8E8 !important;
}

.table > tbody > tr.retiro-pendiente-resaltado > td:first-child {
    box-shadow: inset 4px 0 0 #E6A23C;
}

/* =========================
   INVESTMENTS DEMO UI
========================= */
.investment-page .fw-bold {
    font-weight: 600 !important;
}

.investment-page .display-6 {
    font-size: 2rem;
    font-weight: 600 !important;
    letter-spacing: 0;
}

.investment-page .form-label {
    color: #111827;
    font-weight: 600 !important;
}

.investment-page .btn {
    font-weight: 600;
}

.investment-create-btn {
    background-color: #1e3a8a;
    border: none;
    color: #fff;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.investment-create-btn:hover,
.investment-create-btn:focus {
    background-color: #172f73;
    color: #fff;
}

.investment-toolbar {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.investment-search {
    width: 300px;
    max-width: 320px;
}

.investment-search-wide {
    max-width: 300px;
    width: 300px;
}

.investment-status-tabs .btn {
    min-width: 82px;
}

.investment-modal .modal-dialog {
    --bs-modal-width: 1040px;
}

.investment-wizard-tabs {
    border-bottom: 1px solid #E5E7EB;
    gap: .5rem;
}

.investment-wizard-tabs .nav-link {
    align-items: center;
    border: 0;
    border-radius: 8px 8px 0 0;
    color: #475569;
    display: inline-flex;
    font-weight: 600;
    gap: .5rem;
    padding: .8rem 1rem;
}

.investment-wizard-tabs .nav-link span {
    align-items: center;
    background: #EAF1F8;
    border-radius: 50%;
    color: #1B3457;
    display: inline-flex;
    font-size: .78rem;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.investment-wizard-tabs .nav-link.active {
    background: #F8FAFC;
    color: #111827;
}

.investment-wizard-tabs .nav-link.active span {
    background: #1B3457;
    color: #FFFFFF;
}

.investment-wizard-content {
    padding: 1rem;
}

.investment-selected-box {
    background: #F8FAFC;
    border: 1px solid #DCE5EF;
    border-left: 4px solid #1B3457;
    border-radius: 8px;
    padding: .85rem 1rem;
}

.investment-selected-box small,
.investment-selected-box span {
    color: #64748B;
    display: block;
}

.investment-selected-box strong {
    color: #111827;
    display: block;
    font-weight: 600;
}

.investment-modal-footer {
    align-items: center;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
}

.investment-review-list {
    display: grid;
    gap: .75rem;
}

.investment-review-list > div {
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .8rem 1rem;
}

.investment-review-list span {
    color: #64748B;
}

.investment-review-list strong {
    color: #111827;
    font-weight: 600;
    text-align: right;
}

.investment-cancel-banner {
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #DCE5EF;
    border-left: 4px solid #1B3457;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.investment-cancel-banner h5 {
    color: #111827;
    font-weight: 600;
}

.investment-cancel-body {
    background: #FFFFFF;
}

.investment-auth-pill {
    align-items: center;
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: 999px;
    color: #991B1B;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 600;
    padding: .35rem .7rem;
    white-space: nowrap;
}

.investment-cancel-metrics {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.investment-cancel-metrics > div {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1B3457;
    border-radius: 8px;
    padding: .85rem 1rem;
}

.investment-cancel-metrics small,
.investment-total-card span,
.investment-total-card small,
.investment-auth-note span {
    color: #64748B;
    display: block;
}

.investment-cancel-metrics strong {
    color: #111827;
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
}

.investment-total-card {
    background: #FFFFFF;
    border: 1px solid #DCE5EF;
    border-left: 4px solid #1B3457;
    border-radius: 8px;
    padding: 1rem;
}

.investment-total-card > strong {
    color: #0F172A;
    display: block;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.investment-total-card > div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: .35rem 0;
}

.investment-total-card b {
    color: #111827;
    font-weight: 600;
}

.investment-auth-note {
    align-items: flex-start;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #B91C1C;
    border-radius: 8px;
    display: flex;
    gap: .85rem;
    padding: 1rem;
}

.investment-auth-note i {
    color: #B91C1C;
    font-size: 1.15rem;
}

.investment-auth-note strong {
    color: #111827;
    display: block;
    font-weight: 600;
}

.investment-cancel-warning {
    align-items: center;
    background: #FFF7D6;
    border: 1px solid #F5D36B;
    border-radius: 8px;
    color: #6B4E00;
    display: flex;
    gap: .75rem;
    padding: 1rem;
}

.investment-cancel-warning i {
    color: #8A6500;
}

.investment-sticky-footer {
    background: #FFFFFF;
    bottom: 0;
    position: sticky;
    z-index: 2;
}

.investment-mini-summary {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 1rem;
}

.investment-mini-card {
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    min-height: 72px;
    padding: .85rem 1rem;
}

.investment-mini-card:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.investment-mini-icon {
    align-items: center;
    background: #F1F5F9;
    border-radius: 8px;
    color: #1B3457;
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.investment-mini-icon.success {
    background: #DCFCE7;
    color: #166534;
}

.investment-mini-icon.warning {
    background: #FEF3C7;
    color: #92400E;
}

.investment-mini-icon.info {
    background: #E0F2FE;
    color: #075985;
}

.investment-mini-icon.danger {
    background: #FEE2E2;
    color: #991B1B;
}

.investment-mini-value {
    color: #111827;
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.investment-mini-label {
    color: #64748B;
    display: block;
    font-size: .75rem;
    line-height: 1.2;
}

.investment-clickable-row {
    cursor: pointer;
}

.investment-clickable-row:hover {
    box-shadow: inset 4px 0 0 #1B3457;
}

.investment-detail-hero {
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 1fr) auto;
    padding: 1rem;
}

.investment-certificate-card {
    background: #FFFFFF;
    border: 1px solid #DCE5EF;
    border-left: 4px solid #1B3457;
    border-radius: 8px;
    padding: 1rem;
}

.investment-certificate-card strong {
    color: #0F172A;
    display: block;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
}

.investment-certificate-card small {
    color: #64748B;
    display: block;
}

.investment-detail-actions {
    align-content: center;
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.investment-row {
    align-items: center;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 0;
}

.investment-row:first-of-type {
    padding-top: 0;
}

.investment-row.total {
    border-bottom: 0;
    font-size: 1.05rem;
}

.investment-row span {
    color: #475569;
}

.investment-row strong {
    color: #111827;
    font-weight: 600;
}

.investment-timeline {
    display: grid;
    gap: .75rem;
}

.investment-timeline > div {
    display: grid;
    gap: .75rem;
    grid-template-columns: 16px 1fr;
}

.investment-timeline > div > span {
    background: #1B3457;
    border-radius: 50%;
    height: 10px;
    margin-top: .35rem;
    width: 10px;
}

.investment-timeline p {
    margin: 0;
}

.investment-timeline strong,
.investment-timeline small {
    display: block;
}

.investment-timeline strong {
    color: #111827;
    font-weight: 600;
}

.investment-timeline small {
    color: #64748B;
}

.investment-hero {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.investment-eyebrow {
    color: #64748B;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    /* text-transform: uppercase; removed */
}

.investment-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.investment-kpi-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: none;
    padding: .9rem 1rem;
    min-height: 96px;
    position: relative;
    overflow: visible;
}

.investment-kpi-card::before {
    background: #1B3457;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.investment-kpi-card.warning::before { background: #D97706; }
.investment-kpi-card.success::before { background: #15803D; }
.investment-kpi-card.danger::before { background: #B91C1C; }
.investment-kpi-card.info::before { background: #0369A1; }

.investment-kpi-icon {
    align-items: center;
    background: #F1F5F9;
    border-radius: 8px;
    color: #1B3457;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.investment-kpi-card.warning .investment-kpi-icon {
    background: #FEF3C7;
    color: #92400E;
}

.investment-kpi-card.success .investment-kpi-icon {
    background: #DCFCE7;
    color: #166534;
}

.investment-kpi-card.danger .investment-kpi-icon {
    background: #FEE2E2;
    color: #991B1B;
}

.investment-kpi-card.info .investment-kpi-icon {
    background: #E0F2FE;
    color: #075985;
}

.investment-kpi-value {
    color: #0F172A;
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.15;
}

.investment-kpi-label {
    color: #64748B;
    font-size: .78rem;
    font-weight: 600;
}

.investment-panel {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1rem;
}

.investment-panel-title {
    align-items: center;
    color: #1F2937;
    display: flex;
    font-size: .86rem;
    font-weight: 600;
    gap: .5rem;
    margin-bottom: .85rem;
    /* text-transform: uppercase; removed */
}

.investment-highlight {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-left: 3px solid #1B3457;
    border-radius: 8px;
    padding: .9rem 1rem;
}

.investment-money-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1B3457;
    border-radius: 8px;
    color: #0F172A;
    padding: 1.15rem;
}

.investment-money-card small {
    color: #64748B;
}

.investment-metric-row {
    align-items: center;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .72rem 0;
}

.investment-metric-row:last-child {
    border-bottom: 0;
}

.investment-pill {
    align-items: center;
    border: 1px solid #DDE3EA;
    border-radius: 999px;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 700;
    gap: .35rem;
    padding: .32rem .62rem;
}

.investment-pill.primary {
    background: #EAF1F8;
    color: #1B3457;
}

.investment-pill.success {
    background: #DCFCE7;
    color: #166534;
}

.investment-pill.warning {
    background: #FEF3C7;
    color: #92400E;
}

.investment-pill.danger {
    background: #FEE2E2;
    color: #991B1B;
}

.investment-rate-table thead th {
    background: #F8FAFC !important;
    color: #334155;
    font-size: .76rem;
    font-weight: 700;
    /* text-transform: uppercase; removed */
}

.investment-rate-table input {
    border: 1px solid #DDE3EA;
    font-weight: 600;
}

.investment-report-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.investment-report-card:hover {
    border-color: #C7D7EA;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    transform: translateY(-2px);
}

.investment-report-icon {
    align-items: center;
    background: #EAF1F8;
    border-radius: 8px;
    color: #1B3457;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.investment-stepper {
    display: grid;
    gap: .75rem;
}

.investment-step {
    align-items: flex-start;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    padding: .85rem;
}

.investment-step-number {
    align-items: center;
    background: #1B3457;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.investment-filter-bar {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.investment-rate-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    height: 100%;
    padding: 1rem;
}

.investment-rate-value {
    color: #1B3457;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
}

.investment-rate-cell {
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    color: #0F172A;
    display: inline-flex;
    font-weight: 600;
    justify-content: center;
    min-width: 72px;
    padding: .45rem .65rem;
}

.investment-rate-cell.featured {
    background: #ECFDF5;
    border-color: #BBF7D0;
    color: #166534;
}

@media (max-width: 991.98px) {
    .investment-summary-grid,
    .investment-mini-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .investment-detail-hero {
        grid-template-columns: 1fr;
    }

    .investment-cancel-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .investment-summary-grid,
    .investment-mini-summary {
        grid-template-columns: 1fr;
    }

    .investment-search-wide {
        max-width: none;
    }

    .investment-status-tabs {
        overflow-x: auto;
        width: 100%;
    }

    .investment-detail-actions {
        grid-template-columns: 1fr;
    }
}

/* Reportes regulatorios */
.regulatory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 1rem;
}

.regulatory-card {
    background: #FFFFFF;
    border: 1px solid #D9E1EC;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.regulatory-card-header {
    align-items: center;
    background: #F8FAFC;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    gap: .75rem;
    padding: .75rem 1rem;
}

.regulatory-card-icon {
    align-items: center;
    background-color: rgba(30, 58, 138, .1);
    border-radius: 8px;
    display: flex;
    flex: 0 0 auto;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.regulatory-card-icon i {
    color: #1E3A8A;
    font-size: 1.2rem;
}

.regulatory-card-header.uafe .regulatory-card-icon {
    background-color: rgba(20, 184, 166, .12);
}

.regulatory-card-header.uafe .regulatory-card-icon i {
    color: #0F766E;
}

.regulatory-card-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.regulatory-card-institution {
    color: #6B7280;
    font-size: .78rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .regulatory-grid {
        grid-template-columns: 1fr;
    }
}

.app-module-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem 1rem;
}

.app-module-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #EEF2F7;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.app-module-item:hover {
    background: #EEF6FF;
    border-color: #C7D7EA;
    transform: translateX(3px);
}

.app-module-left {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.app-module-icon {
    width: 32px;
    color: #1B3457;
    font-size: 1.35rem;
    text-align: center;
}

.app-module-title {
    color: #1F2937;
    font-weight: 700;
}

.app-module-arrow {
    color: #94A3B8;
}

.modal-content > .modal-header,
.modal-header.modal-header-cliente,
.modal-header.modal-header-Producto {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-main) !important;
    height: auto !important;
    min-height: 64px;
    padding: 1rem !important;
    background-image: none !important;
    align-items: center;
}

.modal-content > .modal-header .modal-title,
.modal-header.modal-header-cliente .modal-title,
.modal-header.modal-header-Producto .modal-title {
    color: var(--text-main) !important;
    font-weight: 700;
}

.modal-content > .modal-header .btn-close,
.modal-header.modal-header-cliente .btn-close,
.modal-header.modal-header-Producto .btn-close {
    margin: 0;
}

.modal-xxl {
    max-width: 70% !important;
}

.app-modal {
    animation: appModalFadeIn 180ms ease-out both;
}

.app-modal-backdrop {
    animation: appModalBackdropFadeIn 180ms ease-out both;
}

.app-modal-dialog {
    animation: appModalEnter 220ms ease-out both;
}

@keyframes appModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes appModalBackdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: var(--bs-backdrop-opacity, .5);
    }
}

@keyframes appModalEnter {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-modal,
    .app-modal-backdrop,
    .app-modal-dialog {
        animation: none !important;
    }
}

.cheque-section-title {
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cheque-timeline {
    position: relative;
    padding-left: 1.8rem;
}

.cheque-timeline::before {
    content: "";
    position: absolute;
    top: 0.8rem;
    bottom: 0.8rem;
    left: 0.55rem;
    width: 2px;
    background: #dbe4ef;
}

.cheque-timeline-item {
    position: relative;
    padding-bottom: 1rem;
}

.cheque-timeline-marker {
    position: absolute;
    top: 0.75rem;
    left: -1.55rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #cbd5e1;
}

.cheque-timeline-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-tabs {
    border-bottom: 1px solid #DDE3EA;
    gap: .35rem;
}

.app-tabs .nav-link {
    border: 0;
    color: #475569;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
    padding: .85rem 1rem;
}

.app-tabs .nav-link.active {
    color: #2563EB;
    background: #FFFFFF;
    border-bottom: 2px solid #2563EB;
}

.app-tab-content {
    background: #FFFFFF;
}

.app-section-title {
    background: #1B3457;
    color: #FFFFFF;
    border-bottom: 1px solid #10263F;
    font-size: 1rem;
    font-weight: 700;
    padding: .85rem 1rem;
}

.app-section-title small {
    color: rgba(255, 255, 255, .78);
    font-weight: 500;
}

.app-section-title-with-icon {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.app-section-title-with-icon .app-icon-box {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .12);
    color: #FFFFFF;
}

.app-section-title-with-icon .app-icon-box i {
    color: #FFFFFF !important;
    font-size: 1.1rem;
}

.app-section-title-with-icon h5 {
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

@media (max-width: 768px) {
    .app-module-list {
        grid-template-columns: 1fr;
    }

    .app-footer-bar {
        flex-direction: column;
        align-items: stretch !important;
        gap: .75rem;
    }
}


.form-switch {
    display: flex !important;
    align-items: center !important;
}

.switch {
    position: relative;
    display: inline-block;
    width: 74px;
    height: 40px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

/* =========================
   RESPONSIVE BASELINE
========================= */
* {
    min-width: 0;
}

.main-area,
.main-content,
.container,
.container-fluid {
    max-width: 100%;
}

.container-fluid {
    padding-left: clamp(.75rem, 2vw, 1.5rem);
    padding-right: clamp(.75rem, 2vw, 1.5rem);
}

.card,
.card-custom,
.products-card,
.app-card {
    max-width: 100%;
}

.table th,
.table td {
    vertical-align: middle;
}

.modal-dialog {
    max-width: min(96vw, var(--bs-modal-width, 900px));
}

.modal-content {
    max-height: 94vh;
    overflow: auto;
}

.input-group,
.form-control,
.form-select,
.btn {
    max-width: 100%;
}

.dropdown-menu {
    max-width: calc(100vw - 2rem);
}

@media (max-width: 1400px) {
    .top-row {
        height: auto;
        min-height: 72px;
        padding: .75rem 1rem;
        gap: .75rem;
        flex-wrap: wrap;
    }

    .top-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 992px) {
    .wrapper {
        align-items: stretch;
    }

    .main-content {
        padding: 1rem;
    }

    .products-card {
        padding: 1rem;
    }

    .card-header .d-flex,
    .card-custom > .p-3 > .d-flex,
    .app-card-header {
        align-items: flex-start !important;
        flex-wrap: wrap;
        gap: .75rem;
    }

    .card-header .btn,
    .card-custom > .p-3 .btn,
    .app-card-header .btn {
        width: auto;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 12px;
    }

    .main-menu {
        width: 76px;
    }

    .main-menu .nav-text,
    .main-menu .bi-chevron-down,
    .main-menu .collapse {
        display: none !important;
    }

    .sidebar-toggler {
        left: 60px;
    }

    .main-content {
        padding: .75rem;
    }

    .row.g-3,
    .row.g-4 {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: .75rem;
    }

    .d-flex.justify-content-between,
    .d-flex.justify-content-end {
        flex-wrap: wrap;
        gap: .75rem;
    }

    .d-flex.justify-content-end > .btn,
    .app-footer-bar > .btn {
        flex: 1 1 160px;
    }

    .table {
        min-width: 720px;
    }

    .modal-dialog {
        margin: .5rem;
        max-width: calc(100vw - 1rem);
    }

    .modal-body,
    .card-body {
        padding: 1rem !important;
    }

    
}

@media (max-width: 576px) {
    .top-right {
        width: 100%;
        justify-content: space-between;
    }

    .header-icon-item span {
        font-size: .78rem;
    }

    .container,
    .container-fluid {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .btn {
        white-space: normal;
    }
}

/* ======================================================
   LOGIN
====================================================== */
.login-page {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 3rem);
    background:
        radial-gradient(circle at 10% 15%, rgba(30, 95, 140, .13), transparent 30%),
        radial-gradient(circle at 90% 85%, rgba(0, 159, 168, .12), transparent 28%),
        linear-gradient(135deg, #eef3f8 0%, #f8fafc 48%, #edf4f5 100%);
}

.login-page::before,
.login-page::after {
    position: absolute;
    z-index: -1;
    width: 24rem;
    height: 24rem;
    content: "";
    border: 1px solid rgba(30, 58, 138, .09);
    border-radius: 50%;
}

.login-page::before {
    top: -13rem;
    left: -9rem;
}

.login-page::after {
    right: -12rem;
    bottom: -14rem;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, .82fr) minmax(520px, 1.18fr);
    width: min(1180px, 100%);
    min-height: min(720px, calc(100dvh - 4rem));
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 1.75rem;
    box-shadow: 0 28px 70px rgba(15, 35, 64, .16) !important;
}

.login-access-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2.5rem, 5vw, 5.5rem);
    background: #fff;
}

.login-access-content,
.login-form-content {
    width: 100%;
}

.login-access-content {
    max-width: 420px;
}

.login-mobile-brand {
    max-width: 280px;
    margin: 0 auto 2.25rem;
}

.login-mobile-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.login-form-header {
    margin-bottom: 2.5rem;
}

.login-form-header h1 {
    margin: 0 0 .75rem;
    color: #17243a;
    font-size: clamp(2.25rem, 4vw, 3.15rem);
    font-weight: 750;
    letter-spacing: -.045em;
}

.login-form-header p {
    max-width: 350px;
    margin: 0;
    color: #667085;
    font-size: 1rem;
    line-height: 1.7;
}

.login-form-header strong {
    color: #1e3a8a;
}

.login-field-label {
    margin-bottom: .55rem;
    color: #344054;
    font-size: .84rem;
    font-weight: 700;
}

.login-field {
    min-height: 52px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: .85rem;
    box-shadow: 0 5px 14px rgba(15, 35, 64, .04);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login-field:focus-within {
    background: #fff;
    border-color: #1e5f8c;
    box-shadow: 0 0 0 .24rem rgba(30, 95, 140, .12);
}

.login-field.is-invalid {
    border-color: #b91c1c;
}

.login-field .input-group-text {
    min-width: 50px;
    justify-content: center;
    padding: 0;
    color: #1e5f8c;
    font-size: 1.15rem;
    background: transparent;
    border: 0;
}

.login-field .form-control {
    min-height: 50px;
    padding: .75rem 1rem;
    color: #17243a;
    font-size: 1.08rem;
    background: transparent;
    border: 0;
    box-shadow: none !important;
}

.login-field .form-control::placeholder {
    color: #98a2b3;
}

.login-error-text {
    display: block;
    margin-top: .45rem;
    color: #b91c1c;
    font-size: .78rem;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    color: #8f2430;
    font-size: .84rem;
    line-height: 1.5;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: .8rem;
}

.login-alert i {
    margin-top: .05rem;
}

.login-page .btn-login {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    margin-top: .35rem;
    padding: .8rem 1.25rem;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .025em;
    /* text-transform: uppercase; removed */
    background: #1b3457;
    border: 1px solid #1b3457;
    border-radius: .85rem;
    box-shadow: 0 12px 24px rgba(27, 52, 87, .2);
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.login-page .btn-login:hover,
.login-page .btn-login:focus-visible {
    color: #fff;
    background: #244a77;
    border-color: #244a77;
    box-shadow: 0 15px 28px rgba(27, 52, 87, .25);
    transform: translateY(-1px);
}

.login-page .btn-login:disabled {
    color: #fff;
    background: #60748f;
    border-color: #60748f;
    transform: none;
}

.login-session-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.35rem;
    color: #667085;
    font-size: .76rem;
    text-align: center;
}

.login-session-note i {
    color: #15803d;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 3.5rem;
    padding-top: 1.35rem;
    color: #98a2b3;
    font-size: .7rem;
    border-top: 1px solid #e7ebf0;
}

.login-brand-panel {
    position: relative;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    padding: clamp(2.25rem, 4vw, 4.5rem) clamp(2.25rem, 4vw, 4.5rem) 8rem;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(0, 183, 153, .28), transparent 28%),
        radial-gradient(circle at 12% 85%, rgba(53, 126, 199, .33), transparent 30%),
        linear-gradient(145deg, #142f52 0%, #1b3b68 55%, #16375d 100%);
}

.login-brand-panel::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: .16;
    background-image:
        linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 75%, transparent);
}

.login-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 610px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.login-brand-logo-wrap {
    width: min(430px, 90%);
    padding: 1.25rem 1.65rem;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 1.15rem;
    box-shadow: 0 18px 36px rgba(5, 18, 37, .18);
}

.login-brand-logo {
    display: block;
    width: 100%;
    height: auto;
}

.login-brand-lines {
    position: absolute;
    bottom: 2.25rem;
    left: 0;
    display: block;
    width: 100%;
    height: 78px;
    overflow: hidden;
    pointer-events: none;
}

.login-brand-lines span {
    position: absolute;
    left: 0;
    display: block;
    height: 3px;
    border-radius: 999px;
    will-change: transform;
}

.login-brand-lines span:nth-child(1) {
    top: 3px;
    width: 108%;
    background: linear-gradient(90deg, transparent 0%, #16a36f 10%, #16a36f 90%, transparent 100%);
}

.login-brand-lines span:nth-child(2) {
    top: 25px;
    width: 104%;
    background: linear-gradient(90deg, transparent 0%, #3b82c4 10%, #3b82c4 90%, transparent 100%);
}

.login-brand-lines span:nth-child(3) {
    top: 47px;
    width: 110%;
    background: linear-gradient(90deg, transparent 0%, #fff 10%, #fff 90%, transparent 100%);
    opacity: .72;
}

.login-brand-lines span:nth-child(4) {
    top: 69px;
    width: 106%;
    background: linear-gradient(90deg, transparent 0%, #00a6a6 10%, #00a6a6 90%, transparent 100%);
}

.login-security-art {
    position: relative;
    width: min(430px, 100%);
    height: 285px;
    margin: 2.25rem 0 0;
}

.login-security-rotor {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 230px;
    height: 230px;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.login-security-orbit {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(255, 255, 255, .32);
    border-radius: 50%;
}

.login-security-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: 112px;
    height: 112px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    color: #fff;
    background: linear-gradient(145deg, #199b72, #087e64);
    border: 8px solid rgba(255, 255, 255, .12);
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(3, 17, 35, .3);
    transform: translate(-50%, -50%) rotate(-3deg);
}

.login-security-shield i {
    font-size: 3.55rem;
    line-height: 1;
    transform: rotate(3deg);
}

.login-security-shield span {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    /* text-transform: uppercase; removed */
}

.login-security-node {
    position: absolute;
    display: flex;
    min-width: 96px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    color: rgba(255, 255, 255, .94);
    background: transparent;
    border: 0;
    filter: drop-shadow(0 5px 8px rgba(3, 17, 35, .34));
}

.login-security-node i {
    font-size: 2.05rem;
    line-height: 1;
}

.login-security-node span {
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: .025em;
    white-space: nowrap;
}

.login-security-node-bank {
    top: -20px;
    left: 67px;
}

.login-security-node-data {
    top: 43px;
    right: -54px;
}

.login-security-node-users {
    right: -38px;
    bottom: 22px;
}

.login-security-node-check {
    bottom: -20px;
    left: 35px;
}

.login-security-node-activity {
    top: 57px;
    left: -55px;
}

@media (max-width: 1199.98px) {
    .login-shell {
        grid-template-columns: minmax(340px, .88fr) minmax(460px, 1.12fr);
    }

    .login-access-panel {
        padding: 3rem;
    }

    .login-brand-panel {
        padding: 2.5rem 2.5rem 7rem;
    }
}

@media (max-width: 991.98px) {
    .login-page {
        overflow-y: auto;
        padding: clamp(1rem, 4vw, 2rem);
    }

    .login-shell {
        display: block;
        width: min(520px, 100%);
        min-height: auto;
    }

    .login-access-panel {
        width: 100%;
        min-height: min(680px, calc(100dvh - 2rem));
        flex-direction: column;
        padding: clamp(2rem, 8vw, 4rem);
    }

    .login-mobile-brand {
        display: none !important;
    }

    .login-access-content {
        max-width: 430px;
        margin-inline: auto;
    }
}

@media (max-width: 575.98px) {
    .login-page {
        display: block;
        padding: 0;
        background: #fff;
    }

    .login-shell {
        min-height: 100vh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none !important;
    }

    .login-access-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 2rem 1.5rem;
    }

    .login-mobile-brand {
        max-width: 235px;
        margin-bottom: 2rem;
    }

    .login-form-header {
        margin-bottom: 2rem;
    }

    .login-form-header h1 {
        font-size: 2.4rem;
    }

    .login-footer {
        flex-direction: column;
        align-items: center;
        margin-top: 2.5rem;
        text-align: center;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .login-shell {
        animation: login-shell-in .95s cubic-bezier(.22, 1, .36, 1) both;
    }

    .login-access-content {
        animation: login-content-in .85s .1s cubic-bezier(.22, 1, .36, 1) both;
    }

    .login-brand-logo-wrap {
        animation: login-brand-in .9s .16s cubic-bezier(.22, 1, .36, 1) both;
    }

    .login-security-art {
        animation: login-brand-in 1s .28s cubic-bezier(.22, 1, .36, 1) both;
    }

    .login-brand-lines span {
        animation: login-line-flow 6.8s linear infinite;
    }

    .login-brand-lines span:nth-child(1) {
        animation-duration: 8.2s;
        animation-delay: -1.7s;
    }

    .login-brand-lines span:nth-child(2) {
        animation-duration: 9.4s;
        animation-delay: -4.1s;
    }

    .login-brand-lines span:nth-child(3) {
        animation-duration: 10.2s;
        animation-delay: -2.8s;
    }

    .login-brand-lines span:nth-child(4) {
        animation-duration: 8.9s;
        animation-delay: -5.2s;
    }

    .login-security-rotor {
        animation: login-orbit-spin 20s linear infinite;
    }

    .login-security-node {
        animation: login-orbit-counter-spin 20s linear infinite;
    }

    .login-security-shield {
        animation: login-shield-float 4s ease-in-out infinite;
    }

}

@keyframes login-shell-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(.995);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes login-content-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes login-brand-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes login-line-flow {
    from {
        transform: translateX(-115%);
    }

    to {
        transform: translateX(115%);
    }
}

@keyframes login-orbit-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes login-orbit-counter-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes login-shield-float {
    0%,
    100% {
        transform: translate(-50%, -50%) rotate(-3deg);
    }

    50% {
        transform: translate(-50%, calc(-50% - 4px)) rotate(-1deg);
    }
}
/* #Modulo Dashboards */
/* Estilos de Index.razor */

    .dashboards-page {
        background: linear-gradient(180deg, #f8fafc, #eef4fb);
        min-height: calc(100vh - 96px);
    }

    .dashboard-management-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .dashboard-section-label,
    .dashboard-mode-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        border-radius: 999px;
        font-weight: 800;
    }

    .dashboard-section-label {
        color: #2563eb;
        font-size: 0.78rem;
        /* text-transform: uppercase; removed */
        letter-spacing: .06em;
        margin-bottom: 0.35rem;
    }

    .dashboard-mode-pill {
        background: #eaf3ff;
        border: 1px solid #cfe3ff;
        color: #1d4ed8;
        padding: 0.55rem 0.85rem;
    }

    .dashboard-management-header h1 {
        font-size: 1.7rem;
        font-weight: 900;
        margin: 0;
        color: #111827;
    }

    .dashboard-management-header p {
        margin: 0.2rem 0 0;
        color: #64748b;
    }

    .dashboard-management-sidebar {
        border: 1px solid #e5eaf2;
        background: rgba(255,255,255,.92);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
    }

    .dashboard-management-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-management-preview {
        margin-top: 1rem;
        animation: managementDashboardSwitch 280ms ease-out;
    }

    @keyframes managementDashboardSwitch {
        from { opacity: 0; transform: translateY(7px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .dashboard-management-sidebar h2 {
        font-size: 0.95rem;
        font-weight: 900;
        margin: 0 0 0.9rem;
        /* text-transform: uppercase; removed */
    }

    @media (max-width: 992px) {
        .dashboard-management-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 576px) {
        .dashboard-management-header {
            display: grid;
        }
    }

/* Estilos de CaptacionDashboard.razor */

    .capture-dashboard { --ink: #10213a; --muted: #65748b; --border: #e3e9f1; color: var(--ink); font-size: .9rem; }
    .capture-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding: .05rem .1rem 0; }
    .capture-header h1 { margin: 0; font-size: 1.65rem; font-weight: 900; letter-spacing: -.025em; }
    .capture-header p { margin: .25rem 0 0; color: var(--muted); }
    .capture-actions { display: flex; align-items: center; gap: .7rem; }
    .capture-control, .capture-select, .capture-link { border: 1px solid #dce3ec; background: #fff; color: var(--ink); border-radius: 9px; font-weight: 700; cursor: pointer; transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
    .capture-control:hover, .capture-select:hover { border-color: #99bce2; color: #1266b3; box-shadow: 0 5px 14px rgba(27, 102, 172, .11); transform: translateY(-1px); }
    .capture-control { min-height: 44px; padding: .55rem .8rem; display: inline-flex; align-items: center; gap: .55rem; }
    .capture-user { display: flex; align-items: center; gap: .55rem; padding-left: .2rem; }
    .capture-user > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #08985b; background: #dff6e9; font-size: 1.25rem; }
    .capture-user strong, .capture-user small { display: block; line-height: 1.25; }
    .capture-user small { color: var(--muted); }

    .capture-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .85rem; margin-bottom: .9rem; }
    .capture-kpi, .capture-card, .capture-recommendations { border: 1px solid var(--border); background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 35, 64, .045); }
    .capture-kpi { min-height: 112px; padding: 1rem; display: flex; align-items: center; gap: .85rem; opacity: 0; animation: captureKpiEnter 520ms cubic-bezier(.2, .8, .25, 1) forwards; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
    .capture-kpi:nth-child(2) { animation-delay: 70ms; }
    .capture-kpi:nth-child(3) { animation-delay: 140ms; }
    .capture-kpi:nth-child(4) { animation-delay: 210ms; }
    .capture-kpi:nth-child(5) { animation-delay: 280ms; }
    .capture-kpi:hover { transform: translateY(-3px); border-color: #ccd9e9; box-shadow: 0 14px 30px rgba(15, 35, 64, .09); }
    .capture-kpi-icon { flex: 0 0 52px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.45rem; line-height: 1; overflow: hidden; }
    .capture-kpi-icon i { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; line-height: 1; margin: 0; padding: 0; transform: none; text-align: center; font-style: normal; }
    .capture-kpi-icon i::before { display: block; line-height: 1; margin: 0; }
    .capture-kpi small, .capture-kpi strong, .capture-kpi span { display: block; }
    .capture-kpi small { font-size: .7rem; font-weight: 800; /* text-transform: uppercase; removed */ }
    .capture-kpi strong { margin: .2rem 0; font-size: 1.35rem; line-height: 1.2; white-space: nowrap; }
    .capture-kpi div > span { color: #08a05c; font-size: .72rem; font-weight: 800; }
    .capture-kpi em { color: var(--muted); font-style: normal; font-weight: 500; }
    .kpi-blue .capture-kpi-icon { background: #e1efff; color: #176ac1; }
    .kpi-green .capture-kpi-icon { background: #e3f5df; color: #36a31f; }
    .kpi-violet .capture-kpi-icon { background: #efe5ff; color: #7b42cf; }
    .kpi-orange .capture-kpi-icon { background: #fff0df; color: #ea8a19; }
    .capture-goal { justify-content: space-between; }
    .capture-goal > div > span { color: var(--muted); }
    .goal-ring { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#08a05c 0 72.4%, #e9edf3 72.4% 100%); animation: goalRingEnter 800ms .35s cubic-bezier(.2, .8, .25, 1) both; }
    .goal-ring span { width: 42px; height: 42px; border-radius: 50%; background: #fff; }

    .capture-chart-grid { display: grid; grid-template-columns: 1.15fr 1fr 1.1fr; gap: .9rem; margin-bottom: .9rem; }
    .capture-card { padding: 1rem; min-width: 0; transition: border-color 180ms ease, box-shadow 180ms ease; }
    .capture-card:hover { border-color: #d2dce9; box-shadow: 0 12px 30px rgba(15, 35, 64, .075); }
    .capture-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; min-height: 30px; margin-bottom: .7rem; }
    .capture-card-heading h2 { margin: 0; font-size: .9rem; font-weight: 900; }
    .capture-select { padding: .4rem .65rem; font-size: .72rem; }
    .chart-legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .65rem; font-size: .68rem; color: var(--muted); }
    .chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
    .chart-legend span::before { content: ""; width: 18px; border-top: 2px solid; }
    .chart-legend .legend-current::before { border-color: #159f61; }
    .chart-legend .legend-previous::before { border-color: #2585df; border-style: dashed; }
    .chart-legend .legend-goal::before { border-color: #9aa8ba; border-style: dashed; }
    .line-chart { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: 225px 20px; margin-top: .15rem; }
    .line-axis-y { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: .64rem; padding-bottom: 2px; }
    .line-plot { position: relative; border-left: 1px solid #dce3ec; border-bottom: 1px solid #dce3ec; background-image: linear-gradient(to bottom, #e9edf3 1px, transparent 1px); background-size: 100% 16.666%; margin: 5px 8px 0 0; overflow: visible; }
    .chart-line { height: 2px; position: absolute; transform-origin: left center; z-index: 2; transform: rotate(var(--line-angle)) scaleX(0); animation: captureLineDraw 620ms cubic-bezier(.25, .8, .3, 1) var(--line-delay) forwards; }
    .current-line { background: #159f61; }
    .previous-line { height: 0; border-top: 2px dashed #2585df; }
    .goal-line { height: 0; border-top: 2px dashed #a7b2c1; z-index: 1; }
    .line-point { position: absolute; width: 9px; height: 9px; padding: 0; background: #fff; border: 2px solid #159f61; border-radius: 50%; transform: translate(-50%, 50%) scale(0); z-index: 3; cursor: pointer; animation: capturePointPop 260ms ease-out calc(420ms + var(--point-delay)) forwards; transition: box-shadow 150ms ease, background 150ms ease; }
    .line-point:hover, .line-point:focus-visible { background: #159f61; box-shadow: 0 0 0 5px rgba(21, 159, 97, .16); outline: none; z-index: 6; }
    .line-point::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%) translateY(4px); padding: .35rem .5rem; border-radius: 6px; background: #10213a; color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 140ms ease, transform 140ms ease; }
    .line-point:hover::after, .line-point:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
    .line-total { position: absolute; right: 1%; bottom: 94%; transform: translateY(50%); background: #e3f7ec; border: 1px solid #9dddbb; color: #087b47; padding: .25rem .4rem; border-radius: 5px; font-size: .65rem; font-weight: 900; z-index: 4; }
    .line-axis-x { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font-size: .62rem; padding: 5px 7px 0 0; }

    .product-chart-layout { min-height: 250px; display: grid; grid-template-columns: minmax(150px, .9fr) minmax(145px, 1.1fr); gap: 1rem; align-items: center; }
    .capture-donut { width: min(185px, 100%); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#2784df 0 44.6%, #2cab69 44.6% 71.4%, #f7a62b 71.4% 90.5%, #7357c8 90.5% 96%, #7d899b 96% 100%); cursor: pointer; animation: captureDonutEnter 800ms cubic-bezier(.2, .8, .25, 1) both; transition: filter 180ms ease, box-shadow 180ms ease; }
    .capture-donut:hover, .capture-donut:focus-visible { filter: saturate(1.12); box-shadow: 0 12px 28px rgba(15, 35, 64, .15); outline: none; }
    .capture-donut .donut-center { width: 53%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; box-shadow: 0 0 0 1px rgba(15,35,64,.04); transition: transform 180ms ease; }
    .capture-donut:hover .donut-center { transform: scale(.96); }
    .capture-donut strong, .capture-donut span { display: block; }
    .capture-donut strong { font-size: 1.1rem; }
    .capture-donut .donut-center > span { max-width: 76px; color: var(--muted); font-size: .68rem; line-height: 1.1; }
    .product-legend { display: grid; gap: .55rem; }
    .product-legend-item { width: 100%; display: grid; grid-template-columns: 9px 1fr; gap: .45rem; align-items: start; padding: .28rem .35rem; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
    .product-legend-item:hover, .product-legend-item.active { background: #f3f7fb; border-color: #dfe8f2; transform: translateX(2px); }
    .product-legend-item > span:first-child { width: 8px; height: 8px; border-radius: 50%; margin-top: .25rem; }
    .product-copy { min-width: 0; line-height: 1.15; }
    .product-copy strong, .product-copy small { display: block; font-size: .7rem; }
    .product-copy small { margin-top: .2rem; color: var(--muted); }

    .office-chart { min-height: 250px; display: grid; align-content: center; gap: .75rem; }
    .office-row { width: 100%; display: grid; grid-template-columns: 82px minmax(100px, 1fr) 92px; align-items: center; gap: .6rem; padding: .16rem .2rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; font-size: .67rem; cursor: pointer; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
    .office-row:hover, .office-row.active { background: #f6f9fc; border-color: #e1e8f1; transform: translateX(2px); }
    .office-row > span { color: var(--muted); }
    .office-track { height: 23px; border-left: 1px solid #cfd7e2; background-image: linear-gradient(to right, #edf1f6 1px, transparent 1px); background-size: 33.333% 100%; }
    .office-track i { display: block; height: 100%; width: 0; border-radius: 0 3px 3px 0; transform-origin: left; animation: captureBarGrow 760ms cubic-bezier(.2, .8, .25, 1) both; }
    .office-row:nth-child(2) .office-track i { animation-delay: 80ms; }
    .office-row:nth-child(3) .office-track i { animation-delay: 160ms; }
    .office-row:nth-child(4) .office-track i { animation-delay: 240ms; }
    .office-row:nth-child(5) .office-track i { animation-delay: 320ms; }
    .office-row strong { white-space: nowrap; font-size: .68rem; }
    .office-row strong small { color: var(--muted); font-weight: 500; }
    .office-axis { display: flex; justify-content: space-between; margin-left: 91px; margin-right: 92px; color: var(--muted); font-size: .62rem; }

    .capture-table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: .9rem; }
    .capture-table-card { padding-bottom: .55rem; }
    .capture-table { min-width: 650px; }
    .table-name, .campaign-name { display: inline-flex; align-items: center; gap: .45rem; }
    .table-name i, .campaign-name > i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
    .potential, .campaign-status { display: inline-block; min-width: 56px; text-align: center; padding: .25rem .45rem; border-radius: 5px; font-weight: 800; }
    .potential.alto, .campaign-status.active { background: #e6f7ee; color: #09824b; }
    .potential.medio { background: #fff5d9; color: #a56c00; }
    .campaign-name span strong, .campaign-name span small { display: block; }
    .campaign-name span small { color: var(--muted); font-size: .6rem; margin-top: .15rem; }
    .campaign-status.paused { background: #edf0f4; color: #64748b; }
    .capture-link { color: #1372c8; border: 0; padding: 0; background: transparent; font-size: .7rem; }

    .capture-recommendations { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); padding: .8rem; margin-bottom: .9rem; }
    .recommendation-intro { display: flex; align-items: center; gap: .7rem; padding-right: .8rem; }
    .recommendation-intro > span { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #34b36e, #159f61); font-size: 1.35rem; }
    .recommendation-intro strong, .recommendation-intro small { display: block; }
    .recommendation-intro small { color: var(--muted); margin-top: .25rem; font-size: .66rem; line-height: 1.4; }
    .capture-recommendations article { border-left: 1px solid var(--border); padding: .35rem .8rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
    .capture-recommendations article strong { color: #1554a0; font-size: .7rem; }
    .capture-recommendations article p { margin: .25rem 0; color: var(--muted); font-size: .64rem; line-height: 1.3; }
    .capture-recommendations article small { font-size: .64rem; font-weight: 800; }
    .capture-recommendations article > i { color: #174774; }
    .capture-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; padding: .4rem .2rem 0; }

    @keyframes captureKpiEnter {
        from { opacity: 0; transform: translateY(12px) scale(.98); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes goalRingEnter {
        from { opacity: 0; transform: rotate(-90deg) scale(.65); }
        to { opacity: 1; transform: rotate(0) scale(1); }
    }

    @keyframes captureLineDraw {
        from { transform: rotate(var(--line-angle)) scaleX(0); opacity: .35; }
        to { transform: rotate(var(--line-angle)) scaleX(1); opacity: 1; }
    }

    @keyframes capturePointPop {
        from { transform: translate(-50%, 50%) scale(0); opacity: 0; }
        to { transform: translate(-50%, 50%) scale(1); opacity: 1; }
    }

    @keyframes captureDonutEnter {
        from { opacity: 0; transform: rotate(-55deg) scale(.72); }
        to { opacity: 1; transform: rotate(0) scale(1); }
    }

    @keyframes captureBarGrow {
        from { transform: scaleX(0); opacity: .35; }
        to { transform: scaleX(1); opacity: 1; }
    }

    @media (max-width: 1500px) {
        .capture-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .capture-chart-grid { grid-template-columns: 1fr 1fr; }
        .capture-evolution { grid-column: 1 / -1; }
        .capture-recommendations { grid-template-columns: 1fr 1fr; }
        .recommendation-intro { grid-column: 1 / -1; padding: .2rem .2rem .8rem; }
        .capture-recommendations article:nth-of-type(odd) { border-left: 0; }
    }
    @media (max-width: 1050px) {
        .capture-header { align-items: flex-start; }
        .capture-actions { flex-wrap: wrap; justify-content: flex-end; }
        .capture-table-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 820px) {
        .capture-header, .capture-footer { display: grid; }
        .capture-actions { justify-content: flex-start; }
        .capture-kpis, .capture-chart-grid { grid-template-columns: 1fr; }
        .capture-evolution { grid-column: auto; }
        .capture-kpi { min-height: auto; }
    }
    @media (max-width: 560px) {
        .capture-control:first-child { width: 100%; justify-content: center; }
        .product-chart-layout { grid-template-columns: 1fr; justify-items: center; }
        .product-legend { width: 100%; }
        .office-row { grid-template-columns: 75px minmax(80px, 1fr); }
        .office-row strong { grid-column: 2; }
        .office-axis { margin-left: 84px; margin-right: 0; }
        .capture-recommendations { grid-template-columns: 1fr; }
        .capture-recommendations article { border-left: 0; border-top: 1px solid var(--border); }
    }

    @media (prefers-reduced-motion: reduce) {
        .capture-kpi, .goal-ring, .chart-line, .line-point, .capture-donut, .office-track i {
            animation: none;
            opacity: 1;
        }

        .chart-line { transform: rotate(var(--line-angle)) scaleX(1); }
        .line-point { transform: translate(-50%, 50%) scale(1); }
    }

/* Estilos de DashboardPreview.razor */

    .dashboard-preview {
        --panel-border: #e5eaf2;
        --muted-text: #64748b;
        color: #111827;
    }

    .dashboard-enter {
        animation: dashboardEnter 420ms cubic-bezier(.2, .8, .2, 1);
    }

    @keyframes dashboardEnter {
        from {
            opacity: 0;
            transform: translateY(18px) scale(.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .dashboard-preview-header,
    .dashboard-panel,
    .dashboard-kpi {
        border: 1px solid var(--panel-border);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
    }

    .dashboard-preview-header {
        border-radius: 16px;
        padding: 1.25rem;
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        align-items: center;
        margin-bottom: 1rem;
    }

    .dashboard-eyebrow {
        color: var(--dashboard-accent);
        font-weight: 700;
        font-size: 0.78rem;
        /* text-transform: uppercase; removed */
        letter-spacing: .06em;
        margin-bottom: 0.35rem;
    }

    .dashboard-preview-header h2 {
        font-size: 1.45rem;
        margin: 0;
        font-weight: 800;
    }

    .dashboard-preview-header p,
    .panel-heading p {
        margin: 0;
        color: var(--muted-text);
    }

    .dashboard-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.7rem;
        align-items: center;
        justify-content: flex-end;
    }

    .dashboard-action,
    .period-chip {
        border: 1px solid #dbe3ee;
        background: #fff;
        color: #243041;
        border-radius: 10px;
        min-height: 42px;
        padding: 0.55rem 0.8rem;
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .dashboard-user {
        display: flex;
        gap: 0.6rem;
        align-items: center;
    }

    .dashboard-user > span {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #eaf2ff;
        color: var(--dashboard-accent);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .dashboard-user strong,
    .dashboard-user small {
        display: block;
        line-height: 1.1;
    }

    .dashboard-user small {
        color: var(--muted-text);
    }

    .dashboard-kpi-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.9rem;
        margin-bottom: 1rem;
    }

    .dashboard-kpi {
        border-radius: 14px;
        padding: 1.1rem;
        display: grid;
        grid-template-columns: 58px 1fr;
        gap: 0.9rem;
        align-items: center;
    }

    .dashboard-kpi-icon {
        width: 58px;
        height: 58px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6rem;
    }

    .dashboard-kpi small,
    .dashboard-kpi strong,
    .dashboard-trend {
        display: block;
    }

    .dashboard-kpi small {
        font-size: 0.78rem;
        color: #1f2937;
        /* text-transform: uppercase; removed */
        font-weight: 700;
    }

    .dashboard-kpi strong {
        font-size: 1.35rem;
        margin: 0.25rem 0;
    }

    .dashboard-trend {
        font-size: 0.8rem;
        font-weight: 700;
    }

    .tone-info .dashboard-kpi-icon { background: #dff1ff; color: #1676bf; }
    .tone-danger .dashboard-kpi-icon { background: #fee2e2; color: #dc2626; }
    .tone-violet .dashboard-kpi-icon { background: #f0e7ff; color: #7c3aed; }
    .tone-success .dashboard-kpi-icon { background: #dcfce7; color: #16a34a; }
    .tone-warning .dashboard-kpi-icon { background: #fff3cd; color: #b7791f; }
    .trend-positive { color: #16a34a; }
    .trend-negative { color: #dc2626; }
    .trend-neutral { color: #b7791f; }

    .dashboard-chart-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .dashboard-panel {
        border-radius: 16px;
        padding: 1rem;
        overflow: hidden;
    }

    .panel-heading {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        align-items: flex-start;
        margin-bottom: 1rem;
    }

    .panel-heading h3 {
        font-size: 0.95rem;
        /* text-transform: uppercase; removed */
        font-weight: 800;
        margin: 0;
    }

    .period-chip {
        min-height: 36px;
        font-size: 0.83rem;
    }

    .bar-chart {
        position: relative;
        min-height: 290px;
        display: grid;
        grid-template-columns: repeat(6, minmax(72px, 1fr));
        align-items: end;
        gap: 1.2rem;
        padding: 2.2rem 0.4rem 0.5rem;
        background-image: linear-gradient(to top, #e5e7eb 1px, transparent 1px);
        background-size: 100% 20%;
    }

    .bar-total-line {
        position: absolute;
        left: 0;
        right: 0;
        border-top: 2px dashed rgba(220, 38, 38, 0.55);
        z-index: 0;
    }

    .bar-total-line span {
        float: right;
        transform: translateY(-1.2rem);
        color: #dc2626;
        font-weight: 800;
        font-size: 0.82rem;
    }

    .bar-column {
        min-width: 0;
        height: 235px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        gap: 0.35rem;
        position: relative;
        z-index: 1;
    }

    .bar-value {
        font-weight: 800;
        font-size: 0.82rem;
    }

    .bar-fill {
        width: min(44px, 70%);
        min-height: 16px;
        border-radius: 8px 8px 2px 2px;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
        animation: barGrow 720ms ease both;
        transform-origin: bottom;
    }

    @keyframes barGrow {
        from { transform: scaleY(.15); opacity: .45; }
        to { transform: scaleY(1); opacity: 1; }
    }

    .bar-column small {
        color: #4b5563;
        font-size: 0.78rem;
        text-align: center;
    }

    .donut-layout {
        display: grid;
        grid-template-columns: minmax(220px, 300px) 1fr;
        gap: 1.5rem;
        align-items: center;
        min-height: 290px;
    }

    .donut-chart {
        width: min(280px, 100%);
        aspect-ratio: 1;
        border-radius: 50%;
        display: grid;
        place-items: center;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 16px 34px rgba(15, 23, 42, 0.12);
        animation: dashboardSpinIn 620ms ease both;
    }

    @keyframes dashboardSpinIn {
        from { transform: rotate(-16deg) scale(.92); opacity: .4; }
        to { transform: rotate(0) scale(1); opacity: 1; }
    }

    .donut-center {
        width: 42%;
        aspect-ratio: 1;
        border-radius: 50%;
        background: white;
        display: grid;
        place-content: center;
        text-align: center;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    }

    .donut-center strong {
        font-size: 1.25rem;
    }

    .donut-center span {
        color: #111827;
        font-weight: 600;
    }

    .donut-legend {
        display: grid;
        gap: 0.75rem;
    }

    .donut-legend div {
        display: grid;
        grid-template-columns: 12px 1fr auto;
        gap: 0.7rem;
        align-items: center;
    }

    .donut-legend span {
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }

    .dashboard-table-panel {
        padding: 0;
    }

    .dashboard-table-panel .panel-heading {
        padding: 1rem 1rem 0;
    }

    .dashboard-table {
        min-width: 1100px;
    }

    .product-cell {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        font-weight: 700;
    }

    .product-cell i {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        color: white;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
    }

    .risk-badge {
        border-radius: 8px;
        padding: 0.4rem 0.7rem;
        font-weight: 800;
        font-size: 0.76rem;
    }

    .risk-low { background: #dcfce7; color: #15803d; }
    .risk-medium { background: #fef3c7; color: #b45309; }
    .risk-high { background: #fee2e2; color: #dc2626; }
    .risk-text-low { color: #15803d; font-weight: 800; }
    .risk-text-medium { color: #b45309; font-weight: 800; }
    .risk-text-high { color: #dc2626; font-weight: 800; }

    .sparkline {
        width: 96px;
        height: 28px;
    }

    .dashboard-footer {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
        padding: 0.95rem 1rem 0;
        color: #64748b;
        font-size: 0.85rem;
    }

    @media (max-width: 1400px) {
        .dashboard-kpi-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .dashboard-chart-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 768px) {
        .dashboard-preview-header,
        .panel-heading {
            display: grid;
        }

        .dashboard-actions {
            justify-content: flex-start;
        }

        .dashboard-kpi-grid {
            grid-template-columns: 1fr;
        }

        .bar-chart {
            overflow-x: auto;
            grid-template-columns: repeat(6, 78px);
        }

        .donut-layout {
            grid-template-columns: 1fr;
        }
    }

/* Estilos de DashboardSelector.razor */

    .dashboard-selector {
        display: grid;
        gap: 0.85rem;
    }

    .dashboard-selector-card {
        width: 100%;
        border: 1px solid #e5eaf2;
        background: #fff;
        color: #1f2937;
        border-radius: 12px;
        padding: 0.9rem;
        display: grid;
        grid-template-columns: 44px 1fr auto;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
        transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    }

    .dashboard-selector-card:hover,
    .dashboard-selector-card.active {
        border-color: color-mix(in srgb, var(--dashboard-accent), #ffffff 30%);
        box-shadow: 0 16px 36px color-mix(in srgb, var(--dashboard-accent), transparent 82%);
        transform: translateY(-2px);
    }

    .dashboard-selector-card.active {
        background: linear-gradient(135deg, color-mix(in srgb, var(--dashboard-accent), #ffffff 92%), #fff);
    }

    .selector-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: color-mix(in srgb, var(--dashboard-accent), #ffffff 86%);
        color: var(--dashboard-accent);
        font-size: 1.2rem;
    }

    .selector-copy {
        min-width: 0;
        display: grid;
        gap: 0.2rem;
    }

    .selector-copy strong {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .selector-copy small {
        color: #64748b;
        line-height: 1.25;
    }

    .selector-arrow {
        color: var(--dashboard-accent);
        font-size: 1.3rem;
        opacity: 0.75;
    }

    .dashboard-selector.compact {
        display: flex;
        gap: .3rem;
        padding: .32rem;
        overflow-x: auto;
        border: 1px solid #dfe6ef;
        border-radius: 13px;
        background: rgba(255, 255, 255, .88);
        box-shadow: 0 8px 22px rgba(15, 35, 64, .06);
        scrollbar-width: none;
    }

    .dashboard-selector.compact::-webkit-scrollbar {
        display: none;
    }

    .dashboard-selector.compact .dashboard-selector-card {
        width: auto;
        min-width: max-content;
        grid-template-columns: 32px auto;
        gap: .5rem;
        border-color: transparent;
        border-radius: 9px;
        padding: .45rem .72rem;
        box-shadow: none;
    }

    .dashboard-selector.compact .dashboard-selector-card:hover {
        transform: none;
        box-shadow: none;
        background: #f7f9fc;
    }

    .dashboard-selector.compact .dashboard-selector-card.active {
        transform: none;
        border-color: color-mix(in srgb, var(--dashboard-accent), #ffffff 55%);
        background: color-mix(in srgb, var(--dashboard-accent), #ffffff 90%);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--dashboard-accent), transparent 84%);
    }

    .dashboard-selector.compact .selector-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: .95rem;
    }

    .dashboard-selector.compact .selector-copy {
        display: block;
    }

    .dashboard-selector.compact .selector-copy strong {
        font-size: .78rem;
        white-space: nowrap;
    }

    .dashboard-selector.compact .selector-copy small,
    .dashboard-selector.compact .selector-arrow {
        display: none;
    }

/* #fin Modulo Dashboards */
/* #Modulo DiaFestivo */
.holiday-calendar { background: #f8fafc; }
.calendar-month { min-width: 150px; text-align: center; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: #dbe3ef; margin: 0 16px 16px; border: 1px solid #dbe3ef; border-radius: 8px; overflow: hidden; }
.calendar-head { margin-bottom: 0; border-bottom: 0; background: #1e3a8a; color: white; font-size: 12px; font-weight: 700; /* text-transform: uppercase; removed */ }
.calendar-head div { padding: 10px; text-align: center; }
.calendar-day { min-height: 132px; background: white; padding: 8px; position: relative; }
.calendar-day.muted { background: #f1f5f9; }
.calendar-day.has-holiday { background: #eff6ff; box-shadow: inset 0 0 0 2px #3b82f6; }
.calendar-day-number { font-weight: 800; color: #1e293b; margin-bottom: 6px; }
.holiday-pill { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid #1e3a8a; border-radius: 6px; background: #dbeafe; color: #0f172a; padding: 5px 7px; margin-bottom: 5px; line-height: 1.1; }
.holiday-pill span { display: block; font-weight: 800; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holiday-pill small { display: block; color: #475569; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-holidays { font-size: 11px; color: #1e3a8a; font-weight: 700; }
/* #fin Modulo DiaFestivo */
/* #Modulo Administraci�n de Secuenciales */
.dropdown-menu { margin: 0; }
/* #fin Modulo Administraci�n de Secuenciales */

/* #Modulo Conectar WhatsApp para cobranza preventiva (en desarrollo) */

    .whatsapp-card {
        background: #fff;
        border: 1px solid #e3e8ef;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .whatsapp-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 20px 24px;
        border-bottom: 1px solid #e3e8ef;
    }

    .whatsapp-title {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .whatsapp-icon {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        background: #eaf2ff;
        color: #092F88;
        font-size: 22px;
    }

    .whatsapp-body {
        padding: 24px;
    }

    .whatsapp-state {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 20px;
    }

    .state-box {
        border: 1px solid #e3e8ef;
        border-radius: 8px;
        padding: 14px;
        background: #f8fafc;
    }

    .state-label {
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        /* text-transform: uppercase; removed */
    }

    .state-value {
        color: #0f172a;
        font-weight: 700;
        margin-top: 6px;
    }

    .connection-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-radius: 999px;
        padding: 5px 12px;
        font-weight: 700;
        font-size: 13px;
    }

    .connection-open {
        background: #d1fae5;
        color: #047857;
    }

    .connection-closed {
        background: #fee2e2;
        color: #b91c1c;
    }

    .connection-pending {
        background: #fef3c7;
        color: #92400e;
    }

    .action-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
    }

    .btn-primary-core {
        background: #1f3a5f;
        border-color: #1f3a5f;
        color: #fff;
        font-weight: 700;
    }

    .btn-primary-core:hover {
        background: #092F88;
        border-color: #092F88;
        color: #fff;
    }

    .qr-panel {
        border: 1px dashed #b9c7d8;
        border-radius: 8px;
        min-height: 280px;
        padding: 24px;
        display: grid;
        place-items: center;
        background: #fbfdff;
        text-align: center;
    }

    .qr-panel img {
        max-width: 280px;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .whatsapp-alert {
        border-radius: 8px;
        padding: 12px 14px;
        margin-bottom: 18px;
        font-weight: 600;
    }

    @media (max-width: 768px) {
        .whatsapp-header {
            align-items: flex-start;
            flex-direction: column;
        }

        .whatsapp-state {
            grid-template-columns: 1fr;
        }
    }

/* #fin Modulo Conectar WhatsApp para cobranza preventiva (en desarrollo) */


/* #Modulo Configuracion de correos */

    .email-config-card {
        background: #fff;
        border: 1px solid #e3e8ef;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .email-config-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 20px 24px;
        border-bottom: 1px solid #e3e8ef;
    }

    .email-config-title {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .email-config-icon {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        background: #eaf2ff;
        color: #092F88;
        font-size: 22px;
    }

    .email-config-body {
        padding: 24px;
    }

    .email-config-help {
        border: 1px solid #bae6fd;
        background: #e0f2fe;
        color: #075985;
        border-radius: 8px;
        padding: 12px 14px;
        margin-bottom: 20px;
        font-weight: 600;
    }

    .config-section {
        border: 1px solid #e3e8ef;
        border-radius: 8px;
        padding: 18px;
        margin-bottom: 18px;
        background: #fbfdff;
    }

    .config-section-title {
        color: #092F88;
        font-weight: 800;
        margin-bottom: 14px;
    }



    .btn-primary-core {
        background: #10b981;
        border-color: #10b981;
        color: #fff;
        font-weight: 700;
    }

    .btn-primary-core:hover {
        background: #059669;
        border-color: #059669;
        color: #fff;
    }

    @media (max-width: 768px) {
        .email-config-header {
            align-items: flex-start;
            flex-direction: column;
        }
    }


/* Animacion Checkbox Circular Giratorio */
.animated-check-container {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.check-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.check-circle i {
    color: transparent;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: rotate(-180deg) scale(0);
}
.check-circle.active {
    border-color: #10b981;
    background-color: #d1fae5;
}
.check-circle.active i {
    color: #10b981;
    transform: rotate(0deg) scale(1);
}

.custom-consent-box {
    width: fit-content;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* ======================================================
   #Modulo SimuladorCredito
====================================================== */

/* Scroll interno de tabs del modal de Solicitud de Credito */
.modal-tab-scroll {
    max-height: 60vh;
    overflow-y: auto;
}

/* Tabla de documentos adjuntos */
.documentos-table-wrap {
    border: 1px solid #DDE3EA;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.documentos-table .document-name {
    color: #1B3457;
    font-weight: 700;
}

.documentos-table .document-file {
    color: #475569;
    max-width: 360px;
}

.documentos-table .document-file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documentos-upload {
    max-width: 260px;
    font-size: .82rem;
}

.documentos-actions {
    gap: .35rem;
    white-space: nowrap;
}

.documentos-actions .btn,
.documentos-actions .action-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    border: none;
}

.documentos-actions .action-btn-upload {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.documentos-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
    z-index: 2;
}

/* Soft Buttons Palette */
.btn-soft-primary {
    background-color: #e0f2fe;
    color: #0284c7;
}
.btn-soft-primary:hover {
    background-color: #0284c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-soft-secondary {
    background-color: #f1f5f9;
    color: #475569;
}
.btn-soft-secondary:hover {
    background-color: #475569;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(71, 85, 105, 0.2);
}

.btn-soft-info {
    background-color: #e0e7ff;
    color: #4f46e5;
}
.btn-soft-info:hover {
    background-color: #4f46e5;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.btn-soft-success {
    background-color: #dcfce7;
    color: #16a34a;
}
.btn-soft-success:hover {
    background-color: #16a34a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
}

.btn-soft-warning {
    background-color: #fef3c7;
    color: #d97706;
}
.btn-soft-warning:hover {
    background-color: #d97706;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.2);
}

.btn-soft-danger {
    background-color: #fee2e2;
    color: #dc2626;
}
.btn-soft-danger:hover {
    background-color: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* ======================================================
   #fin Modulo SimuladorCredito
====================================================== */

/* ======================================================
   #modal de conflicto de sesiones activas
====================================================== */

/* Fondo oscuro con efecto de desenfoque (Glassmorphism) */
.session-conflict-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65); /* Color oscuro semi-transparente */
    backdrop-filter: blur(6px); /* Desenfoque del fondo */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Tarjeta del modal */
.session-conflict-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Animación de rebote sutil al aparecer */
    animation: modalPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Estilos del icono */
.modal-icon {
    width: 64px;
    height: 64px;
    background-color: #fef3c7; /* Fondo amarillo suave */
    color: #d97706; /* Naranja vibrante para alerta */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

    .modal-icon svg {
        width: 32px;
        height: 32px;
    }

/* Tipografía */
.session-conflict-modal h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #1e293b;
}

.session-conflict-modal p {
    margin: 0 0 2rem 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

/* Botones: Asegura que compartan el 50% del espacio cada uno */
.session-conflict-actions {
    display: flex;
    gap: 1rem;
}

    .session-conflict-actions .btn {
        flex: 1; /* Ambos botones miden exactamente lo mismo */
        padding: 0.65rem 1rem;
        font-weight: 500;
        border-radius: 8px; /* Bordes un poco más redondeados para coincidir con el modal */
    }

/* Animación Keyframes */
@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(15px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ======================================================
   #fin de modal de conflicto de sesiones activas
====================================================== */

/* ======================================================
   #Modulo SimuladorCredito - Loader, Hover Botones, Check
====================================================== */

/* --- Loader Overlay (sobre el area del formulario) --- */
.app-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: grid;
    place-items: center;
    background: transparent;
    animation: appModalEnter 0.2s ease-out both;
}

.app-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 5rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(30, 95, 140, 0.16), 0 2px 8px rgba(0,0,0,0.07);
    animation: appLoaderPulse 2s ease-in-out infinite;
    min-width: 410px;
}

.app-loader-logo-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.app-loader-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.app-loader-spinner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
    background: conic-gradient(
        from 0deg,
        #1E5F8C 0%,
        #FFFFFF 25%,
        #9CA3AF 50%,
        #15803D 75%,
        #1E5F8C 100%
    ) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: appLoaderSpin 1.2s linear infinite;
}

.app-loader-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1E5F8C;
    letter-spacing: 0.01em;
    text-align: center;
}

/* --- Keyframes Loader --- */
@keyframes appLoaderSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes appLoaderPulse {
    0%, 100% {
        box-shadow: 0 8px 40px rgba(30, 95, 140, 0.16), 0 2px 8px rgba(0,0,0,0.07);
    }
    50% {
        box-shadow: 0 8px 50px rgba(30, 95, 140, 0.38), 0 4px 20px rgba(30,95,140,0.18);
    }
}

@keyframes appModalEnter {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Bot�n Consultar / Pre evaluar con hover mejorado --- */
.btn-consulta {
    transition: background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease !important;
}
.btn-consulta:hover:not(:disabled) {
    background-color: #164A6B !important;
    border-color: #164A6B !important;
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(22, 74, 107, 0.28) !important;
}
.btn-consulta:active:not(:disabled) {
    transform: scale(0.98);
}

/* --- Check animado - color verde sistema --- */
.check-circle.active {
    border-color: #15803D !important;
    background-color: #dcfce7 !important;
}
.check-circle.active i {
    color: #15803D !important;
}

/* --- Check grande (footer modal Genera Credito) --- */
.check-circle-lg {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2.5px solid #cbd5e1;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.check-circle-lg i {
    color: transparent;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: rotate(-180deg) scale(0);
}
.check-circle-lg.active {
    border-color: #15803D !important;
    background-color: #dcfce7 !important;
}
.check-circle-lg.active i {
    color: #15803D !important;
    transform: rotate(0deg) scale(1);
}

/* --- Mini modal confirmacion Guardar --- */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    min-width: 360px;
    max-width: 480px;
    box-shadow: 0 16px 56px rgba(0,0,0,0.18);
    animation: appModalEnter 0.25s cubic-bezier(.4,0,.2,1) both;
    text-align: center;
}
.confirm-modal-card .confirm-icon {
    font-size: 2.5rem;
    color: #1E5F8C;
    margin-bottom: 0.75rem;
}
.confirm-modal-card .confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.4rem;
}
.confirm-modal-card .confirm-subtitle {
    font-size: 0.88rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
}
.confirm-modal-card .confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.success-modal-overlay {
    backdrop-filter: blur(2px);
}

.success-modal-card {
    background: #fff;
    border-radius: 18px;
    padding: 2.25rem 2.75rem;
    width: min(92vw, 460px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    animation: successModalEnter 0.28s cubic-bezier(.22,1,.36,1) both;
    text-align: center;
}

.success-check-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 1.25rem;
    display: grid;
    place-items: center;
}

.success-check-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.14);
    animation: successRingPulse 0.74s ease-out both;
}

.success-check-icon {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 32px rgba(22, 163, 74, 0.32);
    animation: successCheckPop 0.44s cubic-bezier(.34,1.56,.64,1) 0.08s both;
}

.success-check-icon i {
    font-size: 2.45rem;
    line-height: 1;
}

.success-modal-card .confirm-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.success-modal-card .confirm-subtitle {
    font-size: 0.92rem;
    color: #6B7280;
    margin-bottom: 0;
}

.success-modal-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #166534;
    font-size: 0.9rem;
}

.success-modal-detail span {
    color: #15803d;
    font-weight: 600;
}

.success-modal-detail strong {
    color: #14532d;
    font-weight: 800;
}

.success-modal-card .confirm-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

@keyframes successModalEnter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes successCheckPop {
    from {
        opacity: 0;
        transform: scale(0.55) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes successRingPulse {
    0% {
        opacity: 0;
        transform: scale(0.62);
    }
    55% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 0.72;
        transform: scale(1);
    }
}

/* ======================================================
   #fin Modulo SimuladorCredito - Loader, Hover Botones, Check
====================================================== */





/* ======================================================
   # Modulo AdministracionCajeros - Caja/Cajero
====================================================== */
.time-select {
    background-color: #eef6ff;
    border-color: #9ec5fe;
    color: #0b3d75;
    font-weight: 700;
}
.time-select:disabled {
    background-color: #e7f1ff;
    border-color: #86b7fe;
    color: #084298;
    opacity: 1;
    cursor: not-allowed;
}

.dia-completo-check {
    padding-left: 0;
}
.dia-completo-check .form-check-input {
    width: 1.55rem;
    height: 1.55rem;
    margin-left: 0;
    border: 2px solid #0d6efd;
    border-radius: 6px;
    cursor: pointer;
}
.dia-completo-check .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

.bounce-in {
    animation: bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes bounce {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.custom-backdrop {
    animation: fadeIn 0.3s ease-out both;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}





/* ======================================================
   PROFILE DROPDOWN
====================================================== */
.profile-dropdown {
    min-width: 340px;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12) !important;
    animation: fadeInDropdown 0.2s ease-out;
}

.profile-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.profile-dropdown .dropdown-item:hover {
    background-color: #fee2e2;
    color: #dc2626 !important;
}

/* #Modulo Caja */
.caja-col-actions-wide {
    width: 250px;
}

.caja-col-actions-narrow {
    width: 80px;
}

.caja-count-column {
    width: 120px;
}

.caja-confirmation-panel {
    max-width: 600px;
}

.caja-amount-panel {
    padding: 1rem;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #f8fafc;
}

.caja-reassign-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe0f5 !important;
    border-radius: 8px;
    background: #eaf3ff;
    color: #2b8bd8;
    box-shadow: 0 6px 14px rgba(43, 139, 216, .14);
    transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.caja-reassign-btn:hover,
.caja-reassign-btn:focus {
    background: #2b8bd8;
    color: #fff;
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 10px 22px rgba(43, 139, 216, .26);
}

.caja-form-card,
.modal-body .caja-form-card {
    border-radius: 8px;
}

.modal-body .caja-form-card {
    border: 0 !important;
    box-shadow: none !important;
}

.modal-body .caja-form-card > .card-header,
.modal-body .caja-form-actions {
    display: none !important;
}

.modal-body .caja-form-card > .card-body {
    padding: 0 !important;
    background: #fff;
}

.custom-floating > label {
    padding-left: 1.25rem;
}

.custom-input {
    background-color: #ffffff;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out, background-color .2s ease-in-out;
}

.custom-input:focus:not([disabled]) {
    background-color: #fff;
    border-color: #2b8bd8;
    box-shadow: 0 0 0 .22rem rgba(43, 139, 216, .16);
}

.bg-e9ecef {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}

.time-select {
    background-color: #eef6ff;
    border-color: #9ec5fe;
    color: #0b3d75;
    font-weight: 700;
}

.time-select:disabled {
    background-color: #e7f1ff;
    border-color: #86b7fe;
    color: #084298;
    cursor: not-allowed;
    opacity: 1;
}

.dia-completo-check {
    padding-left: 0;
}

.dia-completo-check .form-check-input {
    width: 1.55rem;
    height: 1.55rem;
    margin-left: 0;
    border: 2px solid #2b8bd8;
    border-radius: 6px;
    cursor: pointer;
}

.dia-completo-check .form-check-input:checked {
    background-color: #148f5a;
    border-color: #148f5a;
}

.modal.show .modal-header .bg-org-icon,
.modal.show .modal-header .app-icon-box {
    width: 56px;
    height: 56px;
}

.modal.show .modal-header {
    min-height: 94px;
    padding: 1.15rem 1.5rem !important;
}

.modal.show .modal-body {
    padding: 2rem 1.5rem 1.5rem;
}

.modal.show .modal-footer {
    padding: 1rem 1.25rem;
}

.field-counter-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 0.25rem;
}

.field-counter-row .form-label {
    margin-bottom: 0;
}

.field-counter {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.field-counter.is-near-limit {
    color: #b45309;
}

.field-counter.is-at-limit {
    color: #dc2626;
}

.app-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 30000;
    width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
}

.app-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem 1rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
    animation: appToastIn .24s ease-out both;
    pointer-events: auto;
}

.app-toast-success {
    border-left: 4px solid #148f5a;
}

.app-toast-danger,
.app-toast-error {
    border-left: 4px solid #dc2626;
}

.app-toast-warning {
    border-left: 4px solid #d97706;
}

.app-toast-info {
    border-left: 4px solid #2563eb;
}

.app-toast-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.2rem;
}

.app-toast-icon.success {
    background: #dcfce7;
    color: #148f5a;
    animation: appToastCheck .48s cubic-bezier(.2, .9, .25, 1.35) both;
}

.app-toast-icon.danger,
.app-toast-icon.error {
    background: #fee2e2;
    color: #b91c1c;
}

.app-toast-icon.warning {
    background: #fef3c7;
    color: #b45309;
}

.app-toast-icon.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.app-toast-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-toast-content strong {
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.2;
}

.app-toast-content span {
    color: #536071;
    font-size: 0.9rem;
    line-height: 1.35;
}

.app-toast-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    transition: background-color .18s ease, color .18s ease;
}

.app-toast-close:hover,
.app-toast-close:focus {
    background: #f1f5f9;
    color: #0f172a;
}

@keyframes appToastIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes appToastCheck {
    0% {
        transform: scale(.72);
    }
    58% {
        transform: scale(1.14);
    }
    100% {
        transform: scale(1);
    }
}

.image-uploader {
    max-width: 400px;
}

.upload-input {
    display: none;
}

.upload-area {
    border: 2px dashed #cfd8dc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, opacity .2s ease;
    background: #fafafa;
}

.upload-area.dragging {
    border-color: #3f51b5;
    background: #f0f4ff;
}

.upload-area.uploading {
    cursor: wait;
}

.upload-placeholder,
.upload-progress-state {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-icon {
    font-size: 40px;
}

.upload-text {
    font-size: 15px;
}

.upload-info {
    font-size: 12px;
    color: #777;
}

.upload-progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    appearance: none;
}

.upload-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e5e7eb;
}

.upload-progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, #0d6efd, #148f5a);
    transition: width .2s ease;
}

.upload-progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #0d6efd, #148f5a);
}

.preview-container {
    position: relative;
}

.preview-image {
    width: 100%;
    border-radius: 8px;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f44336;
    color: #fff;
    cursor: pointer;
}

.upload-error {
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
}

/* #fin Modulo Caja */

.socio-datos-pane {
    position: relative;
}

.socio-document-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.62);
}

.socio-document-modal {
    position: fixed;
    inset: 0;
    z-index: 20001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.socio-document-dialog {
    width: min(96vw, 1500px);
    height: min(94vh, 980px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.socio-document-header {
    flex: 0 0 auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
}

.socio-document-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.socio-document-body .viewer-shell {
    height: 100%;
    min-height: 0;
}

.socio-consulta-action {
    padding-top: 1.75rem;
}

.socio-consulta-action .btn-consulta {
    min-height: 38px;
}

@media (max-width: 767.98px) {
    .socio-consulta-action {
        padding-top: 0;
    }
}

/* Modal pago de cuota */
.payment-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.payment-summary-item {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.9rem 1rem;
}

.payment-summary-item span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.payment-summary-item strong {
    display: block;
    color: #111827;
    font-size: 1.05rem;
    margin-top: 0.25rem;
}

.payment-summary-balance {
    background: #eef7ff;
    border-color: #bfdbfe;
}

.payment-summary-balance strong {
    color: #0b5f9e;
}

.payment-field .form-label {
    color: #1f2937;
    margin-bottom: 0.45rem;
}

.payment-select {
    min-height: 42px;
    border-radius: 8px;
}

.payment-detail-card {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.payment-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid #edf2f7;
    background: #fbfdff;
}

.payment-detail-header h6 {
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.payment-detail-header span {
    color: #64748b;
    font-size: 0.82rem;
}

.payment-status-badge {
    flex: 0 0 auto;
    border: 1px solid #facc15;
    border-radius: 999px;
    background: #fef9c3;
    color: #854d0e !important;
    font-size: 0.75rem !important;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
}

.payment-breakdown {
    padding: 0.8rem 1rem 1rem;
}

.payment-breakdown-row,
.payment-breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0;
}

.payment-breakdown-row span {
    color: #475569;
}

.payment-breakdown-row strong {
    color: #1f2937;
}

.payment-breakdown-total {
    margin-top: 0.45rem;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    padding: 0.8rem 0.9rem;
}

.payment-breakdown-total span {
    color: #166534;
    font-weight: 800;
}

.payment-breakdown-total strong {
    color: #14532d;
    font-size: 1.2rem;
}

@media (max-width: 575.98px) {
    .payment-summary-grid {
        grid-template-columns: 1fr;
    }

    .payment-detail-header {
        flex-direction: column;
    }
}

/* Historial de rendimiento del socio */
.performance-history-card {
    background: #fff;
    overflow: hidden;
}

.performance-history-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #dbe3ef;
    background: #f8fafc;
}

.performance-history-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eaf2ff;
    color: #1e5f8c;
    flex: 0 0 auto;
}

.performance-history-icon i {
    font-size: 1.35rem;
}

.performance-history-header h5 {
    color: #111827;
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0;
}

.performance-history-header small {
    color: #64748b;
    display: block;
    margin-top: 0.15rem;
}

.performance-history-body {
    padding: 1rem;
}

.performance-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.performance-metric-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 0.95rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.performance-metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.performance-metric-icon i {
    font-size: 1.1rem;
}

.performance-metric-card span {
    color: #475569;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: uppercase;
}

.performance-metric-card strong {
    color: #111827;
    display: block;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.15;
    margin-top: 0.3rem;
}

.performance-metric-card small {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    line-height: 1.3;
    margin-top: 0.35rem;
}

.performance-metric-credit .performance-metric-icon {
    background: #eaf2ff;
    color: #1e5f8c;
}

.performance-metric-last-credit .performance-metric-icon {
    background: #eef2f7;
    color: #475569;
}

.performance-metric-savings-count .performance-metric-icon {
    background: #ecfeff;
    color: #0e7490;
}

.performance-metric-savings-total {
    border-color: #fde68a;
    background: #fffbeb;
}

.performance-metric-savings-total .performance-metric-icon {
    background: #fef3c7;
    color: #b45309;
}

.performance-metric-savings-total strong {
    color: #92400e;
}

@media (max-width: 1199.98px) {
    .performance-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .performance-metric-grid {
        grid-template-columns: 1fr;
    }

    .performance-metric-card {
        min-height: auto;
    }
}


/* Estilos movidos de Transaccion.razor */
    .modal-responsivo-container {
        --modal-width: 650px;
        --modal-offset-left: -330px;
        --modal-offset-right: 340px;
    }

    @media (max-width: 1280px) {
        .modal-responsivo-container {
            --modal-width: 480px;
            --modal-offset-left: -245px;
            --modal-offset-right: 255px;
        }
    }

    .modal-custom-bancario {
        max-width: var(--modal-width) !important;
        width: 95%;
        transition: max-width 0.3s ease-out;
    }

    .origen-fondos-alert {
        background: linear-gradient(135deg, #fff3cd, #ffe69c);
        font-size: 0.88rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .origen-fondos-alert-text {
        flex: 1 1 320px;
        min-width: 0;
        line-height: 1.55;
    }

    .origen-fondos-action {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .origen-fondos-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        min-width: 142px;
        white-space: nowrap;
        line-height: 1.2;
        padding: 0.45rem 0.75rem;
        box-sizing: border-box;
    }

    @media (max-width: 576px) {
        .origen-fondos-action,
        .origen-fondos-btn {
            width: 100%;
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

/* Scrollable content in Transaccion modal */
#modalContentCliente {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Forzar comportamiento scrollable (cabecera y footer fijos) en TODOS los modales */
.modal-content {
    max-height: calc(100vh - 3.5rem) !important;
    display: flex;
    flex-direction: column;
}
.modal-body {
    overflow-y: auto !important;
    flex-shrink: 1;
}

.module-loader-region {
    position: relative;
    min-height: 18rem;
}

/* Páginas independientes: el cargador se centra en el área útil completa,
   no solamente sobre el encabezado y los filtros. */
.module-loader-region-page {
    min-height: calc(100vh - 10rem);
}

@media (max-width: 767.98px) {
    .module-loader-region-page {
        min-height: 28rem;
    }
}

.app-loader-overlay-local {
    position: absolute;
    z-index: 2;
    min-height: 18rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.84);
}

.app-loader-card-local {
    min-width: 0;
    padding: 2rem 2.5rem;
}

.app-loader-overlay-local .app-loader-logo-wrap {
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1rem;
}

.app-loader-overlay-local .app-loader-logo {
    width: 3rem;
    height: 3rem;
}

.app-loader-overlay-local .app-loader-text {
    font-size: 0.95rem;
}

/* El contenido se mantiene renderizado durante una consulta para conservar
   el contexto de la página; el overlay impide acciones sobre resultados
   todavía incompletos. */
.module-loading-content.is-loading {
    pointer-events: none;
    visibility: hidden;
}

.module-loading-content.is-loading .app-card-header,
.module-loading-content.is-loading .app-section-title,
.module-loading-content.is-loading .card-header,
.module-loading-content.is-loading .app-title-group,
.module-loading-content.is-loading .p-3.border-bottom {
    position: relative;
    z-index: 3;
    background-color: inherit;
    visibility: visible;
}

/* Solicitudes de credito: tabla densa, legible y con scroll solo si es necesario. */
.app-card > .table-responsive.solicitudes-credito-table-wrapper {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.solicitudes-credito-table-wrapper > .solicitudes-credito-table {
    width: 100% !important;
    min-width: 1200px !important;
    max-width: none !important;
    table-layout: fixed !important;
}

.solicitudes-credito-table th,
.solicitudes-credito-table td {
    overflow: hidden;
    padding: .55rem .45rem;
}

.solicitudes-credito-table th {
    font-size: .83rem;
    line-height: 1.12;
    vertical-align: middle;
    white-space: normal;
}

.solicitudes-credito-table th:nth-child(1),
.solicitudes-credito-table td:nth-child(1) { width: 5.5%; }
.solicitudes-credito-table th:nth-child(2),
.solicitudes-credito-table td:nth-child(2) { width: 8%; }
.solicitudes-credito-table th:nth-child(3),
.solicitudes-credito-table td:nth-child(3) { width: 7%; }
.solicitudes-credito-table th:nth-child(4),
.solicitudes-credito-table td:nth-child(4) { width: 12%; }
.solicitudes-credito-table th:nth-child(5),
.solicitudes-credito-table td:nth-child(5) { width: 8%; }
.solicitudes-credito-table th:nth-child(6),
.solicitudes-credito-table td:nth-child(6) { width: 6.5%; }
.solicitudes-credito-table th:nth-child(7),
.solicitudes-credito-table td:nth-child(7) { width: 8%; }
.solicitudes-credito-table th:nth-child(8),
.solicitudes-credito-table td:nth-child(8) { width: 6.5%; }
.solicitudes-credito-table th:nth-child(9),
.solicitudes-credito-table td:nth-child(9) { width: 7%; }
.solicitudes-credito-table th:nth-child(10),
.solicitudes-credito-table td:nth-child(10) { width: 10%; }
.solicitudes-credito-table th:nth-child(11),
.solicitudes-credito-table td:nth-child(11) { width: 8.5%; }
.solicitudes-credito-table th:nth-child(12),
.solicitudes-credito-table td:nth-child(12) { width: 13%; }

.solicitud-col-fecha {
    line-height: 1.35;
}

.solicitud-origen-badge {
    display: inline-block;
    max-width: 100%;
    padding: .28rem .5rem;
    overflow: hidden;
    border: 1px solid #9ed5f3;
    border-radius: 999px;
    background: #dff2ff;
    color: #075985;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.solicitud-cell-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.32;
    text-overflow: ellipsis;
}
/* Campañas de prospección */
.prospecting-page .upload-button { border-style: dashed; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.prospecting-page .progress { height: 9px; border-radius: 999px; }
.prospecting-page .progress-bar { background-color: var(--bs-primary); }
.nav-prospeccion-icon { position: relative; display: inline-block; width: 24px; height: 24px; margin-right: 12px; vertical-align: middle; }
.nav-prospeccion-icon > .bi-person-fill { position: absolute; inset: 1px auto auto 2px; font-size: 20px; line-height: 1; }
.nav-prospeccion-icon > .bi-search { position: absolute; right: 0; bottom: 0; font-size: 11px; line-height: 1; background: #fff; border-radius: 50%; }
.main-menu .nav-link:hover .nav-prospeccion-icon > .bi-search, .main-menu .nav-link.active .nav-prospeccion-icon > .bi-search { background: #1B3457; }
.prospecting-title-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.prospecting-title-icon .bi-person-fill { font-size: 1.45rem; color: #1B3457; }
.prospecting-title-icon .bi-search { position: absolute; right: .2rem; bottom: .15rem; font-size: .75rem; color: #3A78D4; }
.prospecting-list thead, .preview-grid thead { background: #f1f5f9; border-bottom: 1px solid #1B3457; }
.prospecting-list th, .preview-grid th { font-size: .78rem; font-weight: 700; color: #172033; }
.prospeccion-dropzone { min-height: 42px; border: 1px dashed #3A78D4; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: .65rem; color: #2463eb; cursor: pointer; background: #f8fbff; }
.prospeccion-dropzone small { display: block; color: #64748b; font-size: .72rem; }
.prospeccion-loader { min-height: 160px; display: flex; flex-direction: column; gap: .75rem; align-items: center; justify-content: center; color: #475569; }
.preview-grid { max-height: 360px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.preview-grid-table { min-width: 3600px; font-size: .78rem; }
.preview-grid-table thead th { position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.preview-grid-table td { white-space: nowrap; }
.prospeccion-edit-form label { display: block; margin-bottom: .3rem; font-size: .78rem; font-weight: 600; color: #475569; }
