/* Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --text-color: #333;
    --text-color-light: #666;
    --background-color: #f4f6f9;
    --card-bg: #fff;
    --sidebar-bg: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    --font-family: 'Inter', sans-serif; /* Đảm bảo sử dụng font Inter */
    --primary-color-rgb: 13, 110, 253; /* Thêm biến RGB cho Flatpickr */
}

/* Base Styles */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}
a {
    text-decoration: unset;
    color: #000;
}
.wrapper {
    display: flex;
    min-height: 100vh;
}

ol.breadcrumb {
    margin: 0px;
    padding: 0px;
    display: flex;
    font-size: 13px;
}
.breadcrumb-main {
    display: none;
}
ol.breadcrumb >li {
    list-style: none;
}

h1.more-blog-post-title {
    font-size: 20px;
    margin: 0px;
    padding: 0px;
}
.post-left li {
    list-style: none;
    margin: 0px;
    padding: 0px;
}

.post-left ul {
    display: flex;
    gap: 15px;
    margin: 0px;
    padding: 0px;
    font-size: 13px;
    margin-top: 8px;
}

h3.page-header-title.des-text {
    font-size: 20px;
}

hr {
    border: 1px solid #eee;
}

/* Định nghĩa hiệu ứng dính cho thanh điều hướng tab */
.tab-navigation.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Đảm bảo nó nằm trên các phần tử khác */
    background-color: #fff; /* Nền để che nội dung bên dưới khi cuộn */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Thêm bóng để phân biệt */
    transition: top 0.3s ease-in-out; /* Hiệu ứng chuyển động mượt mà */
}

/* Đối chiếu để tránh nhảy layout khi tab chuyển sang fixed */
.tab-navigation.sticky-nav + .tab-content-area {
    margin-top: 0; /* Điều chỉnh này có thể cần tùy chỉnh */
}

.dashboard-section {
    /* Giữ lại các thuộc tính hiện có của bạn */
    position: relative; /* Cần thiết để định vị con bên trong */
}

.breadcrumb {
    list-style: none; /* Bỏ dấu chấm mặc định */
    padding: 10px 15px;
    margin: 0;
    display: flex; /* Để các li nằm trên một hàng */
    align-items: center;
    flex-wrap: wrap; /* Cho phép xuống hàng nếu cần */
}

/* Định kiểu cho các mục trong breadcrumb */
.breadcrumb li {
    display: inline;
    font-size: 14px;
}

/* ----------------------------------------------------
   THÊM KÝ TỰ NGĂN CÁCH (SEPARATOR)
   ---------------------------------------------------- */
.breadcrumb li::before {
    /* Thêm ký tự ngăn cách */
    content: "/";
    
    /* Khoảng cách và màu sắc cho ký tự ngăn cách */
    padding: 0 8px; /* Khoảng cách hai bên ký tự */
    color: #6c757d; /* Màu xám nhạt */
    font-weight: normal; 
}

/* ẨN KÝ TỰ NGĂN CÁCH Ở MỤC ĐẦU TIÊN */
/* Sử dụng pseudo-class :first-child để chọn mục li đầu tiên */
.breadcrumb li:first-child::before {
    content: none; /* Bỏ ký tự ngăn cách */
    padding: 0;
}

/* Tùy chọn: Định kiểu cho link bên trong */
.breadcrumb li a {
    text-decoration: none;
    color: #626262;
}

.breadcrumb li a:hover {
    text-decoration: underline;
    color: #000;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    box-shadow: var(--shadow);
    transition: width 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1000; /* Đảm bảo sidebar hiển thị trên các nội dung khác */
    flex-shrink: 0; /* Ngăn sidebar bị co lại */
    /* --- Các thuộc tính FIX --- */
    position: fixed; /* Bổ sung */
    top: 0; /* Bổ sung */
    left: 0; /* Bổ sung */
    bottom: 0; /* Bổ sung: để nó chiếm toàn bộ chiều cao */
    overflow-y: auto; /* Bổ sung: cho phép nội dung sidebar cuộn */}

.sidebar.collapsed {
    width: 60px;
    /* transform: translateX(-240px); /* Ẩn phần lớn sidebar */
}

/* Header của sidebar */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    margin-right: 15px;
}

.sidebar.collapsed .toggle-sidebar-btn .fa-arrow-left {
    transform: rotate(180deg);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
}

/* Nội dung sidebar */
.sidebar-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0 15px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.filter-group select,
.filter-group input[type="text"] { /* Cập nhật để phù hợp với Flatpickr input */
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-family); /* Đồng bộ font */
    color: var(--text-color);
    box-sizing: border-box; /* Quan trọng để padding không làm tăng chiều rộng */
    background-color: var(--card-bg);
    -webkit-appearance: none; /* Loại bỏ style mặc định của browser cho select/input */
    -moz-appearance: none;
    appearance: none;
}

.filter-group select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.2-16.2%208.1-3.9%204.9-3.9%2011.6%200%2016.5l136.8%20136.9c3.9%203.9%2010.2%203.9%2014.1%200l136.9-136.9c3.9-4.9%203.9-11.6%200-16.5z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

.filter-group input::placeholder {
    color: var(--text-color-light);
}


.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.apply-filters-btn,
.clear-filters-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap; /* Ngăn nút bị ngắt dòng */
}

.apply-filters-btn {
    background-color: var(--primary-color);
    color: #fff;
    flex-grow: 1;
}

.apply-filters-btn:hover {
    background-color: #0a58ca; /* Darken primary color */
}

.clear-filters-btn {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.clear-filters-btn:hover {
    background-color: var(--border-color);
}

.filter-status {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-color-light);
}

.main-content {
    flex-grow: 1;
    margin-left: 300px;
    padding-top: 80px;
    transition: margin-left 0.3s ease;
    background: #fff;
}

.zipo-post-pagination {
    width: 100%;
}

.sidebar.collapsed + .main-content {
    margin-left: 60px; /* Bổ sung: Điều chỉnh margin khi sidebar thu gọn */
}

/* Header của main content */
.main-header {
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 999;
    height: 60px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    right: 0;
    width: calc(100% - 300px);
    transition: width 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar.collapsed + .main-content > .main-header {
    width: calc(100% - 60px); /* Bổ sung: Điều chỉnh width khi sidebar thu gọn */
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

.header-actions button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    margin-left: 10px;
    cursor: pointer;
    color: var(--text-color-light);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.header-actions button:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
}

.kpi-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    color: #fff; /* Màu chữ mặc định cho KPI card */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px; /* Chiều cao tối thiểu cho card */
}

.kpi-card .kpi-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.kpi-card .kpi-label {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.3;
}

.kpi-card .kpi-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 10px;
    line-height: 1;
}

.kpi-card .kpi-value span {
    font-size: 0.9rem;
    font-weight: 500;
    vertical-align: super;
    margin-left: 5px;
    opacity: 0.7;
}

/* KPI Card Colors */
.kpi-card.bg-blue { background-color: #0d6efd; }
.kpi-card.bg-purple { background-color: #6610f2; }
.kpi-card.bg-green { background-color: #198754; }
.kpi-card.bg-red { background-color: #dc3545; }
.kpi-card.bg-orange { background-color: #fd7e14; }
.kpi-card.bg-teal { background-color: #20c997; }

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto; /* Cho phép cuộn ngang nếu có nhiều tab */
    white-space: nowrap; /* Ngăn các nút tab bị xuống dòng */
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color-light);
    cursor: pointer;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
    border-bottom: 2px solid transparent;
    flex-shrink: 0; /* Ngăn nút tab bị co lại */
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-button:hover:not(.active) {
    color: var(--text-color);
}

/* Tab Content Area */
.tab-content-area {
    background-color: var(--card-bg);
    border-radius: 0px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Sub-sections within tabs */
.sub-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color); /* Đường kẻ phân cách mờ hơn */
}

.sub-section:last-child {
    border-bottom: none; /* Không có đường kẻ ở phần cuối cùng */
    margin-bottom: 0;
    padding-bottom: 0;
}

.sub-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

/* Chart Grid */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 2-3 cột trên màn hình lớn */
    gap: 20px; /* Khoảng cách giữa các biểu đồ */
    margin-bottom: 20px;
}

.chart-item {
    background-color: var(--card-bg); /* Nền cho từng biểu đồ */
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex; /* Để tiêu đề và biểu đồ sắp xếp tốt */
    flex-direction: column;
}

.chart-item h4 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 600;
    text-align: center; /* Căn giữa tiêu đề biểu đồ */
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    /* KHẮC PHỤC LỖI KÉO DÀI HEIGHT: Đặt chiều cao cố định cho wrapper */
    height: 300px; /* Chiều cao mong muốn cho biểu đồ */
    min-height: 200px; /* Chiều cao tối thiểu */
    flex-grow: 1; /* Cho phép nó mở rộng trong flex container */
}

canvas {
    /* Quan trọng: canvas sẽ chiếm 100% kích thước của wrapper */
    width: 100% !important;
    height: 100% !important;
    display: block; /* Tránh khoảng trắng dưới canvas */
}

/* Info List Container */
.info-list-container {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.info-list-container h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-list-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list-container ul li {
    background-color: var(--card-bg);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-color-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-list-container ul li:last-child {
    margin-bottom: 0;
}

.view-more {
    text-align: right;
    margin-top: 15px;
    font-size: 0.9rem;
}

.view-more a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.view-more a:hover {
    text-decoration: underline;
}

/* Multi-select Dropdown for Years */
.multi-select-dropdown {
    position: relative;
    width: 100%;
    font-family: var(--font-family);
}

.multi-select-dropdown .selected-items {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 40px; /* Chiều cao tối thiểu */
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-color);
    position: relative;
    box-sizing: border-box;
}

.multi-select-dropdown .selected-items .placeholder {
    color: var(--text-color-light);
}

.multi-select-dropdown .selected-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.multi-select-dropdown .selected-tag .remove-tag {
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.multi-select-dropdown .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-height: 250px; /* Giới hạn chiều cao */
    overflow-y: auto;
    z-index: 100;
    margin-top: 5px;
}

.multi-select-dropdown.active .dropdown-content {
    display: block;
}

.multi-select-dropdown .dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    background-color: var(--background-color);
    position: sticky; /* Giữ header khi cuộn */
    top: 0;
    z-index: 10;
}

.multi-select-dropdown .dropdown-header label {
    margin-bottom: 0; /* Ghi đè margin-bottom mặc định */
    display: flex;
    align-items: center;
    cursor: pointer;
}

.multi-select-dropdown .dropdown-header input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.multi-select-dropdown .year-options label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.1s ease;
    margin-bottom: 0; /* Ghi đè margin-bottom mặc định */
}

.multi-select-dropdown .year-options label:hover {
    background-color: var(--background-color);
}

.multi-select-dropdown .year-options input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Flatpickr Customizations */
.flatpickr-calendar {
    font-family: var(--font-family); /* Đồng bộ font chữ */
    box-shadow: var(--shadow); /* Đồng bộ shadow */
    border-radius: 8px; /* Đồng bộ bo góc */
    border-color: var(--border-color);
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--primary-color);
    fill: var(--primary-color);
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .flatpickr-yearInput {
    font-weight: 600;
    color: var(--text-color);
}

.flatpickr-day.today {
    border-color: var(--primary-color);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white;
}

.flatpickr-day.inRange {
    background-color: rgba(var(--primary-color-rgb), 0.1); /* Màu nhạt hơn cho range */
    border-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--text-color);
}

.flatpickr-day.flatpickr-disabled {
    color: #ccc;
}
.tab-navigation.sticky-nav {
    margin-left: 300px;
    top: 55px;
}
.sidebar.collapsed + .main-content .tab-navigation.sticky-nav {
    margin-left: 60px;
}
@media (max-width: 1050px) {
.main-content,.tab-navigation.sticky-nav {
    margin-left: 255px;
}
.sidebar {
    width: 255px;
}
.main-header {
    width: calc(100% - 255px);
}
}

/* Responsive adjustments */
@media (max-width: 992px) {
.tab-navigation.sticky-nav {
    margin-left: 0px;
    bottom: 0px;
    top: unset;
    z-index: 100;
    border: 0px;
    margin: 0px;
}
.sidebar.collapsed + .main-content > .main-header {
    width: calc(100% - 60px);
    left: 60px;
}

.sidebar {
    width: 0;
    min-width: 0;
    transform: translateX(0%);
    box-shadow: none;
    left: 0px;
    position: fixed;
}

.sidebar.collapsed + .main-content {
    margin-left: 0px;
}

.sidebar.collapsed {
    background: none;
}

    .sidebar.expanded {
        width: 280px; /* Giữ nguyên */
        min-width: 280px; /* Giữ nguyên */
        transform: translateX(0); /* Bổ sung: Hiện sidebar vào màn hình */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Bổ sung: Thêm shadow khi hiện */
    }

    .sidebar.expanded .toggle-sidebar-btn .fa-arrow-left {
        transform: rotate(0deg); /* Bổ sung: Đảm bảo icon đúng chiều khi mở trên mobile */
    }

    .main-content {
        margin-left: 0; /* Sửa đổi từ 280px thành 0 */
        padding-top: 60px; /* Giữ nguyên hoặc điều chỉnh theo chiều cao header trên mobile */
    }

    .main-header {
        width: 100%; /* Sửa đổi từ calc(...) thành 100% */
        left: 0; /* Bổ sung: Để header bắt đầu từ mép trái */
        padding: 10px 15px; /* Giữ nguyên hoặc điều chỉnh */
        flex-wrap: wrap; /* Bổ sung nếu chưa có */
    }
.page-title {
    font-size: 20px;
}
    .kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .chart-grid {
        grid-template-columns: 1fr; /* 1 cột trên màn hình nhỏ */
    }
    .chart-canvas-wrapper {
        height: 250px; /* Giảm chiều cao biểu đồ trên màn hình nhỏ hơn */
    }
.sidebar-header {
    padding: 0px;
    background: #fff;
    border: 0px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 60px;
}
    .toggle-sidebar-btn {
        left: 10px;
        top: 10px;
        z-index: 1001;
        background-color: var(--card-bg);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow);
    }
    .main-content {
        margin-left: 0; /* Reset margin khi sidebar ẩn hoàn toàn */
    }
}
/* --- Chia sẻ Dropdown --- */
.share-button-wrapper {
    position: relative; /* Để dropdown hiển thị tương đối với nút */
    display: inline-block; /* Để nút và dropdown chỉ chiếm không gian cần thiết */
    margin-left: 10px;
}

.share-dropdown {
    display: none; /* Mặc định ẩn */
    position: absolute;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: var(--shadow);
    z-index: 1000;
    border-radius: 8px;
    padding: 5px 0;
    right: 0; /* Canh lề phải với nút share */
    top: calc(100% + 10px); /* Cách nút share 10px */
}

.share-dropdown.active {
    display: block; /* Hiển thị khi active */
}

.share-dropdown .share-option {
    color: var(--text-color);
    padding: 10px 15px;
    text-decoration: none;
    display: flex; /* Dùng flexbox để căn icon và text */
    align-items: center;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.share-dropdown .share-option i {
    margin-right: 10px;
    width: 20px; /* Đảm bảo các icon có chiều rộng cố định */
    text-align: center;
}

.share-dropdown .share-option:hover {
    background-color: var(--background-color);
}

/* Icon Zalo tùy chỉnh */
.share-dropdown .share-option .zalo-icon {
    width: 20px; /* Kích thước tương đương với icon Font Awesome */
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* responsive của nút toggle sidebar cần chỉnh lại khi có share-button-wrapper */
@media (max-width: 992px) {
    .toggle-sidebar-btn {
        /* giữ nguyên hoặc điều chỉnh vị trí nếu cần */
        /* VD: left: 10px; top: 10px; */
    }
    .header-actions {
        display: flex;
        flex-wrap: wrap; /* Cho phép các nút xuống dòng */
        justify-content: flex-end; /* Canh phải */
        gap: 5px; /* Khoảng cách nhỏ giữa các nút */
    }
    .header-actions button,
    .share-button-wrapper {
        margin-left: 0; /* Reset margin */
        order: 1; /* Giữ nguyên thứ tự nếu có nhiều nút */
    }
    .share-dropdown {
        top: calc(100% + 5px); /* Điều chỉnh vị trí dropdown trên mobile */
        right: 0;
    }
}

/* --- Download Dropdown --- */
.download-button-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 10px; /* Cân đối với nút share */
}

.download-dropdown {
    display: none; /* Mặc định ẩn */
    position: absolute;
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: var(--shadow);
    z-index: 1000;
    border-radius: 8px;
    padding: 5px 0;
    right: 0;
    top: calc(100% + 10px);
}

.download-dropdown.active {
    display: block;
}

.download-dropdown .download-option {
    color: var(--text-color);
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.download-dropdown .download-option i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.download-dropdown .download-option:hover {
    background-color: var(--background-color);
}
.hidden {
    display: none;
}
.info-list-container a {
    color: #646363;
    text-decoration: unset;
}
.info-list-container a:hover {
    color: #000;
    text-decoration: unset;
}
/* CSS Reset và Box Sizing */
.zipo-post-container * {
    box-sizing: border-box;
}

.zipo-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    background: #fff;
}

/* Header và Dropdown */
.zipo-post-header {
    display: flex;
    justify-content: flex-end; /* Đẩy dropdown sang phải */
    padding: 10px 0;
}

.zipo-post-dropdown select {
    padding: 8px 20px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
}

/* Cấu trúc Grid sử dụng Flexbox (Mặc định 5 cột) */
.zipo-post-grid {
    display: flex;
    flex-wrap: wrap; /* Cho phép xuống hàng */
    gap: 20px; /* Khoảng cách giữa các item */
    justify-content: flex-start;
}

.zipo-post-item {
    width: calc(20% - 16px);
    border: 1px solid #eee;
    padding: 5px;
    text-align: center;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.3s;
}

.zipo-post-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.zipo-post-logo-wrapper {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.zipo-post-logo {
    max-width: 100%;
    /* max-height: 100%; */
    object-fit: cover;
}
.zipo-post-caption {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    padding: 0 5px;
    margin-top: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

<style>
/* CSS cơ bản */
.zip-menu-sidebar {
    width: 250px; /* Chiều rộng cố định của menu chính */
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.zip-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zip-menu-item {
    position: relative; /* Cần thiết cho submenu */
}

.zip-menu-item a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s, color 0.2s;
}

.zip-menu-item a:hover {
    background-color: #e0e0e0;
    color: #000;
}

/* Biểu tượng cho các mục có submenu */
.zip-menu-has-submenu > a::after {
    content: '►'; /* Ký tự tam giác chỉ bên phải */
    float: right;
    font-size: 12px;
    line-height: 1;
    color: #666;
}

/* Submenu (Menu con) */
.zip-menu-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    
    overflow: hidden;
    max-height: 0; /* Mặc định phải là 0 */
    /* Transition cần khớp với thời gian trong setTimeout (300ms trong ví dụ trên) */
    transition: max-height 0.3s ease-out, background-color 0.3s;
    /* ... */
}

.zip-menu-submenu .zip-menu-item a {
    border-bottom: 1px solid #f0f0f0;
}

.zip-menu-submenu .zip-menu-item a:hover {
    background-color: #f5f5f5;
}

/* Ẩn/Hiện Menu con bằng CSS Hover (Dự phòng) */
/* .zip-menu-item:hover > .zip-menu-submenu {
    display: block;
} */

/* CSS cho Menu cấp 3 (Không cần chỉnh lại vị trí left: 100%, vì nó đã thừa hưởng) */
/* .zip-menu-level-3 {
   // CSS sẽ giống với .zip-menu-level-2 nếu bạn dùng lớp này.
   // Nếu cần style khác, thêm vào đây.
} */

/* Lớp được thêm bởi JavaScript khi hover */
.zip-menu-show {
    display: block !important;
}
.zip-menu-accordion {

}

.zip-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zip-menu-item {
    border-bottom: 1px solid #eee;
}

/* Wrapper chứa link và button, dùng Flex để căn chỉnh */
.zip-menu-flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10px; /* Khoảng cách cho nút */
}

.zip-menu-link,
.zip-menu-item > .zip-menu-flex-wrapper > a { /* Áp dụng cho cả link cấp 1 và cấp 2 */
    flex-grow: 1;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    display: block; /* Quan trọng để link chiếm hết không gian */
}

.zip-menu-link:hover,
.zip-menu-item > .zip-menu-flex-wrapper > a:hover {
    background-color: #e0e0e0;
}

/* --------------------------------------
   ICON TOGGLE BUTTON
   -------------------------------------- */
.zip-menu-toggle-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #aaa;
    border-radius: 50%; /* Hình tròn */
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 10px;
    transition: background-color 0.2s;
}

.zip-menu-toggle-btn:hover {
    background-color: #ddd;
}

.zip-menu-icon {
    font-size: 20px;
    display: inline-block;
    transition: transform 0.3s;
    font-weight: bold;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

/* Hiệu ứng: Khi button được mở (aria-expanded="true"), xoay icon thành dấu trừ */
.zip-menu-toggle-btn[aria-expanded="true"] .zip-menu-icon {
    transform: rotate(45deg); /* Biến dấu cộng thành dấu trừ bằng cách xoay 45 độ */
}

/* --------------------------------------
   SUBMENU (NỘI DUNG TRƯỢT XUỐNG)
   -------------------------------------- */
.zip-menu-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    
    /* Thiết lập cho hiệu ứng trượt */
    overflow: hidden;
    max-height: 0; /* Mặc định ẩn, không chiếm không gian */
    transition: max-height 0.3s ease-out, background-color 0.3s;
    background-color: #f3f3f3; /* Màu nền cho cấp con */
}

/* Level 2 */
.zip-menu-level-2 a {
    padding-left: 30px !important; 
    background-color: #f3f3f3;
}

.zip-menu-level-2 a:hover {
    background-color: #eaeaea;
}

/* Level 3 */
.zip-menu-level-3 a {
    padding-left: 45px !important; 
    background-color: #eaeaea;
}

.zip-menu-level-3 a:hover {
    background-color: #dfdfdf;
}


/* Lớp được JavaScript thêm vào khi mở */
.zip-menu-show {
    /* JavaScript sẽ tính toán và gán max-height thực tế */
}
.pagination  {
    display: flex;
    justify-content: center;
}
.pagination .page-numbers {
    padding: 5px 10px;
    display: -webkit-box;
    text-decoration: none;
    background: #0d6efd;
    color: #fff;
    margin: 10px 2px;
    font-size: 12px;
}
.pagination .page-numbers.current {
    background: #f2f2f2;
    color: #000;
}
.pagination li {
    list-style: none;
}
/* --------------------------------------
   RESPONSIVE DESIGN (Media Queries)
   -------------------------------------- */

/* Màn hình từ 800px trở xuống (3 sản phẩm / 1 hàng) */
@media (max-width: 800px) {
    .zipo-post-grid {
        gap: 15px;
    }
    .zipo-post-item {
        /* Tính toán 3 cột: (100% - 2*15px) / 3 = 33.33% - 10px */
        width: calc(33.33% - 10px);
    }
}

/* Màn hình điện thoại từ 500px trở xuống (2 sản phẩm / 1 hàng) */
@media (max-width: 500px) {
    .zipo-post-grid {
        gap: 10px;
    }
    .zipo-post-item {
        /* Tính toán 2 cột: (100% - 1*10px) / 2 = 50% - 5px */
        width: calc(50% - 5px);
        padding: 10px;
        min-height: 220px;
    }
    .zipo-post-caption {
        font-size: 12px;
    }
    .zipo-post-logo-wrapper {
        height: 100px;
    }
}
/* Điều chỉnh responsive cho header-actions nếu cần */
@media (max-width: 992px) {
    .download-button-wrapper {
        margin-left: 0; /* Reset margin */
        order: 2; /* Đặt sau nút share nếu cần */
    }
    .download-dropdown {
        top: calc(100% + 5px);
        right: 0;
    }
}
@media (max-width: 750px) {
.tab-navigation {
    white-space: unset;
}
.page-title {
    font-size: 16px;
}
.sidebar.collapsed + .main-content > .main-header {
    width: calc(100% - 44px);
    left: 44px;
}
}
@media (max-width: 580px) {
.page-title {
    font-size: 14px;
}
}

@media (max-width: 525px) {
.page-title {
    font-size: 12px;
}
}

@media (max-width: 475px) {
.page-title {
    font-size: 10px;
}
}

@media (max-width: 425px) {
.page-title {
    font-size: 8px;
}
}
/* Font Inter (Nếu chưa có, cần import từ Google Fonts) */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); */
/* Đặt trong thẻ <head> của HTML hoặc đầu file CSS */