/* ============================================
   PREMIUM NAVBAR & SIDEBAR STYLES
   Stile moderno con gradient viola
   ============================================ */

/* ===== NAVBAR SUPERIORE ===== */
.premium-navbar {
    background: #366092 !important;
    box-shadow: none;
    border: none;
    position: relative;
    overflow: visible !important;
    margin-bottom: 0 !important;
    z-index: 1030;
}


.premium-navbar .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.premium-navbar .navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}


.premium-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
}

.premium-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.premium-navbar .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

.premium-navbar .nav-link:hover::after {
    width: 80%;
}

.premium-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1040 !important;
    position: absolute !important;
}

.premium-navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1041;
}

.premium-navbar .nav-item.dropdown {
    position: relative;
    z-index: 1040;
}

.premium-navbar .dropdown-item:hover {
    background: linear-gradient(135deg, #366092 0%, #2d5280 100%);
    color: #fff;
    transform: translateX(5px);
}

/* ===== SIDEBAR PREMIUM ===== */
.sidebar {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(54, 96, 146, 0.1);
    min-height: 100vh;
    padding-top: 0 !important;
}

.sidebar .position-sticky {
    padding-top: 0 !important;
    top: 0 !important;
}

/* Header Sidebar */
.sidebar .position-sticky > div:first-child {
    background: transparent;
    padding: 1.5rem 1rem;
    margin: 0 !important;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0 !important;
    border-bottom: 1px solid #dee2e6;
}

.sidebar .position-sticky > div:first-child .fs-5 {
    color: #366092 !important;
    font-weight: 700;
}

.sidebar .position-sticky > div:first-child i {
    color: #366092 !important;
}

/* Sidebar Headings */
.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #366092 !important;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* Sidebar Links */
.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #366092 0%, #2d5280 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(54, 96, 146, 0.1) 0%, rgba(45, 82, 128, 0.1) 100%);
    color: #366092 !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(54, 96, 146, 0.1);
}

.sidebar .nav-link:hover::before {
    transform: scaleY(1);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, #366092 0%, #2d5280 100%);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(54, 96, 146, 0.3);
    transform: translateX(5px);
}

.sidebar .nav-link.active::before {
    transform: scaleY(1);
    background: #fff;
}

.sidebar .nav-link.active:hover {
    box-shadow: 0 6px 20px rgba(54, 96, 146, 0.4);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover i {
    transform: scale(1.2);
}

.sidebar .nav-link.text-danger:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.15) 100%);
    color: #dc3545 !important;
}

/* Divider */
.sidebar-divider {
    border-color: rgba(54, 96, 146, 0.2) !important;
    margin: 1rem 0.5rem !important;
}

/* Quick Stats Box */
.sidebar .bg-primary.bg-opacity-10 {
    background: linear-gradient(135deg, rgba(54, 96, 146, 0.1) 0%, rgba(45, 82, 128, 0.1) 100%) !important;
    border: 1px solid rgba(54, 96, 146, 0.2);
    border-radius: 15px;
    padding: 1.5rem !important;
    box-shadow: 0 4px 15px rgba(54, 96, 146, 0.1);
    transition: all 0.3s ease;
}

.sidebar .bg-primary.bg-opacity-10:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(54, 96, 146, 0.15);
}

.sidebar .bg-primary.bg-opacity-10 h6 {
    color: #366092 !important;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sidebar .bg-primary.bg-opacity-10 i {
    color: #2d5280 !important;
}

/* ===== MOBILE APP HEADER ===== */
.mobile-app-header {
    background: linear-gradient(135deg, #366092 0%, #2d5280 100%);
    box-shadow: 0 4px 20px rgba(54, 96, 146, 0.3);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1055 !important;
    overflow: hidden;
}

.mobile-app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.mobile-app-header h1 {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.mobile-app-header .header-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.mobile-hamburger {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mobile-hamburger:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ===== BREADCRUMB PREMIUM ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: #366092;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #2d5280;
    transform: translateX(2px);
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #366092;
}

/* ===== BUTTONS PREMIUM ===== */
.btn-outline-primary {
    border-color: #366092;
    color: #366092;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #366092 0%, #2d5280 100%);
    border-color: #366092;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(54, 96, 146, 0.3);
}

/* ===== MOBILE SIDEBAR CLOSE BUTTON ===== */
.mobile-sidebar-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease !important;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.show {
        left: 0;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .premium-navbar::before,
    .mobile-app-header::before,
    .premium-navbar .navbar-brand i,
    .sidebar .nav-link,
    .sidebar .nav-link::before,
    .sidebar .nav-link i {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== DARK MODE SUPPORT (future) ===== */
@media (prefers-color-scheme: dark) {
    /* Placeholder per future implementazioni dark mode */
}
