/* Estilos personalizados sobre Bootstrap */
body {
    background-color: #f8f9fa;
}

.container {
    max-width: 900px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
}

h1 {
    color: #495057;
    margin-bottom: 30px;
    text-align: center;
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.nav-tabs .nav-link:not(.active) {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

.nav-tabs .nav-link:not(.active):hover {
    background-color: #e9ecef;
    color: #495057;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.table-entry {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.table-name {
    flex: 1;
}

.table-pk {
    flex: 2;
}

.table-entry .remove-table-btn {
    flex-shrink: 0;
    min-width: 80px;
}

.table-label {
    display: none;
    margin-bottom: 2px;
    font-weight: bold;
    font-size: 14px;
}

.form-control {
    border-radius: 5px;
}

.alert {
    border-radius: 5px;
}

#task-status {
    font-size: 18px;
    font-weight: bold;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.status-pending { background-color: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.status-processing { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-completed { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-failed { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

#task-logs {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.log-entry {
    margin-bottom: 5px;
    padding: 2px 0;
}

.log-success { color: #28a745; }
.log-error { color: #dc3545; }
.log-info { color: #007bff; }

#presets-list .list-group-item {
    transition: background-color 0.2s;
}

#presets-list .list-group-item:hover {
    background-color: #f8f9fa;
}

#execute-all-logs {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
}

#execution-logs {
    max-height: 400px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .table-entry {
        flex-direction: column;
        align-items: stretch;
    }

    .table-entry .remove-table-btn {
        align-self: flex-start;
        margin-top: 5px;
    }

    .table-entry .form-control {
        margin-bottom: 5px;
    }

    .table-label {
        display: block;
    }

    .db-config .row > div {
        margin-bottom: 15px;
    }

    #execution-logs {
        max-height: 250px;
        font-size: 13px;
        padding: 10px;
    }

    #execution-task-status {
        font-size: 16px;
        padding: 10px;
    }
}