/* ============================================================
   远程协助管理系统 - 全局样式
   ============================================================ */
:root {
    --bg-dark: #0f1923;
    --bg-sidebar: #1a2332;
    --bg-main: #151d2b;
    --bg-card: #1e2d3d;
    --bg-input: #0d1520;
    --border-color: #2a3a4e;
    --text-primary: #e1e8ed;
    --text-secondary: #8899a6;
    --accent: #1da1f2;
    --accent-hover: #0d8ecf;
    --danger: #e0245e;
    --danger-hover: #c91d4f;
    --success: #17bf63;
    --warning: #ffad1f;
    --bubble-sent: #1da1f2;
    --bubble-recv: #253341;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.2);
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; background: var(--bg-dark); color: var(--text-primary); font-size: 14px; }

/* ---- 布局 ---- */
.app-container { display: flex; height: 100vh; }

/* ---- 侧边栏 ---- */
.sidebar {
    width: 320px; min-width: 320px; background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color); display: flex; flex-direction: column;
    transition: width var(--transition), min-width var(--transition), padding var(--transition);
    position: relative; overflow: hidden;
}
.sidebar.collapsed { width: 0; min-width: 0; padding: 0; border-right: none; }
.sidebar.collapsed * { visibility: hidden; }
/* 折叠时显示的展开按钮 - 使用独立元素，不受sidebar overflow影响 */
.sidebar-expand-btn {
    display: none; position: fixed; left: 0; top: 50%; transform: translateY(-50%);
    width: 24px; height: 48px; line-height: 48px; text-align: center;
    background: var(--bg-card); border-radius: 0 6px 6px 0;
    color: var(--text-secondary); font-size: 12px; cursor: pointer;
    border: 1px solid var(--border-color); border-left: none; z-index: 100;
    transition: opacity var(--transition);
}
.sidebar-expand-btn.visible { display: block; }
.sidebar-header { padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-color); }
.sidebar-header h2 { font-size: 16px; font-weight: 600; }
.sidebar-actions { display: flex; gap: 4px; }
.sidebar-search { padding: 8px 16px; }
.sidebar-search input { width: 100%; padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-primary); outline: none; font-size: 13px; }
.sidebar-search input:focus { border-color: var(--accent); }
.group-filter { padding: 0 16px 8px; }
.group-filter select { width: 100%; padding: 6px 10px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-primary); font-size: 13px; }
.device-list { flex: 1; overflow-y: auto; padding: 4px 8px; min-height: 0; }
.device-item {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    border-radius: var(--radius); cursor: pointer; transition: background var(--transition);
    border-bottom: 1px solid transparent;
}
.device-item:hover { background: var(--bg-card); }
.device-item.active { background: var(--bg-card); border-bottom-color: var(--accent); }
.device-avatar { width: 44px; height: 44px; border-radius: 6px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; position: relative; }
.device-avatar .status-dot { position: absolute; bottom: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg-sidebar); }
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--text-secondary); }
.device-info { flex: 1; min-width: 0; }
.device-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.device-geo { font-size: 11px; color: var(--accent); margin-top: 1px; }
.device-remark { font-size: 11px; color: #f0c040; margin-top: 1px; font-style: italic; cursor: pointer; display: inline-block; max-width: fit-content; padding: 1px 4px; border-radius: 3px; }
.device-remark:hover { background: rgba(240,192,64,0.1); }
.device-remark-add { color: var(--text-secondary); font-style: normal; opacity: 0.5; }
.device-remark-add:hover { opacity: 1; color: var(--accent); }
.device-delete-btn { background: none; border: none; color: var(--text-secondary); font-size: 14px; cursor: pointer; padding: 4px 8px; flex-shrink: 0; opacity: 0; transition: opacity var(--transition); }
.device-item:hover .device-delete-btn { opacity: 1; }
.device-delete-btn:hover { color: var(--danger); }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border-color); text-align: center; }
.panel-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); background: var(--bg-sidebar); color: var(--text-secondary); text-align: center; font-size: 14px; }
.panel-footer a { color: var(--accent); text-decoration: none; }
.panel-footer a:hover { text-decoration: underline; }
.online-badge { background: var(--success); color: #fff; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; }

/* ---- 主内容 ---- */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-main); }

/* ---- 顶部栏 ---- */
.top-bar { display: flex; align-items: center; padding: 12px 20px; background: var(--bg-sidebar); border-bottom: 1px solid var(--border-color); gap: 12px; min-height: 56px; }
.current-device { display: flex; align-items: center; gap: 8px; flex: 1; }
.device-icon { font-size: 20px; }
.current-device-name { font-weight: 600; font-size: 15px; }
.status-badge { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.status-badge.online { background: rgba(23,191,99,0.15); color: var(--success); }
.status-badge.offline { background: rgba(136,153,166,0.15); color: var(--text-secondary); }
.top-bar-actions { display: flex; align-items: center; gap: 8px; }
.user-info { font-size: 13px; color: var(--text-secondary); }

/* ---- 按钮 ---- */
.btn { padding: 8px 16px; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--bg-card); color: var(--text-primary); cursor: pointer; font-size: 13px; transition: all var(--transition); white-space: nowrap; }
.btn:hover { opacity: 0.85; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #000; }
.btn-lg { padding: 12px 32px; font-size: 15px; }
.icon-btn { width: 32px; height: 32px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius); font-size: 16px; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg-card); color: var(--text-primary); }

/* ---- 工具栏标签 ---- */
.toolbar { padding: 0 20px; background: var(--bg-sidebar); border-bottom: 1px solid var(--border-color); }
.toolbar-tabs { display: flex; gap: 0; overflow-x: auto; }
.toolbar-tabs .tab { padding: 10px 18px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 13px; border-bottom: 2px solid transparent; transition: all var(--transition); white-space: nowrap; }
.toolbar-tabs .tab:hover { color: var(--text-primary); }
.toolbar-tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* ---- 面板 ---- */
.panel { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.panel.active { display: flex; }
.panel-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.panel-toolbar input, .panel-toolbar select { padding: 6px 10px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-primary); font-size: 13px; }

/* ---- 聊天面板 ---- */
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.message { display: flex; flex-direction: column; max-width: 70%; }
.message.sent { align-self: flex-end; align-items: flex-end; }
.message.received { align-self: flex-start; align-items: flex-start; }
.message .bubble {
    padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5;
    word-break: break-word; max-width: 100%; position: relative;
}
.message.sent .bubble { background: var(--bubble-sent); color: #fff; border-bottom-right-radius: 4px; }
.message.received .bubble { background: var(--bubble-recv); color: var(--text-primary); border-bottom-left-radius: 4px; }
.message .bubble.image-bubble { padding: 4px; background: transparent; }
.message .bubble.image-bubble img { max-width: 100%; border-radius: 12px; cursor: pointer; }
.message .msg-time { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.message .msg-action { font-size: 11px; color: var(--accent); margin-bottom: 2px; }
.system-notice { text-align: center; padding: 6px 16px; font-size: 12px; color: var(--text-secondary); background: var(--bg-card); border-radius: 12px; align-self: center; }

.chat-input-area { padding: 12px 20px; border-top: 1px solid var(--border-color); background: var(--bg-sidebar); }
.quick-actions { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.quick-btn { padding: 4px 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; color: var(--text-secondary); cursor: pointer; font-size: 12px; transition: all var(--transition); }
.quick-btn:hover { border-color: var(--accent); color: var(--accent); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 20px; color: var(--text-primary); font-size: 14px; outline: none; }
.chat-input-row input:focus { border-color: var(--accent); }

/* ---- 数据表格 ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.data-table th:not(:first-child), .data-table td:not(:first-child) { text-align: center; }
.data-table th { background: var(--bg-card); color: var(--text-secondary); font-weight: 500; position: sticky; top: 0; z-index: 1; }
.data-table tbody tr:hover { background: rgba(29,161,242,0.05); }
.data-table .file-icon { font-size: 18px; margin-right: 8px; }
.data-table .action-btns { display: flex; gap: 7px; justify-content: center; }
/* 文件管理表格：名称靠左，操作靠右 */
.file-table th:nth-child(2), .file-table td:nth-child(2) { text-align: left !important; }
.file-table th:last-child { text-align: center !important; width: 250px; }
.file-table td:last-child { text-align: right !important; }
.file-table .action-btns { justify-content: flex-end; margin-right: 5px; }
.file-list, .process-table-wrap { flex: 1; overflow: auto; }
.breadcrumb { font-size: 13px; color: var(--text-secondary); flex: 1; }
.breadcrumb a { color: var(--accent); text-decoration: none; cursor: pointer; }
.breadcrumb span { margin: 0 4px; }

/* ---- Shell ---- */
.shell-output { flex: 1; overflow-y: auto; padding: 16px 20px; background: #0a0e14; font-family: 'Consolas', 'Monaco', monospace; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.shell-output .cmd-line { color: var(--accent); }
.shell-output .cmd-result { color: #c5d0dc; }
.shell-output .cmd-error { color: var(--danger); }
.shell-input-row { display: flex; align-items: center; gap: 8px; padding: 8px 20px; background: #0a0e14; border-top: 1px solid var(--border-color); }
.shell-prompt { color: var(--success); font-family: monospace; font-size: 13px; white-space: nowrap; }
.shell-input-row input { flex: 1; padding: 6px 10px; background: transparent; border: none; color: #c5d0dc; font-family: monospace; font-size: 13px; outline: none; }

/* ---- 截图区域 ---- */
.screenshot-area { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.screenshot-area img { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; }
.screenshot-history { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; }
.screenshot-history img { width: 150px; height: auto; border-radius: 4px; cursor: pointer; opacity: 0.8; transition: opacity var(--transition); }
.screenshot-history img:hover { opacity: 1; }

/* ---- 实时屏幕 ---- */
.ss-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ss-toolbar select { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); padding: 4px 6px; border-radius: 4px; font-size: 13px; }
.ss-stats { font-size: 12px; color: var(--text-secondary); margin-left: auto; white-space: nowrap; font-family: monospace; background: rgba(0,0,0,.3); padding: 2px 10px; border-radius: 10px; }
.ss-area { flex: 1; position: relative; overflow: hidden; background: #000; display: flex; align-items: center; justify-content:center; min-height: 300px;}
.ss-area canvas { display: block; }
.ss-area.ss-fullscreen { position: fixed; inset: 0; z-index: 99999; min-height: 100vh; }
.ss-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content:center; z-index: 5; transition: opacity .3s; }
.ss-overlay.hidden { opacity: 0; pointer-events: none; }
.ss-overlay-inner { text-align: center; color: var(--text-secondary); }
.hd-toggle-label { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.hd-toggle-label input { display: none; }
.hd-toggle-switch { width: 36px; height: 20px; background: var(--bg-input); border-radius: 10px; position: relative; transition: background .2s; border: 1px solid var(--border-color); }
.hd-toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--text-secondary); border-radius: 50%; transition: transform .2s, background .2s; }
.hd-toggle-label input:checked + .hd-toggle-switch { background: var(--accent); border-color: var(--accent); }
.hd-toggle-label input:checked + .hd-toggle-switch::after { transform: translateX(16px); background: #fff; }
.hd-toggle-text { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.hd-toggle-label input:checked ~ .hd-toggle-text { color: var(--accent); font-weight: 500; }
.ss-icon { font-size: 48px; margin-bottom: 12px; }
.ss-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.empty-state { text-align: center; color: var(--text-secondary); padding: 60px 20px; font-size: 15px; }

/* ---- 系统控制 ---- */
.system-controls { padding: 20px; display: flex; justify-content: center; }
.control-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px; text-align: center; max-width: 500px; width: 100%; }
.control-card h3 { font-size: 18px; margin-bottom: 12px; }
.control-warning { color: var(--warning); font-size: 13px; margin-bottom: 20px; }
.control-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- 弹窗 ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: var(--bg-sidebar); border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.5); max-width: 900px; width: 90%; max-height: 80vh; display: flex; flex-direction: column; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 1000px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 24px; cursor: pointer; padding: 0 4px; }
.modal-body { flex: 1; overflow: auto; padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border-color); }

/* Toast 提示 */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; font-size: 13px; z-index: 9999; transform: translateX(120%); transition: transform .3s; }
.toast.show { transform: translateX(0); }
.toast.success { background: #2ecc71; color: #fff; }
.toast.error { background: #e74c3c; color: #fff; }
.toast.info { background: #3498db; color: #fff; }
.toast.warning { background: #f39c12; color: #fff; }

/* ---- 进度条 ---- */
.progress-bar { height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden; margin: 4px 0; }
.progress-bar .fill { height: 100%; background: var(--accent); transition: width 0.3s; border-radius: 2px; }

/* ---- 文件搜索 ---- */
.file-search { display: flex; gap: 8px; padding: 8px 20px; border-top: 1px solid var(--border-color); }
.file-search input { flex: 1; }

/* ---- 文件管理器（新版树形布局） ---- */
.file-manager { display: flex; flex: 1; overflow: hidden; height: 100%; }

/* 左侧驱动器栏 */
.file-sidebar {
    width: 200px; min-width: 200px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.file-sidebar-header {
    padding: 12px 14px; font-weight: 600; font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex; align-items: center; gap: 6px;
}
.drive-tree { padding: 6px 0; flex: 1; }

/* 驱动器项 */
.drive-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; cursor: pointer;
    transition: background var(--transition);
    border-left: 3px solid transparent;
    user-select: none;
}
.drive-item:hover { background: var(--bg-card); }
.drive-item.active { background: rgba(29,161,242,0.12); border-left-color: var(--accent); }
.drive-icon { font-size: 22px; line-height: 1; flex-shrink: 0; width: 26px; text-align: center; }
.drive-info { flex: 1; min-width: 0; }
.drive-letter { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.drive-label { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-usage { margin-top: 2px; height: 3px; background: var(--bg-input); border-radius: 2px; overflow: hidden; }
.drive-usage-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }
.drive-usage-fill.warn { background: var(--warning); }
.drive-usage-fill.danger { background: var(--danger); }

/* 右侧文件区 */
.file-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.file-toolbar-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-card); flex-wrap: wrap;
}
.file-toolbar-row .breadcrumb { flex: 1; min-width: 150px; }
.file-toolbar-btns { display: flex; gap: 4px; flex-shrink: 0; }

/* 搜索行 */
.file-search-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 16px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-main);
}
.search-icon { font-size: 13px; flex-shrink: 0; }
.file-search-row input {
    flex: 1; padding: 5px 10px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: var(--radius); color: var(--text-primary);
    font-size: 12px; outline: none;
}
.file-search-row input:focus { border-color: var(--accent); }
.file-search-row select {
    padding: 5px 8px; background: var(--bg-input);
    border: 1px solid var(--border-color); border-radius: var(--radius);
    color: var(--text-primary); font-size: 12px; flex-shrink: 0;
}

/* 文件列表区 */
.file-list-area { flex: 1; overflow: auto; }
.file-table { table-layout: fixed; }
.file-table th { position: sticky; top: 0; z-index: 2; }
.file-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-table th:last-child, .file-table td:last-child { overflow: visible; white-space: nowrap; text-align: right; padding-right: 16px; }

/* 文件图标 - Windows风格 */
.file-icon-win {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; margin-right: 6px;
    vertical-align: middle; font-size: 15px; flex-shrink: 0;
}

/* 文件夹图标 */
.fi-folder { color: #e5a114; }
.fi-folder-open { color: #f0c040; }

/* 文档类 */
.fi-txt, .fi-ini, .fi-cfg, .fi-log, .fi-md, .fi-gitignore,
.fi-bat, .fi-ps1, .fi-cmd, .fi-sh { color: #888; }
.fi-doc, .fi-docx { color: #2b579a; }
.fi-pdf { color: #f40f02; }
.fi-xls, .fi-xlsx { color: #207245; }

/* 代码类 */
.fi-go, .fi-java, .fi-js, .fi-ts, .fi-html, .fi-css,
.fi-php, .fi-py, .fi-cpp, .fi-c, .fi-h, .fi-rs, .fi-vue,
.fi-svelte { color: #007acc; }
.fi-json, .fi-xml, .fi-yml, .fi-yaml, .fi-toml, .fi-env { color: #cb4a32; }

/* 可执行/系统 */
.fi-exe, .fi-msi, .fi-com, .fi-scr { color: #e84393; }
.fi-dll, .fi-sys, .fi-ocx, .fi-drv { color: #6c5ce7; }
.fi-lnk { color: #00b894; }

/* 媒体类 */
.fi-jpg, .fi-jpeg, .fi-png, .fi-gif, .fi-bmp, .fi-ico, .fi-svg, .fi-webp { color: #e17055; }
.fi-mp3, .fi-wav, .fi-flac, .fi-ogg, .fi-wma { color: #0984e3; }
.fi-mp4, .fi-mkv, .fi-avi, .fi-mov, .fi-wmv, .fi-flv { color: #d63031; }

/* 压缩包 */
.fi-zip, .fi-rar, .fi-7z, .fi-tar, .fi-gz, .fi-bz2 { color: #b7791f; }

/* 默认 */
.fi-file { color: #666; }

/* 文件表格行交互 */
.file-table tbody tr { cursor: pointer; }
.file-table tbody tr:hover { background: rgba(29,161,242,0.06); }
.file-table tbody tr.selected { background: rgba(29,161,242,0.14); }
.file-table .file-check { cursor: pointer; accent-color: var(--accent); width: 16px; height: 16px; margin: 0; vertical-align: middle; }
.file-table tbody tr td:first-child { list-style: none; padding: 10px 8px; text-align: center; }
.file-table tbody tr td::before,
.file-table tbody tr td::after { content: none !important; display: none !important; }

/* 传输进度面板 */
.transfer-panel {
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    max-height: 180px; display: flex; flex-direction: column;
}
.transfer-panel .transfer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 14px; font-size: 12px; font-weight: 600;
    border-bottom: 1px solid var(--border-color); color: var(--text-secondary);
}
.transfer-list { flex: 1; overflow-y: auto; padding: 4px 0; }

.transfer-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px; font-size: 12px; border-bottom: 1px solid rgba(42,58,78,0.5);
}
.transfer-item:last-child { border-bottom: none; }
.transfer-info { flex: 1; min-width: 0; }
.transfer-name { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transfer-progress-wrap { margin-top: 3px; }
.transfer-progress-bar {
    height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden;
}
.transfer-progress-bar > span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--accent), #4ecdc4);
    border-radius: 2px; transition: width 0.3s ease;
}
.transfer-status { font-size: 11px; color: var(--text-secondary); min-width: 70px; text-align: right; }
.transfer-status.success { color: var(--success); }
.transfer-status.error { color: var(--danger); }
.transfer-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 14px; padding: 0 2px; }
.transfer-btn:hover { color: var(--danger); }

.empty-state-small { text-align: center; color: var(--text-secondary); padding: 20px 10px; font-size: 12px; }

/* ---- 图片 Lightbox ---- */
#imageLightbox img {
    transition: transform 0.2s ease;
    object-fit: contain;
}
#imageLightbox img:hover {
    opacity: .95;
}

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d5068; }

/* ---- 响应式 ---- */
.mobile-only { display: none !important; }
@media (max-width: 768px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 100; height: 100%; width: 300px; min-width: 300px; }
    .sidebar.collapsed { width: 0; min-width: 0; padding: 0; }
    .mobile-only { display: flex !important; }
    .message { max-width: 85%; }
    .top-bar-actions .btn span.hide-mobile { display: none; }
    .toolbar-tabs .tab { padding: 8px 12px; font-size: 12px; }
}
