.debt-command-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
  margin:4px 0 18px;
}
.debt-command-card{
  min-width:0;
  border:1px solid rgba(231,220,203,.95);
  background:#fffdf8;
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 28px rgba(32,24,12,.05);
}
.debt-command-card span,
.debt-command-card small{
  display:block;
  color:var(--muted,#746d63);
  font-size:.84rem;
  font-weight:850;
}
.debt-command-card strong{
  display:block;
  margin:5px 0 2px;
  font-size:1.2rem;
  line-height:1.12;
  overflow-wrap:anywhere;
}
.debt-command-card.danger{border-color:#ffc7bd;background:#fff4f2}
.debt-command-card.warn{border-color:#f4d18a;background:#fff8e8}
.debt-command-card.info{border-color:#bddcff;background:#f2f8ff}
.debt-command-card.ok{border-color:#b9e8ca;background:#f1fbf4}
.debt-command-card.muted{border-color:#d9d9d9;background:#f7f7f7}
.debt-next-panel{
  border:1px solid rgba(231,220,203,.95);
  background:linear-gradient(180deg,#fffdf8,#fff8eb);
  border-radius:22px;
  padding:14px;
  margin:0 0 18px;
  box-shadow:0 12px 30px rgba(32,24,12,.05);
}
.debt-next-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.debt-next-head span{
  display:block;
  color:#8a6b27;
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.debt-next-head h2{
  margin:2px 0 0;
  font-size:1.22rem;
  line-height:1.12;
}
.debt-next-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:10px;
}
.debt-next-card{
  display:grid;
  gap:9px;
  min-width:0;
  text-decoration:none;
  color:inherit;
  border:1px solid rgba(215,198,170,.88);
  background:#fff;
  border-radius:18px;
  padding:13px;
  box-shadow:0 8px 22px rgba(32,24,12,.04);
}
.debt-next-card div{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.debt-next-card span,
.debt-next-card small{
  display:block;
  color:var(--muted,#746d63);
  font-size:.84rem;
  font-weight:850;
  line-height:1.25;
}
.debt-next-card span{
  text-transform:uppercase;
  letter-spacing:.04em;
}
.debt-next-card strong{
  font-size:1.15rem;
  line-height:1;
  text-align:right;
  overflow-wrap:anywhere;
}
.debt-next-card.danger{border-color:#ffc7bd;background:#fff4f2}
.debt-next-card.warn{border-color:#f4d18a;background:#fff8e8}
.debt-next-card.info{border-color:#bddcff;background:#f2f8ff}
.debt-next-card.ok{border-color:#b9e8ca;background:#f1fbf4}
.debt-next-card.muted{border-color:#d9d9d9;background:#f7f7f7}
.debt-next-card:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(32,24,12,.08)}
.debt-collector-panel{overflow:hidden}
.debt-collector-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:10px;
}
.debt-collector-card{
  min-width:0;
  border:1px solid rgba(231,220,203,.95);
  background:#fffdf8;
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 28px rgba(32,24,12,.05);
}
.debt-collector-card.danger{border-color:#ffc7bd;background:#fff4f2}
.debt-collector-card.warn{border-color:#f4d18a;background:#fff8e8}
.debt-collector-card.ok{border-color:#b9e8ca;background:#f1fbf4}
.debt-collector-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.debt-collector-top span,
.debt-collector-card small,
.debt-doc-chip span,
.debt-doc-chip small{
  display:block;
  color:var(--muted,#746d63);
  font-size:.82rem;
  font-weight:850;
  line-height:1.28;
}
.debt-collector-top span,
.debt-doc-chip span{
  text-transform:uppercase;
  letter-spacing:.04em;
}
.debt-collector-top strong,
.debt-doc-chip strong{
  display:block;
  margin-top:4px;
  line-height:1.08;
  overflow-wrap:anywhere;
}
.debt-collector-top b{
  flex:0 0 auto;
  max-width:45%;
  font-size:1.05rem;
  line-height:1.1;
  text-align:right;
  overflow-wrap:anywhere;
}
.debt-collector-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:10px;
}
.debt-collector-actions .btn{padding:8px 9px}
.customer-bulk-pay{
  display:grid;
  grid-template-columns:minmax(88px,.72fr) minmax(124px,.9fr);
  gap:6px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(32,24,12,.08);
}
.customer-bulk-pay input,
.customer-bulk-pay select{
  min-width:0;
  height:36px;
  padding:6px 8px;
  border-radius:11px;
}
.customer-bulk-pay select,
.customer-bulk-pay .btn,
.customer-bulk-pay .check{
  grid-column:1/-1;
}
.customer-bulk-pay .check{
  margin:0;
  color:var(--muted,#746d63);
  font-size:.78rem;
  font-weight:800;
}
.debt-doc-strip{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:12px 1px 2px;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.debt-doc-strip::-webkit-scrollbar{display:none}
.debt-doc-chip{
  flex:0 0 min(260px,78vw);
  scroll-snap-align:start;
  text-decoration:none;
  color:inherit;
  border:1px solid rgba(231,220,203,.95);
  border-radius:16px;
  background:#fff;
  padding:12px;
}
.debt-doc-chip.danger{border-color:#ffc7bd;background:#fff4f2}
.debt-doc-chip.warn{border-color:#f4d18a;background:#fff8e8}
.debt-doc-chip.muted{background:#fffdf8}
.debt-contact-filter{
  margin-top:-8px;
}
.debt-contact-filter .s360-filter-grid{
  grid-template-columns:minmax(220px,320px) auto;
}
.debt-age-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.debt-age-grid .debt-command-card{text-decoration:none;color:inherit}
body[data-page="debts"] .debt-layout{
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
}
body[data-page="debts"] .debt-mini-table table{
  min-width:560px;
}
body[data-page="debts"] .debt-table{
  border:0;
  background:transparent;
  border-radius:0;
  overflow:auto;
}
body[data-page="debts"] .debt-table table{
  border-collapse:separate;
  border-spacing:0 8px;
  min-width:1080px;
}
body[data-page="debts"] .debt-table thead th{
  border:0;
  background:transparent;
  color:#6f665b;
  font-size:.72rem;
  letter-spacing:.06em;
  padding:4px 12px 6px;
}
body[data-page="debts"] .debt-table tbody td{
  background:#fffdf8;
  border-top:1px solid rgba(231,220,203,.92);
  border-bottom:1px solid rgba(231,220,203,.92);
  padding:13px 12px;
}
body[data-page="debts"] .debt-table tbody td:first-child{
  border-left:1px solid rgba(231,220,203,.92);
  border-radius:16px 0 0 16px;
  min-width:150px;
}
body[data-page="debts"] .debt-table tbody td:last-child{
  border-right:1px solid rgba(231,220,203,.92);
  border-radius:0 16px 16px 0;
}
body[data-page="debts"] .debt-table tbody tr.is-late td{background:#fff4f2}
body[data-page="debts"] .debt-table tbody tr.is-today td{background:#fff8e8}
body[data-page="debts"] .debt-table tbody tr:hover td{background:#fff8eb}
body[data-page="debts"] .debt-table td small{
  display:block;
  margin-top:5px;
  color:var(--muted,#746d63);
  font-weight:800;
}
body[data-page="debts"] .debt-table .row-actions{
  display:block;
  min-width:560px;
}
body[data-page="debts"] .debt-quick-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:8px;
}
body[data-page="debts"] .debt-table .row-actions form{margin:0}
body[data-page="debts"] .debt-table .mini-pay{
  display:grid;
  grid-template-columns:minmax(94px,.7fr) minmax(132px,.85fr) minmax(140px,1fr) auto;
  gap:6px;
  align-items:center;
}
body[data-page="debts"] .debt-table .mini-pay input,
body[data-page="debts"] .debt-table .mini-pay select{
  height:36px;
  padding:6px 8px;
  border-radius:11px;
}
body[data-page="debts"] .debt-table .mini-pay .check{
  grid-column:1/-1;
  margin:0;
  color:var(--muted,#746d63);
  font-size:.78rem;
  font-weight:800;
}
body[data-page="debts"] .debt-table .row-actions .btn{
  min-width:0;
  padding:8px 9px;
}
@media(max-width:1050px){
  .debt-age-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body[data-page="debts"] .debt-layout{
    grid-template-columns:1fr;
  }
}
@media(max-width:560px){
  .debt-contact-filter .s360-filter-grid,
  .debt-age-grid{grid-template-columns:1fr}
  .debt-next-head{align-items:stretch;flex-direction:column}
  .debt-next-head .btn{width:100%}
  .debt-next-grid{
    display:flex;
    overflow-x:auto;
    padding-bottom:8px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .debt-next-grid::-webkit-scrollbar{display:none}
  .debt-next-card{
    flex:0 0 min(82vw,300px);
    scroll-snap-align:start;
  }
  .debt-collector-grid{
    display:flex;
    overflow-x:auto;
    padding-bottom:8px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .debt-collector-grid::-webkit-scrollbar{display:none}
  .debt-collector-card{
    flex:0 0 min(82vw,300px);
    scroll-snap-align:start;
  }
  body[data-page="debts"] .debt-table .row-actions,
  body[data-page="debts"] .debt-table .mini-pay{
    grid-template-columns:1fr;
  }
}
