body.login_admin .company-logo img {
    width: 80px;
    height: auto;
}

body.login_admin .authentication-form-wrapper {
    padding-top: 0px !important;
}

.customers .navbar a.navbar-brand img {
    width: auto;
    height: 80px;
}

.customers .navbar {
    min-height: 0;
}

.customers .navbar a.navbar-brand {
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 0;
}

.customers .mtop40 {
    margin-top: 0px !important;
}

.dropdown-menu > li > a.invoice-overdue-notice-link,
.dropdown-menu > li > a.invoice-overdue-notice-link:visited,
.dropdown-menu > li > a.invoice-overdue-notice-link:hover,
.dropdown-menu > li > a.invoice-overdue-notice-link:focus {
    color: #111827 !important;
    font-weight: 500 !important;
}

.customer-profile-title h4 > div {
    align-items: flex-start;
    display: flex;
    height: auto;
}

.customer-profile-title h4 > div > span {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.customer_profile .customer-profile-group-heading {
    position: static;
    margin: 0 0 15px;
}

.customer_profile .customer-profile-info-heading {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 48px;
    margin: 0 !important;
    position: relative;
    top: -10px;
}

.customer_profile .customer-statement-heading {
    color: #dc2626;
}

.customer_profile .customer-statement-company {
    color: #1e293b;
}

.batch-payment-total-line,
.batch-payment-total-words {
    margin: 8px 0 0;
    font-size: 14px;
    text-align: right;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.batch-payment-total-words {
    margin-top: 4px;
    font-size: 12px;
    font-style: italic;
    width: 100%;
    max-width: 100%;
}

.batch-payment-total-label {
    display: inline;
    width: auto;
    flex: 0 0 auto;
    margin-right: 6px;
}

.batch-payment-total-value {
    display: inline;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 70%;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

.batch-payment-summary {
    width: 100%;
    max-width: 100%;
}

.batch-payment-unpaid-line .batch-payment-total-label {
    width: auto;
    flex-basis: auto;
}

@media (min-width: 768px) {
    /* Cot menu trai cua ho so khach hang. :not(:only-child) - trang "Them khach hang moi" khong co cot menu,
       khung bieu mau la con duy nhat -> khong bi ep 160px (loi 07/10/2026) */
    .customer_profile .md\:tw-flex > div:first-child:not(:only-child) {
        width: 160px;
        max-width: 160px;
        flex: 0 0 160px;
    }
}

/* Khung noi dung ben phai cua ho so khach hang: duoc co lai vua phan con lai (min-width 0) - truoc day bang hoa don rong
   day ca trang tran ra ngoai man hinh ~70px (07/10/2026); bang rong qua thi tu truot trong khung cua no */
@media (min-width: 768px) {
    .customer_profile .md\:tw-flex > div:last-child:not(:only-child) {
        min-width: 0;
        flex: 1 1 0%;
    }
}

/* Viet Nam khong co "Tieu bang": an o Tieu bang trong ho so khach hang (thong tin chung, dia chi thanh toan, dia chi nhan hang).
   Du lieu cu (neu co) van giu trong CSDL. 07/10/2026 */
.customer_profile [app-field-wrapper="state"],
.customer_profile [app-field-wrapper="billing_state"],
.customer_profile [app-field-wrapper="shipping_state"] {
    display: none !important;
}

/* Bang danh sach trong cac muc cua ho so khach (Hoa don, Bao gia, Thanh toan, Hop dong...) va 6 trang nhom Doanh so (08/10), roi MOI bang DataTables trong khu quan tri (body.admin, 08/10): vien giong Ke toan quan tri /
   trang Danh sach khach hang - khung mong xam nhat bo goc 8px, dong tieu de nen xam nhat, ke doc mo giua cot. 08/10/2026 */
body.admin .panel-table-full {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
body.admin .dataTables_wrapper .table-responsive {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow-x: auto;
    background: #fff;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
body.admin .dataTables_wrapper table.dataTable {
    margin: 0 !important;
    border-collapse: collapse;
}
body.admin .dataTables_wrapper table.dataTable > thead > tr > th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 12.5px;
    border-top: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
}
body.admin .dataTables_wrapper table.dataTable > thead > tr > th + th,
body.admin .dataTables_wrapper table.dataTable > tbody > tr > td + td {
    border-left: 1px solid #eef0f3;
}
body.admin .dataTables_wrapper table.dataTable > tbody > tr > td {
    border-top: 0 !important;
    border-bottom: 1px solid #f1f2f4;
}
body.admin .dataTables_wrapper table.dataTable > tbody > tr:last-child > td {
    border-bottom: 0;
}
body.admin .dataTables_wrapper table.dataTable > thead > tr > th:first-child,
body.admin .dataTables_wrapper table.dataTable > tbody > tr > td:first-child {
    padding-left: 12px;
}

/* Bang TU VIET (khong phai DataTables) tren cac trang quan tri: cung kieu vien. Chua ra: bang dong hang hoa don/bao gia (.items),
   bang Ke toan quan tri (.kt - da co khung rieng). 08/10/2026
   A) Bang nam trong .table-responsive -> khung o the boc */
body.admin .table-responsive:has(> table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt)) {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
/* B) Bang nam thang trong khung trang / khung an hien -> tu ve khung (separate de bo goc duoc) */
body.admin .panel-body > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt),
body.admin .panel-body > .collapse > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table),
body.admin .tab-pane > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt) {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
}
body.admin .table-responsive > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt),
body.admin .panel-body > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt),
body.admin .panel-body > .collapse > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table),
body.admin .tab-pane > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt) {
    margin-bottom: 0;
}
/* Perfex dat table.table { margin-top: 25px } -> bang nam TRONG khung boc bi mot dai trong tren dong tieu de: bo di
   (ke ca bang Cham cong - loi cu "dai trong phia tren hang ngay") */
body.admin .table-responsive > table.table:not(.dataTable):not(.items):not(.kt) {
    margin-top: 0 !important;
}
:is(body.admin .table-responsive, body.admin .panel-body, body.admin .panel-body > .collapse, body.admin .tab-pane) > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt) > thead > tr > th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 12.5px;
    border-top: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
}
:is(body.admin .table-responsive, body.admin .panel-body, body.admin .panel-body > .collapse, body.admin .tab-pane) > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt) > tbody > tr > td {
    border-top: 0;
    border-bottom: 1px solid #f1f2f4;
}
:is(body.admin .table-responsive, body.admin .panel-body, body.admin .panel-body > .collapse, body.admin .tab-pane) > table.table-striped:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt) > tbody > tr:nth-of-type(odd) > td {
    background-color: transparent; /* bo ke soc - cung kieu Ke toan quan tri */
}
:is(body.admin .table-responsive, body.admin .panel-body, body.admin .panel-body > .collapse, body.admin .tab-pane) > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt) > tbody > tr:last-child > td {
    border-bottom: 0;
}
:is(body.admin .table-responsive, body.admin .panel-body, body.admin .panel-body > .collapse, body.admin .tab-pane) > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt):not(.table-bordered) > thead > tr > th + th,
:is(body.admin .table-responsive, body.admin .panel-body, body.admin .panel-body > .collapse, body.admin .tab-pane) > table.table:not(.dataTable):not(.items):not(.payroll-table):not(.attendance-table):not(.kt):not(.table-bordered) > tbody > tr > td + td {
    border-left: 1px solid #eef0f3;
}

/* Luong nhan vien (Bang luong, Ung tien, Cham cong): cung kieu vien Ke toan quan tri. Chon kem body.<trang> de thang <style>
   rieng trong view (nap sau file nay). 08/10/2026 */
body.payroll .table-responsive:has(> table.payroll-table),
body.advances .table-responsive:has(> table.table) {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
body.payroll .table-responsive > table.payroll-table,
body.advances .table-responsive > table.table {
    margin: 0;
}
body.payroll table.payroll-table > thead > tr > th,
body.advances .table-responsive > table.table > thead > tr > th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 12.5px;
    border-top: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
}
body.payroll table.payroll-table > tbody > tr > td {
    border-top: 0;
    border-bottom: 1px solid #f1f2f4;
}
body.payroll table.payroll-table > tbody > tr.payroll-detail > td {
    border-bottom: 1px solid #e5e7eb;
}
body.payroll table.payroll-table > tfoot > tr > td {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}
body.advances .table-responsive > table.table > tbody > tr > td {
    background: #fff;
    border-top: 0;
    border-bottom: 1px solid #f1f2f4;
}
body.advances .table-responsive > table.table > tbody > tr:last-child > td {
    border-bottom: 0;
}
body.advances .table-responsive > table.table > thead > tr > th + th,
body.advances .table-responsive > table.table > tbody > tr > td + td {
    border-left: 1px solid #eef0f3;
}
body.payroll table.payroll-table > thead > tr > th:first-child,
body.payroll table.payroll-table > tbody > tr:not(.payroll-detail) > td:first-child,
body.payroll table.payroll-table > tfoot > tr > td:first-child,
body.advances .table-responsive > table.table > thead > tr > th:first-child,
body.advances .table-responsive > table.table > tbody > tr > td:first-child {
    padding-left: 12px;
}
/* Cham cong: giu luoi o (de nhap), chi doi mau vien nhat hon + khung bo goc 8px nhu cac bang khac */
body.attendance .att-scroll {
    border-color: #e5e7eb;
    border-radius: 8px;
}
body.attendance .att-scroll .attendance-table > thead > tr > th,
body.attendance .att-scroll .attendance-table > tbody > tr > td {
    border-right-color: #e5e7eb;
    border-bottom-color: #eef0f3;
}
body.attendance .att-scroll .attendance-table > thead > tr > th {
    background-color: #f9fafb;
    color: #374151;
    border-bottom-color: #e5e7eb;
}

@media (max-width: 767px) {
    .customers .navbar a.navbar-brand img {
        height: 42px;
    }

    .customers .navbar-toggle {
        margin-top: 6px;
        margin-bottom: 6px;
    }
}
/* Cot "Cac the" trong cac bang (bao gia, hoa don...): the dai tu xuong dong trong cot,
   khong tran de sang cot ben canh (nhan .label cua Bootstrap mac dinh nowrap). 02/10/2026 */
table.dataTable .tags-labels .label-tag {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.35;
    vertical-align: top;
    margin-bottom: 3px;
}
table.dataTable .tags-labels {
    min-width: 140px;
}