:root {
    --sueldos-sidebar-width: 252px;
    --sueldos-sidebar-collapsed-width: 76px;
    --sueldos-topbar-height: 62px;
    --sueldos-sidebar-bg: #071437;
    --sueldos-sidebar-bg-2: #0b1c49;
    --sueldos-sidebar-text: #d9e4ff;
    --sueldos-sidebar-muted: #93a4cb;
    --sueldos-primary: #1b84ff;
    --sueldos-success: #17c653;
    --sueldos-surface: #f4f7fb;
    --sueldos-border: #dfe6f1;
    --sueldos-text: #1f2a44;
    --sueldos-muted: #6b7895;
}

.sueldos-password-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--sueldos-primary), var(--sueldos-success));
    box-shadow: 0 10px 24px rgba(27, 132, 255, .24);
    font-size: 1.35rem;
}

.sueldos-employee-bottom-nav {
    position: fixed;
    z-index: 1050;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 64px;
    padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--sueldos-border);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
    backdrop-filter: blur(10px);
}

.sueldos-employee-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    color: var(--sueldos-muted);
    font-size: .68rem;
    font-weight: 700;
    text-decoration: none;
}

.sueldos-employee-bottom-nav a i {
    font-size: 1.15rem;
}

.sueldos-employee-bottom-nav a.active {
    color: var(--sueldos-primary);
}

.sueldos-employee-welcome {
    padding: 1.25rem;
    border-radius: 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, #1b84ff 0%, #056ee9 55%, #17c653 140%);
    box-shadow: 0 12px 28px rgba(27, 132, 255, .20);
}

.sueldos-employee-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.sueldos-employee-quick-card {
    display: flex;
    flex-direction: column;
    min-height: 126px;
    padding: 1rem;
    color: var(--sueldos-text);
    background: #fff;
    border: 1px solid var(--sueldos-border);
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
    text-decoration: none;
}

.sueldos-employee-quick-card strong {
    margin-top: auto;
    font-size: .92rem;
}

.sueldos-employee-quick-card small {
    margin-top: .2rem;
    color: var(--sueldos-muted);
}

.sueldos-employee-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: .8rem;
    background: #f2f6fc;
    font-size: 1.15rem;
}

@media (max-width: 767.98px) {
    body.sueldos-employee-portal .sueldos-content {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    body.sueldos-employee-portal .sueldos-footer {
        display: none;
    }

    body.sueldos-employee-portal .sueldos-page-header {
        display: none;
    }

    body.sueldos-employee-portal .sueldos-topbar {
        padding-right: .8rem;
        padding-left: .8rem;
    }

    .sueldos-password-card .card-body {
        padding: 1.35rem !important;
    }

    .sueldos-access-users-table {
        max-height: 62vh;
    }
}

html {
    font-size: 13px;
}

body.sueldos-bootstrap {
    min-height: 100vh;
    background: var(--sueldos-surface);
    color: var(--sueldos-text);
    overflow-x: hidden;
}

body.sueldos-compact,
body.sueldos-compact .form-control,
body.sueldos-compact .form-select,
body.sueldos-compact .btn,
body.sueldos-compact .table,
body.sueldos-compact .dataTables_wrapper {
    font-size: .84rem;
}

.sueldos-app {
    min-height: 100vh;
}

.sueldos-sidebar {
    position: fixed;
    z-index: 1040;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sueldos-sidebar-width);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--sueldos-sidebar-bg) 0%, var(--sueldos-sidebar-bg-2) 100%);
    box-shadow: 0 10px 35px rgba(7, 20, 55, .18);
    transition: width .18s ease, transform .18s ease;
}

.sueldos-sidebar-brand {
    height: var(--sueldos-topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex: 0 0 auto;
}

.sueldos-brand-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
    min-width: 0;
}

.sueldos-brand-symbol,
.sueldos-login-brand-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--sueldos-primary), var(--sueldos-success));
    box-shadow: 0 8px 20px rgba(27,132,255,.25);
    flex: 0 0 auto;
}

.sueldos-brand-symbol {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.sueldos-login-brand-symbol {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 1.35rem;
}

.sueldos-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    min-width: 0;
}

.sueldos-brand-text strong {
    color: #fff;
    font-weight: 800;
    letter-spacing: .06em;
    font-size: .98rem;
}

.sueldos-brand-text small {
    color: rgba(255,255,255,.70);
    font-weight: 700;
    letter-spacing: .15em;
    font-size: .58rem;
    margin-top: .2rem;
}

.sueldos-sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .8rem .75rem 1rem;
    scrollbar-width: thin;
}

.sueldos-menu-group {
    margin-bottom: 1.1rem;
}

.sueldos-menu-heading {
    padding: .65rem .55rem .45rem;
    color: rgba(255,255,255,.68);
    font-size: .70rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    white-space: nowrap;
}

.sueldos-menu-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 38px;
    padding: .55rem .75rem;
    margin: .12rem 0;
    color: var(--sueldos-sidebar-text);
    border-radius: .72rem;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.sueldos-menu-link:hover {
    color: #fff;
    background: rgba(255,255,255,.10);
}

.sueldos-menu-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(27,132,255,.96), rgba(23,198,83,.90));
    box-shadow: 0 8px 18px rgba(27,132,255,.22);
}

.sueldos-menu-icon {
    width: 19px;
    flex: 0 0 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: .98;
}

.sueldos-menu-icon i {
    font-size: .96rem;
}

.sueldos-menu-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sueldos-sidebar-footer {
    flex: 0 0 auto;
    padding: .75rem .75rem 1rem;
}

.sueldos-sidebar-status {
    padding: .75rem .85rem;
    border-radius: .85rem;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.08);
}

.sueldos-sidebar-status strong,
.sueldos-sidebar-status span {
    display: block;
}

.sueldos-sidebar-status strong {
    color: #fff;
    font-size: .78rem;
}

.sueldos-sidebar-status span {
    color: rgba(255,255,255,.68);
    font-size: .72rem;
    margin-top: .15rem;
}

.sueldos-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: var(--sueldos-sidebar-width);
    transition: margin-left .18s ease;
}

.sueldos-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--sueldos-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.4rem;
    background: rgba(244,247,251,.95);
    border-bottom: 1px solid rgba(223,230,241,.72);
    backdrop-filter: blur(8px);
}

.sueldos-menu-toggle {
    width: 34px;
    height: 34px;
    border-radius: .68rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sueldos-topbar-title {
    color: var(--sueldos-text);
    font-weight: 800;
    font-size: .98rem;
    line-height: 1.1;
}

.sueldos-topbar-subtitle {
    color: var(--sueldos-muted);
    font-size: .78rem;
    margin-top: .18rem;
}

.sueldos-user-button {
    display: flex;
    align-items: center;
    gap: .55rem;
    border: 0;
    background: rgba(255,255,255,.72);
    border-radius: .85rem;
    padding: .35rem .55rem;
    color: var(--sueldos-text);
}

.sueldos-user-button:hover,
.sueldos-user-button:focus {
    background: #fff;
    box-shadow: 0 4px 15px rgba(31,42,68,.08);
}

.sueldos-user-button::after {
    display: none;
}

.sueldos-user-button strong {
    font-size: .78rem;
}

.sueldos-user-button small {
    color: var(--sueldos-muted);
    font-size: .70rem;
}

.sueldos-user-avatar {
    width: 31px;
    height: 31px;
    border-radius: 50%;
}

.sueldos-user-dropdown {
    min-width: 245px;
    border-radius: .85rem;
}

.sueldos-content {
    flex: 1 0 auto;
    padding: 1.2rem 0 1.5rem;
}

.sueldos-page-header {
    margin-bottom: 1rem;
}

.sueldos-page-title {
    color: #071437;
    font-size: 1.22rem;
    font-weight: 800;
    margin: 0;
}

.sueldos-breadcrumb {
    font-size: .78rem;
}

.sueldos-breadcrumb a {
    color: var(--sueldos-muted);
    text-decoration: none;
}

.sueldos-breadcrumb a:hover {
    color: var(--sueldos-primary);
}

.sueldos-footer {
    flex: 0 0 auto;
    color: var(--sueldos-muted);
    font-size: .76rem;
    padding: .75rem 0;
}

body.sidebar-collapsed .sueldos-sidebar {
    width: var(--sueldos-sidebar-collapsed-width);
}

body.sidebar-collapsed .sueldos-main {
    margin-left: var(--sueldos-sidebar-collapsed-width);
}

body.sidebar-collapsed .sueldos-brand-text,
body.sidebar-collapsed .sueldos-menu-heading,
body.sidebar-collapsed .sueldos-menu-text,
body.sidebar-collapsed .sueldos-sidebar-status span,
body.sidebar-collapsed .sueldos-sidebar-status strong {
    display: none;
}

body.sidebar-collapsed .sueldos-brand-link,
body.sidebar-collapsed .sueldos-menu-link {
    justify-content: center;
}

body.sidebar-collapsed .sueldos-sidebar-brand,
body.sidebar-collapsed .sueldos-sidebar-footer {
    padding-left: .75rem;
    padding-right: .75rem;
}

body.sidebar-collapsed .sueldos-sidebar-status {
    min-height: 30px;
    padding: .55rem;
    background: rgba(23,198,83,.18);
}

body.sidebar-collapsed .sueldos-sidebar-status::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 auto;
    background: var(--sueldos-success);
}

.card {
    border: 1px solid var(--sueldos-border);
    border-radius: .85rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.card-header {
    min-height: 42px;
    padding: .65rem .9rem;
    background: #fff;
    border-bottom: 1px solid var(--sueldos-border);
    border-radius: .85rem .85rem 0 0 !important;
}

.card-body {
    padding: .9rem;
}

.card-footer {
    padding: .75rem .9rem;
    background: #fff;
    border-top: 1px solid var(--sueldos-border);
}

.card-title,
.card-header h3,
.card-header h5 {
    font-size: .98rem;
    font-weight: 800;
    margin: 0;
    color: #071437;
}

.form-label,
label {
    font-size: .78rem;
    font-weight: 700;
    color: #3d4966;
    margin-bottom: .35rem;
}

.form-group {
    margin-bottom: .85rem;
}

.form-control,
.form-select,
select.form-control {
    min-height: 34px;
    padding: .45rem .65rem;
    border-radius: .55rem;
    border-color: var(--sueldos-border);
}

textarea.form-control {
    min-height: 78px;
}

.btn {
    padding: .45rem .8rem;
    border-radius: .55rem;
    font-weight: 700;
}

.btn-sm {
    padding: .32rem .55rem;
    font-size: .78rem;
}

.table-responsive,
.sueldos-table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: .75rem;
}

.table {
    margin-bottom: 0;
    white-space: nowrap;
    width: 100% !important;
}

.table > :not(caption) > * > * {
    padding: .46rem .58rem;
    vertical-align: middle;
}

.table thead th {
    color: #25314d;
    font-size: .70rem;
    text-transform: uppercase;
    letter-spacing: .045em;
    font-weight: 800;
    background: #f8fafc;
    border-bottom: 1px solid var(--sueldos-border);
}

.dataTables_wrapper {
    width: 100%;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: .78rem;
    color: var(--sueldos-muted);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--sueldos-border);
    border-radius: .55rem;
    padding: .35rem .55rem;
    outline: none;
}

.dataTables_scroll,
.dataTables_scrollHead,
.dataTables_scrollBody {
    width: 100% !important;
}

.dataTables_scrollBody {
    border-bottom: 1px solid var(--sueldos-border) !important;
}

.dataTables_scrollBody table {
    margin-left: 0 !important;
}

.sueldos-login-shell {
    background: #fff;
}

.sueldos-login-hero {
    background: radial-gradient(circle at top left, rgba(27,132,255,.35) 0, transparent 30%), linear-gradient(135deg, #071437 0%, #0d1b46 55%, #10295f 100%);
}

.ls-2 {
    letter-spacing: .16em;
}

/* Bootstrap 4 compatibility shims used by the legacy MVC views */
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: .75rem !important; }
.ml-1 { margin-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: .75rem !important; }
.float-right { float: right !important; }
.text-right { text-align: right !important; }
.btn-block { display: block; width: 100%; }
.input-group-append { display: flex; }
.input-group-text { min-width: 38px; justify-content: center; }
.card-outline { border-top: 3px solid var(--sueldos-primary); }
.card-primary { border-top-color: var(--sueldos-primary); }
.badge-light-primary { color: var(--sueldos-primary); background-color: rgba(27,132,255,.10); }
.bg-light-primary { background-color: rgba(27,132,255,.10) !important; }
.text-gray-500, .text-muted { color: var(--sueldos-muted) !important; }
.text-gray-700 { color: #3d4966 !important; }
.text-gray-800 { color: #25314d !important; }
.text-gray-900 { color: #071437 !important; }
.fw-bolder { font-weight: 800 !important; }
.fs-2qx { font-size: 2.35rem !important; }

@media (max-width: 991.98px) {
    html {
        font-size: 13px;
    }

    .sueldos-sidebar {
        transform: translateX(-100%);
        width: var(--sueldos-sidebar-width);
    }

    body.sidebar-open .sueldos-sidebar {
        transform: translateX(0);
    }

    .sueldos-sidebar-overlay {
        position: fixed;
        z-index: 1035;
        inset: 0;
        background: rgba(7,20,55,.52);
        opacity: 0;
        visibility: hidden;
        transition: opacity .18s ease, visibility .18s ease;
    }

    body.sidebar-open .sueldos-sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .sueldos-main {
        margin-left: 0 !important;
    }

    .sueldos-topbar {
        padding: 0 .9rem;
    }

    .sueldos-content {
        padding-top: .9rem;
    }

    body.sidebar-collapsed .sueldos-brand-text,
    body.sidebar-collapsed .sueldos-menu-heading,
    body.sidebar-collapsed .sueldos-menu-text,
    body.sidebar-collapsed .sueldos-sidebar-status span,
    body.sidebar-collapsed .sueldos-sidebar-status strong {
        display: initial;
    }

    body.sidebar-collapsed .sueldos-sidebar {
        width: var(--sueldos-sidebar-width);
    }

    body.sidebar-collapsed .sueldos-brand-link,
    body.sidebar-collapsed .sueldos-menu-link {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    html {
        font-size: 12.5px;
    }

    .card-body,
    .card-header,
    .card-footer {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .sueldos-page-title {
        font-size: 1.08rem;
    }
}

.sueldos-login-hero-content {
    max-width: 500px;
}

.sueldos-login-card {
    max-width: 420px;
}

/* Fix 021 - tablas anchas: scroll horizontal estable en todos los listados */
.sueldos-content,
.sueldos-main,
.container-fluid {
    min-width: 0;
}

.card,
.card-body {
    min-width: 0;
}

.table-responsive,
.sueldos-table-container,
.dataTables_wrapper,
.dataTables_scroll,
.dataTables_scrollHead,
.dataTables_scrollBody,
.dataTables_scrollFoot {
    max-width: 100%;
    overflow-x: auto !important;
}

.sueldos-table-container {
    display: block;
    -webkit-overflow-scrolling: touch;
}

.sueldos-table-container > table,
.table-responsive > table,
.dataTables_scrollHeadInner,
.dataTables_scrollHeadInner table,
.dataTables_scrollBody table {
    min-width: max-content;
}

.table.sueldos-data-table,
.table.sueldos-form-table {
    width: max-content !important;
    min-width: 100%;
}

.table td,
.table th {
    white-space: nowrap;
}

.table .text-wrap,
.table td.text-wrap,
.table th.text-wrap {
    white-space: normal !important;
}

.dataTables_wrapper .row,
.dataTables_wrapper .dataTables_scroll {
    min-width: 0;
}

.dataTables_scrollBody {
    min-height: 2.5rem;
}

.tabla-acciones,
.table td.tabla-acciones {
    white-space: nowrap !important;
}

/* Fix 038 - Tablas operativas: acciones siempre visibles y scroll horizontal estable */
.table-responsive,
.sueldos-table-container,
.dataTables_scrollBody {
    position: relative;
}

.sueldos-table-container,
.table-responsive,
.dataTables_scrollBody {
    scrollbar-width: thin;
    scrollbar-color: rgba(107,120,149,.55) rgba(223,230,241,.45);
}

.sueldos-table-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.dataTables_scrollBody::-webkit-scrollbar {
    height: 10px;
}

.sueldos-table-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.dataTables_scrollBody::-webkit-scrollbar-track {
    background: rgba(223,230,241,.45);
    border-radius: 999px;
}

.sueldos-table-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: rgba(107,120,149,.55);
    border-radius: 999px;
}

.table.sueldos-table-actions-sticky th.sueldos-actions-cell,
.table.sueldos-table-actions-sticky td.sueldos-actions-cell,
.table.sueldos-table-actions-sticky td.tabla-acciones,
.dataTables_scrollHead table.sueldos-table-actions-sticky th.sueldos-actions-cell,
.dataTables_scrollBody table.sueldos-table-actions-sticky td.sueldos-actions-cell,
.dataTables_scrollBody table.sueldos-table-actions-sticky td.tabla-acciones {
    position: sticky;
    right: 0;
    z-index: 6;
    background: #fff;
    box-shadow: -10px 0 14px rgba(15, 23, 42, .07);
    min-width: 96px;
    max-width: 180px;
}

.table.sueldos-table-actions-sticky thead th.sueldos-actions-cell,
.dataTables_scrollHead table.sueldos-table-actions-sticky thead th.sueldos-actions-cell {
    z-index: 8;
    background: #f8fafc;
}

.table-hover > tbody > tr:hover > td.sueldos-actions-cell,
.table-hover > tbody > tr:hover > td.tabla-acciones,
.table.sueldos-table-actions-sticky tbody tr:hover td.sueldos-actions-cell,
.table.sueldos-table-actions-sticky tbody tr:hover td.tabla-acciones {
    background: #f8fbff;
}

.table.sueldos-table-actions-sticky .tabla-acciones,
.table.sueldos-table-actions-sticky .sueldos-actions-cell {
    text-align: center;
    white-space: nowrap !important;
}

.table.sueldos-table-actions-sticky .tabla-acciones .btn,
.table.sueldos-table-actions-sticky .sueldos-actions-cell .btn {
    margin: .08rem .04rem;
}

.table.sueldos-table-actions-sticky .tabla-acciones form,
.table.sueldos-table-actions-sticky .sueldos-actions-cell form {
    display: inline-block;
    margin: 0 .04rem;
}

.sueldos-table-container::after,
.table-responsive::after {
    content: '';
    position: sticky;
    right: 0;
    display: block;
    width: 1px;
    height: 0;
    pointer-events: none;
}

.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody {
    border-radius: .75rem;
}

@media (max-width: 767.98px) {
    .table.sueldos-table-actions-sticky th.sueldos-actions-cell,
    .table.sueldos-table-actions-sticky td.sueldos-actions-cell,
    .table.sueldos-table-actions-sticky td.tabla-acciones,
    .dataTables_scrollHead table.sueldos-table-actions-sticky th.sueldos-actions-cell,
    .dataTables_scrollBody table.sueldos-table-actions-sticky td.sueldos-actions-cell,
    .dataTables_scrollBody table.sueldos-table-actions-sticky td.tabla-acciones {
        min-width: 82px;
        max-width: 128px;
        padding-left: .35rem;
        padding-right: .35rem;
    }

    .table.sueldos-table-actions-sticky .tabla-acciones .btn,
    .table.sueldos-table-actions-sticky .sueldos-actions-cell .btn {
        min-width: 29px;
        padding-left: .38rem;
        padding-right: .38rem;
    }
}

/* Fix 039 - Selects con buscador interno para listas extensas */
.sueldos-enhanced-select {
    position: relative;
    width: 100%;
}

.sueldos-enhanced-select-source {
    position: absolute !important;
    left: 0;
    bottom: 0;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.sueldos-enhanced-select-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 34px;
    text-align: left;
    color: var(--sueldos-text);
    background: #fff;
    padding-right: 2rem;
    cursor: pointer;
}

.sueldos-enhanced-select-toggle-sm {
    min-height: 31px;
    padding-top: .32rem;
    padding-bottom: .32rem;
    font-size: .78rem;
}

.sueldos-enhanced-select-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: .72rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sueldos-muted);
    font-size: .78rem;
    pointer-events: none;
}

.sueldos-enhanced-select.is-open .sueldos-enhanced-select-toggle::after {
    content: '\f106';
}

.sueldos-enhanced-select-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sueldos-enhanced-select.is-empty .sueldos-enhanced-select-label {
    color: var(--sueldos-muted);
}

.sueldos-enhanced-select-menu {
    position: absolute;
    z-index: 1085;
    top: calc(100% + .28rem);
    left: 0;
    right: 0;
    display: none;
    padding: .45rem;
    background: #fff;
    border: 1px solid var(--sueldos-border);
    border-radius: .72rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.sueldos-enhanced-select.is-open .sueldos-enhanced-select-menu {
    display: block;
}

.sueldos-enhanced-select-search {
    margin-bottom: .38rem;
}

.sueldos-enhanced-select-options {
    max-height: 245px;
    overflow-y: auto;
    padding-right: .1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(107,120,149,.55) rgba(223,230,241,.45);
}

.sueldos-enhanced-select-options::-webkit-scrollbar {
    width: 8px;
}

.sueldos-enhanced-select-options::-webkit-scrollbar-track {
    background: rgba(223,230,241,.45);
    border-radius: 999px;
}

.sueldos-enhanced-select-options::-webkit-scrollbar-thumb {
    background: rgba(107,120,149,.55);
    border-radius: 999px;
}

.sueldos-enhanced-select-option {
    display: block;
    width: 100%;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--sueldos-text);
    text-align: left;
    padding: .42rem .55rem;
    font-size: .82rem;
    line-height: 1.25;
    cursor: pointer;
}

.sueldos-enhanced-select-option:hover,
.sueldos-enhanced-select-option.is-highlighted {
    background: rgba(27,132,255,.10);
    color: #071437;
}

.sueldos-enhanced-select-option.is-selected {
    background: rgba(27,132,255,.14);
    color: var(--sueldos-primary);
    font-weight: 800;
}

.sueldos-enhanced-select-option.is-disabled,
.sueldos-enhanced-select-option:disabled {
    color: var(--sueldos-muted);
    cursor: not-allowed;
    opacity: .65;
}

.sueldos-enhanced-select-empty {
    padding: .5rem .55rem;
    color: var(--sueldos-muted);
    font-size: .78rem;
}

.sueldos-enhanced-select.is-invalid .sueldos-enhanced-select-toggle,
.was-validated .sueldos-enhanced-select-source:invalid + .sueldos-enhanced-select-toggle,
.sueldos-enhanced-select-source.is-invalid + .sueldos-enhanced-select-toggle {
    border-color: #dc3545;
    box-shadow: 0 0 0 .16rem rgba(220, 53, 69, .12);
}

.sueldos-enhanced-select.is-disabled .sueldos-enhanced-select-toggle,
.sueldos-enhanced-select-toggle:disabled {
    background: #eef2f7;
    cursor: not-allowed;
    opacity: .85;
}

@media (max-width: 575.98px) {
    .sueldos-enhanced-select-menu {
        position: fixed;
        top: auto;
        left: .75rem;
        right: .75rem;
        bottom: .75rem;
        max-height: 70vh;
    }

    .sueldos-enhanced-select-options {
        max-height: 52vh;
    }
}

/* Fix 048 - filtros compactos y busqueda global en tablas */
.sueldos-filter-card {
    margin-bottom: .85rem !important;
}

.sueldos-filter-card > .card-header {
    padding-top: .65rem;
    padding-bottom: .55rem;
}

.sueldos-filter-card > .card-body {
    padding: .65rem .8rem !important;
}

.sueldos-filter-form.form-row,
.sueldos-filter-form.row,
.sueldos-filter-form {
    display: flex !important;
    flex-wrap: wrap;
    align-items: end !important;
    gap: .45rem .6rem;
    margin: 0 !important;
}

.sueldos-filter-form > .sueldos-filter-field,
.sueldos-filter-form > .form-group,
.sueldos-filter-form > [class*="col-"] {
    flex: 1 1 155px !important;
    width: auto !important;
    max-width: 240px !important;
    min-width: 135px;
    padding: 0 !important;
    margin: 0 !important;
}

.sueldos-filter-form > .sueldos-filter-search-field {
    flex-basis: 210px !important;
    max-width: 320px !important;
}

.sueldos-filter-form > .sueldos-filter-actions {
    flex: 0 0 auto !important;
    min-width: 112px;
    max-width: 180px !important;
}

.sueldos-filter-form label {
    display: block;
    margin-bottom: .15rem;
    color: var(--sueldos-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .015em;
}

.sueldos-filter-form .form-control,
.sueldos-filter-form .form-select,
.sueldos-filter-form .sueldos-enhanced-select-toggle {
    min-height: 32px;
    height: 32px;
    padding-top: .25rem;
    padding-bottom: .25rem;
    font-size: .78rem;
}

.sueldos-filter-form .btn {
    min-height: 32px;
    padding: .32rem .65rem;
    font-size: .78rem;
    white-space: nowrap;
}

.sueldos-filter-form .btn-block {
    width: 100%;
}

.sueldos-datatable-compact {
    margin-top: .15rem;
}

.sueldos-dt-toolbar,
.sueldos-dt-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .45rem .75rem;
    margin: .35rem 0 .55rem;
}

.sueldos-dt-footer {
    margin-top: .65rem;
    margin-bottom: 0;
}

.sueldos-dt-left,
.sueldos-dt-right {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.sueldos-dt-right {
    flex: 1 1 260px;
    justify-content: flex-end;
}

.sueldos-dt-toolbar .dataTables_filter,
.sueldos-dt-toolbar .dataTables_length {
    margin: 0 !important;
}

.sueldos-dt-toolbar .dataTables_filter label,
.sueldos-dt-toolbar .dataTables_length label {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
    white-space: nowrap;
    font-size: .75rem;
    color: var(--sueldos-muted);
    font-weight: 700;
}

.sueldos-dt-toolbar .dataTables_filter {
    width: 100%;
}

.sueldos-dt-toolbar .dataTables_filter label {
    justify-content: flex-end;
    width: 100%;
}

.sueldos-dt-toolbar .dataTables_filter input.sueldos-table-search-input {
    width: min(360px, 100%);
    min-width: 220px;
    height: 32px;
    margin-left: .25rem;
    font-size: .78rem;
}

.sueldos-dt-toolbar .dataTables_length select.sueldos-table-length-select {
    height: 32px;
    padding-top: .25rem;
    padding-bottom: .25rem;
    font-size: .78rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0 !important;
}

@media (max-width: 991.98px) {
    .sueldos-filter-form > .sueldos-filter-field,
    .sueldos-filter-form > .form-group,
    .sueldos-filter-form > [class*="col-"] {
        flex-basis: 145px !important;
        max-width: none !important;
    }

    .sueldos-dt-right {
        justify-content: stretch;
        width: 100%;
    }

    .sueldos-dt-toolbar .dataTables_filter label {
        justify-content: flex-start;
    }

    .sueldos-dt-toolbar .dataTables_filter input.sueldos-table-search-input {
        width: 100%;
        min-width: 160px;
    }
}

@media (max-width: 575.98px) {
    .sueldos-filter-card > .card-body {
        padding: .55rem .6rem !important;
    }

    .sueldos-filter-form > .sueldos-filter-field,
    .sueldos-filter-form > .form-group,
    .sueldos-filter-form > [class*="col-"] {
        flex: 1 1 100% !important;
        min-width: 100%;
    }

    .sueldos-filter-form > .sueldos-filter-actions {
        flex: 1 1 100% !important;
        max-width: none !important;
    }
}

/* Fix 049 - busqueda global robusta y colores institucionales de recibo */
.sueldos-brand-color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: .85rem;
}

.sueldos-brand-color-card {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    background: #fff;
    padding: .85rem;
}

.sueldos-brand-color-card label {
    font-size: .72rem;
    font-weight: 800;
    color: var(--sueldos-muted);
    text-transform: uppercase;
    letter-spacing: .025em;
}

.sueldos-brand-color-card input[type="color"] {
    width: 100%;
    height: 38px;
    padding: .15rem;
    border-radius: .5rem;
}

.sueldos-brand-preview {
    border: 1px solid #dbe2ea;
    border-radius: .8rem;
    overflow: hidden;
    background: #fff;
}

.sueldos-brand-preview-header {
    padding: .75rem .9rem;
    color: #fff;
    font-weight: 800;
}

.sueldos-brand-preview-body {
    padding: .9rem;
}

.sueldos-brand-preview-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .65rem;
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
}

.sueldos-recibo-institucional {
    --recibo-primario: #0b5f86;
    --recibo-secundario: #0f766e;
    --recibo-acento: #198754;
}

.sueldos-recibo-institucional .card-header,
.sueldos-recibo-institucional .receipt-section-header {
    border-bottom: 2px solid var(--recibo-primario);
}

.sueldos-recibo-institucional .card-header .card-title,
.sueldos-recibo-institucional .receipt-heading-color {
    color: var(--recibo-primario);
}

.sueldos-recibo-institucional .receipt-total-band {
    border-color: var(--recibo-primario);
    background: color-mix(in srgb, var(--recibo-primario) 7%, white);
}

.sueldos-recibo-institucional .receipt-neto-color {
    color: var(--recibo-primario) !important;
}

.sueldos-recibo-institucional .receipt-accent-color {
    color: var(--recibo-acento) !important;
}

.sueldos-recibo-institucional .receipt-brand-band {
    border-left: 5px solid var(--recibo-primario);
    background: linear-gradient(90deg, color-mix(in srgb, var(--recibo-primario) 9%, white), #fff);
}

@supports not (background: color-mix(in srgb, #000 10%, #fff)) {
    .sueldos-recibo-institucional .receipt-total-band,
    .sueldos-recibo-institucional .receipt-brand-band {
        background: #f8fbfd;
    }
}

@media (max-width: 767.98px) {
    .sueldos-brand-color-grid {
        grid-template-columns: 1fr;
    }
}
