/* Cash slips (acc-slip.js): one A4 sheet, the same slip twice with a cut line
   between. Sized in millimetres because it is drawn to the paper, not the
   screen. It wears the contract's design (acc-contract.css) in half the height,
   and the voucher's kind sets its colours where a brand sets the contract's:
   green receipt, red payment, which print as a dark grey on a mono laser. The
   fills are forced, since browsers drop backgrounds. */
.pslip{
  --slip-accent:#96ca0d;--slip-ink:#067647;--slip-fill:#f1f8ea;--slip-soft:#5b6270;--slip-line:#cfd5df;
  position:relative;box-sizing:border-box;width:210mm;height:296mm;overflow:hidden;
  background:#fff;color:#16181d;font-size:9.5pt;line-height:1.4;
  font-family:'IBM Plex Sans','Noto Naskh Arabic',sans-serif;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.pslip--out{--slip-accent:#ed1b24;--slip-ink:#b42318;--slip-fill:#fdf1f0}
.pslip *{box-sizing:border-box}
.pslip .ltr{direction:ltr;unicode-bidi:isolate}
.pslip__copy{height:148mm;padding:9mm 12mm 6mm;display:flex;flex-direction:column}
.pslip__cut{position:absolute;inset-inline:0;top:148mm;border-top:1px dashed #8a9099}
.pslip__cut span{position:absolute;inset-inline-start:7mm;top:-2.4mm;padding:0 1.5mm;background:#fff;color:#6b7280;line-height:0}

/* a label in both languages: the ledger's own, the other one under it */
.pslip__lb{display:flex;flex-direction:column;line-height:1.15}
.pslip__lb > span{font-weight:600}
.pslip__lb > i{font-style:normal;font-size:.72em;color:var(--slip-soft);margin-top:.3mm}

/* the letterhead: the contract's accent bar over a deep rule */
.pslip__head{position:relative;display:grid;grid-template-columns:1.4fr auto 1fr;align-items:center;gap:4mm;
  padding:2mm 0;border-top:3px solid var(--slip-accent);border-bottom:1.6px solid var(--slip-ink)}
.pslip__head::after{content:"";position:absolute;inset-inline-start:0;bottom:-4px;width:30mm;height:2.4px;background:var(--slip-accent)}
.pslip__brand{display:flex;align-items:center;gap:2.5mm;min-width:0}
.pslip__logo{width:12.5mm;height:12.5mm;border-radius:1.6mm;object-fit:contain;flex:0 0 auto}
.pslip__co{font-family:'Noto Kufi Arabic',sans-serif;font-size:8.6pt;font-weight:700;color:var(--slip-ink);line-height:1.45}
.pslip__en{font-size:6.6pt;letter-spacing:.14em;text-transform:uppercase;color:var(--slip-soft);line-height:1.3}
.pslip__addr{font-size:6.4pt;color:var(--slip-soft);line-height:1.3;margin-top:.3mm}
.pslip__addr .ltr{display:block}
.pslip__title{text-align:center;padding:0 2mm}
.pslip__title h1{margin:0;font-family:'Noto Kufi Arabic',sans-serif;font-size:16pt;font-weight:700;color:var(--slip-ink);line-height:1.45;white-space:nowrap}
.pslip__title div{font-size:6.8pt;letter-spacing:.2em;text-transform:uppercase;color:var(--slip-soft)}
/* The English title is the longer one, and under it the Arabic must not be spaced apart. */
[dir="ltr"] .pslip__title h1{font-size:13.5pt}
[dir="ltr"] .pslip__title div{letter-spacing:0;font-size:8pt}
.pslip__ident{justify-self:end;text-align:end}
.pslip__tag{display:inline-block;background:var(--slip-ink);color:#fff;font-size:7pt;font-weight:600;
  padding:.7mm 2.6mm;border-radius:1.2mm;margin-bottom:1.2mm}
.pslip__ident table{border-collapse:collapse;margin-inline-start:auto}
.pslip__ident th{padding:.3mm 0;padding-inline-end:3mm;font-size:7.5pt;font-weight:400;color:var(--slip-soft);text-align:start}
.pslip__ident td{padding:.3mm 0;font-size:10pt;text-align:end;white-space:nowrap}

.pslip__body{display:flex;gap:6mm;margin-top:4.5mm;align-items:flex-start}
.pslip__rows{flex:1 1 auto;min-width:0}
.pslip__row{display:flex;align-items:flex-end;gap:3mm;min-height:8.4mm;padding-top:1mm}
.pslip__row > .pslip__lb{flex:0 0 36mm;font-size:8.5pt}
.pslip__val{flex:1 1 auto;min-width:0;min-height:6mm;padding:0 1mm .8mm;border-bottom:1px dotted #8a93a3;
  font-size:10.5pt;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pslip__row.is-party .pslip__val{font-size:11.5pt;font-weight:700}
.pslip__row.is-words .pslip__val,
.pslip__row.is-being .pslip__val{white-space:normal;font-size:9.5pt;font-weight:500;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.pslip__amt{flex:0 0 46mm;margin-top:1mm;padding:2.4mm 3mm;text-align:center;
  border:1px solid var(--slip-line);border-top:3px solid var(--slip-ink);border-radius:2mm;background:var(--slip-fill)}
.pslip__amt .pslip__lb{align-items:center;font-size:8pt}
.pslip__amt b{display:block;margin-top:1.2mm;font-size:17pt;font-weight:700;color:var(--slip-ink);font-variant-numeric:tabular-nums;white-space:nowrap}

.pslip__lines{width:100%;border-collapse:collapse;margin-top:3mm;font-size:8.5pt}
.pslip__lines th{padding:1mm 2mm;text-align:start;border:1px solid var(--slip-ink);background:var(--slip-ink);color:#fff}
.pslip__lines th .pslip__lb{font-size:7.5pt}
.pslip__lines th .pslip__lb > i{color:#fff;opacity:.8}
.pslip__lines td{padding:.9mm 2mm;border:1px solid var(--slip-line);vertical-align:top}
.pslip__lines .num{text-align:end;white-space:nowrap;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.pslip__lines th.num .pslip__lb{align-items:flex-end}
.pslip__n{width:7mm;color:var(--slip-soft)}

/* Two signatures and no stamp: the office signs, it does not stamp (19 Nov 2026). */
.pslip__signs{margin-top:auto;display:grid;grid-template-columns:1fr 1fr;gap:12mm;align-items:end;padding-top:3mm}
.pslip__sig > .pslip__lb{font-size:8pt}
.pslip__sig > .pslip__lb:last-child{font-size:7.5pt;margin-top:1mm}
.pslip__sig > .pslip__lb:last-child > span{font-weight:500}
.pslip__who{min-height:5.5mm;margin-top:1.2mm;font-size:10pt;font-weight:700}
.pslip__who i{font-style:normal;font-weight:400;font-size:7.5pt;color:var(--slip-soft);margin-inline-start:2mm}
.pslip__who.is-blank{border-bottom:1px dotted #8a93a3}
.pslip__line{height:10mm;border-bottom:1px solid #16181d}
.pslip__foot{display:flex;justify-content:space-between;gap:4mm;margin-top:2.5mm;padding-top:1.2mm;
  border-top:.5px solid var(--slip-line);font-size:6.8pt;color:var(--slip-soft)}

/* More lines than half a sheet holds: each copy on a page of its own. */
.pslip--long{height:auto;overflow:visible}
.pslip--long .pslip__copy{height:auto;min-height:296mm}
.pslip--long .pslip__copy + .pslip__copy{break-before:page;page-break-before:always}

/* The Print Centre preview: the real sheet, scaled to the pane. */
.prtpreview .pdoc:has(.pslip){max-width:none;width:max-content;padding:0}
.prtpreview .pslip{zoom:.86}
@media (max-width:860px){ .prtpreview .pslip{zoom:.44} }

/* A second action in a dialog footer, beside the primary one. Still an .ok, so
   app.js holds the dialog while it works. */
body.acc-fullscreen .mdl__f .ok.ok--soft{background:#fff;color:var(--acc-accent-deep);box-shadow:inset 0 0 0 1.5px var(--acc-accent-deep)}

/* An invoice row's Pay balance: worded, not an icon alone, and green at rest —
   it is the one action that brings money in. */
body.acc-fullscreen .accibtn--pay{display:inline-flex;align-items:center;gap:4px;vertical-align:middle;
  color:var(--acc-green);font-weight:600;font-size:calc(12.5px * var(--acc-fs,1));margin-inline-end:2px}
body.acc-fullscreen .accibtn--pay:hover{background:var(--acc-hover);color:var(--acc-green)}
