body {
	color: #566787;
	background: #f5f5f5;
	font-family: 'Designil Font', 'Helvetica', sans-serif;
	font-size: 13px;
}

/* ปุ่มหัวตาราง DataTables (dt-buttons) ไม่ให้ติดกัน - ใช้ทุกหน้า */
.dt-buttons.btn-group .btn,
.dt-buttons .btn {
	margin-right: 8px;
	margin-bottom: 6px;
}
.dt-buttons .btn:last-child {
	margin-right: 0;
}
.dt-buttons.btn-group .btn:not(:first-child) {
	margin-left: 0;
	border-radius: 0.25rem;
}

.table-responsive {
    margin: 5px 0;
    border: 1px solid rgba(0,0,0,.125);
}
.table-wrapper {
	background: #fff;
	padding: 20px 25px;
	border-radius: 3px;
	min-width: 1000px;
	box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.table-title {        
	padding-bottom: 15px;
	background: #435d7d;
	color: #fff;
	padding: 10px 20px;
	min-width: 100%;
	margin: -20px -25px 10px;
	border-radius: 3px 3px 0 0;
}
.table-title h2 {
	margin: 5px 0 0;
	font-size: 24px;
}
.table-title .btn-group {
	float: right;
}
.table-title .btn {
	color: #fff;
	float: right;
	font-size: 13px;
	border: none;
	min-width: 50px;
	border-radius: 2px;
	border: none;
	outline: none !important;
	margin-left: 10px;
}
.table-title .btn i {
	float: left;
	font-size: 21px;
	margin-right: 5px;
}
.table-title .btn span {
	float: left;
	margin-top: 2px;
}

.table-icon{
	vertical-align: middle !important;
}
table.table th i {
	font-size: 13px;
	margin: 0 5px;
	cursor: pointer;
}	
table.table td:last-child i {
	opacity: 0.9;
	font-size: 13px;
	margin: 0 5px;
}
table.table td a {
	font-weight: bold;
	color: #566787;
	display: inline-block;
	text-decoration: none;
	outline: none !important;
}
table.table td a:hover {
	color: #2196F3;
}
/* ลิงก์ที่เป็นปุ่ม Bootstrap ในตาราง — ไม่ให้กฎ table.table td a ด้านบนทับสีตัวอักษรของ .btn-* */
table.table td a.btn {
	font-weight: normal;
	text-decoration: none !important;
}
table.table td a.btn-primary,
table.table td a.btn-primary:hover,
table.table td a.btn-secondary,
table.table td a.btn-secondary:hover,
table.table td a.btn-success,
table.table td a.btn-success:hover,
table.table td a.btn-info,
table.table td a.btn-info:hover,
table.table td a.btn-danger,
table.table td a.btn-danger:hover,
table.table td a.btn-warning,
table.table td a.btn-warning:hover,
table.table td a.btn-dark,
table.table td a.btn-dark:hover {
	color: #fff !important;
}
table.table td a.btn-light,
table.table td a.btn-light:hover {
	color: #212529 !important;
}
table.table td a.edit {
	color: #FFC107;
}
table.table td button.download {
	color: #566787;
    padding: 0px;
    font-size: 13px;
    /* font-weight: bolder; */
}
table.table td button.edit {
	color: #FFC107;	
    padding: 0px;
}
table.table td a.report {
	color: #800000;
}
table.table td a.delete {
	color: #F44336;
}
table.table td button.delete {
	color: #F44336;	
    padding: 0px;	
}
table.table td i {
	font-size: 14px;
}
table.table .avatar {
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 10px;
} 
.pagination {
	float: right;
	margin: 0 0 5px;
}
.pagination li a {
	border: none;
	font-size: 13px;
	min-width: 30px;
	min-height: 30px;
	color: #999;
	margin: 0 2px;
	line-height: 30px;
	border-radius: 2px !important;
	text-align: center;
	padding: 0 6px;
}
.pagination li a:hover {
	color: #666;
}	
.pagination li.active a, .pagination li.active a.page-link {
	background: #03A9F4;
}
.pagination li.active a:hover {        
	background: #0397d6;
}
.pagination li.disabled i {
	color: #ccc;
}
.pagination li i {
	font-size: 16px;
	padding-top: 6px
}
.hint-text {
	float: left;
	margin-top: 10px;
	font-size: 13px;
}    
/* Custom checkbox */
.custom-checkbox {
	position: relative;
}
.custom-checkbox input[type="checkbox"] {    
	opacity: 0;
	position: absolute;
	margin: 5px 0 0 3px;
	z-index: 9;
}
.custom-checkbox label:before{
	width: 18px;
	height: 18px;
}
.custom-checkbox label:before {
	content: '';
	margin-right: 10px;
	display: inline-block;
	vertical-align: text-top;
	background: white;
	border: 1px solid #bbb;
	border-radius: 2px;
	box-sizing: border-box;
	z-index: 2;
}
.custom-checkbox input[type="checkbox"]:checked + label:after {
	content: '';
	position: absolute;
	left: 6px;
	top: 3px;
	width: 6px;
	height: 11px;
	border: solid #000;
	border-width: 0 3px 3px 0;
	transform: inherit;
	z-index: 3;
	transform: rotateZ(45deg);
}
.custom-checkbox input[type="checkbox"]:checked + label:before {
	border-color: #03A9F4;
	background: #03A9F4;
}
.custom-checkbox input[type="checkbox"]:checked + label:after {
	border-color: #fff;
}
.custom-checkbox input[type="checkbox"]:disabled + label:before {
	color: #b8b8b8;
	cursor: auto;
	box-shadow: none;
	background: #ddd;
}

.callout {
	margin-bottom: 0rem;
	padding-bottom: 0.1rem !important
}

th.dt-center { text-align: center; }

thead, th {text-align: center;}

/* OR */

.table thead,
.table th {text-align: center;}

/* .sticky_column {
  	background-color: #ddd;
  	left: 0;
  	position: sticky;
  	z-index: 9999;
} */

/*
.dataTables_scrollHeadInner{ table-layout:auto!important}


.dataTables_scrollHead {
	width: 100% !important;
}
.dataTables_scrollHeadInner {
	width: 99% !important;
}
.dataTable  {
	width: 100% !important;
}
    

.dataTables_scrollHeadInner{ width:99%!important}

*/


/*

.dataTables_scrollHeadInner{  width:100%!important; }

.dataTables_scrollHeadInner table{  table-layout:auto !important; }
 */
/* Modal styles */
/* .modal .modal-dialog {
	max-width: 400px;
}
.modal .modal-header, .modal .modal-body, .modal .modal-footer {
	padding: 20px 30px;
}
.modal .modal-content {
	border-radius: 3px;
	font-size: 14px;
}
.modal .modal-footer {
	background: #ecf0f1;
	border-radius: 0 0 3px 3px;
}
.modal .modal-title {
	display: inline-block;
}
.modal .form-control {
	border-radius: 2px;
	box-shadow: none;
	border-color: #dddddd;
}
.modal textarea.form-control {
	resize: vertical;
}
.modal .btn {
	border-radius: 2px;
	min-width: 100px;
}	
.modal form label {
	font-weight: normal;
}	 */

/* Fine Uploader */

#trigger-upload {
    color: white;
    background-color: #00ABC7;
    font-size: 14px;
    padding: 7px 20px;
    background-image: none;
}

#fine-uploader-manual-trigger .qq-upload-button {
    margin-right: 15px;
}

#fine-uploader-manual-trigger .buttons {
    width: 36%;
}

#fine-uploader-manual-trigger .qq-uploader .qq-total-progress-bar-container {
    width: 60%;
}

.the-legend {
    border-style: none;
    border-width: 0;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 0;
    width: auto;
    padding: 0 5px;
   /*  border: 1px solid #e0e0e0; */
}
.the-fieldset {
    border: 1px solid #e0e0e0;
    padding: 10px;
}

.fa-file-excel{
	color :green;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    padding: .75rem 1.25rem;
    position: relative;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    padding-top: 5px;
  		padding-bottom: 5px;
}

.scroll-to-top-cancel {
    bottom: 8.5rem;
    position: fixed;
    right: 1.25rem;
    z-index: 1032;
}

.scroll-to-top-save {
    bottom: 6.2rem;
    position: fixed;
    right: 1.25rem;
    z-index: 1032;
    color: white !important;
}

.scroll-to-top-new {
    bottom: 4.0rem;
    position: fixed;
    right: 1.25rem;
    z-index: 1032;
    color: white !important;
}

/* Custom div for search frame modal */
.divSerchFrameModal {
	border-radius: 0.25rem;
	box-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);
	background-color: #fff;
	border-left: 2px solid #e9ecef;
	margin-bottom: 1rem;
	padding: 1rem;
}

/* Bootstrap Datetimepicker z-index fix */
.bootstrap-datetimepicker-widget {
	z-index: 99999 !important;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
	z-index: 99999 !important;
}

.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th {
	z-index: 99999 !important;
}

.bootstrap-datetimepicker-widget .picker-switch {
	z-index: 99999 !important;
}

.bootstrap-datetimepicker-widget .prev,
.bootstrap-datetimepicker-widget .next {
	z-index: 99999 !important;
}



/* Sub-items table responsive */
.sub-items-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.sub-items-table {
    width: 100%;
    min-width: 1200px;
}

.sub-items-table th,
.sub-items-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.sub-items-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.sub-items-table .btn {
    margin-right: 5px;
}

.sub-items-table .btn:last-child {
    margin-right: 0;
}

/* Sub-items modal styles */
#addSubItemModal .modal-dialog,
#editSubItemModal .modal-dialog {
    max-width: 900px;
}

#addSubItemModal .modal-body,
#editSubItemModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#addSubItemModal .form-group,
#editSubItemModal .form-group {
    margin-bottom: 1rem;
}

#addSubItemModal .form-control,
#editSubItemModal .form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

#addSubItemModal .form-control:focus,
#editSubItemModal .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#addSubItemModal .text-danger,
#editSubItemModal .text-danger {
    color: #dc3545 !important;
}

#addSubItemModal .modal-header,
#editSubItemModal .modal-header {
    border-bottom: 1px solid #dee2e6;
}

#addSubItemModal .modal-footer,
#editSubItemModal .modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Responsive adjustments for sub-items modals */
@media (max-width: 768px) {
    #addSubItemModal .modal-dialog,
    #editSubItemModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #addSubItemModal .col-md-6,
    #editSubItemModal .col-md-6,
    #addSubItemModal .col-md-4,
    #editSubItemModal .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* UAT/DEV — แทบแดงด้านบนบอกว่าเป็นเครื่องทดสอบ
   อย่าใส่ top ให้ .main-header: navbar เป็น position:relative จะดันแถบฟ้าหล่น */
.tms-uat-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2000;
	height: 22px;
	line-height: 22px;
	background-color: #c82333;
	color: #fff;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	pointer-events: none;
}
body.tms-uat-env {
	padding-top: 22px !important;
}
body.tms-uat-env.layout-fixed .main-sidebar {
	top: 22px !important;
	height: calc(100vh - 22px) !important;
}
body.tms-uat-env.login-page {
	padding-top: 22px;
}
