.sidebar-mini {
  width: 60px;
  /* giới hạn chiều rộng */
  position: fixed;
  top: 60px;
  left: 0;
  height: calc(100vh - 60px);
  background: #6133bd;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* box-shadow: 2px 0 5px rgba(0,0,0,0.1); */
  z-index: 1000;
  transition: opacity 0.3s ease;
  opacity: 1;
}

.sidebar-mini nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  padding: 20px 0;
  margin: 0;
  list-style: none;
  width: 100%;
  /* full width theo sidebar */
}

.sidebar-mini nav ul li {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

.sidebar-mini nav ul li a {
  text-decoration: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: white;
  transition: background-color 0.3s, color 0.3s;
  margin: 0 auto;
  /* căn giữa ngang trong vùng rộng 100px */
}

.sidebar-mini nav ul li.active a {
  background-color: #f0f0f0;
  color: #2a4bf7;
}

.sidebar-mini nav ul li a:hover{
  background-color: #d7d7d7;
  color: #8c8d91;
}

.sidebar-mini nav ul li a i {
  font-size: 20px;
  width: 100%;
  text-align: center;
}

.divider-with-icon {
  position: relative;
  text-align: center;
  margin: 20px 0;
  width: 50%;
}

.divider-with-icon hr {
  border: none;
  border-top: 3px solid grey;
  margin: 0;
}

.no-scroll {
  overflow: hidden;
  height: 100vh;
}

/*------------ Sidebar chính 
--------------*/
.sidebar-main {
  position: fixed;
  top: 60px;
  /* dưới header */
  left: 0;
  width: 250px;
  height: calc(100vh - 60px);
  background: #6133bd;
  /* border-right: 1px solid #ddd;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1); */
  overflow-y: auto;
  transform: translateX(-100%);
  /* mặc định ẩn ngoài trái */
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar-main.active {
  transform: translateX(0);
  /* hiện */
}

.sidebar-main nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  padding: 20px 0;
  margin: 0;
  list-style: none;
  width: 100%;
  /* full width theo sidebar */
}

.sidebar-main nav ul li {
  width: 100%;
  display: flex;
  justify-content: center;
  /* padding: 12px 0; */
  padding: 12px 10px;
}

.sidebar-main nav ul li a {
  text-decoration: auto;
  padding: 10px;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  color: white;
  transition: background-color 0.2s, color 0.3s;
  margin: 0 auto;
  align-content: center;
  align-items: center;
  flex-wrap: nowrap;
}


.sidebar-main nav ul li.active a {
  background-color: #f0f0f0;
  color: #2a4bf7;
}

.sidebar-main nav ul li a:hover{
  background-color: #d7d7d7;
  color: #8c8d91;
}

.sidebar-main nav ul li a i {
  font-size: 20px;
  /* width: 100%; */
  text-align: center;
}

/* .sidebar-main nav ul li i {
  margin-right: 10px;
  font-size: 18px;
  width: 24px;
  text-align: center;
  color: white;
} */


/* Khi sidebar chính hiện, ẩn sidebar mini */
.sidebar-main.active~.sidebar-mini {
  opacity: 0;
  pointer-events: none;
}

/* Main content */
.main-content {
  /* margin-top: 60px; */
  margin-left: 60px;
  /* dành cho sidebar-mini */
  padding: 20px;
  transition: margin-left 0.3s ease;
}

/* Khi sidebar chính hiện, main-content margin-left rộng hơn */
.sidebar-main.active~.main-content {
  margin-left: 250px;
}

/* Màn nhỏ (điện thoại) */
@media (max-width: 768px) {
  #sidebarMini {
    display: none;
    /* ẩn sidebar mini */
  }

  #sidebarMain {
    position: fixed;
    /* fix vị trí để overlay lên main content */
    top: 60;
    left: 0;
    height: 100vh;
    /* chiều cao full màn hình */
    z-index: 9999;
    /* ưu tiên hiển thị trên hết */

    width: 250px;
    transform: translateX(-250px);
    /* ẩn sidebar ra ngoài màn hình */
    transition: transform 0.3s ease;
  }

  #sidebarMain.active {
    transform: translateX(0);
    /* hiện sidebar */
  }

  /* Khi sidebarMain active thì overlay hiện */
  .overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9998;
  }

  /* Mặc định ẩn overlay */
  .overlay.hidden {
    display: none;
  }

  /* Phần main-content có margin-left = 0 trên điện thoại */
  .main-content {
    margin-left: 0 !important;
  }
}

/* modal */
.hidden {
  display: none !important;
}

.swal2-container {
  z-index: 999999 !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* Modal content */
.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

/* Title */
.modal-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
}

/* Options container */
.modal-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Each option */
.modal-option {
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e0e0e0;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
}

.modal-option:hover {
  background-color: #f0f0ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Icon + title row */
.option-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.option-header img {
  width: 24px;
  height: 24px;
}

/* Title */
.option-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

/* Description */
.option-description {
  font-size: 0.875rem;
  color: #666;
}

/* Disabled state */
.modal-option.disabled {
  background-color: #f3f3f3;
  color: #aaa;
  cursor: not-allowed;
  border-style: dashed;
}

.modal-option.disabled:hover {
  background-color: #f3f3f3;
  box-shadow: none;
}

/* Modal upload tài liệu*/
.modal-full {
  overflow: auto;
  background-color: white;
  padding: 2rem;
  height: 100%;
  border-radius: 1rem;
  /* position: relative; */
  position: fixed;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-header {
  display: flex;
  justify-content: start;
  align-items: center;
}

.upload-box {
  gap: 10px;
  display: flex;
  border: 2px dashed #ccc;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  background-color: #f9f9f9;
  flex-direction: column;
  align-content: center;
  align-items: center;
}

.custom-file-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid #ccc;
  border-radius: 8px;
  background-color: #f4f4f4;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.custom-file-upload:hover {
  background-color: #eaeaea;
}

.custom-file-upload i {
  font-size: 18px;
  color: #555;
}

#fileInputGetRegex {
  display: none;
}

#fileDisplay {
  display: none;
  /* ẩn mặc định, bật bằng JS */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  /* px-4 py-3 tương đương 16px & 12px */
  width: 100%;
  box-sizing: border-box;
  /* để padding không làm tăng kích thước */
  background-color: #fff;
  /* nền trắng hoặc tùy chỉnh */
  font-family: Arial, sans-serif;
}

#infoFile {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #555555;
  /* border-dark-6 tương đương xám đậm */
  border-radius: 8px;
}

#fileDisplay>div:first-child {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  /* khoảng cách 3 x 4px */

  align-items: center;
}

#fileDisplay img {
  height: 40px;
  /* h-10 ~ 40px */
  width: auto;
}

#fileName {
  font-size: 14px;
  /* text-sm ~14px */
  color: #7a7a7a;
  /* text-dark-4 tông xám nhạt */
  font-weight: 600;
  /* font-semibold */
  text-align: center;
}

#fileDisplay>div:last-child {
  display: flex;
  gap: 8px;
  /* khoảng cách 2 x 4px */
}

.header-container-edit {
  margin-top: 30px;
  border-top: 1px solid #a0a0a0;
  border-left: 1px solid #a0a0a0;
  border-right: 1px solid #a0a0a0;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  /* Bo tròn trên trái và trên phải */
  width: 100%;
  overflow: hidden;
}

.header-body-edit {
  border: 1px solid #a0a0a0;
  padding: 12px 16px;
  /* border-radius: 8px; */
  display: flex;
  width: 100%;
  overflow: hidden;
}

.header-body-edit .right textarea {
  background: #ffffff;
  color: #000;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  height: 100px;
  /* bạn có thể chỉnh số dòng hiển thị tại đây */
  resize: vertical;
  /* cho phép người dùng kéo cao/thấp */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-body-edit .right textarea:focus {
  border-color: #6a5acd;
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.2);
  outline: none;
}

.btn-cancel {
  background-color: #e0e0e0;
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-cancel:hover {
  background-color: #d5d5d5;
}

.btn-confirm {
  background-color: #a259ff;
  /* tím sáng */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-left: 8px;
}

.btn-confirm:hover {
  background-color: #8a3dff;
}

/* modal pdf auto */
#fileDisplayPDFAuto {
  display: none;
  /* ẩn mặc định, bật bằng JS */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  /* px-4 py-3 tương đương 16px & 12px */
  width: 100%;
  box-sizing: border-box;
  /* để padding không làm tăng kích thước */
  background-color: #fff;
  /* nền trắng hoặc tùy chỉnh */
  font-family: Arial, sans-serif;
}

#fileInputPDFAuto {
  display: none;
}

#fileDisplayPDFAuto img {
  height: 40px;
  /* h-10 ~ 40px */
  width: auto;
}
