/* Brandzone: ink, paper and the existing logo's red. Shared presentation only. */
:root {
  color-scheme: light;
  --bz-brand: #b42335;
  --bz-brand-hover: #941b2a;
  --bz-brand-soft: #fdf0f2;
  --bz-ink: #202b3c;
  --bz-muted: #66758a;
  --bz-canvas: #f4f6f9;
  --bz-surface: #ffffff;
  --bz-subtle: #f8fafc;
  --bz-line: #e2e7ef;
  --bz-success: #197354;
  --bz-danger: #b42335;
  --bz-warning: #946200;
  --bz-info: #28658c;
  --bz-radius: 12px;
  --bz-shadow: 0 3px 16px rgb(32 43 60 / 4%);
  --bz-focus: 0 0 0 3px rgb(180 35 53 / 16%);
  --bz-raised: #edf1f6;
  --bz-table-head: #f0f3f8;
  --bz-heading: #4d5d73;
  --bz-row-stripe: #fafbfd;
  --bz-row-hover: #f1f5fa;
  --bz-control-line: #cfd7e3;
  --bz-brand-line: #f2cdd2;
  --bz-loading-mask: rgba(255,255,255,.92);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bz-brand: #f18a9a;
  --bz-brand-hover: #ffafba;
  --bz-brand-soft: #39242e;
  --bz-ink: #e4eaf3;
  --bz-muted: #a4b1c4;
  --bz-canvas: #101620;
  --bz-surface: #192230;
  --bz-subtle: #202b3b;
  --bz-line: #334155;
  --bz-success: #74d5ac;
  --bz-danger: #ff94a1;
  --bz-warning: #efc571;
  --bz-info: #8cc8ed;
  --bz-raised: #283446;
  --bz-table-head: #243044;
  --bz-heading: #c9d4e5;
  --bz-row-stripe: #1d2838;
  --bz-row-hover: #2a384c;
  --bz-control-line: #46556c;
  --bz-brand-line: #72404d;
  --bz-shadow: 0 3px 16px rgb(0 0 0 / 16%);
  --bz-focus: 0 0 0 3px rgb(241 138 154 / 22%);
  --bz-loading-mask: rgba(25,34,48,.92);
}

/* Legacy Bootstrap and plugin surfaces inherit the same palette. */
.bz-theme .card, .bz-theme .modal-content, .bz-theme .dropdown-menu,
.bz-theme .popover, .bz-theme .page-link, .bz-theme .select2-dropdown,
.bz-theme .select2-search__field, .bz-theme .daterangepicker,
.bz-theme .daterangepicker .calendar-table, .bz-theme .list-group-item {
  color: var(--bz-ink); background-color: var(--bz-surface); border-color: var(--bz-line);
}
.bz-theme .dropdown-header, .bz-theme .select2-selection__rendered,
.bz-theme .select2-results__option { color: var(--bz-ink); }
.bz-theme .dropdown-divider, .bz-theme hr { border-color: var(--bz-line); }
/* Treeview injects fixed colors and inline selection/search styles. */
.bz-theme .treeview .list-group {
  background-color: var(--bz-surface);
  border-color: var(--bz-line);
}
.bz-theme .treeview .list-group-item {
  color: var(--bz-ink) !important;
  background-color: var(--bz-surface) !important;
  border-color: var(--bz-line) !important;
}
.bz-theme .treeview .list-group-item:not(.node-disabled):hover,
.bz-theme .treeview .list-group-item:not(.node-disabled):focus-within {
  color: var(--bz-ink) !important;
  background-color: var(--bz-row-hover) !important;
}
.bz-theme .treeview .list-group-item.search-result {
  color: var(--bz-brand) !important;
  background-color: var(--bz-brand-soft) !important;
  font-weight: 600;
}
.bz-theme .treeview .list-group-item.node-selected,
.bz-theme .treeview .list-group-item.node-selected:not(.node-disabled):hover,
.bz-theme .treeview .list-group-item.node-selected:not(.node-disabled):focus-within {
  color: var(--bz-brand) !important;
  background-color: var(--bz-brand-soft) !important;
  box-shadow: inset 3px 0 var(--bz-brand);
}
.bz-theme .treeview .list-group-item.node-disabled {
  color: var(--bz-muted) !important;
  background-color: var(--bz-subtle) !important;
  box-shadow: none;
}
.bz-theme .treeview .list-group-item a,
.bz-theme .treeview .list-group-item .icon { color: inherit; }
.bz-theme .treeview .list-group-item .badge {
  color: var(--bz-ink);
  background-color: var(--bz-raised);
}
.bz-theme .select2-search__field, .bz-theme .dataTables_filter input { color: var(--bz-ink); background: var(--bz-surface); }
.bz-theme table.dataTable tbody tr { background-color: var(--bz-surface); }
.bz-theme .page-item.disabled .page-link { background: var(--bz-subtle); color: var(--bz-muted); border-color: var(--bz-line); }
.bz-theme .popover-header { background: var(--bz-subtle); color: var(--bz-ink); border-color: var(--bz-line); }
.bz-theme .close { color: var(--bz-muted); text-shadow: none; }
.bz-theme .daterangepicker td.off { background: var(--bz-surface); color: var(--bz-muted); }
.bz-theme .daterangepicker td.available:hover, .bz-theme .daterangepicker th.available:hover { background: var(--bz-row-hover); }
.bz-theme .daterangepicker select { color: var(--bz-ink); background: var(--bz-surface); }
.bz-theme .daterangepicker .calendar-table .prev span,
.bz-theme .daterangepicker .calendar-table .next span { border-color: var(--bz-ink); }

[data-theme="dark"] .bz-theme .bg-white, [data-theme="dark"] .bz-theme .bg-light { background-color: var(--bz-surface) !important; }
[data-theme="dark"] .bz-theme .text-dark, [data-theme="dark"] .bz-theme .text-body { color: var(--bz-ink) !important; }
.bz-theme .bz-logo-dark { display: none; }
.bz-theme.bz-auth .login-form :is(.bz-logo-light, .bz-logo-dark) { width: 200px; max-width: 100%; height: auto; }
[data-theme="dark"] .bz-theme .bz-logo-light { display: none; }
[data-theme="dark"] .bz-theme .bz-logo-dark { display: inline-block; }
[data-theme="dark"] .bz-theme .btn:is(.btn-primary, .btn-danger),
[data-theme="dark"] .bz-theme .report-btns .btn-outline-primary,
[data-theme="dark"] .bz-theme .nav-pills .nav-link.active,
[data-theme="dark"] .bz-theme .page-item.active .page-link,
[data-theme="dark"] .bz-theme .dataTables_paginate .paginate_button.current,
[data-theme="dark"] .bz-theme .daterangepicker :is(td.active, .ranges li.active) {
  color: #fff !important; background: #b42335 !important; border-color: #b42335 !important;
}
[data-theme="dark"] .bz-theme .btn:is(.btn-primary, .btn-danger):hover,
[data-theme="dark"] .bz-theme .report-btns .btn-outline-primary:hover { background: #941b2a !important; }
[data-theme="dark"] .bz-theme .btn-success { color: #fff; background: #197354; border-color: #197354; }
[data-theme="dark"] .bz-theme .btn-info { color: #fff; background: #28658c; border-color: #28658c; }
[data-theme="dark"] .bz-theme .btn-warning { color: #fff; background: #946200; border-color: #946200; }
[data-theme="dark"] .bz-theme .btn[class*="btn-outline-"]:hover { color: var(--bz-canvas); }

body.bz-theme {
  color: var(--bz-ink);
  background: var(--bz-canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bz-theme a { color: var(--bz-brand); }
.bz-theme a:hover { color: var(--bz-brand-hover); }
.bz-theme :focus-visible { outline: 2px solid var(--bz-brand); outline-offset: 3px; }
.bz-theme .text-muted { color: var(--bz-muted) !important; }
.bz-theme .text-primary { color: var(--bz-brand) !important; }
.bz-theme .text-success { color: var(--bz-success) !important; }
.bz-theme .text-danger { color: var(--bz-danger) !important; }
.bz-theme .text-warning { color: var(--bz-warning) !important; }
.bz-theme .text-info { color: var(--bz-info) !important; }
.bz-theme .content-wrapper { min-width: 0; }
.bz-theme .content { padding: 24px; }
.bz-theme h1, .bz-theme h2, .bz-theme h3,
.bz-theme h4, .bz-theme h5, .bz-theme h6 { color: var(--bz-ink); letter-spacing: -.02em; }

/* Navigation and the current product-group strip. */
.bz-theme .navbar-light {
  background: var(--bz-surface);
  border-color: var(--bz-line);
  color: var(--bz-ink);
}
.bz-theme > .navbar { padding-right: 24px; padding-left: 24px; }
.bz-theme > .navbar:first-of-type { min-height: 68px; }
.bz-theme > .navbar > .navbar-header { width: auto; min-width: 0; margin-right: 24px; }
.bz-theme > .navbar > .navbar-collapse { min-width: 0; }
.bz-theme .navbar-brand { padding-top: 12px; padding-bottom: 12px; }
.bz-theme .navbar-brand img { width: auto; height: 32px; max-width: 160px; object-fit: contain; }
.bz-theme .navbar-light .navbar-nav-link {
  color: var(--bz-muted);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 8px;
  margin: 4px 2px;
  transition: background-color .15s, color .15s;
}
.bz-theme .navbar-light .navbar-nav-link:hover,
.bz-theme .navbar-light .show > .navbar-nav-link {
  color: var(--bz-ink);
  background: var(--bz-subtle);
}
.bz-theme .navbar-light .navbar-nav-link.active {
  color: var(--bz-brand) !important;
  background: var(--bz-brand-soft) !important;
  font-weight: 600;
  border-bottom: 0;
  box-shadow: none;
}
.bz-theme .navbar-light .navbar-nav-link i { font-size: 15px; }
.bz-theme .bz-profile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  color: var(--bz-muted); background: var(--bz-raised); border: 1px solid var(--bz-line);
}
.bz-theme .bz-profile-icon i { margin: 0; }
.bz-theme .page-header-light { background: transparent; border: 0; }
.bz-theme .breadcrumb-line-dark {
  color: var(--bz-ink);
  background: var(--bz-raised);
  border-bottom: 1px solid var(--bz-line);
}
.bz-theme .breadcrumb-line-dark .breadcrumb-elements-item { color: var(--bz-ink); }
.bz-theme .breadcrumb-line-dark .breadcrumb-elements-item:hover { background: var(--bz-row-hover); }
.bz-theme .breadcrumb-line { padding-right: 24px; padding-left: 24px; }
.bz-theme .sidebar-light { background: var(--bz-surface); border-color: var(--bz-line); }
.bz-theme .nav-sidebar .nav-link { border-radius: 8px; }
.bz-theme .nav-sidebar .nav-link.active { color: var(--bz-brand); background: var(--bz-brand-soft); }

/* Product group: a compact selector and a readable, scrollable list. */
.bz-theme .bz-product-group-inner { padding: 0; }
.bz-theme .bz-secondary-nav { gap: 8px 16px; }
.bz-theme .bz-secondary-nav .navbar-collapse { min-width: 0; }
.bz-theme .bz-secondary-nav .navbar-nav { flex-wrap: wrap; }
.bz-theme .bz-nav-product-group { flex: 0 0 auto; margin-left: auto; padding: 6px 0; }
.bz-theme .bz-group-selector { display: inline-block; max-width: 100%; }
.bz-theme .bz-group-toggle {
  display: flex; align-items: center; gap: 10px; width: 256px; max-width: 100%;
  padding: 7px 12px; border: 1px solid rgb(180 35 53 / 40%); border-radius: 10px;
  background: var(--bz-surface); color: var(--bz-ink); text-align: left;
  box-shadow: none; cursor: pointer;
}
.bz-theme .bz-group-toggle:hover, .bz-theme .bz-group-selector.show .bz-group-toggle { border-color: var(--bz-brand); }
.bz-theme .bz-group-toggle::after { margin-left: auto; color: var(--bz-muted); }
.bz-theme .bz-group-symbol {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px;
  background: var(--bz-subtle); color: var(--bz-muted);
}
.bz-theme .bz-group-text { min-width: 0; }
.bz-theme .bz-group-label { display: block; color: var(--bz-muted); font-size: 11px; line-height: 16px; }
.bz-theme .bz-group-value { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-theme .dropdown-menu.bz-group-menu {
  border-color: rgb(180 35 53 / 40%);
  min-width: 320px; max-width: calc(100vw - 32px); max-height: min(360px, 60vh);
  overflow-y: auto; margin-top: 8px; padding: 8px;
  scrollbar-width: thin; scrollbar-color: #b8c3d3 var(--bz-surface);
}
.bz-theme .bz-group-menu .dropdown-header { padding: 6px 10px 10px; color: var(--bz-muted); font-size: 11px; }
.bz-theme .bz-group-menu .dropdown-item {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  min-height: 40px; padding: 10px; white-space: normal; overflow-wrap: anywhere;
}
.bz-theme .bz-group-menu .dropdown-item.active { color: var(--bz-ink); background: var(--bz-raised); font-weight: 600; }
.bz-theme .bz-group-check { visibility: hidden; flex-shrink: 0; margin: 0; color: var(--bz-muted); }
.bz-theme .bz-group-menu .active .bz-group-check { visibility: visible; }

/* One surface treatment for reports, forms and dialogs. */
.bz-theme .card {
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius);
  box-shadow: var(--bz-shadow);
  margin-bottom: 24px;
}
.bz-theme .card-header { border-bottom-color: var(--bz-line); }
.bz-theme .card-header:first-child { border-radius: 11px 11px 0 0; }
.bz-theme .card-footer { background: var(--bz-subtle); border-top-color: var(--bz-line); }
.bz-theme .card-body { padding: 22px; }
.bz-theme .modal-content {
  border: 1px solid var(--bz-line);
  border-radius: 16px;
  box-shadow: 0 24px 72px rgb(32 43 60 / 18%);
}
.bz-theme .modal-header, .bz-theme .modal-footer { border-color: var(--bz-line); }
.bz-theme .dropdown-menu {
  color: var(--bz-ink);
  border: 1px solid var(--bz-line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgb(32 43 60 / 12%);
}
.bz-theme .dropdown-item { color: var(--bz-ink); border-radius: 6px; padding: 8px 12px; }
.bz-theme .dropdown-item:hover, .bz-theme .dropdown-item:focus { background: var(--bz-subtle); }
.bz-theme .dropdown-item.active, .bz-theme .dropdown-item:active {
  color: var(--bz-brand); background: var(--bz-brand-soft);
}

/* Consistent buttons, preserving success / warning / destructive meanings. */
.bz-theme .btn {
  color: var(--bz-ink);
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: none;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.bz-theme .btn-sm { padding: 6px 10px; font-size: 12px; }
.bz-theme .btn-lg { padding: 12px 22px; font-size: 15px; }
.bz-theme .btn:focus { box-shadow: var(--bz-focus); }
.bz-theme .btn-primary, .bz-theme .btn-danger,
.bz-theme .report-btns .btn-outline-primary {
  color: #fff; background: var(--bz-brand); border-color: var(--bz-brand);
}
.bz-theme .btn-primary:hover, .bz-theme .btn-primary:active,
.bz-theme .btn-danger:hover, .bz-theme .btn-danger:active,
.bz-theme .report-btns .btn-outline-primary:hover {
  color: #fff; background: var(--bz-brand-hover); border-color: var(--bz-brand-hover);
}
.bz-theme .btn-outline-primary, .bz-theme .btn-outline-danger {
  color: var(--bz-brand); border-color: var(--bz-brand); background: transparent;
}
.bz-theme .btn-outline-primary:hover, .bz-theme .btn-outline-danger:hover {
  color: #fff; background: var(--bz-brand); border-color: var(--bz-brand);
}
.bz-theme .btn-outline-primary.active { color: #fff !important; background: #b42335 !important; border-color: #b42335 !important; }
.bz-theme .btn-success { color: #fff; background: var(--bz-success); border-color: var(--bz-success); }
.bz-theme .btn-success:hover { background: #115a41; border-color: #115a41; }
.bz-theme .btn-outline-success { color: var(--bz-success); background: var(--bz-surface); border-color: #8bbbaa; }
.bz-theme .btn-outline-success:hover { color: #fff; background: var(--bz-success); border-color: var(--bz-success); }
.bz-theme .btn-info { color: #fff; background: var(--bz-info); border-color: var(--bz-info); }
.bz-theme .btn-warning { color: #fff; background: var(--bz-warning); border-color: var(--bz-warning); }
.bz-theme .btn-secondary { color: #fff; background: #526277; border-color: #526277; }
.bz-theme .btn-light, .bz-theme .btn-default {
  color: var(--bz-ink); background: var(--bz-surface) !important; border-color: var(--bz-control-line);
}
.bz-theme .btn-light:hover, .bz-theme .btn-default:hover { background: var(--bz-subtle) !important; border-color: #aab7c9; }
.bz-theme .btn-link { color: var(--bz-brand); background: transparent; }
.bz-theme .btn:disabled, .bz-theme .btn.disabled { opacity: .5; cursor: not-allowed; }
.bz-theme .report-btns button.selected { color: #fff; background: var(--bz-brand-hover) !important; border-color: var(--bz-brand-hover); }
.bz-theme .report-btns .btn { margin: 4px 6px 4px 0; }
.bz-theme .btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bz-theme .btn-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Filters and form controls retain their existing plugins and behavior. */
.bz-theme .form-control,
.bz-theme .select2-selection--single,
.bz-theme .select2-selection--multiple {
  color: var(--bz-ink); border-color: var(--bz-control-line); border-radius: 8px; background: var(--bz-surface);
}
.bz-theme input.form-control, .bz-theme select.form-control { min-height: 38px; }
.bz-theme .form-control::placeholder { color: var(--bz-muted); }
.bz-theme .form-control:focus,
.bz-theme .select2-container--focus .select2-selection,
.bz-theme .select2-container--open .select2-selection { border-color: var(--bz-brand); box-shadow: var(--bz-focus); }
.bz-theme .form-control:disabled, .bz-theme .form-control[readonly] { background: var(--bz-raised); }
.bz-theme .custom-select, .bz-theme .custom-file-label {
  color: var(--bz-ink);
  background-color: var(--bz-surface);
  border-color: var(--bz-control-line);
}
.bz-theme .custom-select option { color: var(--bz-ink); background-color: var(--bz-surface); }
.bz-theme .custom-file-label::after {
  color: var(--bz-ink);
  background-color: var(--bz-raised);
  border-color: var(--bz-control-line);
}
.bz-theme .custom-select:focus,
.bz-theme .custom-file-input:focus ~ .custom-file-label {
  border-color: var(--bz-brand);
  box-shadow: var(--bz-focus);
}
.bz-theme .custom-select:disabled,
.bz-theme .custom-file-input:disabled ~ .custom-file-label {
  color: var(--bz-muted);
  background-color: var(--bz-raised);
}
[data-theme="dark"] .bz-theme .custom-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23a4b1c4' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
}
.bz-theme .bootstrap-select > .dropdown-toggle { min-height: 38px; font-weight: 400; padding: 9px 30px 9px 12px; }
.bz-theme .bootstrap-select .filter-option-inner-inner { text-overflow: ellipsis; }
.bz-theme .bootstrap-select .dropdown-menu li.selected a { color: var(--bz-brand); background: var(--bz-brand-soft); }
.bz-theme .select2-container--default .select2-results__option[aria-selected="true"],
.bz-theme .select2-container--default .select2-results__option--selected {
  color: var(--bz-brand); background: var(--bz-brand-soft);
}
.bz-theme .select2-container--default .select2-results__option--highlighted[aria-selected],
.bz-theme .select2-container--default .select2-results__option--highlighted[aria-selected="true"],
.bz-theme .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  color: var(--bz-ink); background: var(--bz-raised);
}
.bz-theme .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--bz-brand-soft); color: var(--bz-brand); border: 1px solid var(--bz-brand-line); border-radius: 6px;
}
.bz-theme .select2-container--default .select2-selection__choice__remove { color: var(--bz-brand); }
.bz-theme .select2-container--default .select2-selection__choice__remove:hover { color: var(--bz-brand-hover); background: var(--bz-brand-soft); }
.bz-theme .select2-dropdown { border-color: var(--bz-line); border-radius: 8px; box-shadow: var(--bz-shadow); overflow: hidden; }
.bz-theme .form-group > label, .bz-theme legend { color: var(--bz-ink); font-size: 12px; font-weight: 600; }
.bz-theme #frmDataTableFilter legend { color: var(--bz-muted); font-size: 12px; margin-bottom: 8px; }
.bz-theme #frmDataTableFilter legend i { color: var(--bz-muted); font-size: 13px; }
.bz-theme #frmDataTableFilter .form-group { margin-bottom: 14px; }
.bz-theme #frmDataTableFilter .form-group .form-group { margin-bottom: 0; }
.bz-theme .custom-control-input:checked ~ .custom-control-label::before,
.bz-theme .material-switch > input[type="checkbox"]:checked + label::before { background-color: var(--bz-brand); border-color: var(--bz-brand); }
.bz-theme .nav-tabs { border-color: var(--bz-line); }
.bz-theme .nav-tabs .nav-link { color: var(--bz-muted); }
.bz-theme .nav-tabs .nav-link.active { color: var(--bz-brand); border-bottom-color: var(--bz-brand); }
.bz-theme .nav-pills .nav-link.active { background: var(--bz-brand); color: #fff; }

/* Data remains complete: allow horizontal scrolling instead of squeezing cells. */
.bz-theme .table-responsive { scrollbar-width: thin; scrollbar-color: #b8c3d3 var(--bz-subtle); }
.bz-theme .table { color: var(--bz-ink); }
.bz-theme .table td, .bz-theme .table th { border-color: var(--bz-line); vertical-align: middle; }
.bz-theme table.dataTable thead th,
.bz-theme .table thead th {
  background: var(--bz-table-head);
  color: var(--bz-heading) !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 14px 16px;
  border-top: 0 !important;
  border-bottom: 1px solid var(--bz-line) !important;
}
.bz-theme table.dataTable tbody { color: var(--bz-ink) !important; }
.bz-theme table.dataTable tbody td { font-size: 13px !important; padding: 13px 16px; }
.bz-theme .table-striped tbody tr:nth-of-type(odd) { background: var(--bz-row-stripe); }
.bz-theme .table-hover tbody tr:hover { color: var(--bz-ink); background: var(--bz-row-hover); }
.bz-theme table.dataTable tbody tr.selected,
.bz-theme table.dataTable tbody tr.selected > td,
.bz-theme table.dataTable tbody td.selected { background: var(--bz-brand-soft) !important; color: var(--bz-ink) !important; }
.bz-theme table.dataTable tbody tr.selected:hover > td { background: var(--bz-brand-soft) !important; }
.bz-theme table.dataTable tbody tr.selected a { color: var(--bz-brand); }
.bz-theme .table td span { font-size: inherit; }
.bz-theme .table td.text-center,
.bz-theme .table td:has(> .popover-t),
.bz-theme .table td:has(> a > .fas) { white-space: nowrap; }
.bz-theme .table td .popover-t {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-width: 20px;
  min-height: 24px;
  margin-left: 4px !important;
  font-size: 12px !important;
  color: var(--bz-brand) !important;
}
.bz-theme .table td .popover-t:has(.fa-store) { color: var(--bz-muted) !important; }
.bz-theme .dataTables_wrapper .dataTables_filter input { border-radius: 8px; border-color: var(--bz-control-line); }
.bz-theme .dataTables_info { color: var(--bz-muted); font-size: 12px; }
.bz-theme .pagination { gap: 4px; }
.bz-theme .page-link { color: var(--bz-muted); border-color: var(--bz-line); border-radius: 7px !important; }
.bz-theme .page-item.active .page-link { background: var(--bz-brand); border-color: var(--bz-brand); color: #fff; }
.bz-theme .dataTables_paginate .paginate_button { border-radius: 7px; }
.bz-theme .dataTables_paginate .paginate_button.current,
.bz-theme .dataTables_paginate .paginate_button.current:hover { color: #fff !important; background: var(--bz-brand) !important; border-color: var(--bz-brand) !important; }
.bz-theme .popover { border-color: var(--bz-line); border-radius: 9px; box-shadow: 0 8px 24px rgb(32 43 60 / 12%); }
.bz-theme .popover-body { color: var(--bz-ink); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.bz-theme .daterangepicker { color: var(--bz-ink); min-width: 0 !important; max-width: calc(100vw - 24px); border-color: var(--bz-line); border-radius: 12px; box-shadow: var(--bz-shadow); }
.bz-theme .daterangepicker td.active, .bz-theme .daterangepicker td.active:hover,
.bz-theme .daterangepicker .ranges li.active { background: var(--bz-brand); }
.bz-theme .daterangepicker td.in-range { color: var(--bz-ink); background: var(--bz-brand-soft); }
.bz-theme .daterangepicker td.active.in-range { color: #fff; background: var(--bz-brand); }

/* Shared viewport for HTML tables and DataTables; plugin controls stay outside. */
.bz-theme .bz-data-scroll {
  width: 100%; overflow: auto; clear: both;
  border: 1px solid var(--bz-line); border-radius: 10px;
  scrollbar-width: thin; scrollbar-color: #aebace var(--bz-subtle);
  isolation: isolate;
}
.bz-theme .bz-table-host { overflow: visible !important; }
.bz-theme .bz-data-scroll > table {
  display: table; width: 100%; max-height: none; overflow: visible;
  border-collapse: separate !important; border-spacing: 0; margin: 0 !important; border: 0;
}
.bz-theme .bz-data-scroll > table > thead {
  position: sticky; top: 0; z-index: 3; background: var(--bz-table-head);
}
.bz-theme .bz-data-scroll > table > thead > tr > th,
.bz-theme .bz-data-scroll > table > thead > tr > td {
  position: static !important; background: var(--bz-table-head);
  color: var(--bz-heading); font-size: 12px; font-weight: 600; line-height: 1.4;
  padding: 12px 16px; border-color: var(--bz-line); white-space: nowrap;
}
.bz-theme .bz-data-scroll > table > tbody > tr > td {
  font-size: 13px; padding: 12px 16px; border-color: var(--bz-line); vertical-align: middle;
}
.bz-theme .dataTables_scroll { border: 1px solid var(--bz-line); border-radius: 10px; overflow: hidden; }
.bz-theme .dataTables_scrollBody { scrollbar-width: thin; }
.bz-theme table.dataTable thead tr { background: var(--bz-table-head); }
.bz-theme table.dataTable thead tr th:first-child { border-left-color: var(--bz-line); border-radius: 0 !important; }
.bz-theme table.dataTable.fixedHeader-floating,
.bz-theme table.dataTable.fixedHeader-locked { background: var(--bz-table-head); }
/* DataTables keeps an invisible sizing header in the body. Preserve its widths,
   but don't let the visual header's padding create a second visible strip. */
.bz-theme .dataTables_scrollBody > table.dataTable > thead > tr > th,
.bz-theme .dataTables_scrollBody > table.dataTable > thead > tr > td {
  height: 0 !important; min-height: 0 !important;
  padding-top: 0 !important; padding-bottom: 0 !important;
  border-top-width: 0 !important; border-bottom-width: 0 !important;
  box-shadow: none !important;
}
/* Tabulator owns its header and horizontal synchronization. */
.bz-theme .tabulator { border: 1px solid var(--bz-line); border-radius: 10px; background: var(--bz-surface); font-family: inherit; font-size: 13px; }
.bz-theme .tabulator .tabulator-header { border-color: var(--bz-line); background: var(--bz-table-head); color: var(--bz-heading); font-size: 12px; font-weight: 600; }
.bz-theme .tabulator .tabulator-header .tabulator-col { background: var(--bz-table-head); border-color: var(--bz-line); }
.bz-theme .tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 12px; }
.bz-theme .tabulator .tabulator-tableholder { scrollbar-width: thin; }
.bz-theme .tabulator .tabulator-row { color: var(--bz-ink); background: var(--bz-surface); }
.bz-theme .tabulator .tabulator-row.tabulator-row-even { background: var(--bz-row-stripe); }
.bz-theme .tabulator .tabulator-row:hover { background: var(--bz-row-hover); }
.bz-theme .tabulator .tabulator-row.tabulator-selected { background: var(--bz-brand-soft); }
.bz-theme .tabulator .tabulator-cell { border-color: var(--bz-line); }
.bz-theme .tabulator .tabulator-footer { background: var(--bz-subtle); border-color: var(--bz-line); color: var(--bz-muted); }

/* All report tables follow page scrolling, including Scorecard and modal reports. */
.bz-theme .bz-table-host { overflow: visible !important; height: auto !important; max-height: none !important; }
.bz-theme .bz-page-table-viewport.bz-page-table-viewport {
  max-height: none !important; height: auto !important; overflow: auto !important;
  position: relative; isolation: auto; cursor: grab;
}
.bz-theme table.bz-page-table { overflow: visible !important; }
.bz-theme .bz-page-table-header {
  position: relative !important; top: auto !important; z-index: 20 !important;
  background: var(--bz-table-head); will-change: transform;
}
.bz-theme .bz-page-table-header th, .bz-theme .bz-page-table-header td {
  position: static !important; background: var(--bz-table-head);
}
.bz-theme.bz-table-dragging, .bz-theme.bz-table-dragging * {
  cursor: grabbing !important; user-select: none !important;
}
.bz-theme .bz-table-scrollbar {
  position: fixed; bottom: 0; z-index: 15; height: 20px;
  overflow-x: scroll; overflow-y: hidden; background: var(--bz-surface);
  border: 1px solid var(--bz-line); border-radius: 6px 6px 0 0;
  box-shadow: 0 -3px 12px rgb(32 43 60 / 8%);
  scrollbar-color: #94a3b8 var(--bz-raised); scrollbar-width: auto;
}
.bz-theme .bz-table-scrollbar > div { height: 1px; }
.bz-theme .bz-table-scrollbar::-webkit-scrollbar { height: 12px; }
.bz-theme .bz-table-scrollbar::-webkit-scrollbar-track { background: var(--bz-raised); }
.bz-theme .bz-table-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; border: 2px solid var(--bz-raised); border-radius: 8px; }

/* Price uses document scrolling vertically and DataTables for horizontal alignment. */
.bz-theme .bz-price-page .prices-data-table-card { overflow: visible; padding: 20px !important; }
.bz-theme .bz-price-page .dataTables_scrollBody { max-height: none !important; height: auto !important; }
.bz-theme .dtfh-floatingparent:has(.bz-price-table) { z-index: 20 !important; box-shadow: 0 3px 12px rgb(32 43 60 / 10%); }
.bz-theme .dtfh-floatingparent .bz-price-table { position: relative !important; display: table; }
.bz-theme .bz-price-scrollbar {
  position: fixed; bottom: 0; z-index: 15; height: 20px;
  overflow-x: scroll; overflow-y: hidden; background: var(--bz-surface);
  border: 1px solid var(--bz-line); border-radius: 6px 6px 0 0;
  box-shadow: 0 -3px 12px rgb(32 43 60 / 8%);
  scrollbar-color: #94a3b8 var(--bz-raised); scrollbar-width: auto;
}
.bz-theme .bz-price-scrollbar > div { height: 1px; }
.bz-theme .bz-price-scrollbar::-webkit-scrollbar { height: 12px; }
.bz-theme .bz-price-scrollbar::-webkit-scrollbar-track { background: var(--bz-raised); }
.bz-theme .bz-price-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; border: 2px solid var(--bz-raised); border-radius: 8px; }
.bz-theme .bz-price-table { border-collapse: separate !important; border-spacing: 0; margin: 0 !important; }
.bz-theme .bz-price-table { cursor: grab; }
.bz-theme.bz-price-dragging, .bz-theme.bz-price-dragging * { cursor: grabbing !important; user-select: none !important; }
.bz-theme .bz-price-table thead { box-shadow: none; border: 0 !important; }
.bz-theme .bz-price-table thead th {
  position: static;
  padding: 8px 16px !important;
  height: 54px;
  border-radius: 0 !important;
  box-shadow: 0 1px 0 var(--bz-line);
  white-space: nowrap;
}
.bz-theme .bz-price-table th .availability {
  position: static; display: block; margin-bottom: 2px; line-height: 14px;
  text-align: center; color: var(--bz-muted); font-size: 10px;
}
.bz-theme .bz-price-table th img { width: 28px; max-height: 28px; object-fit: contain; }
.bz-theme .bz-price-table td.bz-price-value { min-width: 132px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bz-theme .bz-price-table td.bz-price-value > a { color: var(--bz-ink); font-weight: 600; }
.bz-theme .bz-price-table td.bz-price-value > a:hover { color: var(--bz-brand); }
.bz-theme :is(.bz-price-table, #stock_tracking_dt) {
  --bz-identity-image-width: 120px;
  --bz-identity-name-width: 372px;
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td).bz-product-image,
.bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td).bz-product-name {
  box-sizing: border-box;
  padding-left: 16px !important; padding-right: 16px !important;
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td).bz-product-image {
  width: var(--bz-identity-image-width) !important; min-width: var(--bz-identity-image-width); max-width: var(--bz-identity-image-width); text-align: center;
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td).bz-product-name {
  width: var(--bz-identity-name-width) !important; min-width: var(--bz-identity-name-width); max-width: var(--bz-identity-name-width);
  white-space: normal; overflow-wrap: anywhere;
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt) td.bz-product-name { font-weight: 500 !important; }
.bz-theme :is(.bz-price-table, #stock_tracking_dt) td.bz-product-image img { width: 64px !important; height: 64px !important; object-fit: contain; border-radius: 8px; background: #fff; }
.bz-theme .bz-price-table td.bz-product-brand { min-width: 100px; }
/* Keep product identity visible while report values scroll horizontally. */
.bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td):is(.bz-product-image, .bz-product-name) {
  position: sticky !important;
  z-index: 2;
  background: var(--bz-surface);
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt) .bz-product-image { left: 0; }
.bz-theme :is(.bz-price-table, #stock_tracking_dt) .bz-product-name {
  left: var(--bz-product-image-width, 0px);
  box-shadow: 3px 0 0 var(--bz-line), 7px 0 10px -7px rgb(32 43 60 / 25%);
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt) thead :is(.bz-product-image, .bz-product-name) {
  z-index: 4;
  background: var(--bz-table-head);
}
.bz-theme :is(.bz-price-table, #stock_tracking_dt).table-striped tbody tr:nth-of-type(odd) > :is(.bz-product-image, .bz-product-name) { background: var(--bz-row-stripe); }
.bz-theme :is(.bz-price-table, #stock_tracking_dt).table-hover tbody tr:hover > :is(.bz-product-image, .bz-product-name) { background: var(--bz-row-hover); }
@media (max-width: 1199.98px) {
  .bz-theme :is(.bz-price-table, #stock_tracking_dt) { --bz-identity-name-width: 272px; }
}
@media (max-width: 575.98px) {
  .bz-theme :is(.bz-price-table, #stock_tracking_dt) { --bz-identity-image-width: 80px; --bz-identity-name-width: 176px; }
  .bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td):is(.bz-product-image, .bz-product-name) { padding-left: 8px !important; padding-right: 8px !important; }
  .bz-theme :is(.bz-price-table, #stock_tracking_dt) td.bz-product-image img { width: 48px !important; height: 48px !important; object-fit: contain; }
}
.bz-theme .bz-price-table .bz-cheapest-channel { white-space: nowrap; }
.bz-theme .bz-price-table .bz-cheapest-channel b { margin-left: 8px; font-variant-numeric: tabular-nums; }
.bz-theme #prices_data_table_wrapper > .toolbar { align-items: end; margin-bottom: 12px; }
.bz-theme #prices_data_table_wrapper .toggle-cols > .col-md-4 { max-width: 300px; width: 100%; flex: 0 0 100%; padding-left: 0; }
.bz-theme #prices_data_table_wrapper .toggle-cols legend { font-size: 12px; color: var(--bz-muted); margin-bottom: 6px !important; }
.bz-theme #prices_data_table_wrapper .toggle-cols .form-group { margin-bottom: 0; }
.bz-theme #prices_data_table_filter { padding-top: 0 !important; margin-bottom: 0; }
.bz-theme #prices_data_table_filter label { margin-bottom: 0; }
.bz-theme .bz-price-page .bz-price-filters > .card { height: calc(100% - 24px); }
.bz-theme .bz-price-page .bz-price-archive .card { min-height: 0 !important; height: calc(100% - 24px); }
.bz-theme .bz-price-page .bz-price-archive .form-group { align-items: center; }

/* Scorecard keeps its metric colors and reporting controls within shared surfaces. */
.bz-theme .bz-scorecard-page { min-width: 0; padding: 24px; }
/* The v2 layout locks body scrolling for app-style pages. Scorecard uses document scrolling. */
body.bz-theme.bz-scorecard-view {
  height: auto; min-height: 100vh; overflow: visible;
}
.bz-theme .bz-scorecard-filters {
  position: relative; z-index: 1031;
}
.bz-theme.bz-scorecard-view > .navbar { z-index: 1033; }
.bz-theme.bz-scorecard-view > .bz-secondary-nav { z-index: 1032; }
.bz-theme .bz-scorecard-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px; margin-bottom: 20px; padding: 16px 20px;
  background: var(--bz-surface); border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius); box-shadow: var(--bz-shadow);
}
.bz-theme .bz-scorecard-toolbar > .d-flex { align-items: center; gap: 12px; flex-wrap: wrap; }
.bz-theme .bz-scorecard-toolbar .breadcrumb-elements-item { padding: 0; }
.bz-theme .bz-scorecard-toolbar .bootstrap-select { width: 240px !important; max-width: 100%; }
.bz-theme .bz-scorecard-toolbar .form-control { min-height: 38px; }
.bz-theme .bz-scorecard-toolbar .btn { padding: 9px 14px; font-size: 13px !important; }
.bz-theme .bz-scorecard-toolbar .mr-3 { margin-right: 0 !important; }
.bz-theme .bz-scorecard-card { padding: 16px; }
.bz-theme .bz-scorecard-scroll {
  overflow: auto; border: 1px solid var(--bz-line); border-radius: 10px;
  scrollbar-width: thin; scrollbar-color: #aebace var(--bz-subtle); isolation: isolate;
}
.bz-theme #tblscorecard {
  margin: 0; min-width: 1100px; table-layout: auto;
  border: 0; border-collapse: separate; border-spacing: 0;
}
.bz-theme #tblscorecard thead { position: sticky; top: 0; z-index: 3; }
.bz-theme #tblscorecard thead th {
  position: static; padding: 12px; line-height: 1.4;
  background: var(--bz-subtle); color: var(--bz-ink);
}
.bz-theme #tblscorecard thead .headbrand { color: var(--bz-brand); font-size: 16px !important; }
.bz-theme #tblscorecard thead p { margin: 0; }
.bz-theme #tblscorecard thead .btn { padding: 6px; }
.bz-theme #tblscorecard thead .btn > i { color: var(--bz-muted) !important; font-size: 24px; }
.bz-theme #tblscorecard thead .btn > br { display: none; }
.bz-theme #tblscorecard thead .btn > strong { margin: 8px 0 0; }
.bz-theme #tblscorecard .headbrand .form-group { margin: 0 !important; }
.bz-theme #tblscorecard tbody td {
  padding: 12px !important; font-size: 13px !important; font-weight: 500;
  line-height: 1.5; font-variant-numeric: tabular-nums;
}
.bz-theme #tblscorecard td span { font-size: inherit; font-weight: 600; }
.bz-theme #tblscorecard .card-stats { margin: 0 !important; border: 0; background: transparent; box-shadow: none; }
.bz-theme #tblscorecard .card-val { padding: 6px 8px; }
.bz-theme #tblscorecard .card-val .row { margin: 0; }
.bz-theme #tblscorecard .card-val .col { padding: 0; }
.bz-theme #tblscorecard th, .bz-theme #tblscorecard td { border-color: var(--bz-line) !important; }
.bz-theme #tblscorecard .first_val { padding: 6px 8px !important; }
.bz-theme #tblscorecard .diff_val { padding: 4px 6px !important; font-style: normal; }

/* Preferences: only multiple settings panels need a tab bar. */
.bz-theme .bz-preferences-page { width: 100%; max-width: 1120px; margin: 0 auto; }
.bz-theme .bz-preferences-tabs .nav-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin-bottom: 20px;
  max-width: 100%; border: 1px solid var(--bz-line); border-radius: 12px; background: var(--bz-surface);
}
.bz-theme .bz-preferences-tabs .nav-link {
  margin: 0; padding: 10px 16px; border: 0; border-radius: 8px; font-weight: 600;
}
.bz-theme .bz-preferences-tabs .nav-link::before,
.bz-theme .bz-preferences-tabs .nav-link::after { display: none; }
.bz-theme .bz-preferences-tabs .nav-link.active { color: var(--bz-brand); background: var(--bz-brand-soft); }
.bz-theme .bz-preferences-tabs .nav-link:hover { background: var(--bz-subtle); }
.bz-theme .bz-preferences-page .card-header { padding: 18px 22px; text-align: left !important; background: var(--bz-surface) !important; }
.bz-theme .bz-preferences-page .card-title { font-size: 16px; }
.bz-theme .bz-password-page { display: flex; justify-content: center; align-items: flex-start; padding-top: 48px; }
.bz-theme .bz-password-card { width: 100%; max-width: 460px; }
.bz-theme .bz-password-card .card-body { padding: 32px; }
.bz-theme .bz-password-card h1 { margin-bottom: 28px; }
.bz-theme .bz-password-card label { color: var(--bz-muted); font-size: 13px; font-weight: 500; }
.bz-theme .bz-password-card input { min-height: 44px; }
.bz-theme .bz-password-symbol {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  margin-bottom: 18px; border-radius: 12px; background: var(--bz-brand-soft); color: var(--bz-brand);
}
.bz-theme #forgot-password .modal-footer { padding: 16px 0 0; }

/* Authentication uses the same brand, without changing the forms. */
.bz-theme.bz-auth { background: radial-gradient(ellipse at 15% 10%, var(--bz-brand-soft), transparent 42%), var(--bz-canvas); }
.bz-theme.bz-auth .login-form { width: min(100%, 420px); background: var(--bz-surface); border: 1px solid var(--bz-line); border-radius: 18px; box-shadow: 0 20px 60px rgb(32 43 60 / 8%); }
.bz-theme.bz-auth .login-form .card-body { padding: 36px; }
.bz-theme.bz-auth .login-form .text-center { margin-bottom: 30px !important; }
.bz-theme.bz-auth .login-form img { max-width: 100%; object-fit: contain; }
.bz-theme.bz-auth .form-control { min-height: 44px; }
.bz-theme.bz-auth .form-control-feedback { height: 44px; line-height: 44px; }
.bz-theme.bz-auth .navbar { background: transparent; border: 0; justify-content: center; color: var(--bz-muted); }

@media (max-width: 1199.98px) {
  .bz-theme #frmDataTableFilter > .row > [class*="col-md-"] { flex: 0 0 33.333%; max-width: 33.333%; }
  .bz-theme .bz-price-page .bz-price-filters { flex: 0 0 100%; max-width: 100%; }
  .bz-theme .bz-price-page .bz-price-archive { flex: 0 0 100%; max-width: 100%; }
  .bz-theme .bz-price-page .bz-price-archive .card-body { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
  .bz-theme .bz-price-page .bz-price-archive .form-group { margin: 0; min-width: 180px; }
  .bz-theme .bz-price-page .bz-price-archive .frm-datatable-date { width: auto; flex: 0 1 auto; margin-top: 0 !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .bz-theme > .navbar:first-of-type .navbar-nav-link { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 767.98px) {
  .bz-theme .bz-password-page { padding-top: 24px; }
  .bz-theme .bz-password-card .card-body { padding: 24px; }
  .bz-theme .bz-preferences-tabs .nav-tabs { display: flex; }
  .bz-theme .bz-preferences-tabs .nav-link { flex: 1 1 auto; text-align: center; }
  .bz-theme .content { padding: 16px 12px; }
  .bz-theme > .navbar, .bz-theme .breadcrumb-line { padding-left: 12px; padding-right: 12px; }
  .bz-theme .bz-nav-product-group { width: 100%; }
  .bz-theme .bz-group-selector, .bz-theme .bz-group-toggle { width: 100%; }
  .bz-theme .bz-group-menu { min-width: 100%; }
  .bz-theme .bz-scorecard-page { padding: 16px 12px; }
  .bz-theme .bz-scorecard-toolbar { padding: 14px; }
  .bz-theme .bz-scorecard-toolbar > .d-flex { width: 100%; }
  .bz-theme .bz-scorecard-toolbar .bootstrap-select { width: 200px !important; }
  .bz-theme .bz-scorecard-card { padding: 10px; }
  .bz-theme .card { margin-bottom: 16px; }
  .bz-theme .card-body { padding: 16px; }
  .bz-theme #frmDataTableFilter > .row > [class*="col-md-"] { flex: 0 0 50%; max-width: 50%; }
  .bz-theme #frmDataTableFilter .report-btns {
    flex: 0 0 100%; max-width: 100%; display: flex; flex-wrap: wrap;
    gap: 8px; text-align: left !important;
  }
  .bz-theme #frmDataTableFilter .report-btns + .report-btns { margin-top: 8px; }
  .bz-theme #frmDataTableFilter .report-btns .btn { margin: 0; }
  .bz-theme .dataTables_wrapper .dataTables_filter { float: none; text-align: left; }
  .bz-theme .bz-price-page .prices-data-table-card { padding: 12px !important; }
  .bz-theme #prices_data_table_wrapper > .toolbar { gap: 12px; }
  .bz-theme #prices_data_table_wrapper > .toolbar > .col-6 { flex: 0 0 100%; max-width: 100%; }
  .bz-theme #prices_data_table_filter input { width: calc(100% - 80px); min-width: 140px; }
  .bz-theme #prices_data_table_filter label { width: 100%; }
  .bz-theme .bz-price-table td.bz-product-name { min-width: 210px; }
  .bz-theme .dataTables_paginate { float: none; margin-top: 12px; }
  .bz-theme .pagination { flex-wrap: wrap; }
  .bz-theme .daterangepicker .ranges { float: none; }
  .bz-theme .daterangepicker .drp-calendar { max-width: 100%; }
  .bz-theme .daterangepicker .ranges ul { width: 100%; }
}
@media (max-width: 479.98px) {
  .bz-theme #frmDataTableFilter > .row > [class*="col-md-"] { flex: 0 0 100%; max-width: 100%; }
  .bz-theme.bz-auth .login-form .card-body { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .bz-theme .btn, .bz-theme .navbar-nav-link { transition: none; }
}
/* A single dashboard bar; account actions live in the profile menu. */
.bz-theme > .bz-main-nav {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "brand links group profile"; gap: 12px;
  position: relative; z-index: 1035; padding-top: 8px; padding-bottom: 8px;
}
.bz-theme .bz-main-brand { grid-area: brand; margin: 0 10px 0 0; padding: 4px 0; }
.bz-theme .bz-main-brand img { width: 90px; height: auto; }
.bz-theme .bz-main-links { grid-area: links; min-width: 0; }
.bz-theme .bz-main-nav .bz-page-links { flex-direction: row; flex-wrap: wrap; gap: 2px; }
.bz-theme .bz-main-nav .bz-page-links > .nav-item > .navbar-nav-link {
  display: flex; align-items: center; padding: 10px 8px; margin: 0; font-size: 12px;
}
.bz-theme .bz-main-nav .bz-page-links > .nav-item > .navbar-nav-link i { margin-right: 7px !important; font-size: 14px; }
.bz-theme .bz-main-nav .bz-page-links .dropdown-menu { position: absolute; }
.bz-theme .bz-main-nav .bz-page-links .dropdown-menu .navbar-nav-link { display: block; padding: 10px 16px; }
.bz-theme .bz-main-group { grid-area: group; justify-self: end; min-width: 0; }
.bz-theme .bz-main-group .bz-group-toggle { width: 190px; }
.bz-theme .bz-main-profile { grid-area: profile; }
.bz-theme .bz-profile-toggle {
  display: flex; align-items: center; gap: 7px; padding: 6px; margin: 0;
  border: 0; background: transparent; cursor: pointer;
}
.bz-theme .bz-profile-menu { width: 270px; min-width: 0; max-width: calc(100vw - 24px); padding: 8px; }
.bz-theme .bz-profile-summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px 16px; margin-bottom: 4px; border-bottom: 1px solid var(--bz-line); }
.bz-theme .bz-profile-summary strong { overflow-wrap: anywhere; min-width: 0; }
.bz-theme .bz-profile-menu .dropdown-item { border: 0; border-radius: 6px; padding: 10px; cursor: pointer; }
.bz-theme .bz-profile-menu button.dropdown-item { background: transparent; }
.bz-theme .bz-profile-menu button.dropdown-item:hover { background: var(--bz-subtle); }
.bz-theme .bz-profile-languages, .bz-theme .bz-theme-options { display: flex; gap: 6px; padding: 0 10px 8px; }
.bz-theme .bz-profile-languages a, .bz-theme .bz-theme-options button {
  display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 8px; border: 1px solid var(--bz-line); border-radius: 7px;
  color: var(--bz-muted); background: var(--bz-surface); font: inherit; font-size: 13px;
  white-space: nowrap; text-align: center; cursor: pointer;
}
.bz-theme .bz-theme-options button span { font-size: 16px; line-height: 18px; }
.bz-theme .bz-theme-options { flex-wrap: wrap; }
.bz-theme .bz-theme-options button { flex-basis: auto; }
.bz-theme .bz-language-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.bz-theme .bz-profile-languages a:hover, .bz-theme .bz-theme-options button:hover { background: var(--bz-subtle); }
.bz-theme .bz-profile-languages a.active, .bz-theme .bz-theme-options button[aria-pressed="true"] {
  color: var(--bz-brand); border-color: var(--bz-brand-line); background: var(--bz-brand-soft); font-weight: 600;
}
.bz-theme .bz-main-toggle { grid-area: toggle; color: var(--bz-muted); border: 1px solid var(--bz-line); border-radius: 8px; padding: 9px; }
.bz-theme .bz-main-nav .is-new { position: relative; }
.bz-theme .bz-main-nav .is-new::after { content: ''; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--bz-brand); }
@media (min-width: 1200px) {
  .bz-theme .bz-main-links { display: block !important; }
  .bz-theme .bz-main-toggle { display: none; }
}
@media (max-width: 1199.98px) {
  .bz-theme > .bz-main-nav {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "brand group profile toggle" "links links links links";
    row-gap: 0;
  }
  .bz-theme .bz-main-links { border-top: 1px solid var(--bz-line); margin-top: 8px; padding-top: 8px; }
  .bz-theme .bz-main-nav .bz-page-links { flex-direction: column; padding-bottom: 8px; }
  .bz-theme .bz-main-nav .bz-page-links .dropdown-menu { position: static; box-shadow: none; margin-left: 16px; }
  .bz-theme .bz-main-nav .bz-page-links > .nav-item > .navbar-nav-link { padding: 12px; font-size: 13px; }
}
@media (max-width: 575.98px) {
  .bz-theme > .bz-main-nav { grid-template-areas: "brand . profile toggle" "group group group group" "links links links links"; }
  .bz-theme .bz-profile-menu { max-width: calc(100vw - 88px); }
  .bz-theme .bz-main-group { width: 100%; margin-top: 8px; }
  .bz-theme .bz-main-group .bz-group-selector, .bz-theme .bz-main-group .bz-group-toggle { width: 100%; }
}

/* Menus sit above report headers and below dialogs; portals can also live in dialogs. */
.bz-theme .card:has(.dropdown.show, .bootstrap-select.show, .select2-container--open),
.bz-theme .bz-filter-card:focus-within { position: relative; z-index: 30; overflow: visible; }
.bz-theme .select2-container--open { z-index: 1060; }
.bz-theme .daterangepicker, .bz-theme .bs-container { z-index: 1060; }
.bz-theme .dataTables_wrapper > .dt-buttons { position: relative; z-index: 31; }
.bz-theme div.dt-button-collection { z-index: 1060; }

/* One loading language across pages, buttons, tables and dialogs. */
.bz-theme .spinner-border,
.bz-theme .spinner-grow,
.bz-theme .bz-loading-ring,
.bz-theme .dataTables_processing::before,
.bz-theme .tabulator-loader .tabulator-loading::before,
.bz-theme .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-msg::before {
  display: inline-block; flex: 0 0 auto; width: 26px !important; height: 26px !important;
  border: 3px solid var(--bz-brand-line) !important; border-top-color: var(--bz-brand) !important;
  border-radius: 50%; background: transparent !important; opacity: 1;
  vertical-align: middle; animation: bz-loading-spin .8s linear infinite !important;
}
.bz-theme .spinner-border-sm, .bz-theme .spinner-grow-sm,
.bz-theme .btn .spinner-border, .bz-theme .btn .spinner-grow {
  width: 16px !important; height: 16px !important; border-width: 2px !important;
}
.bz-theme .btn-primary .spinner-border, .bz-theme .btn-primary .spinner-grow {
  border-color: rgb(255 255 255 / 35%) !important; border-top-color: #fff !important;
}
.bz-theme .bz-loading-state {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 120px; padding: 24px; color: var(--bz-muted); font-size: 13px;
}
.bz-theme .dataTables_processing,
.bz-theme .tabulator-loader .tabulator-loading,
.bz-theme .tabulator-alert .tabulator-alert-msg {
  padding: 20px !important; height: auto !important; color: var(--bz-muted) !important;
  background: var(--bz-surface) !important; border: 1px solid var(--bz-line) !important;
  border-radius: 12px !important; box-shadow: var(--bz-shadow); font-size: 13px !important;
}
.bz-theme .dataTables_processing::before,
.bz-theme .tabulator-loader .tabulator-loading::before,
.bz-theme .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-msg::before {
  content: ''; margin-right: 12px;
}
.bz-theme .dataTables_processing > div { display: none; }
.bz-theme .dataTables_empty, .bz-theme .tabulator-placeholder {
  padding: 32px 20px !important; color: var(--bz-muted); text-align: center;
}
@keyframes bz-loading-spin { to { transform: rotate(360deg); } }

.bz-theme .bz-page-heading { margin-bottom: 20px; }
.bz-theme .bz-page-heading h1 { margin-bottom: 6px; font-size: 22px; font-weight: 600; }
.bz-theme .bz-page-heading p, .bz-theme .bz-product-meta { color: var(--bz-muted); }
.bz-theme .bz-field-status { display: flex; align-items: center; gap: 8px; min-height: 26px; margin-top: 8px; color: var(--bz-muted); font-size: 12px; }
.bz-theme .bz-empty-state { min-height: 200px; padding: 32px; display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--bz-muted); text-align: center; }
.bz-theme .bz-empty-state > i { font-size: 28px; color: var(--bz-brand); background: var(--bz-brand-soft); padding: 16px; border-radius: 14px; }
.bz-theme .bz-empty-state p { margin: 0; }
.bz-theme .bz-master-image { display: block; width: 100%; height: 200px; object-fit: contain; }
.bz-theme .bz-image-page .mproduct .card-title { font-size: 16px; line-height: 1.5; }
.bz-theme .bz-channel-column { display: flex; }
.bz-theme .bz-channel-card { width: 100%; }
.bz-theme .bz-channel-card .channel { display: block; color: var(--bz-brand); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.bz-theme .bz-channel-card .card-title { font-size: 14px; line-height: 1.5; }
.bz-theme .bz-channel-card .card-title a { color: var(--bz-ink); }
.bz-theme .bz-channel-image { display: block; padding: 20px; }
.bz-theme .bz-channel-image img { width: 100%; height: 200px; object-fit: contain; }
.bz-theme .bz-channel-card .card-body { padding-top: 0; }
.bz-theme .bz-channel-card .product-desc-short { color: var(--bz-muted); line-height: 1.6; }
.bz-theme .bz-channel-card .show-product-desc-btn { padding: 0; text-align: left; }
.bz-theme #product-desc-modal img { max-width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) {
  .bz-theme .spinner-border, .bz-theme .spinner-grow,
  .bz-theme .dataTables_processing::before,
  .bz-theme .tabulator-loading::before,
  .bz-theme .tabulator-alert-msg::before { animation-duration: 2s !important; }
}
@media print {
  .bz-theme .bz-table-scrollbar { display: none; }
  .bz-theme .bz-page-table-header { transform: none !important; position: static !important; }
  .bz-theme .bz-page-table-viewport { overflow: visible !important; }
  .bz-theme .bz-price-scrollbar { display: none; }
  .bz-theme .bz-data-scroll, .bz-theme .dataTables_scrollBody,
  .bz-theme .tabulator .tabulator-tableholder { max-height: none !important; overflow: visible !important; }
  .bz-theme .bz-data-scroll > table > thead { position: static; }
  .bz-theme .bz-scorecard-scroll { max-height: none; overflow: visible; }
  .bz-theme #tblscorecard thead { position: static; }
  .bz-theme .bz-price-page .dataTables_scroll { overflow: visible; border: 0; }
  .bz-theme .bz-price-table thead th { position: static; }
  .bz-theme :is(.bz-price-table, #stock_tracking_dt) :is(th, td):is(.bz-product-image, .bz-product-name) { position: static !important; box-shadow: none; }
  .bz-theme .card { box-shadow: none; }
}
