/* ════════════════════════════════════════════
   ASSOCIADOS
   ════════════════════════════════════════════ */

/* Filter tab badge (count) */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink-500);
  margin-left: 5px;
  line-height: 1;
}
.tab.active .tab-badge {
  background: rgba(255,255,255,.2);
  color: #fff;
}

/* CAF badge inline in member row */
.caf-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  background: var(--surface-2);
  color: var(--ink-700);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Table footer (count) */
.tbl-footer {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--ink-400);
  border-top: 1px solid var(--line-soft);
  font-weight: 500;
}

/* Expanded split when member selected */
.crm-split-expanded {
  grid-template-columns: 1fr 560px;
}

/* ── Detail 2-column layout ── */
.detail-2col {
  padding: 0;
  overflow: hidden;
}
.d2-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.d2-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.d2-name-block { flex: 1; min-width: 0; }
.d2-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d2-meta {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 2px;
}
.d2-header-actions { display: flex; gap: 4px; flex-shrink: 0; }

.d2-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-width: 0;
}
.d2-col {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.d2-col:first-child {
  border-right: 1px solid var(--line-soft);
}
.d2-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 8px;
}
.d2-info-list { display: flex; flex-direction: column; gap: 7px; }
.d2-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-700);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.d2-info-row svg { flex-shrink: 0; color: var(--ink-400); }
.d2-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.d2-dues-badge {
  font-size: 11px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 6px;
  padding: 2px 8px;
}
.d2-status-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.d2-pay-btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  padding: 9px 12px;
  font-size: 13px;
}
.d2-ok-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: auto;
  white-space: nowrap;
}
.d2-att-list { display: flex; flex-direction: column; gap: 6px; }
.d2-pay-list { display: flex; flex-direction: column; gap: 1px; }
.d2-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.d2-pay-row:last-child { border-bottom: none; }
.d2-pay-desc { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.d2-pay-date { font-size: 11px; color: var(--ink-500); }
.d2-pay-cat { font-size: 12px; color: var(--ink-700); font-weight: 500; }
.d2-pay-amt { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; white-space: nowrap; }
.d2-empty-msg { font-size: 12px; color: var(--ink-400); }

/* Status indicator (read-only) */
.d2-status-indicator {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.d2-status-desc {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 6px;
  line-height: 1.4;
}

/* Isento button */
.d2-isento-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-500);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: background 120ms, color 120ms;
  margin-bottom: 4px;
}
.d2-isento-btn:hover { background: var(--surface-3, #e5e7eb); color: var(--ink-700); }
.d2-isento-btn.d2-isento-active { color: var(--ink-700); border-color: var(--ink-300); background: var(--surface-2); }

/* WhatsApp badge */
.wa-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
}

/* Attendance rows */
.att-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  gap: 8px;
  margin-bottom: 4px;
}
.att-past { background: var(--surface-2); cursor: pointer; }
.att-past:hover { background: var(--surface-3, #e5e7eb); }
.att-future { background: var(--card); border: 1px dashed var(--line); }
.att-info { flex: 1; min-width: 0; }
.att-title { font-size: 12px; font-weight: 600; color: var(--ink-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-date  { font-size: 10px; color: var(--ink-400); margin-top: 1px; }
.att-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}
.att-badge-present { background: #f0fdf4; color: #16a34a; }
.att-badge-absent  { background: var(--surface-3, #e5e7eb); color: var(--ink-500); }
.att-badge-future  { background: var(--surface-2); color: var(--ink-500); }

/* Attendance summary line */
.d2-att-summary {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 8px;
  font-weight: 500;
}

/* See more payments */
.d2-see-more {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok);
  background: none;
  border: none;
  padding: 8px 0 2px;
  cursor: pointer;
  font-family: inherit;
}
.d2-see-more:hover { text-decoration: underline; }

/* Empty state panel — overview stats */
.assoc-empty-panel {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aep-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
}
.aep-stats {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border-radius: 16px;
  overflow: hidden;
}
.aep-stat {
  flex: 1;
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid var(--line-soft);
}
.aep-stat:last-child { border-right: none; }
.aep-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -.4px;
  line-height: 1;
  margin-bottom: 4px;
}
.aep-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.aep-divider {
  height: 1px;
  background: var(--line-soft);
}
.aep-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fef2f2;
  border-radius: 12px;
  padding: 12px 14px;
}
.aep-due-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
}
.aep-due-val {
  font-size: 15px;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: -.3px;
}
.aep-hint {
  font-size: 11.5px;
  color: var(--ink-400);
  text-align: center;
  margin: 0;
}
