/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/CCC/Components/Modals/ModalHistoricoDocumentoCXC.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el bloque. Cambios: @@ → @ y capas D-51. */
/* =====================================================
   ModalHistoricoDocumentoCXC.razor.css
   Paleta cobalt blue — Vantastic ERP
   ===================================================== */

.hcxc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 12px;
    overflow-y: auto;
}

.hcxc-modal {
    background: #ffffff;
    border-radius: 12px;
    border: 0.5px solid #e2e8f0;
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    max-height: calc(100vh - 48px);
    overflow: hidden;
}

/* ── Header ── */
.hcxc-header {
    background: #1D4ED8;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.hcxc-header-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .hcxc-header-title i {
        font-size: 18px;
    }

.hcxc-btn-close {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.15s;
}

    .hcxc-btn-close:hover {
        background: rgba(255,255,255,0.28);
    }

/* ── Body ── */
.hcxc-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
}

/* ── Loading / empty ── */
.hcxc-loading,
.hcxc-empty {
    text-align: center;
    padding: 32px;
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hcxc-spin {
    animation: hcxc-rotate 1s linear infinite;
    display: inline-block;
}
@keyframes hcxc-rotate {
    from

{
    transform: rotate(0deg);
}

to {
    transform: rotate(360deg);
}

}

/* ── Cliente card ── */
.hcxc-cliente-card {
    background: #EFF6FF;
    border: 0.5px solid #BFDBFE;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hcxc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1D4ED8;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hcxc-cliente-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .hcxc-cliente-info strong {
        font-size: 14px;
        font-weight: 500;
        color: #1e3a5f;
    }

.hcxc-cuenta-tag {
    margin-left: auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .hcxc-cuenta-tag strong {
        font-size: 13px;
        font-weight: 500;
        color: #1e3a5f;
    }

.hcxc-label {
    font-size: 11px;
    color: #64748b;
}

/* ── Section card ── */
.hcxc-section-card {
    background: #f8fafc;
    border: 0.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}

.hcxc-section-title {
    font-size: 11px;
    font-weight: 500;
    color: #1D4ED8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid #BFDBFE;
    padding-bottom: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hcxc-sub-title {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    margin: 10px 0 6px;
    padding-top: 10px;
    border-top: 0.5px dashed #cbd5e1;
}

/* ── Documento grid ── */
.hcxc-doc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 12px;
}

.hcxc-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .hcxc-field label {
        font-size: 11px;
        color: #64748b;
    }

    .hcxc-field span {
        font-size: 13px;
        font-weight: 500;
        color: #1e293b;
    }

.hcxc-field-wide {
    grid-column: span 2;
}

/* ── KPI strip ── */
.hcxc-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.hcxc-kpi {
    background: #f8fafc;
    border: 0.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.hcxc-kpi-label {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.hcxc-kpi-val {
    display: block;
    font-size: 18px;
    font-weight: 500;
    margin-top: 2px;
}

.hcxc-kpi-cargo .hcxc-kpi-val {
    color: #1D4ED8;
}

.hcxc-kpi-abono .hcxc-kpi-val {
    color: #059669;
}

.hcxc-kpi-saldo .hcxc-kpi-val {
    color: #DC2626;
}

.hcxc-kpi-dias .hcxc-kpi-val {
    color: #D97706;
}

/* ── Tabla ── */
.hcxc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .hcxc-table th {
        background: #EFF6FF;
        color: #1E40AF;
        font-weight: 500;
        font-size: 11px;
        padding: 7px 8px;
        text-align: left;
        border-bottom: 0.5px solid #BFDBFE;
        white-space: nowrap;
    }

    .hcxc-table td {
        padding: 7px 8px;
        border-bottom: 0.5px solid #e2e8f0;
        color: #1e293b;
        vertical-align: middle;
    }

    .hcxc-table tr:last-child td {
        border-bottom: none;
    }

    .hcxc-table tr:hover td {
        background: #f0f7ff;
    }

.hcxc-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hcxc-planilla {
    font-size: 11px;
    color: #64748b;
}

/* ── Colors texto ── */
.hcxc-txt-abono {
    color: #059669;
    font-weight: 500;
}

.hcxc-txt-saldo {
    color: #DC2626;
    font-weight: 500;
}

.hcxc-txt-anticipo {
    color: #7C3AED;
    font-weight: 500;
}

/* ── Badges ── */
.hcxc-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

    .hcxc-badge i {
        font-size: 11px;
    }

.hcxc-badge-vencida {
    background: #FEE2E2;
    color: #991B1B;
}

.hcxc-badge-vigente {
    background: #D1FAE5;
    color: #065F46;
}

.hcxc-badge-pagada {
    background: #DBEAFE;
    color: #1E40AF;
}

.hcxc-badge-anticipo {
    background: #EDE9FE;
    color: #5B21B6;
}

/* ── Timeline pagos ── */
.hcxc-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hcxc-timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 0.5px solid #e2e8f0;
}

    .hcxc-timeline-item:last-child {
        border-bottom: none;
    }

.hcxc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
}

.hcxc-dot-pago {
    background: #059669;
}

.hcxc-dot-anticipo {
    background: #7C3AED;
}

.hcxc-tl-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hcxc-tl-desc {
    font-size: 12px;
    color: #64748b;
}

.hcxc-tl-amount {
    font-size: 14px;
    font-weight: 500;
}

/* ── No data ── */
.hcxc-nodata {
    text-align: center;
    padding: 16px;
    color: #64748b;
    font-size: 13px;
    background: #f1f5f9;
    border-radius: 8px;
}

/* ── Footer ── */
.hcxc-footer {
    border-top: 0.5px solid #e2e8f0;
    padding: 10px 18px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.hcxc-btn-secondary {
    background: transparent;
    border: 0.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 13px;
    cursor: pointer;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

    .hcxc-btn-secondary:hover {
        background: #f1f5f9;
    }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hcxc-kpi-strip

{
    grid-template-columns: repeat(2, 1fr);
}

.hcxc-doc-grid {
    grid-template-columns: repeat(2, 1fr);
}

.hcxc-field-wide {
    grid-column: span 2;
}

.hcxc-cliente-card {
    flex-wrap: wrap;
}

.hcxc-cuenta-tag {
    margin-left: 0;
    text-align: left;
}

}
