﻿/* =========================================================
           OVERLAY BOOTSTRAP
 ========================================================= */
.modal-open {
    overflow: hidden;
}

    .modal-open .modal {
        overflow-x: hidden;
        overflow-y: auto;
    }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

.modal-backdrop.show {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

/* =========================================================
           DIALOG RESPONSIVE
        ========================================================= */


/* =========================================================
           CONTENEDOR PRINCIPAL
        ========================================================= */
.modal-content {
    /*background: #f5f9fc;*/
    border-radius: 30px;
    border: none;
    padding: 50px 20px 0;
    /*padding: 80px 35px 0;*/
    position: relative;
    overflow: visible;
    /*box-shadow: 0 25px 50px rgba(0,0,0,0.4);*/
    animation: modalIn .3s ease;
}

/* =========================================================
           BOTON CERRAR (X)
        ========================================================= */
.modal-close-btn {
    position: absolute;
    right: 25px;
    top: 0;
    font-size: 24px;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    border: none;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
}

    .modal-close-btn:hover {
        background: #dc3545 !important;
        /* rojo */
        color: white !important;
        opacity: 1;
        transform: scale(1.1);
    }


/* =========================================================
           ANIMACION
        ========================================================= */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
           AVATAR FLOTANTE
        ========================================================= */
.modal-avatar-container {
    position: absolute;
    top: -28px;
    left: 35px;
}

.modal-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    border: 4px solid white;
}

/* =========================================================
           FRANJA TITULO CENTRADA
        ========================================================= */
.modal-name-band {
    position: relative;
    /* Ahora relativo al header/modal */
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    border-radius: 12px 12px 0 0;
    /* respeta borde del modal */
    box-shadow: none;
    /*z-index: 1;*/
    /* Banda detrás del avatar */
    pointer-events: none;
    overflow: hidden;
    background: #0a2540;
}

.top-modal-name-band {
    position: absolute;
    top: 18px;
    left: 0;
    width: 100%;
    text-align: center;
    margin-bottom: 50px;
    background: #0a2540;
}

/* Avatar + círculo */
.modal-name-avatar {
    position: absolute;
    top: -25px;
    /* Mitad arriba de la banda */
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #0a2540;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
    /* Por encima de la banda */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* opcional para destacarlo */
}


.modal-name-band i {
    margin-right: 10px;
    color: #1f4662;
    font-size: 1rem;
    opacity: 0.7;
}


/* =========================================================
           HEADER TEXTO
        ========================================================= */
.modal-login-header {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 30px;
}

    .modal-login-header h2 {
        color: #0a2540;
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .modal-login-header p {
        color: #1f4662;
        font-size: .95rem;
        opacity: .8;
    }

/* =========================================================
           FORMULARIO - INPUTS
        ========================================================= */


.modal-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #0a2540;
    font-weight: 500;
    font-size: .95rem;
}

.modal-input-wrapper {
    position: relative;
}

    .modal-input-wrapper i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #1f4662;
        font-size: 1.1rem;
        opacity: .6;
        z-index: 10;
    }

.modal-input {
    width: 100%;
    height: calc(1.5em + 0.75rem + 4px);
    padding: 0.375rem 2.75rem;
    border-radius: 12px;
    border: 2px solid #e0e8f0;
    outline: none;
    font-size: 0.875rem;
    background: white;
    color: #0a2540;
    transition: all .25s ease;
}

    .modal-input:focus {
        border-color: #0a2540;
        box-shadow: 0 4px 12px rgba(10, 37, 64, .1);
    }

.modal-textarea {
    width: 100%;
    min-height: calc(1.5em + 0.75rem + 4px);
    padding: 0.375rem 2.75rem;
    border-radius: 12px;
    border: 2px solid #e0e8f0;
    outline: none;
    font-size: 0.875rem;
    background: white;
    color: #0a2540;
    transition: all .25s ease;
    resize: vertical;
    /* Permite crecer solo vertical */
}

    .modal-textarea:focus {
        border-color: #0a2540;
        box-shadow: 0 4px 12px rgba(10, 37, 64, .1);
    }

.modal-user-preview {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #e0e8f0;
    font-weight: 500;
    color: #0a2540;
}

    .modal-user-preview i {
        color: #10b981;
        font-size: 1.3rem;
    }

/* =========================================================
   SELECT2 - DISEÑO PARA MODAL
========================================================= */

/* Wrapper para icono dentro del modal */
.select2-icon-wrapper {
    position: relative;
    width: 100%;
}

    .select2-icon-wrapper i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #1f4662;
        font-size: 0.875rem;
        opacity: 0.6;
        z-index: 10;
        pointer-events: none;
    }

/* Contenedor principal del select2 */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 4px) !important;
    padding: 0.375rem 2.75rem !important;
    /*   padding-left: 45px !important;
    padding-right: 45px !important;*/
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.875rem;
    color: #0a2540;
    transition: all 0.25s ease;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    /*border-color: #0a2540 !important;*/
    /*box-shadow: 0 4px 12px rgba(10,37,64,.1) !important;*/
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    line-height: normal !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    width: 30px !important;
    right: 10px !important;
    top: 0 !important;
}

    .select2-container--default .select2-selection--single .select2-selection__arrow b {
        border-color: #1f4662 transparent transparent transparent !important;
        border-width: 6px 6px 0 6px !important;
    }

/* Hover */
.select2-container--default .select2-selection--single:hover {
    border-color: #0a2540 !important;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}

/* Dropdown */
.select2-dropdown {
    /*border: 2px solid #0a2540 !important;*/
    border-radius: 12px !important;
    overflow: hidden !important;
    /*box-shadow: 0 4px 12px rgba(10,37,64,.1) !important;*/
    margin-top: 2px !important;
}

.select2-results__option {
    padding: 12px 15px !important;
    color: #0a2540 !important;
}

.select2-results__option--highlighted {
    background: linear-gradient(145deg, #0a2540, #1f4662) !important;
    color: white !important;
}

.select2-results__option[aria-selected=true] {
    background: #f0f4f8 !important;
    color: #0a2540 !important;
}

/* Search dentro del dropdown */
.select2-search--dropdown {
    padding: 10px !important;
    border-bottom: 2px solid #e0e8f0 !important;
}

.select2-search__field {
    border-radius: 8px !important;
    height: calc(1.5em + 0.75rem + 4px);
    padding: 0.375rem 2.75rem;
    outline: none !important;
}

    .select2-search__field:focus {
        border-color: #0a2540 !important;
    }


/* =========================================================
           FOOTER
        ========================================================= */


.modal-footer .btn {
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    flex: 1;
}

.modal-footer .btn-primary {
    background: linear-gradient(145deg, #0a2540, #1f4662);
    color: white;
}

    .modal-footer .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(10, 37, 64, 0.3);
    }

.modal-footer .btn-secondary {
    background: #e0e8f0;
    color: #0a2540;
}

    .modal-footer .btn-secondary:hover {
        background: #d0d8e0;
        transform: translateY(-2px);
    }


/* =========================================================
           CHECKBOX INTEGRADO EN INPUT - VERSIÓN 1: DENTRO DEL INPUT
        ========================================================= */
.input-group-checkbox {
    margin-bottom: 30px;
}

    .input-group-checkbox label {
        display: block;
        margin-bottom: 10px;
        color: #0a2540;
        font-weight: 600;
        font-size: 0.95rem;
    }

.checkbox-input-wrapper {
    position: relative;
    width: 100%;
}

    .checkbox-input-wrapper input[type="text"],
    .checkbox-input-wrapper input[type="email"],
    .checkbox-input-wrapper input[type="password"] {
        width: 100%;
        padding: 15px 15px 15px 50px;
        /* Espacio para el checkbox */
        border-radius: 12px;
        border: 2px solid #e0e8f0;
        outline: none;
        font-size: 1rem;
        background: white;
        color: #0a2540;
        transition: all 0.3s;
    }

    .checkbox-input-wrapper input:focus {
        border-color: #0a2540;
        box-shadow: 0 4px 12px rgba(10, 37, 64, 0.1);
    }

/* Checkbox personalizado dentro del input */
.checkbox-inside {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid #1f4662;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

    .checkbox-inside i {
        color: white;
        font-size: 0.8rem;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .checkbox-inside.checked {
        background: linear-gradient(145deg, #0a2540, #1f4662);
        border-color: #0a2540;
    }

        .checkbox-inside.checked i {
            opacity: 1;
        }

    .checkbox-inside:hover {
        border-color: #0a2540;
        transform: translateY(-50%) scale(1.1);
    }

/* =========================================================
           CHECKBOX INTEGRADO - VERSIÓN 2: CHECKBOX + INPUT LADO A LADO
        ========================================================= */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    border: 2px solid #e0e8f0;
}

    .checkbox-row:hover {
        border-color: #0a2540;
    }

/* Checkbox personalizado para versión lado a lado */
.checkbox-custom {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

    .checkbox-custom input[type="checkbox"] {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

    .checkbox-custom label {
        position: absolute;
        top: 0;
        left: 0;
        width: 24px;
        height: 24px;
        background: white;
        border: 2px solid #1f4662;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        margin: 0;
    }

        .checkbox-custom label i {
            color: white;
            font-size: 0.8rem;
            opacity: 0;
            transition: opacity 0.2s;
        }

    .checkbox-custom input[type="checkbox"]:checked + label {
        background: linear-gradient(145deg, #0a2540, #1f4662);
        border-color: #0a2540;
    }

        .checkbox-custom input[type="checkbox"]:checked + label i {
            opacity: 1;
        }

    .checkbox-custom:hover label {
        border-color: #0a2540;
        transform: scale(1.1);
    }

.checkbox-row input[type="text"] {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: #0a2540;
}

    .checkbox-row input[type="text"]::placeholder {
        color: #94a3b8;
    }

/* =========================================================
           VERSIÓN 3: CHECKBOX COMO PARTE DEL BORDE DEL INPUT
        ========================================================= */
.checkbox-border-group {
    margin-bottom: 30px;
}

    .checkbox-border-group label {
        display: block;
        margin-bottom: 10px;
        color: #0a2540;
        font-weight: 600;
        font-size: 0.95rem;
    }

.checkbox-border-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s;
    padding: 0 15px;
}

    .checkbox-border-wrapper:hover {
        border-color: #0a2540;
    }

    .checkbox-border-wrapper:focus-within {
        border-color: #0a2540;
        box-shadow: 0 4px 12px rgba(10, 37, 64, 0.1);
    }

.checkbox-border {
    position: relative;
    width: 24px;
    height: 24px;
    margin-right: 15px;
}

    .checkbox-border input[type="checkbox"] {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

    .checkbox-border label {
        position: absolute;
        top: 0;
        left: 0;
        width: 24px;
        height: 24px;
        background: white;
        border: 2px solid #1f4662;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        margin: 0;
    }

        .checkbox-border label i {
            color: white;
            font-size: 0.8rem;
            opacity: 0;
            transition: opacity 0.2s;
        }

    .checkbox-border input[type="checkbox"]:checked + label {
        background: linear-gradient(145deg, #0a2540, #1f4662);
        border-color: #0a2540;
    }

        .checkbox-border input[type="checkbox"]:checked + label i {
            opacity: 1;
        }

.checkbox-border-wrapper input[type="text"] {
    flex: 1;
    padding: 15px 0;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: #0a2540;
}

/* =========================================================
           EJEMPLOS DE USO CON ICONOS
        ========================================================= */
.section-title {
    color: #0a2540;
    margin: 40px 0 20px;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #e0e8f0;
    padding-bottom: 10px;
}

.demo-description {
    color: #1f4662;
    margin-bottom: 20px;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* =========================================================
           BOTÓN DE ACCIÓN
        ========================================================= */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(10, 37, 64, 0.3);
    }

/* =========================================================
           RESPONSIVE
        ========================================================= */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    .checkbox-row {
        flex-direction: column;
        align-items: flex-start;
    }

        .checkbox-row input[type="text"] {
            width: 100%;
        }
}

.card-modern {
    background: #ffffff;
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1200px;
}

/* Header de la tarjeta */
.card-header-custom {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.card-icon {
    background: #0a2540;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .card-icon i {
        color: white;
        font-size: 1.3rem;
    }

.card-title h2 {
    color: #0a2540;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.card-title p {
    color: #1f4662;
    font-size: 0.85rem;
    margin: 4px 0 0 0;
}

/* =========================================================
           DATATABLE PERSONALIZADO - MINIMALISTA
        ========================================================= */

/* Quitar bordes y fondos por defecto de DataTable */
.dataTables_wrapper {
    padding: 0;
}

/* Controles superiores (búsqueda y longitud) */
.dataTables_length {
    margin-bottom: 20px;
}

    .dataTables_length label {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #1f4662;
        font-weight: 400;
        font-size: 0.9rem;
    }

    .dataTables_length select {
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid #e0e8f0;
        background: white;
        color: #0a2540;
        font-size: 0.9rem;
        cursor: pointer;
        outline: none;
    }

.dataTables_filter {
    margin-bottom: 20px;
}

    .dataTables_filter label {
        align-items: center;
        gap: 8px;
        color: #1f4662;
        font-weight: 400;
        font-size: 0.9rem;
    }

    .dataTables_filter input {
        padding: 8px 14px;
        border-radius: 8px;
        border: 1px solid #e0e8f0;
        background: white;
        color: #0a2540;
        outline: none;
        min-width: 220px;
        font-size: 0.875rem;
        transition: all 0.2s;
    }

        .dataTables_filter input:focus {
            border-color: #1f4662;
            box-shadow: 0 2px 8px rgba(31, 70, 98, 0.1);
        }

/* TABLA - ESTILO MINIMALISTA */
.table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 0 !important;
}

    /* HEADER CON ICONOS - BORDE SOLO DEBAJO */
    .table thead th {
        background: #eef2f6;
        color: #0a2540;
        font-weight: 600;
        font-size: 0.875rem;
        padding-right: 10px !important;
        text-align: left;
        border-bottom: 2px solid #1f4662 !important;
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
        padding: 9.5px;
    }

        .table thead th i {
            margin-right: 8px;
            color: #1f4662;
            font-size: 0.875rem;
        }

        .table thead th:first-child {
            border-top-left-radius: 20px;
        }

        .table thead th:last-child {
            border-top-right-radius: 20px;
        }

    /* BODY - SIN SOMBRAS */
    .table tbody td {
        padding: 10px 12px;
        background: #ffffff;
        color: #0a2540;
        font-size: 0.9rem;
        border-bottom: 1px solid #eef2f6;
        border-top: none;
        border-left: none;
        border-right: none;
    }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover td {
        background: #f8fafc;
    }

/* BADGES DE ESTADO */
.status-chip {
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.chip-success {
    background: #10b98120;
    color: #0f6e3f;
}

.chip-warning {
    background: #f59e0b20;
    color: #b45309;
}

.chip-info {
    background: #3b82f620;
    color: #1e40af;
}

/* AVATAR */
.avatar-mini {
    width: 32px;
    height: 32px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
}

/* BOTONES DE ACCIÓN */
.action-group {
    display: flex;
    gap: 5px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e0e8f0;
    background: white;
    color: #1f4662;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .icon-btn:hover {
        background: #0a2540;
        color: white;
        border-color: #0a2540;
    }


/* INFORMACIÓN */
.dataTables_info {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .card-modern {
        padding: 15px;
    }

    .dataTables_filter input {
        min-width: 100%;
    }

    .dataTables_paginate {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* =========================================================
           LAYOUT PRINCIPAL
        ========================================================= */
.app-wrapper {
    /* display: flex; -> Ya no es necesario ya que el sidebar es fixed */
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* =========================================================
           SIDEBAR - MENÚ TREE
        ========================================================= */
.sidebar {
    width: 300px;
    background: linear-gradient(180deg, #0a2540 0%, #1f4662 100%);
    color: white;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-icon i {
        font-size: 1.8rem;
        color: #0a2540;
    }

.logo-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.logo-text p {
    font-size: 0.7rem;
    opacity: 0.7;
    margin: 2px 0 0 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a2540;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-info h4 {
    font-size: 0.95rem;
    margin: 0;
}

.user-info p {
    font-size: 0.75rem;
    opacity: 0.7;
    margin: 2px 0 0 0;
}

/* Menú Tree */
.nav-menu {
    flex: 1;
}

.menu-item {
    margin-bottom: 2px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    cursor: pointer;
}

    .menu-link i {
        width: 20px;
        font-size: 1.1rem;
    }

    .menu-link span {
        flex: 1;
        font-size: 0.95rem;
        font-weight: 500;
    }

    .menu-link .arrow {
        font-size: 0.8rem;
        transition: transform 0.3s;
    }

    .menu-link:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .menu-link.active {
        background: white;
        color: #0a2540;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

        .menu-link.active i {
            color: #0a2540;
        }

.submenu {
    list-style: none;
    padding-left: 20px;
    margin-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    display: none;
}

    .submenu.show {
        display: block;
    }

.submenu-item {
    padding: 10px 16px;
    margin: 4px 0;
    border-radius: 10px;
    /*color: rgba(255,255,255,0.7);*/
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

/* El a ocupa todo el li */
.submenu-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.submenu-item i {
    margin-right: 10px;
    font-size: 0.8rem;
    opacity: 0.6;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* =========================================================
           MAIN CONTENT
        ========================================================= */
.main-content {
    /* flex: 1; -> Eliminado para evitar conflictos con el margin-left */
    margin-left: 300px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: auto;
}

/* =========================================================
           NAVBAR SUPERIOR
        ========================================================= */
.top-navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 90;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    font-size: 1.3rem;
    color: #0a2540;
    cursor: pointer;
}

.page-title h2 {
    color: #0a2540;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.page-title p {
    color: #1f4662;
    font-size: 0.75rem;
    margin: 2px 0 0 0;
    opacity: 0.6;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.navbar-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    position: relative;
    cursor: pointer;
    color: #1f4662;
    font-size: 1.2rem;
    transition: color 0.2s;
}

    .icon-btn:hover {
        color: #0a2540;
    }

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 30px;
    font-weight: 600;
}

/* =========================================================
           MENÚ DE USUARIO
        ========================================================= */
.user-menu-container {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

    .user-menu-trigger:hover {
        background: #f0f4f8;
        border-color: #e0e8f0;
    }

.user-avatar-small {
    width: 42px;
    height: 42px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-info-small {
    text-align: left;
}

    .user-info-small h4 {
        color: #0a2540;
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0;
    }

    .user-info-small p {
        color: #1f4662;
        font-size: 0.7rem;
        margin: 2px 0 0 0;
        opacity: 0.6;
    }

.user-menu-trigger i {
    color: #1f4662;
    font-size: 0.8rem;
    margin-left: 5px;
    transition: transform 0.3s;
}

.user-menu-trigger.open i {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    z-index: 1000;
    border: 1px solid #eef2f6;
}

    .user-dropdown.show {
        display: block;
        animation: slideDown 0.2s ease;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 8px;
}

    .dropdown-header h4 {
        color: #0a2540;
        font-size: 1rem;
        margin: 0;
    }

    .dropdown-header p {
        color: #1f4662;
        font-size: 0.8rem;
        margin: 4px 0 0 0;
        opacity: 0.7;
    }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    color: #0a2540;
    transition: all 0.2s;
    cursor: pointer;
}

    .dropdown-item i {
        width: 20px;
        color: #1f4662;
        font-size: 1rem;
    }

    .dropdown-item span {
        flex: 1;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .dropdown-item:hover {
        background: #f0f4f8;
    }

.dropdown-divider {
    height: 1px;
    background: #eef2f6;
    margin: 8px 0;
}

.dropdown-item.logout {
    color: #b91c1c;
}

    .dropdown-item.logout i {
        color: #b91c1c;
    }

    .dropdown-item.logout:hover {
        background: #fee2e2;
    }

/* =========================================================
           MODALES PARA PERFIL, CONFIGURACIÓN Y SEGURIDAD
        ========================================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-container {
    background: white;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    position: relative;
    border-bottom: 1px solid #eef2f6;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.5rem;
    color: #1f4662;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

    .modal-close:hover {
        opacity: 1;
    }

.modal-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

    .modal-icon i {
        font-size: 2rem;
        color: white;
    }

.modal-title {
    color: #0a2540;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/*.modal-body {
    padding: 20px 30px;
    overflow-y: auto;
    flex: 1;
}*/

.modal-form-group {
    margin-bottom: 10px;
}

    .modal-form-group label {
        display: block;
        margin-bottom: 8px;
        color: #0a2540;
        font-weight: 500;
        font-size: 0.9rem;
    }

.modal-input,
.modal-select {
    width: 100%;
    /*padding: 12px 15px;*/
    border-radius: 12px;
    border: 2px solid #e0e8f0;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s;
}

    .modal-input:focus,
    .modal-select:focus {
        border-color: #1f4662;
    }

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eef2f6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.modal-btn-primary {
    background: linear-gradient(145deg, #0a2540, #1f4662);
    color: white;
}

    .modal-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
    }

.modal-btn-secondary {
    background: #f0f4f8;
    color: #0a2540;
}

    .modal-btn-secondary:hover {
        background: #e0e8f0;
    }

.modal-btn-danger {
    background: #ef4444;
    color: white;
}

    .modal-btn-danger:hover {
        background: #dc2626;
    }

/* =========================================================
           CRUD CLIENTES
        ========================================================= */
.crud-container {
    background: white;
    border-radius: 24px;
    padding: 25px;
    margin: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.crud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .crud-header h2 {
        color: #0a2540;
        font-size: 1.3rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.btn-crud {
    background: linear-gradient(145deg, #0a2540, #1f4662);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-crud:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(10, 37, 64, 0.2);
    }

/* DataTable personalizado */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length {
    margin-bottom: 20px;
}

    .dataTables_length label {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #1f4662;
        font-weight: 400;
        font-size: 0.9rem;
    }

    .dataTables_length select {
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid #e0e8f0;
        background: white;
        color: #0a2540;
        cursor: pointer;
    }

.dataTables_filter {
    margin-bottom: 20px;
}

    .dataTables_filter label {
        align-items: center;
        gap: 8px;
        color: #1f4662;
        font-size: 0.9rem;
    }

    .dataTables_filter input {
        padding: 8px 14px;
        border-radius: 8px;
        border: 1px solid #e0e8f0;
        outline: none;
        min-width: 220px;
    }

        .dataTables_filter input:focus {
            border-color: #1f4662;
        }

.table-crud {
    width: 100% !important;
    border-collapse: collapse;
}

    .table-crud thead th {
        background: #f0f4f8;
        color: #0a2540;
        font-weight: 600;
        font-size: 0.85rem;
        padding: 15px 12px;
        border-bottom: 2px solid #1f4662;
    }

    .table-crud tbody td {
        padding: 15px 12px;
        color: #0a2540;
        font-size: 0.9rem;
        border-bottom: 1px solid #eef2f6;
    }

    .table-crud tbody tr:hover td {
        background: #f8fafc;
    }

.badge-crud {
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-activo {
    background: #10b98120;
    color: #0f6e3f;
    border: 1px solid #10b98140;
}

.badge-inactivo {
    background: #ef444420;
    color: #b91c1c;
    border: 1px solid #ef444440;
}

.acciones-crud {
    display: flex;
    gap: 8px;
}

.btn-accion {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e0e8f0;
    background: white;
    color: #1f4662;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-accion:hover {
        background: #0a2540;
        color: white;
        border-color: #0a2540;
    }

    .btn-accion.editar:hover {
        background: #1f4662;
    }

    .btn-accion.eliminar:hover {
        background: #ef4444;
        border-color: #ef4444;
    }

/* =========================================================
           DASHBOARD CON CHART.JS
        ========================================================= */
.content-wrapper {
    padding: 30px;
    background: #f5f9fc;
    flex: 1;
}


.recent-orders {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

    .recent-orders h3 {
        color: #0a2540;
        font-size: 1rem;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f6;
}

    .order-item:last-child {
        border-bottom: none;
    }

.order-info h4 {
    color: #0a2540;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.order-info p {
    color: #1f4662;
    font-size: 0.8rem;
    opacity: 0.7;
}

.order-status {
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-completed {
    background: #10b98120;
    color: #0f6e3f;
}

.status-pending {
    background: #f59e0b20;
    color: #b45309;
}

/* =========================================================
           RESPONSIVE
        ========================================================= */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }

    .main-content {
        margin-left: 280px;
        width: auto;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        transition: transform 0.3s;
        width: 280px;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .top-navbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .navbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .crud-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .crud-container {
        margin: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .navbar-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-menu-trigger {
        width: 100%;
    }

    .user-dropdown {
        width: 100%;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }

    .dataTables_filter input {
        min-width: 100%;
    }
}

/* =========================================================
           DISEÑO DE FACTURA
        ========================================================= */
.invoice-card {
    background: white;
    border-radius: 30px;
    max-width: 1200px;
    width: 100%;
    padding: 20px;
}



.invoice-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .brand-icon i {
        font-size: 2rem;
        color: #0a2540;
    }

.brand-info h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.brand-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.invoice-status {
    display: flex;
    align-items: center;
    gap: 15px;
}



.invoice-date {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 40px;
    color: white;
    font-size: 0.9rem;
}


.invoice-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 20px;
}

.info-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f4662;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
}

.info-text h3 {
    color: #1f4662;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
    opacity: 0.7;
}

.info-text p {
    color: #0a2540;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-text .code-badge {
    background: #e0e8f0;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #0a2540;
}

.payment-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.payment-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #eef2f6;
    transition: all 0.3s;
}

    .payment-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(10, 37, 64, 0.1);
    }

    .payment-card h4 {
        color: #1f4662;
        font-size: 0.8rem;
        font-weight: 500;
        margin-bottom: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .payment-card .payment-value {
        color: #0a2540;
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .payment-card .payment-label {
        color: #1f4662;
        font-size: 0.75rem;
        opacity: 0.6;
    }

    .payment-card.negative .payment-value {
        color: #ef4444;
    }

.products-section {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

    .section-header h2 {
        color: #0a2540;
        font-size: 1.2rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }






.product-code {
    color: #1f4662;
    font-size: 0.8rem;
}

.product-name {
    font-weight: 500;
}

.text-right {
    text-align: right;
}


/*.totals-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}*/

.totals-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px 30px;
    min-width: 300px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #0a2540;
}

    .total-line.grand {
        border-top: 2px solid #e0e8f0;
        margin-top: 8px;
        padding-top: 15px;
        font-weight: 700;
        font-size: 1.1rem;
    }

.invoice-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}



.payment-method {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 8px 20px;
    border-radius: 40px;
}

    .payment-method .method-badge {
        background: #0a2540;
        color: white;
        padding: 5px 15px;
        border-radius: 30px;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .payment-method .method-detail {
        color: #1f4662;
        font-size: 0.85rem;
    }

    .payment-method .method-amount {
        font-weight: 700;
        color: #0a2540;
    }

/* =========================================================
           ESTILOS PARA ELEMENTOS DESHABILITADOS (DISABLED)
        ========================================================= */

/* Inputs deshabilitados */
.modal-input:disabled,
.modal-select:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    background: #f5f7fa !important;
    border-color: #d1d9e6 !important;
    color: #8a9bb5 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Inputs con icono deshabilitados */
.modal-input-wrapper i:has(+ input:disabled),
.modal-input-wrapper:has(input:disabled) i {
    opacity: 0.3 !important;
    color: #8a9bb5 !important;
}

/* Botones deshabilitados */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-crud:disabled,
.btn-submit:disabled,
.modal-btn:disabled,
.modal-btn-primary:disabled,
.modal-btn-secondary:disabled,
.modal-btn-danger:disabled {
    background: #e0e8f0 !important;
    color: #8a9bb5 !important;
    border-color: #d1d9e6 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* Enlaces deshabilitados */
a:disabled,
a.disabled {
    color: #8a9bb5 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
    text-decoration: none !important;
}

/* Checkboxes deshabilitados */
.checkbox-inside.disabled,
.checkbox-inside:disabled {
    background: #f5f7fa !important;
    border-color: #d1d9e6 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.checkbox-custom input[type="checkbox"]:disabled + label,
.checkbox-border input[type="checkbox"]:disabled + label {
    background: #f5f7fa !important;
    border-color: #d1d9e6 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

/* Select2 deshabilitado */
.select2-container--default .select2-selection--single.disabled,
.select2-container--default .select2-selection--single:disabled,
.select2-container--default.select2-container--disabled .select2-selection--single {
    background: #f5f7fa !important;
    border-color: #d1d9e6 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

    .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__arrow b {
        border-color: #8a9bb5 transparent transparent transparent !important;
    }

/* Items de menú deshabilitados */
.menu-item.disabled .menu-link,
.menu-link.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.submenu-item.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Tarjetas de estadísticas deshabilitadas */
.stat-card.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(30%);
}

/* Filas de tabla deshabilitadas */
.table tbody tr.disabled td,
.table-crud tbody tr.disabled td {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #f5f7fa !important;
    pointer-events: none !important;
}

/* Botones de acción deshabilitados */
.btn-accion.disabled,
.btn-accion:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: #f5f7fa !important;
    border-color: #d1d9e6 !important;
    color: #8a9bb5 !important;
}

/* Badges deshabilitados */
.badge-crud.disabled,
.status-chip.disabled {
    opacity: 0.5 !important;
    filter: grayscale(50%);
    pointer-events: none !important;
}

/* Elementos de factura deshabilitados */
.payment-card.disabled {
    opacity: 0.6 !important;
    filter: grayscale(40%);
    pointer-events: none !important;
}

.invoice-actions .btn:disabled {
    opacity: 0.5 !important;
}

/* Dropdown items deshabilitados */
.dropdown-item.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* =========================================================
           UTILIDADES PARA DISABLED
        ========================================================= */
.disabled-click {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.disabled-opacity {
    opacity: 0.5 !important;
}

.disabled-grayscale {
    filter: grayscale(80%) !important;
    opacity: 0.7 !important;
}

/* Tooltip para elementos deshabilitados */
[data-tooltip-disabled] {
    position: relative;
}

    [data-tooltip-disabled]:before {
        content: attr(data-tooltip-disabled);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        padding: 5px 10px;
        background: #0a2540;
        color: white;
        font-size: 0.75rem;
        border-radius: 6px;
        white-space: nowrap;
        z-index: 1000;
        display: none;
    }

    [data-tooltip-disabled].disabled:hover:before {
        display: block;
    }

/* Popup */
.mega-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 780px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    z-index: 1000;
    border: 1px solid #eef2f6;
}

    .mega-dropdown.show {
        display: block;
        animation: slideDown 0.2s ease;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid 6 columnas */
.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 14px;
}

/* Card */
.mega-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    height: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .15s ease;
}

    /* Hover mejorado */
    .mega-card:hover {
        box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
        transform: translateY(-2px);
        border-color: #d1d5db;
    }

/* Icono container */
.mega-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.mega-card:hover .mega-icon {
    transform: scale(1.05);
}

/* Iconos con colores */
.mega-card:nth-child(1) .mega-icon {
    /* Reportes */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

    .mega-card:nth-child(1) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(2) .mega-icon {
    /* Artículos */
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

    .mega-card:nth-child(2) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(3) .mega-icon {
    /* Stock */
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

    .mega-card:nth-child(3) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(4) .mega-icon {
    /* Facturas */
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

    .mega-card:nth-child(4) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(5) .mega-icon {
    /* Recibos */
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

    .mega-card:nth-child(5) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(6) .mega-icon {
    /* Quotation */
    background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
}

    .mega-card:nth-child(6) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(7) .mega-icon {
    /* Devoluciones */
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

    .mega-card:nth-child(7) .mega-icon i {
        color: #374151;
    }

.mega-card:nth-child(8) .mega-icon {
    /* Colaboradores */
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

    .mega-card:nth-child(8) .mega-icon i {
        color: white;
    }

.mega-card:nth-child(9) .mega-icon {
    /* Clientes */
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

    .mega-card:nth-child(9) .mega-icon i {
        color: white;
    }

/* Iconos */
.mega-icon i {
    font-size: 18px;
    transition: all 0.2s ease;
}

.mega-card:hover .mega-icon i {
    transform: scale(1.1);
}

/* Texto */
.mega-card span {
    font-size: 13.5px;
    font-weight: 500;
    color: #374151;
    transition: color 0.2s ease;
}

.mega-card:hover span {
    color: #111827;
}

/* avatar pequeño navbar */
.user-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

/* card */
.user-card {
    width: 260px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
    position: relative;
}

/* header */
.user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-card-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.user-card-header span {
    font-size: 12px;
    color: #6b7280;
}

/* divider */
.user-card-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

/* links */
.user-card-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    transition: background .15s ease;
}

    .user-card-link:hover {
        background: #f3f4f6;
    }

    .user-card-link.logout {
        color: #ef4444;
    }

        .user-card-link.logout:hover {
            background: #fee2e2;
        }

/* floating gear */
.user-card-gear {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .user-card-gear:hover {
        transform: rotate(45deg) scale(1.05);
        box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
    }




.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.metric-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #eef2f6;
}

    .metric-item h4 {
        color: #1f4662;
        font-size: 0.75rem;
        margin-bottom: 8px;
        text-transform: uppercase;
    }

.metric-value {
    color: #0a2540;
    font-size: 1.3rem;
    font-weight: 700;
}

.metric-trend {
    font-size: 0.7rem;
    margin-top: 5px;
}

.recent-list {
    background: white;
    border-radius: 20px;
    padding: 20px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f6;
}

    .list-item:last-child {
        border-bottom: none;
    }

.list-item-info h4 {
    color: #0a2540;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.list-item-info p {
    color: #1f4662;
    font-size: 0.75rem;
    opacity: 0.7;
}

.list-item-value {
    font-weight: 600;
    color: #0a2540;
}

.badge {
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.65rem;
    font-weight: 600;
}

.badge-success {
    background: #10b98120;
    color: #0f6e3f;
}

.badge-warning {
    background: #f59e0b20;
    color: #b45309;
}

.badge-danger {
    background: #ef444420;
    color: #b91c1c;
}

/* ============ LISTA DE PRODUCTOS ============ */
.ranking-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

    .ranking-list::-webkit-scrollbar {
        width: 6px;
    }

    .ranking-list::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 10px;
    }

    .ranking-list::-webkit-scrollbar-thumb {
        background: #c1d1e0;
        border-radius: 10px;
    }

        .ranking-list::-webkit-scrollbar-thumb:hover {
            background: #a0b8cc;
        }

/* ============ ITEM DE LISTA ============ */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f6;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
    border-radius: 20px;
}

    .list-item:hover {
        transform: translateX(4px);
    }

    .list-item:last-child {
        border-bottom: none;
    }

.list-item-info {
    flex: 1;
}

    .list-item-info h4 {
        color: #0a2540;
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .list-item-info p {
        color: #55718b;
        font-size: 0.75rem;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 4px;
    }

        .list-item-info p i {
            color: #ffb347;
            font-size: 0.7rem;
        }

.list-item-value {
    text-align: right;
    font-weight: 700;
    color: #0038a8;
    font-size: 1.1rem;
    min-width: 120px;
}

    .list-item-value span {
        display: block;
        font-size: 0.7rem;
        color: #5e7a93;
        font-weight: 400;
        margin-top: 4px;
    }

/* Ranking numbers */
.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #ffb34720;
    color: #b13e3e;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
}

.top-1 .ranking-number {
    background: #ffd700;
    color: #0a2540;
}

.top-2 .ranking-number {
    background: #c0c0c0;
    color: #0a2540;
}

.top-3 .ranking-number {
    background: #cd7f32;
    color: white;
}

/* =========================================================
           TARJETAS DE ESTADÍSTICAS
        ========================================================= */
.statsRM-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.statRM-card {
    background: #f5f9fc;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

    .statRM-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(10, 37, 64, 0.1);
    }

.statRM-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .statRM-icon i {
        font-size: 2rem;
        color: white;
    }

.statRM-info h3 {
    color: #1f4662;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.statRM-info .statRM-value {
    color: #0a2540;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.statRM-info .statRM-change {
    font-size: 0.75rem;
    margin-top: 5px;
}

.change-positive {
    color: #10b981;
}

.change-negative {
    color: #ef4444;
}


.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: #f5f9fc;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

    .chart-card h3 {
        color: #0a2540;
        font-size: 1rem;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.chart-container {
    max-width: 350px;
    width: 100%;
}

canvas-wrapper {
    width: 350px;
    height: 350px;
    position: relative;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===============================
    HEADER FACTURA PRO
    =============================== */
.invoice-header-pro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-radius: 18px;
    background: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, .05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 28px rgba(0, 0, 0, .08);
}

/* ===============================
    CLIENTE
    =============================== */

.client-block {
    display: flex;
    align-items: center;
    gap: 18px;
}

.client-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    color: #2563eb;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.client-name {
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.client-meta {
    font-size: .9rem;
    color: #6b7280;
}

.client-total {
    font-weight: 700;
    color: #2563eb;
    margin-top: 2px;
}

/* ===============================
    BADGE CREDITO
    =============================== */

.badge-credit {
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, .12);
    color: #059669;
    margin-left: 10px;
}

/* ===============================
    DIVIDER
    =============================== */

.divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
}

/* ===============================
    META FACTURA
    =============================== */

.invoice-meta {
    display: flex;
    gap: 32px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .meta-item i {
        font-size: 15px;
        color: #9ca3af;
    }

    .meta-item span {
        display: block;
        font-size: .75rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #9ca3af;
    }

    .meta-item b {
        font-size: .95rem;
    }

.quick-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.qa-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #111827;
    min-width: auto;
    transition: all 0.25s ease;
}

    .qa-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, .12);
    }

.qa-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

/* Variantes */
.qa-card.primary .qa-icon {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.qa-card.success .qa-icon {
    background: linear-gradient(135deg, #16a34a, #166534);
}

/* DANGER */
.qa-card.danger .qa-icon {
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
}

/* WARNING */
.qa-card.warning .qa-icon {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

/* INFO */
.qa-card.info .qa-icon {
    background: linear-gradient(135deg, #0dcaf0, #0a58ca);
}

.qa-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.qa-text small {
    color: #6b7280;
    font-size: 0.8rem;
}

.table-pos-wrapper {
    max-height: 450px;
    overflow-y: auto;
    position: relative;
}

.iconRM-btn {
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    background: transparent;
    transition: all .25s ease;
}

    .iconRM-btn:hover {
        background: #e9f2ff;
        color: #0d6efd;
        box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
    }

/* ============================= */
/*      FIX INPUTS RESPONSIVE    */
/* ============================= */

/* Contenedor general de los montos */
@media (max-width: 992px) {

    /* Si están en flex o grid */
    .row,
    .montos-container {
        row-gap: 15px;
    }
}

/* TABLET */
@media (max-width: 768px) {

    /* Forzar columnas a 100% */
    .col-md-4,
    .col-lg-4,
    .col-xl-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

        /* Separación vertical */
        .col-md-4:not(:last-child),
        .col-lg-4:not(:last-child),
        .col-xl-4:not(:last-child) {
            margin-bottom: 15px;
        }

    /* Labels */
    label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    /* Inputs normales */
    input,
    .form-control {
        width: 100% !important;
        max-width: 100% !important;
        height: 48px;
        font-size: 1rem;
        padding: 10px 14px;
    }

    /* Input group (si usas icono dentro) */
    .input-group {
        width: 100% !important;
    }

    .input-group-text {
        padding: 0 12px;
        font-size: 0.95rem;
    }
}

/* MOVIL PEQUEÑO */
@media (max-width: 576px) {

    /* Reduce padding lateral del modal */
    .modal-content {
        padding: 25px 15px 0;
    }

    /* Inputs un poco más compactos */
    input,
    .form-control {
        height: 44px;
        font-size: 0.95rem;
        padding: 8px 12px;
    }

        /* Evitar que el texto se vea apretado */
        .form-control::placeholder {
            font-size: 0.9rem;
        }
}

/* Extra pequeño */
@media (max-width: 480px) {

    label {
        font-size: 0.85rem;
    }

    input,
    .form-control {
        height: 42px;
        font-size: 0.9rem;
    }
}


.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a1e3c;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.header p {
    color: #5e6f8d;
    font-size: 0.9rem;
}

/* TABS */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e9ecf2;
    padding-bottom: 12px;
}

.tab {
    padding: 8px 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #6b7a99;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

    .tab.active {
        color: #0a1e3c;
        border-bottom-color: #0a1e3c;
    }

    .tab i {
        margin-right: 8px;
    }

/* CLIENTE CARD COMPACTA */
.cliente-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafd;
    border-radius: 20px;
    padding: 16px 24px;
    margin-bottom: 24px;
    border: 1px solid #edf2f9;
    flex-wrap: wrap;
    gap: 20px;
}

.cliente-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cliente-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, #0a1e3c, #1a3555);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

.cliente-datos h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1e3c;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cliente-datos p {
    color: #5e6f8d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.badgeRM {
    background: #eef2f6;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1a3555;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .badgeRM.id {
        background: #eaeef5;
        color: #0a1e3c;
    }

    .badgeRM.active {
        background: #e1f7e3;
        color: #1e7b4c;
    }

/* MONTOS EN EL ENCABEZADO (DERECHA) */
.montos-encabezado {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 8px 24px;
    border-radius: 40px;
    border: 1px solid #edf2f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    margin-left: auto;
}

.monto-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .monto-item .label {
        font-size: 0.7rem;
        font-weight: 600;
        color: #6b7a99;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .monto-item .value {
        font-size: 1rem;
        font-weight: 700;
    }

.value.neutro {
    color: #0a1e3c;
}

.value.positivo {
    color: #1e7b4c;
}

.value.negativo {
    color: #c2414c;
}

.separator {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
}


.monto-pago-wrapper {
    display: flex;
    gap: 8px;
}

    .monto-pago-wrapper input {
        flex: 1;
    }





.monto-pendiente {
    font-weight: 700;
    color: #c2414c;
}

.aplicar-input {
    width: 100px;
    padding: 6px 8px;
    border: 1px solid #d0dbea;
    border-radius: 8px;
    text-align: right;
}



.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5b79;
    cursor: pointer;
    transition: 0.2s;
}

    .page-btn:hover {
        background: #f1f5f9;
        border-color: #b3c2d6;
    }

    .page-btn.active {
        background: #0a1e3c;
        color: white;
        border-color: #0a1e3c;
    }


.col label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7a99;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.textarea-modern {
    width: 100%;
    height: 100px;
    padding: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    font-size: 0.9rem;
    resize: vertical;
    transition: border 0.2s;
}

    .textarea-modern:focus {
        border-color: #0a1e3c;
        outline: none;
    }

.concept-preview {
    min-height: 100px;
    padding: 14px;
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow-y: auto;
    font-size: 0.9rem;
}

/* BOTONES FINALES */
.actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-outline {
    height: 44px;
    padding: 0 28px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #4a5b79;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-outline:hover {
        border-color: #b3c2d6;
        background: #f8fafd;
    }

.btn-primary {
    height: 44px;
    padding: 0 32px;
    background: #0a1e3c;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-primary:hover {
        background: #1a3555;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(10, 30, 60, 0.15);
    }

*/ .d-none {
    display: none;
}

/* HEADER ORGANIZADO */
.recibo-header-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recibo-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

    .recibo-title strong {
        font-weight: 700;
        color: #0d3b66;
    }

.recibo-date {
    font-size: 13px;
    color: #6b7280;
}

/* FACTURA BLOQUE */
.recibo-invoice-block {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invoice-label {
    font-size: 12px;
    color: #6b7280;
}

.invoice-number {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* CARD CONTENEDOR */
.recibo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    margin-bottom: 18px;
    border: 1px solid #eef2f7;
}



/* ICONO IZQUIERDO */
.recibo-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* CUERPO */
.recibo-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* HEADER */
.recibo-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recibo-numero {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
}

.recibo-fecha {
    font-size: 13px;
    color: #6b7280;
}

/* FACTURA + FORMA */
.recibo-middle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #374151;
}

/* BADGE FORMA PAGO */
.badge-payment {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* CUENTA Y REFERENCIA */
.recibo-extra {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

/* MONTO */
.recibo-amount {
    text-align: right;
    min-width: 140px;
}

.amount-value {
    font-size: 20px;
    font-weight: 700;
    color: #0d3b66;
}

.amount-label {
    font-size: 12px;
    color: #6b7280;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .recibo-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .recibo-amount {
        text-align: left;
        margin-top: 10px;
    }

    .recibo-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* BOTÓN REIMPRIMIR */
.btn-reprint {
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #0d3b66;
    background: transparent;
    color: #0d3b66;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-reprint:hover {
        background: #0d3b66;
        color: #fff;
        transform: translateY(-1px);
    }

/* RESPONSIVE */
@media (max-width: 768px) {
    .btn-reprint {
        width: 100%;
        justify-content: center;
    }
}

/* Badge RECIENTE */
.recent-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ffb347;
    color: #0a2540;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(255, 179, 71, 0.3);
}

.btn-aplicar {
    padding: 2px 24px;
    background: #1e7b4c;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .btn-aplicar:hover {
        background: #14633c;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(30, 123, 76, 0.2);
    }
