/* ================= PanWin 全局样式 ================= */
:root {
  --brand: #3b5bdb;
  --brand-2: #5c7cfa;
  --bg: #eef2f7;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #1f2937;
  --text-2: #5b667a;
  --line: rgba(15, 23, 42, 0.08);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  --radius: 12px;
  --taskbar: rgba(245, 248, 253, 0.82);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer;
  transition: .16s ease; white-space: nowrap;
}
.btn:hover { border-color: rgba(59, 91, 219, .4); color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: #e03131; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, .12); background: #fff; color: var(--text);
  font-size: 13px; outline: none; transition: .16s;
}
textarea.input { height: auto; padding: 10px; resize: vertical; line-height: 1.6; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 219, .12); }
.hint { font-size: 12px; color: var(--text-2); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; background: rgba(59, 91, 219, .1); color: var(--brand);
}
.badge.gray { background: #eef1f6; color: #64748b; }
.badge.green { background: rgba(16, 185, 129, .12); color: #059669; }
.badge.red { background: rgba(239, 68, 68, .12); color: #dc2626; }

/* Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 200px; max-width: 460px; padding: 10px 16px; border-radius: 10px;
  background: rgba(23, 33, 52, .9); color: #fff; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: toastIn .2s ease;
  backdrop-filter: blur(12px);
}
.toast.err { background: rgba(185, 28, 28, .92); }
.toast.ok { background: rgba(5, 120, 90, .92); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .35);
  display: flex; align-items: center; justify-content: center; z-index: 9000;
  backdrop-filter: blur(3px);
}
.modal {
  width: min(92vw, 520px); max-height: 88vh; overflow: auto; background: #fff;
  border-radius: 14px; box-shadow: var(--shadow); animation: modalIn .18s ease;
}
.modal.wide { width: min(94vw, 860px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 16px; color: #64748b; }
.icon-btn:hover { background: #f1f5f9; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97); } }

/* 空状态 */
.empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 48px 0; }
.empty .big { font-size: 42px; margin-bottom: 8px; opacity: .5; }

/* 登录页 */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d1b36, #243b6b 55%, #0f2244);
  background-image: url("/assets/bg-login.jpg");
  background-size: cover; background-position: center; position: relative; padding: 24px;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(12, 22, 48, .62), rgba(12, 22, 48, .3));
}
.login-card {
  position: relative; width: min(94vw, 420px); padding: 34px 32px 26px;
  background: rgba(255, 255, 255, .92); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); backdrop-filter: blur(18px);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-logo img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.login-logo .mark {
  width: 44px; height: 44px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px;
}
.login-title { font-size: 20px; font-weight: 700; }
.login-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.login-foot { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 16px; }
.login-tabs { display: flex; gap: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.login-tabs button { background: none; border: 0; padding: 8px 2px 12px; font-size: 14px; color: var(--text-2); cursor: pointer; position: relative; }
.login-tabs button.on { color: var(--brand); font-weight: 600; }
.login-tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); }
.login-ads { position: relative; margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.login-ads a { display: block; width: 100%; border-radius: 10px; overflow: hidden; }
.login-ads img { width: 100%; display: block; }
.login-bar { position: absolute; left: 24px; bottom: 18px; color: rgba(255,255,255,.75); font-size: 12px; }

/* ================= 桌面 ================= */
.desktop {
  position: fixed; inset: 0; overflow: hidden;
  background-image: url("/assets/bg-desktop.jpg");
  background-size: cover; background-position: center;
  background-color: #10203a;
}
.desktop::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(9, 18, 38, .55), rgba(24, 44, 86, .38) 55%, rgba(10, 22, 44, .62));
}
.desk-icons {
  position: absolute; top: 24px; left: 24px; display: grid;
  grid-template-columns: repeat(auto-fill, 96px); gap: 12px; z-index: 2;
}
.desk-icon {
  width: 96px; padding: 10px 6px; border-radius: 10px; text-align: center;
  color: #fff; cursor: pointer; user-select: none; transition: .15s;
  background: rgba(255, 255, 255, 0);
}
.desk-icon:hover { background: rgba(255, 255, 255, .14); }
.desk-icon .ico { font-size: 34px; line-height: 1.2; }
.desk-icon .nm { font-size: 12px; margin-top: 6px; text-shadow: 0 1px 2px rgba(0,0,0,.4); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px; z-index: 20;
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: var(--taskbar); backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, .35);
}
.tb-btn {
  width: 40px; height: 38px; border-radius: 8px; border: 0; background: transparent;
  cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.tb-btn:hover { background: rgba(59, 91, 219, .12); }
.tb-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-clock { text-align: right; font-size: 12px; line-height: 1.35; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.tb-clock:hover { background: rgba(59, 91, 219, .1); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.start-menu {
  position: absolute; left: 14px; bottom: 64px; width: 420px; max-width: 92vw;
  background: rgba(250, 252, 255, .94); border-radius: 14px; box-shadow: var(--shadow);
  backdrop-filter: blur(28px); padding: 18px; z-index: 30; display: none;
}
.start-menu.show { display: block; animation: modalIn .16s ease; }
.start-menu h4 { margin: 0 0 12px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.start-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.start-item { padding: 12px 6px; border-radius: 10px; text-align: center; cursor: pointer; }
.start-item:hover { background: rgba(59, 91, 219, .1); }
.start-item .ico { font-size: 24px; }
.start-item .nm { font-size: 12px; margin-top: 6px; }
.start-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.start-user { font-size: 12px; color: var(--text-2); }

/* 窗口 */
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 360px; min-height: 260px;
  background: #f7f9fd; border-radius: 12px; box-shadow: 0 24px 70px rgba(6, 15, 35, .35);
  overflow: hidden; z-index: 10; border: 1px solid rgba(255, 255, 255, .5);
}
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 52px) !important; border-radius: 0; }
.win-head {
  height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px;
  background: rgba(255, 255, 255, .82); border-bottom: 1px solid var(--line);
  cursor: default; user-select: none; flex-shrink: 0;
}
.win-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.win-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.win-ctrl { margin-left: auto; display: flex; }
.win-ctrl button {
  width: 38px; height: 30px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; color: #475569; border-radius: 6px;
}
.win-ctrl button:hover { background: #eef2f8; }
.win-ctrl button.close:hover { background: #e03131; color: #fff; }
.win-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }

/* 文件管理器 */
.fm { display: flex; flex: 1; min-height: 0; }
.fm-side {
  width: 190px; flex-shrink: 0; background: rgba(255, 255, 255, .68);
  border-right: 1px solid var(--line); padding: 12px 10px; overflow: auto;
}
.fm-side .cap { font-size: 11px; color: #94a3b8; margin: 10px 8px 6px; }
.side-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer; margin-bottom: 2px;
}
.side-item:hover { background: rgba(59, 91, 219, .08); color: var(--brand); }
.side-item.on { background: rgba(59, 91, 219, .12); color: var(--brand); font-weight: 600; }
.side-item .ico { font-size: 15px; }
.fm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fm-bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .55); flex-wrap: wrap;
}
.crumb { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); margin-left: 4px; flex: 1; min-width: 120px; overflow: hidden; }
.crumb span { cursor: pointer; white-space: nowrap; }
.crumb span:hover { color: var(--brand); text-decoration: underline; }
.crumb .sep { opacity: .5; cursor: default; }
.fm-tools { display: flex; gap: 6px; }
.fm-list { flex: 1; overflow: auto; padding: 10px 12px 60px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.file-card {
  border-radius: 9px; padding: 10px 6px 8px; text-align: center; cursor: default;
  border: 1px solid transparent; transition: .12s; user-select: none;
}
.file-card:hover { background: rgba(255, 255, 255, .9); border-color: rgba(59, 91, 219, .25); }
.file-card.sel { background: rgba(59, 91, 219, .12); border-color: rgba(59, 91, 219, .5); }
.file-card .ico { font-size: 32px; line-height: 1.25; }
.file-card .nm { font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.file-card .mt { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.fm-status { height: 26px; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 11px; color: var(--text-2); border-top: 1px solid var(--line); background: rgba(255,255,255,.6); flex-shrink: 0; }
.list-view .file-grid { grid-template-columns: 1fr; gap: 0; }
.list-view .file-card { display: flex; align-items: center; text-align: left; gap: 10px; padding: 8px; border-radius: 6px; }
.list-view .file-card .ico { font-size: 20px; }
.list-view .file-card .nm { -webkit-line-clamp: 1; flex: 1; margin: 0; }
.list-view .file-card .mt { width: 120px; text-align: right; }

/* 右键菜单 */
.ctx {
  position: fixed; min-width: 170px; background: #fff; border-radius: 10px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .25); padding: 6px; z-index: 9998; font-size: 13px;
}
.ctx-item { padding: 8px 12px; border-radius: 7px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.ctx-item:hover { background: #f1f5f9; }
.ctx-item.danger { color: #dc2626; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 2px; }

/* 预览 / 编辑器 */
.editor-box { width: 100%; height: 56vh; border: 1px solid var(--line); border-radius: 8px; font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; line-height: 1.65; padding: 12px; resize: none; outline: none; background: #fbfdff; }
.preview-media { max-width: 100%; max-height: 62vh; display: block; margin: 0 auto; border-radius: 8px; background: #f8fafc; }
.preview-doc { width: 100%; height: 62vh; border: 0; border-radius: 8px; }

/* 通知中心 */
.notice-item { padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); margin-bottom: 8px; }
.notice-item h4 { margin: 0 0 6px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.notice-item p { margin: 0; font-size: 12px; color: var(--text-2); white-space: pre-wrap; line-height: 1.7; }

/* 分享页 */
.share-page { min-height: 100vh; background: linear-gradient(135deg, #eef3fb, #e6ecf9); padding: 30px 16px; display: flex; justify-content: center; }
.share-card { width: min(96vw, 760px); background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(15,23,42,.12); overflow: hidden; align-self: flex-start; }
.share-head { padding: 26px 28px 20px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.share-head h2 { margin: 0 0 6px; font-size: 20px; word-break: break-all; }
.share-head p { margin: 0; font-size: 12px; opacity: .85; }
.share-body { padding: 22px 28px 26px; }
.share-file { display: flex; align-items: center; gap: 14px; padding: 14px; background: #f7f9fd; border-radius: 10px; }
.share-file .ico { font-size: 34px; }
.share-file .nm { font-size: 14px; font-weight: 600; word-break: break-all; }
.share-file .sz { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.share-list { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; background: #fff; }
.share-row:last-child { border-bottom: 0; }
.share-row .ico { font-size: 18px; }
.share-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.share-row .nm:hover { color: var(--brand); }
.share-row .sz { color: #94a3b8; font-size: 12px; }
.drop-box { margin-top: 18px; border: 2px dashed rgba(59, 91, 219, .35); border-radius: 12px; padding: 26px; text-align: center; cursor: pointer; transition: .16s; }
.drop-box:hover { border-color: var(--brand); background: rgba(59, 91, 219, .05); }
.drop-box .big { font-size: 34px; margin-bottom: 8px; }
.pwd-box { display: flex; gap: 8px; margin-top: 8px; }

/* 管理后台 */
.admin-page { min-height: 100vh; background: #f2f5fa; }
.admin-top {
  height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 22px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.admin-top .logo { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.admin-top .tt { font-size: 15px; font-weight: 700; }
.admin-top .sp { flex: 1; }
.admin-nav {
  width: 190px; position: sticky; top: 60px; align-self: flex-start; padding: 14px 10px;
}
.admin-nav .item { padding: 10px 14px; border-radius: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; margin-bottom: 3px; display: flex; gap: 8px; }
.admin-nav .item:hover { background: rgba(59, 91, 219, .08); }
.admin-nav .item.on { background: var(--brand); color: #fff; }
.admin-body { display: flex; align-items: flex-start; }
.admin-main { flex: 1; padding: 20px 24px 60px; min-width: 0; }
.panel { background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(15,23,42,.06); padding: 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 16px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 6px 24px rgba(15,23,42,.06); }
.stat .lb { font-size: 12px; color: var(--text-2); }
.stat .vl { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat .ex { font-size: 11px; color: #94a3b8; margin-top: 2px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tb td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tb tr:hover td { background: #fafcff; }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.perms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.perm-group .gt { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--brand); }
.perm-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; color: var(--text-2); }
.perm-row input { accent-color: var(--brand); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.img-pick { display: flex; gap: 8px; align-items: center; }
.img-pick .thumb { width: 64px; height: 44px; border-radius: 8px; background: #eef2f8 center/cover no-repeat; border: 1px solid var(--line); flex-shrink: 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: #eef2ff; color: var(--brand); margin-right: 4px; }

@media (max-width: 720px) {
  .admin-nav { display: none; }
  .fm-side { display: none; }
  .desk-icons { grid-template-columns: repeat(auto-fill, 84px); }
  .start-menu { width: calc(100% - 28px); }
  .win { min-width: 0; }
}

/* ================= 协同聊天 ================= */
.chat-wrap { display: flex; flex: 1; min-height: 0; }
.chat-peers { width: 214px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); overflow: auto; padding: 8px; }
.chat-peers .cap { font-size: 11px; color: #94a3b8; padding: 6px 8px; }
.peer { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 9px; cursor: pointer; margin-bottom: 2px; }
.peer:hover { background: #f4f7fd; }
.peer.on { background: rgba(59, 91, 219, .1); }
.peer .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; position: relative; overflow: hidden; }
.peer .av img { width: 100%; height: 100%; object-fit: cover; }
.peer .av .on-dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #10b981; border: 2px solid #fff; }
.peer .info { flex: 1; min-width: 0; }
.peer .nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peer .ls { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.peer .unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e03131; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.chat-head .st { font-size: 11px; font-weight: 400; color: #94a3b8; }
.chat-msgs { flex: 1; overflow: auto; padding: 14px 16px 4px; background: #f7f9fd; }
.msg { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.msg.me { flex-direction: row-reverse; }
.msg .mav { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; overflow: hidden; }
.msg .mav img { width: 100%; height: 100%; object-fit: cover; }
.bubble { max-width: 74%; padding: 9px 12px; border-radius: 12px; background: #fff; font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 3px rgba(15, 23, 42, .07); }
.msg.me .bubble { background: var(--brand); color: #fff; }
.bubble img { max-width: 240px; max-height: 240px; display: block; border-radius: 8px; cursor: pointer; }
.bubble .mt { font-size: 11px; opacity: .65; margin-top: 4px; }
.bubble .file-card-mini { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.bubble .file-card-mini .fi { font-size: 26px; }
.bubble .file-card-mini .fn { font-size: 12px; word-break: break-all; }
.bubble .file-card-mini .fs { font-size: 11px; opacity: .7; }
.burn-tip { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 2px 0; }
.burn-tip b { text-decoration: underline; }
.burn-count { font-size: 11px; margin-top: 6px; opacity: .8; }
.chat-composer { border-top: 1px solid var(--line); background: #fff; padding: 10px 12px; position: relative; flex-shrink: 0; }
.chat-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.tool-btn { width: 30px; height: 28px; border: 0; border-radius: 7px; background: #f2f5fa; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.tool-btn:hover { background: rgba(59, 91, 219, .12); }
.tool-btn.on { background: var(--brand); color: #fff; }
.chat-input { width: 100%; height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: none; outline: none; line-height: 1.6; }
.chat-input:focus { border-color: var(--brand); }
.chat-send { position: absolute; right: 14px; bottom: 12px; }
.emoji-panel { position: absolute; left: 12px; bottom: 106px; background: #fff; border-radius: 12px; box-shadow: 0 14px 40px rgba(15,23,42,.22); padding: 8px; display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; z-index: 20; }
.emoji-panel button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 18px; cursor: pointer; border-radius: 6px; }
.emoji-panel button:hover { background: #f1f5f9; }


/* ================= 回收站 ================= */
.side-badge { margin-left:auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:#ff6b6b; color:#fff; font-size:11px; line-height:18px; text-align:center; }
.trash-list { display:flex; flex-direction:column; gap:8px; padding:4px 2px; }
.trash-row { display:flex; align-items:center; gap:12px; padding:10px 12px;
  border:1px solid var(--line); border-radius:10px; background:#fff; }
.trash-row .ico { width:34px; height:34px; display:flex; align-items:center; justify-content:center;
  font-size:22px; background:#f6f8fb; border-radius:8px; }
.trash-row .tx { min-width:0; flex:1; }
.trash-row .nm { font-size:13px; font-weight:600; color:#222; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trash-row .mt { font-size:11px; color:#888; margin-top:3px; }
.trash-row .acts { display:flex; gap:6px; flex-shrink:0; }

/* ================= 传统色板 ================= */
.swatches { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin-bottom:8px; }
.swatch { cursor:pointer; border:1px solid var(--line); border-radius:8px; padding:6px; text-align:center;
  background:#fff; transition:.12s; }
.swatch:hover { border-color:var(--brand); transform:translateY(-1px); }
.swatch.on { border-color:var(--brand); box-shadow:0 0 0 2px rgba(59,91,219,.15); }
.swatch .dot { width:100%; height:24px; border-radius:6px; margin-bottom:5px; }
.swatch .cn { font-size:11px; color:#555; }
