/* Sidebar Navigation Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

/* Sidebar close button */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    transition: background-color 0.2s ease;
}

.sidebar-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.sidebar-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.user-info-sidebar {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-info-sidebar svg {
    width: 16px;
    height: 16px;
}

.user-info-sidebar span {
    color: #ecf0f1;
    font-size: 14px;
    font-weight: 500;
}

.btn-logout-sidebar {
    width: 100%;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.btn-logout-sidebar:hover {
    background: #c0392b;
}

.btn-logout-sidebar svg {
    width: 16px;
    height: 16px;
}

/* Mobile overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar-content {
    padding: 20px 0;
    overflow-y: auto;
    height: calc(100vh - 190px);
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section h3 {
    padding: 0 20px 10px 20px;
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #3498db;
}

.nav-item.active {
    background-color: rgba(52, 152, 219, 0.2);
    color: white;
    border-left-color: #3498db;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.nav-item span {
    font-weight: 500;
}

/* Main Layout */
.main-layout {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed + .main-layout {
    margin-left: 0;
    width: 100%;
}

/* Container adjustments */
.container {
    display: flex;
    min-height: 100vh;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        z-index: 1001;
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%) !important;
    }
    
    .main-layout {
        margin-left: 0;
        width: 100%;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .sidebar.collapsed + .main-layout {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1002;
        background: #2c3e50;
        color: white;
        border: none;
        padding: 12px;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    /* Add mobile menu button to header */
    .header {
        padding-left: 80px;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: #e74c3c !important;
        border: 2px solid #c0392b !important;
        color: white !important;
    }
    
    .header .sidebar-toggle {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Force mobile menu button to show only on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
        background: #2c3e50 !important;
        border: none !important;
        color: white !important;
        padding: 12px !important;
        border-radius: 6px !important;
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 1003 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
        cursor: pointer !important;
        transition: background-color 0.2s ease !important;
    }
    
    .mobile-menu-toggle:hover {
        background: #34495e !important;
    }
    
    .mobile-menu-toggle svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Ensure sidebar is visible when open */
    .sidebar.open {
        transform: translateX(0) !important;
        display: block !important;
        visibility: visible !important;
    }
    
    /* Ensure sidebar is hidden when collapsed */
    .sidebar.collapsed {
        transform: translateX(-100%) !important;
    }
    
    /* Hide hamburger button when sidebar is open */
    .sidebar.open ~ .main-layout .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Show close button when sidebar is open */
    .sidebar.open .sidebar-close-btn {
        display: block !important;
    }
}

/* Header adjustments for sidebar */
.header {
    background: white;
    border-bottom: 1px solid #e1e8ed;
    padding: 0 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: #2c3e50;
    border: none;
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1003;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-menu-toggle:hover {
    background-color: #34495e;
}

.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
}

.header-content h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #2c3e50;
}

.subtitle {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Main content adjustments */
.main-content {
    margin-left: 280px;
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
    transition: margin-left 0.3s ease;
}

/* Scrollbar styling for sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Page-specific styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e8ed;
}

.page-title h2 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.page-title p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.page-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary svg {
    width: 16px;
    height: 16px;
}

.content-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.card-content {
    padding: 30px;
}

.placeholder-content {
    text-align: center;
    color: #7f8c8d;
}

.placeholder-content svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.placeholder-content p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
    }
}

/* Reports specific styles */
.reports-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    transition: all 0.2s ease;
}

.report-item:hover {
    background: #e8f4fd;
    border-color: #3498db;
}

.report-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-info {
    flex: 1;
}

.report-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.report-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Responsive for reports */
@media (max-width: 1024px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .report-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}
