.ai-chat-log {
    height: min(65vh, 560px);
    overflow: auto;
    padding: 10px;
    background: var(--cui-body-bg, #fff);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
}

.ai-msg {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px dashed rgba(0,0,0,.08);
}

.ai-meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .7;
}

.ai-content {
    white-space: pre-wrap;
    line-height: 1.35;
}

.ai-user .ai-content { font-weight: 600; }
.ai-assistant .ai-content { font-weight: 400; }

/* Floating panel */
.ai-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1400;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 0;
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 10px 22px rgba(0,0,0,.22);
}

.ai-float {
    position: fixed;
    right: 18px;
    bottom: 78px;
    z-index: 1400;
    width: min(420px, calc(100vw - 36px));
    max-height: min(70vh, 620px);
    display: none;
}

.ai-float.show { display: block; }

.ai-float .card {
    border-radius: 14px;
    overflow: hidden;
}

.ai-float-log {
    height: min(42vh, 320px);
    overflow: auto;
    padding: 10px;
    background: var(--cui-body-bg, #fff);
}

.ai-float .ai-msg { grid-template-columns: 70px 1fr; }

