/* Widget flotante para bot Ekomon */
.ekomon-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-button {
    padding: 12px 16px;
    border-radius: 25px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 160px;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chat-button-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 700px;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-chat {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-chat:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 12px;
    max-width: 80%;
}

.message.user {
    margin-left: auto;
}

.message.bot {
    margin-right: auto;
}

.message-content {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user .message-content {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.chat-input {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.input-group {
    display: flex;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-input input:focus {
    border-color: #4CAF50;
}

.send-button {
    background: #4CAF50;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.send-button:hover {
    background: #45a049;
}

.typing-indicator {
    display: none;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    margin-bottom: 12px;
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chat-window {
        width: 350px;
        height: 500px;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .ekomon-chat-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .chat-window {
        width: calc(100vw - 20px);
        height: 450px;
        max-height: 60vh;
        right: -10px;
    }
}
/* Estilos para tablas de presupuesto */
.budget-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.budget-table th {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.budget-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.budget-table tr:last-child td {
    border-bottom: none;
}

.budget-table .total-row {
    background: #e8f5e8;
    font-weight: 600;
}

.budget-table .total-row td {
    font-size: 14px;
    color: #2e7d32;
}

.budget-table .concept-col {
    width: 60%;
}

.budget-table .amount-col {
    width: 40%;
    text-align: right;
    font-family: 'Courier New', monospace;
}
