@charset "utf-8";
/* CSS Document */

/*Extra small devices (portrait phones, less than 576px)*/
@media (max-width: 575.98px) {
  html {
    font-size: 12px;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  html {
    font-size: 13px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  html {
    font-size: 15px;
  }
  .sidenav {
    position: fixed !important;
    z-index: 5;
    height: calc(100% - 150px);
    width: 230px;
    overflow-y: scroll;
  }
  .content-wrapper {
    margin-left: 230px;
    width: calc(100vw - 230px);
    transition: width 0.5s ease-in-out;
  }
}
/*
@media (max-width: 991.98px) {
  .content-wrapper {
    margin-left: 10px;
    width: 100%;
  }
}
  
  */
@media (max-width: 767.98px) {
  .table thead.d-md-table-header-group {
    display: none !important;
  }
  .table.group-mobile tbody tr {
    display: flex;
    align-items: flex-start;
    padding: 12px 5px;
    border-bottom: 1px solid #eee;
    width: 100%;
  }
  .table.group-mobile tbody td {
    display: block;
    border: none;
    padding: 0;
    background-color: transparent !important;
  }
  .table.group-mobile tbody td:first-child {
    flex: 0 0 35px;
    padding-top: 5px;
  }
  .table.group-mobile tbody td:last-child {
    flex: 0 0 45px;
    text-align: right;
    padding-top: 5px;
  }
  .table.group-mobile tbody td.mobile-info-block {
    flex: 1;
    padding: 0 5px;
    line-height: 1.4;
    overflow: hidden; /* ป้องกันข้อความยาวเกินไป */
  }

  /* --- ส่วนที่แก้ไข/เพิ่ม --- */
  .mobile-info-block .customer-name {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* เปลี่ยนเป็น flex-start */
  }

  /* *** เพิ่ม: สไตล์สำหรับ name-and-icon *** */
  .mobile-info-block .name-and-icon {
    display: inline-flex; /* ทำให้ไอคอนกับชื่ออยู่ติดกัน */
    align-items: center; /* จัดให้อยู่กลางแนวตั้ง */
    min-width: 0; /* แก้ปัญหา Flexbox ตัดข้อความ */
    margin-right: 5px; /* เว้นวรรคก่อนวันที่ */
  }
  .mobile-info-block .name-and-icon i {
    flex-shrink: 0; /* ไม่ให้ไอคอนหด */
  }

  .mobile-info-block .doc-date-mobile {
    font-weight: normal;
    font-size: 0.8em;
    color: #666;
    flex-shrink: 0; /* ไม่ให้วันที่หด */
    white-space: nowrap; /* ไม่ให้วันที่ตัดคำ */
  }

  /* *** แก้ไข: เปลี่ยนเป็น doc-details-flex และเพิ่ม flex *** */
  .mobile-info-block .doc-details-flex {
    font-size: 0.85em;
    color: #555;
    display: flex; /* *** ทำให้เลขที่กับป้ายอยู่ติดกัน *** */
    align-items: center; /* *** จัดให้อยู่กลางแนวตั้ง *** */
  }
  .mobile-info-block .doc-details-flex span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* ถ้าเลขที่ยาวให้ตัด ... */
  }
  /* --- จบส่วนที่แก้ไข/เพิ่ม --- */

  .mobile-info-block .doc-summary {
    font-size: 0.85em;
    color: #555;
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
  }
  .mobile-info-block .status-mobile {
    font-weight: bold;
  }
  .table tbody td.d-none.d-lg-table-cell {
    display: none !important;
  }
  .table tbody tr td[colspan="11"] {
    display: table-cell;
    width: 100%;
    text-align: center;
  }
}
/* X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  html {
    font-size: 15px;
  }
}

/* XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
}

.app_main_body {
  transition: margin-left 0.5s ease-in-out;
}

body,
td,
th {
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.5;
  color: #212529;
} /*margin-top: 80px; margin-bottom: 80px;*/
.table td,
.table th {
  padding: 0.375rem 0.5rem !important;
}
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 50px;
}
.topnav {
  padding: 0.5rem 0;
}
.topnav-item {
  padding: 0.5rem;
}
.topnav-item a {
  text-decoration: none;
  color: #212529;
}
.sidenav-group {
  margin-bottom: 0.25rem;
}
.sidenav-group a {
  text-decoration: none;
  color: #212529;
  padding: 0.25rem 0rem;
  display: block;
}
.sidenav-group a.active {
  color: #0d6efd;
  font-weight: 500;
}
a.sidenav-item {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.65);
  font-size: 0.975rem;
  padding: 0.1875rem 0.5rem 0.1875rem 1.75rem;
}
/*a.sidenav-item:hover {color: rgba(0,0,0,0.8);}*/
.number,
.number:hover {
  border-color: #dee2e6;
  background: white;
  color: #6c757d;
}
.fs-7 {
  font-size: 0.95rem;
}
.fs-8 {
  font-size: 0.9rem;
}
.fs-9 {
  font-size: 0.85rem;
}
.fs-10 {
  font-size: 0.8rem;
}
.myfs-1 {
  font-size: 1.05rem;
}
.myfs-2 {
  font-size: 1.1rem;
}
.myfs-3 {
  font-size: 1.2rem;
}
.nav-link {
  color: rgba(0, 0, 0, 0.65);
}
optgroup {
  font-weight: 500;
}
.badge {
  font-weight: 400;
}
hr {
  opacity: 0.15;
}
.popover {
  font-family: "Noto Sans Thai", sans-serif;
  line-height: 1rem;
  padding: 0.5rem;
  --bs-popover-body-padding-x: 1rem;
  --bs-popover-body-padding-y: 0.375rem;
}
.tooltip {
  font-family: "Noto Sans Thai", sans-serif;
}
.tooltip-inner {
  background-color: #5f6368;
}
.tooltip-arrow::before {
  border-top-color: #5f6368 !important;
  border-bottom-color: #5f6368 !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #dee2e6;
  box-shadow: none;
}

input:read-only,
[readonly]:focus,
.form-control:disabled,
.form-select:disabled {
  background-color: #f3f3f3;
  border: none;
  box-shadow: none;
}

.form-floating input:disabled + label::after,
.form-floating input:read-only + label::after {
  background-color: transparent !important;
}

.bill-input input[type="text"] {
  padding: 0.2rem;
}

.border-round-main {
  /*height: calc(100vh - 170px);*/
  height: calc(100% - 0px);
}
/*Start Table Scroll Bar*/
.table-container {
  position: relative;
  height: calc(100% - 0px);
  /* Adjust based on your header height */
  /*  margin-bottom: 60px;*/
  /* Space for the fixed footer */
}

.table-responsive.fix-scroll {
  /* height: 100%;*/
  height: calc(100% - 130px);
  overflow: auto;
  scrollbar-width: thin;
}

.table-responsive.fix-scroll table {
  margin-bottom: 0;
}

.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Custom scrollbar styling */
.table-responsive.fix-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive.fix-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-responsive.fix-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.table-responsive.fix-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}
/*End Table Scroll Bar*/
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

.btn-check:checked + .btn {
  background-color: #ebebeb;
}

/*Bootstrap Calendar*/
.datepicker td.day.disabled {
  color: #bfbfbf;
  text-decoration: line-through;
}

.datepicker {
  border-radius: 0;
  padding: 0;
}

.datepicker-days table thead,
.datepicker-days table tbody,
.datepicker-days table tfoot {
  padding: 10px;
  display: list-item;
}

.datepicker-days table thead,
.datepicker-months table thead,
.datepicker-years table thead,
.datepicker-decades table thead,
.datepicker-centuries table thead {
  background: #3546b3;
  color: #ffffff;
  border-radius: 0;
}

.datepicker-days table thead tr:nth-child(2n + 0) td,
.datepicker-days table thead tr:nth-child(2n + 0) th {
  border-radius: 3px;
}

.datepicker-days table thead tr:nth-child(3n + 0) {
  text-transform: uppercase;
  font-weight: 300 !important;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.table-condensed > tbody > tr > td,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > td,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > thead > tr > th {
  /*padding: 11px 13px;*/
  padding: 5px 10px;
}

.datepicker-months table thead td,
.datepicker-months table thead th,
.datepicker-years table thead td,
.datepicker-years table thead th,
.datepicker-decades table thead td,
.datepicker-decades table thead th,
.datepicker-centuries table thead td,
.datepicker-centuries table thead th {
  border-radius: 0;
}

.datepicker td,
.datepicker th {
  border-radius: 50%;
  padding: 0 12px;
}

.datepicker-days table thead,
.datepicker-months table thead,
.datepicker-years table thead,
.datepicker-decades table thead,
.datepicker-centuries table thead {
  background: #3546b3;
  color: #ffffff;
  border-radius: 0;
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
  background-image: none;
}

.datepicker .prev,
.datepicker .next {
  color: rgba(255, 255, 255, 0.5);
  transition: 0.3s;
  width: 37px;
  height: 37px;
}

.datepicker .prev:hover,
.datepicker .next:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.99);
  font-size: 18px;
}

.datepicker .datepicker-switch {
  font-size: 18px;
  font-weight: 400;
  transition: 0.3s;
}

.datepicker .datepicker-switch:hover {
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
}

.datepicker table tr td span {
  border-radius: 2px;
  margin: 3%;
  width: 27%;
}

.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
  background-color: #3546b3;
  background-image: none;
}

.dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.datepicker-dropdown.datepicker-orient-top:before {
  border-top: 7px solid rgba(0, 0, 0, 0.1);
}

/*  Overlay , Pagination*/
.table td,
.table th {
  padding: 0.5rem;
}

.bootstrap-table .fixed-table-container .table td,
.bootstrap-table .fixed-table-container .table th {
  vertical-align: top;
}

.pagination .page-link {
  color: #000;
  /* สีของตัวอักษร */
  background-color: #ffffff;
  /* สีพื้นหลังของลิงค์ */
  border-color: #ffffff;
}

.overlay,
.overlay2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1030;
}

.invalid-input {
  border-color: red !important;
  /* background-color: lightyellow !important;*/
}

.valid-input {
  border-color: green !important;
}

/* Add new spinner overlay styles */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

#pdf_container {
  background: #ccc;
  text-align: center;
  display: none;
  padding: 5px;
  /*height: 820px;*/
  height: calc(100vh - 60px);
  overflow: auto;
}
.sort-column {
  cursor: pointer;
}
.sort-icon {
  opacity: 0.35;
}
.sort-column:hover {
  text-decoration: underline !important;
}
.sort-column:hover .sort-icon {
  opacity: 1;
}

.sort-active .sort-icon {
  opacity: 1;
}
