/* ============================================
   DISEÑO PROFESIONAL Y MODERNO 2026
   Paleta Premium - Responsive First
   ============================================ */

:root {
    /* Paleta Premium - Grises y Dorado */
    --premium-gold: #d4af37;
    --premium-gold-light: #e8c468;
    --premium-dark: #0a0e1a;
    --premium-darker: #060810;
    --premium-gray: #1a1f2e;
    --premium-gray-light: #2a2f3e;
    --premium-border: rgba(212, 175, 55, 0.1);
    --premium-border-hover: rgba(212, 175, 55, 0.25);
    --premium-text: #e4e7eb;
    --premium-text-muted: #9ca3af;
    --premium-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SIDEBAR PREMIUM
   ============================================ */

.dashboard-sidebar {
    background: linear-gradient(180deg, var(--premium-dark) 0%, var(--premium-darker) 100%) !important;
    border-right: 1px solid var(--premium-border) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5) !important;
}

.dashboard-sidebar .bg--lights {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.03)) !important;
    border-bottom: 1px solid var(--premium-border) !important;
    padding: 28px 20px !important;
}

/* Scrollbar elegante */
.dashboard-sidebar::-webkit-scrollbar {
    width: 5px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.35);
}

/* ============================================
   ITEMS DEL MENÚ
   ============================================ */

.sidebar-menu {
    padding: 20px 16px !important;
}

.sidebar-menu > li {
    margin-bottom: 6px !important;
}

.sidebar-menu > li > a,
.sidebar-menu-toggle {
    position: relative;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    color: var(--premium-text) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

/* Efecto hover sutil */
.sidebar-menu > li > a:hover,
.sidebar-menu-toggle:hover {
    background: rgba(212, 175, 55, 0.06) !important;
    color: var(--premium-gold-light) !important;
    transform: translateX(6px) !important;
    padding-left: 22px !important;
}

/* Estado activo con borde dorado elegante */
.sidebar-menu > li > a.active,
.sidebar-menu-item.active > a {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05)) !important;
    border-left: 3px solid var(--premium-gold) !important;
    color: var(--premium-gold-light) !important;
    font-weight: 600 !important;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.05) !important;
}

/* Iconos con transición suave */
.sidebar-menu img {
    transition: all 0.3s ease !important;
    filter: brightness(1.1) opacity(0.85) !important;
    width: 20px !important;
    height: 20px !important;
}

.sidebar-menu > li > a:hover img,
.sidebar-menu > li > a.active img {
    filter: brightness(1.3) opacity(1) !important;
    transform: scale(1.08) !important;
}

/* ============================================
   FLECHAS DE DROPDOWN
   ============================================ */

.sidebar-menu-arrow,
.sidebar-submenu-arrow {
    color: var(--premium-text-muted) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 13px !important;
    opacity: 0.7 !important;
}

.sidebar-menu > li > a:hover .sidebar-menu-arrow,
.sidebar-submenu-toggle:hover .sidebar-submenu-arrow {
    color: var(--premium-gold-light) !important;
    opacity: 1 !important;
}

.sidebar-dropdown.show .sidebar-menu-arrow,
.sidebar-dropdown-level2.show .sidebar-submenu-arrow {
    transform: rotate(90deg) !important;
    color: var(--premium-gold) !important;
    opacity: 1 !important;
}

/* ============================================
   SUBMENÚS
   ============================================ */

.sidebar-submenu {
    background: rgba(0, 0, 0, 0.25) !important;
    border-radius: 10px !important;
    margin: 6px 12px 6px 12px !important;
    overflow: hidden !important;
    max-height: 0 !important;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-left: 1px solid rgba(212, 175, 55, 0.08) !important;
}

.sidebar-submenu.show {
    max-height: 2500px !important;
    padding: 8px 0 !important;
}

/* Items nivel 2 */
.sidebar-submenu-item > a,
.sidebar-submenu-toggle {
    padding: 11px 18px 11px 42px !important;
    color: var(--premium-text-muted) !important;
    font-size: 13px !important;
    transition: all 0.25s ease !important;
    border-left: 2px solid transparent !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
}

.sidebar-submenu-item > a:hover,
.sidebar-submenu-toggle:hover {
    color: var(--premium-text) !important;
    background: rgba(212, 175, 55, 0.05) !important;
    border-left-color: rgba(212, 175, 55, 0.4) !important;
    padding-left: 46px !important;
}

.sidebar-submenu-item > a.active {
    color: var(--premium-gold-light) !important;
    background: rgba(212, 175, 55, 0.08) !important;
    border-left-color: var(--premium-gold) !important;
    font-weight: 500 !important;
}

/* ============================================
   SUBMENU NIVEL 3
   ============================================ */

.sidebar-submenu-inner {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
    margin: 4px 8px 4px 24px !important;
    overflow: hidden !important;
    max-height: 0 !important;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar-submenu-inner.show {
    max-height: 1800px !important;
    padding: 6px 0 !important;
}

.sidebar-submenu-level3-item > a {
    padding: 9px 16px 9px 52px !important;
    color: var(--premium-text-muted) !important;
    font-size: 12.5px !important;
    transition: all 0.25s ease !important;
    border-left: 2px solid transparent !important;
    border-radius: 6px !important;
    margin: 2px 6px !important;
}

.sidebar-submenu-level3-item > a:hover {
    color: var(--premium-text) !important;
    background: rgba(212, 175, 55, 0.04) !important;
    border-left-color: rgba(212, 175, 55, 0.3) !important;
    padding-left: 56px !important;
}

.sidebar-submenu-level3-item > a.active {
    color: var(--premium-gold-light) !important;
    background: rgba(212, 175, 55, 0.07) !important;
    border-left-color: var(--premium-gold) !important;
    font-weight: 500 !important;
}

.simple-bullet {
    color: rgba(212, 175, 55, 0.5) !important;
    font-size: 14px !important;
}

/* ============================================
   TOPBAR PREMIUM
   ============================================ */

.dashboard-nav {
    background: linear-gradient(90deg, var(--premium-dark) 0%, var(--premium-darker) 100%) !important;
    border-bottom: 1px solid var(--premium-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    padding: 0 36px !important;
    height: 72px !important;
}

.subtituloheader {
    background: linear-gradient(135deg, var(--premium-gold-light), var(--premium-gold)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 600 !important;
    font-size: 19px !important;
    letter-spacing: 0.3px !important;
}

/* Badge de rango */
.rang-user {
    border: 2px solid var(--premium-gold) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 50% !important;
    padding: 5px !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15) !important;
}

.rang-user:hover {
    transform: scale(1.12) rotate(8deg) !important;
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35) !important;
    border-color: var(--premium-gold-light) !important;
}

/* Avatar usuario */
.nav-header-link .link {
    background: linear-gradient(135deg, var(--premium-gold), var(--premium-gold-light)) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25) !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.nav-header-link .link:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45) !important;
}

/* ============================================
   DROPDOWN PERFIL
   ============================================ */

.dropdown-wrapper {
    background: var(--premium-gray) !important;
    border: 1px solid var(--premium-border-hover) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5) !important;
    min-width: 260px !important;
}

.dropdown-header {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05)) !important;
    border-bottom: 1px solid var(--premium-border) !important;
    padding: 22px !important;
}

.dropdown-header h6 {
    color: var(--premium-text) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
}

.dropdown-header p {
    color: var(--premium-text-muted) !important;
    font-size: 13px !important;
}

.dropdown-wrapper .links {
    padding: 10px !important;
}

.dropdown-wrapper .links a {
    transition: all 0.25s ease !important;
    border-radius: 10px !important;
    padding: 13px 16px !important;
    color: var(--premium-text-muted) !important;
    font-size: 14px !important;
}

.dropdown-wrapper .links a:hover {
    background: rgba(212, 175, 55, 0.08) !important;
    color: var(--premium-text) !important;
    transform: translateX(5px) !important;
}

.dropdown-wrapper .links a i {
    color: rgba(212, 175, 55, 0.6) !important;
    transition: color 0.25s ease !important;
}

.dropdown-wrapper .links a:hover i {
    color: var(--premium-gold-light) !important;
}

/* ============================================
   ALERTAS PROFESIONALES
   ============================================ */

.alert {
    border-radius: 12px !important;
    border: 1px solid !important;
    border-left-width: 4px !important;
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 18px 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    border-left-color: #10b981 !important;
    color: #34d399 !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    border-left-color: #ef4444 !important;
    color: #f87171 !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet y menores */
@media (max-width: 1199px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
    }
    
    .dashboard-sidebar.show {
        transform: translateX(0);
    }
    
    /* Overlay oscuro cuando sidebar está abierto */
    .dashboard-sidebar.show::before {
        content: '';
        position: fixed;
        top: 0;
        right: -100vw;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        z-index: -1;
    }
}

/* Móvil */
@media (max-width: 768px) {
    .dashboard-nav {
        padding: 0 20px !important;
        height: 64px !important;
    }
    
    .subtituloheader {
        font-size: 16px !important;
    }
    
    .nav-header-link .link {
        width: 40px !important;
        height: 40px !important;
        font-size: 14px !important;
    }
    
    .rang-user {
        width: 38px !important;
        height: 38px !important;
    }
    
    .dropdown-wrapper {
        min-width: 240px !important;
        right: 0 !important;
    }
    
    .sidebar-menu {
        padding: 16px 12px !important;
    }
}

/* Móvil pequeño */
@media (max-width: 576px) {
    .dashboard-sidebar {
        width: 100% !important;
    }
    
    .dashboard-nav {
        padding: 0 16px !important;
    }
    
    .subtituloheader {
        display: none !important;
    }
}

/* ============================================
   MEJORAS ADICIONALES
   ============================================ */

/* Botón toggle móvil mejorado */
.dash-sidebar-toggler {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    background: rgba(212, 175, 55, 0.08) !important;
    border: 1px solid var(--premium-border) !important;
    color: var(--premium-gold-light) !important;
    transition: all 0.3s ease !important;
}

.dash-sidebar-toggler:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: var(--premium-border-hover) !important;
    transform: scale(1.05) !important;
}

/* Animación de carga para elementos del dashboard */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-container > * {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.dashboard-container > *:nth-child(1) { animation-delay: 0.1s; }
.dashboard-container > *:nth-child(2) { animation-delay: 0.15s; }
.dashboard-container > *:nth-child(3) { animation-delay: 0.2s; }
.dashboard-container > *:nth-child(4) { animation-delay: 0.25s; }