/* ============================================
   ESTILOS MODERNOS PARA TABLA DE TRANSACCIONES
   ============================================ */

/* Badges de tipo de documento */
.transaction-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.transaction-type-badge.type-invoice {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.transaction-type-badge.type-order {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.transaction-type-badge.type-delivery {
    background: #e9d5ff;
    color: #6b21a8;
    border: 1px solid #c084fc;
}

/* Badges de estado */
.transaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.transaction-badge.status-delivered {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

.transaction-badge.status-processed {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.transaction-badge.status-pending {
    background: #fffbeb;
    color: #a16207;
    border-color: #fcd34d;
}

.transaction-badge.status-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* Botones de acción */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.action-btn-primary {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
}

.action-btn-primary:hover {
    background: #0284c7;
    border-color: #0284c7;
}

/* Valores en la tabla */
.date-value {
    font-size: 13px;
    color: #64748b;
}

.amount-value {
    font-weight: 600;
    color: #15803d;
    font-variant-numeric: tabular-nums;
}

.text-amount {
    text-align: right;
}

/* Filas clickables */
.clickable-row {
    transition: background 0.15s;
}

.clickable-row:hover {
    background: #f8fafc;
}

.action-btn {
    display: flex;
    align-items: center;     /* Centra verticalmente */
    justify-content: center; /* Centra horizontalmente */
}

/* ============================================
   ESTILOS PARA SECCIÓN DE FILTROS - SOLO MARCO
   ============================================ */

.filters-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.filters-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

/* Respetamos los estilos originales de los botones */
.filters-section .btn-primary {
    /* Mantiene los estilos originales de Bootstrap */
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .filters-section {
        padding: 16px;
    }
    
    .filters-section .row > div {
        margin-bottom: 8px;
    }
    
    /* Ocultamos la etiqueta del botón en móvil */
    .filters-section .form-label[style*="transparent"] {
        display: none;
    }
}

/* ============================================
   BADGES ACTUALIZADOS - Entregado (azul) y Facturado (verde)
   ============================================ */

/* Entregado en AZUL */
.transaction-badge.status-delivered {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* Facturado en VERDE */
.transaction-badge.status-invoiced {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

/* Centrar el título de la columna Importe */
#transactions-table th:nth-child(5) {
    text-align: center;
}

/* Si quieres asegurar que también afecta al header de la tabla */
#transactions-table thead th:nth-child(5) {
    text-align: center;
}

/* Centrar el importe en euros */
.text-amount {
    text-align: center !important;  /* Centra el contenido de la celda */
}

.amount-value {
    display: inline-block;  /* Para que respete el centrado */
    font-weight: 600;
    color: #15803d;
    font-variant-numeric: tabular-nums;
}