.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.loader-spinner {
    border: 6px solid #e0e0e0;
    border-top: 6px solid #3e8ef7;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-panel, .chat-brief-panel {
    position: relative;
}

.chat-brief-panel {
    width: 370px;
    background: #f8fafc;
    border-left: 2px solid #ececec;
    display: flex;
    flex-direction: column;
    margin: 24px 24px 24px 0;
    border-radius: 16px;
    box-shadow: 0 6px 32px rgba(34,34,59,0.06);
    padding: 0 0 0 0;
    min-width: 300px;
    max-width: 440px;
    overflow-y: auto;
    height: calc(100vh - 48px);
}
.brief-bsm-toggle-bar {
    display: flex;
    gap: 12px;
    padding: 14px 20px 0 20px;
    margin-bottom: 0;
    justify-content: flex-end;
}
.toggle-btn {
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 500;
    background: #f0f4fa;
    color: #3e8ef7;
    border: 1.5px solid #3e8ef7;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.toggle-btn.active {
    background: #3e8ef7;
    color: #fff;
    border: 1.5px solid #3e8ef7;
}

.chat-brief-tabs {
    display: flex;
    border-bottom: 1px solid #ececec;
    background: #f0f4fa;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 0 0 0 0;
    margin-bottom: 0;
}
.tab-btn {
    flex: 1;
    padding: 18px 0 14px 0;
    background: none;
    border: none;
    outline: none;
    font-size: 1.12rem;
    font-weight: 600;
    color: #29304b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-bottom 0.15s, background 0.15s;
}
.tab-btn.active {
    color: #3e8ef7;
    border-bottom: 3px solid #3e8ef7;
    background: #fff;
    z-index: 2;
}

.chat-brief-header {
    padding: 24px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #29304b;
    border-bottom: 1px solid #ececec;
    background: #f0f4fa;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.chat-brief-content {
    min-height: 160px;
    background: #f8fafc;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border-top: none;
    border: 1px solid #ececec;
    border-top: none;

    padding: 22px 20px;
    font-size: 1.05rem;
    color: #29304b;
    background: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    flex: 1;
    min-height: 200px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
