/** * Copyright since 2025 Mifos Initiative * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ $ink: #111827; $ink-soft: #374151; $ink-faint: #9ca3af; $rule: #cbd5e1; $border: #e2e8f0; $accent: #1d4ed8; $ok: #15803d; $ok-soft: #f0fdf4; $danger: #b91c1c; $danger-soft: #fef2f2; // Amount columns share one width so BALANCE and TOTAL line up down the whole sheet. $amt-col: 128px; .bs-page { padding: 20px 24px 40px; background: #f1f5f9; min-height: 100%; } // ── Controls (screen only) ──────────────────────────────────────────────── .bs-controls { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; &__spacer { flex: 1 1 auto; } } .bs-field { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: $ink-soft; input, select { height: 36px; padding: 0 10px; border: 1px solid $border; border-radius: 6px; background: #fff; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: normal; color: $ink; } } .bs-check { display: flex; align-items: center; gap: 6px; height: 36px; font-size: 12.5px; font-weight: 600; color: $ink-soft; cursor: pointer; user-select: none; input { width: 15px; height: 15px; cursor: pointer; accent-color: $accent; } } .bs-btn { height: 36px; padding: 0 16px; border: 1px solid $border; border-radius: 6px; background: #fff; color: $ink-soft; font-size: 12.5px; font-weight: 700; cursor: pointer; &--primary { background: $ink; border-color: $ink; color: #fff; } &:disabled { opacity: 0.55; cursor: not-allowed; } } .bs-tally { padding: 6px 12px; border-radius: 999px; background: $ok-soft; color: $ok; font-size: 12px; font-weight: 700; &--off { background: $danger-soft; color: $danger; } } .bs-alert { padding: 10px 14px; border-radius: 6px; background: $danger-soft; color: $danger; border: 1px solid #fecaca; font-size: 13px; margin-bottom: 14px; } .bs-loading { padding: 48px 0; text-align: center; color: $ink-faint; font-size: 13.5px; } // ── The printed sheet ───────────────────────────────────────────────────── .bs-sheet { background: #fff; border: 1px solid $border; padding: 22px 26px 18px; // The ledger reads as a printed report, so the whole sheet is set in a mono face with // figures on tabular numerals — columns stay aligned however long the names run. font-family: 'DejaVu Sans Mono', 'Liberation Mono', Consolas, 'Courier New', monospace; font-variant-numeric: tabular-nums; color: $ink; &__head { text-align: center; border-bottom: 1px dotted $rule; padding-bottom: 10px; margin-bottom: 12px; h2 { margin: 0; font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em; } p { margin: 4px 0 0; font-size: 11.5px; color: $ink-soft; } } &__branches { letter-spacing: 0.05em; } &__body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; } &__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 26px; padding-top: 10px; border-top: 1px dotted $rule; font-size: 10px; letter-spacing: 0.05em; color: $ink-soft; } } .bs-col { padding: 0 16px; min-width: 0; &:first-child { border-right: 1px dotted $rule; padding-left: 0; } &:last-child { padding-right: 0; } &__title { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; padding-bottom: 6px; } } // ── Rows: one grid so name / BALANCE / TOTAL align across every block ────── .bs-row { display: grid; grid-template-columns: minmax(0, 1fr) $amt-col $amt-col; gap: 8px; align-items: baseline; font-size: 11.5px; line-height: 1.55; > span:nth-child(2), > span:nth-child(3) { text-align: right; white-space: nowrap; } &--colhead { font-weight: 700; font-size: 10.5px; letter-spacing: 0.05em; border-bottom: 1px dotted $rule; padding-bottom: 4px; margin-bottom: 6px; color: $ink-soft; } &--line { color: $ink-soft; } // A nested Header inside a block: its own named sub-group. &--subhead { font-weight: 700; color: $ink; padding-top: 3px; } // Sub-group subtotal sits in the BALANCE column, so it never collides with the // block's own figure in TOTAL. &--subsubtotal { border-top: 1px dotted $rule; font-weight: 700; color: $accent; } // Top-level block subtotal, in the TOTAL column. &--subtotal { font-weight: 700; color: $ink; padding-top: 2px; } // A Header-less Detail account: its own one-line group. &--standalone { font-weight: 700; color: $ink; .bs-name { text-transform: uppercase; letter-spacing: 0.03em; } } &--grand { margin-top: 14px; padding-top: 8px; border-top: 1px solid $ink; border-bottom: 3px double $ink; font-weight: 700; font-size: 12.5px; } } .bs-name { overflow-wrap: anywhere; &--muted { color: $ink-faint; font-style: italic; } } .bs-amt { font-variant-numeric: tabular-nums; } .bs-block { margin-bottom: 14px; &--single { margin-bottom: 10px; } &__name { font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; } // The short dashed rule the printed sheet puts under every group heading. &__rule { width: 130px; border-top: 1px dotted $ink-faint; margin: 2px 0 4px; } } .bs-empty { padding: 14px 0; font-size: 11.5px; color: $ink-faint; } // ── Narrow screens: stack the two sides instead of squeezing the columns ─── @media (width <= 1100px) { .bs-sheet__body { grid-template-columns: 1fr; } .bs-col { padding: 0; &:first-child { border-right: none; border-bottom: 1px dotted $rule; padding-bottom: 16px; margin-bottom: 16px; } } } // ── Print: only the sheet, at report proportions ─────────────────────────── @media print { .bs-controls, .bs-alert, .bs-loading { display: none !important; } .bs-page { padding: 0; background: #fff; } .bs-sheet { border: none; padding: 0; font-size: 10px; } .bs-sheet__body { grid-template-columns: 1fr 1fr; } .bs-block { break-inside: avoid; } }