/* ===== 漫剧云盘 Web ===== */
:root {
  --brand: #2f6bff;
  --brand-600: #1f56e0;
  --brand-soft: #eaf0ff;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --text: #1b2430;
  --text-2: #46536b;
  --muted: #7b8aa3;
  --line: #e6eaf2;
  --line-2: #eff2f8;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --ok: #12a150;
  --warn: #f5a524;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(22, 34, 62, .06);
  --shadow: 0 10px 30px rgba(22, 34, 62, .10);
  --shadow-lg: 0 24px 64px rgba(16, 28, 54, .18);
  --sidebar-w: 238px;
  --topbar-h: 62px;
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg .ln { stroke-width: 1.5; opacity: .8; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
::selection { background: #cfe0ff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd7e6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c2d6; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  color: var(--text-2); font-weight: 500; white-space: nowrap; transition: .16s ease;
  box-shadow: var(--shadow-sm);
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: #cfd8ea; color: var(--text); background: #fbfcff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, #3d76ff, var(--brand)); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(47, 107, 255, .28); }
.btn-primary:hover { background: linear-gradient(180deg, #4c81ff, var(--brand-600)); color: #fff; border-color: var(--brand-600); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: #eef2fa; border-color: transparent; }
.btn-ghost-danger { background: transparent; border-color: transparent; color: var(--danger); box-shadow: none; }
.btn-ghost-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #d33b40; color: #fff; }
.btn-block { width: 100%; justify-content: center; height: 44px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  background: transparent; border: 1px solid transparent; border-radius: 9px; cursor: pointer; color: var(--text-2); transition: .16s;
}
.icon-btn:hover { background: #eef2fa; color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 2px 4px; font-size: 13px; border-radius: 6px; }
.link-btn:hover { background: var(--brand-soft); }

/* 表单 */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; height: 42px; padding: 0 12px; background: #f7f9fd; border: 1px solid var(--line);
  border-radius: 10px; outline: none; transition: .16s;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.field-password { position: relative; }
.field-password input { padding-right: 44px; }
.field-password .icon-btn { position: absolute; right: 4px; top: 4px; }
.checkbox-line { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); user-select: none; }
.checkbox-line.compact { font-size: 13px; }
.checkbox-line input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.form-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f7cdcd; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }

/* 启动遮罩 */
.boot { position: fixed; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; background: var(--bg); z-index: 100; color: var(--muted); }
.boot-spinner, .spinner {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid #dbe3f4; border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 登录 ===== */
.login-view { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 10% 10%, #4c81ff 0%, #2f6bff 40%, #1b3fa8 100%);
  display: grid; place-items: center; padding: 48px;
}
.login-art::before, .login-art::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18);
}
.login-art::before { width: 640px; height: 640px; left: -180px; bottom: -260px; }
.login-art::after { width: 420px; height: 420px; right: -140px; top: -120px; background: rgba(255, 255, 255, .06); }
.login-art-inner { position: relative; max-width: 420px; }
.login-art-logo { width: 62px; height: 62px; border-radius: 18px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; margin-bottom: 22px; backdrop-filter: blur(6px); }
.login-art-logo svg { width: 34px; height: 34px; stroke-width: 1.6; }
.login-art h2 { font-size: 30px; margin: 0 0 12px; letter-spacing: .5px; }
.login-art p { margin: 0 0 26px; color: rgba(255, 255, 255, .82); line-height: 1.8; }
.login-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.login-art li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .9); }
.login-art li svg { width: 18px; height: 18px; background: rgba(255, 255, 255, .18); border-radius: 50%; padding: 3px; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: 24px; margin: 0 0 6px; }
.login-sub { color: var(--muted); margin: 0 0 26px; font-size: 13px; }
.login-foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 22px; line-height: 1.8; }

/* ===== 应用外壳 ===== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; overflow: hidden; }
.sidebar {
  display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line);
  padding: 14px 12px 12px; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(140deg, #4c81ff, #1f4fd0); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(47, 107, 255, .3); }
.brand-logo svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 11px; }
.sidebar-close { display: none; margin-left: auto; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; position: relative; transition: .14s;
}
.nav-item svg { width: 19px; height: 19px; opacity: .85; }
.nav-item:hover { background: #f2f5fc; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-600); }
.nav-item.active svg { opacity: 1; }
.badge { margin-left: auto; background: var(--brand); color: #fff; font-style: normal; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }

.tree-wrap { margin-top: 14px; flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line-2); padding-top: 12px; }
.tree-head { font-size: 11px; letter-spacing: .12em; color: var(--muted); padding: 0 10px 8px; text-transform: uppercase; }
.folder-tree { overflow: auto; padding-right: 2px; flex: 1; min-height: 0; }
.tree-node { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.tree-node:hover { background: #f2f5fc; }
.tree-node.active { background: var(--brand-soft); color: var(--brand-600); font-weight: 500; }
.tree-node .tw { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 4px; }
.tree-node .tw svg { width: 14px; height: 14px; }
.tree-node .tw.empty { visibility: hidden; }
.tree-node .tname { overflow: hidden; text-overflow: ellipsis; }
.tree-node .ticon { flex: none; width: 16px; height: 16px; color: #8fa0bb; }
.tree-children { margin-left: 12px; border-left: 1px dashed var(--line); padding-left: 4px; }

.storage-card { margin-top: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.storage-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.storage-head b { color: var(--text); font-weight: 600; }
.storage-bar { height: 6px; border-radius: 6px; background: #e8edf7; overflow: hidden; }
.storage-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #4c81ff, #2f6bff); transition: width .4s ease; }
.storage-bar.big { height: 10px; margin-bottom: 10px; }
.storage-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-top: 8px; }
.nav-bottom { margin-top: 8px; border-top: 1px solid var(--line-2); padding-top: 8px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  position: relative; z-index: 20;
}
.sidebar-toggle { display: none; }
.crumbs { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }
.crumb { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 8px; color: var(--text-2); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
button.crumb { background: none; border: 0; cursor: pointer; font-weight: 500; }
.crumb:hover { background: #eef2fa; color: var(--text); }
.crumb.current { color: var(--text); font-weight: 600; }
.crumb-sep { color: #c3ccdd; display: grid; place-items: center; }
.crumb-sep svg { width: 14px; height: 14px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 6px; background: #f2f5fb; border: 1px solid transparent; border-radius: 10px; padding: 0 8px; height: 36px; width: 250px; transition: .16s; }
.search-box:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); width: 300px; }
.search-box svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search-box input { border: 0; background: none; outline: none; flex: 1; min-width: 0; height: 100%; }
.search-box .icon-btn { width: 24px; height: 24px; }
.search-box .icon-btn svg { width: 14px; height: 14px; }

.user-box { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.user-btn:hover { background: #eef2fa; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, #6f9bff, #2f6bff); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-meta b { font-size: 13px; }
.user-meta small { color: var(--muted); font-size: 11px; }
.user-btn .caret { width: 15px; height: 15px; color: var(--muted); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 178px; z-index: 40;
}
.user-menu button { display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--text-2); }
.user-menu button:hover { background: #f2f5fb; color: var(--text); }
.user-menu button svg { width: 17px; height: 17px; }

/* 视图容器 */
.views { flex: 1; min-height: 0; position: relative; }
.view { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.view-title { font-size: 17px; margin: 0 8px 0 0; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; flex: none; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.seg { display: flex; background: #eef2fa; border-radius: 9px; padding: 2px; }
.seg button { width: 32px; height: 30px; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.seg button.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.seg svg { width: 17px; height: 17px; }

.group-bar { display: flex; gap: 8px; padding: 0 18px 10px; flex-wrap: wrap; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); color: var(--text-2); cursor: pointer; font-size: 13px; transition: .14s;
}
.chip:hover { border-color: #c9d5ee; }
.chip.active { background: var(--brand-soft); border-color: #c7d8ff; color: var(--brand-600); font-weight: 500; }
.chip .n { color: var(--muted); font-size: 11px; }
.chip.active .n { color: var(--brand); }

.list-meta { display: flex; align-items: center; gap: 12px; padding: 0 18px 8px; font-size: 13px; flex: none; }
.content { flex: 1; min-height: 0; padding: 0 18px 8px; position: relative; overflow: auto; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--panel-2); color: var(--muted); font-weight: 500; font-size: 12px;
  text-align: left; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.file-table th.sortable { cursor: pointer; }
.file-table th.sortable:hover { color: var(--text); }
.file-table th.sorted { color: var(--brand-600); }
.file-table th .arrow { font-size: 10px; margin-left: 3px; }
.col-check { width: 46px; padding-left: 16px !important; }
.col-name { width: auto; }
.col-size { width: 110px; }
.col-time { width: 170px; }
.col-owner { width: 110px; }
.col-actions { width: 84px; }
.file-table tbody tr { border-bottom: 1px solid var(--line-2); cursor: default; transition: background .12s; }
.file-table tbody tr:last-child { border-bottom: 0; }
.file-table tbody tr:hover { background: #f8faff; }
.file-table tbody tr.selected { background: var(--brand-soft); }
.file-table td { height: 54px; padding: 0 12px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-table td.col-check { padding-left: 16px; }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-cell .icon-tile { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; background: #f2f5fc; color: #7f93b3; overflow: hidden; }
.name-cell .icon-tile img { width: 100%; height: 100%; object-fit: cover; }
.name-cell .icon-tile svg { width: 19px; height: 19px; }
.name-cell .nwrap { min-width: 0; display: flex; flex-direction: column; }
.name-cell .nname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.name-cell .nsub { font-size: 11px; color: var(--muted); display: none; }
.file-table td.col-time, .file-table td.col-size, .file-table td.col-owner { color: var(--text-2); font-size: 13px; }
.lock-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--warn); font-size: 11px; margin-left: 6px; }
.lock-tag svg { width: 12px; height: 12px; }
.row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; opacity: 0; transition: opacity .12s; }
tr:hover .row-actions, tr.selected .row-actions { opacity: 1; }
.row-actions .icon-btn { width: 30px; height: 30px; }
.row-actions .icon-btn svg { width: 16px; height: 16px; }

/* 网格卡片 */
.grid-wrap { min-height: 100%; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding-bottom: 10px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  cursor: pointer; transition: .16s; display: flex; flex-direction: column;
}
.card:hover { border-color: #c9d8f7; box-shadow: var(--shadow); transform: translateY(-1px); }
.card.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .14); }
.card.dragover { border-color: var(--brand); background: var(--brand-soft); }
.card .thumb { aspect-ratio: 4 / 3; background: #f4f7fd; display: grid; place-items: center; overflow: hidden; position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .thumb > svg { width: 46px; height: 46px; stroke-width: 1.3; color: #9fb0cb; }
.card .thumb .ext-badge { position: absolute; left: 8px; top: 8px; background: rgba(16, 26, 44, .62); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 5px; letter-spacing: .04em; text-transform: uppercase; }
.card .cbody { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .cname { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .cmeta { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .ccheck { position: absolute; right: 8px; top: 8px; z-index: 3; width: 22px; height: 22px; opacity: 0; transition: .14s; }
.card .ccheck input { width: 18px; height: 18px; accent-color: var(--brand); }
.card:hover .ccheck, .card.selected .ccheck { opacity: 1; }
.card .ccheck input { background: #fff; }
.card .cactions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; opacity: 0; transition: .14s; }
.card:hover .cactions { opacity: 1; }
.card .cactions .icon-btn { width: 28px; height: 28px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-sm); border-color: var(--line); }
.card .cactions svg { width: 15px; height: 15px; }
.card.folder .thumb { background: linear-gradient(160deg, #fff8e6, #fff2cf); }
.card.folder .thumb > svg { color: #e0a823; }
.card .video-badge { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.42)); }
.card .video-badge svg { width: 40px; height: 40px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }

.empty-state { display: grid; place-items: center; align-content: center; gap: 6px; padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-art { width: 74px; height: 74px; border-radius: 22px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.empty-art svg { width: 34px; height: 34px; color: #b7c4d9; }
.empty-state h3 { margin: 0; color: var(--text-2); font-size: 15px; }
.empty-state p { margin: 0 0 12px; font-size: 13px; }

.loading-mask { position: absolute; inset: 0; background: rgba(244, 246, 251, .6); display: grid; place-items: center; z-index: 5; backdrop-filter: blur(1px); }

.pager { display: flex; align-items: center; gap: 12px; padding: 8px 18px 12px; flex: none; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pager-controls .icon-btn { border: 1px solid var(--line); background: #fff; }
.pager-controls #page-current { min-width: 62px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pager-jump, .pager-size { display: inline-flex; align-items: center; gap: 5px; }
.pager-jump input { width: 48px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pager-size select { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 4px; }

/* 回收站 / 快捷 / 传输 / 设置 */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.link-card { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; transition: .16s; }
.link-card:hover { border-color: #c9d8f7; box-shadow: var(--shadow); transform: translateY(-1px); }
.link-card .licon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.link-card .lname { font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card .lurl { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.transfer-list { display: flex; flex-direction: column; gap: 8px; }
.transfer-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.transfer-item .ticon { width: 34px; height: 34px; border-radius: 9px; background: #f2f5fc; display: grid; place-items: center; color: #7f93b3; flex: none; }
.transfer-item .tmain { flex: 1; min-width: 0; }
.transfer-item .tname { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-item .tbar { height: 5px; border-radius: 5px; background: #eef2fa; margin: 7px 0 4px; overflow: hidden; }
.transfer-item .tbar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; transition: width .2s; }
.transfer-item .tmeta { font-size: 11px; color: var(--muted); display: flex; gap: 10px; }
.transfer-item .tstate { font-size: 12px; color: var(--muted); margin-left: 8px; }
.transfer-item.done .tbar i { background: var(--ok); }
.transfer-item.fail .tbar i { background: var(--danger); }

.settings { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; max-width: 860px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; }
.panel-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-size: 13px; word-break: break-all; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.cat-item { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cat-item b { display: block; font-size: 13px; }
.cat-item span { font-size: 11px; color: var(--muted); }

/* 上传面板 */
.upload-panel {
  position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px); background: #fff;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden;
}
.upload-panel header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.up-head { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.up-head b { font-size: 13px; }
.up-head span { font-size: 11px; }
.up-actions { display: flex; align-items: center; gap: 4px; }
.up-conflict { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.up-conflict select { height: 26px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11px; padding: 0 2px; }
.up-list { max-height: 300px; overflow: auto; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.up-item:last-child { border-bottom: 0; }
.up-item .uicon { width: 28px; height: 28px; border-radius: 8px; background: #f2f5fc; display: grid; place-items: center; color: #7f93b3; flex: none; }
.up-item .uicon svg { width: 15px; height: 15px; }
.up-item .umain { flex: 1; min-width: 0; }
.up-item .uname { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .ubar { height: 4px; border-radius: 4px; background: #eef2fa; margin-top: 5px; overflow: hidden; }
.up-item .ubar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .2s; }
.up-item .ustate { font-size: 11px; color: var(--muted); margin-top: 3px; }
.up-item.ok .ubar i { background: var(--ok); }
.up-item.err .ubar i { background: var(--danger); }
.up-item .uact { display: flex; gap: 2px; }
.up-item .uact .icon-btn { width: 26px; height: 26px; }
.up-item .uact svg { width: 14px; height: 14px; }
.upload-panel footer { padding: 8px 14px; border-top: 1px solid var(--line); text-align: right; background: var(--panel-2); }
.upload-panel.min .up-list, .upload-panel.min footer { display: none; }

/* 预览 */
.preview { position: fixed; inset: 0; background: rgba(10, 16, 28, .92); z-index: 80; display: flex; flex-direction: column; color: #e8edf7; }
.preview-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pv-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.pv-title .pv-icon { width: 26px; height: 26px; color: #9fb4d8; flex: none; }
.pv-title b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-title small { color: #94a3b8; font-size: 12px; }
.pv-actions { display: flex; gap: 6px; align-items: center; }
.pv-actions .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #e8edf7; box-shadow: none; }
.pv-actions .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.pv-close { color: #cbd5e1; }
.pv-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.preview-body { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; overflow: hidden; }
.pv-stage { width: 100%; height: 100%; display: grid; place-items: center; overflow: auto; padding: 18px; }
.pv-img { max-width: 100%; max-height: 100%; transition: transform .16s; transform-origin: center; user-select: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.preview-body video { max-width: 100%; max-height: 100%; background: #000; border-radius: 10px; }
.preview-body audio { width: min(560px, 90%); }
.preview-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pv-text { width: min(1000px, 100%); height: 100%; overflow: auto; background: #0f172a; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 18px; }
.pv-text pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.7; color: #d8e2f2; }
.pv-info { text-align: center; color: #94a3b8; display: grid; gap: 12px; place-items: center; }
.pv-info svg { width: 64px; height: 64px; color: #64748b; stroke-width: 1.2; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255, 255, 255, .08); color: #dbe4f2; border-radius: 12px; cursor: pointer; display: grid; place-items: center; }
.pv-nav:hover { background: rgba(255, 255, 255, .18); }
.pv-prev { left: 16px; }
.pv-next { right: 16px; }
.pv-zoom { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; background: rgba(20, 28, 44, .86); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 5px 8px; }
.pv-zoom .icon-btn { color: #dbe4f2; }
.pv-zoom .icon-btn:hover { background: rgba(255,255,255,.12); }
.pv-zoom span { font-size: 12px; min-width: 44px; text-align: center; color: #cbd5e1; }
.pv-office-note { color: #94a3b8; font-size: 12px; margin-top: 6px; }

/* 弹窗 */
.modal-root { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .46); backdrop-filter: blur(2px); }
.modal { position: relative; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; animation: pop .16s ease; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal.wide { width: min(720px, calc(100vw - 32px)); }
.modal header { display: flex; align-items: center; padding: 16px 18px 12px; }
.modal header h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 0 18px 6px; overflow: auto; color: var(--text-2); font-size: 14px; }
.modal-body p { margin: 0 0 12px; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px 18px; }
.modal-field { margin-bottom: 14px; }
.modal-field > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.modal-field input, .modal-field select, .modal-field textarea {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #f7f9fd; outline: none;
}
.modal-field textarea { min-height: 76px; padding: 10px 12px; height: auto; resize: vertical; }
.modal-field input:focus, .modal-field textarea:focus, .modal-field select:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.modal-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 移动对话框 */
.move-picker { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.move-search { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.move-search svg { width: 16px; height: 16px; color: var(--muted); }
.move-search input { flex: 1; border: 0; background: none; outline: none; height: 28px; }
.move-list { max-height: 300px; overflow: auto; padding: 4px; }
.move-row { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.move-row:hover { background: #f2f5fb; }
.move-row.active { background: var(--brand-soft); color: var(--brand-600); font-weight: 500; }
.move-row svg { width: 16px; height: 16px; color: #e0a823; flex: none; }
.move-row .mpath { font-size: 11px; color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.move-row.disabled { opacity: .4; cursor: not-allowed; }

/* 右键菜单 */
.context-menu {
  position: fixed; z-index: 95; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 186px; animation: pop .12s ease;
}
.menu-item { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-size: 13px; }
.menu-item:hover { background: #f2f5fb; color: var(--text); }
.menu-item svg { width: 16px; height: 16px; color: var(--muted); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger svg { color: var(--danger); }
.menu-item.disabled { opacity: .4; pointer-events: none; }
.menu-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }

/* Toast */
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 11px; padding: 10px 16px; font-size: 13px; color: var(--text-2); animation: drop .2s ease; max-width: 78vw;
}
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } }
.toast svg { width: 17px; height: 17px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }
.toast.warn svg { color: var(--warn); }
.toast.info svg { color: var(--brand); }

/* 拖拽提示 */
.drop-hint { position: fixed; inset: 0; z-index: 70; background: rgba(47, 107, 255, .1); border: 3px dashed var(--brand); border-radius: 18px; margin: 10px; display: grid; place-items: center; pointer-events: none; }
.drop-hint > div { background: #fff; border-radius: 16px; padding: 26px 38px; box-shadow: var(--shadow-lg); display: grid; place-items: center; gap: 8px; color: var(--brand); }
.drop-hint svg { width: 40px; height: 40px; }
.drop-hint p { margin: 0; font-weight: 500; }

/* 响应式 */
@media (max-width: 1080px) {
  .col-owner { display: none; }
  .search-box { width: 200px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 75; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  .sidebar-close, .sidebar-toggle { display: inline-flex; }
  .crumb { max-width: 140px; }
  .search-box { width: 150px; }
  .search-box:focus-within { width: 190px; }
  .col-time { display: none; }
  .col-size { width: 84px; }
  .toolbar { padding: 10px 12px 8px; gap: 7px; }
  .content { padding: 0 12px 8px; }
  .list-meta, .group-bar, .pager { padding-left: 12px; padding-right: 12px; }
  .login-view { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .toolbar-left .btn span { display: none; }
  .btn { padding: 0 11px; }
  .user-meta { display: none; }
  .upload-panel { right: 8px; bottom: 8px; left: 8px; width: auto; }
  .pv-nav { display: none; }
}
