/* 控制台补充样式（不覆盖原站组件，只补会话面板与登录层） */

.kc-chat-wrap { flex: 1 1 auto; min-width: 0; display: flex; height: 100%; }

.kc-chat { display: flex; flex-direction: column; width: 100%; background: #fff; height: 100%; }

.kc-chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #eef1f5; }

.kc-chat__avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; }

.kc-chat__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.kc-chat__name { font-size: 15px; font-weight: 600; color: rgba(0, 0, 0, .9); }

.kc-chat__sub { font-size: 12px; color: #6d778c; }

.kc-chat__actions { margin-left: auto; display: flex; gap: 8px; }

.kc-chat__body { flex: 1 1 auto; overflow-y: auto; padding: 20px; background: #f7f8fa; display: flex; flex-direction: column; gap: 12px; }

.kc-msg { display: flex; gap: 8px; align-items: flex-end; }

.kc-msg.is-agent { justify-content: flex-end; }

.kc-msg__avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; flex: 0 0 28px; }

.kc-msg__bubble { max-width: 62%; padding: 10px 14px; border-radius: 10px; background: #fff; color: rgba(0, 0, 0, .85); font-size: 13px; line-height: 1.6; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); white-space: pre-wrap; word-break: break-word; }

.kc-msg.is-agent .kc-msg__bubble { background: #1C66E5; color: #fff; }

.kc-msg__time { font-size: 11px; color: #9aa3b2; margin: 0 4px; }

.kc-chat__composer { border-top: 1px solid #eef1f5; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; }

.kc-chat__composer textarea { width: 100%; height: 68px; resize: none; border: 1px solid #e3e7ee; border-radius: 10px; padding: 10px 12px; font-size: 13px; font-family: inherit; outline: none; transition: border-color .15s; }

.kc-chat__composer textarea:focus { border-color: #1C66E5; }

.kc-chat__composer-row { display: flex; align-items: center; justify-content: space-between; }

.kc-chat__hint { font-size: 12px; color: #9aa3b2; }

.kc-send { background: #1C66E5; color: #fff; border: none; border-radius: 6px; padding: 8px 18px; font-size: 13px; cursor: pointer; transition: background .15s; }

.kc-send:hover { background: #1757c4; }

.kc-send:disabled { opacity: .5; cursor: default; }

.kc-mini-btn { border: 1px solid #e3e7ee; background: #fff; color: #4e5461; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; transition: all .15s; }

.kc-mini-btn:hover { border-color: #1C66E5; color: #1C66E5; }

.kc-login { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 20000; }

.kc-login-card { width: 360px; background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .4); display: flex; flex-direction: column; gap: 8px; }

.kc-login-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: #0a1a0f; margin-bottom: 6px; }

.kc-login-card h3 { font-size: 18px; margin: 0 0 8px; color: rgba(0, 0, 0, .9); }

.kc-login-card label { font-size: 12px; color: #6d778c; }

.kc-login-card input { height: 38px; border: 1px solid #e3e7ee; border-radius: 8px; padding: 0 12px; font-size: 13px; outline: none; transition: border-color .15s; }

.kc-login-card input:focus { border-color: #1C66E5; }

.kc-login-card button { margin-top: 10px; height: 40px; border: none; border-radius: 8px; background: #1C66E5; color: #fff; font-size: 14px; cursor: pointer; transition: background .15s; }

.kc-login-card button:hover { background: #1757c4; }

.kc-login-tip { font-size: 12px; color: #E5484D; min-height: 16px; margin: 4px 0 0; }

.kc-empty { padding: 40px 20px; text-align: center; color: #9aa3b2; font-size: 13px; }

html, body { min-width: 0; }

.trtc-tea-layout { min-width: 0; }


/* 频道栏选中态：按钮尺寸交还原站样式，只补背景与图标反色 */
.trtc-channel-rail__btn.is-active { background: #1C66E5; }

.trtc-channel-rail__btn.is-active .trtc-channel-rail__icon svg path { fill: #fff !important; }

.inbox-management-rail-entry.is-active { background: #1C66E5; }

.inbox-management-rail-entry.is-active svg path { fill: #fff !important; }


/* 列表操作按钮选中态 */
.inbox-management-action.is-active svg path { fill: #1C66E5 !important; }


/* 布局收口：去掉页面横向溢出，内容区撑满高度 */
html, body { min-width: 0 !important; }

.trtc-tea-layout, .trtc-tea-layout__header, .trtc-tea-nav { min-width: 0 !important; width: 100% !important; }

.trtc-tea-layout__content-inner { height: 100%; }

#app-area { display: flex; flex-direction: column; height: 100%; min-height: 0; }

#app-area .rtc-inbox-quick-reply-tip { flex: 0 0 auto; }

.rtc-inbox-messaging { flex: 1 1 auto; min-height: 0; }

.rtc-inbox-channel-rail { display: flex; flex-direction: column; height: 100%; }

.rtc-inbox-channel-rail .trtc-channel-rail { flex: 1 1 auto; }

.inbox-management-rail-entry-wrap { flex: 0 0 auto; }


/* 频道栏顶部对齐，避免出现空白占位 */
.rtc-inbox-channel-rail { align-items: flex-start; }

.rtc-inbox-channel-rail .trtc-channel-rail { padding-top: 8px; justify-content: flex-start !important; align-items: center; }


/* 频道栏图标：未选中灰色、选中白色（folder 图标内联 fill 为白色，需统一覆盖） */
.trtc-channel-rail__btn .trtc-channel-rail__icon svg path { fill: #6d778c !important; }

.trtc-channel-rail__btn.is-active .trtc-channel-rail__icon svg path { fill: #fff !important; }

.inbox-management-rail-entry svg path { fill: #6d778c !important; }

.inbox-management-rail-entry.is-active svg path { fill: #fff !important; }


/* 会话详情：日期分隔与气泡对齐 */
.kc-date-sep { text-align: center; font-size: 11px; color: #9aa3b2; margin: 6px 0 2px; }

.kc-date-sep span { background: transparent; }

.kc-msg .kc-msg__time { align-self: flex-end; }

.kc-chat__body { gap: 10px; }


/* 网页组件：语言下拉菜单 */
.app-trtc-dropdown { position: relative; }

.kc-dd-menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #e5e8ef; border-radius: 6px; box-shadow: 0 6px 20px rgba(16,24,40,.12); z-index: 50; padding: 4px; max-height: 260px; overflow: auto; }

.kc-dd-menu.is-open { display: block; }

.kc-dd-menu__item { padding: 8px 12px; font-size: 13px; color: #1f2329; border-radius: 4px; cursor: pointer; }

.kc-dd-menu__item:hover { background: #f2f4f8; }


/* 其它页面 */
.kc-page-wrap { flex: 1; min-width: 0; margin-left: 12px; background: #fff; border-radius: 8px; overflow: auto; padding: 24px; }

.kc-page { max-width: 1100px; }

.kc-page__hd { margin-bottom: 16px; }

.kc-page__title { font-size: 20px; font-weight: 600; color: #1f2329; margin: 0 0 4px; }

.kc-page__desc { font-size: 13px; color: #8a93a3; }

.kc-page__loading, .kc-page__empty { padding: 48px 0; text-align: center; color: #9aa3b2; font-size: 13px; }

.kc-table-card { padding: 0; overflow: hidden; }

.kc-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.kc-table th { text-align: left; font-weight: 500; color: #8a93a3; padding: 12px 16px; border-bottom: 1px solid #eef0f4; background: #fafbfc; }

.kc-table td { padding: 12px 16px; color: #1f2329; border-bottom: 1px solid #f3f5f8; }

.kc-notice { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid #eef0f4; border-radius: 8px; margin-bottom: 10px; background: #fff; }

.kc-notice__title { font-size: 14px; color: #1f2329; }

.kc-notice__meta { font-size: 12px; color: #8a93a3; margin-top: 2px; }

.kc-notice__state { font-size: 12px; padding: 2px 8px; border-radius: 10px; }

.kc-notice__state.is-ok { color: #16a34a; background: rgba(34,197,94,.12); }

.kc-notice__state.is-fail { color: #dc2626; background: rgba(220,38,38,.1); }

.kc-form-card { padding: 20px 24px; }

.kc-form-actions { display: flex; gap: 8px; margin-top: 16px; }

.kc-textarea { width: 100%; min-height: 96px; padding: 8px 12px; font-family: inherit; border: 1px solid #dfe3ea; border-radius: 6px; outline: none; font-size: 13px; }

.kc-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.kc-int-card { padding: 18px 20px; }

.kc-int-card__hd { display: flex; gap: 12px; align-items: center; }

.kc-int-card__icon { font-size: 20px; }

.kc-int-card__name { font-size: 15px; font-weight: 600; color: #1f2329; }

.kc-int-card__desc { font-size: 12px; color: #8a93a3; margin-top: 2px; }

.kc-int-card__stat { display: flex; gap: 16px; font-size: 12px; color: #6d778c; margin: 14px 0; }

.kc-int-card__ft { display: flex; justify-content: space-between; align-items: center; }

.kc-int-card__badge { font-size: 12px; color: #1C66E5; background: rgba(28,102,229,.1); padding: 2px 8px; border-radius: 10px; }

.kc-code { background: #f7f8fa; border: 1px solid #eef0f4; border-radius: 6px; padding: 14px; font-size: 12px; color: #1f2329; white-space: pre-wrap; word-break: break-all; }

.kc-contact-preview h3 { font-size: 16px; margin: 0 0 6px; }

.kc-contact-preview p { font-size: 13px; color: #8a93a3; margin: 0 0 14px; }

.kc-contact-fields { display: flex; gap: 10px; margin-bottom: 10px; }


/* 收件箱：聊天面板 + 详情面板 */
.kc-chat-wrap { flex: 1; min-width: 0; display: flex; overflow: hidden; background: #fff; border-radius: 8px; }

.kc-chat-wrap .trtc-messaging__panel { height: 100%; }

.kc-chat-wrap .trtc-messaging__panel.is-full { flex: 1; min-width: 0; }

.kc-chat-wrap > .trtc-messaging__panel:not(.is-full) { width: 300px; border-left: 1px solid #eef0f4; }


/* 展开 200px 侧栏后内容区变窄，配置列改为流式，避免右侧卡片被裁切 */
.trtc-page-config-layout__config { width: auto !important; min-width: 0 !important; }

.trtc-page-config-layout__inner { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }


/* ==== 侧栏最终版：232px 全宽高亮，内容区不与侧栏重叠 ==== */
.trtc-tea-layout, .trtc-tea-layout__body { display: flex !important; align-items: stretch; }

.trtc-tea-layout__content { flex: 1 1 auto !important; min-width: 0 !important; margin-left: 0 !important; position: relative !important; }

/* 内容列不再被固定 min-width 顶宽 */
.trtc-page-config-layout__inner { min-width: 0 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }

.trtc-page-config-layout__config { min-width: 0 !important; }

/* 表单控件自适应，内容不再溢出卡片 */
.app-trtc-form__item { width: 100% !important; box-sizing: border-box !important; min-width: 0 !important; }

.app-trtc-form__controls {
  display: flex !important; flex-wrap: wrap; gap: 12px;
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
}

.app-trtc-form__controls > * { flex: 1 1 0 !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; }

.trtc-button-select { flex-wrap: nowrap !important; gap: 12px; }

.trtc-button-select__item { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; box-sizing: border-box !important; }

.kc-lang-panel{display:none;position:absolute;top:40px;right:0;min-width:120px;background:#fff;border:1px solid #e5e6eb;border-radius:6px;box-shadow:0 4px 16px rgba(0,0,0,.08);padding:4px 0;z-index:1200}

.kc-lang-item{padding:6px 12px;font-size:13px;color:#22262e;cursor:pointer;white-space:nowrap}

.kc-lang-item:hover{background:#f1f7ff;color:#1c66e5}

.trtc-tea-nav__dropdown .trtc-tea-dropdown{position:relative}

.kc-user-panel{display:none;position:absolute;top:46px;right:0;width:236px;background:#fff;border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.12);padding:18px 20px 8px;z-index:1300;box-sizing:border-box}

.kc-user-name{font-size:16px;font-weight:600;color:#1d2129;line-height:22px}

.kc-user-id{font-size:13px;color:#86909c;line-height:20px;margin-top:4px}

.kc-user-line{height:1px;background:#f2f3f5;margin:14px -4px 6px}

.kc-user-logout{font-size:14px;color:#1d2129;padding:10px 0 14px;cursor:pointer}

.kc-user-logout:hover{color:#1c66e5}


/* 颜色选择器浮层：官方 .trtc-color-picker__picker 自带白底/12px 圆角/多层阴影/12px 内边距/244px 宽。
   kc-picker-holder 只承担定位，不能再叠一层白卡与阴影，否则两层错位会露出多余边角。 */
.kc-picker-holder{width:auto!important;background:none!important;border-radius:0!important;
  box-shadow:none!important;padding:0!important;box-sizing:border-box}



/* ==== 定制：版权与版本号（官方折叠规则会隐藏菜单内非标准节点，这里放行） ==== */
.trtc-tea-menu__body .kc-foot{display:block!important;width:auto!important;max-width:none!important;height:auto!important;margin:14px 8px 18px!important;font-size:10px!important;color:#a8b0be!important;text-align:center;line-height:14px;white-space:nowrap}
.trtc-tea-menu__body .kc-foot b{display:block;font-weight:400;font-size:10px;color:#a8b0be;margin-top:2px}
/* 折叠静态隐藏版权（官方折叠态菜单内无此节点，避免被压成竖排） */
html.kf-side-collapsed .trtc-tea-menu__body .kc-foot{display:none!important}
/* hover 展开浮层 / 用户手动展开时显示 */
html.kf-side-collapsed .trtc-tea-layout__sidebar:hover .trtc-tea-menu__body .kc-foot{display:block!important;width:208px!important}
