.clt-workspace {
    max-width: 100% !important;
    margin: 0 auto !important; /* Quitar el margen vertical de 20px */
    height: calc(100vh - 130px) !important; /* Ajustar según el header real */
    display: flex !important;
    border-radius: 12px !important;
    flex-direction: column !important;
    font-family: 'Segoe UI', -apple-system, system-ui, BlinkMacSystemFont, sans-serif !important;
    box-shadow: 0 2px 12px rgba(0, 134, 184, 0.1) !important; /* Sombra con el nuevo azul */
    overflow: hidden !important;
}


.clt-tutor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; /* Añadir esto */
    min-height: 0; /* Importante para que flex funcione correctamente */
    background: white;
}

.clt-quick-actions {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #F8F9FA !important;
}

.clt-action-btn {
    padding: 10px 15px;
    background: #008CB8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s ease;
    width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.clt-action-btn:hover {
    background: #007a9f; /* Versión más oscura para hover */
}

.clt-header {
    background: #008CB8 !important;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.clt-header h3 {
    margin: 0;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.clt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    padding: 2px;
    margin-right: 8px;
}

.clt-chatbox {
    flex: 1;
    min-height: 0; /* Importante para scroll */
    max-height: calc(100vh - 300px); /* Añadir un máximo */
    overflow-y: auto;
    padding: 15px;
    background: #F8F9FA;
}

.clt-input-container {
    padding: 12px;
    background: white;
    border-top: 1px solid #E1E4E8;
    position: sticky; /* Añadir esto */
    bottom: 0; /* Añadir esto */
}

.clt-input-container textarea {
    width: 100%;
    min-height: 60px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #E1E4E8;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

.clt-input-container textarea:focus {
    outline: none;
    border-color: #008CB8;
    box-shadow: 0 0 0 2px rgba(0, 140, 184, 0.1);
}

.clt-input-container button {
    width: 100%;
    padding: 10px;
    background: #008CB8 !important;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.clt-input-container button:hover {
    background: #007a9f;
}

.clt-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 95%;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

.message-content {
    white-space: pre-line;
}

.message-content br {
    margin-bottom: 8px;
    display: block;
    content: "";
}

.user-message {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    margin-right: auto;
}

.message-timestamp {
    font-size: 11px;
    color: #6E7781;
    margin-top: 4px;
    text-align: right;
}

.thinking {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Scrollbar personalizado */
.clt-chatbox::-webkit-scrollbar {
    width: 8px;
}

.clt-chatbox::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.clt-chatbox::-webkit-scrollbar-thumb {
    background: #008CB8 !important;
    border-radius: 4px;
}

.clt-chatbox::-webkit-scrollbar-thumb:hover {
    background: #007a9f;
}