/* Estilos para el accordion de configuraciones */
.btn-config-accordion {
    background: linear-gradient(135deg, #002147 0%, #003366 100%);
    color: white !important;
    border: none;
    padding: 1.25rem 1.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 0;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 33, 71, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-config-accordion::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-config-accordion:hover::before {
    left: 100%;
}

.btn-config-accordion:hover {
    background: linear-gradient(135deg, #003366 0%, #0055aa 100%);
    color: white !important;
    box-shadow: 0 6px 20px rgba(0, 33, 71, 0.25);
}

.btn-config-accordion:not(.collapsed) {
    background: linear-gradient(135deg, #001a35 0%, #002952 100%);
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.2);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-config-accordion:focus {
    background: linear-gradient(135deg, #002147 0%, #003366 100%);
    color: white !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 51, 102, 0.4);
    outline: none;
}

.btn-config-accordion::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-config-accordion:not(.collapsed)::after {
    transform: rotate(180deg);
}

.btn-config-accordion i.config-icon {
    font-size: 1.2rem;
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-config-accordion:hover i.config-icon {
    animation: spin-fast 1s linear infinite;
}

@keyframes spin-fast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-config-accordion-disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: rgba(255, 255, 255, 0.5) !important;
    border: none;
    padding: 1.25rem 1.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 0;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.1);
}

.btn-config-accordion-disabled::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    opacity: 0.5;
}

/* Menu body del accordion */
.config-menu-body {
    background: white;
    border-left: 2px solid rgba(0, 33, 71, 0.1);
    border-right: 2px solid rgba(0, 33, 71, 0.1);
    border-bottom: 2px solid rgba(0, 33, 71, 0.1);
    animation: accordion-slide 0.3s ease-out;
}

@keyframes accordion-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Items del menú de configuración */
.config-menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1rem;
    color: #002147;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
}

.config-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #002147 0%, #0055aa 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.config-menu-item:hover::before {
    transform: scaleY(1);
}

.config-menu-item:hover {
    background: linear-gradient(90deg, rgba(0, 33, 71, 0.1) 0%, rgba(0, 85, 170, 0.05) 100%);
    color: #0055aa;
    padding-left: 2.25rem;
    text-decoration: none;
}

.config-menu-item:active {
    background: linear-gradient(90deg, rgba(0, 33, 71, 0.15) 0%, rgba(0, 85, 170, 0.08) 100%);
}

.config-menu-item i:first-child {
    width: 28px;
    text-align: center;
    color: #002147;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.config-menu-item:hover i:first-child {
    transform: scale(1.2) rotate(5deg);
    color: #0055aa;
}

.config-menu-item i.fa-chevron-right {
    font-size: 0.875rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.config-menu-item:hover i.fa-chevron-right {
    color: #0055aa;
    transform: translateX(5px);
}

/* Bordes del accordion item */
.accordion-item.border-0 {
    border: none !important;
}

/* Alert de información */
.alert-info {
    border-left: 4px solid #0dcaf0;
    background: linear-gradient(90deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.03) 100%);
    border-radius: 0.375rem;
    animation: fade-in 0.5s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   ESTILOS PARA DROPDOWNS DE NAVBAR
   =================================== */

/* Botones de dropdown de la navbar */
.navbar-dropdown-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
}

.navbar-dropdown-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.navbar-dropdown-btn:hover::before {
    left: 100%;
}

.navbar-dropdown-btn:hover {
    background-color: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.navbar-dropdown-btn:active {
    transform: translateY(0);
}

.navbar-dropdown-btn[aria-expanded="true"] {
    background-color: #0d6efd !important;
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.navbar-dropdown-btn i {
    transition: transform 0.3s ease;
}

.navbar-dropdown-btn:hover i {
    transform: scale(1.2);
}

/* Menú dropdown de la navbar */
.navbar-dropdown-menu {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    margin-top: 0.5rem !important;
    animation: navbar-dropdown-slide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 220px;
}

@keyframes navbar-dropdown-slide {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Items del dropdown de la navbar */
.navbar-dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #212529;
    position: relative;
    overflow: hidden;
}

.navbar-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.navbar-dropdown-item:hover::before {
    transform: scaleY(1);
}

.navbar-dropdown-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
    transition: left 0.5s ease;
}

.navbar-dropdown-item:hover::after {
    left: 100%;
}

.navbar-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.12) 0%, rgba(13, 110, 253, 0.05) 100%);
    color: #0d6efd;
    padding-left: 1.75rem;
    transform: translateX(4px);
}

.navbar-dropdown-item:active {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.2) 0%, rgba(13, 110, 253, 0.1) 100%);
    transform: translateX(2px);
}

.navbar-dropdown-item i {
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-block;
}

.navbar-dropdown-item:hover i {
    transform: scale(1.3) rotate(5deg);
    color: #0d6efd;
}

/* Botón de Ayuda */
.navbar-help-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
}

.navbar-help-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.navbar-help-btn:hover::before {
    left: 100%;
}

.navbar-help-btn:hover {
    background-color: #198754 !important;
    border-color: #198754;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4);
}

.navbar-help-btn:active {
    transform: translateY(0);
}

.navbar-help-btn i {
    transition: transform 0.3s ease;
}

.navbar-help-btn:hover i {
    transform: scale(1.2) rotate(-15deg);
}

/* Animación de pulso para iconos importantes */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(13, 110, 253, 0);
    }
}

.navbar-dropdown-btn[aria-expanded="true"]::after {
    animation: pulse-glow 1.5s infinite;
}

/* Headers del dropdown */
.dropdown-header {
    color: #0d6efd;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-header i {
    color: #0d6efd;
}

/* Dividers más sutiles */
.navbar-dropdown-menu .dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid rgba(13, 110, 253, 0.1);
}

/* Aumentar el tamaño del menú de datos */
.navbar-dropdown-menu {
    max-height: 600px;
    overflow-y: auto;
}

/* Scrollbar personalizado para el menú */
.navbar-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.navbar-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.navbar-dropdown-menu::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 10px;
}

.navbar-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Estilos para el card de configuración */
.config-card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 33, 71, 0.15) !important;
}

/* Estilos específicos para la configuración de gráficos */
.config-section {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.config-section:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-check-label:hover {
    color: #0d6efd;
}

/* Estilos para los radio buttons */
input[type="radio"] {
    margin-right: 8px;
}

.card-header h6 {
    margin: 0;
    font-weight: 600;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Animación para el botón */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}
