* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.panel h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}

select, input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-top: 10px;
    border-radius: 5px;
}

.info-box p {
    margin: 5px 0;
    color: #666;
}

.variable-row {
    margin-bottom: 10px;
}

.input-variable {
    background-color: #f8f9fa;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-bottom: 15px;
}

.resultado {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: bold;
}

.resultado.success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.resultado.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.historial-container {
    max-height: 500px;
    overflow-y: auto;
}

.llamada-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: transform 0.2s;
}

.llamada-item:hover {
    transform: translateX(5px);
}

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

.llamada-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.conversation-id {
    font-family: monospace;
    font-size: 12px;
    color: #999;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-iniciada {
    background: #ffc107;
    color: #000;
}

.badge-completada {
    background: #28a745;
    color: white;
}

.badge-fallida {
    background: #dc3545;
    color: white;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
}


/* Mensajes flotantes */
.mensaje-flotante {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 400px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.mensaje-flotante.success {
    background: #10b981;
    color: white;
}

.mensaje-flotante.error {
    background: #ef4444;
    color: white;
}

.mensaje-flotante.info {
    background: #3b82f6;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Tabla de historial */
.historial-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.historial-table th,
.historial-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.historial-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.historial-table tr:hover {
    background: #f9fafb;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-iniciada {
    background: #dbeafe;
    color: #1e40af;
}

.badge-completada {
    background: #d1fae5;
    color: #065f46;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.no-data {
    text-align: center;
    color: #6b7280;
    padding: 40px;
}