/* Boss HQ demo: budget screen styles. Owned by the budget screen builder; shared classes live in demo.css. */
.bd-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.bd-chips::-webkit-scrollbar {
  display: none;
}
/* scroll cue: an edge fade shows on whichever side has more to scroll to (the local covers hide it at the ends) */
@media (max-width: 768px) {
  .bd-chips {
    background:
      linear-gradient(to right, var(--bg) 70%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(to left, var(--bg) 70%, transparent) right center / 28px 100% no-repeat local,
      linear-gradient(to right, rgba(110, 125, 135, 0.35), transparent) left center / 14px calc(100% - 4px) no-repeat scroll,
      linear-gradient(to left, rgba(110, 125, 135, 0.35), transparent) right center / 14px calc(100% - 4px) no-repeat scroll;
  }
}
/* phones: the job chips wrap into rows, so no chip is ever cut mid-letter at rest */
@media (max-width: 560px) {
  /* one scrolling row (edge fades from the 768 rule stay); the active chip is scrolled into view by jobPage */
  .bd-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .bd-chips .bd-chip-b {
    flex: 0 0 auto;
  }
}
.bd-chip-b {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bd-chip-b small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.bd-chip-b:hover {
  border-color: var(--accent);
}
.bd-chip-b.on {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.bd-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 9px 14px;
  margin-bottom: 14px;
  background: var(--sunk);
  border: 1px solid var(--hair);
  border-radius: 4px;
  color: var(--muted);
}
.bd-banner .ms {
  font-size: 18px;
  color: var(--ok, #2f7d4f);
}
.bd-banner.bd-warn .ms {
  color: var(--warn, #b7791f);
}
.bd-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bd-kpi {
  position: relative;
}
.bd-kpi .v {
  font-size: 20px;
}
.bd-kpi .bar {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.bd-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: var(--card);
  color: var(--muted);
  font:
    italic 700 11px/1 Georgia,
    serif;
  cursor: pointer;
  padding: 0;
  vertical-align: middle;
}
.bd-i:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.bd-kpi .bd-i {
  position: absolute;
  top: 12px;
  right: 12px;
}
.bd-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
  font-size: 12.5px;
}
.bd-tbl {
  min-width: 880px;
}
.bd-tbl td,
.bd-tbl th {
  padding-left: 12px;
  padding-right: 12px;
}
.bd-tbl td.num,
.bd-kpi .v.fig {
  font-family: var(--mono);
  letter-spacing: -0.02em;
}
.bd-tbl td.num {
  font-size: 12.5px;
}
.bd-group td {
  background: var(--sunk);
  font-weight: 700;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}
.bd-group:hover td {
  background: var(--neutral);
}
.bd-group .bd-gn {
  font-weight: 400;
  font-size: 12px;
}
.bd-caret {
  display: inline-block;
  vertical-align: -5px;
  margin-right: 4px;
  color: var(--muted);
}
.bd-caret .ms {
  font-size: 18px;
}
.bd-group .bd-i {
  margin-left: 6px;
}
.bd-line td {
  cursor: pointer;
}
.bd-item {
  padding-left: 34px !important;
}
.bd-code {
  display: inline-block;
  min-width: 56px;
  margin-right: 8px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bd-chip {
  margin-left: 6px;
  font-size: 10.5px;
}
.bd-amt {
  text-decoration: underline;
  text-decoration-color: var(--hair);
  text-underline-offset: 3px;
  cursor: pointer;
}
.bd-amt:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.bd-pend {
  font-size: 11px;
  color: var(--warn, #b7791f);
  margin-top: 1px;
}
.bd-neg {
  color: var(--risk, #b3321f);
}
.bd-pct {
  color: var(--muted);
}
.bd-total td {
  font-weight: 700;
  background: var(--sunk);
  border-top: 2px solid var(--hair);
}
.bd-wb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
/* F18A N1: phone and tablet tap target of 44px, look at 1440 unchanged */
@media (max-width: 768px) {
  .bd-wb {
    min-height: 44px;
  }
}
/* the real strip marks the open draw green and the closed one tan with a 3px underline (app.css:762-763) */
.bd-tabs button.tab-open,
.bd-tabs button.tab-open.on {
  box-shadow: inset 0 -3px 0 var(--ok);
}
.bd-tabs button.tab-closed,
.bd-tabs button.tab-closed.on {
  box-shadow: inset 0 -3px 0 var(--warn);
}
.bd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.bd-card {
  cursor: pointer;
  transition: border-color 0.12s;
}
.bd-card:hover {
  border-color: var(--accent);
}
.bd-ch {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.bd-ch h2 {
  font-size: 16px;
  font-weight: 600;
}
.bd-fee {
  font-size: 12.5px;
  margin: 2px 0 12px;
}
.bd-minis {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.bd-mini {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
}
.bd-mini:last-child {
  border-bottom: 0;
}
.bd-mini span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.bd-mini b {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.bd-cons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.bd-cons .bar {
  flex: 0 1 200px;
}
.bd-cons .bd-cl {
  flex: 1;
  color: var(--text);
}
@media (max-width: 560px) {
  .bd-cons {
    flex-wrap: wrap;
  }
  .bd-cons .bd-cl {
    flex: 1 0 100%;
  }
  .bd-cons .bar {
    flex: 1 1 0;
  }
}
.bd-cl em,
.bd-mini em {
  font-style: normal;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 11.5px;
}
.bd-ch .bd-held {
  margin-left: 10px;
}
.bd-ch .bd-lines {
  margin-left: auto;
}
.bd-ch {
  justify-content: flex-start;
  align-items: center;
}
.bd-lead {
  font-size: 13.5px;
  margin-bottom: 12px;
}
.bd-formula {
  font-size: 13px;
  padding: 8px 12px;
  background: var(--sunk);
  border-radius: 4px;
  margin-bottom: 12px;
}
.bd-terms {
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.bd-note {
  margin-top: 12px;
  font-size: 12.5px;
}
.bd-math td,
.bd-math th {
  padding: 8px 12px;
}
@media (max-width: 1080px) {
  .bd-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .bd-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .bd-kpi .v {
    font-size: 19px;
  }
}
@media (max-width: 768px) {
  .bd-tbl {
    min-width: 860px;
  }
  .bd-tbl th:first-child,
  .bd-tbl td:first-child {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
    white-space: normal;
  }
  .bd-tbl .bd-item {
    padding-left: 12px !important;
  }
  .bd-tbl .bd-code {
    display: block;
    min-width: 0;
    margin: 0 0 2px;
  }
  .bd-tbl tbody td {
    height: 56px;
  }
  .bd-tbl .bd-group td:first-child {
    background: var(--sunk);
  }
  .bd-tbl .bd-total td:first-child {
    background: var(--sunk);
  }
  /* Phone: the "i" button is a 44px target; the 18px ring is drawn inside it, and negative margins keep the row from growing. */
  .bd-i {
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
  }
  .bd-i::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    box-sizing: border-box;
    border: 1px solid var(--hair);
    border-radius: 50%;
  }
  .bd-i:hover::before {
    border-color: var(--accent);
  }
  .bd-tbl .bd-i {
    margin: -6px -13px -6px -13px;
  }
  .bd-group .bd-i {
    display: inline-flex;
    margin: -13px -13px -13px -5px;
  }
  .bd-chip-b {
    min-height: 52px;
  }
  .bd-kpi .bd-i {
    top: 0;
    right: 0;
  }
  .bd-kpi .k {
    display: block;
    padding-right: 44px;
    min-height: 32px;
  }
  .bd-amt {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
  }
}
@media (max-width: 768px) {
  .bd-group .bd-gn {
    display: block;
    margin: 0 0 0 26px;
  }
  .bd-group .bd-gname {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}
.bd-gname {
  display: inline-block;
  max-width: calc(100% - 96px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
@media (min-width: 769px) and (max-width: 1024px) and (pointer: coarse) {
  .bd-tbl .bd-i {
    position: relative;
  }
  .bd-tbl .bd-i::after,
  .bd-kpi .bd-i::after {
    content: '';
    position: absolute;
    inset: -13px;
  }
}
.bd-err {
  color: var(--danger, #c0392b);
  font-size: 13px;
  min-height: 0;
  margin-bottom: 6px;
}
.bd-err:empty {
  display: none;
}
.bd-fee-row td {
  font-style: italic;
}
.bd-fee-row .muted {
  display: block;
  margin-left: 64px;
  font-size: 12px;
  line-height: 1.35;
}
@media (max-width: 560px) {
  .bd-fee-row .muted {
    margin-left: 0;
  }
}
/* Contract Terms Save reads as the primary action on the dark modal */
:root[data-theme='dark'] .modal .btn.bd-save:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
:root[data-theme='dark'] .modal .btn.bd-save:not(:disabled):hover {
  background: #a8c9d8;
}

.bd-recon {
  margin: 0 16px 12px;
}
.bd-recon:first-child {
  margin-top: 12px;
}
/* Owner questions card (above the tab strip) */
.oq-card {
  margin-bottom: 14px;
}
.oq-item {
  padding: 10px 0;
  border-top: 1px solid var(--hair);
}
.oq-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.oq-meta {
  margin: 4px 0 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.oq-ans {
  margin-top: 4px;
}
.oq-sec {
  margin-top: 10px;
}
.oq-act {
  margin-top: 6px;
}
.oq-act .btn {
  min-height: 36px;
}
@media (max-width: 1024px) {
  .oq-box {
    font-size: 16px;
  }
  .oq-act .btn {
    min-height: 44px;
    min-width: 44px;
  }
}
@media (max-width: 560px) {
  .oq-card .card-body {
    padding: 12px 14px;
  }
  .oq-item > div:first-child {
    font-size: 14.5px;
    line-height: 1.35;
  }
  .oq-item:not(.is-answered) {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
  }
  .oq-item:not(.is-answered) > div:first-child,
  .oq-item:not(.is-answered) > .oq-meta {
    grid-column: 1 / -1;
  }
  .oq-item:not(.is-answered) > .oq-meta {
    margin: 0;
    font-size: 12px;
  }
  .oq-box {
    min-height: 44px;
    height: 44px;
    min-width: 0;
  }
  .oq-act {
    margin-top: 0;
  }
}
/* Tablet (769 to 1024): same 44px targets as phones for the info rings, amounts and the workbook link */
@media (min-width: 769px) and (max-width: 1024px) {
  .bd-i {
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
  }
  .bd-i::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    box-sizing: border-box;
    border: 1px solid var(--hair);
    border-radius: 50%;
  }
  .bd-tbl .bd-i {
    margin: -6px -13px -6px -13px;
  }
  .bd-group .bd-i {
    display: inline-flex;
    margin: -13px -13px -13px -5px;
  }
  .bd-kpi .bd-i {
    top: 0;
    right: 0;
  }
  .bd-kpi .k {
    display: block;
    padding-right: 44px;
    min-height: 32px;
  }
  .bd-amt {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
  }
  .bd-wb {
    min-height: 44px;
  }
  .bd-tbl tbody td {
    height: 56px;
  }
  /* Fit the table in the 738px wrap so % is on screen without a sideways scroll */
  .bd-tbl th,
  .bd-tbl td {
    padding-left: 8px;
    padding-right: 8px;
  }
  .tbl.bd-tbl thead th {
    white-space: normal;
    line-height: 1.2;
    vertical-align: bottom;
  }
  .bd-tbl td.num,
  .bd-tbl td.mono {
    font-size: 12.5px;
  }
}
/* Narrow phones: the figure in a tile keeps clear of the border now that tiles show cents */
@media (max-width: 400px) {
  .bd-kpi .v {
    font-size: 15px;
    letter-spacing: -0.04em;
    white-space: nowrap;
  }
  .bd-kpi .v .bd-wb {
    white-space: normal;
    font-size: 16px;
    text-align: left;
    min-height: 44px;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .bd-tbl {
    min-width: 0;
  }
  .bd-tbl th:first-child,
  .bd-tbl td:first-child {
    min-width: 120px;
  }
  .bd-tbl td,
  .bd-tbl th {
    padding-left: 6px;
    padding-right: 6px;
  }
  .bd-group .bd-gname {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .tbl.bd-tbl td.num {
    font-size: 11.5px;
    letter-spacing: -0.03em;
  }
  .bd-fee-row .muted {
    margin-left: 0;
  }
}
