/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/CCC/Components/ClienteDetalle.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. */
/* ClienteDetalle.razor.css – directo */

.cc-detail-inner {
    overflow-y: auto;
    height: 100%;
    background: #ffffff;
}

.cc-detail-section {
    padding: 12px 14px;
    border-bottom: 0.5px solid #e5e7eb;
}

.cc-section-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

/* Client header */
.cc-client-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cc-avatar-lg {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    flex-shrink: 0;
}

.cc-name-lg {
    font-size: 13px;
    font-weight: 500;
    color: #1a1d23;
}

.cc-ruc-lg {
    font-size: 11px;
    color: #6b7280;
}

.cc-contact-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-contact-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6b7280;
}

    .cc-contact-item i {
        font-size: 12px;
    }

/* KPI */
.cc-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.cc-kpi {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px 10px;
}

.cc-kpi-val {
    font-size: 15px;
    font-weight: 500;
    color: #1a1d23;
}

.cc-kpi-label {
    font-size: 10px;
    color: #6b7280;
    margin-top: 1px;
}

.val-red {
    color: #dc2626;
}

.val-amber {
    color: #d97706;
}

.val-green {
    color: #16a34a;
}

/* Progress */
.cc-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 3px;
}

.cc-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.cc-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .3s;
}

/* Documents */
.cc-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 0.5px solid #e5e7eb;
}

    .cc-doc-item:last-child {
        border-bottom: none;
    }

.cc-doc-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-doc-right {
    text-align: right;
}

.cc-doc-number {
    font-size: 12px;
    color: #1a1d23;
}

.cc-doc-date {
    font-size: 10px;
    color: #6b7280;
}

.cc-doc-amount {
    font-size: 12px;
    font-weight: 500;
}

.cc-doc-type {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 4px;
}

/* Chips */
.badge-red {
    background: #fef2f2;
    color: #dc2626;
}

.badge-amber {
    background: #fffbeb;
    color: #d97706;
}

.badge-blue {
    background: #eff6ff;
    color: #2563eb;
}

.badge-green {
    background: #f0fdf4;
    color: #16a34a;
}

.amount-red {
    color: #dc2626;
}

.amount-amber {
    color: #d97706;
}
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.cc-modal {
    background: #ffffff;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
    border: 0.5px solid #e5e7eb;
}

.cc-modal-wide {
    width: 560px;
}

.cc-modal-md {
    width: 480px;
}

.cc-modal-sm {
    width: 420px;
}

.cc-modal-header {
    padding: 14px 18px;
    border-bottom: 0.5px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-modal-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1d23;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-modal-body {
    padding: 16px 18px;
}

.cc-modal-footer {
    padding: 12px 18px;
    border-top: 0.5px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Forms */
.cc-form-group {
    margin-bottom: 12px;
}

.cc-form-label {
    font-size: 12px;
    font-weight: 500;
    color: #1a1d23;
    margin-bottom: 4px;
    display: block;
}

.cc-label-amber {
    color: #d97706;
}

.cc-form-select,
.cc-form-input {
    width: 100%;
    padding: 7px 10px;
    border: 0.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #1a1d23;
    background: #ffffff;
    box-sizing: border-box;
}

    .cc-form-select:focus,
    .cc-form-input:focus {
        outline: none;
        border-color: #93c5fd;
    }

.cc-textarea {
    height: 60px;
    resize: none;
}

.cc-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* PDF preview */
.cc-preview-box {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    border: 0.5px solid #e5e7eb;
}

.cc-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cc-preview-logo {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
}

.cc-preview-date {
    font-size: 11px;
    color: #6b7280;
}

.cc-preview-client {
    font-size: 11px;
    margin-bottom: 8px;
}

.cc-preview-total {
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
}

.cc-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

    .cc-preview-table th {
        text-align: left;
        padding: 4px 6px;
        border-bottom: 0.5px solid #e5e7eb;
        color: #6b7280;
        font-weight: 500;
    }

    .cc-preview-table td {
        padding: 4px 6px;
        border-bottom: 0.5px solid #e5e7eb;
        color: #1a1d23;
    }

.amount-red {
    color: #dc2626;
}

.amount-amber {
    color: #d97706;
}

/* Send options */
.cc-send-options {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.cc-send-option {
    flex: 1;
    padding: 8px;
    border: 0.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
}

    .cc-send-option:hover,
    .cc-send-option.selected {
        border-color: #2563eb;
        background: #eff6ff;
    }

    .cc-send-option i {
        font-size: 18px;
        display: block;
        margin-bottom: 3px;
    }

    .cc-send-option span {
        font-size: 11px;
        color: #6b7280;
    }

/* Compromiso */
.cc-compromiso-box {
    background: #fffbeb;
    padding: 10px;
    border-radius: 8px;
    border: 0.5px solid #fcd34d;
}

/* Buttons */
.cc-btn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 0.5px solid #e5e7eb;
    background: #ffffff;
    color: #1a1d23;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
}

    .cc-btn:hover {
        background: #f3f4f6;
    }

.cc-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

    .cc-btn-primary:hover {
        background: #1d4ed8;
    }

/* Badges */
.cc-badge {
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.badge-red {
    background: #fef2f2;
    color: #dc2626;
}

.badge-amber {
    background: #fffbeb;
    color: #d97706;
}

.badge-green {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-blue {
    background: #eff6ff;
    color: #2563eb;
}
/* Links clicables */
.cc-link {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

    .cc-link:hover {
        color: #1D4ED8;
    }

/* Deuda doble moneda */
.cc-debt-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cc-debt-usd {
    font-size: 11px;
    color: #1D4ED8;
}

/* Edición inline */
.cc-edit-input {
    border: 1px solid #93C5FD;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 13px;
    width: 160px;
    background: #EFF6FF;
}

.cc-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7280;
    padding: 2px 4px;
    border-radius: 4px;
}

    .cc-icon-btn:hover {
        background: #DBEAFE;
        color: #1D4ED8;
    }

    .cc-icon-btn.cc-save {
        color: #16A34A;
    }

        .cc-icon-btn.cc-save:hover {
            background: #DCFCE7;
        }

/* Botón agente */
.cc-btn-agent {
    position: relative;
    border-color: #7C3AED;
    color: #7C3AED;
}

    .cc-btn-agent:hover {
        background: #EDE9FE;
    }

    .cc-btn-agent.agent-running {
        background: #EDE9FE;
    }

.cc-agent-pulse {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16A34A;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100%

{
    opacity: 1;
    transform: scale(1);
}

50% {
    opacity: 0.5;
    transform: scale(1.4);
}

}

/* Modal agente */
.cc-modal-agente {
    max-width: 560px;
}

.cc-agente-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.status-running {
    background: #DCFCE7;
    color: #15803D;
}

.status-idle {
    background: #F3F4F6;
    color: #6B7280;
}

.cc-agent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16A34A;
    animation: pulse 1.5s infinite;
}

.cc-agente-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.cc-agente-kpi {
    background: #EFF6FF;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.cc-agente-kpi-val {
    font-size: 22px;
    font-weight: 500;
    color: #1D4ED8;
}

.cc-val-green {
    color: #16A34A !important;
}

.cc-agente-kpi-label {
    font-size: 11px;
    color: #6B7280;
    margin-top: 2px;
}

.cc-agente-config {
    margin-bottom: 16px;
}

.cc-agente-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 0.5px solid #DBEAFE;
    font-size: 13px;
}

.cc-input-sm {
    border: 1px solid #BFDBFE;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    background: #EFF6FF;
}

.cc-agente-log {
    max-height: 200px;
    overflow-y: auto;
}

.cc-log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 0.5px solid #EFF6FF;
    font-size: 13px;
}

.cc-log-icon {
    font-size: 16px;
    color: #1D4ED8;
    margin-top: 1px;
}

.cc-log-desc {
    color: var(--color-text-primary);
}

.cc-log-time {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 2px;
}
