.ksef-payment { min-width:136px; }
.ksef-paid-form { display:block; width:auto; min-width:0; max-width:none; margin:0; padding:0; border:0; background:transparent; }
.ksef-paid-check { position:relative; display:inline-flex; align-items:center; gap:7px; min-height:28px; margin:0; color:var(--muted); font-size:12px; font-weight:600; white-space:nowrap; cursor:pointer; }
.ksef-paid-check--paid { color:#087862; }
.ksef-paid-checkbox { position:absolute; width:21px; height:21px; margin:0; opacity:0; cursor:pointer; }
.ksef-paid-checkbox-ui { pointer-events:none; position:relative; display:inline-flex; align-items:center; justify-content:center; flex:0 0 21px; width:21px; height:21px; border:1.5px solid #738395; border-radius:4px; background:var(--surface); box-sizing:border-box; transition:background .12s ease; }
.ksef-paid-checkbox:focus-visible + .ksef-paid-checkbox-ui { outline:2px solid var(--accent); outline-offset:3px; }
.ksef-paid-checkbox:checked + .ksef-paid-checkbox-ui { border-color:#087862; background:#087862; }
.ksef-paid-checkbox:checked + .ksef-paid-checkbox-ui::after { content:""; width:9px; height:5px; border-left:2px solid #fff; border-bottom:2px solid #fff; transform:translateY(-1px) rotate(-45deg); }
.ksef-payment-date { display:block; width:fit-content; margin:2px 0 0 28px; color:var(--muted); font-size:11px; font-weight:500; text-decoration:underline dotted; text-underline-offset:3px; font-variant-numeric:tabular-nums; }
.ksef-payment-date:hover { color:var(--accent); }
.ksef-payment-history { max-width:680px; margin:0 auto; overflow-wrap:anywhere; }
.ksef-payment-history-list { list-style:none; padding:0; margin:16px 0; }
.ksef-payment-history-list li { display:grid; gap:4px; padding:12px 0; border-bottom:1px solid var(--line); font-size:13px; }
.ksef-payment-history-list time { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.ksef-history-pagination { display:flex; align-items:center; gap:12px; justify-content:space-between; }
@media (pointer:coarse) { .ksef-paid-check { min-height:44px; } .ksef-payment-date { padding:12px 0; } }

.ksef-paid-form.is-saving { opacity:.55; pointer-events:none; }
.ksef-paid-form.is-error .ksef-paid-checkbox-ui { outline:2px solid #b42318; outline-offset:2px; }
/* Approved labelled payment checkbox, shared by KSeF and projects. */
:root[data-theme="dark"] .ksef-paid-check--paid { color:#82d9c1; }
:root[data-theme="dark"] .ksef-paid-checkbox-ui { border-color:#8595a8; background:#172331; }
:root[data-theme="dark"] .ksef-paid-checkbox:checked + .ksef-paid-checkbox-ui { border-color:#38b797; background:#38b797; }
:root[data-theme="dark"] .ksef-paid-checkbox:checked + .ksef-paid-checkbox-ui::after { border-color:#092b23; }
