/* Table height follows row count (no tall empty box after load) */
#billsArea:not(.qa-bills-loading) #contentdiv.max-width-900,
#billsArea:not(.qa-bills-loading) .table-responsive.max-width-900,
#billsArea:not(.qa-bills-loading) #contentdiv {
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    background: transparent !important;
}

#billsArea:not(.qa-bills-loading) .qa-bills-table-loader-wrap {
    display: none !important;
}

#billsTable.rtable {
    margin-bottom: 0 !important;
}

#billsArea #contentdiv .mCSB_container,
#billsArea #contentdiv .mCustomScrollBox {
    min-height: 0 !important;
    height: auto !important;
}

/* Hide Bill Amount column — admin uses Payable Outstanding only */
#billsTable th.col-amt,
#billsTable td.col-amt {
    display: none !important;
}

/* Download PDF — colored icon, not clickable */
#billsTable td.col-pdf a {
    pointer-events: none !important;
    cursor: default !important;
    text-decoration: none !important;
    display: inline-block;
    vertical-align: middle;
}

#billsTable td.col-pdf .iconImg.pdf {
    opacity: 1 !important;
    filter: hue-rotate(-18deg) saturate(2.2) brightness(0.95);
    cursor: default !important;
    pointer-events: none !important;
}

/* Hide meter legend (Disconnected / Connected) */
#tbMeterStatusHint,
#tbMeterStatusHintInquiry,
#billsArea .qa-meter-legend,
.qa-meter-legend-inquiry {
    display: none !important;
}

/* Bill row checkbox — LTR box inside RTL page; no FontAwesome glyph */
#billsTable th.col-check,
#billsTable td.col-check {
    position: relative;
    text-align: center;
    vertical-align: middle;
    direction: ltr;
    unicode-bidi: isolate;
}

#billsTable th.col-check input[type='checkbox'],
#billsTable td.col-check input[type='checkbox'] {
    position: absolute;
    left: 50%;
    top: 50%;
    opacity: 0;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    cursor: pointer;
    z-index: 3;
}

#billsTable th.col-check label,
#billsTable td.col-check label {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    vertical-align: middle;
    direction: ltr;
    unicode-bidi: isolate;
}

#billsTable th.col-check label .sr-only,
#billsTable td.col-check label .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#billsTable th.col-check label:before,
#billsTable td.col-check label:before {
    content: '' !important;
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    border: 2px solid #bdbdbd !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    float: none !important;
}

#billsTable th.col-check input[type='checkbox']:checked + label:before,
#billsTable td.col-check input[type='checkbox']:checked + label:before,
#billsTable th.col-check.checkedCustom label:before,
#billsTable td.col-check.checkedCustom label:before {
    background: #7bc143 !important;
    border-color: #6aad38 !important;
}

#billsTable th.col-check input[type='checkbox']:checked + label:after,
#billsTable td.col-check input[type='checkbox']:checked + label:after,
#billsTable th.col-check.checkedCustom label:after,
#billsTable td.col-check.checkedCustom label:after {
    content: '' !important;
    position: absolute !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    inset: 0 !important;
    width: 6px !important;
    height: 11px !important;
    margin: auto !important;
    padding: 0 !important;
    border: solid #fff !important;
    border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg) translate(0, -1px) !important;
    font: 0/0 sans-serif !important;
    font-family: inherit !important;
    background: transparent !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
}

html.qa-lang-ar #billsTable .col-check input[type='checkbox']:checked + label:after,
html.qa-lang-ar #billsTable .col-check.checkedCustom label:after,
html[dir='rtl'] #billsTable .col-check input[type='checkbox']:checked + label:after,
html[dir='rtl'] #billsTable .col-check.checkedCustom label:after {
    left: auto !important;
    right: auto !important;
    inset: 0 !important;
    transform: rotate(45deg) translate(0, -1px) !important;
}
