html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Helvetica, "Helvetica Neue", "Mplus 1p", "Hiragino Kaku Gothic Pro", Meiryo, Osaka, "MS PGothic" !important;
}

.nav-sidebar .nav-treeview {
    display: none;
    list-style: none;
    background-color: #45494d !important;
}

.btn-tool2 {
    font-size: .875rem;
    margin: -.75rem 0;
    padding: .25rem .5rem;
}

.form-group.has-error label {
  color: #dc3545;
}
.form-group.has-error .help-block {
  color: #dc3545;
}

.error-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    width: 100%;
    min-height: 88vh;
    padding-left: 250px;
}

.error-header {
    font-size: 100px;
    font-weight: bold;
    color: #dc3545;
}

.error-message-login {
    color: red;
    font-size: 12px;
    text-align: center !important;
}

.error-details {
    font-size: 18px;
    margin-top: 20px;
    color: #495057;
}

.success-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    width: 100%;
    min-height: 88vh;
    padding-left: 250px;
}

.success-header {
    font-size: 55px;
    font-weight: bold;
    color: #007bff;
}

.success-message {
    font-size: 30px;
    color: #6c757d;
}

.success-details {
    font-size: 25px;
    margin-top: 20px;
    color: #495057;
}

.btn-go-home {
    margin-top: 30px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    text-decoration: none;
}

.error-image {
    width: 300px;
    margin-bottom: 20px;
}

/* Custom error message for required fields */
.error-message {
    color: red;
    font-size: 12px;
    display: none;
}

/* Show the error message if the field is invalid */
input:invalid + .error-message {
    border: 1px solid #ed979f;
    display: block;
}

/* Show the error message if the select field is invalid */
select:invalid + .error-message {
    border: 1px solid #ed979f;
    display: block;
}

/* Validation styles for number inputs */
input[type="number"]:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input[type="number"]:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Specific validation for fields ending with "No" - positive integers only */
input[type="number"][pattern="[1-9][0-9]*"]:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Quantity fields - non-negative integers */
input[type="number"][pattern="[0-9]*"]:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* No tooltip - validation messages shown via showToast only */

/* Bootstrap validation states */
.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}


.reset-password-wrapper {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.btn-submit {
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

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

.info-message {
    margin-top: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

.wrapper .content-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card {
    flex-grow: 1;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.note-editor.note-airframe, .note-editor.note-frame {
    border: none !important;
}

.right-panel {
    margin-left: 0.5rem;
}

.pagination-wrapper {
    float: right;
}

.image-box {
    width: 150px;
    height: 150px;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    margin: 5px;
    flex-wrap: nowrap;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-thumbnail {
    width: 100%;  /* Ensure the image fills the container width */
    height: 100%; /* Ensure the image fills the container height */
    object-fit: cover; /* Scale image to cover the container while maintaining aspect ratio */
    cursor: pointer; /* Change the cursor to indicate the image is selectable */
}

/* Example custom styles for the modal */
.modal-header {
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
}

.modal-footer {
    background-color: #f1f1f1; /* Light gray */
}

.modal-body {
    padding: 20px; /* Additional padding */
}

/* Additional styles for the button if needed */
.btn-primary {
    background-color: #007bff; /* Ensure it matches Bootstrap's primary color */
    border: none;
}

.btn-primary:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.action-column {
    width: 200px; /* Set your desired width */
    white-space: nowrap; /* Prevent text from wrapping */
    text-align: center; /* Center the content */
}

.text-column {
   white-space: nowrap; /* Prevent text from wrapping */
   text-align: center; /* Center the content */
}

  .gallery img {
    width: 150px;
    height: auto;
    cursor: pointer;
    margin: 10px;
  }

  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
  }

  .modal-content {
    top:5vh;
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }

  .modal img {
    max-height: 750px;
  }

  .modal-details {
    margin-top: 20px;
  }

  .modal-details label {
    font-weight: bold;
  }

  * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }

      /* Tab navigation */
      .tab-nav {
        display: flex;
        border-bottom: 1px solid #ccc;
      }

      .tab-nav button {
        padding: 0.7rem;
        background-color: #f1f1f1;
        border: none;
        cursor: pointer;
        font-size: 0.8rem;
      }

      .tab-nav button.active {
        background-color: #fff;
        border-bottom: 3px solid #007bff;
        font-weight: bold;
      }

      /* Tab content */


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

      .thumbnail-tab-content {
              flex: 1;
              padding: 1.5rem;
              display: none;
            }

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

      /* Upload and media container */
      .media-gallery, .upload-file {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
      }

      .media-gallery img {
        max-width: 95%;
        margin-top: 1rem;
      }

      /* Close button */
      .close-modal {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        color: #fff;
        cursor: pointer;
      }

      /* Upload button */
      .upload-btn {
        margin-top: 1rem;
        padding: 10px 20px;
        font-size: 1rem;
        cursor: pointer;
        background-color: #007bff;
        color: #fff;
        border: none;
        border-radius: 5px;
      }


      /* Container for the scrollable gallery */
      .media-gallery-modal-image {
          max-height: 70vh; /* Set a maximum height relative to the viewport */
          overflow-y: auto; /* Enables vertical scrolling */
          padding: 10px;
          background-color: #f9f9f9; /* Optional: background for better contrast */
          border-radius: 8px; /* Optional: rounded corners */
      }

      /* Container for the scrollable gallery */
            .media-gallery-modal-thumbnail {
                max-height: 70vh; /* Set a maximum height relative to the viewport */
                overflow-y: auto; /* Enables vertical scrolling */
                padding: 10px;
                background-color: #f9f9f9; /* Optional: background for better contrast */
                border-radius: 8px; /* Optional: rounded corners */
            }

      /* Container for the scrollable gallery */
      .media-gallery-modal-delete-image {
          max-height: 70vh; /* Set a maximum height relative to the viewport */
          overflow-y: auto; /* Enables vertical scrolling */
          padding: 10px;
          background-color: #f9f9f9; /* Optional: background for better contrast */
          border-radius: 8px; /* Optional: rounded corners */
      }

      /* Styling for individual images in the gallery */
      .image-box-modal {
          flex: 0 0 130px;
          padding: 5px;
      }

      .image-box-modal img {
          width: 100%;
          height: auto;
          border-radius: 4px; /* Optional: make images slightly rounded */
          cursor: pointer;
          transition: transform 0.3s;
      }

      .image-box-modal img:hover {
          transform: scale(1.05); /* Slight zoom on hover */
      }

.image-box-modal-select {
    height: 650px; /* Container height */
    overflow: hidden; /* Hide overflow for better control */
}

.image-box-modal-select img {
    width: auto;
    height: 100%;
    object-fit: cover;
}

      /* Optional: Style adjustments for scrollbars */
      .media-gallery-modal-image::-webkit-scrollbar {
          width: 8px;
      }

      .media-gallery-modal-image::-webkit-scrollbar-track {
          background: #e0e0e0; /* Scroll track color */
          border-radius: 4px;
      }

      .media-gallery-modal-image::-webkit-scrollbar-thumb {
          background-color: #888; /* Scroll thumb color */
          border-radius: 4px;
      }

      .media-gallery-modal-image::-webkit-scrollbar-thumb:hover {
          background-color: #555; /* Scroll thumb color on hover */
      }

      /* Optional: Style adjustments for scrollbars */
            .media-gallery-modal-thumbnail::-webkit-scrollbar {
                width: 8px;
            }

            .media-gallery-modal-thumbnail::-webkit-scrollbar-track {
                background: #e0e0e0; /* Scroll track color */
                border-radius: 4px;
            }

            .media-gallery-modal-thumbnail::-webkit-scrollbar-thumb {
                background-color: #888; /* Scroll thumb color */
                border-radius: 4px;
            }

            .media-gallery-modal-thumbnail::-webkit-scrollbar-thumb:hover {
                background-color: #555; /* Scroll thumb color on hover */
            }

   /* Optional: Style adjustments for scrollbars */
      .media-gallery-modal-delete-image::-webkit-scrollbar {
          width: 8px;
      }

      .media-gallery-modal-delete-image::-webkit-scrollbar-track {
          background: #e0e0e0; /* Scroll track color */
          border-radius: 4px;
      }

      .media-gallery-modal-delete-image::-webkit-scrollbar-thumb {
          background-color: #888; /* Scroll thumb color */
          border-radius: 4px;
      }

      .media-gallery-modal-delete-image::-webkit-scrollbar-thumb:hover {
          background-color: #555; /* Scroll thumb color on hover */
      }

        .modal-content-upload {
          position: relative;
          margin: auto;
          padding: 20px;
          background-color: #fff;
          border-radius: 5px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
        }

              .modal-content-upload {
                width: 90%;
                height: 90%;
                background-color: #fff;
                border-radius: 8px;
                overflow: hidden;
                display: flex;
                flex-direction: column;
              }

              .image-gallery {
                  display: flex;
                  flex-wrap: wrap;
              }

              .image-item {
                  margin: 10px;
                  cursor: pointer;
              }

              .image-item.selected {
                  border: 2px solid blue; /* Highlight selected images */
              }

              .img-selectable-multiple {
                  border: 2px solid transparent; /* Default border */
                  cursor: pointer; /* Change cursor to pointer */
              }

              .img-selectable-multiple.selected {
                  border: 2px solid blue; /* Border for selected images */
              }

                    .content-upload-selected {
                        display: flex;          /* Set the container to use flexbox */
                        flex-wrap: wrap;        /* Allow images to wrap to the next row */
                        gap: 10px;              /* Optional: space between images */
                        overflow-y: auto;       /* Allow vertical scrolling if the images exceed the height */
                        max-height: 200px;      /* Adjust this based on how much space you want for images */
                        padding: 10px;
                    }

                    .content-upload-selected img {
                        max-width: 100px;      /* Limit the image size */
                        max-height: 100px;     /* Limit the image size */
                    }

.thumb-selectable-multiple {
                  border: 2px solid transparent; /* Default border */
                  cursor: pointer; /* Change cursor to pointer */
              }

.thumb-selectable-multiple.selected {
                                border: 2px solid blue; /* Border for selected images */
                            }

                            .thumbnail-upload-selected {
                                                  max-height: 75vh; /* Set a maximum height relative to the viewport */
                                                            overflow-y: auto; /* Enables vertical scrolling */
                                                            padding: 10px;
                                                            border-radius: 8px; /* Optional: rounded corners */
                                                }

.image-box-150 {
    max-width: 120px;
    max-height: 120px;
    justify-content: center;
    align-items: center;
    margin: 5px;
    flex-wrap: nowrap;
}

.image-box-150 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-box-350 {
    max-width: 300px;
    max-height: 300px;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    margin: 5px;
    flex-wrap: nowrap;
}

.image-box-350 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-box-thumbnail {
    max-width: 500px;
    max-height: 500px;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    margin: 5px;
    flex-wrap: nowrap;
}

.image-box-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.load-more-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    position: relative;
}

.load-more-wrapper .spinner {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.load-more-wrapper .button.load-more {
        padding: 7px 16px;
        font-size: 16px;
        margin-right: 3px;
        color: #ffffff;
        background-color: #3498db;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;
}

.load-more-wrapper .button.load-more:hover {
    background-color: #2980b9; /* Darker blue */
}

.load-more-wrapper .button.load-more-delete-image {
        padding: 7px 16px;
        font-size: 16px;
        margin-right: 3px;
        color: #ffffff;
        background-color: #3498db;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;
}

.load-more-wrapper .button.load-more-delete-image:hover {
    background-color: #2980b9; /* Darker blue */
}

/* Keyframes for the spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-box-selected {
    position: relative;
    margin-bottom: 15px;
}

.thumbnail-container-selected {
    position: relative;
    display: inline-block;
    width: 100%;
}

.img-thumbnail-selected {
    width: 100%;
    height: auto;
    display: block;
}

.btn-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #f44336; /* Red */
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    z-index: 10; /* Ensure it stays above the image */
}

.btn-close:hover {
    background-color: #d32f2f; /* Darker red */
}

.scrollable-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
}

.category-group {
    list-style-type: none;
    padding-left: 0;
}

.category-group label {
    white-space: nowrap; /* Prevents text from breaking */
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if text overflows */
    min-width: 200px; /* Set max width */
    display: inline-block;
}

.category-group input[type="checkbox"] {
    margin-right: 5px;
}

.category-item, .subcategory-item {
    margin-bottom: 10px;
}

.subcategory {
    list-style-type: none;
    margin-top: 5px;
}

/* Deeper levels of indentation */
.subcategory .subcategory {
    padding-left: 30px;
}

.subcategory .subcategory .subcategory {
    padding-left: 40px;
}

/* Add more padding for even deeper levels if needed */





/* Styling for the media filter and search bar */
#nameFilter {
    margin-bottom: 0;
}

/* Styling for the search button */
#searchButton {
    margin-bottom: 0;
}

/* Styling for the pagination controls container */
.pagination-controls {
    margin-right: 10px; /* Adds space between the page size selector and pagination */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Styling for the page size select box */
#pageSize {
    margin-right: 10px; /* Adds space between page size selector and pagination */
    max-width: 200px; /* Optional: limits the width of the select box */
}

/* Styling for the pagination container */
#pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Styling for pagination links */
#pagination .page-link {
    cursor: pointer;
}

/* Hover effect for page links */
#pagination .page-link:hover {
    background-color: #007bff;
    color: white;
}

/* Make pagination items and search button align on the same row */
.row {
    display: flex;
    flex-wrap: wrap;
}

/* Ensuring the filters and controls don't overflow and adjust properly */
@media (max-width: 768px) {
    #mameFilter, #searchButton, #pageSize {
        width: 100%; /* Stack the inputs and buttons on smaller screens */
        margin-bottom: 10px; /* Adds space below each element */
    }

    .col-md-6, .col-md-2, .col-md-4 {
        width: 100%; /* Make each column full width on smaller screens */
    }

    .pagination-controls {
        margin-right: 0;
    }

    #pagination {
        justify-content: center; /* Center the pagination on smaller screens */
    }
}




.modal-content-delete {
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content-delete {
    width: 90%;
    height: 90%;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content-confirm {
    position: relative;
    margin: auto;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    max-width: 400px; /* Adjust the max width for a smaller modal */
    width: 100%; /* Full width up to the max-width */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Slight shadow for better visibility */
}

.card-footer-confirm {
  padding: 0.75rem 1.25rem;
  border-top: 0 solid rgba(0, 0, 0, 0.125);
}

.permission-section {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* Adds spacing between rows */
}

.permission-section label {
    flex: 0 0 20%; /* Label takes up 20% of the row width */
    max-width: 20%; /* Prevents the label from exceeding 20% */
    font-weight: bold; /* Makes the label text bold */
    text-align: right; /* Aligns the label text to the right */
    margin-right: 10px; /* Adds space between label and select box */
}

.permission-section .col-sm-10 {
    flex: 1; /* The select box takes up the remaining space */
    max-width: 80%; /* Prevents the select box from exceeding its allocated space */
}

/* Style for the labels */
.category-item label,
.subcategory-item label {
    font-size: 16px; /* Smaller font size */
    line-height: 1; /* Reduce line spacing */
    margin: 0;
    padding: 0;
}

/* Style for the checkboxes */
.category-item input[type="checkbox"],
.subcategory-item input[type="checkbox"] {
    margin: 0;
    padding: 0;
}

/* Style for nested subcategories */
.subcategory {
    margin: 0; /* Remove margin for nested lists */
    list-style-type: none; /* Remove bullets */
}

/* Optional: Add hover effect for better visibility */
.subcategory-item label:hover,
.category-item label:hover {
    text-decoration: underline;
    cursor: pointer;
}

/* Styles for the badge */
.tag-badge {
    display: inline-block;
    background-color: #007bff; /* Professional blue color */
    color: #fff; /* White text */
    font-size: 1rem; /* Increase font size */
    font-weight: 500; /* Slightly bold */
    padding: 0.5rem 1rem; /* Add padding */
    border-radius: 12px; /* Rounded corners */
    margin: 0.5rem; /* Space between badges */
    position: relative; /* For positioning the remove button */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease; /* Smooth hover effect */
}

/* Hover effect for the badge */
.tag-badge:hover {
    background-color: #0056b3; /* Darker blue on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Slightly larger shadow */
}

/* Remove button */
.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: #ff4d4f; /* Red color for remove */
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Hover effect for the remove button */
.remove-btn:hover {
    background-color: #d9363e; /* Darker red on hover */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Optional: Adjust button alignment inside small badges */
.remove-btn:before {
    content: '×';
    font-size: 1rem;
    line-height: 1;
}


.preloaderbee {
  position: fixed;
  left: 0;
  top: 0;
}

/* Toast */
.pop-up {
    width: 350px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.pop-up .toast-body {
    color: black;
    text-align: center;
}

.toast-center {
    position: fixed;
    top: 12%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* CKEditor */
.ck-editor__editable {
    min-height: 300px; /* Minimum height */
    max-height: 500px; /* Maximum height before scrolling */
    overflow: auto; /* Enable scrolling if content exceeds max-height */
}

/* Data List */
datalist {
    position: absolute;
    background-color: white;
    border: 1px solid blue;
    border-radius: 0 0 5px 5px;
    border-top: none;
    font-family: sans-serif;
    width: 350px;
    padding: 5px;
    max-height: 10rem;
    overflow-y: auto
}

/* Modal */
.custom-modal-size {
    max-width: 90vw !important;
    width: 90vw !important;
}

/* Media */
.modal-container {
    display: flex;
    width: 100%;
    gap: 20px;
}

.image-container {
    width: 70%;
    height: 50%; /* Increased height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures proper scaling */
    border-radius: 10px;
}

.details-container {
    width: 30%;
    padding-left: 20px;
}

/* Loading Screen */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner-4 {
    width: 50px;
    --b: 8px; /* the border thickness */
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 1px;
    background: conic-gradient(#0000 10%,#f03355) content-box;
    -webkit-mask:
            repeating-conic-gradient(#0000 0deg,#000 1deg 20deg,#0000 21deg 36deg),
            radial-gradient(farthest-side,#0000 calc(100% - var(--b) - 1px),#000 calc(100% - var(--b)));
    -webkit-mask-composite: destination-in;
    mask-composite: intersect;
    animation:s4 1s infinite steps(10);
}
@keyframes s4 {to{transform: rotate(1turn)}}

/* Sidebar */
.sub-menu{
    font-size: 0.85rem; /* Adjust size as needed */
}

/* Gallery */
.gallery-container { display: flex; flex-wrap: wrap; gap: 15px; }
.gallery-item {
    cursor: pointer;
    transition: transform 0.2s;
    width: 200px;
    white-space: normal;
    overflow: hidden;
    word-wrap: break-word;
}
.gallery-item:hover { transform: scale(1.05); }
.grid-view .gallery-item {
    width: 150px;
    margin: 0 auto;
}
.list-view .gallery-item { width: 100%; display: flex; align-items: center; }
.list-view .gallery-item img { width: 100px; height: auto; margin-right: 10px; }
.hidden { display: none; }

.gallery-media {
    min-height: 40vh;
    overflow-y: auto;
}

.product-gallery-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.product-gallery-media .selected-image {
    max-width: 140px;
    width: 100%;
}

.product-gallery-media .selected-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}


.media-grid-container {
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

/* Media Item (Selection Effect) */
.media-item,
.media-items {
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s ease-in-out;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.media-checkbox-label {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-checkbox {
    margin-top: 5px;
}

.media-item.selected,
.media-items.selected {
    border: 2px solid blue;
    opacity: 0.7;
}

.selected-attr-image {
    border: 2px solid blue;
    opacity: 0.7;
}

.media-main-item.selected {
    border: 2px solid blue;
    opacity: 0.7;
}

/* Gallery Media Images */
.selected-attribute-image,
.selected-image {
    position: relative;
    display: inline-block;
}

#gallery-media .chosen-thumb {
    width: 100px; /* Ensure correct size */
    height: auto;
    margin: 5px;
}

/* Shared style for all remove buttons */
/* Base styles shared across all remove types */
.remove-attribute-image,
.remove-image,
.remove-main-image {
    display: inline-flex;
    align-items: center;
    background-color: #a23333; /* Main red section */
    color: white;
    font-weight: bold;
    font-family: sans-serif;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    font-size: 12px;
}

/* Optional if inside image thumbnails */
.remove-attribute-image,
.remove-image,
.remove-main-image {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

/* Text section ("REMOVE") */
.remove-attribute-image::before,
.remove-image::before,
.remove-main-image::before {
    content: "REMOVE";
    padding: 6px 12px;
    display: inline-block;
}

/* Icon section ("×") */
.remove-attribute-image::after,
.remove-image::after,
.remove-main-image::after {
    background-color: #5a1a1a; /* darker red */
    padding: 6px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover and active states */
.remove-attribute-image:hover,
.remove-image:hover,
.remove-main-image:hover {
    opacity: 0.9;
}

.remove-attribute-image:active,
.remove-image:active,
.remove-main-image:active {
    transform: scale(0.96);
}

.height-150px {
    height: 150px;
}

.height-100px {
    height: 100px;
}

/* CSS for Attribute image modal */
.attribute-sub-gallery {
    flex: 1; /* take remaining space */
    min-width: 0; /* fix content overflow issues */
    overflow-x: auto;
}

.attribute-sub-gallery [id^="attribute-gallery-preview-"] {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    scroll-behavior: smooth;

    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #aaa transparent;
}

.attribute-sub-gallery [id^="attribute-gallery-preview-"]::-webkit-scrollbar {
    height: 8px;
}

.attribute-sub-gallery [id^="attribute-gallery-preview-"]::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
}

.selected-attribute-image {
    flex: 0 0 auto;
    position: relative;
    width: 130px;
    height: 100px;
}

.selected-attribute-image img {
    width: 100%;
    border-radius: 6px;
}

/* CSS for Tags */
.select2-selection__choice {
    background-color: #00BCD4 !important;
    border: 1px solid #008fa1 !important;
    color: #FFFFFF !important;
}

.selection__choice__remove {
    color: #ffffff !important;
}

/* CSS for Gallery vertical sub-menu */
.status-popup {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    margin-top: 25px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 10;
}

.gallery-link {
    position: relative;
    cursor: pointer;
}

td:hover .status-popup {
    display: inline;
}
.status-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
}
.status-btn:hover {
    background: #f0f0f0;
}

/* Product category */
#categoryTreeContainer {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
}
.category-group {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}
.category-group label {
    margin-bottom: 0;
}

.category-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Custom Accordion */
.custom-accordion-button {
    padding: 6px 12px;
    font-size: 14px;
    height: 34px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.custom-accordion-item {
    border-radius: 5px;
    margin-bottom: 5px;
    background-color: #ffffff;
    width: 100%;
}
.remove-attribute {
    font-size: 12px;
    height: 30px;
    padding: 3px 8px;
}
.toggle-icon {
    font-size: 14px;
    cursor: pointer;
}

.image-section {
    height: 200px;
}

.attribute-height {
    min-height: 100px;
}

/* Attribute tag */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border: 1px solid #ddd;
    padding: 5px;
    min-height: 38px;
}
.tag {
    background-color: #007bff;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}
.remove-tag {
    margin-left: 5px;
    cursor: pointer;
}

/* Category Management */
.tree-view-min-height{
    min-height: 50rem;
}
.nested-category {
    padding-left: 20px;
    font-weight: normal;
}
.category-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.category-name-container {
    position: relative;
    display: inline-block;
    width: 100%;
}
.category-name-container:hover .category-actions {
    display: block;
    position: absolute;
    left: 0;
}
.subcategory {
    padding-left: 30px;
    font-style: italic;
}
.drag-handle {
    cursor: move;
}
.form-label {
    font-weight: 600;
}
.description {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.note-editor note-frame card{
    margin: 0 !important;
}
.dropzone {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
}
.dropzone .dz-preview .dz-error-mark {
    display: none !important;
}

.dropzone .dz-preview .dz-remove {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.tree-panel {
    width: 100%;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}
.wj-treeview {
    height: 400px;
    font-size: 16px;
    background: #ffffff;
    padding: 10px;
}
.tree-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    padding: 5px;
    background: #007bff;
    color: white;
    border-radius: 5px;
}
.nested {
    list-style-type: none;
    padding-left: 20px;
    display: block;
}
.list-group-item i {
    cursor: all-scroll;
    cursor: pointer;
    margin-right: 5px;
}
.list-group-item {
    cursor: all-scroll;
    margin-left: 10px !important;
    border: none !important; /* Removes the border */
    background: transparent; /* Optional: Keeps the background clean */
}
.category-actions {
    display: flex;
    flex-column: row;
}
.category-actions i {
    margin: 0 5px;
    cursor: pointer;
    color: #007bff;
    font-size: 15px;
}
.category-actions i:hover {
    color: #0056b3;
}
.cursor-pointer{
    cursor: pointer;
}
.toast-container {
    position: fixed;
    top: 20px; /* Move to top */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    z-index: 1050; /* Ensure it appears above other elements */
}
.delete-category {
    color: red !important;
}

.list-group-item .category-text {
    color: red !important;
}

.select2-container .select2-selection--single {
    height: auto !important;
}

/* Force Select2 to look like Bootstrap */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da;
    border-radius: 0.375rem; /* Match Bootstrap's rounded corners */
    padding: 0.375rem 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0.375rem 0.75rem; /* Ensures padding matches Bootstrap */
    line-height: 1.5;
}


/* Ensure consistency for focus */
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--multiple:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container {
    width: 100%; /* Matches Bootstrap form-control width */
    min-width: calc(100% - 50px) !important; /* Prevents collapsing but allows responsiveness */
    max-width: 100%; /* Ensures it doesn't overflow */
}

.form-group {
    margin-bottom: 1rem;
}
.select2-selection__clear {
    top: 50%;
    cursor: pointer;
    font-size: 14px;
    color: red;
}
.clear-text {
    font-size: 12px;
    color: red;
    margin-top: 2px;
    text-align: right;
    cursor: pointer;
}

.required {
    color: red;
}

/* Adjust row alignment */
td {
    vertical-align: middle !important;
}

/* Center the action button */
td .action-menu {
    text-align: center;
    width: 100%;
}

/* Component image preview */
.download-icon {
    position: absolute;
    right: 25px;
    bottom: 15px;
}

.component-label {
    max-width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    font-size: 14px;
}

.component-thumbnail {
    width: 300px;
    max-height: 150px;
    object-fit: scale-down;
}

@media (min-width: 400px) {
    .dropzone {
        min-height: fit-content !important;
    }
}

@media (max-width: 600px) {
    .media-view-type {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .right-panel {
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0;
    }

    .component-label {
        max-width: 200px;
    }
}

/*
  17/10/2026 — chống "giật" khi rê chuột qua danh sách (Cabinetry, Component, Product, Gallery, Role).
  Thanh Edit / Copy / Status hiện khi rê chuột trước nằm trong luồng trang: dòng đang rê cao gấp đôi
  (49px → 97px) và đẩy mọi dòng bên dưới xuống 48px, rê sang dòng khác lại co / giãn → cả bảng nhảy.
  Nay thanh này nổi lên ngay dưới tên (position: absolute), không chiếm chỗ nên bảng đứng yên.
  Khung chứa (.cabinetry-item, td.product-item...) đã có class position-relative.
*/
.cabinetry-item > .cabinetry-actions,
.component-item > .component-actions,
.product-item > .product-actions,
.gallery-item > .gallery-actions,
.role-item > .role-actions {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 5;
    white-space: nowrap;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Dòng cuối: hiện thanh phía TRÊN tên để không bị khung cuộn của bảng cắt mất / sinh thanh cuộn */
tbody tr:last-child .cabinetry-item > .cabinetry-actions,
tbody tr:last-child .component-item > .component-actions,
tbody tr:last-child .product-item > .product-actions,
tbody tr:last-child .gallery-item > .gallery-actions,
tbody tr:last-child .role-item > .role-actions {
    top: auto;
    bottom: 100%;
}

/*
  20/10/2026 — vai trò chỉ được XEM catalogue (Sale): <body class="catalog-readonly"> ở các trang sản phẩm,
  tủ, component, bếp mẫu, room drawing, gallery, media, brand / tag / attribute, danh mục.
  Ẩn mọi nút / form thêm, sửa, xoá, import, đổi trạng thái. Đây chỉ là giao diện: lưu vẫn bị chặn ở
  admin-web (RoleAccessInterceptor, trang 403) và admin-api (luật theo vai trò).
*/
.catalog-readonly a[href$="/create-new"],
.catalog-readonly a[href$="/upload"],
.catalog-readonly a[href$="/room-drawing/new"],
.catalog-readonly #btnSubmit,
.catalog-readonly #btnReset,
.catalog-readonly #save-new-gallery,
.catalog-readonly #deleteSelected,
.catalog-readonly #deleteSelectedBtn,
.catalog-readonly #bulkDeleteBtn,
.catalog-readonly #saveTable,
.catalog-readonly #addRow,
.catalog-readonly #saveKitchens,
.catalog-readonly #changeSkuBtn,
.catalog-readonly #importExcelBtn,
.catalog-readonly #importExcel,
.catalog-readonly #addRoomDefaultBtn,
.catalog-readonly #saveRoomDefaultBtn,
.catalog-readonly #saveModelTypeBtn,
.catalog-readonly #actionSelect,
.catalog-readonly #create_brand,
.catalog-readonly #create_tag,
.catalog-readonly #create_attribute,
.catalog-readonly #create_category,
.catalog-readonly .copy-btn,
.catalog-readonly .status-btn,
.catalog-readonly .bulk-status-btn,
.catalog-readonly .bulk-edit-btn,
.catalog-readonly .save-btn,
.catalog-readonly .add-btn,
.catalog-readonly .delete-btn,
.catalog-readonly .import-btn,
.catalog-readonly .edit-brand,
.catalog-readonly .delete-brand,
.catalog-readonly .edit-tag,
.catalog-readonly .delete-tag,
.catalog-readonly .edit-attribute,
.catalog-readonly .delete-attribute,
.catalog-readonly .edit-category,
.catalog-readonly .delete-category,
.catalog-readonly .edit-category-fallback,
.catalog-readonly .edit-row,
.catalog-readonly .delete-row,
.catalog-readonly .edit-item,
.catalog-readonly .delete-item,
.catalog-readonly .remove-image,
.catalog-readonly .dropzone,
.catalog-readonly [data-target="#main-gallery-modal"],
.catalog-readonly [data-target="#gallery-modal"],
.catalog-readonly .change-sku-btn,
.catalog-readonly [id^="deleteIndividualBtn"],
.catalog-readonly [id^="deleteRoomDrawingBtn"],
.catalog-readonly form [type="submit"],
.catalog-readonly form [type="reset"] {
    display: none !important;
}

/* Admin → Island Drawing (24/10/2026): màu ô theo trạng thái tủ, hình vẽ bố cục */
.island-cell.island-OK { background: #e8f5e9; }
.island-cell.island-UNLINKED { background: #fff3cd; }
.island-cell.island-MISSING { background: #f8d7da; color: #842029; font-weight: 600; }
.island-cell.island-INACTIVE { background: #ffe5d0; }
.island-cell.island-EMPTY { background: #e2e3e5; color: #6c757d; }
.island-variant-table td, .island-variant-table th { padding: 2px 6px; vertical-align: middle; }
.island-slot-table td, .island-slot-table th { padding: 2px 4px; vertical-align: middle; white-space: nowrap; }
.island-slot-table .island-num { width: 68px; min-width: 68px; padding: 0 4px; height: 26px; }
.island-slot-table select.form-control-sm { width: 82px; padding: 0 2px; height: 26px; }
#islandSvg .island-svg-base { fill: #dbe7f3; stroke: #3c6e9f; stroke-width: 1; }
#islandSvg .island-svg-wall { fill: rgba(255, 193, 7, 0.25); stroke: #b8860b; stroke-width: 1; stroke-dasharray: 3 2; }
#islandSvg .island-svg-back { fill: rgba(111, 66, 193, 0.35); stroke: #6f42c1; stroke-width: 1; }
#islandSvg .island-svg-dirty { stroke: #dc3545; stroke-width: 2; }
#islandSvg .island-svg-label { font-size: 11px; text-anchor: middle; dominant-baseline: central; fill: #1f2d3d; }
#islandGroups .list-group-item.active .text-muted { color: #e9ecef !important; }

/* Cabinetry (24/10/2026): SKU cũ sai quy tắc — chỉ cảnh báo */
.form-control.is-warning { border-color: #ffc107; box-shadow: 0 0 0 0.1rem rgba(255, 193, 7, 0.35); }

/* Cabinetry (24/10/2026): kéo chỉnh độ rộng cột */
/* Components (28/10/2026): dùng chung tay kéo như Cabinetry */
#cabinetryTable th.cabinetry-resizable, #componentTable th.component-resizable, #faceStyleTable th.face-resizable, #cabTypeTable th.cabtype-resizable { position: relative; }
#cabinetryTable .col-resize-handle, #componentTable .col-resize-handle, #faceStyleTable .col-resize-handle, #cabTypeTable .col-resize-handle { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; }
#cabinetryTable .col-resize-handle:hover, #componentTable .col-resize-handle:hover, #faceStyleTable .col-resize-handle:hover, #cabTypeTable .col-resize-handle:hover { background: rgba(0, 123, 255, 0.35); }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

/* Admin → Room Drawing theo từng phòng (26/10/2026) */
.room-object-table td, .room-object-table th { padding: 2px 4px; vertical-align: middle; white-space: nowrap; }
.room-object-table .room-num { width: 64px; min-width: 64px; padding: 0 4px; height: 26px; }
.room-object-table select.form-control-sm { padding: 0 2px; height: 26px; }
.room-object-table .room-facing { width: 76px; }
.room-object-table .room-parent { width: 150px; }
.room-object-table .room-sku { width: 160px; height: 26px; padding: 0 4px; }
.room-object-table td.room-no { cursor: pointer; color: #007bff; }
.room-object-table tr.room-cat-row td { background: #f1f3f5; font-weight: 600; font-size: 12px; text-transform: uppercase; }
.room-object-table tr.room-selected td { box-shadow: inset 0 0 0 2px #0d6efd; }
.room-legend .room-key { display: inline-block; padding: 0 6px; margin-left: 4px; border: 1px solid; }
.room-key-room { background: #6c757d; color: #fff; border-color: #343a40; }
.room-key-base { background: #dbe7f3; border-color: #3c6e9f; }
.room-key-wall { background: rgba(255, 193, 7, 0.25); border-color: #b8860b; border-style: dashed !important; }
.room-key-tall { background: #e2d9f3; border-color: #6f42c1; }
.room-key-island { background: #d1e7dd; border-color: #198754; }
.room-key-appliance { background: #f8f9fa; border-color: #495057; }
#roomSvg .room-svg-item { cursor: pointer; }
#roomSvg .room-svg-room { fill: #495057; stroke: #212529; stroke-width: 0.5; }
#roomSvg .room-svg-opening { fill: #ffffff; stroke: #0dcaf0; stroke-width: 1.5; }
#roomSvg .room-svg-base { fill: #dbe7f3; stroke: #3c6e9f; stroke-width: 1; }
#roomSvg .room-svg-wall { fill: rgba(255, 193, 7, 0.25); stroke: #b8860b; stroke-width: 1; stroke-dasharray: 3 2; }
#roomSvg .room-svg-hood { fill: rgba(108, 117, 125, 0.2); stroke: #495057; stroke-width: 1; stroke-dasharray: 3 2; }
#roomSvg .room-svg-tall { fill: #e2d9f3; stroke: #6f42c1; stroke-width: 1; }
#roomSvg .room-svg-island { fill: #d1e7dd; stroke: #198754; stroke-width: 1.5; }
#roomSvg .room-svg-island-cab { fill: rgba(25, 135, 84, 0.18); stroke: #198754; stroke-width: 0.75; }
#roomSvg .room-svg-panel { fill: #343a40; stroke: #343a40; stroke-width: 0.5; }
#roomSvg .room-svg-appliance { fill: #f8f9fa; stroke: #495057; stroke-width: 1; }
#roomSvg .room-svg-other { fill: #fff; stroke: #adb5bd; stroke-width: 1; }
#roomSvg .room-svg-problem { stroke: #dc3545; stroke-width: 2; }
#roomSvg .room-svg-dirty rect, #roomSvg .room-svg-dirty circle { stroke: #fd7e14; stroke-width: 2; }
#roomSvg .room-svg-selected rect, #roomSvg .room-svg-selected circle { stroke: #0d6efd; stroke-width: 3; }
#roomSvg .room-svg-label { font-size: 10px; text-anchor: middle; dominant-baseline: central; fill: #1f2d3d; pointer-events: none; }

/* Admin → Room Shapes (29/10/2026): hình phòng + bố trí bếp */
.shape-card .shape-thumb img { width: 120px; height: 120px; object-fit: contain; background: #fff; border: 1px solid #dee2e6; border-radius: 4px; }
.shape-layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.shape-layout .layout-thumb img { width: 100%; height: 100px; object-fit: contain; background: #fff; }
.shape-off img { opacity: 0.35; filter: grayscale(1); }
.shape-off.shape-layout { background: #f4f6f9; }
/* 30/10/2026: hình phòng / bố trí vừa tạo bằng Copy */
.shape-card.shape-new, .shape-layout.shape-new { box-shadow: 0 0 0 3px #ffc107; }
.shape-preview { max-width: 100%; max-height: 260px; object-fit: contain; border: 1px solid #dee2e6; border-radius: 4px; background: #fff; }

/* Admin → Face Styles (30/10/2026): bảng face_style */
#faceStyleTable .face-thumb { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid #dee2e6; border-radius: 3px; }
#faceStyleTable tr.face-off td { background: #f4f6f9; color: #6c757d; }
#faceStyleTable tr.face-off .face-thumb { opacity: 0.4; filter: grayscale(1); }
#faceStyleTable tr.face-highlight td { background: #fff8e1; }
#faceStyleTable .face-warn { color: #a05a00; }

/* Admin → Cabinet Types (30/10/2026): danh sách chuẩn loại tủ */
#cabTypeTable tr.cabtype-group td { background: #e9eef5; font-weight: 600; }
#cabTypeTable tr.cabtype-off td { background: #f4f6f9; color: #6c757d; }
#cabTypeTable tr.cabtype-highlight td { background: #fff8e1; }
#cabTypeTable code { color: #495057; }
/* 30/10: mỗi loại tủ 1 dòng như Excel (bảng hẹp thì kéo ngang); Warnings = nhãn, nội dung khi rê chuột */
#cabTypeTable td { white-space: nowrap; }
#cabTypeTable .cabtype-warn-badge { cursor: help; }
#cabTypeTable td.cabtype-note { white-space: normal; min-width: 180px; }
#cabTypeTable tr.cabtype-filter-row th { padding: 2px 4px; background: #f8f9fa; font-weight: normal; }
#cabTypeTable .cabtype-col-filter, #cabTypeTable .cabtype-col-filter-select { min-width: 60px; height: 26px; padding: 1px 4px; font-size: 12px; }
/* Hộp chọn cột (nút Columns) */
.cabtype-column-panel { position: fixed; z-index: 1060; width: 240px;
    max-height: 70vh; overflow-y: auto; padding: 8px 12px; background: #fff; border: 1px solid #dee2e6;
    border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
#ctColumnPanel .cabtype-col-option { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 400; cursor: pointer; }
#ctColumnPanel .cabtype-col-option input { position: static; flex: none; width: auto; height: auto; margin: 0; }

/* Admin → Box Style Specs (13/11/2026): thông số popup Box Style */
#bssStyles .bss-thumb { width: 40px; height: 40px; object-fit: contain; background: #fff; border: 1px solid #dee2e6; border-radius: 3px; flex: 0 0 auto; }
#bssStyles .list-group-item.active .bss-meta { color: rgba(255, 255, 255, 0.85); }
#bssStyles .bss-meta { color: #6c757d; overflow-wrap: anywhere; }
/* Header khung sửa: AdminLTE gắn .card-header::after (clearfix) → thành phần tử flex thứ 3, space-between đẩy
   nhóm nút ra giữa và nhãn "Unsaved changes" làm Save / Discard nhảy chỗ. Bỏ ::after để nút luôn sát mép phải. */
#bssEditor > .card-header::after { display: none; }
#bssSections .bss-section.bss-off { background: #f4f6f9; }
#bssSections .bss-section.bss-off .bss-title, #bssSections .bss-section.bss-off .bss-items { color: #6c757d; }
#bssSections .bss-no { min-width: 52px; }
.bss-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bss-preview-item { border: 1px solid #dee2e6; border-radius: 6px; padding: 10px 12px; background: #fafbfc; }
.bss-preview-item h6 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.bss-preview-item ul { padding-left: 18px; margin-bottom: 0; font-size: 13px; }
