/* Sidebar Navigation Styles */

/* Smooth scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1e2936;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #5a6578;
}

/* Active menu item highlight animation */
.sidebar-link {
    position: relative;
    overflow: hidden;
}

.sidebar-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s;
}

.sidebar-link:hover::after {
    width: 100%;
}

/* Submenu animation */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar-item.active > .sidebar-submenu {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

/* Icon rotation animation */
.dropdown-arrow {
    transition: transform 0.3s ease;
}

/* Mobile overlay */
@media (max-width: 768px) {
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1019;
        display: none;
    }
    
    .sidebar.show ~ .sidebar-overlay {
        display: block;
    }
}

/* Sidebar toggle button animation */
.sidebar-toggle {
    transition: transform 0.3s;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

/* Search input focus effect */
.sidebar-search input:focus {
    outline: none;
    background-color: #3a4a5c;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
}

/* Badge animations */
.notification-count {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Collapsed sidebar hover effect */
.sidebar.collapsed .sidebar-link:hover {
    background-color: #34495e;
}

/* Tooltip arrow */
.sidebar.collapsed .sidebar-link:hover::before {
    content: '';
    position: absolute;
    left: calc(100% - 5px);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 5px 0;
    border-color: transparent #212529 transparent transparent;
    z-index: 1001;
}

/* Active page indicator */
.sidebar-link.active {
    position: relative;
    font-weight: 500;
}

/* Section headers styling */
.sidebar-header {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    opacity: 0.7;
}

/* Responsive font sizes */
@media (max-width: 1200px) {
    .sidebar-link {
        font-size: 0.9rem;
    }
    
    .sidebar-submenu .sidebar-link {
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .main-header {
        display: none;
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode overrides can be added here */
}

/* Accessibility improvements */
.sidebar-link:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

/* Loading state for sidebar */
.sidebar.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Sidebar footer (if needed) */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: #1e2936;
    border-top: 1px solid #34495e;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.5rem;
}

/* Custom scrollbar for main content */
.main-content::-webkit-scrollbar {
    width: 10px;
}

.main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.main-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Breadcrumb enhancement for sidebar layout */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    margin: -2rem -2rem 1rem -2rem;
    border-bottom: 1px solid #dee2e6;
}

/* Card shadows for better depth */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Table hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

/* Button group alignment in sidebar layout */
.btn-group-vertical {
    width: 100%;
}

.btn-group-vertical .btn {
    text-align: left;
}

/* Responsive tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Alert positioning */
.alert {
    margin-bottom: 1rem;
}