/**
 * QuickBooks Online–style list & admin pages (theme-aware).
 * List pages: body.qbo-list-ui section.content
 * Dashboard tables: body.ncs-home-page .dash-shell.qb-list-surface
 */
:root {
    --qb-accent: var(--hms-primary, var(--theme-header-from, #0d9488));
    --qb-accent-dark: var(--hms-primary-dark, var(--theme-header-to, #0f766e));
    --qb-accent-soft: color-mix(in srgb, var(--qb-accent) 12%, #ffffff);
    --qb-ink: #000000;
    --qb-heading: #000000;
    --qb-muted: #6b6c72;
    --qb-border: #d4d7dc;
    --qb-border-soft: #eceef1;
    --qb-bg: #f4f5f8;
    --qb-white: #ffffff;
    --qb-row-hover: color-mix(in srgb, var(--qb-accent) 6%, #ffffff);
}

/* Page canvas */
body.qbo-list-ui #scrollable-container {
    background: var(--qb-bg);
    overflow-x: hidden;
}

body.qbo-list-ui section.content {
    padding: 0 18px 40px;
    margin: 0;
    background: transparent;
    min-height: 0;
    max-width: 100%;
}

body.qbo-list-ui section.content-header {
    background: transparent;
    padding: 14px 18px 6px;
    margin: 0;
    border: none;
}

body.qbo-list-ui section.content-header h1 {
    margin: 0;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--qb-heading) !important;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

body.qbo-list-ui section.content-header h1 small {
    display: block;
    margin-top: 3px;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

body.qbo-list-ui section.content-header h1.tw-text-black,
body.qbo-list-ui section.content-header h1 .tw-text-black {
    color: var(--qb-heading) !important;
}

body.qbo-list-ui section.content-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 6px 0 0;
    font-size: 12px;
}

body.qbo-list-ui .qb-page {
    margin-top: 0;
}

/* Cards (filters + list widgets) */
body.qbo-list-ui section.content .tw-ring-gray-200,
body.qbo-list-ui section.content .box.box-solid,
body.qbo-list-ui section.content .box-primary,
body.ncs-home-page .dash-shell.qb-list-surface .tw-ring-gray-200,
body.ncs-home-page .dash-shell.qb-list-surface .box.box-solid,
body.ncs-home-page .dash-shell.qb-list-surface .box-primary {
    background: var(--qb-white) !important;
    border: 1px solid var(--qb-border) !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 2px rgba(57, 58, 61, 0.05) !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.qbo-list-ui section.content .tw-mb-4.tw-ring-gray-200,
body.ncs-home-page .dash-shell.qb-list-surface .tw-mb-4.tw-ring-gray-200 {
    margin-bottom: 12px !important;
}

body.qbo-list-ui section.content .box-header,
body.ncs-home-page .dash-shell.qb-list-surface .box-header {
    border-bottom: 1px solid var(--qb-border-soft);
    padding: 10px 14px !important;
    background: transparent;
}

body.qbo-list-ui section.content .box-header .box-title,
body.qbo-list-ui section.content .box-header .box-title a,
body.ncs-home-page .dash-shell.qb-list-surface .box-header .box-title,
body.ncs-home-page .dash-shell.qb-list-surface .box-header .box-title a,
body.ncs-home-page .dash-shell.qb-list-surface h3.tw-font-bold {
    font-size: 14px;
    font-weight: 700 !important;
    color: var(--qb-heading) !important;
}

body.qbo-list-ui section.content .box-body,
body.ncs-home-page .dash-shell.qb-list-surface .box-body {
    padding: 14px 16px;
}

body.qbo-list-ui section.content .tw-py-2.tw-align-middle,
body.ncs-home-page .dash-shell.qb-list-surface .tw-py-2.tw-align-middle {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.qbo-list-ui section.content .sm\:tw-p-3,
body.qbo-list-ui section.content .sm\:tw-p-5,
body.ncs-home-page .dash-shell.qb-list-surface .sm\:tw-p-3,
body.ncs-home-page .dash-shell.qb-list-surface .sm\:tw-p-5 {
    padding: 14px 16px !important;
}

body.qbo-list-ui section.content .box,
body.ncs-home-page .dash-shell.qb-list-surface .box {
    border-radius: 6px;
    border: 1px solid var(--qb-border);
    box-shadow: 0 1px 2px rgba(57, 58, 61, 0.05);
}

body.qbo-list-ui section.content .box.box-primary > .box-header,
body.ncs-home-page .dash-shell.qb-list-surface .box.box-primary > .box-header {
    color: var(--qb-ink);
    background: var(--qb-white);
    border-bottom: 1px solid var(--qb-border-soft);
}

/*
 * Filter panel layout
 * - Flat Bootstrap cols (All Sales, etc.): auto-fit grid so 2–8 fields fill the row
 * - BI / report rows (.bi-filter-row): keep their own full-width flex layout
 *   (do NOT force a 4-col grid on the parent — that crushed Cashier Performance etc.)
 */
body.qbo-list-ui section.content #collapseFilter .box-body,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body {
    padding: 12px 16px 16px;
}

/* BI / nested filter rows — full width, original alignment */
body.qbo-list-ui section.content #collapseFilter .box-body:has(> .bi-filter-row),
body.qbo-list-ui section.content #collapseFilter .box-body:has(> .row),
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body:has(> .bi-filter-row),
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body:has(> .row) {
    display: block !important;
}

body.qbo-list-ui section.content #collapseFilter .box-body > .bi-filter-row,
body.qbo-list-ui section.content #collapseFilter .box-body > .row,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body > .bi-filter-row,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body > .row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

/* Flat col-* filters only (no bi-filter-row / .row wrapper) */
body.qbo-list-ui section.content #collapseFilter .box-body:not(:has(> .bi-filter-row)):not(:has(> .row)),
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body:not(:has(> .bi-filter-row)):not(:has(> .row)) {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 16px;
    align-items: end;
}

/*
 * AdminLTE clearfix pseudos (.box-body:before/:after { display:table }) become
 * real grid items and steal the first (and last) cell — empty gap above Date Range.
 */
body.qbo-list-ui section.content #collapseFilter .box-body::before,
body.qbo-list-ui section.content #collapseFilter .box-body::after,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body::before,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body::after {
    content: none !important;
    display: none !important;
}

body.qbo-list-ui section.content #collapseFilter .box-body > [class*="col-"],
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    min-width: 0;
}

body.qbo-list-ui section.content #collapseFilter .box-body .form-group,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body .form-group {
    margin-bottom: 0;
}

body.qbo-list-ui section.content #collapseFilter .box-body .form-control,
body.qbo-list-ui section.content #collapseFilter .box-body .select2-container,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body .form-control,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body .select2-container {
    width: 100% !important;
}

/* Checkbox filters (e.g. Subscriptions) — same cell height as dropdowns */
body.qbo-list-ui section.content #collapseFilter .box-body .filter-check-field,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body .filter-check-field {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding-top: 22px; /* roughly label + gap so control lines up with inputs */
}

body.qbo-list-ui section.content #collapseFilter .box-body .filter-check-field .checkbox,
body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body .filter-check-field .checkbox {
    margin: 0;
}

@media (max-width: 575px) {
    body.qbo-list-ui section.content #collapseFilter .box-body:not(:has(> .bi-filter-row)):not(:has(> .row)),
    body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body:not(:has(> .bi-filter-row)):not(:has(> .row)) {
        grid-template-columns: 1fr;
    }

    body.qbo-list-ui section.content #collapseFilter .box-body .filter-check-field,
    body.ncs-home-page .dash-shell.qb-list-surface #collapseFilter .box-body .filter-check-field {
        padding-top: 0;
        min-height: 0;
    }
}

/* Forms & filters — bold black labels (override skin-green etc.) */
body.qbo-list-ui section.content .form-group label,
body.qbo-list-ui section.content label.control-label,
body.qbo-list-ui section.content #collapseFilter label,
body.ncs-home-page .dash-shell.qb-list-surface .form-group label,
body.ncs-home-page .dash-shell.qb-list-surface label.control-label {
    font-size: 13px;
    font-weight: 700 !important;
    color: var(--qb-heading) !important;
    line-height: 1.35;
}

body.qbo-list-ui section.content .form-control,
body.ncs-home-page .dash-shell.qb-list-surface .form-control {
    border: 1px solid var(--qb-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    min-height: 36px;
    font-size: 13px;
    color: var(--qb-ink);
}

body.qbo-list-ui section.content .form-control:focus,
body.ncs-home-page .dash-shell.qb-list-surface .form-control:focus {
    border-color: var(--qb-accent) !important;
    outline: none;
}

body.qbo-list-ui section.content .select2-container--default .select2-selection--single,
body.ncs-home-page .dash-shell.qb-list-surface .select2-container--default .select2-selection--single {
    border-color: var(--qb-border) !important;
    border-radius: 4px !important;
    min-height: 36px;
}

body.qbo-list-ui section.content .select2-container--default.select2-container--focus .select2-selection--single,
body.qbo-list-ui section.content .select2-container--default.select2-container--open .select2-selection--single,
body.ncs-home-page .dash-shell.qb-list-surface .select2-container--default.select2-container--focus .select2-selection--single,
body.ncs-home-page .dash-shell.qb-list-surface .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--qb-accent) !important;
}

/* Tables */
body.qbo-list-ui section.content .table-responsive,
body.ncs-home-page .dash-shell.qb-list-surface .table-responsive {
    width: 100%;
    max-width: 100%;
    border: none;
    margin-bottom: 0;
}

body.qbo-list-ui section.content .table-responsive:not(.dataTables_scrollBody):not(.dataTables_scrollFoot),
body.ncs-home-page .dash-shell.qb-list-surface .table-responsive:not(.dataTables_scrollBody):not(.dataTables_scrollFoot) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Unclip Actions only while the menu is open — never leave overflow visible
 * on the table wrapper, or Drafts/Purchases lose their horizontal scrollbar. */
body.qbo-list-ui section.content .table-responsive.dt-dropdown-open,
body.ncs-home-page .dash-shell.qb-list-surface .table-responsive.dt-dropdown-open {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

body.qbo-list-ui section.content table.table,
body.ncs-home-page .dash-shell.qb-list-surface table.table {
    border-collapse: collapse;
    margin-bottom: 0 !important;
    background: var(--qb-white);
    width: 100%;
}

body.qbo-list-ui section.content table.table.table-bordered,
body.ncs-home-page .dash-shell.qb-list-surface table.table.table-bordered {
    border: none !important;
}

body.qbo-list-ui section.content table.table > thead > tr > th,
body.ncs-home-page .dash-shell.qb-list-surface table.table > thead > tr > th {
    background: #fafbfc;
    border-bottom: 1px solid var(--qb-border) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    color: var(--qb-heading) !important;
    font-size: 12px;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 10px 14px;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.25;
}

/*
 * Financial / accounting statement headers use a dark bar.
 * List-UI forces black heading color above — that makes Particulars/Amount invisible
 * and causes a black→white flash once later report CSS / DataTables class kicks in.
 * Keep white-on-dark from the first paint (except light horizontal panel headers).
 */
body.qbo-list-ui section.content table.table.accounting-statement-table:not(.horizontal-report-panel-table) > thead > tr > th,
body.qbo-list-ui section.content table.table.accounting-statement-table:not(.horizontal-report-panel-table) > thead > tr.col-header > th,
body.qbo-list-ui section.content table.table.bi-report-table > thead > tr > th,
body.qbo-list-ui section.content .accounting-statement-table:not(.horizontal-report-panel-table).dataTable thead > tr > th,
body.qbo-list-ui section.content .bi-report-table.dataTable thead > tr > th,
body.qbo-list-ui section.content .dataTables_scrollHead table.accounting-statement-table thead > tr > th,
body.qbo-list-ui section.content .dataTables_scrollHead table.bi-report-table thead > tr > th,
body.ncs-home-page .dash-shell.qb-list-surface table.table.accounting-statement-table:not(.horizontal-report-panel-table) > thead > tr > th,
body.ncs-home-page .dash-shell.qb-list-surface table.table.bi-report-table > thead > tr > th {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #334155 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

body.qbo-list-ui section.content table.table.accounting-statement-table:not(.horizontal-report-panel-table) > thead > tr > th a,
body.qbo-list-ui section.content .accounting-statement-table:not(.horizontal-report-panel-table).dataTable thead > tr > th a,
body.qbo-list-ui section.content .bi-report-table.dataTable thead > tr > th a,
body.qbo-list-ui section.content .dataTables_scrollHead table.accounting-statement-table thead > tr > th a,
body.qbo-list-ui section.content .dataTables_scrollHead table.bi-report-table thead > tr > th a {
    color: #ffffff !important;
}

body.qbo-list-ui section.content table.table.horizontal-report-panel-table > thead > tr > th,
body.qbo-list-ui section.content table.table.horizontal-report-panel-table > thead > tr.col-header > th {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

/* Keep DataTables header labels on one line (scroll horizontally instead of wrapping) */
body.qbo-list-ui section.content table.dataTable thead > tr > th,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable thead > tr > th,
body.qbo-list-ui section.content .dataTables_scrollHead table thead > tr > th,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table thead > tr > th {
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/*
 * DataTables sort icons are absolute (::after at right:8px).
 * Reserve right padding so header text never runs under the arrows.
 */
body.qbo-list-ui section.content table.dataTable thead > tr > th.sorting,
body.qbo-list-ui section.content table.dataTable thead > tr > th.sorting_asc,
body.qbo-list-ui section.content table.dataTable thead > tr > th.sorting_desc,
body.qbo-list-ui section.content table.dataTable thead > tr > th.sorting_asc_disabled,
body.qbo-list-ui section.content table.dataTable thead > tr > th.sorting_desc_disabled,
body.qbo-list-ui section.content .dataTables_scrollHead table thead > tr > th.sorting,
body.qbo-list-ui section.content .dataTables_scrollHead table thead > tr > th.sorting_asc,
body.qbo-list-ui section.content .dataTables_scrollHead table thead > tr > th.sorting_desc,
body.qbo-list-ui section.content .dataTables_scrollHead table thead > tr > th.sorting_asc_disabled,
body.qbo-list-ui section.content .dataTables_scrollHead table thead > tr > th.sorting_desc_disabled,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable thead > tr > th.sorting,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable thead > tr > th.sorting_asc,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable thead > tr > th.sorting_desc,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable thead > tr > th.sorting_asc_disabled,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable thead > tr > th.sorting_desc_disabled,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table thead > tr > th.sorting,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table thead > tr > th.sorting_asc,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table thead > tr > th.sorting_desc,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table thead > tr > th.sorting_asc_disabled,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table thead > tr > th.sorting_desc_disabled {
    padding-right: 28px !important;
    background-image: none !important; /* prefer ::after glyphicons, avoid double icons */
}

/* Let columns grow to fit header text + sort icon; scrollX handles overflow */
body.qbo-list-ui section.content .dataTables_scrollHead table.dataTable,
body.qbo-list-ui section.content .dataTables_scrollBody table.dataTable,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollHead table.dataTable,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_scrollBody table.dataTable {
    table-layout: auto !important;
}

body.qbo-list-ui section.content table.table > tbody > tr > td,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr > td {
    border-bottom: 1px solid var(--qb-border-soft) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--qb-ink) !important;
    vertical-align: middle;
}

body.qbo-list-ui section.content table.table.ajax_view > tbody > tr > td,
body.qbo-list-ui section.content table.table.dataTable > tbody > tr > td,
body.qbo-list-ui section.content table.dataTable.table > tbody > tr > td,
body.ncs-home-page .dash-shell.qb-list-surface table.table.ajax_view > tbody > tr > td,
body.ncs-home-page .dash-shell.qb-list-surface table.table.dataTable > tbody > tr > td,
body.ncs-home-page .dash-shell.qb-list-surface table.dataTable.table > tbody > tr > td {
    white-space: nowrap;
}

body.qbo-list-ui section.content table.table > tbody > tr > td.word-wrap,
body.qbo-list-ui section.content table.table > tbody > tr > td.contact-col-address,
body.qbo-list-ui section.content table.table > tbody > tr > td.allow-wrap,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr > td.word-wrap,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr > td.contact-col-address,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr > td.allow-wrap {
    white-space: normal;
    word-break: break-word;
    max-width: 18rem;
}

body.qbo-list-ui section.content table.table > tbody > tr:hover,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr:hover {
    background: var(--qb-row-hover);
}

body.qbo-list-ui section.content table.table.table-striped > tbody > tr:nth-of-type(odd),
body.ncs-home-page .dash-shell.qb-list-surface table.table.table-striped > tbody > tr:nth-of-type(odd) {
    background: transparent;
}

body.qbo-list-ui section.content table.table tfoot tr td,
body.qbo-list-ui section.content table.table tfoot tr th,
body.qbo-list-ui section.content table.table tr.footer-total td,
body.ncs-home-page .dash-shell.qb-list-surface table.table tfoot tr td,
body.ncs-home-page .dash-shell.qb-list-surface table.table tfoot tr th,
body.ncs-home-page .dash-shell.qb-list-surface table.table tr.footer-total td {
    font-weight: 700;
    background: var(--qb-white) !important;
    border-top: 2px solid var(--qb-border) !important;
    white-space: nowrap;
    color: var(--qb-ink) !important;
}

body.qbo-list-ui section.content td.amount,
body.qbo-list-ui section.content th.amount,
body.ncs-home-page .dash-shell.qb-list-surface td.amount,
body.ncs-home-page .dash-shell.qb-list-surface th.amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.qbo-list-ui section.content table.table.dataTable,
body.ncs-home-page .dash-shell.qb-list-surface table.table.dataTable {
    width: 100% !important;
}

body.qbo-list-ui section.content table.table.dataTable td.dataTables_empty,
body.ncs-home-page .dash-shell.qb-list-surface table.table.dataTable td.dataTables_empty {
    text-align: center !important;
}

/* DataTables — lists without scrollX still need a horizontal bar on the wrapper.
 * scrollX tables keep a single bar on .dataTables_scrollBody (not under pagination). */
body.qbo-list-ui section.content .dataTables_wrapper,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible;
}

body.qbo-list-ui section.content .dataTables_wrapper:has(.dataTables_scroll),
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper:has(.dataTables_scroll) {
    overflow-x: hidden !important;
}

body.qbo-list-ui section.content .dataTables_wrapper.dt-dropdown-open,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper.dt-dropdown-open {
    overflow: visible !important;
}

/*
 * Business Locations: many columns + Action buttons were clipped/squeezed
 * by overflow + fixed layouts, so Edit / Settings / Deactivate disappeared.
 * Horizontal scroll stays on .dataTables_scrollBody only (no second bar under pagination).
 */
body.qbo-list-ui section.content #business_location_table_wrapper,
body.qbo-list-ui section.content #business_location_table {
    min-width: 0;
}
body.qbo-list-ui section.content #business_location_table.dataTable,
body.qbo-list-ui section.content .dataTables_scrollBody #business_location_table {
    table-layout: auto !important;
}
body.qbo-list-ui section.content #business_location_table th.business-location-actions,
body.qbo-list-ui section.content #business_location_table td.business-location-actions,
body.qbo-list-ui section.content #business_location_table th:last-child,
body.qbo-list-ui section.content #business_location_table td:last-child {
    white-space: nowrap !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    vertical-align: middle !important;
}
body.qbo-list-ui section.content #business_location_table td.business-location-actions .tw-dw-btn,
body.qbo-list-ui section.content #business_location_table td:last-child .tw-dw-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 2px 4px 2px 0 !important;
    padding: 5px 10px !important;
    min-height: 30px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 6px !important;
    background: #fff !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}
body.qbo-list-ui section.content #business_location_table td:last-child .tw-dw-btn-primary {
    color: #2563eb !important;
    border-color: #2563eb !important;
}
body.qbo-list-ui section.content #business_location_table td:last-child .tw-dw-btn-accent {
    color: #0f766e !important;
    border-color: #0f766e !important;
}
body.qbo-list-ui section.content #business_location_table td:last-child .tw-dw-btn-error {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scroll,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scroll {
    width: 100% !important;
    clear: both;
    overflow: hidden !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollHead,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollHead {
    overflow: hidden !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollBody,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100% !important;
    scrollbar-gutter: stable;
}

/*
 * Actions dropdown lives inside DataTables scroll area. Our overflow:!important
 * rules beat app.css .of-visible and clip View/Edit/Print menus.
 * When app.js adds .of-visible (or .dt-dropdown-open), let the menu escape.
 */
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollBody.of-visible,
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollBody.dt-dropdown-open,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollBody.of-visible,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollBody.dt-dropdown-open {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scroll:has(.of-visible),
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scroll:has(.dt-dropdown-open),
body.qbo-list-ui section.content .dataTables_wrapper:has(.of-visible),
body.qbo-list-ui section.content .dataTables_wrapper:has(.dt-dropdown-open),
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scroll:has(.of-visible),
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scroll:has(.dt-dropdown-open),
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper:has(.of-visible),
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper:has(.dt-dropdown-open) {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .btn-group.open,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .btn-group.open {
    position: relative;
    z-index: 1060;
}

body.qbo-list-ui section.content .dataTables_wrapper .btn-group .dropdown-menu,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .btn-group .dropdown-menu {
    z-index: 1061;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    min-width: 220px;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollFoot,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollFoot {
    overflow: hidden !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollHead,
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollBody,
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollFoot,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollHead,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollBody,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollFoot {
    width: 100% !important;
}

/* Fill the card; never leave a DataTables pixel-width cutoff in the middle of the table */
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollHeadInner,
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollFootInner,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollHeadInner,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollFootInner {
    box-sizing: border-box;
    min-width: 100% !important;
    width: auto !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollHeadInner > table,
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollBody > table,
body.qbo-list-ui section.content .dataTables_wrapper .dataTables_scrollFootInner > table,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollHeadInner > table,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollBody > table,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .dataTables_scrollFootInner > table {
    width: 100% !important;
    min-width: 100%;
    table-layout: auto !important;
}

body.qbo-list-ui section.content .dataTables_wrapper:not(:has(.dataTables_scroll)) table.table.ajax_view,
body.qbo-list-ui section.content .dataTables_wrapper:not(:has(.dataTables_scroll)) table.table.dataTable,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper:not(:has(.dataTables_scroll)) table.table.ajax_view,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper:not(:has(.dataTables_scroll)) table.table.dataTable {
    width: 100% !important;
    min-width: 100%;
}

body.qbo-list-ui section.content .dataTables_length,
body.qbo-list-ui section.content .dataTables_filter,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_length,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_filter {
    margin-bottom: 10px;
}

body.qbo-list-ui section.content .dataTables_filter input,
body.qbo-list-ui section.content .dataTables_length select,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_filter input,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_length select {
    border: 1px solid var(--qb-border);
    border-radius: 4px;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 13px;
}

body.qbo-list-ui section.content .dataTables_info,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_info {
    font-size: 12px;
    color: var(--qb-muted);
    padding-top: 10px;
    clear: both;
}

body.qbo-list-ui section.content .dataTables_paginate,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_paginate {
    clear: both;
    padding-top: 8px;
}

body.qbo-list-ui section.content .dataTables_paginate .paginate_button,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_paginate .paginate_button {
    border-radius: 4px !important;
    margin: 0 1px;
}

body.qbo-list-ui section.content .dataTables_paginate .paginate_button.current,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_paginate .paginate_button.current {
    background: var(--qb-accent-soft) !important;
    border-color: color-mix(in srgb, var(--qb-accent) 35%, #ffffff) !important;
    color: var(--qb-accent-dark) !important;
}

body.qbo-list-ui section.content .dataTables_processing,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_processing {
    z-index: 5;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid var(--qb-border);
    border-radius: 4px;
    color: var(--qb-ink);
    font-weight: 600;
}

body.qbo-list-ui section.content .dt-buttons,
body.ncs-home-page .dash-shell.qb-list-surface .dt-buttons {
    margin-bottom: 8px;
}

body.qbo-list-ui section.content .btn-primary,
body.ncs-home-page .dash-shell.qb-list-surface .btn-primary {
    background-color: var(--qb-accent) !important;
    border-color: var(--qb-accent) !important;
}

body.qbo-list-ui section.content .btn-primary:hover,
body.qbo-list-ui section.content .btn-primary:focus,
body.ncs-home-page .dash-shell.qb-list-surface .btn-primary:hover,
body.ncs-home-page .dash-shell.qb-list-surface .btn-primary:focus {
    background-color: var(--qb-accent-dark) !important;
    border-color: var(--qb-accent-dark) !important;
}

body.qbo-list-ui section.content .box-tools .tw-bg-gradient-to-r,
body.qbo-list-ui section.content .box-tools .tw-dw-btn-primary:not(.tw-dw-btn-outline),
body.ncs-home-page .dash-shell.qb-list-surface .box-tools .tw-bg-gradient-to-r,
body.ncs-home-page .dash-shell.qb-list-surface .box-tools .tw-dw-btn-primary:not(.tw-dw-btn-outline) {
    background: var(--qb-accent) !important;
    background-image: linear-gradient(to right, var(--qb-accent), var(--qb-accent-dark)) !important;
    border-radius: 4px !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px !important;
    color: #fff !important;
    border-color: transparent !important;
}

body.qbo-list-ui section.content a.text-primary,
body.qbo-list-ui section.content .action-link,
body.ncs-home-page .dash-shell.qb-list-surface a.text-primary,
body.ncs-home-page .dash-shell.qb-list-surface .action-link {
    color: var(--qb-accent);
}

body.qbo-list-ui section.content.contact-list-section {
    padding-left: 14px;
    padding-right: 14px;
}

body.qbo-list-ui section.content.contact-list-section tr.footer-total td {
    background-color: var(--qb-white) !important;
}

@media (max-width: 767px) {
    body.qbo-list-ui section.content-header {
        padding: 12px 10px 4px;
    }

    body.qbo-list-ui section.content {
        padding: 0 10px 32px;
    }

    body.qbo-list-ui section.content-header h1 {
        font-size: 20px !important;
    }

    body.qbo-list-ui section.content .dataTables_length,
    body.qbo-list-ui section.content .dataTables_filter,
    body.ncs-home-page .dash-shell.qb-list-surface .dataTables_length,
    body.ncs-home-page .dash-shell.qb-list-surface .dataTables_filter {
        float: none !important;
        text-align: left !important;
        width: 100%;
    }

    body.qbo-list-ui section.content .dataTables_filter input,
    body.ncs-home-page .dash-shell.qb-list-surface .dataTables_filter input {
        width: 100% !important;
        max-width: 100%;
        margin-left: 0 !important;
        display: block;
        margin-top: 6px;
    }

    body.qbo-list-ui section.content .box-header,
    body.ncs-home-page .dash-shell.qb-list-surface .box-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    body.qbo-list-ui section.content .box-tools,
    body.ncs-home-page .dash-shell.qb-list-surface .box-tools {
        float: none !important;
        width: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.qbo-list-ui section.content table.table > tbody > tr,
    body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr {
        transition: background-color 0.12s ease;
    }
}

/*
 * Product-list dataview: no frozen last-column overlay. Tables scroll as a
 * normal grid (same as /products) so a shaded strip never cuts through columns.
 */
body.qbo-list-ui section.content table.table.ajax_view,
body.qbo-list-ui section.content table.table.dataTable,
body.ncs-home-page .dash-shell.qb-list-surface table.table.ajax_view,
body.ncs-home-page .dash-shell.qb-list-surface table.table.dataTable {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .btn-group > .dropdown-toggle,
body.qbo-list-ui section.content table .btn-group > .dropdown-toggle,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .btn-group > .dropdown-toggle {
    color: #0f172a !important;
    background: #fff !important;
    border: 1px solid #64748b !important;
    min-width: 92px;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

body.qbo-list-ui section.content .dataTables_wrapper .btn-group .dropdown-menu.ncs-actions-menu,
body.qbo-list-ui section.content .dataTables_wrapper .ncs-actions-menu,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .ncs-actions-menu {
    max-height: min(70vh, 420px);
    overflow-y: auto;
    min-width: 220px;
    padding-top: 4px;
    padding-bottom: 6px;
}

body.qbo-list-ui section.content .ncs-actions-heading,
body.ncs-home-page .dash-shell.qb-list-surface .ncs-actions-heading {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em;
    color: #64748b !important;
    padding: 8px 14px 4px !important;
    white-space: nowrap;
}

body.qbo-list-ui section.content .dataTables_wrapper .btn-group.open .dropdown-menu,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .btn-group.open .dropdown-menu {
    display: block;
}

body.qbo-list-ui section.content table.table > tbody > tr.dt-action-row-open,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr.dt-action-row-open {
    position: relative;
    z-index: 40;
}

body.qbo-list-ui section.content table.table > tbody > tr.dt-action-row-open > td:last-child,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody > tr.dt-action-row-open > td:last-child {
    z-index: 50 !important;
    overflow: visible !important;
}

body.qbo-list-ui section.content table.table > tbody:has(.dt-action-row-open) > tr:not(.dt-action-row-open) > td:last-child,
body.ncs-home-page .dash-shell.qb-list-surface table.table > tbody:has(.dt-action-row-open) > tr:not(.dt-action-row-open) > td:last-child {
    z-index: 1 !important;
}

body.qbo-list-ui section.content .dataTables_wrapper .btn-group.open,
body.ncs-home-page .dash-shell.qb-list-surface .dataTables_wrapper .btn-group.open {
    z-index: 60;
}

#scrollable-container.dt-dropdown-open {
    overflow: visible !important;
}
