.sidebar-filter .sidebar-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:12px;
}
.btn-reset-filter-icon{
    background:#f5f7fa;
    border:1px solid #e1e1e1;
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    cursor:pointer;
}
.btn-reset-filter-icon .material-icons{font-size:20px;color:#0048d8}
.btn-reset-filter-icon:hover{background:#e3f0ff;border-color:#90caf9}
.sidebar-filter .sidebar-header h3{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:1rem;
    margin:0;
}
.sidebar-filter .sidebar-term-list{
    overflow:auto;
    max-height: calc(100vh - 240px);
    min-height: 200px;
}
.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.sidebar-term-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-term-list li {
    margin-bottom: 10px;
}
.sidebar-term-list a {
    color: #222;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}
.sidebar-term-list a::before{
    font-family: 'Material Icons';
    content: 'menu_book';
    font-size: 18px;
    line-height: 1;
    margin-right: 8px;
    color: #0048d8;
}
.sidebar-term-list a.active,
.sidebar-term-list a:hover {
    background: #f0f4ff;
    color: #0048d8;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 991.98px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575.98px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}
.completion-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 500;
}
.completion-status.completed {
    color: #28a745;
}
.completion-status.in-progress {
    color: #000;
}
.completion-status.not-started {
    color: #6c757d;
}
.completion-status svg {
    flex-shrink: 0;
}
.completion-status .progress-bar {
    flex: 1;
    height: 10px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-right: 8px;
}
.completion-status .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}
.completion-status .progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 1;
}
.completion-status.not-started .progress-text {
    color: #6c757d;
    text-shadow: none;
}
.hoc-phan-section {
    margin-bottom: 40px;
}

/* Modern Page Header */
.page-header-modern {
    background: #0048d8;
    border-radius: 16px;
    padding: 32px 24px;
    margin:20px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 20px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.breadcrumb-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-1px);
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-separator .material-icons {
    font-size: 16px;
}

.breadcrumb-current {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.breadcrumb-link .material-icons,
.breadcrumb-current .material-icons {
    font-size: 18px;
}

/* Page Title Section */
.page-title-section {
    position: relative;
    z-index: 1;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-title .material-icons {
    font-size: 2.5rem;
    color: #ffd700;
}

.page-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-modern {
        padding: 24px 16px;
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .page-title .material-icons {
        font-size: 2rem;
    }
    
    .breadcrumb-list {
        gap: 4px;
    }
    
    .breadcrumb-link,
    .breadcrumb-current {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .breadcrumb-link .material-icons,
    .breadcrumb-current .material-icons {
        font-size: 16px;
    }
}

/* Modern Pagination */
.pagination-modern-container {
    margin-top: 40px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.pagination-info-modern {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.pagination-text-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.pagination-text-modern .material-icons {
    font-size: 18px;
    color: #0048d8;
}

.current-range,
.total-items {
    font-weight: 600;
    color: #0048d8;
}

.pagination-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #0048d8;
    color: white;
    border-color: #0048d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 72, 216, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #adb5bd;
}

.pagination-btn.active {
    background: #0048d8;
    color: white;
    border-color: #0048d8;
    font-weight: 600;
}

.pagination-btn .material-icons {
    font-size: 18px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.pagination-numbers .pagination-btn {
    min-width: 40px;
    width: auto;
    padding: 0 12px;
}

.pagination-dots {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: #6c757d;
    font-weight: 600;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-modern-container {
        padding: 16px;
        margin-top: 24px;
    }
    
    .pagination-modern {
        gap: 4px;
    }
    
    .pagination-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .pagination-numbers {
        margin: 0 4px;
    }
    
    .pagination-numbers .pagination-btn {
        min-width: 36px;
        padding: 0 8px;
    }
    
    .pagination-text-modern {
        font-size: 13px;
        text-align: center;
    }
}

/* Loading State */
.pagination-loading {
    position: relative;
    pointer-events: none;
}

.pagination-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0048d8;
    border-radius: 50%;
    animation: pagination-spin 1s linear infinite;
}

@keyframes pagination-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Layout cho bai-tap - Desktop */
.bai-tap-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    align-items: start;
}

/* Desktop sidebar */
.sidebar-filter {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    height: fit-content;
    max-height: calc(100vh - 180px);
    position: sticky;
    top: 100px;
    overflow: hidden;
    display: block;
}

/* Desktop - Ẩn toggle button nhưng giữ layout */
.sidebar-filter-toggle { 
    visibility: hidden;
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Desktop - Ẩn close button */
.sidebar-close-btn {
    display: none;
}

@media (max-width: 768px) {
    .bai-tap-layout {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    /* Mobile - Ẩn desktop sidebar */
    .sidebar-filter:not(.offcanvas) {
        display: none;
    }
    
    /* Mobile - Hiển thị offcanvas sidebar */
    .sidebar-filter.offcanvas {
        display: block;
    }
    
    .sidebar-filter-toggle {
        visibility: visible;
        opacity: 1;
        height: auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 14px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        background: #fff;
        cursor: pointer;
        margin: 0 0 12px 0;
        position: sticky;
        top: 20px;
        z-index: 1;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .sidebar-filter-toggle.scrolled {
        position: fixed;
        bottom: 20px;
        left: 20px;
        top: auto;
        padding: 12px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
        margin: 0;
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
        background: #0048d8;
        border: none;
    }
    
    .sidebar-filter-toggle.scrolled svg {
        color: white;
        width: 24px;
        height: 24px;
    }
    
    .sidebar-filter-toggle.scrolled .toggle-text {
        display: none;
    }
    
    .sidebar-filter.offcanvas {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        background: #fff;
        z-index: 100001;
        overflow-y: auto;
        transition: left .35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 30px rgba(0,0,0,.15);
        display: flex;
        flex-direction: column;
    }
    
    .sidebar-filter.offcanvas.active { 
        left: 0;
        padding:0;
        font-size:20px;
    }
    .sidebar-filter .sidebar-header h3{
        font-size:24px;
    }
    .sidebar-filter-overlay {
        position: fixed; 
        inset: 0; 
        background: rgba(0,0,0,.5);
        z-index: 100000; 
        opacity: 0; 
        visibility: hidden; 
        transition: opacity .2s ease;
    }
    
    .sidebar-filter-overlay.active { 
        opacity: 1; 
        visibility: visible; 
    }
    
    /* Sidebar content area */
    .sidebar-filter.offcanvas .sidebar-box {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
    }
    
    /* Mobile - Hiển thị close button */
    .sidebar-close-btn {
        display: flex;
        position: sticky;
        bottom: 0;
        width: 48px;
        height: 48px;
        background: #dc3545;
        color: white;
        border: none;
        border-radius: 50%;
        padding: 0;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        margin: 20px auto 20px auto;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    .sidebar-close-btn:hover {
        background: #c82333;
        transform: scale(1.05);
    }
    
    .sidebar-close-btn .material-icons {
        font-size: 24px;
    }
}

