/* 招聘沟通中心：仅作用于 im- 前缀，不影响原有页面样式 */
.im-floating {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1045;
}

/* 悬浮沟通：纯图标，沿用主题圆形图标入口的视觉语言 */
/* 悬浮入口：沿用主题按钮的实心色与 4px 圆角 */
.im-fab {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: var(--primary-color, #1a73e8);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: background .18s ease;
}

.im-fab:hover,
.im-fab:focus {
    background: var(--secondary-color, #0f5bc4);
    color: #fff;
}

.im-fab > .im-bubble-icon {
    width: 26px;
    height: 26px;
}

.im-fab-guest {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1045;
    text-decoration: none;
}

.im-fab-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: #e5342b;
    color: #fff;
    font-size: 12px;
    line-height: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.im-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: 330px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(20, 35, 60, .18);
}

.im-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eef0f4;
}

.im-panel-head strong {
    display: block;
    font-size: 16px;
}

.im-panel-sub {
    display: block;
    margin-top: 3px;
    color: #7c8798;
    font-size: 12px;
}

.im-panel-close {
    border: 0;
    background: transparent;
    color: #7c8798;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.im-panel-list {
    max-height: 320px;
    overflow-y: auto;
}

.im-panel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-bottom: 1px solid #f4f5f7;
    color: inherit;
    text-decoration: none;
}

.im-panel-item:hover {
    background: #f7faff;
}

.im-panel-item-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.im-panel-item-body strong {
    font-size: 14px;
}

.im-panel-item-body span {
    overflow: hidden;
    color: #7c8798;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-panel-all {
    display: block;
    padding: 12px 18px;
    background: #f7faff;
    color: var(--primary-color, #1a73e8);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.im-panel-empty {
    padding: 28px 18px;
    color: #7c8798;
    font-size: 13px;
    text-align: center;
}

.im-panel-empty i {
    font-size: 30px;
}

.im-avatar {
    display: inline-block;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background-color: #eef1f6;
    background-position: center;
    background-size: cover;
}

/* 消息中心 */
.im-center-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.im-filter {
    display: flex;
    gap: 8px;
}

.im-conversation-list {
    border: 1px solid #e9ecf1;
    border-radius: 4px;
    background: #fff;
}

.im-conversation-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f2f5;
    color: inherit;
    text-decoration: none;
}

.im-conversation-item:last-child {
    border-bottom: 0;
}

.im-conversation-item:hover {
    background: #f8faff;
}

.im-conversation-item.is-unread {
    background: #f5f9ff;
}

.im-conversation-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.im-conversation-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.im-conversation-top strong {
    font-size: 15px;
}

.im-unread {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #e5342b;
    color: #fff;
    font-size: 11px;
    text-align: center;
}

.im-time {
    margin-left: auto;
    color: #8a94a3;
    font-size: 12px;
}

.im-job {
    color: var(--primary-color, #1a73e8);
    font-size: 12px;
}

.im-preview {
    overflow: hidden;
    color: #7c8798;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-open {
    color: #aab2bf;
}

.im-empty {
    padding: 50px 20px;
    text-align: center;
}

.im-empty-icon {
    color: var(--primary-color, #1a73e8);
    font-size: 44px;
}

/* 会话详情 */
.im-chat-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e9ecf1;
    border-radius: 4px;
    background: #fff;
}

.im-back {
    color: #4a5566;
    font-size: 20px;
}

.im-chat-title {
    flex: 1;
}

.im-typing {
    color: var(--primary-color, #1a73e8);
    font-size: 12px;
}

.im-job-link {
    font-size: 13px;
    text-decoration: none;
}

.im-thread {
    height: 460px;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #e9ecf1;
    border-radius: 4px 4px 0 0;
    background: #f7f9fc;
}

.im-message {
    display: flex;
    max-width: 76%;
    margin-bottom: 14px;
    flex-direction: column;
    align-items: flex-start;
}

.im-message.is-mine {
    margin-left: auto;
    align-items: flex-end;
}

.im-message.is-system {
    max-width: 100%;
    align-items: center;
}

.im-bubble {
    padding: 10px 14px;
    border: 1px solid #e6e9ef;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.im-message.is-mine .im-bubble {
    border-color: var(--primary-color, #1a73e8);
    border-radius: 4px;
    background: var(--primary-color, #1a73e8);
    color: #fff;
}

.im-system-bubble {
    padding: 5px 12px;
    border-radius: 4px;
    background: #e9edf3;
    color: #5a6472;
    font-size: 12px;
}

.im-message time {
    margin-top: 4px;
    color: #93a0af;
    font-size: 11px;
}

.im-attachment {
    margin-top: 6px;
    font-size: 12px;
}

.im-attachment span {
    color: #8a94a3;
}

.im-composer {
    padding: 14px 16px;
    border: 1px solid #e9ecf1;
    border-top: 0;
    border-radius: 0 0 4px 4px;
    background: #fff;
}

.im-quick-replies {
    display: flex;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.im-quick-label,
.im-quick-manage {
    color: #7c8798;
    font-size: 12px;
}

.im-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.im-input-row textarea {
    min-height: 58px;
    flex: 1;
    resize: vertical;
}

.im-send {
    min-width: 108px;
}

.im-attach-row {
    display: flex;
    margin-top: 8px;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.im-attach-row small {
    font-size: 11px;
}

.im-attach-label {
    margin-bottom: 0;
    color: var(--primary-color, #1a73e8);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* 未投递说明层：主题 4px 圆角、轻边框，不用大圆角浮层 */
.im-hint {
    position: fixed;
    inset: 0;
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 35, 60, .45);
}

.im-hint[hidden] {
    display: none !important;
}

.im-hint-box {
    width: 360px;
    max-width: 100%;
    padding: 20px;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

.im-hint-title {
    margin: 0 0 8px;
    color: #2f3846;
    font-size: 16px;
    font-weight: 700;
}

.im-hint-text {
    margin: 0 0 16px;
    color: #6b7685;
    font-size: 13px;
    line-height: 1.7;
}

.im-hint-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 图标入口：沿用主题 .btn-apply-now 的浅底、方形圆角与等高规则 */
.im-entry {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
}

/* ── 底部操作区：小屏保持单行 ────────────────────────────────────
   主题在小屏给 .contact-button 设了 width:100% !important，会把同组按钮
   拆成多行。这里在底部作用域内强制单行、去掉重复 margin。 */
.single-apply-jobs .im-actions {
    flex-wrap: nowrap !important;
    gap: 8px !important;
}

.single-apply-jobs .im-actions > a,
.single-apply-jobs .im-actions .btn,
.single-apply-jobs .im-actions .im-entry,
.single-apply-jobs .im-actions .im-chat-icon {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .single-apply-jobs .im-actions .btn {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    .single-apply-jobs .im-actions .im-chat-icon {
        width: 36px;
        height: 36px;
    }
}

/* ── 收藏按钮：嵌在 h1 内也要保持正方形 ──────────────────────────
   <a> 继承标题行高会把图标容器拉成矩形，这里用 inline-flex + 固定尺寸锁定。 */
.job-bookmark-saved {
    display: inline-flex;
    vertical-align: middle;
    line-height: 0;
}

.job-bookmark-action {
    display: inline-flex !important;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.job-bookmark-action .favorite-icon {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 1;
}

/* fi-rr-heart 用 ::before 渲染图标字体，绝对定位确保严格居中在方框内 */
.job-bookmark-action .favorite-icon span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.job-bookmark-action .favorite-icon span::before {
    line-height: 1;
}

/* ── 操作区统一配色（首页/列表/详情）────────────────────────────
   主题把配色分散在 .btn-apply-now / .contact-button / .btn-apply-icon 等多条规则里，
   且 .contact-button 没有 hover 规则，导致同一行按钮与图标颜色/悬停表现不一致。
   这里用 .im-actions 作用域一次性锁定：静态底色+字色、hover 实色+白字，
   图标一律 currentColor，跟随文字变色。 */
.im-actions .btn-apply-now,
.im-actions .btn-default,
.im-actions .contact-button,
.im-actions .im-chat-icon {
    background-color: var(--border-color-2, #e0e6f7) !important;
    color: var(--primary-color, #3c65f5) !important;
    border: 0;
    border-radius: 4px;
}

.im-actions .btn-apply-now:hover,
.im-actions .btn-default:hover,
.im-actions .contact-button:hover,
.im-actions .im-chat-icon:hover,
.im-actions .btn-apply-now:focus-visible,
.im-actions .btn-default:focus-visible,
.im-actions .contact-button:focus-visible,
.im-actions .im-chat-icon:focus-visible {
    background-color: var(--primary-color, #3c65f5) !important;
    color: #fff !important;
}

/* 图标颜色恒等于文字颜色：气泡轮廓只描边，三个圆点只填充 */
.im-actions .btn-apply-icon::before {
    background-color: currentColor;
}

.im-actions .im-bubble-icon path {
    stroke: currentColor;
    fill: none;
}

.im-actions .im-bubble-icon circle {
    fill: currentColor;
}

/* 与相邻按钮里的 apply.svg 图标同为 16px，容器保持 42×42 与按钮等高 */
/* 用左右 padding 撑开容器，图标不贴边；高度仍与相邻按钮一致 */
.im-actions .im-chat-icon {
    width: auto;
    height: 42px;
    padding: 0 14px;
    flex: 0 0 auto;
}

.im-actions .im-chat-icon > .im-bubble-icon {
    width: 16px;
    height: 16px;
}

/* 主题 apply.svg 是白色描边，静态浅底上几乎看不见，与按钮文字不同色。
   用 currentColor mask 重绘，让图标颜色始终跟随文字（含 hover 白字）。 */
.btn-apply-icon {
    background-image: none !important;
    padding-left: 10px !important;
}

.btn-apply-icon::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -3px;
    background-color: currentColor;
    -webkit-mask: url(../imgs/template/icons/apply.svg) center / contain no-repeat;
    mask: url(../imgs/template/icons/apply.svg) center / contain no-repeat;
}

.btn-apply-big.btn-apply-icon {
    padding-left: 35px !important;
}

.btn-apply-big.btn-apply-icon::before {
    width: 20px;
    height: 20px;
}

/* 与主题 .btn-apply-now 完全一致的静态与 hover 视觉 */
.im-chat-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background-color: var(--border-color-2, #e0e6f7);
    color: var(--primary-color, #1a73e8);
    line-height: 1;
    text-decoration: none;
    transition: .2s;
}

.im-chat-icon > .im-bubble-icon {
    width: 20px;
    height: 20px;
}

/* 与编译后的 .btn-apply-now:hover 完全一致：实色背景 + 白字 */
.im-chat-icon:hover,
.im-chat-icon:focus {
    background-color: var(--primary-color, #1a73e8);
    color: #fff;
}

.im-chat-icon.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    /* 主题在此断点给 .btn-apply-now 设 max-width:92px / min-width:unset */
    .im-chat-icon {
        min-width: 42px;
        max-width: 92px;
    }
}

/* 顶部铃铛沿用 header-item 原有样式，只统一图标尺寸 */
.im-header-icon .icon {
    font-size: 18px;
}

.im-candidate-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.im-text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color, #1a73e8);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.im-filter-link {
    padding: 6px 12px;
    color: #7c8798;
    font-size: 13px;
    text-decoration: none;
}

.im-filter-link.is-active {
    border-bottom: 2px solid var(--primary-color, #1a73e8);
    color: var(--primary-color, #1a73e8);
}

.im-quick-chip {
    padding: 4px 10px;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #fff;
    color: #4a5566;
    font-size: 12px;
    cursor: pointer;
}

.im-quick-chip:hover {
    border-color: var(--primary-color, #1a73e8);
    color: var(--primary-color, #1a73e8);
}

.im-send-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: var(--primary-color, #1a73e8);
    color: #fff;
    cursor: pointer;
}

.im-send-icon:hover {
    background: var(--secondary-color, #0f5bc4);
}

.im-mobile-chat,
.user-dropdown-menu a.im-dropdown-chat {
    color: var(--primary-color, #1a73e8) !important;
}

/* 悬浮对话窗口 */
.im-dialog {
    position: absolute;
    left: 0;
    bottom: 68px;
    display: flex;
    width: 380px;
    max-width: calc(100vw - 28px);
    height: 520px;
    max-height: calc(100vh - 100px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}

.im-dialog-head {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef0f4;
}

.im-dialog-head-main {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.im-dialog-head-chat {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.im-dialog-title {
    color: #2f3846;
    font-size: 15px;
    font-weight: 700;
}

.im-dialog-sub {
    color: #9aa4b2;
    font-size: 11px;
}

.im-icon-btn {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #6b7685;
    font-size: 18px;
    cursor: pointer;
}

.im-icon-btn:hover {
    background: #f1f4f8;
    color: var(--primary-color, #1a73e8);
}

.im-avatar-sm {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

/* 在线状态：绿色=在线，灰色=离线 */
.im-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.im-avatar-wrap-sm {
    width: 32px;
    height: 32px;
}

.im-status-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
}

.im-status-dot.is-offline {
    background: #9aa4b2;
}

.im-peer-meta {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.im-peer-name {
    overflow: hidden;
    color: #2f3846;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-peer-state {
    color: #22c55e;
    font-size: 11px;
}

.im-peer-state.is-offline {
    color: #9aa4b2;
}

.im-peer-state:empty {
    display: none;
}

.im-dialog-body {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

.im-dialog-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f3f5f8;
    cursor: pointer;
}

.im-dialog-item:hover {
    background: #f7faff;
}

.im-dialog-item-body {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.im-dialog-item-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.im-dialog-item-top strong {
    color: #2f3846;
    font-size: 14px;
}

.im-dialog-item-top time {
    color: #9aa4b2;
    font-size: 11px;
}

.im-dialog-item-preview {
    overflow: hidden;
    color: #7c8798;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-dialog-empty {
    padding: 50px 20px;
    color: #7c8798;
    text-align: center;
}

.im-dialog-empty-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(26, 115, 232, .08);
    color: var(--primary-color, #1a73e8);
    font-size: 26px;
}

.im-dialog-empty strong {
    display: block;
    margin-top: 14px;
    color: #4a5566;
    font-size: 14px;
}

.im-dialog-empty p {
    font-size: 12px;
    line-height: 1.6;
}

.im-dialog-chat {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    background: #f7f9fc;
}

.im-dialog-thread {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.im-msg {
    display: flex;
    max-width: 78%;
    margin-bottom: 12px;
    flex-direction: column;
    align-items: flex-start;
}

.im-msg.is-mine {
    margin-left: auto;
    align-items: flex-end;
}

.im-msg.is-system {
    max-width: 100%;
    align-items: center;
}

.im-msg-bubble {
    padding: 9px 12px;
    border-radius: 8px;
    background: #fff;
    color: #2f3846;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.im-msg.is-mine .im-msg-bubble {
    background: var(--primary-color, #1a73e8);
    color: #fff;
}

.im-msg-system {
    padding: 4px 10px;
    border-radius: 4px;
    background: #e9edf3;
    color: #697586;
    font-size: 11px;
}

.im-msg time {
    margin-top: 3px;
    color: #9aa4b2;
    font-size: 10px;
}

.im-msg-file {
    display: block;
    margin-top: 5px;
    color: inherit;
    font-size: 12px;
}

.im-context {
    padding: 10px 12px 0;
    background: #fff;
}

.im-apply-card {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #f9fafc;
}

.im-apply-card-main {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.im-apply-card-main strong {
    overflow: hidden;
    color: #2f3846;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-apply-card-main span {
    color: #7c8798;
    font-size: 11px;
}

.im-apply-status {
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(26, 115, 232, .09);
    color: var(--primary-color, #1a73e8);
    font-size: 11px;
}

.im-status-row {
    display: flex;
    width: 100%;
    gap: 8px;
    align-items: center;
}

.im-status-row select {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #e1e6ed;
    border-radius: 4px;
    color: #4a5566;
    font-size: 12px;
}

.im-apply-notice {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 8px 12px;
    border: 1px solid #f5d9a8;
    border-radius: 4px;
    background: #fffaf0;
    color: #8a6a2f;
    font-size: 12px;
}

.im-dialog-quick {
    display: flex;
    gap: 6px;
    padding: 8px 12px 0;
    overflow-x: auto;
    background: #fff;
}

.im-dialog-compose {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 12px;
    border-top: 1px solid #e9ecf1;
    background: #fff;
}

.im-dialog-compose textarea {
    flex: 1;
    min-height: 40px;
    max-height: 110px;
    padding: 10px 12px;
    border: 1px solid #e1e6ed;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    resize: none;
}

.im-dialog-compose textarea:focus {
    border-color: var(--primary-color, #1a73e8);
    outline: 0;
}

.im-dialog-foot {
    padding: 8px 14px;
    border-top: 1px solid #eef0f4;
    text-align: center;
}

.im-dialog-foot a {
    color: var(--primary-color, #1a73e8);
    font-size: 12px;
    text-decoration: none;
}

@media (max-width: 767px) {
    .im-floating { left: 14px; bottom: 14px; }
    .im-fab-guest { left: 14px; bottom: 14px; }
    .im-dialog { left: -2px; bottom: 62px; }
    .im-fab { width: 50px; height: 50px; }
    .im-fab > .im-bubble-icon { width: 24px; height: 24px; }
    .im-dialog { right: -2px; bottom: 62px; width: calc(100vw - 24px); height: min(560px, calc(100vh - 90px)); }
    .im-panel { width: calc(100vw - 28px); }
    .im-thread { height: 60vh; }
    .im-center-heading { align-items: flex-start; flex-direction: column; }
}

/* ── 左侧直接沟通引导窗 ────────────────────────────────────────── */
.im-discover {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1044;
    width: 300px;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    overflow: hidden;
    transition: transform .25s ease, opacity .25s ease;
}

.im-discover[hidden] {
    display: none !important;
}

.im-discover-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f4;
    background: var(--border-color-2, #e0e6f7);
}

.im-discover-head > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.im-discover-head strong {
    color: #2f3846;
    font-size: 13px;
}

.im-discover-head span {
    color: #6b7685;
    font-size: 11px;
}

.im-discover-list {
    max-height: 300px;
    overflow-y: auto;
}

.im-discover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f2f4f7;
    color: inherit;
    text-decoration: none;
}

.im-discover-item:hover {
    background: #f9fafc;
}

.im-discover-meta {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.im-discover-meta strong {
    overflow: hidden;
    color: #2f3846;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.im-discover-meta span {
    color: #7c8798;
    font-size: 11px;
}

.im-discover-item > i {
    color: #9aa4b2;
    font-size: 14px;
}

.im-discover-foot {
    padding: 9px 14px;
    color: #7c8798;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 991px) {
    .im-discover { left: 14px; bottom: 14px; width: 260px; }
}

@media (max-width: 767px) {
    .im-discover {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    .im-discover-list { max-height: 190px; }
}

/* ── HR 侧：求职者公开信息 + 咨询来源职位 ───────────────────────── */
.im-seeker-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #eef0f4;
    background: #f9fafc;
}

.im-seeker-card[hidden],
.im-origin-job[hidden] {
    display: none !important;
}

.im-seeker-label {
    color: #9aa4b2;
    font-size: 10px;
    text-transform: uppercase;
}

.im-seeker-name {
    color: var(--primary-color, #3c65f5);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.im-seeker-name:hover {
    text-decoration: underline;
}

.im-seeker-meta {
    color: #6b7685;
    font-size: 11px;
}

.im-origin-job {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #eef0f4;
    color: #6b7685;
    font-size: 11px;
}

.im-origin-job a {
    overflow: hidden;
    max-width: 280px;
    color: var(--primary-color, #3c65f5);
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── 左侧引导窗：列表项复用消息中心会话列表样式 ─────────────────── */
.im-discover-list .im-conversation-item {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 12px 14px;
    gap: 10px;
}

.im-discover-list .im-conversation-item:hover {
    background: #f8faff;
}

.im-discover-list .im-conversation-item .im-avatar-wrap {
    width: 44px;
    height: 44px;
}

.im-discover-list .im-conversation-item .im-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.im-discover-list .im-conversation-item .im-conversation-body .im-preview {
    max-width: 190px;
}

.im-seeker-resume {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: var(--primary-color, #3c65f5);
    font-size: 11px;
    text-decoration: none;
}

.im-seeker-resume:hover {
    text-decoration: underline;
}

/* ── 左侧悬浮入口与对话框的出现/消失动画 ───────────────────────── */
.im-fab {
    transform-origin: left bottom;
    opacity: 1;
    transform: scale(1);
    transition: opacity .25s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1), background .18s ease;
}

.im-fab.is-hidden {
    opacity: 0;
    transform: scale(.5) translateY(12px);
    pointer-events: none;
}

.im-dialog {
    opacity: 0;
    transform: translateY(16px) scale(.98);
    transform-origin: left bottom;
    transition: opacity .22s ease, transform .28s cubic-bezier(.02, .01, .47, 1);
}

.im-dialog.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.im-discover {
    transition: opacity .25s ease, transform .25s ease;
}

.im-discover.is-closing {
    opacity: 0;
    transform: translateX(-16px);
    pointer-events: none;
}

/* ── 未读消息数字角标：头像右上角 ─────────────────────────────── */
.im-unread-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    z-index: 2;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 9px;
    background: #e5342b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

/* 未读会话：浅蓝底 + 名称加粗 */
.im-dialog-item.is-unread {
    background: #f5f9ff;
}

.im-dialog-item.is-unread .im-dialog-item-top strong {
    font-weight: 700;
    color: var(--primary-color, #3c65f5);
}

/* ── 现代附件上传：点击选择 + 拖拽 + 预览 ───────────────────────── */
.im-dropzone {
    position: relative;
    margin-top: 10px;
    border: 1px dashed #c9d2e3;
    border-radius: 4px;
    background: #fafbfe;
    transition: border-color .18s ease, background .18s ease;
}

.im-dropzone:hover,
.im-dropzone.is-dragover {
    border-color: var(--primary-color, #3c65f5);
    background: #f2f6ff;
}

.im-dropzone-inner {
    display: flex;
    min-height: 68px;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    cursor: pointer;
}

.im-dropzone-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(26, 115, 232, .09);
    color: var(--primary-color, #3c65f5);
    font-size: 18px;
}

.im-dropzone-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    color: #6b7685;
    font-size: 12px;
}

.im-dropzone-text strong {
    color: #2f3846;
    font-weight: 600;
}

.im-dropzone-inner > small {
    width: 100%;
    color: #9aa4b2;
    font-size: 10px;
}

.im-dropzone .im-attach-label {
    display: inline;
    color: var(--primary-color, #3c65f5);
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.im-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.im-upload-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 12px 10px;
}

.im-upload-preview:empty {
    display: none;
}

.im-upload-item {
    position: relative;
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e8ee;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.im-upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.im-upload-item > i {
    color: var(--primary-color, #3c65f5);
    font-size: 22px;
}

.im-upload-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 2;
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #e5342b;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
}
