.non-client-payers-card,.non-client-payer-form-card { margin-bottom:16px; padding:20px; }
.non-client-payer-form-card { display:grid; grid-template-columns:minmax(250px,.52fr) minmax(520px,1.48fr); gap:32px; align-items:start; }
.non-client-payer-form-card > div { padding-top:2px; }
.non-client-payer-form-card h2 { margin:0 0 10px; }
.non-client-payer-form-card p { max-width:360px; margin:0; line-height:1.45; }
.non-client-payer-form { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; align-items:end; }
.non-client-form-fields { display:grid; grid-template-columns:minmax(260px,1fr) minmax(210px,.46fr); gap:14px; }
.non-client-payer-form label { margin:0; }
.non-client-payer-form label span { display:block; margin-bottom:6px; color:#64748b; font-size:12px; font-weight:850; text-transform:uppercase; letter-spacing:.03em; }
.non-client-form-fields .wide { grid-column:1 / -1; }
.non-client-payer-form :is(input,textarea) { width:100%; min-width:0; margin:0; padding:11px 13px; border:1px solid #cfd9e7; border-radius:12px; outline:0; background:var(--card,#fff); color:var(--text,#0f172a); font:inherit; font-size:14px; line-height:1.35; transition:border-color .16s ease,box-shadow .16s ease; }
.non-client-payer-form :is(input,textarea):focus { border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.13); }
.non-client-payer-form input { min-height:44px; }
.non-client-payer-form textarea { min-height:80px; resize:vertical; }
.non-client-payer-form button { min-height:44px; margin:0; justify-self:end; padding-inline:22px; }
.non-client-payer-table { min-width:720px; }
.non-client-payer-table th:nth-child(1) { width:28%; }
.non-client-payer-table th:nth-child(2) { width:150px; }
.non-client-payer-table th:nth-child(3) { width:auto; }
.non-client-payer-table th:nth-child(4) { width:170px; }
.non-client-payer-table th:nth-child(5) { width:190px; }
.non-client-actions { display:flex; gap:8px; align-items:flex-start; justify-content:flex-end; }
.non-client-actions details { position:relative; }
.non-client-actions summary { list-style:none; cursor:pointer; white-space:nowrap; }
.non-client-actions summary::-webkit-details-marker { display:none; }
.non-client-edit-form { position:absolute; z-index:8; right:0; top:calc(100% + 8px); width:min(420px,80vw); padding:14px; display:grid; gap:10px; background:var(--surface,#fff); border:1px solid var(--line,#dbe2ea); border-radius:14px; box-shadow:0 18px 45px rgba(15,23,42,.16); }
.non-client-edit-form label span { display:block; margin-bottom:5px; color:#64748b; font-size:11px; font-weight:850; text-transform:uppercase; }
.non-client-edit-form textarea { min-height:64px; resize:vertical; }
@media (max-width:980px) {
  .non-client-payer-form-card { grid-template-columns:1fr; gap:18px; }
  .non-client-payer-form-card p { max-width:none; }
}
@media (max-width:720px) {
  .payment-page { padding:10px; }
  .payment-page .receipt-heading { gap:12px; margin-bottom:12px; }
  .payment-page .receipt-heading h1 { font-size:26px; }
  .payment-page .receipt-heading p { font-size:14px; line-height:1.4; }
  .payment-page .receipt-tabs { width:100%; display:grid; grid-template-columns:1fr 1.25fr .8fr; gap:4px; padding:4px; overflow:visible; }
  .payment-page .receipt-tabs .history-tab { min-width:0; padding:9px 6px; font-size:13px; }
  .non-client-payers-card,.non-client-payer-form-card { padding:16px; border-radius:18px; }
  .non-client-payers-card .crm-heading h2,.non-client-payer-form-card h2 { font-size:22px; }
  .non-client-payers-card .crm-heading p,.non-client-payer-form-card p { font-size:14px; line-height:1.4; }
  .non-client-payer-table-wrap { overflow:visible; }
  .payment-table.non-client-payer-table { width:100%; min-width:0; display:block; }
  .non-client-payer-table thead { display:none; }
  .non-client-payer-table tbody,.non-client-payer-table tr,.non-client-payer-table td { display:block; width:100%; }
  .non-client-payer-table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 14px; padding:13px 0; border-bottom:1px solid var(--line); }
  .non-client-payer-table tr:last-child { border-bottom:0; }
  .non-client-payer-table td { padding:0; border:0; }
  .non-client-payer-table td::before { display:none; }
  .non-client-payer-table td[data-label="Название"] { grid-column:1; font-size:16px; }
  .non-client-payer-table td[data-label="ИНН"] { grid-column:2; grid-row:1; align-self:center; font-variant-numeric:tabular-nums; }
  .non-client-payer-table td[data-label="Комментарий"] { grid-column:1 / -1; color:var(--muted); font-size:13px; }
  .non-client-payer-table td[data-label="Комментарий"]::before { content:"Комментарий: "; display:inline; font-weight:800; }
  .non-client-payer-table td[data-label="Кто добавил"] { display:none; }
  .non-client-payer-table .non-client-actions { grid-column:1 / -1; justify-content:flex-start; margin-top:4px; }
  .non-client-edit-form { position:fixed; inset:auto 12px 12px; width:auto; max-height:calc(100vh - 90px); overflow:auto; }
  .non-client-payer-form-card { grid-template-columns:1fr; gap:12px; }
  .non-client-payer-form { grid-template-columns:1fr; }
  .non-client-form-fields { grid-template-columns:1fr; gap:2px; }
  .non-client-form-fields .wide { grid-column:auto; }
  .non-client-payer-form input,.non-client-payer-form textarea { width:100%; min-height:44px; }
  .non-client-payer-form textarea { min-height:84px; }
  .non-client-payer-form button { width:100%; margin:2px 0 0; justify-self:stretch; }
}
