#ai-panel {
    height: 100%;
    min-height: 0;
}
.ai-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 1px solid #e7e9ee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.ai-chat-main { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ai-message-wrap { position: relative; flex: 1; min-height: 0; }
.ai-message-list { height: 100%; overflow-y: auto; padding: 16px; }
.ai-empty-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    padding: 24px;
    color: #7a8092;
    text-align: center;
    pointer-events: none;
}
.ai-empty-state[hidden] { display: none; }
.ai-message { max-width: 86%; margin-bottom: 14px; }
.ai-message-user { margin-left: auto; }
.ai-message-label { margin-bottom: 4px; color: #73798b; font-size: 0.75rem; }
.ai-message-content {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f1f3f7;
    color: #22263a;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.ai-message-user .ai-message-content { background: #667eea; color: #fff; }
.ai-message-footer { display: flex; gap: 8px; margin-top: 4px; color: #8a90a0; font-size: 0.7rem; }
.ai-message-footer button {
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 0.72rem;
}
.ai-composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eceef2; }
.ai-composer textarea { min-height: 42px; max-height: 120px; resize: vertical; }

/* 新建会话悬浮按钮（右下角，避开底部输入区） */
.ai-fab {
    position: absolute;
    right: 18px;
    bottom: 78px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-content: center;
    color: #fff;
    background: #e94560;
    font-size: 1.15rem;
    box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
    z-index: 10;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.ai-fab:hover { transform: scale(1.06); opacity: 0.92; }
.ai-fab:active { transform: scale(0.96); }
@media (max-width: 767.98px) {
    .ai-message { max-width: 94%; }
}
