body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    margin-left: -250px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h3 {
    color: white;
    font-size: 18px;
    margin: 0;
}

.sidebar ul {
    padding: 20px 0;
    border-bottom: 1px solid #47748b;
}

.sidebar ul.components {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar ul p {
    color: #fff;
    padding: 10px;
}

.sidebar ul li a {
    padding: 15px 20px;
    font-size: 16px;
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar ul li.active > a,
a[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar ul li a i {
    margin-right: 10px;
}

.sidebar-footer {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-footer a:hover {
    color: #fff;
}

.content {
    width: calc(100% - 250px);
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s ease-in-out;
    margin-left: 250px;
}

.content.active {
    width: 100%;
    margin-left: 0;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 500;
}

.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: none;
}

.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 500;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    cursor: pointer;
}

.form-control {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.alert {
    border-radius: 8px;
    border: none;
}

.badge {
    font-size: 12px;
    padding: 6px 10px;
}

.navbar {
    background: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#sidebarCollapse {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    transition: all 0.3s;
}

#sidebarCollapse:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .content {
        width: 100%;
        margin-left: 0;
    }
    
    .content.active {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .content {
        width: 100%;
        margin-left: 0;
    }
    
    .content.active {
        width: 100%;
        margin-left: 0;
    }
    
    .sidebar.active ~ .content {
        position: relative;
    }
    
    .sidebar.active ~ .content::before {
        content: '';
        position: fixed;
        top: 0;
        left: 250px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
}

/* Card improvements */
.card.h-100 {
    transition: transform 0.3s ease;
}

.card.h-100:hover {
    transform: translateY(-5px);
}

/* Pagination styling */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    color: #5a6fd8;
    background-color: #f8f9fa;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}
