/* ══════════════════════════════════════════════════════════════
   资源中台 · 新版布局
   深色命令栏 + 指标条 + 主区/侧栏工作台
   ══════════════════════════════════════════════════════════════ */

:root {
  --ink: #0f1216;
  --ink-2: #181c22;
  --ink-3: #232830;
  --canvas: #f5f4ef;
  --card: #ffffff;
  --line: #e2ded3;
  --line-soft: #eeebe3;
  --text: #14181d;
  --muted: #6f6d66;
  --muted-2: #9a968b;
  --accent: #c2472a;
  --accent-2: #e06b45;
  --accent-soft: #f7e7e0;
  --teal: #1e5f58;
  --teal-soft: #deece8;
  --gold: #a9803a;
  --ok: #2c7a5b;
  --warn: #b4761f;
  --danger: #b33a35;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 29, 0.05);
  --shadow-md: 0 14px 34px -18px rgba(20, 24, 29, 0.28);
  --shadow-lg: 0 34px 70px -30px rgba(15, 18, 22, 0.45);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --mast: 68px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }

.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ══════════════════════════ 登录 ══════════════════════════ */

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--ink);
  color: #f2efe6;
}

.login-art {
  position: relative;
  overflow: hidden;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 520px at 10% -12%, rgba(194, 71, 42, 0.26), transparent 62%),
    radial-gradient(720px 520px at 102% 108%, rgba(30, 95, 88, 0.32), transparent 60%),
    var(--ink);
}

.login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 40% 40%, #000, transparent 78%);
  pointer-events: none;
}

.brand-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }

.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  box-shadow: 0 8px 20px -8px rgba(194, 71, 42, 0.9);
}

.brand-name { font-family: var(--serif); font-size: 17px; letter-spacing: 0.02em; }
.brand-sub { font-size: 10px; letter-spacing: 0.22em; color: rgba(242,239,230,0.42); text-transform: uppercase; margin-top: 2px; }

.login-headline {
  position: relative; z-index: 2;
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 12em;
}
.login-headline em { font-style: normal; color: var(--accent-2); }

.login-lede {
  position: relative; z-index: 2;
  color: rgba(242, 239, 230, 0.58);
  max-width: 34em;
  line-height: 1.9;
  font-size: 13.5px;
}

.login-metrics {
  position: relative; z-index: 2;
  display: flex; gap: 42px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
}
.login-metrics span { display: block; }
.login-metrics .k { font-family: var(--mono); font-size: 21px; color: #f2efe6; }
.login-metrics .v { font-size: 11px; color: rgba(242,239,230,0.4); letter-spacing: 0.12em; margin-top: 6px; }

.login-panel {
  background: var(--card);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px clamp(34px, 6vw, 84px);
  position: relative;
}
.login-panel::before {
  content: "PRIVATE / RESOURCE";
  position: absolute;
  top: 34px; right: 34px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
}

.login-form { display: flex; flex-direction: column; gap: 18px; max-width: 360px; }
.login-form h2 { font-family: var(--serif); font-size: 28px; margin: 0 0 4px; }
.login-form p { margin: 0 0 10px; color: var(--muted); line-height: 1.7; font-size: 13px; }

.login-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.8;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.login-hint code { font-family: var(--mono); color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 5px; }

.login-error {
  font-size: 12px;
  color: var(--danger);
  background: #fbeae8;
  border: 1px solid #f2d3cf;
  border-radius: 8px;
  padding: 9px 12px;
  line-height: 1.6;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 11px;
  margin: 2px 0;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-qq {
  background: #12b7f5;
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(18, 183, 245, 0.9);
}
.btn-qq:hover { background: #0ea5da; }

/* ══════════════════════ 通用控件 ══════════════════════ */

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  font-size: 13.5px;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 71, 42, 0.1);
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: #b8b4a9; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform .16s, background .18s, border-color .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -14px rgba(194, 71, 42, 0.9); }
.btn-primary:hover { background: #ab3c22; }
.btn-ink { background: var(--ink); color: #f4f1e9; }
.btn-ink:hover { background: var(--ink-3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #c9c3b5; background: #fff; }
.btn-soft { background: #f1eee6; color: var(--text); }
.btn-soft:hover { background: #e7e3d8; }
.btn-danger { background: #fbeae8; color: var(--danger); }
.btn-danger:hover { background: #f6dad7; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 11.5px; border-radius: 7px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; padding: 3px 7px; border-radius: 5px;
  background: #f1eee6; color: var(--muted);
  font-family: var(--mono); white-space: nowrap;
}
.tag.ok { background: var(--teal-soft); color: var(--teal); }
.tag.pin { background: var(--accent-soft); color: var(--accent); }
.tag.warn { background: #f7ecd8; color: var(--warn); }
.tag.off { background: #eeece5; color: var(--muted-2); }
.tag.red { background: #fae4e2; color: var(--danger); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.amber { background: var(--gold); }
.dot.teal { background: var(--teal); }
.dot.red { background: var(--accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ══════════════════════ 顶部命令栏 ══════════════════════ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: #e8e5dc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mast-inner {
  max-width: 1360px;
  margin: 0 auto;
  height: var(--mast);
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.mast-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.mast-brand .brand-mark { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
.mast-brand b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: #f6f3ea;
  line-height: 1.2;
}
.mast-brand small {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: rgba(246, 243, 234, 0.36);
  margin-top: 2px;
}

.mast-nav { display: flex; align-items: center; gap: 2px; flex: none; }
.mast-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  color: rgba(246, 243, 234, 0.56);
  transition: color .16s, background .16s;
}
.mast-link:hover { color: #f6f3ea; background: rgba(255, 255, 255, 0.06); }
.mast-link.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.mast-link.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.mast-link .badge {
  font-family: var(--mono);
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(246, 243, 234, 0.72);
  padding: 1px 5px;
  border-radius: 20px;
  line-height: 1.6;
}
.mast-link.active .badge { background: rgba(194, 71, 42, 0.32); color: #ffd9c9; }

.mast-spacer { flex: 1; }

.mast-search { position: relative; width: 210px; flex: 0 1 210px; }
.mast-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: rgba(246,243,234,0.36); }
.mast-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #f2efe6;
  border-radius: 8px;
  padding: 8px 10px 8px 30px;
  font-size: 12px;
  outline: none;
  transition: background .18s, border-color .18s;
}
.mast-search input::placeholder { color: rgba(246, 243, 234, 0.34); }
.mast-search input:focus { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); }

.mast-storage {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(246, 243, 234, 0.42);
  flex: none;
}
.mast-meter { display: block; width: 46px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.mast-meter b { display: block; height: 100%; width: 2%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; transition: width .3s; }

.mast-user { display: flex; align-items: center; gap: 8px; flex: none; }
.mast-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(194, 71, 42, 0.22);
  color: #f0a184;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
}
.mast-user span { font-size: 11.5px; color: rgba(246, 243, 234, 0.6); }
.mast-user button { font-size: 11px; color: rgba(246, 243, 234, 0.38); transition: color .16s; }
.mast-user button:hover { color: #fff; }

.mast-toggle { display: none; color: rgba(246,243,234,0.7); width: 32px; height: 32px; border-radius: 8px; }
.mast-toggle:hover { background: rgba(255,255,255,0.08); }

/* ══════════════════════ 页面骨架 ══════════════════════ */

.page {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 30px 26px 72px;
  animation: fadein 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.page-head .eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-head .eyebrow::after { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: 0.45; }
.page-head h1 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.page-head p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.head-actions { display: flex; gap: 8px; align-items: center; flex: none; }

/* ══════════════════════ 指标条 ══════════════════════ */

.ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 18px;
}

.ledger-cell {
  position: relative;
  padding: 18px 20px 16px;
  border-right: 1px solid var(--line-soft);
}
.ledger-cell:last-child { border-right: none; }
.ledger-cell::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: transparent;
  transition: background .2s;
}
.ledger-cell:hover::before { background: var(--accent); }

.ledger-k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
  font-weight: 600;
}
.ledger-v {
  display: block;
  font-family: var(--serif);
  font-size: 33px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 10px 0 5px;
}
.ledger-n { display: block; font-size: 11.5px; color: var(--muted-2); }
.ledger-n b { color: var(--text); font-weight: 600; }

/* ══════════════════════ 工作台栅格 ══════════════════════ */

.board {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
  gap: 16px;
  align-items: start;
}
.board-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h3 { margin: 0; font-size: 12.5px; letter-spacing: 0.03em; font-weight: 600; }
.panel-head .hint { font-size: 10.5px; color: var(--muted-2); font-family: var(--mono); }
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }

/* 趋势图 */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 196px;
  padding-top: 22px;
  background-image: repeating-linear-gradient(to top, var(--line-soft) 0 1px, transparent 1px 44px);
  background-position: bottom 26px;
}
.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}
.bar-col .bar {
  width: 100%;
  max-width: 34px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(180deg, #ded9cc, #ebe7dd);
  min-height: 3px;
  position: relative;
  transform-origin: bottom;
  animation: grow 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  transition: background .2s;
}
.bar-col .bar.today { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.bar-col:hover .bar { background: linear-gradient(180deg, #c9c3b4, #dbd5c7); }
.bar-col:hover .bar.today { background: linear-gradient(180deg, #a83a21, #c2472a); }
.bar-col .bar span {
  position: absolute;
  top: -19px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s;
}
.bar-col:hover .bar span { opacity: 1; }
.bar-col .lbl { font-size: 10px; color: var(--muted-2); font-family: var(--mono); }
@keyframes grow { from { transform: scaleY(0.04); opacity: 0.35; } to { transform: scaleY(1); opacity: 1; } }

/* 资源构成 */
.cat-list { display: flex; flex-direction: column; gap: 14px; }
.cat-row { display: grid; grid-template-columns: 58px 1fr 26px; align-items: center; gap: 10px; font-size: 11.5px; }
.cat-row .name { color: var(--muted); white-space: nowrap; }
.cat-row .track { height: 5px; background: #f0ede4; border-radius: 4px; overflow: hidden; }
.cat-row .track i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--teal);
  animation: slide 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.cat-row:nth-child(2) .track i { background: #bf7a3c; }
.cat-row:nth-child(3) .track i { background: var(--accent); }
.cat-row:nth-child(4) .track i { background: #64789c; }
.cat-row:nth-child(5) .track i { background: #846a97; }
.cat-row:nth-child(6) .track i { background: #8d8a7e; }
.cat-row .num { font-family: var(--mono); color: var(--muted); text-align: right; }
@keyframes slide { from { width: 0 !important; } }

/* 最近文件 */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .14s;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: #fbfaf6; }
.feed-item .meta { min-width: 0; flex: 1; }
.feed-item .nm { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item .sm { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; font-family: var(--mono); }
.feed-item .time { font-size: 10.5px; color: var(--muted-2); flex: none; }

/* 操作日志 */
.activity { display: flex; flex-direction: column; }
.act-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 18px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-soft);
}
.act-item:last-child { border-bottom: none; }
.act-item .tick { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); margin-top: 6px; flex: none; }
.act-item.upload .tick { background: var(--teal); }
.act-item.download .tick, .act-item.direct .tick { background: var(--accent); }
.act-item.share .tick { background: var(--gold); }
.act-item .txt { flex: 1; color: #3c4046; line-height: 1.55; word-break: break-all; }
.act-item .at { color: var(--muted-2); font-size: 10px; font-family: var(--mono); flex: none; }

/* ══════════════════════ 文件库 ══════════════════════ */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.filter-bar .label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-family: var(--mono);
  margin-right: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid transparent;
  background: #f4f1e9;
  transition: all .16s;
}
.chip:hover { background: #ece8dd; color: var(--text); }
.chip.active { background: var(--ink); color: #f4f1e9; }
.chip .n { font-family: var(--mono); font-size: 10px; opacity: 0.55; }

.table-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.file-table th { white-space: nowrap; }
.file-table td:nth-child(3), .file-table th:nth-child(3) { white-space: nowrap; width: 96px; }
.file-table td:nth-child(2), .file-table th:nth-child(2) { width: 64px; }
.file-table td:last-child, .file-table th:last-child { width: 148px; }

.file-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.file-table th {
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  font-weight: 600;
  text-transform: uppercase;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #faf8f3;
  white-space: nowrap;
}
.file-table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13px; }
.file-table tr:last-child td { border-bottom: none; }
.file-table tbody tr { transition: background .14s; }
.file-table tbody tr:hover { background: #fbfaf6; }
.file-table th:last-child, .file-table td:last-child { text-align: right; }

.f-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.f-name .txt { min-width: 0; }
.f-name .nm {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
  cursor: pointer;
  transition: color .15s;
}
.f-name .nm:hover { color: var(--accent); }
.f-name .sm {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 4px;
  font-family: var(--mono);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.f-name .sm span[title] { color: #b4afa2; }

.ft-icon {
  width: 36px; height: 36px; flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #f1eee6;
  color: var(--muted);
  text-transform: uppercase;
}
.ft-icon.image { background: #e3eee9; color: #2b695d; }
.ft-icon.archive { background: #f5e9d6; color: #97641f; }
.ft-icon.document { background: #e6eaf4; color: #475c8c; }
.ft-icon.video { background: #f0e4ef; color: #794876; }
.ft-icon.audio { background: #f6e2de; color: #a54d3c; }
.ft-icon.text { background: #e9e9e1; color: #5a5f50; }

.row-actions { display: inline-flex; gap: 2px; opacity: 0.5; transition: opacity .16s; }
tr:hover .row-actions { opacity: 1; }
.icon-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: #f1eee6; color: var(--text); }
.icon-btn.danger:hover { background: #fae4e2; color: var(--danger); }
.icon-btn svg { width: 15px; height: 15px; }

.empty { padding: 64px 24px; text-align: center; color: var(--muted); }
.empty .glyph { font-family: var(--serif); font-size: 38px; color: #d9d4c6; margin-bottom: 12px; }
.empty h4 { margin: 0 0 8px; font-size: 15px; color: var(--text); font-family: var(--serif); }
.empty p { margin: 0 0 18px; font-size: 12.5px; color: var(--muted-2); }

/* ══════════════════════ 分享卡片 ══════════════════════ */

.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.share-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.share-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #d8d2c4; }
.share-card .top { display: flex; align-items: flex-start; gap: 10px; }
.share-card .title { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; word-break: break-all; line-height: 1.4; }
.share-card .desc { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin-top: -4px; }
.share-card .linkbox {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: #faf8f3;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-card .metrics { display: flex; gap: 16px; font-size: 10.5px; color: var(--muted-2); align-items: center; flex-wrap: wrap; }
.share-card .metrics b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.share-card .foot {
  display: flex;
  gap: 6px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.share-card .foot .time { font-size: 10px; color: var(--muted-2); margin-left: auto; font-family: var(--mono); }
.mini-files { display: flex; gap: 5px; flex-wrap: wrap; }
.mini-file {
  font-size: 10px;
  color: var(--muted);
  background: #f4f1e9;
  padding: 2px 7px;
  border-radius: 4px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════ 设置 ══════════════════════ */

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.form-card { padding: 20px 22px; }
.form-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 17px; }
.form-card .desc { margin: 0 0 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.form-stack { display: flex; flex-direction: column; gap: 13px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0;
}
.detail-cell { background: var(--card); padding: 11px 13px; }
.detail-cell .k { font-size: 10px; color: var(--muted-2); letter-spacing: 0.08em; margin-bottom: 5px; }
.detail-cell .v { font-size: 12px; font-family: var(--mono); word-break: break-all; }

.qq-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-soft);
  background: #faf8f3;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 12px;
}
.qq-profile[hidden] { display: none; }
.qq-profile img,
.qq-profile .noimg {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 15px;
}
.qq-profile .qq-meta { min-width: 0; line-height: 1.6; }
.qq-profile .qq-meta b { display: block; font-size: 12.5px; }
.qq-profile .qq-meta span { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); word-break: break-all; }

/* ══════════════════════ 弹窗 ══════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.46);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.open { display: flex; animation: fade 0.2s both; }
@keyframes fade { from { opacity: 0; } }

.modal {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: pop 0.26s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.modal.wide { max-width: 760px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 0; }
.modal-head h3 { font-family: var(--serif); margin: 0; font-size: 19px; }
.modal-head p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.modal-head .close {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--muted);
  display: grid; place-items: center;
  transition: background .15s;
}
.modal-head .close:hover { background: #f1eee6; color: var(--text); }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 9px; justify-content: flex-end; align-items: center; }
.modal-foot .left { margin-right: auto; font-size: 11.5px; color: var(--muted-2); }

.switch-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.switch-row:last-child { border-bottom: none; }
.switch-row .info { flex: 1; }
.switch-row .info b { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.switch-row .info span { font-size: 11px; color: var(--muted-2); }

.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute;
  inset: 0;
  background: #d9d4c7;
  border-radius: 22px;
  transition: background .2s;
  cursor: pointer;
}
.switch i::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(16px); }

.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 分享复用提示 */
.reuse-notice {
  border: 1px solid #eddfc4;
  background: #fdf8ee;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 11.5px;
  color: #7d6229;
  line-height: 1.7;
}
.reuse-notice b { color: #6a511e; }
.reuse-notice .reuse-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #6a511e;
  margin-bottom: 6px;
}
.reuse-notice ul { margin: 6px 0 0; padding-left: 16px; }
.reuse-notice li { margin-bottom: 3px; }
.reuse-notice .reuse-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.reuse-notice .reuse-actions a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--mono);
  color: #6a511e;
  background: #fff;
  border: 1px solid #e6d6b6;
  border-radius: 6px;
  padding: 4px 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.reuse-notice .reuse-actions a:hover { background: #fffaf0; border-color: #d8c39a; }

.file-picker { border: 1px solid var(--line); border-radius: 10px; max-height: 190px; overflow: auto; }
.pick-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .14s;
}
.pick-row:last-child { border-bottom: none; }
.pick-row:hover { background: #fbfaf6; }
.pick-row input { accent-color: var(--accent); }
.pick-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .sz { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }

.picker-toggle {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-size: 11.5px;
  color: var(--muted);
  background: #faf8f3;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  transition: background .15s, color .15s;
}
.picker-toggle:hover { background: #f3efe5; color: var(--text); }

/* 上传 */
.dropzone {
  position: relative;
  border: 1.5px dashed #cfc9ba;
  border-radius: 12px;
  padding: 34px 20px;
  text-align: center;
  background: #fbfaf6;
  transition: all .18s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #fdf5f1; }
.dropzone .glyph { font-family: var(--serif); font-size: 24px; color: var(--accent); }
.dropzone h4 { margin: 8px 0 5px; font-size: 14px; font-family: var(--serif); }
.dropzone p { margin: 0; font-size: 11px; color: var(--muted-2); }

.upload-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.up-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.up-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .pct { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.up-item .barline { grid-column: 1 / -1; height: 3px; background: #f1eee6; border-radius: 3px; overflow: hidden; }
.up-item .barline i { display: block; height: 100%; background: var(--teal); transition: width .2s; }
.up-item.done .barline i { background: var(--ok); }
.up-item.error .barline i { background: var(--danger); }

/* ══════════════════════ 抽屉 ══════════════════════ */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 90;
}
.drawer-backdrop.open { display: block; animation: fade 0.2s both; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 94vw);
  background: var(--card);
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.3, 0.8, 0.3, 1);
  z-index: 95;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--line);
}
.drawer.open { transform: none; }
.drawer-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.drawer-head .close {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--muted);
  display: grid; place-items: center;
}
.drawer-head .close:hover { background: #f1eee6; }
.drawer-body { padding: 18px 22px 40px; overflow: auto; flex: 1; }
.drawer-title { font-family: var(--serif); font-size: 18px; line-height: 1.4; word-break: break-all; margin: 0 0 6px; }
.drawer-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  font-family: var(--mono);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-title {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.preview-box { border: 1px solid var(--line-soft); border-radius: 11px; overflow: hidden; background: #f8f6f0; }
.preview-box img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: repeating-conic-gradient(#efece2 0% 25%, #f9f7f2 0% 50%) 50% / 16px 16px;
}
.preview-box pre {
  margin: 0;
  padding: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #43464c;
}
.preview-box audio, .preview-box video { width: 100%; display: block; }
.preview-box iframe { width: 100%; height: 380px; border: none; display: block; background: #fff; }

.archive-list { max-height: 250px; overflow: auto; font-family: var(--mono); font-size: 11px; }
.archive-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-bottom: 1px dashed var(--line-soft);
}
.archive-row:last-child { border-bottom: none; }
.archive-row .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-row .s { color: var(--muted-2); flex: none; font-size: 10px; }

.link-field { display: flex; gap: 6px; }
.link-field input { font-family: var(--mono); font-size: 10.5px; background: #faf8f3; }
.link-field .btn { flex: none; }

/* ══════════════════════ Toast ══════════════════════ */

.toasts {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #f4f1e9;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toastin 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  max-width: 90vw;
}
.toast.err { background: #8d2f2b; }
.toast.ok::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #6ec59c; }
.toast.err::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #f0a49f; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

.skeleton {
  background: linear-gradient(90deg, #efebe1 25%, #f8f6f0 37%, #efebe1 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ══════════════════════ 响应式 ══════════════════════ */

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .mast-inner { gap: 12px; padding: 0 16px; }
  .mast-storage, .mast-user span { display: none; }
  .mast-search { width: 100%; flex: 1; max-width: none; }
  .page { padding: 22px 16px 60px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 26px; }
  .grid-2col { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .file-table { min-width: 600px; }
}

@media (max-width: 760px) {
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell:nth-child(2) { border-right: none; }
  .ledger-cell:nth-child(1), .ledger-cell:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 700px) {
  .share-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .mast-toggle { display: grid; place-items: center; }
  .mast-nav {
    position: absolute;
    top: var(--mast);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 14px 14px;
    background: var(--ink-2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 30px -20px rgba(0,0,0,0.6);
    display: none;
  }
  .mast-nav.open { display: flex; }
  .mast-link { padding: 10px 12px; font-size: 13px; }
  .mast-link.active::after { display: none; }
}

@media (max-width: 640px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger-cell { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .ledger-cell:last-child { border-bottom: none; }
}

@media (max-width: 780px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
}

@media (max-width: 620px) {
  .file-table th:nth-child(3), .file-table td:nth-child(3) { display: none; }
  .file-table { min-width: 440px; }
  .f-name .nm { max-width: 180px; }
}


