/* The brand line (js/brand.js): the REalPro, their firm, their profession, then REalProz. And the client toolbox
   (js/toolbox.js) with the PITI Plus calculator. --brand is the REalPro's own color. */
.rb { --brand: #3952a4; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink, #1b2550); }
.rb-av { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rb-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-logo { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.rb-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.rb-txt b { font-size: 1rem; }
.rb-firm { font-weight: 600; font-size: .88rem; }
.rb-prof { color: var(--muted, #55607f); font-size: .78rem; }
.rb-tag { font-style: normal; font-size: .85rem; color: var(--brand); margin-top: 3px; }
.rb-on { margin-left: auto; padding-left: 10px; font-size: .72rem; color: var(--muted, #55607f); white-space: nowrap; align-self: flex-end; }
.rb-on b { font-weight: 700; }
.rb-lg .rb-av, .rb-lg .rb-logo { width: 64px; height: 64px; font-size: 1.3rem; }
.rb-lg .rb-txt b { font-size: 1.25rem; } .rb-lg .rb-firm { font-size: 1rem; } .rb-lg .rb-prof { font-size: .85rem; }
.ol-card .rb { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line, #d9deec); }

/* The client's own REalPro at the top of their workspace (buyer.html header). */
.hdr-brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.hdr-brand .rb { flex: 0 1 auto; }
.hdr-brand:not(:empty) + .brand img, .site-header .brand.is-small img { width: 34px; height: 34px; opacity: .9; }
.site-header .wrap:has(.hdr-brand:not(:empty)) .brand { order: 2; margin-left: auto; }
.site-header .wrap:has(.hdr-brand:not(:empty)) [data-logout] { order: 3; }

/* Toolbox */
.tb { --brand: #3952a4; }
.tb-head { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, #fff), #fff 70%); border: 1px solid var(--line, #d9deec); }
.tb-head .rb-on { display: none; }
.tb-head h2 { margin: 0; font-size: 1.35rem; }
.tb-head .hint { margin: 2px 0 0; }
.tb-tools { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.tb-tools a, .tb-tools button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; height: 100%; width: 100%; padding: 14px 16px; border: 1px solid var(--line, #d9deec); border-top: 4px solid var(--brand); border-radius: 10px; background: #fff; }
.tb-tools a:hover, .tb-tools button:hover { box-shadow: 0 4px 16px rgba(27, 37, 80, .1); }
.tb-tools a:focus-visible, .tb-tools button:focus-visible { outline: 3px solid var(--ink, #1b2550); outline-offset: 2px; }
.tb-tools span { font-size: .88rem; color: var(--muted, #55607f); line-height: 1.35; }
.tb-calc { border: 1px solid var(--line, #d9deec); border-radius: 14px; padding: 20px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4px 28px; scroll-margin-top: 80px; }
.tb-calc > h3, .tb-calc > .hint { grid-column: 1 / -1; margin: 0 0 6px; }
.tb-calc > h3 { font-size: 1.25rem; }
.tb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.tb-form label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .88rem; }
.tb-form input, .tb-form select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid #b9c1d9; border-radius: 8px; background: #fff; color: inherit; min-width: 0; }
.tb-form input:focus, .tb-form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.tb-form small { font-weight: 400; color: var(--muted, #55607f); font-size: .76rem; line-height: 1.3; }
.tb-monthly { border: 0; padding: 0; margin: 16px 0 0; }
.tb-monthly legend { font-weight: 700; margin-bottom: 8px; }
.tb-result { position: sticky; top: 16px; align-self: start; }
.tb-total { background: var(--brand); color: #fff; border-radius: 12px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: baseline; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tb-total span { font-weight: 700; } .tb-total b { font-size: 2rem; line-height: 1; } .tb-total small { font-size: .9rem; font-weight: 400; }
.tb-lines { margin-top: 10px; }
.tb-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dotted var(--line, #d9deec); font-size: .93rem; }
.tb-lines small { color: var(--muted, #55607f); font-size: .78rem; }
.tb-lines .tb-sub { border-bottom: 1px solid var(--ink, #1b2550); font-weight: 700; }
.tb-lines .tb-sum { border-top: 2px solid var(--ink, #1b2550); border-bottom: 0; font-size: 1.02rem; font-weight: 700; margin-top: 2px; }
.tb-note { font-size: .85rem; color: var(--muted, #55607f); margin: 10px 0; }
.tb-cmp summary { color: var(--blue, #3952a4); font-weight: 600; cursor: pointer; }
.tb-cmp table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 6px; }
.tb-cmp th, .tb-cmp td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line, #d9deec); }
.tb-cmp td:last-child { text-align: right; }
.tb-cmp .tb-cur { background: color-mix(in srgb, var(--brand) 10%, #fff); }
.tb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tb-net { margin-top: 16px; }
.tb-warn { background: #fff4e0; border-left: 4px solid #c58a00; padding: 6px 10px; border-radius: 6px; font-size: .88rem; margin: 10px 0 0; }
.tb-fine { font-size: .78rem; color: var(--muted, #55607f); margin: 14px 0 0; }
@media (max-width: 820px) { .tb-calc { grid-template-columns: minmax(0, 1fr); padding: 14px; } .tb-result { position: static; order: -1; } .tb-calc > h3, .tb-calc > .hint { order: -2; } }
@media (max-width: 480px) { .tb-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tb-form input, .tb-form select { width: 100%; box-sizing: border-box; } .tools-main { padding-inline: 12px; } }
@media print {
  body.tb-printing * { visibility: hidden; }
  body.tb-printing .tb, body.tb-printing .tb * { visibility: visible; }
  body.tb-printing .tb { position: absolute; left: 0; top: 0; width: 100%; }
  body.tb-printing .tb-tools, body.tb-printing .tb-actions { display: none; }
}
.ol-run { width: 100%; justify-content: center; margin-top: 10px; }
/* Phones: the brand line keeps one line per item and gives way to the buttons; the REalProz mark steps back. */
.hdr-brand { flex: 1 1 0; overflow: hidden; }
.hdr-brand .rb-txt b, .hdr-brand .rb-firm, .hdr-brand .rb-prof { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .hdr-brand .rb-av { width: 34px; height: 34px; font-size: .8rem; }
  .hdr-brand .rb-txt b { font-size: .9rem; } .hdr-brand .rb-firm { font-size: .78rem; } .hdr-brand .rb-prof { font-size: .7rem; }
  .site-header .wrap:has(.hdr-brand:not(:empty)) .brand { display: none; }
  .site-header .wrap:has(.hdr-brand:not(:empty)) { gap: 6px; }
  .site-header .wrap:has(.hdr-brand:not(:empty)) .btn { padding: 6px 10px; font-size: .8rem; min-height: 36px; }
}

/* Usual commissions (js/commission-rates.js): the REalPro's card on Profile and the BIC's table. */
.cr-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.cr-row label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .9rem; }
.cr-row input { width: 9rem; padding: 8px 10px; border: 1px solid #b9c1d9; border-radius: 8px; font: inherit; }
.cr-row small { font-weight: 400; color: var(--muted, #55607f); font-size: .76rem; }
.cr-row input { height: 44px; box-sizing: border-box; } .cr-row .btn { height: 44px; min-height: 44px; } .cr-note { margin: 6px 0 0; color: var(--muted, #55607f); font-size: .8rem; }
.cr-table input { width: 6rem; padding: 6px 8px; border: 1px solid #b9c1d9; border-radius: 6px; font: inherit; }
.cr-table td { vertical-align: middle; }

/* No REalPro yet: the REalProz logo stands at the left, full size, as on every other page. */
.hdr-brand:empty { display: none; }
.site-header .wrap:has(.hdr-brand:empty) .brand { order: -1; margin-right: auto; }
.site-header .wrap:has(.hdr-brand:empty) > :not(.brand) { margin-left: 0; }
.site-header .wrap:has(.hdr-brand:empty) > :not(.brand) + :not(.brand) { margin-left: 8px; }
/* Room for the photo's ring (it sits outside the circle), so the header never crops its left side. */
.hdr-brand { padding: 5px 0 5px 5px; margin-left: -5px; }
