﻿/* Summary bar */
.sap_summary-bar {
    display: flex;
    gap: 32px;
    padding: 16px 20px 0;
    background-color: #fff;
    margin-left: 16px;
}

.sap_summary-item .sap_label {
    font-size: 14px;
    color: #7d7d7d;
}

.sap_summary-item .sap_value {
    font-size: 13px;
    font-weight: 600;
    color: #009966;
}

/* Tabs */
.sap_tabs {
    display: flex;
    gap: 35px;
    padding: 12px 35px 0;
    background-color: #fff;
    border-bottom: 1px solid #dde2eb;
}

.sap_tab {
    border: none;
    background: none;
    padding: 8px 0;
    font-size: 14px !important;
    color: #555;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: inline-block;
}

    .sap_tab.sap_active {
        color: #0070f2;
        font-weight: 600;
    }

        .sap_tab.sap_active::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: -2px;
            height: 2px;
            background-color: #0070f2;
        }

/* Page */
.sap_page {
    padding: 0 5px 0 5px;
    height: auto;
    background-color: #f5f6f7;
}

/* Card */
.sap_card {
    background-color: #fff;
    border-radius: 0.75rem !important;
    box-shadow: 0 0 0 1px #e0e4ef;
    padding: 24px 14px 32px;
}

.sap_card-columns {
    display: grid;
    grid-template-columns: 1fr 1fr ;
    gap: 48px !important;
    padding-right: 50px;
}

/* Sections */
.sap_section-title {
    font-size: 14px !important;
    margin: 0 0 8px;
    font-weight: 600;
    margin-bottom: 15px !important;
}

/* Form layout */
.sap_form-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

/* Make label text left and control right */
.sap_label {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    column-gap: 12px;
    font-size: 14px !important;
}

.sap_label span:first-child {
    font-size: 14px;
    color: #444;
}

.sap_required {
    color: #ba066c !important;
    font-family: "72", "72full", Arial, Helvetica, sans-serif !important;
    font-size: 1rem !important;
    font-weight: bold;
    vertical-align: middle;
    line-height: 0;
    margin-left: 0.125rem !important;
}

/* Base input */
.sap_input {
    width: 100%;
    height: 1.625rem;
    padding: 6px 20px 6px 8px;
    font-size: 14px !important;
    border-radius: 3px;
    border: 1px solid #d4dadf !important;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 1px 0 0 #556b81;
    transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
    text-overflow: ellipsis !important;
}
.sap_input:disabled {
    cursor: text;
    font-size: 0.9rem;
    font-family: "72", "72full", Arial, Helvetica, sans-serif;
    line-height: normal;
    color: #1d2d3e;
}

.sap_inputDisable {
    cursor: text;
    font-size: 0.9rem;
    font-family: "72", "72full", Arial, Helvetica, sans-serif;
    line-height: normal;
    color: #1d2d3e;
    white-space: nowrap;
}
.sap_inputDisable_textarea {
    cursor: text;
    font-size: 0.9rem;
    font-family: "72", "72full", Arial, Helvetica, sans-serif;
    line-height: normal;
    color: #1d2d3e;
}
.sap_input_v2 {
    width: 100%;
    height: 1.625rem;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #d4dadf;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 1px 0 0 #556b81;
    transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
.sap_input_invalid {
    width: 100%;
    height: 1.625rem;
    padding: 6px 8px;
    font-size: 14px !important;
    border-radius: 3px;
    border: 1px solid #ffc2d1 !important;
    background-color: #ffe5ec;
    outline: none;
    box-shadow: 0 1px 0 0 #fb6f92;
    transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
.sap_input_invalid:hover {
    border-color: #fb6f92 !important;
    box-shadow: 0 1px 0 0 #fb6f92!important;
    background-color: white !important;
}
.sap_input_invalid:focus {
    border-color: #fb6f92 !important;
    box-shadow: 0 1px 0 0 #fb6f92 !important;
    background-color: white !important;
}

.sap_input_btn {
    position: absolute;
    right: 0px;
    border: none;
    background: none;
    top: 0px
}
button.sap_input_btn:disabled img {
    display: none;
}
button.sap_input_btn:disabled {
    background: transparent !important;
  
}

.sap_input_group {
    position: relative;
    display: flex;
    align-items: center;
}

.sap_dropdown .sap_dropdown-control:disabled {
    background-color: #dcdcdc !important;

}
/* Apply same styling to select */
select.sap_input {
    height: 1.625rem;
    padding: 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ffffff;
}

    .sap_input:hover,
    select.sap_input:hover {
        border-color: #91C0FF;
        box-shadow: 0 1px 0 0 #2882ec;
    }

    .sap_input:focus,
    select.sap_input:focus {
        border-color: #0068ff;
        box-shadow: 0 0 0 1px rgba(0, 104, 255, 0.9);
    }

    .sap_input:disabled,
    select.sap_input:disabled {
        background-color: #f5f7fb;
        border-color: #dde2eb;
        color: #999;
        box-shadow: none;
    }

select.sap_input_v2 {
    height: 1.625rem;
    padding: 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ffffff;
}

.sap_input_v2:hover,
select.sap_input:hover {
    border-color: #91C0FF;
    box-shadow: 0 1px 0 0 #2882ec;
}

.sap_inpu_v2:focus,
select.sap_input:focus {
    border-color: #0068ff;
    box-shadow: 0 0 0 1px rgba(0, 104, 255, 0.9);
}

.sap_input_v2:disabled,
select.sap_input:disabled {
    background-color: #f5f7fb;
    border-color: #dde2eb;
    color: #999;
    box-shadow: none;
}
.sap-search-box {
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .sap-search-box:hover {
        border-color: #91C0FF !important;
        box-shadow: 0 1px 0 0 #2882ec;
    }

    .sap-search-box:focus-within {
        border-color: #0068ff !important;
        box-shadow: 0 0 0 1px rgba(0, 104, 255, 0.9);
    }
/* Inline rows */
.sap_inline-group {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sap_inline-groupv2 {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.sap_inline-groupv3 {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
}

.sap_inline-groupv2 > div {
    flex: 3; /* 75% width */
    min-width: 0;
}
.sap_inline-groupv3 > div {
    flex: 3; /* 75% width */
    min-width: 0;
}
.sap_inline-groupv2 > input {
    flex: 1; /* 25% width */
}

.sap_checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

    .sap_checkbox-row input[type="checkbox"] {
        width: 13px;
        height: 13px;
    }

.sap_date-field {
    flex: 1;
}

/* Image card */
.sap_image-card {
    margin-top: 16px;
    border-radius: 4px;
    border: 1px solid #dde2eb;
    background-color: #fafbff;
    display: flex;
    flex-direction: column;
    height: 260px;
}

.sap_image-card-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid #dde2eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sap_image-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    color: #666;
    overflow: hidden;
}

    .sap_image-card-body img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
    }

.sap_image-btn-upload {
    height: 24px;
    width: 60px;
    border: none;
    outline: none;
    box-shadow: none;
    background: #fafbff;
}

.sap_image-icon {
    font-size: 56px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.sap_image-text-main {
    font-size: 14px;
    margin-bottom: 4px;
}

.sap_image-text-sub {
    font-size: 12px;
    color: #999;
}

/* Bottom bar */
.sap_bottom-bar {
    position: fixed;
    left: 10px; /* inset to look like a floating card */
    right: 10px;
    bottom: 10px;
    height: 2.5rem !important;
    z-index: 2; /* ensure it appears on top of form content */
    background-color: #ffffff;
    border: 1px solid #dde2eb;
    border-radius: 12px; /* floating card look */
    box-shadow: 0 0 0 .0625rem rgba(34, 53, 72, 0.48), 0 .125rem .5rem 0 rgba(34, 53, 72, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}
.sap-coa-right {
    position: relative;
}


    .sap-coa-right .sap_bottom-bar--attach-right {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        box-shadow: 0 -1px 4px rgba(0,0,0,0.08);
        background: var(--sap-bottom-bg, #fff);
    }

    .sap-coa-right .sap_page {
        padding-bottom: 56px; 
    }
.sap_bottom-bar-right {
 display: flex;
 gap:8px;
}


.sap_mt-16 {
    margin-top: 16px;
}

.sap_mt-24 {
    margin-top: 24px;
}
.sap_mt-10 {
    margin-top: 10px;
}

.sap_mb-80 {
    margin-bottom: 80px;
}

.sap_block-title {
    font-size: 1.25rem !important;
    font-weight: 600;
    padding-left:1rem;
}

.sap_inner-card {
    margin-top: 8px;
    padding: 20px 15px 24px;
    border-radius: 8px;
    background-color: #fff;
}
.sap_column{
    padding-left:12px;
}
.sap_form-grid--half {
    max-width: 480px;
}

.sap_form-grid--two-col {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 8px 16px;
}

.sap_sub-label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

/* table layout giả giống SAP */
.sap_table {
    border: 1px solid #dde2eb;
    border-radius: 4px;
    margin-top: 16px;
    font-size: 12px;
}

.sap_table-header,
.sap_table-row {
    display: grid;
    grid-template-columns: 32px 40px minmax(120px, 1.5fr) repeat(5, minmax(80px, 1fr)) 40px;
    align-items: center;
    border-bottom: 1px solid #f0f2fa;
}

.sap_table-header {
    background-color: #f5f7fb;
    font-weight: 600;
}

.sap_table-row:last-child {
    border-bottom: none;
}

.sap_table-cell {
    padding: 6px 8px;
    border-right: 1px solid #f0f2fa;
}

    .sap_table-cell:last-child {
        border-right: none;
    }

.sap_table-cell--checkbox {
    text-align: center;
}

.sap_table-cell--sm {
    text-align: center;
    width: 40px;
}

.sap_table-row--empty .sap_table-cell--center {
    text-align: center;
    color: #999;
}

.sap_table-cell--icon {
    text-align: center;
}

/* textarea */
.sap_textarea {
    width: 100%;
    min-height: 120px;
    padding: 6px 8px;
    border-radius: 2px;
    border: 1px solid #c8d0e3;
    font-size: 14px;
    resize: vertical;
}

/* tab strip phụ trong Properties */
.sap_tab-strip {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 12px;
}

    .sap_tab-strip .sap_tab {
        padding: 4px 12px;
        border-radius: 16px;
        border: 1px solid transparent;
    }

        .sap_tab-strip .sap_tab.sap_active {
            border-color: #0070f2;
            background-color: #e5f0ff;
        }

/* bảng Properties có khung cuộn */
.sap_table--properties .sap_table-header {
    grid-template-columns: 1.5fr 80px;
}

.sap_table--properties .sap_table-row {
    grid-template-columns: 1.5fr 80px;
}

.sap_table-scroll {
    max-height: 320px;
    overflow-y: auto;
}

/* Pricing table: bớt cột để vừa màn hình */
.sap_table--pricing .sap_table-header,
.sap_table--pricing .sap_table-row {
    grid-template-columns: 32px 40px 110px 110px 1.5fr 1.2fr 1.4fr 60px;
}

/* User-defined fields: lưới nhiều dòng */
.sap_udf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 8px 32px;
    margin-top: 8px;
}

    /* điều chỉnh label + input khi có inline-group trong UDF */
    .sap_udf-grid .sap_inline-group {
        display: flex;
        align-items: center;
        gap: 6px;
    }

/* Container */
.sap_dropdown {
    /*    font-size: 12px;*/
}

/* Nút control giống input SAP */
.sap_dropdown-control {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background-color: #ffffff;
    border-radius: 3px;
    border: 1px solid #d4dadf;
    box-shadow: 0 1px 0 0 #556b81;
    color: #212529;
    box-sizing: border-box;
    font-weight: 400;
    line-height: 1.4;
    height: 26px;
    min-width: 100px;
}

    .sap_dropdown-control:focus,
    .sap_dropdown-control:active,
    .show > .sap_dropdown-control.dropdown-toggle {
        outline: none;
        border-color: #0068ff;
        box-shadow: 0 1px 0 0 #0068ff;
        background-color: #ffffff;
    }

    .sap_dropdown-control:hover {
        border-color: #7fb6ff;
        box-shadow: 0 1px 0 0 #7fb6ff;
        background-color: #ffffff;
    }


/* Dropdown menu */
.sap_dropdown-menu {
    margin-top: 0;
    padding: 4px 0;
    border-radius: 0 0 3px 3px;
    border-color: #c8d0e3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    font-size: 12px;
    min-width: 160px; /* rộng bằng control */
    z-index: 1;
}

/* Item */
.sap_dropdown-item {
    padding: 6px 12px;
    border-bottom: 1px solid #e9edf5;
    font-size: 12px;
}

    .sap_dropdown-item:last-child {
        border-bottom: none;
    }

    .sap_dropdown-item:hover,
    .sap_dropdown-item:focus {
        background-color: #e9f4ff;
    }

    /* Item đang chọn: nền xanh nhạt + line dưới */
    .sap_dropdown-item.active,
    .sap_dropdown-item.active:hover {
        background-color: #d9f0ff;
        color: #212529;
        border-bottom: 2px solid #0068ff;
    }

html { scroll-behavior: smooth; }

/* ===== Table ===== */
.sap-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "72", "SAP Fiori", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: #32363a;
}

    .sap-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background-color: #fff;
        font-weight: 600;
        text-align: left;
        padding: 8px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
        inset 0 -1px 0 #bcc9d6, /* border dưới */
        inset -1px 0 0 #e5e5e5,
        inset 1px 0 0 #e5e5e5;
    }

    .sap-table tbody td {
        border-bottom: 1px solid #ededed;
        padding: 6px 12px;
        vertical-align: middle;
        height: 36px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* ===== Row hover ===== */
    .sap-table tbody tr:hover {
        background-color: #eaecee;
    }

.sap-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #0a6ed1;
    cursor: pointer;
}

.sap-radio {
    width: 16px;
    height: 16px;
    accent-color: #0a6ed1;
    cursor: pointer;
}
.sap_summary-item {
    width: 100px;
}

.sap_btn-action {
    padding: 6px 12px;
    background: none;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #0d6efd;
    font-weight: bold;
    transition: all 0.2s;
    font-family: "72-SemiboldDuplex", "72-SemiboldDuplexfull", "72", "72full", Arial, Helvetica, sans-serif;
}

    .sap_btn-action:hover:not(:disabled) {
        background: #e9ecef;
    }

    .sap_btn-action:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        color: #6c757d;
    }

.sap_btn-icon {
    width: auto;
    height: 32px;
    padding: 24px;
    background: none;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    transition: all 0.2s;
}

    .sap_btn-icon:hover:not(:disabled) {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .sap_btn-icon:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.sap_btn-icon-right {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    transition: all 0.2s;
}

    .sap_btn-icon-right:hover:not(:disabled) {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .sap_btn-icon-right:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
button.sap_btn-icon-right:disabled span {
    color: #6c757d !important;
}
.sap_btn {
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold !important;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sap_btn-primary {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-size: .875rem !important;
    font-weight: bold !important;
    border-radius: 10px;
}

    .sap_btn-primary:hover:not(:disabled) {
        background: #0b5ed7;
        border-color: #0b5ed7;
    }


.sap_btn.sap_primary {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-size: 1rem;
    font-weight: 550;
    border-radius: 10px;
}

    .sap_btn.sap_primary:hover:not(:disabled) {
        background: #0b5ed7;
        border-color: #0b5ed7;
    }

.sap_btn-white {
    color: #0064D9;
    font-size: .875rem!important;
    font-weight: 530;
    border-radius: 10px;
    border-color: white;
}

    .sap_btn-white:hover:not(:disabled) {
        background: #f5f5f5;
    }

    .sap_btn-white:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background-color:white;
    }

.sap_btn {
    background: white;
    color: #0d6efd;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
}

    .sap_btn:hover:not(:disabled) {
        background: #f5f5f5;
        border-color: #0b5ed7;
    }

.sap_btn-dropdown {
    background: white;
    color: #212529;
    border: 1px solid #dee2e6;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

    .sap_btn-dropdown:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
    }

.sap_label-text {
    font-size: 12px;
    color: #444;
    font-weight: 400;
    text-align: left;
}

.sap_select {
    width: 100%;
    height: 26px;
    padding: 4px 28px 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #d4dadf;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230070f2' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    box-shadow: 0 1px 0 0 #556b81;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}

    .sap_select:hover {
        border-color: #91C0FF;
        box-shadow: 0 1px 0 0 #2882ec;
    }

    .sap_select:focus {
        border-color: #0068ff;
        box-shadow: 0 0 0 1px rgba(0, 104, 255, 0.9);
    }

    .sap_select:disabled {
        background-color: #f5f7fb;
        border-color: #dde2eb;
        color: #999;
        box-shadow: none;
        cursor: not-allowed;
        opacity: 0.6;
    }

.address-edit-modal .sap_label {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    column-gap: 16px;
}

.address-edit-modal .sap_label-text {
    justify-self: start;
}
.sap_link {
    color: #0d6efd;
    text-decoration: none;
    font-size: 14px;
    border: none;
    background: none;
}

    .sap_link:hover {
        text-decoration: underline;
    }
.sap_summary-label {
    font-size: 14px !important;
}
.sap_summary-value {
    font-size: 14px !important;
}
.sap_customer-code {
    font-size: 14px !important;
}
.sap_value {
    font-size: 14px !important;
}
.sapMText {
    display: inline-block;
    box-sizing: border-box;
    white-space: pre-line;
    word-wrap: break-word;
    cursor: text;
    font-size: .875rem;
    font-family: "72", "72full", Arial, Helvetica, sans-serif;
    line-height: normal;
    color: #1d2d3e;
}

.sap_table-wrapper {
    /*background-color: #fff !important;*/
    /* overflow: visible !important; */
}

.sap_card-focusable {
    padding: 12px 30px 2px 30px;
    margin-top: 0.5rem;
}

    .sap_card-focusable:focus,
    .sap_card-focusable:focus-within {
        box-shadow: 0 0 0 2px #004da5;
    }
.sap-table td .sap_inputDisable {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.sap_btn_bottom {
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.87rem;
    font-weight: bold !important;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: white;
    color: #0d6efd;
    border-radius: 10px;
    height: 1.625rem;
}
    .sap_btn_bottom:hover:not(:disabled) {
        background: #f5f5f5;
        border-color: #b3b3b3;
    }

.sap_btn-primary_bottom {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-size: .875rem !important;
    font-weight: bold !important;
    border-radius: 10px;
    height: 1.625rem;
}

    .sap_btn-primary_bottom:hover:not(:disabled) {
        background: #0b5ed7;
        border-color: #0b5ed7;
    }


.sap_btn_bottom.sap_primary_bottom {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-size: 0.875rem;
    font-weight: 550;
    border-radius: 10px;
    height: 1.625rem;
}

    .sap_btn_bottom.sap_primary_bottom:hover:not(:disabled) {
        background: #0b5ed7;
        border-color: #0b5ed7;
    }
@media (max-width: 900px) {
    .sap_form-grid {
        flex-direction: column;
        gap: 8px !important;
        padding-right: 0 !important;
    }
}
/* ── Business Partner Popover ─────────────────────────── */
.sap-bp-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    min-width: 320px;
    max-width: 380px;
    font-size: 0.875rem;
    color: #333;
}

.sap-bp-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 8px;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.sap-bp-popover-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #999;
    line-height: 1;
    padding: 0 2px;
}
.sap-bp-popover-close:hover { color: #333; }

.sap-bp-popover-body {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
  gap: 8px;
}

.sap-bp-loading {
    text-align: center;
    padding: 16px 0;
    color: #999;
}

.sap-bp-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sap-bp-field-label {
    color: #556B82!important;
    font-size: 0.875rem;
    font-weight: normal!important;
}

.sap-bp-field-value {
    font-size: 0.875rem;
    color: #1D2D3E;
    font-weight: normal !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
}

.sap-bp-name {
    font-weight: normal !important;
    color: #1D2D3E;
    font-weight: normal !important;
}

.sap-bp-balance {
    text-align: right;
    font-weight: 500;
}

.sap-bp-popover-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 16px 10px;
    border-top: 1px solid #f0f0f0;
}

.sap-bp-viewmore {
    color: #0070f2;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid #fff;
    padding: 4px 8px;
    border-radius:10px;
}
.sap-bp-viewmore:hover { border: 1px solid #ccc; }

.sap-bp-divider { color: #ccc; }
.sap_input_btn--prefix {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;a
    border-left: none !important;
    border-radius: 4px 0 0 4px !important;
}
.sap_input_group:has(.sap_input_btn--prefix) .sap_input {
    padding-left: 20px !important;
}
.sap-bp-popover-arrow {
    position: absolute;
    left: -8px;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #fff; /* màu trùng với nền popup */
    filter: drop-shadow(-2px 0 1px rgba(0,0,0,0.1));
}
.sap_autocomplete_dropdown * {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}
.sap-col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    z-index: 1;
}

    .sap-col-resizer:hover,
    .sap-col-resizing .sap-col-resizer {
        background-color: #0070f2;
    }

th.sap-col-resizing {
    background-color: rgba(0, 112, 242, 0.05);
}
/* Sticky checkbox column (left) */
.sap-table th.sticky-col-left,
.sap-table td.sticky-col-left {
    position: sticky;
    left: 0;
    z-index: 1;
    background: inherit;
    box-shadow: inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;

}


.sap-table thead th.sticky-col-left {
    background: #fff;
    z-index: 2;
    box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
    inset 0 -1px 0 #bcc9d6, /* border dưới */
    inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
}

/* Sticky action column (right) */
.sap-table th.sticky-col-right,
.sap-table td.sticky-col-right {
    position: sticky;
    right: 0;
    z-index: 1;
    background: inherit;
    box-shadow: inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
}

.sap-table thead th.sticky-col-right {
    background: #fff;
    z-index: 2;
    box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
    inset 0 -1px 0 #bcc9d6, /* border dưới */
    inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
}

.curr-table tbody tr td.sticky-col-left,
.curr-table tbody tr td.sticky-col-right {
    background-color: white;
}

/* ── Sticky footer ── */
.sap-table tfoot tr td,
.sap-table tfoot tr.sap-footer-empty td {
    position: sticky;
    bottom: 0;
    z-index: 3;
    height: 32px;
    background: #fff;
    box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
    inset 0 -1px 0 #bcc9d6; /* border dưới */
}

/* Line*/
.sap-table-line {
    width: 100%;
    border-collapse: collapse;
    font-family: "72", "SAP Fiori", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: #32363a;
}

    .sap-table-line thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background-color: #fff;
        font-weight: 600;
        text-align: left;
        padding: 8px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
        inset 0 -1px 0 #bcc9d6, /* border dưới */
        inset -1px 0 0 #e5e5e5;
    }

    .sap-table-line tbody td {
        border-bottom: 1px solid #ededed;
        padding: 6px 12px;
        vertical-align: middle;
        height: 36px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

/* ===== Row hover ===== */
    .sap-table-line tbody tr:hover {
        background-color: #eaecee;
    }
    .sap-table-line td .sap_inputDisable {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }

    .sap-table-line th.sticky-col-left,
    .sap-table-line td.sticky-col-left {
        position: sticky;
        left: 0;
        z-index: 1;
        background: inherit;
        box-shadow: inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
    }


    .sap-table-line thead th.sticky-col-left {
        background: #fff;
        z-index: 2;
        box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
        inset 0 -1px 0 #bcc9d6, /* border dưới */
        inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
    }

/* Sticky action column (right) */
    .sap-table-line th.sticky-col-right,
    .sap-table-line td.sticky-col-right {
        position: sticky;
        right: 0;
        z-index: 1;
        background: inherit;
        box-shadow: inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
    }

.sap-table-line thead th.sticky-col-right {
    background: #fff;
    z-index: 2;
    box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
    inset 0 -1px 0 #bcc9d6, /* border dưới */
    inset -1px 0 0 #e5e5e5, inset 1px 0 0 #e5e5e5;
}

/* ── Sticky footer ── */
    .sap-table-line tfoot tr td,
    .sap-table tfoot tr.sap-footer-empty td {
        position: sticky;
        bottom: 0;
        z-index: 3;
        height: 32px;
        background: #fff;
        box-shadow: inset 0 1px 0 #bcc9d6, /* border trên */
        inset 0 -1px 0 #bcc9d6; /* border dưới */
    }
.modal-body .sap-table tbody td:first-child {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    white-space: nowrap;
    overflow: visible;
}


    .sap-table, .sap-table td {
        padding: .5rem;
        text-align: left;
        min-width: 160px;
        white-space: nowrap
    }

        .sap-table .sticky-col-left {
            min-width: 40px;
            width: 40px;
            text-align: center
        }
        .sap-table .sticky-col-right {
            min-width: 70px;
            width: 70px;
            text-align: center
        }
        .sap-table .sap-footer-empty {
            min-height: 50px;
            height: 50px;
            text-align: center
        }

.sap-table th,
.sap-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0;
    width: inherit;
    position: relative;
}

/*.sap-tree-table th,
.sap-tree-table td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 0;
    width: inherit;
    position: relative;
}*/
.sap-tree-table th {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 0;
    width: inherit;
    position: relative;
}
.sap-tree-table td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 0;
    width: inherit;
    position: relative;
}
.sap_input--readonly-plain {
    border: none !important;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.sap_input_btn_popover {
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    background: none;
    padding: 0 6px;
    height: 100%;
    display: flex;
    align-items: center;
    top: -2px;
}

.sap_input_btn_popover--prefix {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    border-radius: 4px 0 0 4px !important;
}
.sap_input--popover-value {
    color: #0070d2;
    margin-left: 15px;
}
