.consulta-facturas-container {
    max-width: 900px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.consulta-facturas-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.form-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.form-description {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #5dade2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.1);
}

.btn-consultar {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

.btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-consultar:active {
    transform: translateY(0);
}

.btn-consultar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.resultado-facturas {
    min-height: 50px;
}

.tabla-facturas-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tabla-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.tabla-facturas {
    width: 100%;
    border-collapse: collapse;
}

.tabla-facturas thead {
    background: #f8f9fa;
}

.tabla-facturas th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.tabla-facturas td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #34495e;
}

.tabla-facturas tbody tr:hover {
    background: #f8f9fa;
}

.factura-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.factura-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-default {
    background: #e2e3e5;
    color: #383d41;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@media (max-width: 768px) {
    .consulta-facturas-container {
        margin: 20px 15px;
    }
    
    .consulta-facturas-form,
    .tabla-facturas-wrapper {
        padding: 20px;
    }
    
    .tabla-facturas th,
    .tabla-facturas td {
        padding: 10px;
        font-size: 13px;
    }
}

/* Select de módulos */
#selector-modulo {
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    outline: none;
    transition: border 0.3s;
}

#selector-modulo:focus {
    border-color: #5dade2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.15);
}

/* Contenedor de cada módulo */
.modulo {
    margin-top: 25px;
}

/* Inputs dentro del módulo de consulta */
#idcontrato {
    padding: 12px 15px;
    width: 260px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

#idcontrato:focus {
    outline: none;
    border-color: #5dade2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.1);
}

/* Botón consultar adaptado a tu diseño */
#btn-consultar {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

#btn-consultar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loader de texto (simple) */
.btn-loader {
    display: none;
    font-size: 14px;
}


