/* --------------------------------------------------- */
/* ############### BOOTSTRAP OVERRIDES ############### */
/* --------------------------------------------------- */
a {
    transition: all 0.2s ease-in-out;
    color: #FB9337;
}

a:hover {
    color: #fb861e;
}

a:focus,
a:active {
    outline: none !important;
}

p {
    margin-bottom: 20px;
}

/* --------------------------------------- */
/* ############### Buttons ############### */
/* --------------------------------------- */
.btn,
.sp-container button {
    border-radius: 0;
}

.btn:active,
.sp-container button:active {
    box-shadow: none;
}

.btn-primary {
    background: rgb(82, 0, 46);
    border-color: rgb(44, 0, 27);
    color: #fff;
}

.btn-primary:hover {
    background: rgb(102, 20, 66);
    border-color: rgb(54, 10, 37);
}

.btn-outline-primary {
    color: rgb(82, 0, 46);
    border-color: rgb(82, 0, 46);
}

.btn-outline-primary:hover {
    background: rgb(82, 0, 46);
    color: #fff;
}

.btn-indigo {
    color: #fff;
    background-color: #6610f2;
    border-color: #5b0cdd;
}

.btn-indigo:hover {
    color: #fff;
    background-color: #560bd0;
    border-color: #4709ac;
}

.btn-purple {
    color: #fff;
    background-color: #6f42c1;
    border-color: #643ab0;
}

.btn-pink {
    color: #fff;
    background-color: #e83e8c;
    border-color: #e5277e;
}

.btn-orange {
    color: #111;
    background-color: #FB9337;
    border-color: #fb861e;
}

.btn-teal {
    color: #fff;
    background-color: #20c997;
    border-color: #1cb386;
}

.btn-outline-light {
    color: #adb5bd;
    border-color: #adb5bd;
}

.btn-outline-light:hover {
    color: #fff;
    background-color: #adb5bd;
}

.btn-outline-indigo {
    color: #6610f2;
    border-color: #6610f2;
}

.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-pink {
    color: #e83e8c;
    border-color: #e83e8c;
}

.btn-outline-teal {
    color: #20c997;
    border-color: #20c997;
}

.btn-warning {
    color: #fff !important;
}

.btn-oblong {
    border-radius: 50px;
}

/* ------------------------------------- */
/* ############### Cards ############### */
/* ------------------------------------- */
.card {
    border: 0;
    border-radius: 0;
}

.card-header,
.card-footer {
    border-color: #dee2e6;
}

.card-header {
    border-bottom: 0;
}

.card-header:first-child {
    border-radius: 0;
}

.card-header-default {
    background-color: #3d4f6e;
    color: #fff;
    padding: 0 20px;
    height: 50px;
    display: flex;
    align-items: center;
}

.card-header-default .card-title {
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
}

.card-title {
    color: #212529;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.card-body {
    padding: 20px;
    min-height: calc(100vh - 80px); /* 120px = header 60px + padding/margin อื่นๆ */
    /* display: flex; */
    /* flex-direction: column; */
}

.card-body-title {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    color: #32415A;
}

.card-footer {
    border-top-width: 0;
    border-radius: 0;
}

/* -------------------------------------- */
/* ############### Custom ############### */
/* -------------------------------------- */
.ckbox,
.rdiobox {
    font-weight: normal;
    position: relative;
    display: block;
    line-height: 18px;
}

/* ... (เก็บเฉพาะ ckbox และ rdiobox ที่ใช้) ... */
/* ------------------------------------- */
/* ############### Forms ############### */
/* ------------------------------------- */
.form-control,
.dataTables_filter input {
    border-radius: 0;
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.form-control:focus,
.dataTables_filter input:focus,
.form-control:active,
.dataTables_filter input:active {
    background-color: #fff;
    border-color: rgb(82, 0, 46);
    box-shadow: 0 0 0 0.2rem rgba(82, 0, 46, 0.25);
}

/* --------------------------------------- */
/* ############### Modals ############### */
/* --------------------------------------- */
.modal {
    text-align: center;
    padding: 0 !important;
}

.modal::before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
}

.modal .modal-dialog {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
}

.modal .modal-header,
.modal .modal-footer {
    border: 0;
}

.modal .modal-content {
    border-radius: 0;
    border: 0;
}

.modal .modal-body {
    background-color: #f8f9fa;
}

/* ------------------------------------------ */
/* ############### Navigation ############### */
/* ------------------------------------------ */
.nav-tabs .nav-link {
    border-radius: 0;
}

.nav-tabs .nav-link.active {
    background: rgb(82, 0, 46);
    color: #fff;
    border-color: transparent;
}

.nav-pills .nav-link {
    color: #495057;
    border-radius: 0;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link.active:hover,
.nav-pills .nav-link.active:focus {
    background: rgb(82, 0, 46);
    color: #fff;
}

/* ------------------------------------------ */
/* ############### Pagination ############### */
/* ------------------------------------------ */
.pagination .page-item+.page-item {
    padding-left: 3px;
    margin: 0;
}

.pagination .page-item .page-link {
    color: #495057;
    padding: 11px 0;
    width: 35px;
    height: 40px;
    text-align: center;
    border-radius: 0;
}

.pagination .page-item .page-link:hover,
.pagination .page-item .page-link:focus {
    background-color: #e9ecef;
    color: rgb(82, 0, 46);
}

.pagination .active .page-link,
.pagination .active .page-link:hover,
.pagination .active .page-link:focus {
    background: rgb(82, 0, 46);
    color: #fff;
    border-color: transparent;
}

/* -------------------------------------- */
/* ############### Tables ############### */
/* -------------------------------------- */
.table {
    background-color: #e9ecef;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    border-top-color: #fff;
    color: #737c85;
}

.table thead>tr>th,
.table thead>tr>td,
.table tfoot>tr>th,
.table tfoot>tr>td {
    background: rgb(82, 0, 46);
    color: #fff;
}

.table-bordered {
    border: 0;
}

.table-bordered tbody tr th,
.table-bordered tbody tr td {
    border: 1px solid #fff;
    border-right: 0;
    border-bottom: 0;
}

/* ---------------------------------------------------- */
/* ############### CUSTOM VENDOR STYLES ############### */
/* ---------------------------------------------------- */
/* ############### DataTables ############### */
table.dataTable {
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
}

table.dataTable thead th,
table.dataTable thead td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after,
table.dataTable thead td.sorting::after,
table.dataTable thead td.sorting_asc::after,
table.dataTable thead td.sorting_desc::after {
    content: '';
    border: 4px solid transparent;
    border-top-color: #ced4da;
    position: absolute;
    z-index: 10;
    top: 22px;
    right: 8px;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::before,
table.dataTable thead td.sorting::before,
table.dataTable thead td.sorting_asc::before,
table.dataTable thead td.sorting_desc::before {
    content: '';
    border: 4px solid transparent;
    border-bottom-color: #ced4da;
    position: absolute;
    z-index: 10;
    top: 12px;
    right: 8px;
}

table.dataTable thead th.sorting_asc::before,
table.dataTable thead td.sorting_asc::before {
    border-bottom-color: #343a40;
}

table.dataTable thead th.sorting_desc::after,
table.dataTable thead td.sorting_desc::after {
    border-top-color: #343a40;
}

table.dataTable tbody th,
table.dataTable tbody td {
    padding: 0.75rem;
}

table.dataTable.row-border tbody th,
table.dataTable.row-border tbody td,
table.dataTable.display tbody th,
table.dataTable.display tbody td {
    border-top-color: #dee2e6;
}

table.dataTable.no-footer {
    border-bottom-color: #dee2e6;
}

.dataTables_length {
    padding-bottom: 10px;
}

.dataTables_length .select2-container {
    width: 60px;
    margin-left: 0;
    margin-right: 10px;
}

.dataTables_filter {
    padding-bottom: 10px;
    padding-right: 5px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding-top: 0.54rem;
    padding-bottom: 0.54rem;
    background-color: #e9ecef;
    border-color: transparent;
    border-radius: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:focus {
    background: rgb(82, 0, 46);
    color: #fff !important;
}

/* ############### Select2 ############### */
.select2-results__option {
    border-radius: 0;
    margin-bottom: 1px;
    font-size: 0.875rem;
    padding-left: 8px;
}

.select2-container--default .select2-selection--single {
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.15);
    border-radius: 0;
    height: calc(2.39375rem+2px);
    outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #495057;
    line-height: calc(2.39375rem+2px)-0.1rem;
    padding-left: 0.75rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    width: 30px;
    height: calc(2.39375rem+2px);
    line-height: calc(2.39375rem+2px);
}

.select2-dropdown {
    border-color: rgba(0, 0, 0, 0.15);
    z-index: 200;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgb(82, 0, 46);
    color: #fff;
}

/* ############### Parsley ############### */
input.parsley-error:focus,
textarea.parsley-error:focus {
    box-shadow: none !important;
}

input.parsley-success:focus,
textarea.parsley-success:focus {
    box-shadow: none !important;
}

.parsley-errors-list {
    color: #dc3545;
    list-style: none;
    font-size: 12px;
    padding: 0;
    margin-bottom: 0;
}

/* --------------------------------------------------- */
/* ############### TEMPLATE CORE STYLES ############### */
/* --------------------------------------------------- */
.am-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgb(82, 0, 46);
    padding: 0 15px 0 0;
    z-index: 1000;
}

.am-header-left {
    display: flex;
    align-items: center;
}

.am-header-right {
    display: flex;
    align-items: center;
}

.am-navicon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 0;
    color: #FB9337;
}

.am-navicon i {
    line-height: 0;
}

.am-logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    position: relative;
    top: -3px;
}

.am-sideleft {
    position: fixed;
    top: 60px;
    left: -240px;
    bottom: 0;
    width: 240px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

@media (min-width: 992px) {
    .am-sideleft {
        box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.21);
        left: 0;
    }
}

.am-sideleft-menu {
    flex-direction: column;
    padding: 10px 20px;
}

.am-sideleft-menu>.nav-item+.nav-item {
    border-top: 1px solid #e9ecef;
}

.am-sideleft-menu>.nav-item>.nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 40px;
    padding: 0;
    color: #868e96;
    position: relative;
}

.am-sideleft-menu>.nav-item>.nav-link i:first-child {
    margin-right: 8px;
    font-size: 23px;
    width: 20px;
    text-align: center;
}

.am-sideleft-menu>.nav-item>.nav-link.active {
    color: #343a40;
}

.am-sideleft-menu>.nav-item>.nav-link.active i:first-child {
    color: #FB9337;
}

.am-mainpanel {
    margin-left: 0;
    margin-top: 60px;
    transition: all 0.2s ease-in-out;
}

@media (min-width: 992px) {
    .am-mainpanel {
        margin-left: 240px;
    }
}

.am-pagebody {
    padding: 15px;
}

@media (min-width: 576px) {
    .am-pagebody {
        padding: 30px;
    }
}