/* DigiMonk Finance additions */
.tbl.nocb td.primary-cell { max-width: 320px; }
.gst-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.gst-choice label { flex: 1 1 130px; cursor: pointer; margin: 0; } .gst-choice input { position: absolute; opacity: 0; width: 1px !important; }
.gst-choice span { display: block; text-align: center; padding: 11px 10px; border: 2px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.gst-choice input:checked + span { border-color: var(--red); background: var(--red-tint); color: var(--red); } .gst-choice input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.item-row.fin { grid-template-columns: 90px 70px 1fr 74px auto 34px; padding: 12px 10px; align-items: end; } .item-row.fin .i-desc { grid-column: 1 / -1; }
.item-row.fin label { font-size: 11.5px; color: var(--muted); margin: 0; display: block; } .item-row.fin .i-passw { display: flex; gap: 6px; align-items: center; padding-bottom: 10px; white-space: nowrap; } .item-row.fin .i-pass { width: 17px !important; height: 17px; accent-color: var(--red); }
.items.no-gst .i-gstw { visibility: hidden; } .items-total { line-height: 1.8; }
.kv div { white-space: pre-line; overflow-wrap: anywhere; }
.p-issued, .p-pending { background: var(--red-tint); color: var(--deep); } .p-part { background: var(--warn-tint); color: var(--warn); } .p-approved { background: var(--ink); color: var(--surface); } .p-inactive { background: var(--line-2); color: var(--muted); }
:root[data-theme="dark"] .p-issued, :root[data-theme="dark"] .p-pending { color: #F5A3B1; }
.rep-wrap { overflow-x: auto; } .rep { width: 100%; border-collapse: collapse; font-size: 13.5px; } .rep th, .rep td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rep th { font-size: 11.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); } .rep .r { text-align: right; font-variant-numeric: tabular-nums; } .rep tr.t td { font-weight: 700; background: var(--surface-2); } .rep tr.g td { font-weight: 600; color: var(--red); background: none; padding-top: 16px; }
.rep td.wrap { white-space: normal; min-width: 160px; } .rep input { width: 92px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: right; } .rep tr[data-go] { cursor: pointer; } .rep tr[data-go]:hover { background: var(--hover); }
.bud { padding: 0 18px 16px; display: grid; gap: 12px; } .bud .bar { width: 100%; } .bud div > span { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; } .bud .bar i { max-width: 100%; display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 0 18px 16px; } .facts div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; } .facts small { display: block; color: var(--muted); } .facts b { font-size: 17px; font-variant-numeric: tabular-nums; }
.ai-text { white-space: pre-line; padding: 0 18px 18px; } .note { background: var(--red-tint); border-left: 4px solid var(--red); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.set { padding: 6px 18px 18px; } .set .form-actions { margin-top: 4px; }
.daterow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; } .daterow input, .daterow select { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); }
.seg.scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin-bottom: 14px; } .seg.scroll a { white-space: nowrap; }
.key { font-family: ui-monospace, Menlo, monospace; font-size: 16px; letter-spacing: .08em; overflow-wrap: anywhere; background: var(--hover); padding: 10px; border-radius: 8px; }
/* documents */
.doc { font-family: Poppins, Arial, sans-serif; } .doc * { color: inherit; } .doc .red { color: #EC1A3C; } .doc-page { width: 100%; border-collapse: collapse; } .doc-page > thead > tr > td, .doc-page > tbody > tr > td { padding: 0; }
.doc-head { gap: 16px; } .doc-head img { height: 48px; width: auto; aspect-ratio: 1920 / 536; flex: none; } .doc-items th { color: #fff !important; } .doc-items .r { text-align: right; white-space: nowrap; } .doc-items small { color: #777; }
.doc-items tbody tr:nth-child(even) { background: #F7F7F7; } .doc-tax { width: 100%; border-collapse: collapse; font-size: 11.5px; margin: 4px 0 18px; } .doc-tax th, .doc-tax td { border: 1px solid #E6E6E6; padding: 5px 8px; text-align: right; } .doc-tax th:first-child, .doc-tax td:first-child { text-align: left; }
.doc-pay { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: end; break-inside: avoid; } .pay-card { border: 1px solid #E6E6E6; border-radius: 10px; padding: 12px 14px; } .pay-card h4 { color: #EC1A3C; margin: 0 0 6px; } .pay-card p { margin: 0; display: flex; gap: 8px; font-size: 12px; } .pay-card p span { width: 96px; flex: none; } .pay-card p b { overflow-wrap: anywhere; }
.doc-sign { text-align: right; } .doc-sign i { display: block; height: 46px; } .doc-void { border: 2px solid #EC1A3C; color: #EC1A3C; font-weight: 700; padding: 6px 12px; display: inline-block; border-radius: 8px; margin-bottom: 12px; } .doc h5 { margin: 16px 0 6px; font-size: 13.5px; border-left: 4px solid #EC1A3C; padding-left: 8px; } .doc .pre { white-space: pre-line; margin: 0; }
@media print { * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .doc-items tr { break-inside: avoid; } }
@media (max-width: 640px) {
  .tbl.nocb tr { padding-left: 14px; } .tbl.nocb td.primary-cell { max-width: none; }
  .item-row.fin { grid-template-columns: 1fr 70px 1fr; } .item-row.fin .i-passw { grid-column: 2 / 3; grid-column-end: span 2; } .item-row.fin [data-del-item] { position: absolute; right: 4px; top: 12px; } .item-row.fin { position: relative; } .item-row.fin .i-desc { width: calc(100% - 44px); }
  .items.no-gst .i-gstw { visibility: visible; display: none; } .doc.preview { padding: 16px; font-size: 12px; } .doc-preview { overflow-x: auto; } .doc.preview { min-width: 620px; } .rep th, .rep td { padding: 9px 10px; }
  .daterow > * { flex: 1 1 40%; }
}
.side-brand { min-height: 34px; } .facts { grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); }
@media (max-width: 640px) { .hero { margin-bottom: 14px; } .hero-actions { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; } .hero-actions .btn { justify-content: center; width: auto; } .hero-actions .btn.primary { grid-column: 1 / -1; } }
@media print { @page { size: A4; margin: 11mm 12mm; } .print-body .doc { padding: 0; font-size: 12px; max-width: none; } .doc-head { padding-bottom: 12px; margin-bottom: 14px; } .doc-parties { margin-bottom: 14px; } .doc-totals { margin: 8px 0 8px auto; } .doc-totals p { padding: 4px 10px; } .doc-items td { padding: 8px 10px; } .doc-tax { margin: 2px 0 10px; } .doc p { margin-top: 4px; margin-bottom: 8px; } .pay-card p { margin: 0; } .doc-foot { margin-top: 12px; padding-top: 8px; break-inside: avoid; } .doc-foot p { margin: 0; } .doc-parties p { margin: 2px 0 0; } }
/* closed menu casts no shadow on phones; payroll columns fit a laptop */
@media (max-width: 1100px) { body:not(.side-open) .side { box-shadow: none; } }
@media (min-width: 641px) { .rep th, .rep td { padding: 9px 10px; } .rep .btn.sm { padding-inline: 10px; } }
.doc-parties p b { font-size: inherit; }

/* upload invoices */
.drop { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; } .drop:hover, .drop.over, .drop:focus-within { border-color: var(--red); background: var(--red-tint); } .drop small { color: var(--muted); }
.ups { display: grid; gap: 10px; margin-top: 12px; } .up { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; padding: 10px 14px; overflow-wrap: anywhere; } .up.good { border-left-color: var(--ink); } .up.warn { border-left-color: var(--warn); } .up.bad { border-left-color: var(--red); } .up.wait b { color: var(--muted); }
.up-n { color: var(--muted); } .up p { margin: 4px 0 0; } .up ul { margin: 6px 0 0; padding-left: 18px; } .up .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.drop b { color: var(--ink); }
/* record buttons have text, so on phones they wrap two to a row instead of shrinking to icons */
@media (max-width: 640px) { .rh-actions { flex-wrap: wrap !important; gap: 8px; } .rh-actions > * { flex: 1 1 calc(50% - 8px); min-width: 130px; padding-inline: 10px; white-space: nowrap; } }
