/* V6.0 - Control de Gastos. Estilos aislados para no alterar los módulos V5.11. */
#expenseControlDashboard{max-width:1240px;margin:auto;padding:25px 20px 60px}
.ec-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-bottom:18px}.ec-hero h2{margin:0 0 5px}.ec-hero p{margin:0;color:#667780;max-width:760px}.ec-top-actions{display:flex;gap:8px;flex-wrap:wrap}
.ec-budget-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.ec-card{background:#fff;border:1px solid #dce5e9;border-radius:16px;padding:16px;box-shadow:0 5px 18px rgba(25,50,65,.04)}.ec-card>span{display:block;font-size:11px;text-transform:uppercase;color:#667780;letter-spacing:.04em}.ec-card>strong{display:block;font-size:22px;margin:6px 0 3px}.ec-card>small{color:#71818a;line-height:1.3}.ec-card.ec-available{background:#eef9f4;border-color:#bfe0d0}.ec-card.ec-remaining{background:#f2f5ff;border-color:#ced8f4}
.ec-panel{background:#fff;border:1px solid #dce5e9;border-radius:18px;padding:20px;margin-top:16px;box-shadow:0 5px 18px rgba(25,50,65,.04)}.ec-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.ec-section-head h3{margin:0 0 4px}.ec-section-head p{margin:0;color:#667780;font-size:12px}.ec-table-wrap{overflow:auto;margin-top:12px}.ec-table{border-collapse:collapse;width:100%;min-width:940px}.ec-table th,.ec-table td{padding:10px 9px;border-bottom:1px solid #e3eaed;text-align:left;font-size:13px;vertical-align:top}.ec-table th{font-size:11px;color:#667780;text-transform:uppercase;white-space:nowrap}.ec-sub{display:block;color:#75858e;margin-top:3px;max-width:260px;white-space:normal}.ec-empty{text-align:center!important;color:#667780;padding:28px!important}
.ec-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.ec-status.active,.ec-status.paid{background:#e4f6ed;color:#176a49}.ec-status.pending{background:#fff3cf;color:#7a5700}.ec-status.overdue{background:#ffe8e8;color:#9e2e2e}.ec-status.off{background:#eef2f4;color:#667780}.ec-actions{display:flex;gap:6px;flex-wrap:wrap}.ec-actions button,.ec-payment-btn{border:1px solid #cfdae0;background:#f6f9fa;border-radius:8px;padding:6px 8px;font-weight:700;cursor:pointer;font-size:11px}.ec-actions .danger{border-color:#e0b7b7;background:#fff5f5;color:#9b2c2c}.ec-payment-btn{background:#1f7a5a;color:#fff;border-color:#1f7a5a}.ec-payment-btn.secondary{background:#edf2f4;color:#26343b;border-color:#d7e0e4}
.ec-note{margin-top:16px;border:1px solid #d7e3df;background:#f6fbf9;border-radius:13px;padding:13px 15px;color:#3d5158;line-height:1.45;font-size:12px}.ec-reminders{border:1px solid #e3c56c;background:#fff9df;border-radius:15px;padding:14px 16px;margin-bottom:16px}.ec-reminders h3{margin:0 0 9px;color:#6a5200}.ec-reminder{display:grid;grid-template-columns:1fr auto auto;gap:12px;padding:8px 0;border-top:1px solid #f0dda0;align-items:center}.ec-reminder:first-of-type{border-top:0}.ec-reminder span{color:#6c6549;font-size:12px}
.ec-dialog{border:0;border-radius:18px;padding:0;width:min(700px,calc(100% - 24px));box-shadow:0 26px 80px rgba(0,0,0,.26)}.ec-dialog::backdrop{background:rgba(12,22,30,.52)}.ec-dialog-body{padding:23px}.ec-dialog-body h3{margin-top:0}.ec-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ec-check-field{display:flex;align-items:flex-end}.ec-check-field label{display:flex;gap:8px;align-items:center;min-height:42px}.ec-check-field input{width:18px;height:18px}.ec-weekdays{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.ec-weekdays label{display:flex;align-items:center;gap:6px;border:1px solid #dce5e9;border-radius:9px;padding:8px;font-size:12px;cursor:pointer}.ec-weekdays input{width:16px;height:16px}.ec-hint{margin:-3px 0 10px;color:#667780;font-size:12px;background:#f7fafb;border-radius:9px;padding:8px 10px}
.ec-nav-btn{background:#386c86;color:#fff}.ec-nav-btn:hover{filter:brightness(.94)}.ec-admin-access{display:grid;gap:7px;min-width:175px}.ec-admin-access label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700}.ec-admin-access input{width:17px;height:17px}.ec-admin-access small{color:#667780;line-height:1.25}
@media(max-width:1000px){.ec-budget-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.ec-budget-grid,.ec-row{grid-template-columns:1fr}.ec-weekdays{grid-template-columns:1fr 1fr}.ec-reminder{grid-template-columns:1fr}.ec-top-actions{width:100%}.ec-top-actions .btn{flex:1}}


/* V6.2 - organización de pagos por semana, quincena o mes */
.ec-payment-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0 10px;padding:12px;background:#f7fafb;border:1px solid #e1e9ec;border-radius:14px}
.ec-group-control,.ec-filter-control{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.ec-group-control>span,.ec-filter-control>span{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#667780;font-weight:800;margin-right:3px}
.ec-group-control button,.ec-filter-control button{border:1px solid #d3dee3;background:#fff;color:#33434b;border-radius:9px;padding:8px 11px;font-size:12px;font-weight:800;cursor:pointer;min-height:36px}.ec-group-control button.active,.ec-filter-control button.active{background:#1f7a5a;color:#fff;border-color:#1f7a5a}
.ec-payments-summary{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}.ec-payments-summary span{background:#fff;border:1px solid #dce5e9;border-radius:999px;padding:6px 10px;font-size:11px;color:#667780}.ec-payments-summary b{color:#26343b}
.ec-payments-table{min-width:900px}.ec-payment-group-row td{padding:0!important;border-bottom:0!important;background:#f4f7f8}.ec-payment-group-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 13px;border-top:1px solid #dfe7ea;border-bottom:1px solid #dfe7ea}.ec-payment-group-head>div:first-child{min-width:230px}.ec-payment-group-head strong{text-transform:capitalize;font-size:14px;color:#24343b}.ec-payment-group-head small{display:block;color:#6b7b83;margin-top:2px}.ec-payment-group-totals{display:flex;gap:14px;flex-wrap:wrap;justify-content:flex-end;font-size:11px;color:#6a7980}.ec-payment-group-totals b{color:#223239}.ec-payment-row td{background:#fff}.ec-date-main{font-size:12px}.ec-frequency-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef2f4;color:#47575f;font-size:11px;font-weight:800}.ec-frequency-badge.weekly{background:#edf7f2;color:#27684e}.ec-frequency-badge.biweekly{background:#f2f1fb;color:#5b5291}.ec-frequency-badge.monthly{background:#fff5e7;color:#8a5c15}
@media(max-width:700px){.ec-payment-toolbar{align-items:stretch}.ec-group-control,.ec-filter-control{width:100%}.ec-group-control button,.ec-filter-control button{flex:1}.ec-payment-group-head{align-items:flex-start;flex-direction:column}.ec-payment-group-totals{justify-content:flex-start}}


/* V6.3 - Gran total del periodo y pago masivo */
.ec-grand-total{
  display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  margin:12px 0 12px;padding:18px 20px;border-radius:16px;
  background:linear-gradient(135deg,#eef9f4,#f8fbfa);border:1px solid #bfe0d0
}
.ec-grand-total-copy{min-width:0}
.ec-grand-total-copy>span{
  display:block;font-size:12px;font-weight:900;letter-spacing:.055em;color:#356651
}
.ec-grand-total-copy>strong{
  display:block;font-size:31px;line-height:1.1;margin:5px 0;color:#163d2d
}
.ec-grand-total-copy>small{display:block;color:#60746b;line-height:1.4}
.ec-pay-all-btn{
  min-height:46px;border:0;border-radius:12px;padding:11px 18px;background:#1f7a5a;color:#fff;
  font-weight:900;cursor:pointer;white-space:nowrap
}
.ec-pay-all-btn:hover:not(:disabled){filter:brightness(.94)}
.ec-pay-all-btn:disabled,.ec-pay-all-btn.done{background:#dce7e2;color:#65766f;cursor:default}
@media(max-width:650px){
  .ec-grand-total{align-items:stretch}
  .ec-pay-all-btn{width:100%}
  .ec-grand-total-copy>strong{font-size:27px}
}


/* V6.7 - Lo que me deben / Lo que debo */
.ec-debt-actions{display:flex;gap:8px;flex-wrap:wrap}
.ec-debt-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 16px}
.ec-debt-summary>div{border:1px solid #dfe8e4;border-radius:14px;padding:14px;background:#fafcfb}
.ec-debt-summary span{display:block;color:#687b72;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.035em}
.ec-debt-summary strong{display:block;font-size:25px;margin-top:5px}
.ec-debt-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;min-width:0}
.ec-debt-columns>div{min-width:0}.ec-debt-columns h4{margin:4px 0 9px}
.ec-debt-pay-btn{border:1px solid #b7d8c8;background:#eff8f4;color:#176146;border-radius:9px;padding:7px 10px;font-weight:800;cursor:pointer;white-space:nowrap}
.ec-rule-note{border:1px dashed #c8d9d1;background:#f8fbfa;border-radius:12px;padding:11px 12px;color:#52675e;font-size:13px;line-height:1.5;margin:4px 0 10px}
.ec-feature-message{border:1px solid #e8d6a6;background:#fff9e9;border-radius:12px;padding:11px 12px;color:#765d18;margin-bottom:12px}
.ec-small-dialog{max-width:620px}
@media(max-width:900px){.ec-debt-columns{grid-template-columns:1fr}}
@media(max-width:600px){.ec-debt-summary{grid-template-columns:1fr}.ec-debt-actions{width:100%}.ec-debt-actions .btn{flex:1}}


/* V6.8 - Catálogo de personas sin duplicados */
.ec-people-registry{
  margin:14px 0 18px;
  padding:14px;
  border:1px solid #dfe8e4;
  border-radius:14px;
  background:#fbfdfc;
}
.ec-people-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.ec-people-head h4{margin:0 0 3px}
.ec-people-head p{margin:0;color:#6b7772;font-size:13px;line-height:1.45}
.ec-people-count{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:5px 10px;
  border-radius:999px;
  background:#eef6f2;
  color:#285c47;
  font-size:12px;
  font-weight:800;
}
.ec-person-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  min-height:28px;
  padding:2px 8px;
  border-radius:999px;
  background:#edf2f0;
  font-weight:800;
}
.ec-people-table th:nth-child(2),
.ec-people-table th:nth-child(3),
.ec-people-table td:nth-child(2),
.ec-people-table td:nth-child(3){text-align:right}
@media(max-width:650px){
  .ec-people-registry{padding:12px}
  .ec-people-head{align-items:stretch}
  .ec-people-count{width:max-content}
}


/* V6.9 - Restaurar y hacer visibles los abonos */
.ec-abono-help{
  margin:14px 0;
  padding:12px 14px;
  border:1px solid #cfe2d9;
  border-radius:12px;
  background:#f3faf7;
  color:#38564a;
  font-size:13px;
  line-height:1.45;
}
.ec-debt-column-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin:4px 0 8px;
}
.ec-debt-column-head h4{margin:0}
.ec-debt-column-head small{color:#697b73}
.ec-debt-table{min-width:760px}
.ec-debt-table th:last-child,
.ec-debt-table td:last-child{
  position:sticky;
  right:0;
  background:#fff;
  z-index:1;
  box-shadow:-7px 0 10px -10px rgba(0,0,0,.35);
}
.ec-debt-table th:last-child{
  background:#f8faf9;
  z-index:2;
}
.ec-debt-pay-btn{
  min-height:40px;
  min-width:118px;
  padding:8px 11px;
}
.ec-received-pay-btn{
  background:#eaf8f1;
  border-color:#9fd4bb;
  color:#125d3f;
}
.ec-paid-pay-btn{
  background:#eef3fb;
  border-color:#b8cae5;
  color:#294f7d;
}
@media(max-width:650px){
  .ec-abono-help{font-size:12px}
  .ec-debt-table{min-width:690px}
  .ec-debt-pay-btn{min-width:112px}
}


/* V6.10 - Gastos divididos entre personas */
.ec-shared-panel{border-color:#d8e5df}
.ec-shared-example{
  margin:10px 0 14px;
  padding:11px 13px;
  border:1px solid #d9e6e0;
  border-radius:12px;
  background:#f7fbf9;
  color:#53675f;
  font-size:12px;
  line-height:1.5;
}
.ec-shared-table{min-width:980px}
.ec-shared-badge{
  display:inline-flex;
  margin-left:7px;
  padding:3px 7px;
  border-radius:999px;
  background:#e7f5ef;
  color:#176146;
  font-size:10px;
  font-weight:900;
  vertical-align:middle;
}
.ec-share-chips{display:flex;flex-wrap:wrap;gap:5px;max-width:360px}
.ec-share-chip{
  display:inline-flex;gap:5px;align-items:center;
  border:1px solid #d5e5dd;
  background:#f7fbf9;
  padding:5px 8px;
  border-radius:999px;
  color:#40584e;
  font-size:11px;
}
.ec-share-chip b{color:#183d2e}
.ec-shared-people-editor{
  margin:14px 0;
  padding:14px;
  border:1px solid #dce7e2;
  border-radius:14px;
  background:#fafcfb;
}
.ec-shared-people-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:10px;
}
.ec-shared-people-head h4{margin:0 0 3px}
.ec-shared-people-head p{margin:0;color:#687970;font-size:12px}
.ec-shared-editor-actions{display:flex;gap:7px;flex-wrap:wrap}
.ec-shared-person-row{
  display:grid;
  grid-template-columns:minmax(180px,1.4fr) minmax(150px,1fr) auto;
  gap:10px;
  align-items:end;
  padding:10px 0;
  border-top:1px solid #e4ece8;
}
.ec-shared-person-row:first-child{border-top:0}
.ec-shared-person-row .field{margin-bottom:0}
.ec-shared-remove{
  min-height:42px;
  border:1px solid #e3bebe;
  background:#fff7f7;
  color:#913737;
  border-radius:9px;
  padding:8px 10px;
  font-weight:800;
  cursor:pointer;
}
.ec-shared-totals{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.ec-shared-totals>div{
  border:1px solid #dfe8e4;
  border-radius:12px;
  background:#fff;
  padding:11px 12px;
}
.ec-shared-totals span{display:block;color:#687970;font-size:11px;font-weight:800;text-transform:uppercase}
.ec-shared-totals strong{display:block;font-size:22px;margin-top:4px}
.ec-shared-hint{display:block;margin-top:8px;color:#687970;line-height:1.45}
.ec-negative-share{color:#a33131!important}
@media(max-width:650px){
  .ec-shared-person-row{grid-template-columns:1fr}
  .ec-shared-remove{width:100%}
  .ec-shared-totals{grid-template-columns:1fr}
  .ec-shared-editor-actions{width:100%}
  .ec-shared-editor-actions .btn{flex:1}
}


/* V6.11 - Menús desplegables en Control de gastos */
.ec-collapse{
  margin:14px 0;
  border:1px solid #dce6e2;
  border-radius:16px;
  background:#fff;
  overflow:hidden;
}
.ec-collapse-summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:68px;
  padding:14px 18px;
  cursor:pointer;
  user-select:none;
  background:#f8fbfa;
}
.ec-collapse-summary::-webkit-details-marker{display:none}
.ec-collapse-summary h3{
  margin:0 0 3px;
  font-size:17px;
  color:#163d2d;
}
.ec-collapse-summary p{
  margin:0;
  color:#697a72;
  font-size:12px;
  line-height:1.4;
}
.ec-collapse-arrow{
  display:inline-grid;
  place-items:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid #cbdad3;
  background:#fff;
  color:#285d48;
  font-size:22px;
  font-weight:800;
  transition:transform .18s ease;
}
.ec-collapse[open]>.ec-collapse-summary{
  border-bottom:1px solid #dce6e2;
  background:#f3f9f6;
}
.ec-collapse[open]>.ec-collapse-summary .ec-collapse-arrow{
  transform:rotate(180deg);
}
.ec-collapse>.ec-panel{
  margin:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.ec-collapse-content{
  padding-top:16px;
}
.ec-collapse-summary:focus-visible{
  outline:3px solid rgba(31,122,90,.25);
  outline-offset:-3px;
}
@media(max-width:650px){
  .ec-collapse-summary{padding:13px 14px;min-height:64px}
  .ec-collapse-summary h3{font-size:16px}
  .ec-collapse-arrow{width:36px;height:36px;flex-basis:36px}
}

.ec-person-summary-btn{border:1px solid #bfd6cb;background:#f3faf7;color:#1f6047;border-radius:8px;padding:7px 10px;font-weight:800;cursor:pointer}.ec-person-quick-totals{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.ec-person-quick-totals>div{padding:12px;border:1px solid #dbe7e1;border-radius:10px}.ec-person-quick-totals b{display:block;font-size:20px}.ec-person-quick-list{display:grid;gap:8px;max-height:50vh;overflow:auto}.ec-person-quick-list>div{display:grid;grid-template-columns:1fr auto auto auto;gap:7px;align-items:center;padding:10px;border:1px solid #dbe7e1;border-radius:10px}.ec-person-quick-list span{font-size:12px;color:#66736e}@media(max-width:700px){.ec-person-quick-list>div{grid-template-columns:1fr 1fr}.ec-person-quick-list>div>b,.ec-person-quick-list>div>span{grid-column:1/-1}}


/* V6.14.10 - Resumen de persona centrado y sin texto recortado */
#ecPersonSummaryDialog.ec-dialog{
  width:min(820px,94vw)!important;
  max-width:820px!important;
  max-height:88vh!important;
  padding:0!important;
  border:0!important;
  border-radius:22px!important;
  overflow:hidden!important;
}
#ecPersonSummaryDialog form{
  padding:22px 24px 20px!important;
  margin:0!important;
  max-height:88vh!important;
  overflow:auto!important;
}
.ec-person-summary-head{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:54px!important;
  padding:2px 52px 10px!important;
  text-align:center!important;
}
.ec-person-summary-head>div{
  width:100%!important;
  text-align:center!important;
}
.ec-person-summary-head small{
  display:block!important;
  line-height:1.25!important;
}
.ec-person-summary-head h3{
  margin:4px 0 0!important;
  line-height:1.25!important;
  font-size:25px!important;
  white-space:normal!important;
  overflow:visible!important;
  word-break:break-word!important;
}
.ec-person-summary-head .ec-dialog-close{
  position:absolute!important;
  right:0!important;
  top:0!important;
}
.ec-person-summary-cards{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  margin:8px 0 16px!important;
}
.ec-person-summary-cards>div{
  text-align:center!important;
  min-height:88px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:13px!important;
}
.ec-person-summary-cards span,
.ec-person-summary-cards strong{
  width:100%!important;
  text-align:center!important;
  overflow:visible!important;
  white-space:normal!important;
}
.ec-person-debt-list{
  gap:12px!important;
  padding:0 2px 2px!important;
}
.ec-person-debt-card{
  padding:15px 16px!important;
}
.ec-person-debt-top{
  align-items:center!important;
}
.ec-person-debt-top>div{
  min-width:0!important;
  flex:1 1 auto!important;
}
.ec-person-debt-top h4{
  line-height:1.3!important;
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
}
.ec-person-debt-top>strong{
  flex:0 0 auto!important;
  font-size:20px!important;
  white-space:nowrap!important;
}
.ec-person-debt-numbers{
  justify-content:center!important;
  text-align:center!important;
}
.ec-person-debt-actions{
  justify-content:center!important;
  align-items:center!important;
}
.ec-person-debt-actions .btn{
  min-height:42px!important;
  line-height:1.2!important;
  white-space:normal!important;
  text-align:center!important;
}
#ecPersonSummaryDialog form>.actions{
  justify-content:center!important;
  margin-top:16px!important;
}
#ecPersonSummaryDialog form>.actions .btn{
  min-width:130px!important;
}

@media(max-width:600px){
  #ecPersonSummaryDialog.ec-dialog{
    width:96vw!important;
    max-height:92vh!important;
    border-radius:18px!important;
  }
  #ecPersonSummaryDialog form{
    padding:17px 14px 16px!important;
    max-height:92vh!important;
  }
  .ec-person-summary-head{
    padding-left:42px!important;
    padding-right:42px!important;
  }
  .ec-person-summary-head h3{font-size:22px!important}
  .ec-person-summary-cards{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  .ec-person-debt-top{
    flex-direction:column!important;
    text-align:center!important;
  }
  .ec-person-debt-top>div{
    width:100%!important;
    text-align:center!important;
  }
  .ec-person-debt-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }
}

/* V6.16.0 — cuentas agrupadas por persona, buscador e historial */
.ec-person-search-wrap{margin:12px 0}
.ec-person-search{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #cfdcd6;border-radius:12px;font-size:14px;background:#fff}
.ec-person-account-row td{background:#f8fbfa!important;padding:0!important}
.ec-person-account-detail{padding:14px 18px;border-top:1px solid #e4ece8}
.ec-account-section h5,.ec-summary-history h4{margin:4px 0 10px}
.ec-account-debt,.ec-history-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #e6eeea}
.ec-account-debt small{display:block;color:#6d7d75;margin-top:3px}
.ec-history-list{max-height:260px;overflow:auto}
.ec-history-item span{min-width:0}.ec-history-item strong{white-space:nowrap;color:#176b49}
.ec-whole-account-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 16px}
.ec-summary-history{margin-top:18px;padding-top:12px;border-top:1px solid #e1e9e5}
.ec-person-summary-dialog{width:min(760px,94vw)}
@media(max-width:640px){.ec-whole-account-actions{grid-template-columns:1fr}.ec-account-debt,.ec-history-item{align-items:flex-start}}

/* V6.16.1 — comprimir/desplegar listas Me deben / Yo debo */
.ec-debt-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.ec-debt-section-head h4{margin:0}
.ec-collapse-btn{border:1px solid #c9ddd3;background:#f2faf6;color:#176a49;border-radius:10px;padding:7px 11px;font-weight:750;cursor:pointer;white-space:nowrap}
.ec-collapse-btn:hover{background:#e6f5ed}

/* V6.16.2 — Me deben / Yo debo agrupado por persona */
.ec-debt-person-head td{background:#f4faf7!important;border-top:2px solid #dbeae3;font-weight:600}
.ec-person-expand-btn{width:30px;height:30px;border:1px solid #bcd9cb;border-radius:9px;background:#fff;color:#176a49;font-size:19px;font-weight:800;cursor:pointer;line-height:1}
.ec-person-expand-btn:hover{background:#eaf7f0}
.ec-grouped-debt-detail td{background:#fff}
.ec-concept-indent{padding-left:34px!important}
.ec-concept-indent>span{color:#6b8d7d;margin-right:5px}

.ec-debt-report-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}
.ec-debt-report-actions .ec-btn{min-height:42px}
@media(max-width:640px){.ec-debt-report-actions .ec-btn{width:100%}}

/* V6.16.6 — compartir/PDF por persona */
.ec-person-row-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.ec-person-share-btn,.ec-person-pdf-btn{border:1px solid #cbd8d1;background:#fff;border-radius:8px;padding:7px 9px;cursor:pointer;font-weight:600}
@media(max-width:640px){.ec-person-row-actions{min-width:190px}}
