
.chat-page {
    height: 97vh;
    display: flex;
    flex-direction: column;
    background: #f3f7ff;
    overflow: hidden;
}

.chat-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
    box-sizing: border-box;
    overflow: hidden;
}

.chat-side {
    flex: 0 0 140px;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(19, 54, 116, 0.08);
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding-top: 10px;
}

.chat-side-right {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px;
}

.chat-side-right img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.chat-side-right img[alt="qrcode"] {
    width: 108px;
    height: 108px;
    border-radius: 6px;
    background: #fff;
    object-fit: cover;
}

.chat-side img {
    display: block;
    /* width: 100%;
    height: 100%; */
    object-fit: cover;
    border-radius: 6px;
}

.chat-header {
    flex: 0 0 auto;
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #1e63e9 0%, #1b7af5 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(19, 54, 116, 0.18);
}

.chat-header-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.chat-header-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    opacity: 0.95;
}

.chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
}

.chat-dot.is-ok {
    background: #26d678;
}

.chat-shell {
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.chat-main {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(19, 54, 116, 0.08);
}

.chat-messages {
    flex: 1;
    min-height: 0;
    padding: 14px 12px;
    overflow-y: auto;
    background: #f7f9ff;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.chat-msg.me {
    align-items: flex-end;
}

.chat-msg.other {
    align-items: flex-start;
}

.chat-msg.sys {
    align-items: center;
}

.chat-bubble {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg.me .chat-bubble {
    background: linear-gradient(180deg, #2e82ff 0%, #1f6cf2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-msg.other .chat-bubble {
    background: #fff;
    color: #2b3344;
    border: 1px solid #e8eeff;
    border-bottom-left-radius: 4px;
}

.chat-msg.sys .chat-bubble {
    background: rgba(27, 122, 245, 0.08);
    color: #1b5fd4;
    border: 1px dashed rgba(27, 122, 245, 0.25);
}

.chat-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #9aa3b2;
}

.chat-composer {
    flex: 0 0 auto;
    border-top: 1px solid #edf1ff;
    background: #fff;
}

.chat-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
}

.chat-tool-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #f1f6ff;
    color: #1b6cf2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-tool-btn .layui-icon {
    font-size: 18px;
}

.chat-toolbar-spacer {
    flex: 1;
}

.chat-phone-input {
    width: 140px;
    height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #e8eeff;
    background: #fff;
    outline: none;
    font-size: 12px;
}

.chat-send-phone.layui-btn {
    border-radius: 10px;
}

.chat-send.layui-btn {
    border-radius: 10px;
    background: #1b6cf2;
}

.chat-input {
    width: 100%;
    height: 96px;
    border: 0;
    outline: none;
    resize: none;
    padding: 10px 12px 12px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 1.45;
}

.chat-emoji-panel {
    padding: 10px 10px 2px;
    border-bottom: 1px solid #edf1ff;
    background: #fff;
}

.chat-qrcode {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 108px;
    height: 108px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(19, 54, 116, 0.14);
    border: 1px solid rgba(27, 108, 242, 0.12);
}

.chat-qrcode img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.chat-emoji-item {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.chat-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.chat-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 220px;
    max-width: 340px;
}

.chat-file-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.chat-file-name {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-file-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-file-open {
    font-size: 12px;
    color: inherit;
    text-decoration: underline;
    opacity: 0.9;
}

.chat-file .layui-icon {
    font-size: 18px;
}

@media (max-width: 980px) {
    .chat-side {
        display: none;
    }

    .chat-layout {
        padding: 12px;
        gap: 12px;
    }
}

