
/* V438L - Customer debt summary */
.v438l-customer-debt-summary{
  border-radius:12px;
}
.v438l-summary-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.v438l-summary-total{
  flex:none;
  text-align:right;
}
.v438l-summary-total span{
  display:block;
  font-size:8px;
  color:var(--muted-foreground);
}
.v438l-summary-total strong{
  display:block;
  margin-top:3px;
  font-size:18px;
  font-variant-numeric:tabular-nums;
}
.v438l-tools{
  display:grid;
  grid-template-columns:minmax(240px,1fr) 180px 120px;
  gap:8px;
  margin-bottom:10px;
}
.v438l-search,
.v438l-select{
  height:34px;
  min-width:0;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--background);
  color:var(--foreground);
  padding:0 9px;
  font-size:8.5px;
}
.v438l-table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.v438l-table{
  width:100%;
  min-width:1080px;
  border-collapse:collapse;
}
.v438l-table th,
.v438l-table td{
  padding:9px 8px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:middle;
  font-size:9px;
}
.v438l-table th{
  color:var(--muted-foreground);
  font-size:7.8px;
  font-weight:700;
  white-space:nowrap;
}
.v438l-table .num,
.v438l-table .money{
  text-align:right;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.v438l-table .paid{
  color:#15803d;
}
.v438l-table .debt{
  color:#b91c1c;
  font-weight:800;
}
.v438l-customer-name strong{
  display:block;
  font-size:9px;
}
.v438l-customer-name small{
  display:block;
  margin-top:2px;
  color:var(--muted-foreground);
  font-size:7px;
}
.v438l-age{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:2px 6px;
  border-radius:999px;
  background:var(--muted);
  font-size:7px;
  font-weight:700;
  white-space:nowrap;
}
.v438l-age.warning{
  background:#fef3c7;
  color:#b45309;
}
.v438l-age.danger{
  background:#fee2e2;
  color:#b91c1c;
}
.v438l-detail-btn{
  height:30px!important;
  padding:0 8px!important;
  font-size:8px!important;
}
.v438l-mobile-list{
  display:none;
}
.v438l-pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}
.v438l-pagination>span{
  font-size:7.8px;
  color:var(--muted-foreground);
}
.v438l-pagination>div{
  display:flex;
  align-items:center;
  gap:6px;
}
.v438l-pagination strong{
  min-width:48px;
  text-align:center;
  font-size:8px;
}
.v438l-pagination button{
  height:30px!important;
  font-size:8px!important;
}
.v438l-empty{
  padding:20px 10px;
  border:1px dashed var(--border);
  border-radius:8px;
  text-align:center;
  color:var(--muted-foreground);
  font-size:8.5px;
}

@media(max-width:760px){
  .v438l-customer-debt-summary{
    padding:10px!important;
    border-radius:10px;
  }
  .v438l-summary-head{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
    margin-bottom:9px;
  }
  .v438l-summary-head h3{
    font-size:11px!important;
  }
  .v438l-summary-head p{
    font-size:7.2px!important;
    line-height:1.4!important;
  }
  .v438l-summary-total{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    text-align:left;
    padding:8px 9px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--background);
  }
  .v438l-summary-total strong{
    margin:0;
    font-size:14px;
  }
  .v438l-tools{
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
  .v438l-search{
    grid-column:1/-1;
  }
  .v438l-search,
  .v438l-select{
    width:100%;
    height:36px;
    font-size:8px;
  }
  .v438l-table-wrap{
    display:none;
  }
  .v438l-mobile-list{
    display:flex;
    flex-direction:column;
    gap:7px;
  }
  .v438l-card{
    padding:10px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--background);
  }
  .v438l-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:8px;
    padding-bottom:8px;
    border-bottom:1px solid var(--border);
  }
  .v438l-card-head>div{
    min-width:0;
  }
  .v438l-card-head strong{
    display:block;
    font-size:10px;
    line-height:1.3;
    overflow-wrap:anywhere;
  }
  .v438l-card-head small{
    display:block;
    margin-top:2px;
    color:var(--muted-foreground);
    font-size:7px;
    line-height:1.3;
  }
  .v438l-card-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    margin-top:8px;
    border:1px solid var(--border);
    border-radius:8px;
    overflow:hidden;
  }
  .v438l-card-grid>div{
    min-width:0;
    padding:8px;
    border-right:1px solid var(--border);
    border-bottom:1px solid var(--border);
  }
  .v438l-card-grid>div:nth-child(2n){
    border-right:0;
  }
  .v438l-card-grid>div:nth-last-child(-n+2){
    border-bottom:0;
  }
  .v438l-card-grid span{
    display:block;
    font-size:6.7px;
    color:var(--muted-foreground);
  }
  .v438l-card-grid b{
    display:block;
    margin-top:4px;
    font-size:9px;
    line-height:1.25;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
  }
  .v438l-card-grid .debt b{
    color:#b91c1c;
    font-size:10px;
  }
  .v438l-card-button{
    width:100%!important;
    height:34px!important;
    margin-top:8px;
    font-size:8px!important;
  }
  .v438l-pagination{
    flex-direction:column;
    align-items:stretch;
    gap:7px;
  }
  .v438l-pagination>span{
    text-align:center;
    font-size:7.2px;
  }
  .v438l-pagination>div{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    width:100%;
  }
  .v438l-pagination button{
    width:100%!important;
    height:34px!important;
  }
}

@media(max-width:390px){
  .v438l-tools{
    grid-template-columns:1fr;
  }
  .v438l-search{
    grid-column:auto;
  }
  .v438l-card-grid{
    grid-template-columns:1fr;
  }
  .v438l-card-grid>div{
    border-right:0!important;
    border-bottom:1px solid var(--border)!important;
  }
  .v438l-card-grid>div:last-child{
    border-bottom:0!important;
  }
}
