/* port from old*/
.uline {
    text-decoration: line-through;
}

.st-paid,
.st-due,
.st-partial,
.st-canceled,
.st-rejected,
.st-pending,
.st-accepted .st-Recurring,
.st-Stopped {
    text-transform: capitalize;
    color: #fff;
    padding: 4px;
    border-radius: 11px;
    font-size: 10px;
}

.st-paid,
.st-accepted {
    background-color: #5ed45e;
}

.st-due,
.st-Stopped {
    background-color: #ff6262;
}

.st-partial,
.st-pending,
.st-Recurring {
    background-color: #5da6fb;
}

.st-customer_approved {
    background-color: #845dfb;
}

.st-canceled,
.st-rejected {
    background-color: #848030;
}

.task_Progress,
.task_Due,
.task_Done {
    text-transform: capitalize;
    color: #fff;
    padding: 4px;
    border-radius: 11px;
    font-size: 10px;
}

.task_Done {
    background-color: #5ed45e;
}

.task_Due {
    background-color: #d45e7f;
}

.task_Progress {
    background-color: #848030;
}

.quantity {
    position: relative;
    padding: 2px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.quantity input {
    width: 70px;
    height: 34px;
    line-height: 1.45;
    float: left;
    display: block;
    padding: 0;
    margin-top: 3px;
    padding-left: 2px;
    border: 1px solid #eee;
}

.quantity input:focus {
    outline: 0;
}

.quantity-nav {
    float: left;
    position: relative;
    height: 42px;
}

.quantity-button {
    position: relative;
    cursor: pointer;
    border-left: 1px solid #eee;
    width: 20px;
    text-align: center;
    color: #333;
    font-size: 13px;
    font-family: "Trebuchet MS", Helvetica, sans-serif !important;
    line-height: 1.7;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.quantity-button.quantity-up {
    position: absolute;
    height: 50%;
    top: 0;
    border-bottom: 1px solid #eee;
    background: #81ffa2;
}

.quantity-button.quantity-down {
    position: absolute;
    bottom: -1px;
    height: 50%;
    background: #ff9e9e;
}

.horizontal-layout.chat-application .app-content {
    min-height: calc(100% - 65px) !important;
}

.pos_stripe tbody tr:nth-child(4n+1),
.pos_stripe tbody tr:nth-child(4n+2) {
    background-repeat: repeat-x;
    background-image: linear-gradient(45deg, #3cb4f5, #b5e1f5);
}

.tfr td {
    padding: 10px;
}

ballsWaveG {
    position: relative;
    width: 144px;
    height: 34px;
    margin: 10px auto;
}

.ballsWaveG {
    position: absolute;
    top: 0;
    background-color: rgb(4, 162, 219);
    width: 18px;
    height: 18px;
    animation-name: ballsWaveG;
    -o-animation-name: ballsWaveG;
    -ms-animation-name: ballsWaveG;
    -webkit-animation-name: ballsWaveG;
    -moz-animation-name: ballsWaveG;
    animation-duration: 1.3s;
    -o-animation-duration: 1.3s;
    -ms-animation-duration: 1.3s;
    -webkit-animation-duration: 1.3s;
    -moz-animation-duration: 1.3s;
    animation-iteration-count: infinite;
    -o-animation-iteration-count: infinite;
    -ms-animation-iteration-count: infinite;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-iteration-count: infinite;
    animation-direction: normal;
    -o-animation-direction: normal;
    -ms-animation-direction: normal;
    -webkit-animation-direction: normal;
    -moz-animation-direction: normal;
    border-radius: 9px;
    -o-border-radius: 9px;
    -ms-border-radius: 9px;
    -webkit-border-radius: 9px;
    -moz-border-radius: 9px;
}

#ballsWaveG_1 {
    left: 0;
    animation-delay: 0.52s;
    -o-animation-delay: 0.52s;
    -ms-animation-delay: 0.52s;
    -webkit-animation-delay: 0.52s;
    -moz-animation-delay: 0.52s;
}

#ballsWaveG_2 {
    left: 18px;
    animation-delay: 0.65s;
    -o-animation-delay: 0.65s;
    -ms-animation-delay: 0.65s;
    -webkit-animation-delay: 0.65s;
    -moz-animation-delay: 0.65s;
}

#ballsWaveG_3 {
    left: 36px;
    animation-delay: 0.78s;
    -o-animation-delay: 0.78s;
    -ms-animation-delay: 0.78s;
    -webkit-animation-delay: 0.78s;
    -moz-animation-delay: 0.78s;
}

#ballsWaveG_4 {
    left: 54px;
    animation-delay: 0.91s;
    -o-animation-delay: 0.91s;
    -ms-animation-delay: 0.91s;
    -webkit-animation-delay: 0.91s;
    -moz-animation-delay: 0.91s;
}

#ballsWaveG_5 {
    left: 72px;
    animation-delay: 1.04s;
    -o-animation-delay: 1.04s;
    -ms-animation-delay: 1.04s;
    -webkit-animation-delay: 1.04s;
    -moz-animation-delay: 1.04s;
}

#ballsWaveG_6 {
    left: 90px;
    animation-delay: 1.17s;
    -o-animation-delay: 1.17s;
    -ms-animation-delay: 1.17s;
    -webkit-animation-delay: 1.17s;
    -moz-animation-delay: 1.17s;
}

#ballsWaveG_7 {
    left: 108px;
    animation-delay: 1.3s;
    -o-animation-delay: 1.3s;
    -ms-animation-delay: 1.3s;
    -webkit-animation-delay: 1.3s;
    -moz-animation-delay: 1.3s;
}

#ballsWaveG_8 {
    left: 126px;
    animation-delay: 1.43s;
    -o-animation-delay: 1.43s;
    -ms-animation-delay: 1.43s;
    -webkit-animation-delay: 1.43s;
    -moz-animation-delay: 1.43s;
}

.my_stripe tbody tr:nth-child(4n+1),
.my_stripe tbody tr:nth-child(4n+2) {
    background-color: #ededed;
}

.sub_c {
    background-color: #fff !important;
}

#customer-box-result ol,
#supplier-box-result ol {
    color: #ccc;
    list-style-type: none;
}

#customer-box-result ol li,
#supplier-box-result ol li {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 5px;
}

#customer-box-result p,
#supplier-box-result p {
    font-size: 14px;
    padding-left: 14px;
    color: #555;
}

#customer-box-result span,
#supplier-box-result span {
    position: absolute;
}

.ui-front li {
    list-style: none;
    margin-left: -40px;
}

.ui-menu-item-wrapper {
    background-color: #b3d8e4;
    max-width: 60%;
    border-bottom: 1px solid #ddd;
    padding: 4px;
}

.st-sub2 {
    background-color: #5ed45e;
    padding: 4pt;
    border-radius: 2pt;
    color: #fff;
}

.st-sub3 {
    background-color: #5da6fb;
    padding: 4pt;
    border-radius: 2pt;
    color: #fff;
}

.st-sub4 {
    background-color: #fb5de8;
    padding: 4pt;
    border-radius: 2pt;
    color: #fff;
}

.has-error {
    color: #ff2a2a;
    border: 1px solid !important;
    padding: 0px;
}

.ui-helper-hidden-accessible {
    display: none;
}

.project_Progress,
.project_Pending,
.project_Finished,
.project_Waiting,
.project_Terminated {
    text-transform: capitalize;
    color: #fff;
    padding: 4px;
    border-radius: 11px;
    font-size: 10px;
}

.project_Progress {
    background-color: #4979d0;
}

.project_Finished {
    background-color: #5ed45e;
}

.project_Waiting {
    background-color: #d45e7f;
}

.project_Pending {
    background-color: #49d0b7;
}

.project_Terminated {
    background-color: #848030;
}

.timeline {
    list-style: none;
    padding: 20px 0 20px;
    position: relative;
}

.timeline:before {
    top: 0;
    bottom: 0;
    position: absolute;
    content: " ";
    width: 3px;
    background-color: #eeeeee;
    left: 50%;
    margin-left: -1.5px;
}

.timeline>li {
    margin-bottom: 20px;
    position: relative;
}

.timeline>li:before,
.timeline>li:after {
    content: " ";
    display: table;
}

.timeline>li:after {
    clear: both;
}

.timeline>li:before,
.timeline>li:after {
    content: " ";
    display: table;
}

.timeline>li:after {
    clear: both;
}

.timeline>li>.timeline-panel {
    width: 50%;
    float: left;
    border: 1px solid #d4d4d4;
    border-radius: 2px;
    padding: 20px;
    position: relative;
    -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
}

.timeline>li.timeline-inverted+li:not(.timeline-inverted),
.timeline>li:not(.timeline-inverted)+li.timeline-inverted {
    margin-top: -60px;
}

.timeline>li:not(.timeline-inverted) {
    padding-right: 90px;
}

.timeline>li.timeline-inverted {
    padding-left: 90px;
}

.timeline>li>.timeline-panel:before {
    position: absolute;
    top: 26px;
    right: -15px;
    display: inline-block;
    border-top: 15px solid transparent;
    border-left: 15px solid #ccc;
    border-right: 0 solid #ccc;
    border-bottom: 15px solid transparent;
    content: " ";
}

.timeline>li>.timeline-panel:after {
    position: absolute;
    top: 27px;
    right: -14px;
    display: inline-block;
    border-top: 14px solid transparent;
    border-left: 14px solid #fff;
    border-right: 0 solid #fff;
    border-bottom: 14px solid transparent;
    content: " ";
}

.timeline>li>.timeline-badge {
    color: #fff !important;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.4em;
    text-align: center;
    position: absolute;
    top: 16px;
    left: 50%;
    margin-left: -25px;
    background-color: #999999;
    z-index: 100;
    border-top-right-radius: 50%;
    border-top-left-radius: 50%;
    border-bottom-right-radius: 50%;
    border-bottom-left-radius: 50%;
}

.timeline>li.timeline-inverted>.timeline-panel {
    float: right;
}

.timeline>li.timeline-inverted>.timeline-panel:before {
    border-left-width: 0;
    border-right-width: 15px;
    left: -15px;
    right: auto;
}

.timeline>li.timeline-inverted>.timeline-panel:after {
    border-left-width: 0;
    border-right-width: 14px;
    left: -14px;
    right: auto;
}

.timeline-badge.primary {
    background-color: #2e6da4 !important;
}

.timeline-badge.success {
    background-color: #3f903f !important;
}

.timeline-badge.warning {
    background-color: #f0ad4e !important;
}

.timeline-badge.danger {
    background-color: #d9534f !important;
}

.timeline-badge.info {
    background-color: #5bc0de !important;
}

.timeline-title {
    margin-top: 0;
    color: inherit;
}

.timeline-body>p,
.timeline-body>ul {
    margin-bottom: 0;
}

.timeline-body>p+p {
    margin-top: 5px;
}

.sbox-result ol {
    color: #ccc;
    list-style-type: none;
}

.sbox-result p {
    font-size: 14px;
    padding-left: 14px;
    color: #555;
}

.sbox-result span {
    position: absolute;
}

/* port from old end*/
.brand-logo {
    max-height: 2.5rem;
}

.header-navbar .navbar-header .navbar-brand {
    padding: 0;
    background: #fff;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    margin-top: 5px;
}

.header-navbar .navbar-header .navbar-brand .brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@media (min-width: 992px) {
    .sidebar {
        vertical-align: top;
        width: 600px !important;
    }

    body .content-right {
        width: -webkit-calc(100% - 600px) !important;
        width: -moz-calc(100% - 600px) !important;
        width: calc(100% - 600px) !important;
        float: right;
    }

    .chat-application .chat-fixed-search {
        width: 600px !important;
    }

    .chat-application .chat-fixed-search input {
        width: 300px !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        vertical-align: top;
        width: 330px !important;
    }

    body .content-right {
        width: -webkit-calc(100% - 330px) !important;
        width: -moz-calc(100% - 330px) !important;
        width: calc(100% - 330px) !important;
        float: right;
    }

    .chat-application .chat-fixed-search {
        width: 330px !important;
    }
}

@media (max-width: 767.98px) and (max-width: 576px) {
    .sidebar {
        vertical-align: top;
        width: 280px !important;
    }

    body .content-right {
        width: -webkit-calc(100% - 280px) !important;
        width: -moz-calc(100% - 280px) !important;
        width: calc(100% - 280px) !important;
        float: right;
    }

    .chat-application .chat-fixed-search {
        width: 280px !important;
    }
}

#pos_items .row:nth-child(2n) {
    background-repeat: repeat-x;
    background-image: linear-gradient(45deg, #e0eaf0, #f3f5f6);
}

.error {
    color: #CC0000;
}

.st-Waiting,
.st-Solved,
.st-Processing {
    text-transform: capitalize;
    color: #fff;
    padding: 4px;
    border-radius: 11px;
    font-size: 10px;
}

.st-Solved {
    background-color: #5ed45e;
}

.st-Waiting {
    background-color: #5da6fb;
}

.st-Processing {
    background-color: #848030;
}

.navbar-wrapper {
    max-height: 8rem;
}

@media (min-width: 576px) {
    .navbar-expand-sm .navbar-nav .dropdown-menu {
        margin: 0;
    }
}

.dt-buttons {
    display: inline;
    margin-right: 1rem;
}

.dataTables_length {
    display: inline;
    margin-right: 1rem;
}

.dataTables_filter {
    display: inline;
    float: right;
}

.dataTables_filter input {
    width: 280px !important;
    height: 35px !important;
    padding: 4px 10px !important;
    font-size: 1rem !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    margin-left: 8px !important;
}

@media (max-width: 576px) {
    .dataTables_filter input {
        width: 200px !important;
        height: 25px !important;
        padding: 6px 12px !important;
        font-size: 0.9rem !important;
        border: 1px solid #ced4da !important;
        border-radius: 4px !important;
        margin-left: 8px !important;
    }
}

.buttons-html5 {
    padding: .2rem;
    background: #28b9ff;
}

.p-mobile {
    padding: 0.3rem !important;
}

@media (max-width: 968px) {
    .p-mobile {
        padding: 0.3rem !important;
    }

    .p-width {
        width: 145% !important;
    }
}

.form-control-sm {
    height: -webkit-calc(1.375rem + 2px);
    height: -moz-calc(1.375rem + 2px);
    height: calc(1.375rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
    border-radius: 0.21rem;
}

.dataTables_length select {
    padding-right: 15px;
}

.reverse_align {
    text-align: right;
}

.select2 {
    min-width: 14rem;
}

/* Responsive Styles for Invoice/Quote Table (.tfr) on Mobile Devices */
@media (max-width: 768px) {

    /* Hide table headers on mobile devices */
    table.tfr thead {
        display: none !important;
    }

    /* Make table, tbody, tr display as block/flex to allow wrapping */
    table.tfr,
    table.tfr tbody {
        display: block !important;
        width: 100% !important;
    }

    /* Style each inputs row (Type A) - Odd rows */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid #e3e8ee !important;
        border-bottom: none !important;
        border-top-left-radius: 8px !important;
        border-top-right-radius: 8px !important;
        padding: 12px !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
        gap: 12px 10px;
    }

    /* Style each description row (Type B) - Even rows */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n) {
        display: block !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid #e3e8ee !important;
        border-top: none !important;
        border-bottom-left-radius: 8px !important;
        border-bottom-right-radius: 8px !important;
        padding: 0 12px 12px 12px !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }

    /* Make each cell display as a form group (label + field) */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]) {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    /* Let the fields wrap naturally and shift below */
    /* Item Name: full width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(1) {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    /* Quantity: 50% width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(2) {
        flex: 1 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Rate: 50% width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(3) {
        flex: 1 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Tax (%): 50% width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(4) {
        flex: 1 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Tax Amount: 50% width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(5) {
        flex: 1 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Discount: 50% width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(6) {
        flex: 1 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Total Amount: 50% width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(7) {
        flex: 1 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Action: full width, aligned right */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(8) {
        flex: 1 1 100% !important;
        width: 100% !important;
        align-items: flex-end !important;
        margin-top: 5px;
    }

    /* Hide Action cell in first row if it does not contain the remove button */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(8):not(:has(button)) {
        display: none !important;
    }

    /* Description cell occupies full width */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td[colspan] {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td[colspan] textarea {
        width: 100% !important;
        height: 60px !important;
        border: 1px solid #ced4da !important;
        border-radius: 4px !important;
        padding: 8px 12px !important;
        box-sizing: border-box !important;
        resize: vertical;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td[colspan] br {
        display: none !important;
    }

    /* Input elements take full width of cell */
    table.tfr tbody tr td input.form-control {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Add labels above fields using ::before pseudo-elements */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan])::before {
        display: block !important;
        font-weight: 600 !important;
        font-size: 11px !important;
        color: #6c757d !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 4px !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(1)::before {
        content: "Item Name" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(2)::before {
        content: "Quantity" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(3)::before {
        content: "Rate" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(4)::before {
        content: "Tax (%)" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(5)::before {
        content: "Tax Amount" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(6)::before {
        content: "Discount" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(7)::before {
        content: "Total Amount" !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c):nth-child(2n+1) td:not([colspan]):nth-child(8):has(button)::before {
        content: "Action" !important;
    }

    /* Style read-only calculations (Tax Amount and Total Amount cells) */
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(5),
    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(7) {
        background-color: #f8f9fa !important;
        border: 1px solid #ced4da !important;
        border-radius: 4px !important;
        padding: 6px 12px !important;
        min-height: 52px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(5) {
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #495057 !important;
    }

    table.tfr tbody tr:not(.last-item-row):not(.sub_c) td:not([colspan]):nth-child(7) strong {
        font-size: 14px !important;
        color: #495057 !important;
    }

    /* Subtotal rows formatting (.sub_c) */
    table.tfr tbody tr.sub_c {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 12px !important;
        background: #f8f9fa !important;
        border: 1px solid #e3e8ee !important;
        border-top: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        gap: 10px;
    }

    table.tfr tbody tr.sub_c td {
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        flex: 1 1 auto !important;
        white-space: nowrap !important;
    }

    table.tfr tbody tr.sub_c td span,
    table.tfr tbody tr.sub_c td strong {
        display: inline !important;
        float: none !important;
        white-space: nowrap !important;
    }

    table.tfr tbody tr.sub_c td:empty {
        display: none !important;
    }

    /* Employee select and currency layout inside totals */
    table.tfr tbody tr.sub_c td[colspan="2"] {
        flex: 1 1 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px;
    }

    table.tfr tbody tr.sub_c td[colspan="2"] select {
        width: 100% !important;
        display: block !important;
    }

    /* Grand Total text align */
    table.tfr tbody tr.sub_c td[colspan="4"] {
        flex: 1 1 50% !important;
        text-align: left !important;
    }

    table.tfr tbody tr.sub_c td input#invoiceyoghtml {
        width: 120px !important;
        text-align: right !important;
    }

    /* Payment terms and Generate Quote button alignment */
    table.tfr tbody tr.sub_c td[colspan="6"] {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    table.tfr tbody tr.sub_c td input.sub-btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 16px !important;
    }

    /* Add Row Button row layout */
    table.tfr tbody tr.last-item-row {
        display: block !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        padding: 8px 0 !important;
    }

    table.tfr tbody tr.last-item-row td.add-row {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
    }

    table.tfr tbody tr.last-item-row td.add-row button {
        width: 100% !important;
        padding: 10px !important;
    }

    /* Make large success alert buttons smaller on mobile devices */
    .alert a.btn-lg {
        padding: 6px 12px !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
        border-radius: 4px !important;
        margin-top: 5px !important;
        margin-bottom: 5px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
    }

    .alert a.btn-lg span {
        font-size: 13px !important;
    }

    /* Fix buttons in card-header on mobile devices */
    .card-header .title {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        line-height: 1.5 !important;
        padding-right: 35px !important;
        /* Prevent overlap with the absolutely positioned heading-elements-toggle */
    }

    .card-header .title a,
    .card-header .card-title a {
        display: inline-block !important;
        margin: 4px 2px !important;
    }

    /* Helper class to make buttons smaller only on mobile devices */
    .btn-mobile-sm {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        border-radius: 0.2rem !important;
    }
}

/* Fix datatables layout on mobile by reverting display: block back to display: table */
@media (max-width: 500px) {
    .dataTables_wrapper table {
        display: table !important;
    }
}

/* Custom green theme for CNF/Dealer/Distributor view pages */
.bg-custom-green {
    background-color: #064e26 !important;
    color: white !important;
}
.text-custom-green {
    color: #064e26 !important;
}
.border-custom-green {
    border-color: #064e26 !important;
}
.btn-custom-green {
    background-color: #064e26 !important;
    border-color: #064e26 !important;
    color: white !important;
}
.btn-custom-green:hover, .btn-custom-green:focus, .btn-custom-green:active {
    background-color: #053c1d !important;
    border-color: #053c1d !important;
    color: white !important;
}

.btn-custom-green-no-hover {
    background-color: #064e26 !important;
    border-color: #064e26 !important;
    color: white !important;
}
.btn-custom-green-no-hover:hover, .btn-custom-green-no-hover:focus, .btn-custom-green-no-hover:active {
    background-color: #064e26 !important;
    border-color: #064e26 !important;
    color: white !important;
    text-decoration: none !important;
}

/* POS Mobile Device Product Grid Responsive Fix */
@media (max-width: 767.98px) {
    .row.match-height > .col-2,
    .row.match-height > .col-3 {
        -webkit-box-flex: 0 !important;
        -webkit-flex: 0 0 33.333333% !important;
        -moz-box-flex: 0 !important;
        -ms-flex: 0 0 33.333333% !important;
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
    
    .row.match-height .rounded {
        overflow: hidden;
        word-break: break-word;
    }

    .row.match-height small {
        word-break: break-word;
        font-size: 11px;
    }

    /* POS Mobile Device Navbar Fix */
    .header-navbar.navbar-brand-center .navbar-header,
    .header-navbar .navbar-header,
    .header-navbar .navbar-header .navbar-brand {
        position: static !important;
        transform: none !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        float: none !important;
    }

    .header-navbar .navbar-header {
        padding: 4px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 50px !important;
        width: 100% !important;
    }

    .header-navbar .navbar-header .navbar-nav {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-navbar .navbar-header .navbar-nav .nav-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    .header-navbar .navbar-header .navbar-brand {
        margin: 0 auto !important;
        padding: 0 !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        background: #ffffff !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .header-navbar .navbar-header .navbar-brand .brand-logo {
        width: 32px !important;
        height: 32px !important;
        object-fit: contain !important;
    }

    .header-navbar .navbar-header .nav-link {
        padding: 4px 6px !important;
        display: flex !important;
        align-items: center !important;
        color: #ffffff !important;
    }

    .header-navbar .navbar-header i {
        font-size: 1.4rem !important;
        line-height: 1 !important;
    }

    .header-navbar {
        min-height: 50px !important;
        position: relative !important;
        overflow: visible !important;
        z-index: 1000 !important;
    }

    /* Remove top white space above navbar on mobile */
    html body.fixed-navbar,
    body.fixed-navbar,
    html.loaded body.fixed-navbar {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}