/* Historial de Facturas Manuales */

body { background-color: #f8f9fa; }

/* ── Tabla ── */
.invoice-row { cursor: pointer; }
.invoice-row:hover { background-color: #f0f4ff; }

.file-cell {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Badges de fuente ── */
.badge-upload {
    background-color: #198754;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
}

.badge-mail {
    background-color: #0d6efd;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
}

/* ── Badges de estado ── */
.status-badge {
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.status-saved    { background: #d1e7dd; color: #0a3622; }
.status-reviewed { background: #cfe2ff; color: #084298; }
.status-error    { background: #f8d7da; color: #58151c; }
.status-pending  { background: #fff3cd; color: #664d03; }
.status-sent     { background: #d1e7dd; color: #0a3622; }

/* ── Botones ícono ── */
.actions-cell { white-space: nowrap; }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 1rem;
    border-radius: 4px;
    transition: background 0.15s;
}
.btn-icon:hover { background: #e9ecef; }

.btn-icon-danger:hover { background: #f8d7da; }

.btn-icon-disabled {
    opacity: 0.35;
    cursor: default;
}
.btn-icon-disabled:hover { background: none; }

/* ── Modal de detalle ── */
.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #f5f5f5;
}

.detail-label { color: #6c757d; min-width: 130px; }
.detail-value { text-align: right; font-weight: 500; }

.detail-items-table {
    font-size: 0.82rem;
}

.modal-file-viewer {
    width: 100%;
    height: 520px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: block;
}

/* ── PDF viewer en resultado ── */
.pdf-viewer-container {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px;
    background: #f8f9fa;
}

.pdf-viewer-frame {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 4px;
    background: white;
}
