/* =========================================================
   文件传输助手 file_transfer —— 对齐全站设计体系（白底蓝边浅色风）
   前缀 ft-，复用 :root 变量与基础组件
   ========================================================= */
.ft-page { max-width: 1200px; margin: 0 auto 40px; padding: 0; display: flex; gap: 24px; align-items: flex-start; box-sizing: border-box; width: 100%; overflow-x: hidden; }
.ft-main { flex: 1; min-width: 0; }
.ft-sidebar { width: 300px; flex: 0 0 300px; }

/* ---------- 按钮（自包含，不依赖 .btn） ---------- */
.ft-btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--border-color); background: #fff; color: var(--text-color); font-size: 14px; cursor: pointer; transition: all .2s; box-sizing: border-box; }
.ft-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.ft-btn-primary { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.ft-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.ft-btn-primary:disabled, .ft-btn:disabled { opacity: .5; cursor: not-allowed; }
.ft-btn-ghost { height: 32px; padding: 0 12px; font-size: 13px; }

/* ---------- 首屏 header（白底 + 左侧蓝边） ---------- */
.ft-header { background: var(--white); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px; box-shadow: var(--shadow); border-left: 5px solid var(--primary-color); }
.ft-header h1 { font-size: 26px; font-weight: 700; color: var(--text-color); margin: 0 0 8px; }
.ft-header p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.7; }
.ft-header p strong { color: var(--primary-color); }
.ft-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ft-badge { font-size: 13px; color: var(--primary-color); background: #f0f5ff; padding: 6px 12px; border-radius: 20px; }

/* ---------- 微信提示横幅 ---------- */
.ft-banner { background: #fff7e6; border: 1px solid #ffe7ba; color: #d48806; border-radius: var(--radius); padding: 12px 16px; font-size: 14px; line-height: 1.7; margin-bottom: 16px; }

/* ---------- 通用板块 ---------- */
.ft-block { background: var(--white); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 24px; box-shadow: var(--shadow); }
.ft-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; border-left: 4px solid var(--primary-color); padding-left: 12px; }
.ft-block-title { font-size: 19px; font-weight: 700; color: var(--text-color); line-height: 1.4; }

/* ---------- 使用步骤 ---------- */
.ft-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ft-steps li { display: flex; gap: 14px; align-items: flex-start; }
.ft-step-no { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-color); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.ft-steps b { font-size: 15px; color: var(--text-color); }
.ft-steps p { font-size: 13px; color: var(--text-secondary); margin: 2px 0 0; line-height: 1.6; }

/* ---------- 房间卡片 ---------- */
.ft-room-body { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ft-room-qr { flex: 0 0 auto; text-align: center; }
#ftQr { width: 180px; height: 180px; padding: 8px; border: 1px solid var(--border-color); border-radius: 10px; background: #fff; }
#ftQr img, #ftQr canvas { display: block; width: 164px !important; height: 164px !important; }
.ft-qr-tip { font-size: 12px; color: #999; margin: 8px 0 0; }
.ft-room-info { flex: 1; min-width: 240px; }
.ft-room-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ft-room-label { font-size: 13px; color: var(--text-secondary); flex: 0 0 auto; }
.ft-room-row code { font-size: 18px; font-weight: 700; color: var(--primary-color); letter-spacing: 2px; background: #f0f5ff; padding: 4px 12px; border-radius: 6px; }
.ft-room-link-row input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 13px; color: #555; background: #fafbfc; }
.ft-room-link-row input:focus { outline: none; border-color: var(--primary-color); }
.ft-conn { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; color: var(--text-secondary); }
.ft-dot { width: 10px; height: 10px; border-radius: 50%; background: #faad14; flex: 0 0 auto; }
.ft-dot.ok { background: var(--success-color); }
.ft-dot.err { background: var(--danger-color); }

/* ---------- 拖拽区 ---------- */
.ft-dropzone { border: 2px dashed var(--border-color); border-radius: 10px; padding: 28px 20px; text-align: center; background: #fafbfc; transition: all .2s; }
.ft-dropzone.drag { border-color: var(--primary-color); background: #f0f5ff; }
.ft-drop-title { font-size: 15px; color: var(--text-color); margin: 0 0 12px; }
.ft-drop-hint { font-size: 12px; color: #999; margin: 12px 0 0; }

/* ---------- 文件列表 ---------- */
.ft-file-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ft-file-item { border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 12px; background: #fff; }
.ft-file-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ft-file-name { font-size: 14px; color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-file-meta { font-size: 12px; color: #999; flex: 0 0 auto; }
.ft-file-bar { height: 6px; border-radius: 3px; background: #f0f0f0; margin-top: 8px; overflow: hidden; }
.ft-file-bar > span { display: block; height: 100%; width: 0; background: var(--primary-color); transition: width .2s; }
.ft-file-item.done .ft-file-bar > span { background: var(--success-color); }
.ft-file-item .ft-file-down { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--primary-color); text-decoration: none; }

/* ---------- 文字聊天 ---------- */
.ft-chat { margin-top: 18px; border-top: 1px solid #f0f0f0; padding-top: 16px; }
.ft-chat-log { height: 160px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 12px; background: #fafbfc; font-size: 14px; line-height: 1.7; }
.ft-chat-empty { color: #bbb; font-size: 13px; text-align: center; margin: 40px 0; }
.ft-msg { margin-bottom: 10px; }
.ft-msg .ft-msg-who { font-size: 12px; color: #999; margin-bottom: 2px; }
.ft-msg .ft-msg-text { display: inline-block; padding: 7px 12px; border-radius: 10px; max-width: 80%; word-break: break-all; }
.ft-msg.me .ft-msg-text { background: var(--primary-color); color: #fff; }
.ft-msg.peer .ft-msg-text { background: #fff; border: 1px solid var(--border-color); color: var(--text-color); }
.ft-chat-input { display: flex; gap: 10px; margin-top: 12px; }
.ft-chat-input input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 14px; }
.ft-chat-input input:focus { outline: none; border-color: var(--primary-color); }

/* ---------- 说明 / 隐私 ---------- */
.ft-notice-list { list-style: none; margin: 0; padding: 0; }
.ft-notice-list li { font-size: 14px; color: #666; line-height: 1.9; padding-left: 20px; position: relative; margin-bottom: 8px; }
.ft-notice-list li::before { content: "•"; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }

/* ---------- FAQ ---------- */
.ft-faq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ft-faq-item { padding: 12px 14px; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px; }
.ft-faq-q { font-size: 15px; font-weight: 600; color: var(--text-color); margin-bottom: 6px; }
.ft-faq-a { font-size: 14px; line-height: 1.8; color: #555; }

/* ---------- 右侧侧栏 ---------- */
.ft-side-card { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.ft-side-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--primary-color); }
.ft-side-tools { display: flex; flex-direction: column; gap: 8px; }
.ft-side-tool { display: flex; align-items: center; padding: 8px 10px; background: #f8f9fa; border-radius: 8px; text-decoration: none; transition: all .2s; }
.ft-side-tool:hover { background: #e8f4ff; }
.ft-side-tool-icon { width: 32px; height: 32px; margin-right: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 32px; }
.ft-side-tool-icon img { width: 100%; height: 100%; object-fit: contain; }
.ft-side-tool-name { color: #333; font-size: 14px; }
.ft-side-tool:hover .ft-side-tool-name { color: var(--primary-color); }
.ft-side-tip { background: #f0f5ff; border-color: #d6e4ff; }
.ft-side-tip p { font-size: 13px; color: #555; line-height: 1.7; margin: 0; }

/* ---------- 房间过期页 ---------- */
.ft-page-center { justify-content: center; }
.ft-expired { text-align: center; }
.ft-expired h1 { font-size: 22px; margin: 0 0 12px; }
.ft-expired p { color: var(--text-secondary); font-size: 14px; line-height: 1.8; margin: 0 0 20px; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1024px) {
    .ft-sidebar { width: 280px; flex-basis: 280px; }
}
@media (max-width: 900px) {
    .ft-page { flex-direction: column; padding: 0 12px; gap: 16px; }
    .ft-sidebar { width: 100%; flex: none; }
}
@media (max-width: 768px) {
    .ft-header { padding: 18px; }
    .ft-header h1 { font-size: 22px; }
    .ft-block { padding: 16px 14px; }
    .ft-block-title { font-size: 17px; }
    .ft-room-body { justify-content: center; }
    .ft-room-link-row { flex-wrap: wrap; }
    .ft-room-link-row input { width: 100%; }
}

/* =========================================================
   🔴 ft49：对标微信文件传输助手网页版
   ① 深色落地页 + 居中白卡片二维码（扫码=开锁入口）
   ② 解锁后 = 居中聊天卡片（顶栏 / 消息流 / 📎 + 输入框 + 发送）
   ========================================================= */
/* —— 深色落地页 —— */
.ft-landing {
    background: #202124; border-radius: 12px;
    padding: 44px 20px 48px; text-align: center;
}
.ft-landing-title { color: #fff; font-size: 20px; font-weight: 600; margin: 0; }
.ft-landing-card {
    background: #fff; max-width: 380px; margin: 26px auto 0;
    padding: 24px 22px 20px; border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
}
.ft-landing-name { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 14px; }
.ft-landing-qr { display: inline-block; line-height: 0; }
.ft-landing-qr img, .ft-landing-qr canvas, .ft-landing-qr table { margin: 0 auto; }
.ft-landing .ft-qr-tip { margin: 12px 0 14px; font-size: 13px; color: #9aa0a6; }
.ft-landing .ft-room-row { justify-content: center; margin-bottom: 8px; }
.ft-landing .ft-room-link-row input { font-size: 12px; }
.ft-conn-row {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 12px; padding: 8px 12px; background: #f6f8fb;
    border-radius: 8px; font-size: 13px; color: var(--text-secondary);
}
/* 扫码端（手机）开锁等待态 */
.ft-gate-wait { text-align: center; padding: 14px 0 10px; }
.ft-gate-lock { font-size: 46px; line-height: 1; }
.ft-gate-wait p { margin: 10px 0 0; color: #555; font-size: 14px; }

/* —— 聊天卡片（两端一致） —— */
.ft-wxwrap { padding: 18px; }
.ft-wx-card {
    max-width: 560px; margin: 0 auto;
    display: flex; flex-direction: column;
    height: 580px; max-height: calc(100vh - 220px); min-height: 420px;
    background: #fff; border: 1px solid #e3e6eb; border-radius: 8px;
    overflow: hidden; box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.ft-wx-top {
    flex: 0 0 auto; padding: 13px 16px;
    background: #f7f7f7; border-bottom: 1px solid #e5e5e5;
}
.ft-wx-title { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.ft-wx-room { margin-left: 10px; font-size: 12px; font-weight: 400; color: #9aa0a6; }
.ft-wx-top .ft-conn { margin-top: 8px; font-size: 12px; color: #666; }
.ft-wx-body {
    flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0;
    padding: 18px 16px; background: #fff;
}
.ft-wx-body.drag { outline: 2px dashed #07c160; outline-offset: -6px; background: #f0fff6; }
.ft-wx-body .ft-file-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ft-wx-body .ft-file-item {
    border: none; border-radius: 10px; margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}
.ft-wx-body .ft-chat-log {
    height: auto; min-height: 100%; border: none; border-radius: 0;
    padding: 0; background: transparent; overflow: visible;
}
.ft-wx-body .ft-chat-log .ft-chat-empty { text-align: center; color: #9aa0a6; font-size: 13px; margin-top: 48px; }
/* 气泡：自己发的靠右、对方的靠左（微信观感） */
.ft-wx-body .ft-msg { display: flex; flex-direction: column; }
.ft-wx-body .ft-msg.me { align-items: flex-end; }
.ft-wx-body .ft-msg.peer { align-items: flex-start; }
.ft-wx-body .ft-msg .ft-msg-who { font-size: 11px; }
/* 底部输入栏：📎 左 + 输入框 + 绿色发送键（flex 子项 min-width:0 防手机溢出） */
.ft-wx-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: #f7f7f7; border-top: 1px solid #e5e5e5;
}
.ft-wx-attach { flex: 0 0 auto; font-size: 22px; line-height: 1; background: none; border: none; padding: 4px 6px; cursor: pointer; }
.ft-wx-attach:active { transform: scale(.92); }
.ft-wx-input { flex: 1 1 auto; min-width: 0; border: 1px solid #ddd; border-radius: 6px; padding: 9px 10px; font-size: 15px; background: #fff; }
.ft-wx-send { flex: 0 0 auto; border: none; border-radius: 6px; background: #07c160; color: #fff; font-size: 15px; padding: 9px 16px; cursor: pointer; }
.ft-wx-send:disabled { opacity: .45; cursor: default; }

@media (max-width: 768px) {
    .ft-landing { padding: 30px 14px 34px; border-radius: 0; }
    .ft-landing-title { font-size: 17px; }
    .ft-landing-card { max-width: 100%; }
    .ft-wx-card { height: calc(100vh - 190px); max-height: none; }
    .ft-wxwrap { padding: 12px; }
}

/* =========================================================
   🔴 ft47：手机扫码端 · 微信文件传输助手式「对话窗口」
   （顶栏 + 可滚动消息区 + 底部输入栏；仅 is_room 扫码页渲染）
   ========================================================= */
.ft-mchat { max-width: 640px; margin: 0 auto; width: 100%; }
.ft-mchat-shell {
    display: flex; flex-direction: column;
    height: calc(100vh - 200px); min-height: 420px; max-height: 780px;
    background: #f2f4f7; border: 1px solid #e3e6eb; border-radius: 12px;
    overflow: hidden; box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.ft-mchat-top {
    flex: 0 0 auto; text-align: center;
    padding: 12px 14px 10px; background: #ededed; border-bottom: 1px solid #dcdcdc;
}
.ft-mchat-title { font-size: 17px; font-weight: 600; color: #1a1a1a; }
.ft-mchat-sub { font-size: 12px; color: #8a8a8a; margin-top: 2px; }
.ft-mchat-top .ft-conn { justify-content: center; margin-top: 6px; font-size: 12px; color: #666; }
.ft-mchat-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px; -webkit-overflow-scrolling: touch; min-height: 0; }
/* 文件条目：白卡片、小圆角，贴近聊天附件观感 */
.ft-mchat-body .ft-file-list { list-style: none; margin: 0 0 10px; padding: 0; }
.ft-mchat-body .ft-file-item { border: none; border-radius: 10px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .07); }
.ft-mchat-body .ft-chat-log {
    height: auto; min-height: 120px; border: none; border-radius: 0; padding: 0; background: transparent; overflow: visible;
}
.ft-mchat-body .ft-chat-log .ft-chat-empty { text-align: center; color: #9aa0a6; font-size: 13px; margin-top: 36px; }
.ft-mchat-body .ft-msg { display: flex; flex-direction: column; }
.ft-mchat-body .ft-msg.me { align-items: flex-end; }
.ft-mchat-body .ft-msg.peer { align-items: flex-start; }
.ft-mchat-body .ft-msg .ft-msg-who { font-size: 11px; }
/* 底部输入栏：flex 子项必须 min-width:0 防手机端横向溢出 */
.ft-mchat-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 10px; background: #f7f7f7; border-top: 1px solid #dcdcdc;
}
.ft-mchat-attach { flex: 0 0 auto; font-size: 22px; line-height: 1; background: none; border: none; padding: 4px 6px; cursor: pointer; }
.ft-mchat-attach:active { transform: scale(.92); }
.ft-mchat-input { flex: 1 1 auto; min-width: 0; border: 1px solid #ddd; border-radius: 6px; padding: 9px 10px; font-size: 15px; background: #fff; }
.ft-mchat-send { flex: 0 0 auto; border: none; border-radius: 6px; background: #07c160; color: #fff; font-size: 15px; padding: 9px 16px; cursor: pointer; }
.ft-mchat-send:disabled { opacity: .45; cursor: default; }
@media (max-width: 768px) {
    .ft-mchat-shell { height: calc(100vh - 150px); }
}
