/* Paged debtor / store directory pages */
.debtor-page{display:grid;gap:18px;max-width:1450px;margin:0 auto;padding-bottom:32px;color:#243962}
.debtor-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.debtor-header h1{margin:0;font-size:clamp(2rem,4vw,3rem);letter-spacing:-.04em}
.debtor-header .eyebrow{margin:0 0 4px;color:var(--nexus-accent, #EE7326);font-size:.78rem;font-weight:850;text-transform:uppercase;letter-spacing:.12em}
.muted{color:#6f7887}.count-pill,.code-pill{display:inline-flex;border-radius:999px;background:#edf2f8;color:#26406e;font-weight:750;padding:7px 12px;white-space:nowrap}
.debtor-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;background:#fff;border:1px solid #dce3ec;border-radius:15px;padding:15px}
.search-box,.page-size{display:grid;gap:6px;font-size:.78rem;font-weight:800;color:#5f6b7d;text-transform:uppercase;letter-spacing:.06em}
.search-box input,.page-size select{border:1px solid #cfd7e3;border-radius:10px;padding:12px 14px;background:#fff;color:#243962;font:inherit;outline:none}
.search-box input:focus,.page-size select:focus{border-color:var(--nexus-accent, #EE7326);box-shadow:0 0 0 3px rgba(236,116,40,.13)}
.debtor-table-wrap{overflow:auto;background:#fff;border:1px solid #dce3ec;border-radius:15px}
.debtor-table{width:100%;border-collapse:collapse;min-width:760px}
.debtor-table th{text-align:left;padding:12px 16px;background:#243f70;color:#fff;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em}
.debtor-table td{padding:13px 16px;border-bottom:1px solid #e9edf3;vertical-align:middle}
.debtor-table tr:last-child td{border-bottom:0}.debtor-table tbody tr:hover{background:#f7f9fc}
.account-link{font-weight:800;color:#243962;text-decoration:none}.account-link:hover{color:#dd681f}.row-action{color:#dd681f;font-weight:750;text-decoration:none;white-space:nowrap}
.debtor-empty{background:#fff;border:1px dashed #cbd4e1;border-radius:15px;padding:30px;text-align:center;color:#6f7887}
.store-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.store-card{display:flex;justify-content:space-between;gap:16px;min-width:0;background:#fff;border:1px solid #dce3ec;border-left:5px solid #51a86c;border-radius:15px;padding:16px 15px;text-decoration:none;color:#243962;box-shadow:0 1px 2px rgba(20,43,77,.03);transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}
.store-card:hover{transform:translateY(-1px);border-color:#b9c4d3;box-shadow:0 5px 15px rgba(20,43,77,.08)}
.store-main{min-width:0}.store-main h3{margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1rem}.store-main p{margin:0;color:#697487}
.store-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.store-meta span{background:#f1f4f8;border-radius:999px;padding:4px 8px;font-size:.75rem;color:#546176}
.store-status{display:grid;grid-template-columns:auto auto;align-items:center;gap:8px;text-align:right}.store-status small{grid-column:1/-1;color:#a34a2a;white-space:nowrap}
.health-pill{display:inline-flex;justify-content:center;min-width:44px;padding:7px 10px;border-radius:999px;color:#fff;font-weight:850}.health-pill.healthy{background:#4ca267}.health-pill.watch{background:#d2932e}.health-pill.risk{background:#c6534e}.health-pill.loading{background:#8793a6;font-size:.72rem}.chevron{color:#bdc6d3;font-size:1.8rem}
.debtor-pager{display:flex;justify-content:center;align-items:center;gap:16px}.debtor-pager button{border:1px solid #ccd5e2;background:#fff;color:#26406e;border-radius:10px;padding:9px 14px;font-weight:750;cursor:pointer}.debtor-pager button:disabled{opacity:.4;cursor:not-allowed}.debtor-pager span{font-weight:750;color:#667286}
@media(max-width:800px){.debtor-header{align-items:center}.debtor-toolbar{grid-template-columns:1fr}.store-grid{grid-template-columns:1fr}.page-size select{width:100%}.debtor-pager{justify-content:space-between}.debtor-pager button{padding:9px 11px}}


/* Field store search responsiveness */
.field-search-box{min-width:0}
.field-search-control{position:relative}
.field-search-control input{width:100%;box-sizing:border-box;padding-right:48px}
.field-search-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:9px;background:#eef2f7;color:#42516a;font-size:1.35rem;line-height:1;cursor:pointer}
.field-search-clear:hover{background:#e2e8f0;color:#dd681f}
.field-search-box small{margin-top:2px;color:#6f7887;font-size:.78rem;font-weight:650;text-transform:none;letter-spacing:0}

.health-pill.open{background:#eef2f7;color:#40516c}

/* Combined Visit and Stock Count status on My stores */
.store-work-status{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.work-chip{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:.7rem;font-weight:800;line-height:1.2;background:#eef3f8;color:#40516b}
.work-chip.visit{background:#e8effb;color:#264d86}
.work-chip.count{background:#fff0df;color:#97530e}
.work-chip.overdue{background:#fdecea;color:#a12a20}
.work-chip.duetoday,.work-chip.grace{background:#fff4d8;color:#8a5b00}
.work-chip.duesoon{background:#e8f2fc;color:#205f91}
.work-chip.upcoming{background:#e7f6ec;color:#1e6b3a}
