/* BHM Traders brand layer for Nova 2. Tokens match the promotions --bhm-* set.
   Navy #0a5b7f (diamond + wordmark), green #16a14f (leaves). */

:root {
  /* Nova 2 theme variables. */
  --primary: var(--bhm-green-600);
  --primary-dark: var(--bhm-green-700);
  --primary-70: rgba(22, 161, 79, 0.7);
  --primary-50: rgba(22, 161, 79, 0.5);
  --primary-30: rgba(22, 161, 79, 0.3);
  --primary-10: rgba(22, 161, 79, 0.1);
  --logo: var(--bhm-navy-900);
  --sidebar-icon: var(--bhm-sidebar-text);
  --20: #f7fafb;
  --30: var(--bhm-navy-50);
  --40: var(--bhm-bg);
  --50: var(--bhm-border);
  --80: var(--bhm-muted);
  --90: var(--bhm-ink);
}

a.text-primary,
.text-primary {
  color: var(--bhm-navy, #0a5b7f);
}

a.text-primary:hover,
a.text-primary:focus {
  color: var(--bhm-green-700, #0f7137);
}

/* ---------- Sidebar ---------- */

.bhm-app .bhm-sidebar.w-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 13.75rem;
  height: 100vh;
  padding-top: 0;
  overflow: hidden;
  background-color: var(--bhm-navy-900, #042939);
  background-image: var(--bhm-grain), var(--bhm-sidebar-bg);
  background-repeat: repeat, no-repeat;
  background-size: 160px 160px, auto;
}

.bhm-app .bhm-sidebar-brand {
  display: flex;
  align-items: center;
  flex: none;
  height: 3.75rem;
  padding: 0 1.15rem;
  background: transparent;
  border-bottom: 1px solid var(--bhm-sidebar-line, rgba(255, 255, 255, 0.1));
  text-decoration: none;
}

.bhm-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: #fff;
}

.bhm-logo--white {
  --bhm-logo-diamond: #fff;
  --bhm-logo-leaf: #fff;
  --bhm-logo-bhm: #fff;
  --bhm-logo-traders: #fff;
}

.bhm-logo--color {
  --bhm-logo-diamond: var(--bhm-logo-blue, #0f6289);
  --bhm-logo-leaf: var(--bhm-logo-green, #22a24d);
  --bhm-logo-bhm: var(--bhm-logo-blue, #0f6289);
  --bhm-logo-traders: var(--bhm-logo-blue, #0f6289);
}

.bhm-logo__mark {
  width: 2rem;
  height: 2rem;
  flex: none;
  display: block;
}

.bhm-logo__mark .bhm-logo__diamond {
  fill: var(--bhm-logo-diamond, #fff);
}

.bhm-logo__mark .bhm-logo__leaf {
  fill: var(--bhm-logo-leaf, #fff);
}

.bhm-logo__word {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
  font-weight: 800;
}

.bhm-logo__bhm {
  color: var(--bhm-logo-bhm, #fff);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.bhm-logo__traders {
  margin-top: 0.12rem;
  color: var(--bhm-logo-traders, #fff);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.bhm-app .bhm-sidebar-nav {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 1.5rem;
}

.bhm-app .bhm-sidebar .sidebar-icon,
.bhm-app .bhm-nav-icon {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.65rem;
  flex: none;
  color: var(--bhm-sidebar-muted, rgba(255, 255, 255, 0.55));
}

.bhm-app .bhm-nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bhm-app .bhm-nav-link.router-link-active .bhm-nav-icon {
  color: var(--bhm-green, #16a14f);
}

.bhm-app .bhm-nav-svg svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.bhm-app .bhm-nav-heading,
.bhm-app .bhm-nav-group {
  margin: 0.85rem 0 0.25rem;
  padding: 0.4rem 0.6rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bhm-app .bhm-nav-heading {
  margin-top: 0.35rem;
}

.bhm-app .bhm-nav-list {
  margin: 0 0 0.35rem;
}

.bhm-app .bhm-nav-link {
  display: flex;
  align-items: center;
  margin: 0.05rem 0;
  padding: 0.42rem 0.6rem;
  border-radius: 0.4rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  opacity: 1;
}

.bhm-app .bhm-nav-link:hover {
  background: var(--bhm-sidebar-hover, rgba(255, 255, 255, 0.07));
  color: #fff;
}

.bhm-app .bhm-nav-link.router-link-active {
  background: var(--bhm-sidebar-active, rgba(10, 91, 127, 0.55));
  box-shadow: inset 3px 0 0 var(--bhm-green, #16a14f);
  font-weight: 700;
  color: #fff;
}

.bhm-app .bhm-nav-link.router-link-active .sidebar-icon {
  color: var(--bhm-green, #16a14f);
}

.bhm-app .bhm-sidebar .dim {
  opacity: 1;
}

/* ---------- Header and dashboard ---------- */

body.bhm-app.min-w-site {
  min-width: 0;
}

.bhm-app #nova > .flex {
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

.bhm-app .content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 100vh;
  background: var(--bhm-bg, #f2f6f8);
}

.bhm-app .content > .flex.h-header {
  position: sticky;
  top: 0;
  flex: none;
  padding-left: 16px;
  padding-right: 16px;
  background: var(--bhm-surface, #fff);
  border-bottom: 1px solid var(--bhm-border, #dce6ec);
  box-shadow: 0 1px 2px rgba(10, 91, 127, 0.04);
}

/* Page title + breadcrumb. Same concept as promotions nova-page-header. */
.bhm-page-header {
  display: flex;
  align-items: baseline;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.4rem;
  overflow: hidden;
  white-space: nowrap;
}

.bhm-crumb {
  flex: 0 1 auto;
  min-width: 2.5rem;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 500;
  color: var(--bhm-navy, #0a5b7f);
  text-decoration: none;
}

.bhm-crumb:hover,
.bhm-crumb:focus-visible {
  color: var(--bhm-green-700, #0f7137);
  text-decoration: underline;
  outline: none;
}

.bhm-crumb-sep {
  flex: none;
  font-size: 13px;
  color: #a6b3bc;
}

.bhm-page-title {
  flex: 0 1 auto;
  min-width: 3rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--bhm-ink, #15303e);
}

.bhm-app .h-header > [dusk="global-search-component"] {
  flex: none;
  width: 300px;
  max-width: none;
  margin-left: 1rem;
  margin-right: 0.75rem;
}

.bhm-app .h-header > [dusk="global-search-component"] input.form-global-search {
  height: var(--bhm-control-h, 32px);
  padding-left: 2rem;
  padding-right: 2rem;
  border: 1px solid #dfe6ea;
  border-radius: var(--bhm-radius, 6px);
  background: #f6f8fa;
  box-shadow: none;
  font-size: 13px;
  color: var(--bhm-ink, #15303e);
}

.bhm-app .h-header > [dusk="global-search-component"] input.form-global-search:focus {
  border-color: var(--bhm-green, #16a14f);
  background: #fff;
  box-shadow: var(--bhm-focus);
  outline: none;
}

.bhm-app .h-header > [dusk="global-search-component"] input.form-global-search::placeholder {
  color: #8796a1;
}

.bhm-app .h-header > [dusk="global-search-component"] svg.search-icon-center {
  top: 50%;
  width: 15px;
  height: 15px;
  margin-left: 0.6rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.bhm-app .h-header > [dusk="global-search-component"] > .relative > .relative::after {
  content: '/';
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 18px;
  padding: 0 5px;
  border: 1px solid #d5dde2;
  border-radius: 4px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  color: #6b7a86;
  pointer-events: none;
}

.bhm-app .h-header > [dusk="global-search-component"] > .relative > .relative:focus-within::after,
.bhm-app .h-header > [dusk="global-search-component"] > .relative > .relative:has(input:not(:placeholder-shown))::after {
  display: none;
}

.bhm-app .h-header > [dusk="global-search-component"] .max-h-search {
  left: auto;
  right: 0;
  width: 380px;
}

.bhm-app .h-header > .dropdown-right {
  flex: none;
  margin-left: 0;
}

.bhm-app .dropdown-right .text-90 {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--bhm-ink, #15303e);
}

#nova [dusk^="dashboard-"] > h1,
#nova [dusk$="-index-component"] > h1,
#nova [dusk$="-lens-component"] > h1,
#nova [data-bhm-slot="title"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bhm-app [data-testid="content"] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.bhm-app .card {
  background: var(--bhm-surface, #fff);
  border: 1px solid var(--bhm-border, #dce6ec);
  border-radius: var(--bhm-radius-card, 8px);
  box-shadow: 0 1px 2px rgba(10, 91, 127, 0.04);
}

.bhm-app .card h3,
.bhm-app .card .text-90 {
  color: var(--bhm-ink, #15303e);
}

.bhm-app .ct-chart {
  height: 180px;
  overflow: hidden;
}

.bhm-app .ct-label {
  font-size: 10px;
  fill: var(--bhm-muted, #5b7180);
  color: var(--bhm-muted, #5b7180);
}

/* ---------- Login ---------- */

body.bhm-auth {
  min-height: 100%;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(22, 161, 79, 0.22), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(10, 91, 127, 0.6), transparent 60%),
    linear-gradient(160deg, var(--bhm-navy-800, #063b53) 0%, var(--bhm-navy-900, #042939) 100%);
  color: var(--bhm-ink, #15303e);
}

body.bhm-auth .bhm-auth-brand img {
  width: 10.5rem;
  height: auto;
}

/* ---------- Resource index: toolbar, table, filters, pagination ---------- */

.bhm-app [dusk$="-index-component"] .card.card-panel {
  height: auto;
}

.bhm-app [dusk$="-index-component"] > h1 {
  margin-bottom: 0.5rem;
  color: var(--bhm-ink);
  font-weight: 600;
}

.bhm-app [dusk$="-index-component"] > .flex {
  align-items: center;
  margin-bottom: 0.45rem;
}

.bhm-app [dusk$="-index-component"] > .flex .mb-6 {
  margin-bottom: 0;
}

.bhm-app [dusk$="-index-component"] > .flex .relative.h-9 {
  height: var(--bhm-control-h);
}

.bhm-app [dusk$="-index-component"] > .flex input.form-search {
  height: var(--bhm-control-h);
  padding-left: 2rem;
  border: 1px solid var(--bhm-border);
  border-radius: var(--bhm-radius);
  box-shadow: none;
  color: var(--bhm-ink);
  font-size: var(--bhm-control-font);
  background: var(--bhm-surface);
}

.bhm-app [dusk$="-index-component"] > .flex input.form-search::placeholder {
  color: var(--bhm-muted);
}

.bhm-app [dusk$="-index-component"] > .flex .search-icon-center {
  top: 50%;
  width: var(--bhm-icon);
  height: var(--bhm-icon);
  margin-left: 0.65rem;
  color: var(--bhm-muted);
  transform: translateY(-50%);
}

.bhm-app [dusk$="-index-component"] > .flex .btn {
  height: var(--bhm-control-h);
  padding-top: 0;
  padding-bottom: 0;
  border-radius: var(--bhm-radius);
  font-size: var(--bhm-control-font);
  line-height: calc(var(--bhm-control-h) - 2px);
}

.bhm-app [dusk$="-index-component"] .card > .flex.items-center {
  min-height: 2.4rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  background: var(--bhm-surface);
  border-bottom: 1px solid var(--bhm-border-soft);
}

.bhm-app [dusk$="-index-component"] .card > .flex.items-center button {
  height: var(--bhm-control-h);
}

.bhm-app [dusk$="-index-component"] .card .overflow-x-auto {
  max-height: calc(100vh - 13rem);
  overflow: auto;
}

.bhm-app [dusk$="-index-component"] .table {
  border-collapse: separate;
  border-spacing: 0;
}

.bhm-app [dusk$="-index-component"] .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: auto;
  padding: 0.35rem 0.55rem;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--bhm-navy);
  background: var(--bhm-navy-50);
  border-bottom: 2px solid var(--bhm-navy-100);
  box-shadow: 0 1px 0 var(--bhm-navy-100);
}

.bhm-app [dusk$="-index-component"] .table tbody td {
  height: auto;
  padding: 0.28rem 0.55rem;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--bhm-ink);
  background: var(--bhm-surface);
  border-top: 0;
  border-bottom: 1px solid var(--bhm-border-soft);
}

.bhm-app [dusk$="-index-component"] .table tbody tr:nth-child(even) td {
  background: var(--20);
}

.bhm-app [dusk$="-index-component"] .table tbody tr:hover td {
  background: var(--bhm-green-50);
}

.bhm-app [dusk$="-index-component"] .table th.w-16,
.bhm-app [dusk$="-index-component"] .table td.w-16,
.bhm-app [dusk$="-index-component"] .table th.w-8,
.bhm-app [dusk$="-index-component"] .table td.w-8 {
  width: 2.25rem;
  padding-left: 0.55rem;
  padding-right: 0.2rem;
}

.bhm-app [dusk$="-index-component"] .table td.td-fit {
  padding-right: 0.55rem;
  white-space: nowrap;
}

.bhm-app [dusk$="-index-component"] .table td.td-fit .inline-flex.items-center {
  gap: 2px;
}

.bhm-app [dusk$="-index-component"] .table td.td-fit a.inline-flex,
.bhm-app [dusk$="-index-component"] .table td.td-fit button.inline-flex,
.bhm-app [dusk$="-index-component"] .table td.td-fit button.appearance-none {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bhm-control-h-sm);
  height: var(--bhm-control-h-sm);
  margin: 0;
  border-radius: var(--bhm-radius);
  color: var(--bhm-muted);
}

.bhm-app [dusk$="-index-component"] .table td.td-fit a.inline-flex svg,
.bhm-app [dusk$="-index-component"] .table td.td-fit button svg {
  width: var(--bhm-icon);
  height: var(--bhm-icon);
}

.bhm-app [dusk$="-index-component"] .table td.td-fit a.inline-flex:hover,
.bhm-app [dusk$="-index-component"] .table td.td-fit button.inline-flex:hover,
.bhm-app [dusk$="-index-component"] .table td.td-fit button.appearance-none:hover {
  background: var(--bhm-navy-50);
  color: var(--bhm-navy);
}

.bhm-app [dusk$="-index-component"] .table td.td-fit button[dusk$="-delete-button"]:hover {
  background: var(--bhm-danger-bg);
  color: var(--bhm-danger);
}

.bhm-app [dusk$="-index-component"] .table td a {
  color: var(--bhm-navy);
  font-weight: 600;
}

.bhm-app [dusk$="-index-component"] .table td a:hover {
  color: var(--bhm-green-700);
}

.bhm-app [dusk$="-index-component"] .card .flex.justify-center.items-center.px-6.py-8 {
  padding: 1.25rem 1rem;
}

.bhm-app [dusk$="-index-component"] .card .flex.justify-center svg.mb-3 {
  display: none;
}

.bhm-app [dusk$="-index-component"] .card .flex.justify-center h3 {
  margin: 0 0 0.65rem;
  color: var(--bhm-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.bhm-app [dusk$="-index-component"] .card .bg-20.rounded-b {
  background: var(--bhm-bg);
  border-top: 1px solid var(--bhm-border-soft);
}

.bhm-app [dusk$="-index-component"] .card nav .btn.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--bhm-control-h);
  min-width: var(--bhm-control-h);
  padding: 0 var(--bhm-control-px-sm);
  border-radius: 0;
  font-size: var(--bhm-control-font);
  font-weight: 600;
}

.bhm-app [dusk$="-index-component"] .card nav .btn.btn-link.text-primary {
  color: var(--bhm-navy);
}

.bhm-app [dusk$="-index-component"] .card nav .btn.btn-link.text-primary:hover {
  background: var(--bhm-navy-50);
  color: var(--bhm-green-700);
}

.bhm-app [dusk$="-index-component"] .card nav .btn.btn-link.text-80.opacity-50:not(:disabled) {
  opacity: 1;
  color: var(--bhm-surface);
  background: var(--bhm-navy);
  font-weight: 700;
}

.bhm-app [dusk$="-index-component"] .card nav .text-sm.text-80 {
  color: var(--bhm-muted);
  font-size: 12px;
}

.bhm-filter-menu {
  position: relative;
  display: inline-flex;
  margin-left: 0.35rem;
}

.bhm-filter-anchor {
  position: relative;
}

.bhm-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--bhm-control-h);
  padding: 0 10px;
  border: 1px solid var(--bhm-border-strong);
  border-radius: var(--bhm-radius);
  background: var(--bhm-surface);
  color: var(--bhm-ink);
  font-size: var(--bhm-control-font);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.bhm-filter-trigger svg {
  width: var(--bhm-icon);
  height: var(--bhm-icon);
  color: var(--bhm-muted);
}

.bhm-filter-trigger:hover {
  border-color: var(--bhm-navy-200);
  background: var(--bhm-navy-50);
}

.bhm-filter-trigger:focus {
  outline: none;
  border-color: var(--bhm-green);
  box-shadow: var(--bhm-focus);
}

.bhm-filter-trigger.is-active {
  border-color: var(--bhm-green-600);
  background: var(--bhm-green-600);
  color: var(--bhm-surface);
}

.bhm-filter-trigger.is-active svg {
  color: var(--bhm-surface);
}

.bhm-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bhm-surface);
  color: var(--bhm-green-700);
  font-size: 11px;
  font-weight: 700;
}

.bhm-filter-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  width: 420px;
  max-width: calc(100vw - 24px);
  background: var(--bhm-surface);
  border: 1px solid var(--bhm-f-line);
  border-radius: var(--bhm-radius-card);
  box-shadow: 0 10px 28px rgba(10, 91, 127, 0.16), 0 2px 6px rgba(10, 91, 127, 0.08);
  color: var(--bhm-f-ink);
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
}

.bhm-filter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 14px 0;
}

.bhm-filter-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--bhm-ink);
}

.bhm-filter-count {
  font-size: 11px;
  color: var(--bhm-f-accent);
  font-weight: 600;
}

.bhm-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 10px 14px 12px;
}

.bhm-filter-cell.is-wide {
  grid-column: 1 / -1;
}

.bhm-f-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bhm-f-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bhm-f-muted);
}

.bhm-filter-panel .bhm-f-control {
  height: var(--bhm-control-h);
  width: 100%;
  min-width: 0;
  padding: 0 8px;
  font-size: var(--bhm-control-font);
  color: var(--bhm-f-ink);
  background: var(--bhm-surface);
  border: 1px solid var(--bhm-f-line);
  border-radius: var(--bhm-radius);
  outline: none;
}

.bhm-filter-panel .bhm-f-control:focus {
  border-color: var(--bhm-f-accent);
  box-shadow: var(--bhm-focus);
}

.bhm-filter-panel .bhm-f-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b7180' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}

.bhm-f-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  min-height: var(--bhm-control-h);
  align-items: center;
}

.bhm-f-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--bhm-ink);
}

.bhm-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bhm-f-soft);
  border-top: 1px solid var(--bhm-border-soft);
  border-radius: 0 0 var(--bhm-radius-card) var(--bhm-radius-card);
}

.bhm-f-reset {
  height: var(--bhm-control-h);
  padding: 0 var(--bhm-control-px);
  font-size: var(--bhm-control-font);
  font-weight: 600;
  color: var(--bhm-navy);
  background: transparent;
  border: 0;
  border-radius: var(--bhm-radius);
  cursor: pointer;
}

.bhm-f-reset:hover:not(:disabled) {
  background: var(--bhm-f-accent-soft);
}

.bhm-f-reset:disabled {
  color: var(--bhm-muted);
  opacity: 0.55;
  cursor: default;
}

.bhm-filter-foot-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bhm-f-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--bhm-f-muted);
  white-space: nowrap;
}

.bhm-filter-panel .bhm-f-select-sm {
  width: auto;
  height: var(--bhm-control-h-sm);
  padding-left: var(--bhm-control-px-sm);
  font-size: 12px;
  font-weight: 400;
}

.bhm-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--bhm-border-soft);
  background: var(--bhm-surface);
  font-size: 12px;
}

.bhm-filter-chips.is-empty {
  display: none;
}

.bhm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: var(--bhm-control-h-sm);
  padding: 0 4px 0 10px;
  color: var(--bhm-green-700);
  background: var(--bhm-green-50);
  border: 1px solid var(--bhm-green-100);
  border-radius: 999px;
  max-width: 320px;
}

.bhm-chip-name {
  flex: none;
  color: var(--bhm-muted);
}

.bhm-chip-value {
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bhm-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.bhm-chip-x:hover {
  background: rgba(22, 161, 79, 0.16);
}

.bhm-chip-x:focus {
  outline: none;
  box-shadow: var(--bhm-focus);
}

.bhm-chip-clear {
  height: var(--bhm-control-h-sm);
  padding: 0 var(--bhm-control-px-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--bhm-navy);
  background: transparent;
  border: 0;
  border-radius: var(--bhm-radius);
  cursor: pointer;
}

.bhm-chip-clear:hover {
  background: var(--bhm-navy-50);
}

@media (max-width: 640px) {
  .bhm-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bhm-filter-panel {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

/* ---------- Sidebar collapse (header control) ---------- */

.bhm-app .bhm-sidebar.w-sidebar {
  transition: width 0.16s ease;
}

body.bhm-app.nova-sidebar-collapsed .bhm-sidebar.w-sidebar {
  width: 7rem;
}

body.bhm-app.nova-sidebar-collapsed .content {
  max-width: none;
}

body.bhm-app.nova-sidebar-collapsed .bhm-sidebar-brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.bhm-app.nova-sidebar-collapsed .bhm-logo {
  justify-content: center;
  gap: 0;
}

body.bhm-app.nova-sidebar-collapsed .bhm-logo__mark {
  width: 1.85rem;
  height: 1.85rem;
}

body.bhm-app.nova-sidebar-collapsed .bhm-logo__word {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.bhm-app.nova-sidebar-collapsed .bhm-sidebar-nav {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

body.bhm-app.nova-sidebar-collapsed .bhm-nav-group,
body.bhm-app.nova-sidebar-collapsed .bhm-nav-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.bhm-app.nova-sidebar-collapsed .bhm-nav-group + .bhm-nav-list {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--bhm-sidebar-line);
}

body.bhm-app.nova-sidebar-collapsed .bhm-nav-link {
  height: auto;
  min-height: 2rem;
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
  padding: 0.35rem 0.35rem;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}

body.bhm-app.nova-sidebar-collapsed .bhm-nav-dashboard {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.bhm-app.nova-sidebar-collapsed .bhm-nav-icon,
body.bhm-app.nova-sidebar-collapsed .sidebar-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.35rem;
  font-size: 1rem;
}

body.bhm-app.nova-sidebar-collapsed .bhm-nav-dashboard .sidebar-icon {
  margin-right: 0;
}

body.bhm-app.nova-sidebar-collapsed .sidebar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bhm-app .nova-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bhm-control-h);
  height: var(--bhm-control-h);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--bhm-radius);
  background: transparent;
  color: var(--bhm-navy);
  cursor: pointer;
  flex: none;
}

.bhm-app .nova-nav-toggle:hover,
.bhm-app .nova-nav-toggle:focus-visible {
  background: var(--bhm-navy-50);
  outline: none;
}

.bhm-app .nova-nav-toggle:focus-visible {
  outline: 2px solid var(--bhm-focus-color);
  outline-offset: 2px;
}

.bhm-app .nova-header-divider {
  flex: none;
  width: 1px;
  height: 1.25rem;
  margin: 0 0.85rem 0 0.6rem;
  background: var(--bhm-border);
}

.bhm-app .nova-toggle-icon {
  display: none;
}

.bhm-app .nova-toggle-icon--collapse {
  display: block;
}

body.bhm-app.nova-sidebar-collapsed .nova-toggle-icon--collapse {
  display: none;
}

body.bhm-app.nova-sidebar-collapsed .nova-toggle-icon--expand {
  display: block;
}

/* ---------- Dashboard metric and sync cards ---------- */

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 {
  display: flex;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 148px;
  padding: 16px 18px 18px;
  background: var(--bhm-surface, #fff);
  border: 1px solid var(--bhm-border, #dce6ec);
  border-radius: var(--bhm-radius-card, 8px);
  box-shadow: 0 1px 2px rgba(10, 91, 127, 0.04);
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card > .flex.mb-4,
.bhm-app .bhm-sync-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card h3,
.bhm-app .bhm-dash-title {
  flex: 0 1 auto;
  margin: 0;
  color: var(--bhm-ink, #15303e);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card .text-4xl {
  margin: 0 0 8px;
  color: var(--bhm-ink, #15303e);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card .text-80:not(h3) {
  color: var(--bhm-muted, #5b7180);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card select.select-box-sm {
  flex: none;
  height: var(--bhm-control-h-sm, 28px);
  width: auto;
  min-width: 0;
  margin-left: auto;
  padding: 0 1.35rem 0 8px;
  color: var(--bhm-ink, #15303e);
  background-color: var(--bhm-surface, #fff);
  background-image: linear-gradient(45deg, transparent 50%, var(--bhm-muted, #5b7180) 50%),
    linear-gradient(135deg, var(--bhm-muted, #5b7180) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  border: 1px solid var(--bhm-border-strong, #c5d4dd);
  border-radius: var(--bhm-radius, 6px);
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card select.select-box-sm:focus {
  outline: none;
  border-color: var(--bhm-green, #16a14f);
  box-shadow: var(--bhm-focus, 0 0 0 3px rgba(22, 161, 79, 0.3));
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card:has(.ct-chart.pin) {
  min-height: 176px;
  padding-bottom: 86px;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card .ct-chart.pin {
  top: auto !important;
  right: 12px;
  bottom: 8px;
  left: 12px;
  height: 72px;
}

.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card .ct-chart .ct-grid {
  stroke: var(--bhm-border-soft, #e7eef2);
}

/* One-line sync bar. Beats the shared metric-card min-height (148px). */
.bhm-app .px-3:has(> .card.bhm-sync-card),
.bhm-app .flex.flex-wrap.-mx-3 > .px-3:has(> .bhm-sync-card),
.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3:has(> .bhm-sync-card) {
  align-self: flex-start;
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  margin-bottom: 8px;
}

.bhm-app .card.bhm-sync-card,
.bhm-app .flex.flex-wrap.-mx-3 > .px-3 > .card.bhm-sync-card,
.bhm-app .flex.flex-wrap.-mx-3.mb-3 > .px-3 > .card.bhm-sync-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 4px 8px 4px 12px;
}

.bhm-app .bhm-sync-card > .bhm-sync-head {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  margin-bottom: 0;
}

.bhm-app .bhm-sync-card .bhm-dash-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.bhm-app .bhm-sync-status {
  flex: 0 1 auto;
  max-width: 100%;
  margin-left: 0;
  padding: 1px 8px;
  color: var(--bhm-muted, #5b7180);
  background: var(--bhm-bg, #f2f6f8);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.bhm-app .bhm-sync-btn {
  align-self: center;
  flex: none;
  width: auto;
  height: 24px;
  margin: 0 0 0 auto;
  padding: 0 10px;
  border: 0;
  border-radius: var(--bhm-radius, 6px);
  background: var(--bhm-green, #16a14f);
  color: var(--bhm-surface, #fff);
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
}

.bhm-app .bhm-sync-btn:hover:not(:disabled),
.bhm-app .bhm-sync-btn:focus:not(:disabled) {
  background: var(--bhm-green-600, #12813f);
}

.bhm-app .bhm-sync-btn:focus {
  outline: none;
  box-shadow: var(--bhm-focus, 0 0 0 3px rgba(22, 161, 79, 0.3));
}

.bhm-app .bhm-sync-btn:disabled {
  cursor: progress;
  opacity: 0.72;
}

.bhm-app .bhm-sync-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.bhm-app .bhm-sync-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- Settings → Integrations ---------- */

.bhm-app .bhm-integration-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  background: var(--bhm-navy-50, #eef5f9);
  color: var(--bhm-navy, #0a5b7f);
}

.bhm-app .bhm-integration-status--connected {
  background: var(--bhm-success-bg, var(--bhm-green-50, #ebf7f0));
  color: var(--bhm-green-700, #0f7137);
}

.bhm-app .bhm-integration-status--disabled {
  background: var(--bhm-bg, #f2f6f8);
  color: var(--bhm-muted, #5b7180);
}

.bhm-app .bhm-integration-status--incomplete {
  background: var(--bhm-warning-bg, #fef3c7);
  color: var(--bhm-warning, #b45309);
}

/* ---------- Index: full width beside the sidebar, one toolbar row ---------- */

body.bhm-page-index .bhm-app [data-testid="content"],
body.bhm-app.bhm-page-index [data-testid="content"] {
  padding: 16px;
}

body.bhm-app.bhm-page-index [data-testid="content"] > p.mt-8 {
  margin-top: 16px;
}

[data-bhm-index="page"] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

[data-bhm-index="page"] > * {
  flex: none;
}

[data-bhm-index] > .mb-3:empty,
[data-bhm-arranged] > [data-bhm-row] {
  display: none;
}

[data-bhm-index="page"] > .card:not(.card-panel) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 14rem;
  overflow: visible;
}

[data-bhm-index="page"] > .card:not(.card-panel) > * {
  flex: none;
}

[data-bhm-index="page"] > .card:not(.card-panel) > .relative {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

[data-bhm-index="page"] > .card:not(.card-panel) > .relative > .overflow-x-auto {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

[data-bhm-index="page"] > .card:not(.card-panel) > .relative > .flex.justify-center {
  flex: 1 1 auto;
}

[data-bhm-index="page"] > .card:not(.card-panel) > .relative > .bg-20 {
  flex: none;
}

[dusk][data-bhm-index] > .card > [data-bhm-toolbar].flex {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 0;
  padding: 0.45rem 0.75rem;
  background: var(--bhm-surface);
  border-bottom: 1px solid var(--bhm-border-soft);
}

[data-bhm-toolbar] > [data-bhm-slot="title"] {
  flex: none;
  margin: 0;
  color: var(--bhm-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

[data-bhm-toolbar] > [data-bhm-slot="select"] {
  flex: none;
}

[data-bhm-toolbar] > [data-bhm-slot="select"]:empty {
  display: none;
}

[dusk][data-bhm-index] [data-bhm-toolbar] > [data-bhm-slot="search"] {
  flex: 0 1 16rem;
  min-width: 9rem;
  height: var(--bhm-control-h);
  margin: 0;
}

[dusk][data-bhm-index] [data-bhm-toolbar] > [data-bhm-slot="search"] input.form-search {
  width: 100%;
  max-width: none;
  height: var(--bhm-control-h);
  padding-left: 2rem;
  border: 1px solid var(--bhm-border);
  border-radius: var(--bhm-radius);
  background: var(--bhm-surface);
  box-shadow: none;
  color: var(--bhm-ink);
  font-size: var(--bhm-control-font);
}

[dusk][data-bhm-index] [data-bhm-toolbar] > [data-bhm-slot="controls"] {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0;
}

[dusk][data-bhm-index] [data-bhm-toolbar] > [data-bhm-slot="create"] {
  flex: none;
  margin: 0;
}

[dusk][data-bhm-index] [data-bhm-toolbar] > [data-bhm-slot="create"] .btn {
  height: var(--bhm-control-h);
  padding: 0 12px;
  border-radius: var(--bhm-radius);
  font-size: var(--bhm-control-font);
  line-height: var(--bhm-control-h);
  white-space: nowrap;
}

[data-bhm-index] .table {
  width: 100%;
}

@media (max-width: 900px) {
  [dusk][data-bhm-index] > .card > [data-bhm-toolbar].flex {
    flex-wrap: wrap;
  }

  [dusk][data-bhm-index] [data-bhm-toolbar] > [data-bhm-slot="search"] {
    flex: 1 1 12rem;
  }
}

/* ---------- Phones and tablets ----------
   The layout uses the device width (resources/views/vendor/nova/layout.blade.php), so Nova's
   1280px minimum is lifted below it and the shell tightens on small screens. */

@media (max-width: 1279px) {
  .bhm-app.min-w-site {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  /* The rules above hide every toggle icon with higher specificity than the layout's own
     narrow-screen rule; show the menu (and close) icon here. */
  body.bhm-app .nova-toggle-icon--collapse,
  body.bhm-app .nova-toggle-icon--expand {
    display: none !important;
  }

  body.bhm-app .nova-toggle-icon--menu {
    display: block;
  }

  body.bhm-app.nova-nav-lock .nova-toggle-icon--menu {
    display: none;
  }

  body.bhm-app.nova-nav-lock .nova-toggle-icon--close {
    display: block;
  }
}

@media (max-width: 640px) {
  .bhm-app .px-view {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bhm-app .py-view {
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .bhm-app .nova-header-divider {
    margin: 0 8px 0 4px;
  }

  /* User menu: the avatar alone. */
  .bhm-app .bhm-user-name,
  .bhm-app .dropdown-right .dropdown-trigger > svg {
    display: none;
  }

  .bhm-app .bhm-user-avatar {
    margin-right: 0;
  }

  /* Detail pages: title, action menu and edit buttons wrap instead of running off screen. */
  .bhm-app [dusk$="-detail-component"] > div > .flex.items-center.mb-3 {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .bhm-app [dusk$="-detail-component"] > div > .flex.items-center.mb-3 > .ml-3.w-full {
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
  }

  .bhm-app [dusk$="-detail-component"] > div > .flex.items-center.mb-3 > .ml-3.w-full > .ml-3:first-child {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .bhm-app [dusk$="-detail-component"] [dusk="action-select"] {
    flex: 1 1 auto;
    min-width: 0;
  }
}
