/* 旧布局：消息页独占全屏（仅非 App 布局时生效） */
body.qk-page-message:not(.app-layout-active) html {
    overflow: hidden;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

body.qk-page-message:not(.app-layout-active) footer.footer {
    display: none;
}

body.qk-page-message:not(.app-layout-active) .sidebar-menu {
    display: none;
}

/* App 布局：与首页共用侧栏 + 顶栏 */
body.qk-page-message.app-layout-active .app-layout {
    display: flex !important;
    width: 100%;
    min-height: 100vh;
}

body.qk-page-message.app-layout-active .app-layout > .sidebar-menu {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start !important;
    width: var(--channel-width) !important;
    min-width: var(--channel-width) !important;
    height: 100vh !important;
    z-index: 150 !important;
}

body.qk-page-message.app-layout-active .app-layout > .sidebar-menu.collapsed {
    width: var(--channel-width-collapsed) !important;
    min-width: var(--channel-width-collapsed) !important;
}

body.qk-page-message.app-layout-active .app-layout > .sidebar-menu .sidebar-body {
    display: flex !important;
}

body.qk-page-message.app-layout-active .app-layout > .sidebar-menu.collapsed .sidebar-body {
    display: none !important;
}

body.qk-page-message.app-layout-active .app-layout > .sidebar-menu.collapsed .sidebar-icons {
    display: flex !important;
}

@media (max-width: 768px) {
    body.qk-page-message.app-layout-active .app-layout > .sidebar-menu {
        position: fixed !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.qk-page-message.app-layout-active .app-layout > .sidebar-menu.show {
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.qk-page-message.app-layout-active .app-layout > .sidebar-menu .sidebar-body,
    body.qk-page-message.app-layout-active .app-layout > .sidebar-menu.collapsed .sidebar-body {
        display: flex !important;
    }
}

.app-layout-active.qk-page-message .site-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-top: 16px;
    padding-bottom: 12px;
}

.app-layout-active.qk-page-message .content-zone {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.app-layout-active.qk-page-message .content-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.qk-page-message .qk-single-content.wrapper {
    flex-direction: column;
    max-width: calc(var(--wrapper-width) + 48px);
    padding: 0 24px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.app-layout-active.qk-page-message .qk-single-content {
    flex: 1;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    max-width: calc(var(--wrapper-width) + 48px);
    padding: 0 24px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.app-layout-active.qk-page-message .message-page {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.message-box {
    height: 100%;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    max-height: calc(100vh - var(--top-menu-height) - var(--gap) * 2);
    box-shadow: 0 2px 12px color-mix(in srgb, var(--color-text-primary) 8%, transparent);
    margin: 0;
    overflow: hidden;
    background: var(--bg-main-color);
}

.qk-page-message .content-area.message-page {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.app-layout-active.qk-page-message .message-box {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    height: auto;
}

.message-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color-base);
    flex-shrink: 0;
}

.message-page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.message-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
    font-size: 13px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.message-new-btn:hover {
    background: color-mix(in srgb, var(--color-primary) 18%, transparent);
    border-color: var(--color-primary);
}

.message-new-btn i {
    font-size: 16px;
}

.message-body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

.sub-panel {
    width: 320px;
    min-width: 320px;
    border-right: 1px solid var(--border-color-base);
    z-index: 2;
    display: flex;
    flex-direction: column;
    background: var(--bg-main-color);
    align-self: stretch;
}

.message-tabs {
    display: flex;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color-base);
    flex-shrink: 0;
    align-items: stretch;
    box-sizing: border-box;
}

.message-tab {
    position: relative;
    flex: 1;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.message-tab:hover {
    color: var(--color-text-primary);
}

.message-tab.active {
    color: var(--color-primary);
}

.message-tab.active::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--color-primary);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    margin-left: 4px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    font-style: normal;
    line-height: 1;
}

.message-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 16px;
    padding: 0 12px;
    height: 36px;
    border-radius: 999px;
    background: var(--bg-muted-color);
    border: 1px solid var(--border-color-base);
    flex-shrink: 0;
}

.message-search i {
    color: var(--color-text-secondary);
    font-size: 16px;
}

.message-search input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--color-text-primary);
    font-size: 13px;
    outline: none;
}

.message-search input::placeholder {
    color: var(--color-text-placeholder);
}

.chat-list {
    flex: 1 1;
    overflow: auto;
}

.chat-list-wrapper {
    padding: 4px 8px 12px;
}

.chat-item {
    min-height: 68px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.chat-list-wrapper > :not(:last-of-type) {
    margin-bottom: 2px;
}

.chat-list-wrapper .user-avatar {
    position: relative;
    margin-right: 10px;
    flex-shrink: 0;
}

.chat-list-wrapper .user-avatar .avatar-face {
    border: 0;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-text-primary) 8%, transparent);
}

.unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}

.user-info {
    flex: 1 1;
    min-width: 0;
}

.last-word {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.name-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.name-box .time {
    font-size: 11px;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.user-name .name {
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.chat-item:hover {
    background-color: var(--bg-muted-color);
}

.chat-item.active {
    background: color-mix(in srgb, var(--color-primary) 22%, var(--bg-muted-color));
    border: 1px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
}

.chat-item-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .2s, color .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-item:hover .chat-item-delete,
.chat-item.active .chat-item-delete {
    opacity: 1;
}

.chat-item-delete:hover {
    background: color-mix(in srgb, #ef4444 12%, transparent);
    color: #ef4444;
}

.chat-list-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 13px;
}

/* 系统消息类型图标 */
.msg-type-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.msg-type-avatar i {
    line-height: 1;
}

.msg-type-system { background: #4da6ff; }
.msg-type-vip { background: linear-gradient(135deg, #2d2d44, #1a1a2e); color: #ffd700; }
.msg-type-like { background: #a855f7; }
.msg-type-serve { background: #22c55e; }
.msg-type-comment { background: #f472b6; }
.msg-type-follow { background: #3b82f6; }
.msg-type-wallet { background: #f97316; }
.msg-type-circle { background: #06b6d4; }
.msg-type-distribution { background: #8b5cf6; }

.main-panel {
    flex: 1 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.message-empty-state {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0;
    box-shadow: none;
    background: transparent;
}

.message-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-primary) 14%, transparent);
    color: var(--color-primary);
    border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.message-empty-icon i {
    font-size: 34px;
    line-height: 1;
}

.message-empty-state .empty-text {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.message-panel {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.head {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color-base);
    flex-shrink: 0;
    padding: 0 48px;
}

.head .back {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: background .2s, color .2s;
}

.head .back:hover {
    background: var(--bg-muted-color);
    color: var(--color-text-primary);
}

.head .back i {
    font-size: 20px;
}

.head-user {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.head-avatar {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.head .title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-list {
    flex: 1 1;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg-muted-color);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.msg-more .loader i {
    display: inline-block;
    animation: spin 1.3s infinite linear;
    font-size: 25px;
}

.msg-more {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.msg-more > div {
    padding-bottom: 20px;
}

.msg-more > div.loader {
    position: absolute;
    width: 100%;
    left: 0;
    top: 2px;
    z-index: 999;
    color: var(--color-primary);
}

.notice-item {
    position: relative;
}

.notice-list-content .notice-item + .notice-item {
    margin-top: 16px;
}

.notice {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-radius: var(--radius);
}

.notice-content {
    flex-grow: 1;
    margin: 0 8px;
    width: 0;
}

.notice-user {
    font-size: 14px;
    font-weight: 600;
}

.notice-message {
    font-size: 13px;
    position: relative;
    margin: 8px 0;
    color: var(--color-text-regular);
}

.notice-message > a {
    color: var(--color-primary);
    display: contents;
}

.notice-message > p {
    background: var(--bg-muted-color);
    border-radius: var(--radius);
    padding: 12px;
    color: var(--color-text-regular);
    font-size: 12px;
    margin-top: 8px;
}

.notice-message img {
    max-width: 24px;
    max-height: 24px;
    vertical-align: bottom;
}

.notice-action {
    font-size: 12px;
    font-weight: 400;
    height: 20px;
    line-height: 20px;
    color: var(--color-text-secondary);
}

.notice-image {
    border-radius: 4px;
    height: 70px;
    margin-top: 1px;
    width: 70px;
}

.notice-list-content {
    padding: 20px;
}

.notice .user-avatar {
    width: 45px;
    height: 45px;
}

.message-list-content.message-render {
    padding: 20px;
    position: relative;
}

.msg-container-self {
    display: flex;
    flex-direction: row-reverse;
    margin-bottom: 16px;
    align-items: flex-start;
}

.msg-main {
    position: relative;
    margin-left: 52px;
}

.msg.text-msg {
    font-size: 14px;
    min-height: 37px;
    padding: 8px 16px;
    word-wrap: break-word;
    word-break: break-word;
    border-radius: 0 16px 16px 16px;
    overflow: hidden;
    background: var(--bg-main-color);
    line-height: 1.6;
    margin-top: 4px;
}

.msg.img-msg .image {
    min-width: 72px;
    min-height: 72px;
    border-radius: 8px;
    max-height: 320px;
    max-width: 320px;
    cursor: pointer;
}

.msg.text-msg img {
    vertical-align: bottom;
    padding: 0 2px;
}

.emoticon-image {
    vertical-align: text-bottom;
    padding: 0 5px;
    max-width: 50px;
    max-height: 50px;
}

.emoticon-image.small {
    max-width: 24px;
    max-height: 24px;
    vertical-align: bottom;
}

.emoticon-image.large {
    max-width: 80px;
    max-height: 80px;
}

.new-msg {
    height: 6px;
    width: 6px;
    top: 8px;
    right: -10px;
    padding: 0;
    border-radius: 50%;
}

.is-read {
    position: absolute;
    right: 32px;
    bottom: 0;
    font-size: 12px;
    color: var(--color-text-placeholder);
    width: 100%;
}

.is-read.no {
    color: var(--color-primary);
}

.msg-container-other {
    display: flex;
    margin-bottom: 16px;
}

.msg-container-other .user-avatar {
    margin-right: 12px;
}

.msg-container-self .user-avatar {
    margin-left: 12px;
}

.msg-container-self .text-msg {
    background: var(--color-primary);
    border-radius: 16px 0 16px 16px;
    color: #fff;
}

.msg-container-other .msg-main {
    margin-right: 52px;
    margin-left: 0;
}

.date-split-msg {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    margin-top: 20px;
}

.date-split-msg:first-child {
    margin-top: 0;
}

.msg-notify-container {
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
    background: var(--bg-main-color);
    border: 1px solid var(--border-color-base);
    border-radius: 12px;
    overflow: hidden;
    line-height: initial;
    font-size: 14px;
    box-sizing: border-box;
}

.notify-card-list-content {
    padding: 20px;
}

.notify-card-list .msg-item + .msg-item .date-split-msg {
    margin-top: 16px;
}

.msg-notify-container .title {
    padding: 16px 15px 12px 15px;
    font-size: 17px;
    font-weight: 600;
}

.msg-notify-container .content {
    padding: 0 15px 16px 15px;
    color: var(--color-text-regular);
    font-size: 14px;
    line-height: 20px;
    white-space: pre-wrap;
    word-break: break-all;
}

.meta-list {
    margin-bottom: 16px;
    padding: 0 15px 0 15px;
}

.meta-list .item {
    margin-bottom: 8px;
    font-size: 13px;
}

.meta-list .item span:first-of-type {
    color: var(--color-text-secondary);
    margin-right: 12px;
}

.send-box {
    border-top: 1px solid var(--border-color-base);
    padding: 14px 16px 16px;
    position: relative;
    height: auto;
    min-height: 148px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: var(--bg-main-color);
    flex-shrink: 0;
    overflow: visible;
}

.composer {
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--color-text-primary) 14%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-muted-color) 65%, var(--bg-main-color));
    overflow: visible;
    transition: border-color .2s, box-shadow .2s;
}

.composer:focus-within {
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--border-color-base));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.composer-input {
    flex: 1;
    min-height: 64px;
    padding: 14px 16px 8px;
}

.composer-input textarea {
    caret-color: var(--color-primary);
    font-size: 14px;
    line-height: 1.6;
    min-height: 56px;
    height: 100%;
    width: 100%;
    border: 0;
    background: transparent;
    resize: none;
    outline: none;
    color: var(--color-text-primary);
}

.composer-input textarea::placeholder {
    color: var(--color-text-placeholder);
}

.composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 12px;
}

.composer-send {
    flex-shrink: 0;
    height: 36px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
}

.composer-send:hover {
    opacity: .92;
}

.composer-send:active {
    transform: scale(.98);
}

.chat-tool {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-tool-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color .2s, background .2s;
}

.chat-tool-item:hover:not(.is-disabled) {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.chat-tool-item.is-disabled {
    opacity: .45;
    cursor: default;
}

.chat-tool-item i {
    font-size: 20px;
    line-height: 1;
}

.chat-tool .qk-emoji {
    position: absolute;
    left: 0;
    right: auto;
    top: auto;
    bottom: calc(100% + 10px);
    margin-top: 0;
    z-index: 80;
    width: min(363px, calc(100vw - 48px));
    background: var(--bg-main-color);
    box-shadow: none;
    border: 1px solid var(--border-color-base);
    border-radius: 12px;
    overflow: hidden;
}

.chat-tool .qk-emoji:before {
    top: auto;
    bottom: -8px;
    left: 14px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid var(--border-color-base);
    border-bottom: 0;
}

.chat-tool .qk-emoji .emoji-title {
    background: var(--bg-main-color);
}

.chat-tool .qk-emoji .emoji-tabs {
    background: var(--bg-muted-color);
}

/* 兼容旧类名（防止其它页面残留） */
.input-box,
.send-btn {
    display: none;
}

.message-list::-webkit-scrollbar,
.chat-list::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.message-list::-webkit-scrollbar-corner,
.chat-list::-webkit-scrollbar-corner {
    background-color: transparent;
}

.message-list::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb {
    border-radius: var(--radius);
    background-color: var(--color-text-placeholder);
}

@media screen and (max-width: 768px) {
    .message-page-header {
        display: none;
    }

    .chat-item-delete {
        opacity: 1;
    }

    .sub-panel {
        width: 100%;
        min-width: 0;
    }

    .notice-list-content {
        padding: 12px;
    }

    .send-box {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg-main-color);
        z-index: 111;
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        align-items: stretch;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border-color-base);
        box-shadow: 0 -4px 16px color-mix(in srgb, var(--color-text-primary) 8%, transparent);
    }

    .send-box .composer {
        min-height: 96px;
    }

    .send-box .composer-input {
        padding: 12px 12px 4px;
        min-height: 44px;
    }

    .send-box .composer-input textarea {
        min-height: 40px;
    }

    .send-box .composer-bar {
        padding: 4px 8px 10px;
    }

    .send-box .composer-send {
        height: 32px;
        padding: 0 16px;
        font-size: 13px;
    }

    .message-box {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        max-height: 100%;
        padding-bottom: 120px;
    }

    .app-layout-active.qk-page-message .message-box {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        padding-bottom: 120px;
    }
}

.msg-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.msg-dialog {
    width: 100%;
    max-width: 400px;
    background: var(--bg-main-color);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.msg-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color-base);
    font-size: 16px;
    font-weight: 600;
}

.msg-dialog-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.msg-dialog-close:hover {
    background: var(--bg-muted-color);
    color: var(--color-text-primary);
}

.msg-dialog-body {
    padding: 18px;
}

.msg-dialog-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.msg-dialog-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color-base);
    border-radius: 10px;
    background: var(--bg-muted-color);
    color: var(--color-text-primary);
    font-size: 14px;
    outline: none;
}

.msg-dialog-input:focus {
    border-color: var(--color-primary);
}

.msg-dialog-tip,
.msg-dialog-desc {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.msg-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 18px 18px;
}

.msg-dialog-actions.stacked {
    flex-direction: column;
    align-items: stretch;
}

.msg-dialog-btn {
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--border-color-base);
    border-radius: 10px;
    background: var(--bg-main-color);
    color: var(--color-text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.msg-dialog-btn:hover:not(:disabled) {
    background: var(--bg-muted-color);
}

.msg-dialog-btn.primary {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.msg-dialog-btn.primary:hover:not(:disabled) {
    opacity: .92;
}

.msg-dialog-btn.danger {
    border-color: color-mix(in srgb, #ef4444 35%, transparent);
    background: color-mix(in srgb, #ef4444 10%, transparent);
    color: #ef4444;
}

.msg-dialog-btn.danger:hover:not(:disabled) {
    background: color-mix(in srgb, #ef4444 18%, transparent);
}

.msg-dialog-btn.ghost {
    border-color: transparent;
    background: transparent;
    color: var(--color-text-secondary);
}

.msg-dialog-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}
