
.clients-head{align-items:flex-end}
.clients-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}
.clients-kpis article{padding:18px 20px}
.clients-kpis small,.clients-kpis span{display:block;color:#7582a9}
.clients-kpis strong{display:block;margin:5px 0;color:#33479a;font-size:1.7rem}
.clients-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;margin-bottom:14px}
.clients-search{display:flex;align-items:center;gap:9px;flex:1;max-width:680px;padding:0 12px;border:1px solid #d4dfee;border-radius:13px;background:#fff}
.clients-search input{width:100%;min-height:42px;border:0!important;outline:0;background:transparent}
.clients-table-card{padding:0;overflow:hidden}
.clients-table{width:100%;border-collapse:collapse}
.clients-table th{padding:13px 14px;text-align:left;color:#7180aa;font-size:.74rem;background:#f6f9fd;border-bottom:1px solid #e2e9f2}
.clients-table td{padding:13px 14px;border-bottom:1px solid #edf1f6;vertical-align:middle}
.clients-table tr.is-inactive{opacity:.68;background:#fafafa}
.client-person{display:flex;align-items:center;gap:10px;min-width:220px}
.client-person>span{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#e8f7f4;color:#128c7d;font-weight:900}
.client-person strong,.client-person small,.clients-table td>small{display:block}
.client-person strong{color:#33479a}.client-person small,.clients-table td>small{margin-top:3px;color:#7c88aa;font-size:.74rem}
.client-state,.client-debt{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:.73rem;font-weight:900}
.client-state.active{background:#e7f8f1;color:#14725d}.client-state.inactive{background:#f0f2f5;color:#667085}
.client-debt{background:#eef4ff;color:#40579f}.client-debt.has-debt{background:#fff0f0;color:#b33745}
.client-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.client-actions form{margin:0}
.clients-empty{padding:28px;text-align:center;color:#7380a6}
.client-edit-modal{max-width:760px;width:min(760px,calc(100vw - 28px))}
.sale-customer-box{margin:14px 0;padding:16px;border:1px solid #d4dfed;border-radius:18px;background:#fbfdff}
.sale-customer-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:13px}
.sale-customer-heading h3{margin:4px 0;color:#34469a}.sale-customer-heading p{margin:0;color:#7582ad;line-height:1.45}
.sale-selected-customer{margin-top:12px}
@media(max-width:900px){.clients-kpis{grid-template-columns:1fr}.clients-toolbar{align-items:stretch;flex-direction:column}.clients-search{max-width:none}.clients-table{min-width:900px}}
@media(max-width:620px){.sale-customer-heading{display:grid}.sale-customer-heading .btn{width:100%}}


/* RepuestoApp · cliente directo en el POS */
.sale-customer-direct{
  padding:16px 17px!important;
}
.customer-direct-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 14px;
}
.customer-direct-grid label{
  min-width:0;
  margin:0!important;
}
.customer-direct-grid input{
  width:100%;
  min-height:42px;
  box-sizing:border-box;
}
.customer-direct-grid input.is-autofilled{
  background:#f1f8f5;
  border-color:#b8dccd;
  color:#315b50;
}

.customer-document-search{
  display:flex;
  align-items:center;
  gap:8px;
}
.customer-document-search input{
  flex:1 1 auto;
  min-width:0;
}
.customer-document-search .btn{
  flex:0 0 auto;
  min-height:42px;
  white-space:nowrap;
}
.customer-lookup-status{
  display:block;
  width:100%;
  margin-top:8px;
  padding:10px 12px;
  box-sizing:border-box;
  border-radius:11px;
  font-size:.86rem;
  font-weight:800;
  line-height:1.3;
}
.customer-lookup-status[hidden]{
  display:none!important;
}
.customer-lookup-status.is-loading{
  background:#f4f7ff;
  border:1px solid #d4dcf6;
  color:#4d5f94;
}
.customer-lookup-status.is-success{
  background:#e9f8f2;
  border:1px solid #c1e6d7;
  color:#176b59;
}
.customer-lookup-status.is-error{
  background:#fff5f5;
  border:1px solid #efd1d5;
  color:#a83b49;
}
.customer-direct-help{
  display:block;
  margin-top:9px;
  color:#7884a7;
  line-height:1.4;
}
.customer-lookup-data{
  display:none!important;
}
.new-customer-credit-limit{
  display:block;
  margin-bottom:13px!important;
  padding:12px 13px;
  border:1px solid #d8e2ef;
  border-radius:13px;
  background:#f9fbfe;
}
.new-customer-credit-limit[hidden]{
  display:none!important;
}

@media(max-width:680px){
  .customer-direct-grid{
    grid-template-columns:1fr;
  }
}

/* RepuestoApp 7.16D · búsqueda/registro de cliente estilo FerreApp */
.customer-required-tag{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  padding:6px 10px;border-radius:999px;background:#eef3ff;color:#40559f;
  font-size:.72rem;font-weight:900;letter-spacing:.02em
}
.customer-document-search-ferre{align-items:flex-end;margin-top:4px}
.customer-document-search-ferre .customer-document-field{flex:1 1 auto;margin:0!important}
.customer-document-search-ferre .customer-document-field input{margin-top:6px}
.customer-document-search-ferre .btn{min-width:108px}
.quick-customer-panel{
  margin-top:12px;padding:15px;border:1px solid #d7e1ee;border-radius:15px;
  background:#f8fbff
}
.quick-customer-panel[hidden],.customer-selected-summary[hidden]{display:none!important}
.quick-customer-panel h4{margin:0 0 5px;color:#33479a;font-size:1rem}
.quick-customer-panel .customer-register-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0}
.quick-customer-panel .btn{margin-top:2px}
.customer-selected-summary{
  display:flex;align-items:center;gap:11px;margin-top:12px;padding:12px 13px;
  border:1px solid #bfe3d6;border-radius:14px;background:#ecf9f4;color:#285f52
}
.customer-selected-icon{
  width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;
  border-radius:50%;background:#d4f2e7;color:#13715c;font-weight:950
}
.customer-selected-summary strong,.customer-selected-summary span{display:block}
.customer-selected-summary strong{color:#215e50}
.customer-selected-summary span{margin-top:2px;font-size:.8rem;color:#54766e}
.customer-direct-footnote{margin-top:12px}

@media(max-width:760px){
  .quick-customer-panel .customer-register-grid{grid-template-columns:1fr}
  .customer-document-search-ferre{align-items:stretch;flex-direction:column}
  .customer-document-search-ferre .btn{width:100%}
  .customer-required-tag{align-self:flex-start}
}
