/* «روابط الدفع» — list (payment-links.js) + create sheet (payment-links-form.js). Chips/KPIs reuse deferred-pay.css. */
.pl-bar select{min-width:160px}
.pl-kpi--ok b{color:#15803d}
.pl-table td{vertical-align:top}
.pl-ref{font-weight:700;font-size:.85rem}
.pl-num{white-space:nowrap;font-weight:700}
.pl-st{display:inline-block;border-radius:99px;padding:.1rem .6rem;font-size:.78rem;font-weight:700;background:#eef2f7;color:#475467}
.pl-st--ACTIVE{background:#fff4e0;color:#b45309}
.pl-st--PAID{background:#dcfce7;color:#15803d}
.pl-st--REVIEW{background:#fee2e2;color:#b91c1c}
.pl-st--FAILED{background:#fee2e2;color:#b91c1c}
.pl-st--TEST{background:#e0f2fe;color:#0369a1}
.pl-posted{font-weight:700}
.pl-posted--ok{color:#15803d}
.pl-posted--warn{color:#b45309}
.pl-acts{display:flex;flex-wrap:wrap;gap:.35rem;justify-content:flex-end}
.pl-acts .btn{white-space:nowrap}
.pl-danger{color:#b91c1c}
.pl-empty{padding:2rem 1rem;line-height:1.9}

/* create sheet */
.pl-form{display:flex;flex-direction:column;gap:.2rem;min-width:min(560px,86vw)}
.pl-sec{border:1px solid var(--line);border-radius:12px;padding:.85rem .95rem .1rem;margin-bottom:.8rem;background:#fff}
.pl-sec h4{font-size:.92rem;margin-bottom:.6rem;color:var(--dark)}
.pl-test{background:#e0f2fe;color:#075985;border-radius:10px;padding:.55rem .8rem;margin-bottom:.8rem;font-size:.86rem}
.pl-phone{display:flex;gap:.4rem;direction:ltr}
.pl-phone input{flex:1;min-width:0}
.pl-phone select{width:auto}
.pl-find{position:relative}
.pl-hits{position:absolute;inset-inline:0;top:100%;z-index:5;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);max-height:260px;overflow:auto}
.pl-hit{display:flex;flex-direction:column;align-items:flex-start;width:100%;border:0;background:none;padding:.5rem .8rem;text-align:start;font:inherit;cursor:pointer}
.pl-hit:hover,.pl-hit:focus-visible{background:#fff7ea;outline:none}
.pl-hit small{color:var(--muted)}
.pl-hit--none{color:var(--muted);cursor:default}
.pl-opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin-bottom:.9rem}
.pl-opt{display:flex;gap:.55rem;align-items:flex-start;border:1px solid var(--line);border-radius:10px;padding:.6rem .7rem;cursor:pointer;transition:border-color .15s,background .15s}
.pl-opt:hover{border-color:var(--orange)}
.pl-opt:has(input:checked){border-color:var(--orange);background:#fff7ea}
.pl-opt input{margin-top:.35rem;accent-color:var(--orange-d)}
.pl-opt b{display:block;font-size:.9rem}
.pl-opt small{color:var(--muted);font-size:.78rem;line-height:1.5}
.pl-hint{display:block;color:var(--muted);font-size:.82rem;margin:-.4rem 0 .8rem}
.pl-err{background:#fee2e2;color:#991b1b;border-radius:10px;padding:.55rem .8rem;font-weight:700}

/* created */
.pl-done{text-align:center;min-width:min(480px,86vw)}
.pl-done__amt{font-size:1.6rem;font-weight:800;margin-bottom:.4rem}
.pl-done__amt small{display:block;font-size:.85rem;font-weight:600;color:var(--muted)}
.pl-url{display:flex;gap:.4rem;margin:.9rem 0 .6rem;direction:ltr}
.pl-url input{flex:1;min-width:0;font-size:.85rem}
.pl-done .pl-hint{margin:0}

@media (max-width:640px){
  .pl-opts{grid-template-columns:1fr}
  .pl-form .frow{grid-template-columns:1fr}
  .pl-bar input,.pl-bar select{min-width:0;width:100%}
}
.pl-opt.is-off{opacity:.55;cursor:not-allowed}
.pl-opt.is-off:hover{border-color:var(--line)}
.pl-bad{color:#b42318}
