  /* CSS styles tương tự như đã cung cấp trước */
  @media (max-width: 768px) {
    .menu-toggle { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .table-container { overflow-x: auto; }
}

/* Điều chỉnh giao diện cho các màn hình nhỏ */
@media screen and (max-width: 768px) {
    /* Đảm bảo các phần tử không bị dàn trải trên màn hình nhỏ */
    .container {
        flex-direction: column; /* Chuyển container thành cột */
    }

    .left-section {
        flex: 1; /* Chiếm toàn bộ chiều rộng */
        padding-right: 0;
        margin-bottom: 1.5rem; /* Thêm khoảng cách dưới */
    }

    .right-section {
        flex: 1; /* Chiếm toàn bộ chiều rộng */
    }
}
/* Cập nhật container */
.container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    flex-wrap: wrap;
}

/* Phần chỉnh sửa bài viết */
.edit-section {
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.edit-section h2 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

/* Các trường form */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.6rem;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group textarea {
    margin-top: 50px;
    height: 150px;
    resize: vertical;
}

/* Tạo thanh công cụ cho editor */
.editor {
    position: relative;
}

.toolbar {
    position: absolute;
    top: 0px;
    left: 0;
    background-color: #f5f5f5;
    padding: 0.4rem;
    width: 100%;
    border: 1px solid #ccc;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-start;
    border-radius: 8px 8px 0 0;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toolbar button {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 1rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.toolbar button:hover {
    color: #333; /* Đổi màu khi hover vào nút */
    background-color: #e0e0e0; /* Thêm hiệu ứng nền cho nút khi hover */
    border-radius: 4px; /* Bo tròn góc nút */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Giảm khoảng cách giữa các nút */
.toolbar button + button {
    margin-left: 8px;
}

/* Thêm hiệu ứng cho textarea */
.editable-textarea {
    border-radius: 8px;
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    width: 100%;
    resize: vertical;
    margin-top: 3rem;
}

.editable-textarea:focus {
    outline: none;
    border-color: #333; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Phần tải lên hình ảnh */
.image-upload-section {
    border: 1px solid #ddd;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.image-upload-section label {
    font-weight: bold;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #333;
}

.image-upload-section input[type="file"] {
    margin-top: 0.5rem;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Thêm hiệu ứng khi di chuột */
}

.image-upload-section input[type="file"]:hover {
    background-color: #e2e2e2; /* Thay đổi màu nền khi di chuột qua */
}

.preview-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-top: 1rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;/* Thêm hiệu ứng bóng để làm nổi bật hình ảnh */
}

.preview-image:hover {
    transform: scale(1.05); /* Hiệu ứng phóng to nhẹ khi di chuột qua hình ảnh */
    transition: transform 0.2s ease-in-out;
}

/* Phần chứa các nút Lưu và Reset */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem; /* Thêm bóng cho phần form-actions */
}

.form-actions button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
}

.btn-save {
    background-color: #4CAF50; /* Xanh lá cây */
}

.btn-save:hover {
    background-color: #45a049; /* Màu đậm hơn khi hover */
}

.btn-reset {
    background-color: #f44336; /* Đỏ */
}

.btn-reset:hover {
    background-color: #d32f2f; /* Đậm hơn khi hover */
}
table tr th{
    background-color: #dee2e6;
    text-align: center;
}
table tbody tr td img {
    max-width: 60%;
    border-radius: 10%;
    width: 120%;
    height: 120%;
}

table tbody tr td:nth-child(3) {
    width: 30%;
    text-align: center;
}
table tbody tr td:nth-child(4) {
    width: 12%;
    text-align: center;
}
table tbody tr td:nth-child(5) {
    width: 12%;
    text-align: center;
}
table tbody tr td:nth-child(6) {
    width: 12%;
    text-align: center;
}
.action-btn-top {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 0.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.action-btn-top .action-btn {
    padding: 5px 10px;
    float: right;
    border: none;
    border-radius: 0.25rem;
    color: white;
    background-color: #00ACC1;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn-top .action-btn:hover {
    background-color: #0097A7; /* Màu nền khi hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Thêm bóng khi hover */
    transform: translateY(-2px); /* Hiệu ứng nổi khi hover */
}

.action-btn-top .action-btn:active {
    transform: translateY(0); /* Khi nhấn, nút trở về vị trí ban đầu */
}

.action-btn-top .action-btn i {
    margin-right: 0.5rem; /* Thêm khoảng cách giữa biểu tượng và văn bản */
}
  .edit-button {
    background-color: #4299E1;
    padding: 0.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    color: white;
  }

  .delete-button {
    background-color: #F56565;
    padding: 0.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    color: white;
  }

/* Điều chỉnh giao diện cho các màn hình nhỏ */
@media screen and (max-width: 768px) {
    /* Đảm bảo các phần tử không bị dàn trải trên màn hình nhỏ */
    .container {
        flex-direction: column; /* Chuyển container thành cột */
    }

    .left-section {
        flex: 1; /* Chiếm toàn bộ chiều rộng */
        padding-right: 0;
        margin-bottom: 1.5rem; /* Thêm khoảng cách dưới */
    }

    .right-section {
        flex: 1; /* Chiếm toàn bộ chiều rộng */
    }

    .sidebar {
        display: none; /* Ẩn sidebar trên màn hình nhỏ */
    }

    .sidebar.active {
        display: block; /* Hiển thị sidebar khi được kích hoạt */
    }

    .table-container {
        overflow-x: auto; /* Cho phép cuộn khi bảng quá rộng */
    }

    .form-actions button {
        width: 100%;
    }

    /* Điều chỉnh các nút công cụ trong editor */
    .toolbar button {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }

    .preview-image {
        max-width: 100px; /* Giảm kích thước hình ảnh trên di động */
    }
}

@media screen and (max-width: 480px) {
    .form-group label {
        font-size: 0.9rem; /* Giảm kích thước label trên màn hình nhỏ */
    }

    .form-group input[type="text"],
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem; /* Giảm kích thước font */
    }

    .btn-save, .btn-reset {
        font-size: 0.9rem; /* Giảm kích thước font cho nút */
    }

    .image-upload-section input[type="file"] {
        padding: 0.3rem;
    }

    .breadcrumb {
        font-size: 0.9rem; /* Giảm kích thước breadcrumb trên di động */
    }
}

/* Điều chỉnh cho các màn hình nhỏ */
@media screen and (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        height: 100%;
        top: 60px;
        left: -100%;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .menu-toggle i {
        font-size: 1.5rem;
    }

    .nav-item {
        padding: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .breadcrumb {
        font-size: 0.9rem;
    }
}
/* Thanh tìm kiếm */
.search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #4299E1;
}

.search-button {
    background-color: #4299E1;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #357ABD;
}

.search-select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    outline: none;
}

.search-select:focus {
    border-color: #4299E1;
}

/* CSS cho modal */
.modal {
    display: none; /* Ẩn modal theo mặc định */
    position: fixed; /* Đặt ở vị trí cố định */
    z-index: 1; /* Đảm bảo modal luôn hiển thị trên cùng */
    left: 0;
    top: 0;
    width: 100%; /* Chiếm toàn bộ màn hình */
    height: 100%; /* Chiếm toàn bộ màn hình */
    overflow: auto; /* Thêm cuộn nếu ảnh quá lớn */
    background-color: rgba(0, 0, 0, 0.7); /* Nền mờ */
  }
  
  .modal-content {
    margin: auto;
    display: block;
    top: 90px;
    width: auto; /* Chiếm 80% chiều rộng màn hình */
    height: auto;
    max-width: 100%; /* Giới hạn kích thước tối đa */
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
  }
  /* #caption{
    margin-top: 10px;
  } */
  
  .close {
    position: absolute;
    margin-top: 50px;
    top: 10px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
  }
  
  .close:hover,
  .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
  }
  