.chat-lab .chat-messages,
.chat-messages {
    min-height: 380px;
    max-height: 560px;
    overflow-y: auto;
    background: #f7f8fa;
    padding: 1rem 1.1rem;
    flex: 1;
}

.chat-row {
    margin-bottom: 1rem;
    clear: both;
}

.chat-row-user {
    text-align: right;
}

.chat-row-assistant {
    text-align: left;
}

.chat-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.chat-bubble {
    display: inline-block;
    max-width: 92%;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.chat-row-user .chat-bubble {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
}

.chat-bubble-error {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
}

.chat-raw {
    font-size: 0.7rem;
    max-height: 180px;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.5rem;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.agentic-timeline {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

.agentic-timeline-title,
.agentic-answer-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.agentic-step {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-bottom: 0.25rem;
    color: #334155;
}

.agentic-step-icon {
    flex: 0 0 auto;
    width: 1rem;
    text-align: center;
    font-weight: 700;
}

.agentic-step-running .agentic-step-icon {
    color: #0d9488;
}

.agentic-step-done .agentic-step-icon {
    color: #059669;
}

.agentic-step-error .agentic-step-icon {
    color: #dc2626;
}

.agentic-step-warning .agentic-step-icon {
    color: #d97706;
}

.agentic-step-pending .agentic-step-icon {
    color: #ea580c;
}

.agentic-step-pending .agentic-step-label {
    font-weight: 600;
}

.agentic-confirmation-hint {
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.82rem;
}

.agentic-confirmation-hint code {
    color: #78350f;
    background: #fef3c7;
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
}

.agentic-answer {
    white-space: pre-wrap;
    word-break: break-word;
}
