/* Modern Professional Sidebar - Default Hidden */

/* Floating Toggle Button */
.sidebar-toggle-floating {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1050;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle-floating:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.sidebar-toggle-floating:active {
    transform: scale(0.95);
}

.sidebar-toggle-floating i {
    transition: transform 0.3s ease;
}


/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modern Sidebar - Default Hidden, Pure Overlay */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar.show {
    transform: translateX(0);
}

/* Sidebar Header - Modern Brand Design */
.sidebar-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    flex-shrink: 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-brand 3s ease-in-out infinite;
}

@keyframes pulse-brand {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

/* Brand Container */
.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.brand-icon:hover {
    transform: rotate(360deg) scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    line-height: 1;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0;
}

.sidebar .nav-pills {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .nav-item {
    display: block;
    margin: 0 0.75rem 0.35rem 0.75rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: #374151;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(18, 140, 126, 0.05));
    color: #25D366;
    transform: translateX(5px);
}

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

.sidebar .nav-link.active {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    font-weight: 600;
}

.sidebar .nav-link.active::before {
    display: none;
}

.sidebar .nav-link i {
    width: 24px;
    font-size: 1.15rem;
    margin-right: 0.85rem;
    text-align: center;
}

.sidebar .nav-link span {
    flex: 1;
}

.sidebar .nav-item.mt-3 {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.sidebar .nav-link.text-danger {
    color: #dc3545;
}

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

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    text-align: center;
    background: linear-gradient(180deg, transparent, #f9fafb);
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.sidebar-footer small {
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Main Content - ALWAYS FULL WIDTH */
.main-content {
    margin-left: 0 !important;
    padding: 2rem;
    min-height: 100vh;
    width: 100%;
    transition: none !important;
}

/* Override any with-sidebar class */
.main-content.with-sidebar {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Custom Scrollbar */
.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

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

.sidebar-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.3), rgba(18, 140, 126, 0.3));
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.5), rgba(18, 140, 126, 0.5));
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar.show {
    animation: slideIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }
    
    .sidebar-toggle-floating {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 1.25rem !important;
        margin-left: 0 !important;
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-icon {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .sidebar {
        background: #1f2937;
        border-right-color: #374151;
    }
    
    .sidebar .nav-link {
        color: #d1d5db;
    }
    
    .sidebar .nav-link:hover {
        background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(18, 140, 126, 0.1));
    }
    
    .sidebar-footer {
        background: linear-gradient(180deg, transparent, #111827);
        border-top-color: #374151;
    }
}

/* Prevent Content Overlap with Floating Button */
.main-content {
    padding-top: 90px !important; /* Space for button + margin */
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 80px !important; /* Slightly less on mobile */
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Ensure first element in content has proper spacing */
.main-content > *:first-child {
    margin-top: 0;
}

/* Container fluid spacing adjustment */
.main-content .container-fluid {
    padding-top: 0;
}



    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

/* Brand Container - Clean without close button */
.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

/* Brand Icon */
.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.brand-icon:hover {
    transform: rotate(360deg) scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* Brand Text */
.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    line-height: 1;
}



/* Hide floating toggle button when sidebar is open */
.sidebar-toggle-floating.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.8) translateX(-30px) !important;
}

/* Smooth transition for floating button visibility */
.sidebar-toggle-floating {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
