html {
  height: 100%;
  /* overflow: hidden; */
  /* position: relative; */
}
body {
  font-family: system-ui, "Segoe UI", "Open Sans", "Helvetica Neue", sans-serif;
  /* height: 100%;
  overflow: auto;
  position: relative; */
}

.page-home {
  min-height: calc(100dvh - 56px);
  /* width: 100vw; */
  background-image: url(/images/bg-home.jpeg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  /* color: red; */
  color: #005ec0;
}
label {
  margin: 5px;
}

.title {
  text-align: center;
  margin-bottom: 25px;
  color: #005ec0;
}

.container {
  max-width: 1600px;
  /* width: auto; */
  margin: 0 auto;
  /* background: #fff; */
  /* padding: 20px; */
  border-radius: 12px;
  /* box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); */
}

.top-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
  margin-right: 10px;
}

.header-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* menu icon */
.bi.bi-list {
  font-size: 24px;
}

/* Modal */

.history-box {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 10px;
}

.history-item {
  padding: 10px;
  margin-bottom: 8px;
  background: #f3f4f6;
  border-radius: 6px;
}

/* Trang login */
.login-container {
  width: 320px;
  margin: 120px auto;
  padding: 25px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: 0 0 10px #ccc;
  text-align: center;
}

.login-container input {
  width: 90%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.login-container button {
  width: 95%;
  padding: 10px;
  background: #0078ff;
  border: none;
  color: white;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
}

.login-container button:hover {
  background: #005fd1;
}

/* Xét nghiệm */
.td-primary th {
  background: #2196f3 !important;
  color: #ffffff;
  /* text-align: center !important; */
}

#modalXNDetail td {
  vertical-align: middle;
}

#modalXNDetail button.btn {
  opacity: 0.7;
}

#modalXNDetail tr:hover button.btn {
  opacity: 1;
}

#XnDataTable {
  animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* footer table */
#XnDataTable tfoot th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

#XnDataTable tfoot th.text-end {
  font-size: 0.95rem;
}

.money-sum {
  color: #0d6efd;
  font-weight: 700;
}

/* Tình Trạng Thanh toán */
.payment-paid {
  color: #28a745 !important;
  /* font-weight: 500; */
}

.payment-unpaid {
  color: #d32f2f !important;
  /* font-weight: 500; */
}

.anydesk-id {
  cursor: pointer;
  color: #007bff;
  /* text-decoration: underline; */
}

.anydesk-id:hover {
  color: #0056b3;
}

/* Màu highlight cho kết quả tìm kiếm */
.highlight-xn {
  background-color: yellow;
  padding: 1px 3px;
  border-radius: 3px;
  /* font-weight: bold; */
}

/*********** reponsive **************/

.header-logo {
  height: 36px;
}

@media (max-width: 576px) {
  .header-logo {
    height: 30px;
  }
  .title-xn {
    font-size: 1.4rem;
  }
}

/* Cột đầu tiên được xuống dòng tranh overflow */
table.dataTable th:first-child,
table.dataTable td:first-child {
  white-space: normal !important;
  word-break: break-word;
  max-width: 300px;
}

/* ===== FILTER COMPACT ===== */
.filter-label {
  font-size: 0.75rem;
  white-space: nowrap;
}

.filter-select {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

/* Mobile tối ưu thêm */
@media (max-width: 575.98px) {
  .filters {
    margin-bottom: 0.75rem;
  }
}

/* Datatables filter inline */
.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Search container */
.dt-search {
  display: flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Label tìm kiếm */
.dt-search label {
  margin: 0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.dt-length label {
  margin: 0;
  white-space: nowrap;
  font-size: 0.8rem;
}

/* Input tìm kiếm – thu nhỏ để đủ 1 hàng */
.dt-search input {
  width: 120px !important;
  min-width: 110px;
  max-width: 150px;
}

/* Length select gọn lại */
.dt-length select {
  width: auto !important;
}

/* Mobile cực nhỏ: cho phép scroll ngang, KHÔNG xuống dòng */
@media (max-width: 420px) {
  .row.align-items-center {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dt-search input {
    width: 100px !important;
  }
}

/* auto zoom khi input thằng ios */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
/* ================================
   DATATABLE FOOTER RESPONSIVE   
================================ */
@media (max-width: 768px) {
  /* Ẩn footer gốc trong table */
  #XnDataTable tfoot {
    display: none;
  }

  /* Gắn tổng tiền ngay dưới table */
  #XnDataTable_wrapper::after {
    content: "Tổng tiền: " attr(data-tong-tien) "\A""Thực nhận: " attr(data-thuc-nhan);
    white-space: pre-line;
    display: block;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: #fff;
    border-top: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 0.9rem;
  }
}
