/* The Board layout for the sales logs (rooftop/board.js) */

.bl, .bl-pop, .bl-dwrap, .bl-ed { --ink: #1B2333; --muted: #5B6475; --line: #E1E5EE; --line2: #EEF1F6; --soft: #E8ECF7; --brand: #1F3A93; --bad: #B42318; --ok: #1F7A3E;
  font: 13px Roboto, "Segoe UI", Arial, sans-serif; color: var(--ink); }
.bl { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 0; }

/* summary band */
.bl-kpi { display: grid; grid-template-columns: minmax(380px, 2.2fr) repeat(4, minmax(130px, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bl-k { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line2); min-width: 0; }
.bl-k:first-child { border-left: 0; }
.bl-k small { color: var(--muted); font-size: 11.5px; }
.bl-k strong { font-size: 22px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 6px; }
.bl-k em { font-style: normal; color: var(--muted); font-size: 12px; }
.bl-k-units { display: grid; grid-template-columns: 1fr 1fr 1fr; column-gap: 16px; row-gap: 6px; }
.bl-k-units > div { display: flex; flex-direction: column; gap: 2px; }
.bl-k-r { text-align: right; align-items: flex-end; }
.bl-k-r strong { justify-content: flex-end; }
.bl-k-units > .bl-k-bar { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
.bl-k-bar small { white-space: nowrap; }
.bl-prog { flex: 1; height: 6px; min-width: 60px; border-radius: 99px; background: #E9ECF2; display: flex; overflow: hidden; }
.bl-prog i { background: #2E8B4A; display: block; }
.bl-prog b { background: #F0B44C; display: block; }
.bl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bl-dot.ok { background: #2E8B4A; }
.bl-dot.warn { background: #E8862A; }

/* status cards */
.bl-cards { display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 4px; scrollbar-width: thin; }
.bl-card { all: unset; box-sizing: border-box; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-width: 132px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.bl-card span:nth-child(2) { flex: 1; white-space: nowrap; }
.bl-card b { font-weight: 600; font-size: 15px; }
.bl-card:hover { border-color: #B8C2D6; }
.bl-card.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--soft); }
.bl-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.bl-sw { width: 14px; height: 14px; border-radius: 4px; border: 2px solid #B7BDC7; flex: 0 0 auto; box-sizing: border-box; display: inline-block; }
.bl-sw.all { background: conic-gradient(#FFF09A 0 25%, #CDEBD3 0 50%, #FADDE8 0 75%, #E4E6EA 0); border-color: #9AA3B2; }

/* toolbar */
.bl-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-search { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--muted); flex: 0 1 340px; }
.bl-search input { border: 0; outline: 0; font: inherit; padding: 7px 0; width: 100%; background: transparent; color: var(--ink); }
.bl-search:focus-within { border-color: var(--brand); }
.bl-count { color: var(--muted); }
.bl-sp { flex: 1; }
.bl-link { all: unset; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.bl-btn { font: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.bl-btn:hover { border-color: #B8C2D6; }
.bl-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.bl-btn.primary:hover { background: #172C70; }
.bl-btn[disabled] { opacity: .5; cursor: default; }
.bl-tog { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.bl-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bl-tog span { width: 32px; height: 18px; border-radius: 99px; background: #CBD2DE; position: relative; transition: background .15s; }
.bl-tog span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.bl-tog input:checked + span { background: var(--brand); }
.bl-tog input:checked + span::after { left: 16px; }
.bl-tog input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.bl-note { margin: 0; background: #FFF8E6; border: 1px solid #F3E2B3; border-radius: 8px; padding: 8px 12px; color: #6B5300; }

/* the table */
.bl-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; position: relative; outline: 0; }
.bl-t { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.bl-t th, .bl-t td { box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-t thead th { position: sticky; top: 0; z-index: 3; background: #F7F8FB; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; color: #3A4458; padding: 6px 8px 7px; vertical-align: top; user-select: none; }
.bl-t thead th.pin { z-index: 5; }
.bl-t th.pin, .bl-t td.pin { position: sticky; }
.bl-t th.pin-last, .bl-t td.pin-last { box-shadow: 6px 0 6px -6px rgba(27, 35, 51, .28); border-right: 1px solid var(--line); }
.bl-th { display: flex; align-items: center; gap: 2px; min-height: 22px; }
.bl-grip { color: #A5ADBB; cursor: grab; display: inline-flex; flex: 0 0 auto; padding: 0 2px 0 0; }
th[draggable] .bl-grip { opacity: 0; transition: opacity .12s; }
th:hover .bl-grip { opacity: 1; }
.bl-sort { all: unset; cursor: pointer; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; line-height: 1.25; }
.bl-sort:focus-visible { outline: 2px solid var(--brand); border-radius: 3px; }
.bl-arr { color: var(--brand); margin-left: 3px; font-weight: 700; }
.bl-pin { all: unset; cursor: pointer; color: #B3BAC7; display: inline-flex; padding: 2px; border-radius: 4px; opacity: 0; transition: opacity .12s; flex: 0 0 auto; }
th:hover .bl-pin, .bl-pin:focus-visible { opacity: 1; }
.bl-pin.on { color: var(--brand); }
.bl-pin:hover { background: var(--soft); color: var(--brand); }
.bl-fw { margin-top: 5px; }
.bl-f { box-sizing: border-box; width: 100%; font: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid #D8DDE7; border-radius: 6px; background: #fff; color: var(--ink); height: 26px; }
.bl-f.on { border-color: var(--brand); background: var(--soft); }
.bl-f:focus { outline: 0; border-color: var(--brand); }
.bl-rz { position: absolute; top: 0; right: 0; width: 7px; height: 100%; cursor: col-resize; }
.bl-rz:hover { background: linear-gradient(to right, transparent 3px, #9AA9CC 3px, #9AA9CC 4px, transparent 4px); }
.bl-t th.over { box-shadow: inset 3px 0 0 var(--brand); }
.bl-t th.drag { opacity: .5; }
.bl-t th.sorted { color: var(--brand); }

/* rows: a light wash of the status colour, the strong colour kept for the bar on the left and the chip (Oct 31, 2026) */
.bl-row td { background: color-mix(in srgb, var(--bg, #fff) 38%, #fff); border-bottom: 1px solid rgba(27, 35, 51, .07); padding: 0 10px; height: 38px; }
.bl-row td.first { box-shadow: inset 4px 0 0 var(--bar, #D5D9E0); padding-left: 13px; }
.bl-row td.first.pin-last { box-shadow: inset 4px 0 0 var(--bar, #D5D9E0), 6px 0 6px -6px rgba(27, 35, 51, .28); }
.bl-row:hover td { filter: brightness(.97); }
.bl-row td.ed { cursor: text; }
.bl-row td.k-list.ed, .bl-row td.k-status.ed { cursor: pointer; }
.bl-row td.ed:hover { box-shadow: inset 0 0 0 1px #9AA9CC; }
.bl-row td.first.ed:hover { box-shadow: inset 4px 0 0 var(--bar), inset 0 0 0 1px #9AA9CC; }
.bl-row td.r { text-align: right; font-variant-numeric: tabular-nums; }
.bl-row td.k-cust { font-weight: 500; }
.bl-row td.k-derived { color: #3A4458; }
.bl-row.lost td:not(.k-status):not(.bl-act) { color: #7A4440; }
.bl-row.dup td.k-text[data-k="E"] { box-shadow: inset 0 0 0 2px #E8862A; }
.neg { color: var(--bad); }
.bl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 6px; background: #fff; border: 1px solid #C9CED6; font-size: 12px; line-height: 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bl-chip i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.bl-chip.empty { color: var(--muted); border-style: dashed; }
.bl-act { position: sticky; right: 0; z-index: 2; text-align: center; padding: 0 4px !important; }
thead .bl-act { z-index: 4; font-size: 12.5px; font-weight: 500; padding-top: 9px !important; }
.bl-t thead th.pin { background: #F1F3F8; }
.bl-row td.bl-act { box-shadow: -6px 0 6px -6px rgba(27, 35, 51, .22); }
.bl-actin { display: inline-flex; align-items: center; gap: 2px; }
.bl-ic { all: unset; cursor: pointer; color: #4A5569; padding: 4px; border-radius: 6px; display: inline-flex; }
.bl-ic:hover { background: rgba(31, 58, 147, .1); color: var(--brand); }
.bl-ic:focus-visible { outline: 2px solid var(--brand); }
.bl-flag { font-size: 10.5px; font-weight: 600; color: #8A4B08; background: #FDE7C8; border-radius: 4px; padding: 1px 4px; }
.bl-none td { padding: 28px; text-align: center; color: var(--muted); background: #fff; }

/* in-cell editor and lists */
.bl-ed { position: absolute; z-index: 60; background: #fff; box-shadow: 0 0 0 2px var(--brand), 0 6px 18px rgba(27, 35, 51, .18); border-radius: 4px; display: flex; }
.bl-ed input, .bl-ed textarea { flex: 1; font: inherit; font-size: 13px; border: 0; outline: 0; padding: 8px 10px; min-width: 0; background: transparent; color: var(--ink); resize: vertical; }
.bl-pop { position: absolute; z-index: 61; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(27, 35, 51, .2); padding: 6px; display: flex; flex-direction: column; gap: 4px; max-width: 320px; outline: 0; }
.bl-popq { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; outline: 0; }
.bl-popq:focus { border-color: var(--brand); }
.bl-popl { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; }
.bl-opt, .bl-menu button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.bl-opt span { flex: 1; }
.bl-opt small { color: var(--muted); font-size: 11px; }
.bl-opt.hi, .bl-opt:hover, .bl-menu button:hover, .bl-menu button:focus-visible { background: var(--soft); }
.bl-opt.cur { font-weight: 600; }
.bl-opt.cur::after { content: "✓"; color: var(--brand); }
.bl-popclr { all: unset; font-size: 12px; color: var(--muted); padding: 4px 9px; cursor: pointer; border-top: 1px solid var(--line2); }
.bl-popclr:hover { color: var(--bad); }
.bl-popnone { margin: 6px 9px; color: var(--muted); }
.bl-menu { min-width: 190px; }
.bl-menu .danger { color: var(--bad); }

/* the deal, and Edit columns */
.bl-dwrap { position: fixed; inset: 0; z-index: 70; }
.bl-scrim { position: absolute; inset: 0; background: rgba(20, 26, 40, .32); }
.bl-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: #fff; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(20, 26, 40, .2); }
.bl-dh { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--bg, #fff); box-shadow: inset 5px 0 0 var(--bar, transparent); }
.bl-dh h2 { margin: 0; font-size: 18px; font-weight: 600; }
.bl-dh p { margin: 3px 0 0; color: #3A4458; }
.bl-x { all: unset; cursor: pointer; font-size: 24px; line-height: 1; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.bl-x:hover { background: rgba(0,0,0,.06); }
.bl-db { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
.bl-sec h3, .bl-ch { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; font-weight: 600; }
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; }
.bl-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bl-fld > span { font-size: 12px; color: #3A4458; }
.bl-fld.wide { grid-column: 1 / -1; }
.bl-fld input, .bl-fld select, .bl-fld textarea { font: inherit; font-size: 13.5px; padding: 7px 9px; border: 1px solid #D3D9E4; border-radius: 7px; background: #fff; color: var(--ink); min-width: 0; }
.bl-fld input:focus, .bl-fld select:focus, .bl-fld textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 58, 147, .12); }
.bl-fld [disabled] { background: #F4F6FA; color: #4A5569; }
.bl-fld output { padding: 7px 0; font-weight: 600; }
.bl-req { color: var(--bad); font-weight: 600; }
.bl-cust .bl-co { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: #3A4458; }
.bl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bl-help { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }
.bl-err { color: var(--bad); font-weight: 500; margin: 12px 0 0; }
.bl-df { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.bl-df small { color: var(--muted); }
.bl-colsd { width: min(440px, 100vw); }
.bl-cl { list-style: none; margin: 0; padding: 4px; border: 1px dashed transparent; border-radius: 10px; display: flex; flex-direction: column; gap: 2px; min-height: 36px; }
.bl-cl.over { border-color: var(--brand); background: var(--soft); }
.bl-ci { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line2); }
.bl-ci label { flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bl-ci label small { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #2E6B3F; background: #E3F2E6; border-radius: 4px; padding: 0 4px; }
.bl-ci.off label { color: var(--muted); }
.bl-ci .bl-pin { opacity: 1; }
.bl-ci.over { box-shadow: inset 0 3px 0 var(--brand); }
.bl-ci.drag { opacity: .45; }
.bl-mv { display: inline-flex; gap: 2px; }
.bl-mv button { all: unset; cursor: pointer; color: var(--muted); width: 20px; text-align: center; border-radius: 4px; }
.bl-mv button:hover { background: var(--soft); color: var(--brand); }
.bl-cempty { color: var(--muted); padding: 8px; font-size: 12.5px; }

@media (max-width: 1100px) {
  .bl-kpi { grid-template-columns: 1fr 1fr; }
  .bl-k-units { grid-column: 1 / -1; }
}

/* the grid: picked cell, greyed cells, the new-deal row, the Classic top */
.bl-wrap:focus { outline: 0; }
.bl-row td.act { box-shadow: inset 0 0 0 2px var(--brand) !important; position: relative; }
.bl-row td.first.act { box-shadow: inset 4px 0 0 var(--bar), inset 0 0 0 2px var(--brand) !important; }
.bl-row td.pin.act { position: sticky; }
.bl-row td.ed.act.k-list::after, .bl-row td.ed.act.k-status::after { content: "▾"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--brand); font-size: 11px; }
.bl-row td.lock { background-image: repeating-linear-gradient(135deg, rgba(27, 35, 51, .05) 0 6px, transparent 6px 12px); color: #8A93A5; cursor: not-allowed; }
.bl-row td.k-trade.ed { cursor: text; }
.bl-blank td { border-bottom: 1px solid #E3E8F0; }
.bl-row:not(.bl-blank) + .bl-blank td { border-top: 2px solid #D5DCE8; }
.bl-blank td[data-ph]:empty::before { content: attr(data-ph); color: #8A93A5; }
.bl-blank:hover td { filter: none; background: #F3F6FC; }
.bl-top { margin-bottom: 10px; }
.bl-pad td { height: 96px; background: #fff; border: 0; }
.bl-qchip { font: inherit; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand); color: var(--brand); background: var(--soft); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.bl-qchip span { font-size: 15px; line-height: 1; }
.bl-cf { color: var(--muted); font-size: 10.5px; }

/* missing gross (Oct 31, 2026) */
.bl-miss { color: #8A5A00; border-color: #F0D9A8; background: #FFF8E6; }
.bl-miss.on { color: #fff; background: #B7791F; border-color: #B7791F; }
.bl-i { margin-left: -2px; }
