/* Navbar Styles */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Sidebar Styles */
#sidebar {
    width: 280px;
    background: #212529;
    height: calc(100vh - 56px);
    position: fixed;
    right: 0;
    top: 56px;
    padding-top: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1020;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

#sidebar.collapsed {
    right: -280px;
}

#sidebar.show {
    right: 0;
}

#sidebar .nav-link {
    color: #adb5bd;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

#sidebar .nav-link:hover {
    background: #0d6efd;
    color: #fff;
    transform: translateX(-3px);
}

#sidebar .nav-link.active {
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Section Titles */
.nav-section-title {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 15px 20px 8px 20px;
    letter-spacing: 0.5px;
}

/* Dividers */
.nav-divider {
    height: 1px;
    background: #343a40;
    margin: 10px 15px;
}

/* Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 64px;
    right: 15px;
    z-index: 1025;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Content Area */
#content {
    margin-right: 280px;
    margin-top: 56px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: calc(100vh - 56px);
}

#content.expanded {
    margin-right: 0;
}

/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Scrollbar Styling for Sidebar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

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

#sidebar::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* Tablet Responsive (768px - 992px) */
@media (max-width: 992px) {
    #sidebar {
        right: -280px;
    }
    
    #sidebar.show {
        right: 0;
    }
    
    #content {
        margin-right: 0 !important;
    }
    
    .sidebar-toggle {
        right: 15px;
    }
}

/* Mobile Responsive (< 768px) */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .navbar-brand img {
        height: 25px !important;
    }
    
    #sidebar {
        width: 280px;
        right: -280px;
    }
    
    #sidebar.show {
        right: 0;
    }
    
    .sidebar-toggle {
        top: 64px;
        right: 10px;
        padding: 6px 10px;
    }
    
    #content {
        margin-right: 0 !important;
    }
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 576px) {
    #sidebar {
        width: 260px;
        right: -260px;
    }
    
    .navbar-brand {
        font-size: 0.85rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #sidebar,
    .sidebar-toggle,
    .sidebar-overlay {
        display: none !important;
    }
    
    #content {
        margin-right: 0 !important;
        margin-top: 0 !important;
    }
}

/* Dashboard Card Styles */
.dashboard-card {
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    border: none;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

.dashboard-card .card {
    transition: all 0.3s ease;
    height: 100%;
}

.dashboard-card:hover .card {
    border-color: rgba(255, 255, 255, 0.3);
}

.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Clickable card wrapper */
a.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent body scroll when sidebar is open on mobile */
@media (max-width: 992px) {
    body.sidebar-open {
        overflow: hidden;
    }
}

/* Notification Badge Styles */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.dashboard-card {
    position: relative;
}

.dashboard-card .card {
    position: relative;
}

/* Badge color variants */
.notification-badge.badge-primary {
    background: #0d6efd;
}

.notification-badge.badge-warning {
    background: #ffc107;
    color: #000;
}

.notification-badge.badge-success {
    background: #198754;
}

.notification-badge.badge-info {
    background: #0dcaf0;
    color: #000;
}

/* Responsive badge sizes */
@media (max-width: 768px) {
    .notification-badge {
        min-width: 20px;
        height: 20px;
        font-size: 0.65rem;
        top: -6px;
        right: -6px;
    }
}
