/* Estilos generales */
body {
    background-color: #f8f9fa;
}

/* Navbar */
.navbar {
    background-color: #343a40;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.recupe-navbar {
    background: linear-gradient(90deg, rgba(14, 20, 27, 0.96) 0%, rgba(22, 30, 40, 0.95) 50%, rgba(28, 37, 48, 0.96) 100%);
    box-shadow: 0 10px 28px rgba(7, 12, 18, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding-top: 0.56rem;
    padding-bottom: 0.56rem;
}

.recupe-navbar__container {
    gap: 0.9rem;
}

.navbar-brand {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.recupe-navbar__brand {
    gap: 0.45rem;
    margin-right: 0.8rem;
    flex-shrink: 0;
}

.recupe-navbar__brand-logo {
    width: auto;
    height: 48px !important;
    max-height: 48px;
    max-width: 160px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.12));
}

.recupe-navbar__brand-text {
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    line-height: 1;
}

.recupe-navbar__brand-text strong {
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.recupe-navbar__brand-text small {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.navbar-brand img {
    margin-right: 10px;
}

.recupe-navbar__modules {
    gap: 0.22rem;
    align-items: center;
    flex-wrap: wrap;
}

.recupe-navbar__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.48rem 0.64rem !important;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.recupe-navbar__link i {
    font-size: 0.76rem;
    color: rgba(119, 224, 167, 0.78);
}

.recupe-navbar__link::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.22rem;
    height: 1.5px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(81, 214, 148, 0), rgba(81, 214, 148, 0.95), rgba(81, 214, 148, 0));
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.recupe-navbar__link:hover,
.recupe-navbar__link:focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
}

.recupe-navbar__link:hover::after,
.recupe-navbar__link:focus::after {
    opacity: 0.72;
    transform: scaleX(1);
}

.recupe-navbar__link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.recupe-navbar__link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.recupe-navbar__actions {
    gap: 0.5rem;
    flex-shrink: 0;
}

.recupe-navbar__user {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(245, 247, 250, 0.76);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.recupe-navbar__logout {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.recupe-navbar__logout:hover,
.recupe-navbar__logout:focus {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.logout-btn {
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

@media (max-width: 991.98px) {
    .recupe-navbar__brand {
        margin-right: 0;
    }

    .recupe-navbar__brand-logo {
        height: 42px !important;
        max-height: 42px;
        max-width: 140px;
    }

    .recupe-navbar__modules {
        padding-top: 0.9rem;
        margin-bottom: 0.9rem;
    }

    .recupe-navbar__brand-text {
        display: none;
    }

    .recupe-navbar__link {
        width: 100%;
        justify-content: flex-start;
    }

    .recupe-navbar__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch !important;
    }

    .recupe-navbar__user,
    .recupe-navbar__logout {
        justify-content: center;
    }
}

/* Estilos específicos para la vista de nómina */
.nomina-table {
    border-collapse: separate;
}
.nomina-table thead th {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 3;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.04);
    font-size: 0.9rem;
}
.nomina-table tbody tr td {
    vertical-align: middle;
    padding-top: .45rem;
    padding-bottom: .45rem;
}
.nomina-table input.form-control, .nomina-table input[type="number"], .nomina-table input[type="text"] {
    background: #fff;
    border: 1px solid #cfd8dc;
    box-shadow: inset 0 1px 3px rgba(16,24,40,0.03);
    border-radius: 6px;
    padding: .28rem .5rem;
    height: 34px;
    font-size: 0.92rem;
}
.nomina-table input.form-control:focus, .nomina-table input[type="number"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.15rem rgba(59,130,246,0.12);
    outline: none;
}
.nomina-table td .form-control-sm {
    height: 30px;
    padding: .18rem .4rem;
}
.nomina-table .text-end input {
    text-align: right;
}
.nomina-table input[type="number"] {
    /* evitar flechitas (spinners) en Chrome/Edge/Safari */
    -webkit-appearance: none !important;
    margin: 0 !important;
    /* evitar flechas en Firefox */
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    /* anchura por defecto para consistencia */
    width: 88px !important;
    max-width: 100% !important;
}
.nomina-table input[type="number"]::-webkit-outer-spin-button,
.nomina-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    display: none;
    margin: 0;
}
/* Inputs pequeños (días / horas) */
.nomina-table input[data-edit-dias],
.nomina-table input[data-edit-horas] {
    width: 56px !important;
    text-align: center;
}
.nomina-table input[data-edit-recargo],
.nomina-table input[data-edit-bono],
.nomina-table input[data-edit-bono-semanal],
.nomina-table input[data-edit-infonavit],
.nomina-table input[data-edit-comedor] {
    width: 96px !important;
    text-align: right;
}
/* Página de nómina: quitar spinners globalmente para inputs numéricos */
.nomina-page input[type="number"] {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    margin: 0 !important;
}
.nomina-page input[type="number"]::-webkit-outer-spin-button,
.nomina-page input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    display: none;
}
.nomina-page .row.g-3.mb-3 .col-md-3,
.nomina-page .row.g-3.mb-3 .col-md-2,
.nomina-page .row.g-3.mb-3 .col-md-4 {
    /* ajustar anchuras cuando usamos container-fluid */
}

/* Alinear inputs dentro de celdas y eliminar margen extra */
.nomina-table td input.form-control, .nomina-table td input[type="number"] {
    display: block;
    margin: 0 auto;
    vertical-align: middle;
}

/* Para montos, mantener alineación derecha en la celda */
.nomina-table td.amount, .nomina-table td .amount {
    text-align: right;
}
.nomina-table tfoot th, .nomina-table tfoot td {
    font-weight: 600;
}
.nomina-table .text-success {
    color: #0f5132 !important;
}
.nomina-table .table-responsive {
    overflow-x: auto;
}

/* Horizontal scrollbar styling for better visibility */
.table-responsive::-webkit-scrollbar {
  height: 10px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

/* Tables */
.table th {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Forms */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Buttons */
.btn {
    font-weight: 500;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Sortable columns */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 20px !important;
}

.sortable:hover {
    background-color: rgba(0,0,0,0.05);
}

.sortable::after {
    content: "↕";
    position: absolute;
    right: 5px;
    opacity: 0.5;
}

.sortable.asc::after {
    content: "↑";
    opacity: 1;
}

.sortable.desc::after {
    content: "↓";
    opacity: 1;
}

/* Forzar z-index correcto de modales para evitar backdrops sobre el modal */
.modal {
    z-index: 1080 !important;
}
.modal-backdrop {
    z-index: 1070 !important;
}

/* Styles for custom join overlay */
#joinCajaOverlay { position: fixed; left:0; top:0; right:0; bottom:0; z-index: 2050; display:flex; align-items:center; justify-content:center; }
.join-overlay-backdrop { position: absolute; left:0; top:0; right:0; bottom:0; background: rgba(0,0,0,0.45); }
.join-overlay-dialog { position: relative; z-index: 2060; width: 520px; max-width: 95%; }
#joinCajaOverlay.d-none { display: none; }
