.bh-control-shell {
  display: grid;
  gap: 14px;
}

.bh-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 180px;
  padding: 28px 32px !important;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(60, 236, 220, 0.45), transparent 27%),
    linear-gradient(125deg, #092b4e, #087c91 58%, #21b99e) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 22px 54px rgba(10, 76, 102, 0.2) !important;
}

.bh-hero::after {
  content: "";
  position: absolute;
  inset: -80%;
  background: conic-gradient(from 20deg, transparent, rgba(255, 255, 255, 0.14), transparent 27%);
  animation: invoiceAurora 14s linear infinite;
  pointer-events: none;
}

.bh-hero > div {
  position: relative;
  z-index: 1;
}

.bh-hero span {
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  color: #9ff8ef;
}

.bh-hero h2 {
  margin: 0.45rem 0 0.35rem;
  font-size: clamp(1.45rem, 2.7vw, 2.35rem);
  letter-spacing: -0.04em;
}

.bh-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
}

.bh-hero-orb {
  display: grid;
  place-items: center;
  min-width: 100px;
  height: 100px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 1px 0 #fff, 0 18px 38px rgba(0, 0, 0, 0.15);
  font-size: 2.15rem;
  font-weight: 900;
}

.bh-hero-orb small {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bh-integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bh-integration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(239, 106, 100, 0.25);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255, 241, 238, 0.82), rgba(255, 255, 255, 0.62));
}

.bh-integration.is-connected {
  border-color: rgba(19, 166, 131, 0.3);
  background: linear-gradient(145deg, rgba(220, 255, 244, 0.86), rgba(255, 255, 255, 0.68));
}

.bh-integration span,
.bh-integration b,
.bh-integration small {
  display: block;
}

.bh-integration span {
  color: #5d7087;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.bh-integration small {
  margin-top: 3px;
  color: #718095;
  overflow-wrap: anywhere;
}

.bh-token-label {
  cursor: pointer;
  white-space: nowrap;
}

.bh-toolbar {
  align-items: flex-start;
}

.bh-filterbar,
.bh-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bh-filterbar .table-search {
  min-width: 240px;
}

.bh-metrics {
  margin-top: 12px;
}

.bh-metrics .metric {
  position: relative;
  overflow: hidden;
}

.bh-metrics .metric::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--bh-glow, rgba(15, 147, 183, 0.18));
}

.bh-metrics .is-complete { --bh-glow: rgba(19, 178, 132, 0.32); }
.bh-metrics .is-partial { --bh-glow: rgba(54, 153, 232, 0.3); }
.bh-metrics .is-pending { --bh-glow: rgba(245, 176, 65, 0.36); }
.bh-metrics .is-review { --bh-glow: rgba(231, 92, 101, 0.3); }

.bh-run-state {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(75, 149, 177, 0.2);
  border-radius: 16px;
  background: rgba(235, 248, 252, 0.7);
}

.bh-run-state.running { box-shadow: inset 4px 0 #18ad9f; }
.bh-run-state.failed { box-shadow: inset 4px 0 #e55555; }
.bh-run-state span,
.bh-run-state small { color: #61758b; }
.bh-run-state small { width: 100%; color: #a33; }

.bh-table-wrap td {
  vertical-align: top;
}

.bh-table-wrap td small {
  display: block;
  max-width: 260px;
  margin-top: 4px;
  color: #718096;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bh-row { box-shadow: inset 4px 0 transparent; }
.bh-row.status-complete { box-shadow: inset 4px 0 #18a97c; }
.bh-row.status-partial { box-shadow: inset 4px 0 #3f91d4; }
.bh-row.status-pending { box-shadow: inset 4px 0 #e6a52d; }
.bh-row.status-review { box-shadow: inset 4px 0 #df5c68; }

.bh-status,
.bh-sender {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.bh-status.complete,
.bh-sender.sent { color: #08765a; background: #d9faed; }
.bh-status.partial { color: #176da7; background: #dcefff; }
.bh-status.pending { color: #8a6000; background: #fff1c7; }
.bh-status.unsent { color: #596879; background: #e9eef4; }
.bh-status.review { color: #a23434; background: #ffe0df; }
.bh-sender { color: #5d6b78; background: #edf1f5; }

.bh-doc-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.bh-review-card {
  border-color: rgba(228, 91, 98, 0.34) !important;
  background: linear-gradient(145deg, rgba(255, 236, 235, 0.82), rgba(255, 255, 255, 0.75)) !important;
}

.bh-document-modal .modal-card {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  height: min(88vh, 940px);
}

.bh-document-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16px;
  background: #eef3f7;
}

.bh-document-modal .modal-head > div {
  display: flex;
  gap: 8px;
}

@media (max-width: 980px) {
  .bh-integration-grid { grid-template-columns: 1fr; }
  .bh-hero { align-items: flex-start; }
  .bh-hero-orb { min-width: 82px; height: 82px; }
}

@media (max-width: 680px) {
  .bh-hero { padding: 22px !important; }
  .bh-hero-orb { display: none; }
  .bh-filterbar > * { width: 100%; }
  .bh-actions { width: 100%; }
  .bh-actions .btn { flex: 1; }
  .bh-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .bh-document-modal .modal-card { width: calc(100vw - 16px); height: 94vh; }
}
