/* SUPERBILL-V2 builder (Timothy 11/04). Colors come from the page's own variables; the highlight has a light and a dark value. */
.sbb-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; font-size: 13px; }
.sbb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sbb-table th, .sbb-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.sbb-table tr.sbb-on td { background: #fff7c2; color: #2c2a26; }
html[data-theme='dark'] .sbb-table tr.sbb-on td { background: #4a4420; color: #f3eed2; }
.sbb-table tr.sbb-pending td { color: var(--mid); opacity: 0.6; }
.sbb-table tr.sbb-msg td { font-size: 12px; font-style: italic; border-bottom: 1px solid var(--border); }
.sbb-cols { position: relative; display: inline-block; }
.sbb-cols summary { cursor: pointer; list-style: none; }
.sbb-colbox { position: absolute; z-index: 5; background: var(--surface, #fff); border: 1px solid var(--border); padding: 8px 10px; display: grid; gap: 4px; min-width: 150px; }
.sbb-preview-head { margin: 14px 0 6px; }
/* the preview sheet follows the PDF: Cormorant Garamond headings, Jost text, the CSWN accent, soft neutral cards, black on white for what a payer reads */
.sbb-sheet { background: #fff; color: #111; border: 1px solid var(--border); font-family: 'Jost', system-ui, sans-serif; font-size: 12px; line-height: 1.45; max-width: 1100px; overflow: hidden; }
.sbb-band { display: flex; justify-content: space-between; align-items: flex-start; background: #efede6; border-bottom: 2px solid #5c6b5a; padding: 14px 18px; }
.sbb-brand { display: flex; align-items: center; gap: 10px; }
.sbb-logo { width: 54px; height: 54px; object-fit: contain; }
.sbb-note { font-size: 10px; color: #555; margin-top: 6px; }
.sbb-practice { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 600; }
.sbb-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 32px; font-weight: 600; line-height: 1; }
.sbb-right { text-align: right; }
.sbb-small { font-size: 11px; color: #555; }
.sbb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 18px; }
.sbb-card { background: #f7f6f2; border: 1px solid #cfcbc1; border-radius: 4px; padding: 10px 12px; margin: 0; }
.sbb-sheet > .sbb-card { margin: 12px 18px; }
.sbb-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #5c6b5a; font-weight: 500; margin-bottom: 6px; }
.sbb-pair { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin: 2px 0; }
.sbb-pair span:first-child { color: #555; font-size: 11px; }
.sbb-dx { columns: 2; column-gap: 24px; }
.sbb-n { color: #5c6b5a; margin-right: 4px; }
.sbb-scroll { overflow-x: auto; margin: 0 18px; }
.sbb-lines { width: 100%; border-collapse: collapse; font-size: 11px; }
.sbb-lines th { text-align: left; background: #e9e7df; color: #111; text-transform: none; letter-spacing: normal; white-space: normal; border-bottom: 2px solid #5c6b5a; padding: 5px 6px; font-weight: 500; vertical-align: bottom; }
.sbb-lines td { padding: 4px 6px; vertical-align: top; background: transparent; color: #111; }
.sbb-lines .sbb-zebra td { background: #f4f3ee; }
.sbb-lines th.sbb-r, .sbb-lines td.sbb-r, .sbb-r { text-align: right; }
.sbb-end { grid-template-columns: 1fr 260px; align-items: start; }
.sbb-clinblocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.sbb-sub { color: #555; font-size: 11px; margin: 2px 0 4px; }
.sbb-due { display: flex; justify-content: space-between; border-top: 1px solid #5c6b5a; margin-top: 6px; padding-top: 6px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; font-weight: 600; color: #5c6b5a; }
.sbb-foot { text-align: center; color: #555; font-size: 10px; border-top: 1px solid #cfcbc1; margin: 8px 18px 0; padding: 8px 0 12px; }
.sbb-warn { border: 1px solid var(--status-bad, #b3261e); padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.sbb-actions { margin-top: 12px; }
.stm-due { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; margin: 12px 18px; }
.stm-amount { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 36px; font-weight: 600; color: #5c6b5a; }

/* SUPERBILL-TABLE-CSS (owner 11/10): the preview is paper, a plain light table in every theme. The page-wide shared scroll box (chart-scroll.css) pinned the first column with the theme's dark background and faded the edges, and the dark theme's text color washed out the rows. The preview tables opt out of that box (data-no-scroll), and these rules keep the sheet light even if a wrapper is ever added. */
.sbb-sheet th, .sbb-sheet td { color: #111; }
.sbb-sheet .table-scroll { background: none; overflow-x: auto; max-height: none; }
.sbb-sheet th:first-child, .sbb-sheet td:first-child { position: static; background: transparent; box-shadow: none; }
.sbb-sheet thead th, .sbb-sheet thead th:first-child { position: static; background: #e9e7df; }
/* admin.html pins the first column of EVERY table inside a view (.view table td:first-child, queue item 42) with the theme's --bg3, which is near-black in the dark theme: the sheet's tables override it. */
.view .sbb-sheet table th:first-child, .view .sbb-sheet table td:first-child { position: static; left: auto; z-index: auto; background: transparent; box-shadow: none; }
.view .sbb-sheet table thead th, .view .sbb-sheet table thead th:first-child { position: static; background: #e9e7df; color: #111; }
.view .sbb-sheet table .sbb-zebra td, .view .sbb-sheet table .sbb-zebra td:first-child { background: #f4f3ee; }
