/* Boss HQ demo: budget line modal. Scoped under .bl so nothing leaks into other screens. */
.modal.bl-modal {
  width: min(1000px, 100%);
}
.bl {
  min-width: 0;
}
.bl .r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bl .mono {
  font-family: var(--mono);
  font-size: 12px;
}
.bl-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: -4px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
}
.bl-figs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.bl-fig {
  background: var(--sunk);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 10px 12px;
  min-width: 0;
}
.bl-fig span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.bl-fig b {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.bl-fig.strong {
  background: var(--card);
  border-color: var(--input);
}
.bl-fig.strong b {
  font-size: 19px;
}
.bl-fig.neg b {
  color: var(--risk);
}
.bl-tabs {
  margin-bottom: 14px;
}
.bl-tabs button {
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
}
.bl-tabs button .n {
  margin-left: 2px;
}
.bl-pane {
  min-width: 0;
}
.bl-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.bl-two > div {
  min-width: 0;
}
.bl-two > .bl-wide {
  grid-column: 1 / -1;
}
.bl-tbl td.r,
.bl-tbl th.r {
  white-space: nowrap;
}
.bl-tbl th {
  white-space: nowrap;
}
.bl-tbl {
  margin-bottom: 8px;
}
.bl-tbl td {
  vertical-align: top;
}
.bl-tbl tr.tot td,
.bl-tbl tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--hair);
  background: var(--sunk);
}
.bl-tbl tr.pend td {
  background: var(--warn-bg);
}
.bl-tbl tr.neg td {
  color: var(--risk);
}
.bl-bar {
  margin: 6px 0 12px;
}
.bl-bar .tiny {
  display: block;
  margin-top: 6px;
}
.bl-meta {
  margin: 10px 0 4px;
}
.bl-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.bl-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--link, var(--accent));
  cursor: pointer;
  padding: 7px 10px;
  border: 1px solid var(--hair);
  border-radius: 4px;
}
.bl-links a:hover {
  background: var(--sunk);
  text-decoration: none;
}
.bl-note {
  margin: 0 0 10px;
}
.bl-addbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.bl-form,
.bl-notef {
  background: var(--sunk);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 16px;
}
.bl-formrow {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
}
.bl-formrow .field,
.bl-form .field {
  margin-bottom: 8px;
}
.bl-formact {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.bl-notef textarea {
  width: 100%;
}
.bl-tl {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bl-tl li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 13px;
}
.bl-tl li:last-child {
  border-bottom: 0;
}
.bl-tl b {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.bl-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neutral);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bl-notei {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 13.5px;
  line-height: 1.5;
}
.bl-notei:last-child {
  border-bottom: 0;
}
.bl-ini {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  /* Card layout: one band for the whole total card, not one per cell (a stripe sat behind the heading only at 390). */
  .bl-tbl.tbl-cards tr.tot td,
  .bl-tbl.tbl-cards tfoot td {
    background: transparent;
    border-top: 0;
  }
  .bl-tbl.tbl-cards tr.tot,
  .bl-tbl.tbl-cards tfoot tr {
    background: var(--sunk);
  }
  .bl-figs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bl-two {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .bl-formrow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .bl .hide-s {
    display: none;
  }
  .bl-tbl th,
  .bl-tbl td {
    padding-left: 8px;
    padding-right: 8px;
  }
  .bl-tl li {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .bl-tl li > b,
  .bl-tl li > span:last-child {
    grid-column: 2;
  }
}
@media (max-width: 768px) {
  .modal.bl-modal {
    width: 100%;
  }
  .bl-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bl-tabs::-webkit-scrollbar {
    display: none;
  }
  .bl-tabs button {
    flex: none;
    min-height: 44px;
    white-space: nowrap;
  }
  .bl-formact {
    gap: 10px;
  }
  .bl-formact .btn {
    flex: 1;
    min-height: 44px;
  }
  .bl-addbar .btn {
    width: 100%;
  }
  .bl-form input,
  .bl-form textarea,
  .bl-notef textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .bl-links a {
    min-height: 44px;
  }
}
