/* ================================================================
   Cuentas por Cobrar — Vista distribución por responsables
   ================================================================ */

#ccRespView { padding: 12px; }

.ec-resp-buscar-item {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}
.ec-resp-buscar-item:last-child { border-bottom: none; }
.ec-resp-buscar-item:hover { background: #eef2ff; }
.ec-resp-buscar-item-nombre {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ec-resp-buscar-item-lugar {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
    margin-left: 2px;
}
.ec-resp-buscar-vacio {
    padding: 10px;
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
}

.ec-resp-nota {
    font-size: 10px;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 12px;
}
.ec-resp-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 12px;
    text-align: center;
}
.ec-resp-empty {
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    font-size: 12px;
    text-align: center;
}
.ec-resp-edificio-header {
    background: #eef2ff;
    color: #0a2463;
    font-weight: 700;
    font-size: 11px;
    padding: 6px 10px;
    border-bottom: 2px solid #c7d2fe;
    margin-bottom: 8px;
    margin-top: 12px;
    border-radius: 4px 4px 0 0;
}
.ec-resp-edificio-header:first-of-type { margin-top: 0; }

.ec-resp-apt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 8px;
}
#ccRespView.cc-cols-2 .ec-resp-apt-grid {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
    #ccRespView.cc-cols-2 .ec-resp-apt-grid {
        grid-template-columns: 1fr;
    }
}

.ec-resp-apt-section {
    margin-bottom: 0;
}

.ec-resp-apt-section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-top: none;
    flex-wrap: wrap;
}

.ec-resp-apt-section-num {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
}

.ec-resp-historial-btn {
    font-size: 10px;
    padding: 3px 9px;
    border: 1px solid #6366f1;
    border-radius: 4px;
    background: #eef2ff;
    color: #4338ca;
    cursor: pointer;
    white-space: nowrap;
}
.ec-resp-historial-btn:hover {
    background: #6366f1;
    color: #fff;
}

.ec-resp-historial-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 680px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ec-resp-historial-modal-hdr {
    padding: 14px 18px;
    background: #0a2463;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.ec-resp-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 10px;
    margin-bottom: 8px;
}
.ec-resp-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ec-resp-titulo-linea {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ec-resp-separador {
    color: #9ca3af;
    font-weight: 400;
}
.ec-resp-apt-badge {
    background: #0a2463;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.ec-resp-responsable-line {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}
.ec-resp-card-deuda {
    display: inline-block;
    flex-shrink: 0;
    padding: 3px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
}
.ec-resp-wa-link {
    color: #25d366;
    margin-left: 2px;
}
.ec-resp-wa-link:hover {
    color: #128c7e;
}
.ec-resp-concepto-nombre {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}
.ec-resp-costo-base {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}
.ec-resp-months-grid {
    display: grid;
    grid-template-columns: 56px repeat(12, 1fr);
    gap: 2px;
    align-items: center;
}
.ec-resp-month-label {
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    color: #6b7280;
}
.ec-resp-month-apt-label {
    font-size: 9px;
    font-weight: 600;
    color: #4b5563;
}
.ec-resp-month-cell {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 2px;
    border-radius: 3px;
    user-select: none;
}
.ec-resp-future    { background: #f9fafb; color: #d1d5db; }
.ec-resp-nodata    { background: #f9fafb; color: #d1d5db; }
.ec-resp-status-paid    { background: #dcfce7; color: #16a34a; }
.ec-resp-status-pending { background: #fef2f2; color: #dc2626; }
.ec-resp-status-partial { background: #fef9c3; color: #b45309; }
.ec-resp-status-excess  { background: #dbeafe; color: #2563eb; }
.ec-resp-status-none    { background: #f3f4f6; color: #9ca3af; }

.ec-resp-badge-final {
    display: inline-block;
    background: #16a34a;
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
}
.ec-resp-tipo-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}
.ec-resp-tipo-propietario   { background: #dbeafe; color: #1e40af; }
.ec-resp-tipo-inquilino     { background: #dcfce7; color: #166534; }
.ec-resp-tipo-representante { background: #fef3c7; color: #92400e; }

.ec-resp-modal-row {
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 0;
}
.ec-resp-modal-row:last-child { border-bottom: none; }
.ec-resp-modal-persona {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    font-size: 12px;
}
.ec-resp-modal-montos {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: #4b5563;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.ec-resp-modal-estado { font-size: 11px; }
