/* ===== Project clients tab + client statement ===== */
.bt-cl-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bt-cl-sum-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 12px 14px; }
.bt-cl-sum-item span { display: block; font-size: .78rem; color: #64748b; font-weight: 700; margin-bottom: 4px; }
.bt-cl-sum-item b { font-size: 1.2rem; font-weight: 800; }
.bt-cl-sum-item.is-due { background: #fef2f2; border-color: #fecaca; } .bt-cl-sum-item.is-due b { color: #dc2626; }
.bt-cl-sum-item.is-credit { background: #f0fdf4; border-color: #bbf7d0; } .bt-cl-sum-item.is-credit b { color: #16a34a; }
.bt-cl-sum-item.is-zero b { color: #0f4170; }
.bt-cl-note { margin-top: 8px; font-size: .78rem; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 8px 12px; }
.bt-cl-note i { color: #0ea5e9; }

.bt-cl-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.bt-cl-card.is-primary { border-top: 3px solid #0f4170; }
.bt-cl-card.is-unassigned { background: #fffbeb; border-color: #fde68a; }
.bt-cl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bt-cl-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bt-cl-who .bt-avatar { width: 42px; height: 42px; font-size: 1rem; flex-shrink: 0; }
.bt-cl-name { font-weight: 800; color: #0f172a; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bt-cl-phone { font-size: .8rem; color: #64748b; margin-top: 2px; }
.bt-cl-phone i { color: #0f4170; opacity: .6; font-size: .72rem; }
.bt-cl-badge { font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.bt-cl-badge.is-primary { background: #0f4170; color: #fff; border-color: #0f4170; } .bt-cl-badge.is-primary i { color: #fbbf24; }
.bt-cl-badge.is-auto { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.bt-cl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-cl-actions .btn { font-weight: 700; font-size: .78rem; }
.bt-cl-formula { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: #64748b; margin: 10px 0; padding: 8px 12px; background: #f8fafc; border-radius: 12px; }
.bt-cl-formula b { color: #0f172a; }
.bt-cl-formula .btn-link { font-size: .8rem; text-decoration: none; }
.bt-cl-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bt-cl-box { border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 12px; text-align: center; }
.bt-cl-box span { display: block; font-size: .74rem; font-weight: 700; color: #64748b; margin-bottom: 2px; }
.bt-cl-box b { font-size: 1.05rem; font-weight: 800; }
.bt-cl-box.is-credit b { color: #16a34a; } .bt-cl-box.is-credit span i { color: #16a34a; }
.bt-cl-box.is-debit b { color: #dc2626; } .bt-cl-box.is-debit span i { color: #dc2626; }
.bt-cl-box.is-due { background: #fef2f2; border-color: #fecaca; } .bt-cl-box.is-due b, .bt-cl-box.is-due span { color: #dc2626; }
.bt-cl-box.is-credit:last-child { background: #f0fdf4; border-color: #bbf7d0; }
.bt-cl-box.is-zero { background: #f8fafc; } .bt-cl-box.is-zero b { color: #0f4170; }
.bt-cl-hint { margin-top: 10px; font-size: .78rem; color: #92400e; }
.bt-cl-hint i { color: #f59e0b; }
.bt-cl-empty { text-align: center; color: #64748b; background: #fff; border: 1px dashed #cbd5e1; border-radius: 18px; padding: 28px 16px; }
.bt-cl-empty i { font-size: 1.6rem; color: #94a3b8; margin-bottom: 6px; }
.bt-cl-empty div { font-weight: 800; color: #334155; }

/* statement */
.bt-cst-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.bt-cst-title { font-weight: 800; font-size: 1.05rem; color: #0f172a; }
.bt-cst-sub { font-size: .82rem; color: #64748b; }
.bt-cst-net { border-radius: 14px; padding: 8px 14px; text-align: center; border: 1px solid #e2e8f0; }
.bt-cst-net span { display: block; font-size: .72rem; font-weight: 700; }
.bt-cst-net b { font-size: 1.15rem; font-weight: 800; }
.bt-cst-net.is-due { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.bt-cst-net.is-credit { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.bt-cst-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.bt-cst-kpis div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 10px; }
.bt-cst-kpis span { display: block; font-size: .72rem; color: #64748b; font-weight: 700; }
.bt-cst-kpis b { font-size: .95rem; }
.bt-cst-table { font-size: .82rem; }
.bt-cst-table thead th { background: #0f4170; color: #fff; font-weight: 700; white-space: nowrap; }
.bt-cst-table tfoot th { background: #f1f5f9; }

@media (max-width: 575.98px) {
    .bt-cl-sum { grid-template-columns: 1fr 1fr; }
    .bt-cl-sum-item:last-child { grid-column: 1 / -1; }
    .bt-cl-boxes { grid-template-columns: 1fr 1fr; }
    .bt-cl-box:last-child { grid-column: 1 / -1; }
    .bt-cl-head { align-items: flex-start; }
    .bt-cst-kpis { grid-template-columns: 1fr 1fr; }
}

/* dark theme */
[data-theme="dark"] .bt-cl-sum-item, [data-theme="dark"] .bt-cl-card, [data-theme="dark"] .bt-cl-empty { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .bt-cl-name, [data-theme="dark"] .bt-cst-title, [data-theme="dark"] .bt-cl-formula b { color: #f1f5f9; }
[data-theme="dark"] .bt-cl-formula, [data-theme="dark"] .bt-cl-note, [data-theme="dark"] .bt-cst-kpis div, [data-theme="dark"] .bt-cl-box.is-zero { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .bt-cl-box { border-color: #334155; }
[data-theme="dark"] .bt-cl-card.is-unassigned { background: #2a2210; border-color: #78350f; }
.bt-cst-table td, .bt-cst-table th { padding: 7px 8px !important; vertical-align: middle; }
.bt-cst-table td:nth-child(n+3), .bt-cst-table th:nth-child(n+3), .bt-cst-table td:first-child { white-space: nowrap; }
.bt-cst-table tbody tr:nth-child(even) td { background: #f8fafc; }
