/* picui · 暖色毛玻璃风格
   米色暖调底 + 橙色光晕，半透明玻璃卡片；橙 / 芥黄 / 墨黑 / 白 四色标签；超大字号标题 */
:root {
  --bg-a: #f3eadd;
  --bg-b: #e8dac7;
  --glass: rgba(255, 250, 244, .58);
  --glass-strong: rgba(255, 251, 246, .86);
  --glass-line: rgba(255, 255, 255, .78);
  --white: #fffdfa;
  --ink: #1f1a16;
  --ink-2: #4b4038;
  --muted: #8a7c6e;
  --faint: #b9ab9b;
  --line: rgba(90, 60, 30, .10);
  --line-2: rgba(90, 60, 30, .17);
  --orange: #ec6f2d;
  --orange-hi: #f5843f;
  --orange-deep: #d65a1c;
  --orange-soft: rgba(236, 111, 45, .12);
  --mustard: #f2b13c;
  --chip-ink: #1f1c1a;
  --ok: #3d9a5b;
  --danger: #d9452f;
  --danger-soft: rgba(217, 69, 47, .10);

  --font: "Segoe UI Variable Text", "Segoe UI", "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --display: "Segoe UI Variable Display", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;

  --r-lg: 24px;
  --r: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 24px 60px -28px rgba(120, 72, 28, .38), 0 2px 8px rgba(120, 72, 28, .05);
  --shadow-sm: 0 6px 18px -8px rgba(120, 72, 28, .30);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 680px at 80% -12%, #f7c48f 0%, rgba(247, 196, 143, 0) 62%),
    radial-gradient(900px 640px at -8% 108%, #f2d1aa 0%, rgba(242, 209, 170, 0) 60%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
  background-attachment: fixed;
}
input, select, button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* 漂浮光晕 */
.atmos { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.g1 { width: 520px; height: 520px; right: -120px; top: -140px; background: #f59b5a; }
.g2 { width: 420px; height: 420px; left: 18%; bottom: -200px; background: #f6c27a; animation-delay: -6s; }
.g3 { width: 300px; height: 300px; left: -80px; top: 30%; background: #fbd9b4; animation-delay: -11s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; }
.ico-xl { width: 44px; height: 44px; stroke-width: 1.4; }

.display {
  margin: 0;
  font: 800 clamp(54px, 6.4vw, 104px)/.9 var(--display);
  letter-spacing: -.045em;
  background: linear-gradient(175deg, #2a1f17 30%, #6a4426);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.logo img { display: block; height: 36px; width: auto; }
.login-logo { display: block; height: 64px; width: auto; margin-bottom: 36px; }
.hint { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ---------- 通用组件 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: var(--shadow);
}
.panel { border-radius: var(--r-lg); padding: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font: 700 17px/1.3 var(--display); letter-spacing: -.01em; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { border-color: var(--faint); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 5px; }
.btn-lg { height: 50px; font-size: 15px; }
.btn-accent { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.btn-accent:hover { background: var(--orange-hi); border-color: var(--orange-hi); color: #fff; }
.btn-dark { background: var(--chip-ink); border-color: var(--chip-ink); color: #fff; }
.btn-dark:hover { background: #33302c; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .6); box-shadow: none; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn-danger:hover { background: #e85a43; border-color: #e85a43; color: #fff; }
.btn-danger-ghost:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.btn-soft {
  width: 100%;
  height: 42px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .78);
  font-weight: 600;
  color: var(--ink);
  transition: background .15s, box-shadow .15s;
}
.btn-soft:hover { background: #fff; box-shadow: var(--shadow-sm); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

.round {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  transition: transform .15s var(--ease), box-shadow .15s, background .15s;
}
.round:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pill-glass { background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.pill-white { background: var(--white); color: var(--ink); }
.pill-dark { background: var(--chip-ink); border-color: var(--chip-ink); color: #fff; }

.corner-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--glass-line);
  border-radius: 11px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease);
}
.corner-btn:hover { transform: translateY(-1px) rotate(-4deg); }

.pill-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-chip.dark { background: var(--chip-ink); color: #fff; }

.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tone-0 { background: var(--orange); color: #fff; }
.tone-1 { background: var(--mustard); color: var(--ink); }
.tone-2 { background: var(--chip-ink); color: #fff; }
.tone-3 { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.tone-4 { background: rgba(236, 111, 45, .14); color: var(--orange-deep); }

.avatar { width: var(--size, 36px); height: var(--size, 36px); flex: none; border-radius: 50%; object-fit: cover; background: var(--white); box-shadow: 0 0 0 2px var(--white); }
.avatar-text { display: inline-grid; place-items: center; background: var(--tone, var(--orange)); color: #fff; font: 700 calc(var(--size, 36px) * .42)/1 var(--display); user-select: none; }

input[type="search"], input[type="password"], input[type="text"], select, .copy-field input, .field input:not([type="range"]):not([type="checkbox"]), .field textarea {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .85);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 10px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
input[readonly] { background: rgba(255, 255, 255, .5); color: var(--muted); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field small { font-weight: 400; color: var(--muted); }
.field output { color: var(--orange); font-weight: 600; }
.field input[type="range"] { accent-color: var(--orange); }
.field-error { margin: 0; color: var(--danger); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(90, 60, 30, .18); transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--orange); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--orange); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }
.switch:has(input:disabled) { cursor: not-allowed; }

/* ---------- 装饰画：叠放的相框 ---------- */
.art { position: absolute; pointer-events: none; }
.frame {
  position: absolute;
  width: 150px;
  height: 188px;
  border-radius: 22px;
  border: 7px solid rgba(255, 255, 255, .92);
  box-shadow: 0 30px 50px -18px rgba(120, 60, 20, .45);
  overflow: hidden;
  animation: bob 7s ease-in-out infinite;
}
.frame::before, .frame::after { content: ""; position: absolute; }
.fr1 { left: 40px; top: 46px; transform: rotate(-14deg); background: linear-gradient(170deg, #ffd29b, #f0813c 70%, #c9541b); }
.fr1::before { width: 52px; height: 52px; border-radius: 50%; background: #fff4df; left: 24px; top: 26px; box-shadow: 0 0 30px #fff2d6; }
.fr1::after { left: -20px; right: -20px; bottom: -30px; height: 90px; border-radius: 50%; background: #b9461a; }
.fr2 { left: 150px; top: 10px; transform: rotate(7deg); background: linear-gradient(180deg, #fbefe0, #f2d9b9); animation-delay: -2s; z-index: 2; }
.fr2::before { left: -10px; right: -10px; bottom: 0; height: 90px; background: linear-gradient(180deg, #2b221c, #18120e); clip-path: polygon(0 100%, 0 55%, 30% 18%, 50% 45%, 72% 0, 100% 40%, 100% 100%); }
.fr2::after { width: 26px; height: 26px; border-radius: 50%; background: var(--orange); right: 26px; top: 26px; }
.fr3 { left: 250px; top: 70px; transform: rotate(18deg); background: linear-gradient(160deg, #ffe08f, #f2b13c); animation-delay: -4s; }
.fr3::before { inset: 34px 30px 60px; border-radius: 12px; background: rgba(255, 255, 255, .55); }
.fr3::after { left: 30px; right: 30px; bottom: 30px; height: 10px; border-radius: 5px; background: rgba(31, 26, 22, .7); }
.blob { position: absolute; left: 90px; top: 30px; width: 300px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #ffb26e, #ec6f2d 55%, rgba(236, 111, 45, 0) 72%); filter: blur(28px); opacity: .7; z-index: -1; }
@keyframes bob { 50% { translate: 0 -10px; } }

/* ---------- 登录 ---------- */
.login {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  background:
    radial-gradient(1100px 680px at 80% -12%, #f7c48f 0%, rgba(247, 196, 143, 0) 62%),
    radial-gradient(900px 640px at -8% 108%, #f2d1aa 0%, rgba(242, 209, 170, 0) 60%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 440px);
  align-items: center;
  gap: 48px;
  min-height: 100vh;
  padding: 48px clamp(24px, 6vw, 96px);
}
.login-hero { position: relative; }
.login-hero .display { font-size: clamp(64px, 9vw, 140px); }
.login-tag { margin: 24px 0 0; font-size: 16px; color: var(--ink-2); }
.art-login { right: 0; top: 40px; width: 420px; height: 300px; }
.login-card { display: grid; gap: 16px; padding: 32px; border-radius: 28px; animation: rise .5s var(--ease) both; }
.login-card h2 { margin: 0; font: 700 26px/1.2 var(--display); letter-spacing: -.02em; }
.login-card .btn-lg { margin-top: 4px; }
.login-foot { text-align: center; }

/* ---------- 应用骨架 ---------- */
.shell { min-height: 100vh; padding: 0 28px 24px 108px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 76px;
  margin: 0 -28px 0 -108px;
  padding: 0 28px 0 32px;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(243, 234, 221, .82), rgba(243, 234, 221, .55));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.topbar .logo { margin-right: 14px; }
.search { position: relative; display: flex; align-items: center; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-line); gap: 8px; color: var(--muted); }
.search input { width: 240px; height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none !important; }
.opts-chip { font-size: 12px; color: var(--muted); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.me-btn { padding: 0; border: 0; border-radius: 50%; background: none; line-height: 0; }
.me-btn .avatar { --size: 42px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
.menu-wrap { position: relative; }
.menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(236, 111, 45, .8);
  transition: background .15s, transform .15s var(--ease);
}
.menu-pill:hover { background: var(--orange-hi); transform: translateY(-1px); }
.menu {
  position: absolute;
  top: 52px;
  right: 0;
  width: 260px;
  padding: 8px;
  border-radius: 20px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  animation: pop .18s var(--ease);
}
.menu-user { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-user b { display: block; font-size: 14.5px; }
.menu-user span { font-size: 12px; color: var(--muted); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: none; text-align: left; text-decoration: none; color: var(--ink-2); }
.menu-item:hover { background: rgba(255, 255, 255, .9); color: var(--ink); }
.menu-item.danger:hover { color: var(--danger); background: var(--danger-soft); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }

.rail {
  position: fixed;
  left: 24px;
  top: 50%;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 26px;
  transform: translateY(-50%);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.rail a, .rail button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.rail a:hover, .rail button:hover { background: rgba(255, 255, 255, .75); color: var(--ink); }
.rail a.active { background: var(--white); color: var(--orange); box-shadow: var(--shadow-sm); }
.rail-gap { height: 40px; }

.main { position: relative; }
.view { animation: rise .4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 工作台 ---------- */
/* 一屏铺满：第三行（趋势 + 文件夹）吃掉剩余高度，大屏 / 缩放时不会留大片空白 */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) clamp(340px, 24vw, 460px);
  grid-template-areas:
    "hero hero side"
    "stats stats side"
    "trend overview side";
  grid-template-rows: auto auto minmax(220px, 1fr);
  gap: 18px;
  /* 100vh 减去顶栏 76px 和页面底部留白 24px，正好一屏 */
  min-height: calc(100vh - 100px);
}
@media (max-height: 820px) and (min-width: 1281px) {
  .hero-sub { display: none; }
  .hero .display { font-size: clamp(48px, min(5vw, 8.4vh), 128px); }
}
.hero { grid-area: hero; position: relative; display: flex; align-items: flex-end; min-height: clamp(200px, 26vh, 360px); padding: 8px 0 2px 8px; }
.hero-text { position: relative; z-index: 2; }
.hero .display { font-size: clamp(52px, min(5.2vw, 9vh), 128px); }
.hero-sub { max-width: 520px; margin: 16px 0 0; font-size: clamp(14px, .9vw, 17px); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero .art { right: 4%; top: 50%; width: 420px; height: 300px; transform: translateY(-55%) scale(var(--art-scale, 1)); transform-origin: right center; }
.stats-card { grid-area: stats; display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: end; gap: 22px; padding: 18px 22px; border-radius: var(--r-lg); position: relative; z-index: 3; }
.seg-wrap { min-width: 0; }
.seg-mode { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.seg-mode:empty { display: none; }
/* contain:size 让右栏不撑高左边的行，只按左边的高度铺满，内容多了在卡片内滚动 */
.dash-side { grid-area: side; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 18px; position: relative; z-index: 3; min-height: 0; contain: size; }
.recent-card { display: flex; flex-direction: column; min-height: 0; }
.recent-card .recent-table { flex: 1; min-height: 0; overflow: auto; }
/* 同样用 contain:size，第三行只占满剩余高度，不被内容撑高 */
.trend-card { grid-area: trend; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 3; contain: size; }
.overview-card { grid-area: overview; display: flex; flex-direction: column; min-height: 0; position: relative !important; top: 0 !important; z-index: 3; contain: size; }

/* 上传趋势柱状图 */
.trend { flex: 1; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; min-height: 120px; padding: 8px 4px 0; border-radius: 16px; background: repeating-linear-gradient(to top, rgba(90, 60, 30, .07) 0 1px, transparent 1px 25%); }
.tcol { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tval { height: 18px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tbar-wrap { flex: 1; display: flex; align-items: flex-end; justify-content: center; width: 100%; min-height: 40px; }
.tbar { display: block; width: min(100%, 26px); height: var(--h); border-radius: 8px 8px 6px 6px; background: var(--chip-ink); transition: height .6s var(--ease); }
.tcol.zero .tbar { background: rgba(255, 255, 255, .85); border: 1px solid var(--line); }
.tcol.today .tbar { background: linear-gradient(180deg, var(--orange-hi), var(--orange-deep)); box-shadow: 0 8px 18px -8px rgba(236, 111, 45, .8); }
.tcol:nth-child(odd):not(.today):not(.zero) .tbar { background: var(--mustard); }
.tday { margin-top: 8px; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.tweek { font-size: 10.5px; color: var(--faint); }
.tcol.today .tday { color: var(--orange-deep); font-weight: 700; }

/* 橙色文件夹概览（纵向列表，与设计稿的团队任务卡一致） */
.overview-list { flex: 1; display: grid; align-content: start; gap: 10px; min-height: 0; overflow: auto; margin: 0 -4px; padding: 0 4px 2px; }
.ov-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 16px; background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; transition: background .15s, transform .15s var(--ease); }
.ov-item:hover { background: rgba(255, 255, 255, .26); transform: translateX(3px); }
.ov-main { min-width: 0; }
.ov-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ov-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ov-item p { margin: 2px 0 0; font-size: 12px; color: rgba(255, 255, 255, .78); }
.ov-chips { display: flex; flex: none; gap: 6px; }
.ov-chips .pill-chip:not(.dark) { color: var(--ink); }
.ov-empty { margin: 4px 0; color: rgba(255, 255, 255, .85); }

/* ---------- 图库（独立页，宽度铺满） ---------- */
.lib { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; padding-top: 8px; }
.gallery-card { min-height: calc(100vh - 120px); }

.stat-main .label { display: block; color: var(--muted); font-size: 12.5px; }
.stat-main b { display: block; margin: 2px 0; font: 700 42px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-main b small { font-size: 18px; font-weight: 600; margin-left: 4px; letter-spacing: 0; }
.seg { display: flex; gap: 6px; min-width: 0; }
.seg-item { flex: var(--w) 1 0; min-width: 72px; }
.seg-item .seg-label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg-bar { display: flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 600; transition: flex .5s var(--ease); }
.seg-empty { color: var(--muted); font-size: 13px; padding-bottom: 6px; }

/* 最近上传 */
.recent-table { margin-bottom: 12px; }
.recent-row { display: grid; grid-template-columns: minmax(0, 1fr) 68px 46px 52px; align-items: center; gap: 8px; }
.recent-th { padding: 0 10px 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
#recentList .recent-row { margin-bottom: 6px; padding: 7px 10px; border-radius: 12px; background: rgba(255, 255, 255, .72); cursor: pointer; transition: background .15s, transform .15s var(--ease); }
#recentList .recent-row:hover { background: #fff; transform: translateX(2px); }
.recent-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; font-weight: 500; }
.recent-name img { width: 28px; height: 28px; flex: none; border-radius: 7px; object-fit: cover; background: #f1e7da; }
.recent-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-row .num { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent-empty { padding: 16px 10px; text-align: center; color: var(--muted); font-size: 13px; }

/* 压缩环 */
.ring { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 12; }
.ring-bar { fill: none; stroke: var(--orange); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 0 999; transition: stroke-dasharray 1s var(--ease); filter: drop-shadow(0 4px 10px rgba(236, 111, 45, .45)); }
.ring::before { content: ""; position: absolute; inset: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .9), rgba(255, 244, 232, .55)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font: 700 38px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring-center span { margin-top: 4px; font-size: 10.5px; letter-spacing: .18em; color: var(--muted); }
.ring-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.ring-foot .hint { text-align: center; }

/* 橙色文件夹卡 */
.folders-card {
  color: #fff;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, #f39150 0%, #ec6f2d 55%, #dc5b1f 100%);
  box-shadow: 0 30px 60px -30px rgba(220, 90, 30, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
  position: sticky;
  top: 92px;
}
.folders-card .panel-head p { color: rgba(255, 255, 255, .78); }
.folders-card .corner-btn { color: var(--orange); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.folders-card .tree { max-height: calc(100vh - 220px); overflow: auto; margin: 0 -4px; padding: 0 4px; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 6px;
  padding: 0 10px 0 calc(8px + var(--depth, 0) * 14px);
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.tree-row:hover { background: rgba(255, 255, 255, .24); }
.tree-row.active { background: var(--white); color: var(--ink); box-shadow: 0 10px 20px -12px rgba(80, 30, 0, .6); }
.tree-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tree-row .count { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 11px; font-weight: 700; }
.tree-row.active .count { background: var(--chip-ink); color: #fff; }
.twisty { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: inherit; opacity: .8; transition: transform .15s var(--ease); }
.twisty.open { transform: rotate(90deg); }
.twisty.leaf { visibility: hidden; }
.twisty .ico { width: 13px; height: 13px; }

/* 图库卡 */
.gallery-card { padding: 18px 20px 22px; }
.gallery-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.gallery-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; margin: 0 4px; color: var(--faint); }
.crumb { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 8px; border: 1.5px solid transparent; border-radius: 10px; background: none; color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.crumbs li:last-child .crumb { color: var(--ink); font: 700 19px/1.3 var(--display); letter-spacing: -.01em; cursor: default; }
.crumbs li:last-child .crumb:hover { background: none; }
.crumb-search { color: var(--orange) !important; }

.views { display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--glass-line); }
.views button { display: grid; place-items: center; width: 34px; height: 30px; border: 0; border-radius: 999px; background: none; color: var(--muted); }
.views button:hover { color: var(--ink); }
.views button[aria-checked="true"] { background: var(--chip-ink); color: #fff; }

.selbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 8px 10px 8px 16px; border-radius: 16px; background: var(--orange-soft); border: 1px solid rgba(236, 111, 45, .25); animation: rise .2s var(--ease); }
.sel-count { margin-right: 6px; color: var(--orange-deep); font-size: 13px; }
.sel-count b { font-size: 15px; }
.sel-spacer { flex: 1; }

.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.folder-grid:empty { display: none; }
.folder {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .68);
  cursor: pointer;
  user-select: none;
  transition: background .15s, transform .15s var(--ease), box-shadow .15s;
  animation: rise .35s var(--ease) both;
}
.folder:hover { background: #fff; box-shadow: var(--shadow-sm); }
.folder > .ico { width: 30px; height: 30px; color: var(--orange); stroke-width: 1.5; fill: var(--orange-soft); }
.folder-text { min-width: 0; flex: 1; }
.folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.folder-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-actions { position: absolute; top: 50%; right: 8px; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: #fff; box-shadow: -10px 0 12px #fff; opacity: 0; transform: translateY(-50%); transition: opacity .15s; }
.folder:hover .folder-actions, .folder:focus-within .folder-actions { opacity: 1; }

.drop-hover { border-color: var(--orange) !important; background: #fff6ee !important; box-shadow: 0 0 0 4px var(--orange-soft) !important; }
.folders-card .drop-hover { border-color: #fff !important; background: rgba(255, 255, 255, .34) !important; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35) !important; color: #fff; }
.folder.drop-hover { transform: scale(1.02); }
.dragging { opacity: .4; }

/* 图片卡片：同一份结构，靠视图 class 切换版式 */
.gallery { --cols: 180px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cols), 1fr)); gap: 14px; }
.gallery.view-large { --cols: 300px; gap: 18px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .8);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 6px rgba(120, 72, 28, .05);
  transition: box-shadow .2s, transform .2s var(--ease), border-color .15s;
  animation: rise .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 18ms);
}
.no-anim .card, .no-anim.folder-grid .folder { animation: none; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card.selected { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft), var(--shadow); }
.thumb {
  position: relative;
  aspect-ratio: 1;
  margin: 6px 6px 0;
  border-radius: 13px;
  background:
    linear-gradient(45deg, #efe5d9 25%, transparent 25%, transparent 75%, #efe5d9 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, #efe5d9 25%, transparent 25%, transparent 75%, #efe5d9 75%) 8px 8px / 16px 16px,
    #f7f1ea;
  overflow: hidden;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: transform .5s var(--ease), opacity .25s ease; }
.thumb img.ready { opacity: 1; }

/* 加载中的骨架卡片 */
.card.skeleton { pointer-events: none; animation: none; box-shadow: none; }
.card.skeleton .thumb, .sk-line { background: linear-gradient(100deg, rgba(255, 255, 255, .45) 30%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, .45) 70%) 0 0 / 300% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.sk-line { height: 10px; margin: 12px 12px 0; border-radius: 6px; }
.sk-line.short { width: 45%; margin-bottom: 14px; }
.view-list .card.skeleton { display: flex; align-items: center; height: 60px; }
.view-list .card.skeleton .thumb { width: 46px; height: 46px; margin: 0 12px; }
.view-list .card.skeleton .sk-line { flex: 1; margin: 0 12px 0 0; }
.view-list .card.skeleton .sk-line.short { flex: .3; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.card:hover .thumb img { transform: scale(1.04); }
.view-large .thumb { aspect-ratio: 4 / 3; }
.card .name { padding: 9px 12px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.card .meta { display: flex; align-items: center; gap: 8px; padding: 3px 12px 11px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .meta .saved { color: var(--ok); font-weight: 600; }
.card .meta .date { display: none; }
.card .meta .who { margin-left: auto; line-height: 0; }
.card .meta .who .avatar { --size: 18px; box-shadow: 0 0 0 1.5px #fff; }
.card .meta .who .avatar-text { font-size: 9px; }
.card .folder-tag { display: none; }

.check {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  background: rgba(31, 26, 22, .28);
  color: transparent;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.check .ico { width: 14px; height: 14px; stroke-width: 2.8; }
.card:hover .check, .selecting .check, .card.selected .check { opacity: 1; }
.card.selected .check { background: var(--orange); border-color: var(--orange); color: #fff; }
.card .actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 253, 250, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .15s, transform .15s var(--ease);
}
.card .actions .icon-btn { width: 28px; height: 28px; color: var(--ink-2); }
.card:hover .actions, .card:focus-within .actions { opacity: 1; transform: none; }

.gallery.view-masonry { display: block; columns: 210px; column-gap: 14px; }
.view-masonry .card { break-inside: avoid; margin-bottom: 14px; }
.view-masonry .thumb { aspect-ratio: auto; }
.view-masonry .thumb img { position: static; display: block; height: auto; }

.gallery.view-list { display: flex; flex-direction: column; gap: 6px; }
.view-list .card { display: grid; grid-template-columns: 26px 46px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 6px 12px; border-radius: 14px; animation-delay: calc(var(--i, 0) * 8ms); }
.view-list .card:hover { transform: none; box-shadow: var(--shadow-sm); }
.view-list .check { position: static; opacity: 1; width: 20px; height: 20px; border-color: var(--faint); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.view-list .check .ico { width: 12px; height: 12px; }
.view-list .thumb { width: 46px; height: 46px; margin: 0; border-radius: 10px; }
.view-list .card:hover .thumb img { transform: none; }
.view-list .name { padding: 0; font-size: 13.5px; }
.view-list .meta { display: grid; grid-template-columns: 92px 66px 56px 92px 24px; gap: 12px; padding: 0; font-size: 12px; text-align: right; }
.view-list .meta .date { display: block; }
.view-list .actions { position: static; opacity: 1; transform: none; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

.searching .card .folder-tag { display: block; padding: 0 12px 10px; margin-top: -8px; font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searching.view-list .card .folder-tag { display: none; }

.empty { display: grid; place-items: center; gap: 10px; padding: 80px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--line-2); border-radius: var(--r); }
.empty .ico { width: 46px; height: 46px; stroke-width: 1.3; color: var(--orange); }
.empty strong { color: var(--ink); font: 700 17px var(--display); }
.empty kbd { padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font-size: 11px; color: var(--ink-2); }
.more { display: flex; margin: 22px auto 0; }

.dropzone {
  position: fixed;
  inset: 14px;
  z-index: 60;
  display: grid;
  place-items: center;
  border: 2.5px dashed var(--orange);
  border-radius: 32px;
  background: rgba(243, 234, 221, .82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.dropzone.show { opacity: 1; }
.dropzone-inner { display: grid; place-items: center; gap: 8px; color: var(--orange); text-align: center; }
.dropzone-inner strong { font: 800 30px var(--display); letter-spacing: -.02em; color: var(--ink); }
.dropzone-inner span { color: var(--muted); }

/* ---------- 用户 / 角色页 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 18px 0 22px; }
.page-head .display { font-size: clamp(48px, 5.4vw, 84px); }
.page-head p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.page-actions { display: flex; gap: 10px; }

.utable { padding: 10px; border-radius: var(--r-lg); }
.urow { display: grid; grid-template-columns: minmax(220px, 1.6fr) 120px 92px 80px 120px 96px; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px; }
.urow + .urow { margin-top: 6px; }
.urow.uhead { padding-top: 6px; padding-bottom: 6px; font-size: 12px; color: var(--muted); }
.urow:not(.uhead) { background: rgba(255, 255, 255, .72); transition: background .15s; }
.urow:not(.uhead):hover { background: #fff; }
.uname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.uname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uname small { color: var(--muted); font-size: 12px; }
.you { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--orange-soft); color: var(--orange-deep); font-size: 11px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 154, 91, .15); }
.status.off { color: var(--muted); }
.status.off::before { background: var(--faint); box-shadow: none; }
.urow .num { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.uactions { display: flex; justify-content: flex-end; gap: 2px; }

/* 角色权限：左侧列表 + 右侧详情，下方对照表 */
.roles-layout { display: grid; grid-template-columns: clamp(260px, 22vw, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.role-list { display: grid; gap: 8px; padding: 12px; position: sticky; top: 92px; }
.role-list-title { margin: 4px 6px 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.role-item { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 16px; background: rgba(255, 255, 255, .62); text-align: left; transition: background .15s, transform .15s var(--ease), box-shadow .15s; }
.role-item:hover { background: #fff; transform: translateX(2px); }
.role-item.active { color: #fff; background: linear-gradient(165deg, #f39150, #ec6f2d 55%, #dc5b1f); box-shadow: 0 18px 36px -18px rgba(220, 90, 30, .8); }
.role-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-item b { font: 700 16px/1.3 var(--display); }
.role-item p { margin: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-item.active p { color: rgba(255, 255, 255, .82); }
.role-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.role-meter { height: 4px; margin-top: 6px; border-radius: 4px; background: rgba(90, 60, 30, .12); overflow: hidden; }
.role-meter i { display: block; height: 100%; border-radius: 4px; background: var(--orange); }
.role-item.active .role-meter { background: rgba(255, 255, 255, .3); }
.role-item.active .role-meter i { background: #fff; }

.role-detail { display: grid; gap: 18px; padding: 24px; transition: box-shadow .2s; }
.role-detail.dirty { box-shadow: 0 0 0 3px var(--orange-soft), var(--shadow); }
.rd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rd-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 clamp(26px, 2vw, 34px)/1.2 var(--display); letter-spacing: -.02em; }
.rd-head .hint { margin-top: 4px; font-size: 13.5px; }
.rd-actions { display: flex; gap: 6px; flex: none; }
.rd-group h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.rd-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.rd-group h4 { grid-column: 1 / -1; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1.5px solid rgba(255, 255, 255, .9); border-radius: 16px; background: rgba(255, 255, 255, .6); cursor: pointer; transition: background .15s, border-color .15s; }
.perm-row:hover { background: #fff; }
.perm-row.on { background: #fff; }
.perm-row.changed { border-color: var(--orange); background: #fff6ee; }
.perm-row.locked { cursor: default; }
.perm-text { min-width: 0; }
.perm-text b { display: block; font-size: 14px; }
.perm-text small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.rd-members { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.rd-member { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .75); font-size: 13px; text-decoration: none; }
.rd-member:hover { background: #fff; }
.rd-group > .hint { grid-column: 1 / -1; }
.rd-savebar { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--chip-ink); color: #fff; font-size: 13px; box-shadow: var(--shadow); animation: rise .2s var(--ease); }
.rd-savebar span { display: flex; align-items: center; gap: 8px; flex: 1; }
.rd-savebar .btn-ghost { color: #fff; }
.rd-savebar .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.matrix-card { grid-column: 1 / -1; }
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th, .matrix td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; min-width: 220px; }
.matrix th { font-weight: 600; color: var(--muted); }
.matrix th button { padding: 4px 10px; border: 0; border-radius: 8px; background: none; font-weight: 700; color: var(--ink-2); }
.matrix th button:hover { background: rgba(255, 255, 255, .8); }
.matrix th.sel button { background: var(--orange); color: #fff; }
.matrix td small { display: block; color: var(--muted); font-size: 11.5px; }
.matrix td.sel { background: rgba(236, 111, 45, .06); }
.matrix td.yes .ico { color: var(--orange); stroke-width: 2.6; }
.matrix td.no span { color: var(--faint); }
.matrix .mx-group td { padding-top: 16px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-align: left; border-bottom: 0; }
.matrix tbody tr:not(.mx-group):hover td { background: rgba(255, 255, 255, .55); }
.perm-group h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.perm-list { display: grid; gap: 9px; }

/* 个人设置 */
.profile-top { display: flex; align-items: center; gap: 18px; }
.avatar-edit { position: relative; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; line-height: 0; }
.avatar-edit .avatar { --size: 84px; box-shadow: 0 0 0 4px #fff, var(--shadow-sm); }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; box-shadow: 0 0 0 3px #fff; }
.profile-top b { display: block; font: 700 20px var(--display); }
.profile-top .hint { margin-top: 2px; }
.profile-actions { display: flex; gap: 6px; margin-top: 8px; }
.section-title { margin: 6px 0 -4px; padding-top: 14px; border-top: 1px solid var(--line); font: 700 14px var(--display); }
.pw-gen { display: flex; gap: 8px; }
.pw-gen input { flex: 1; min-width: 0; }

/* ---------- 上传队列 ---------- */
.tray {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 390px;
  max-width: calc(100vw - 32px);
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise .25s var(--ease);
}
.tray-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 18px; font: 700 15px var(--display); }
.tray-actions { display: flex; align-items: center; gap: 4px; }
.tray-progress { height: 3px; margin: 0 18px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tray-progress i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .3s var(--ease); }
.tray-list { max-height: 300px; overflow: auto; margin: 0; padding: 8px; list-style: none; }
.tray.collapsed .tray-list, .tray.collapsed .tray-progress { display: none; }
.tray.collapsed #trayToggle .ico { transform: rotate(-90deg); }
#trayToggle .ico { transform: rotate(90deg); transition: transform .15s; }
.tray-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.tray-item:hover { background: rgba(255, 255, 255, .8); }
.tray-item img { width: 38px; height: 38px; object-fit: cover; border-radius: 9px; background: #f1e7da; }
.tray-item .t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.tray-item .t-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.tray-item.ok .t-status { color: var(--ok); }
.tray-item.err .t-status { color: var(--danger); }
.tray-item.paused .t-status { color: var(--orange-deep); }
.tray-item.pending .t-status::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 6px; border: 1.5px solid var(--orange); border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 对话框 ---------- */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(70, 45, 20, .28); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  box-shadow: var(--shadow);
  overflow: auto;
}
.dialog-wide { width: min(560px, calc(100vw - 32px)); }
.dialog[open] { animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-body { display: grid; gap: 16px; padding: 26px; }
.dialog h2 { margin: 0; font: 700 21px/1.3 var(--display); letter-spacing: -.01em; }
.dialog p { margin: 0; color: var(--ink-2); }
.danger-mark { display: flex; align-items: center; gap: 12px; }
.danger-mark .badge { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--danger-soft); color: var(--danger); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.preview-strip { display: flex; gap: 6px; }
.preview-strip img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; background: #f1e7da; }
.preview-strip .more-n { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; border: 1.5px dashed var(--line-2); font-size: 12px; color: var(--muted); }
.picker { max-height: 320px; overflow: auto; margin: 0 -6px; padding: 8px; list-style: none; border-radius: 18px; background: linear-gradient(165deg, #f39150, #ec6f2d 60%, #dc5b1f); color: #fff; }
.picker .tree-row { min-height: 38px; }
.picker .tree-row.disabled { opacity: .4; pointer-events: none; }
.picker .tree-row.picked { background: var(--white); color: var(--ink); }

/* ---------- 大图预览 ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(28, 22, 17, .94); }
.lightbox[open] { display: grid; grid-template-columns: minmax(0, 1fr) 350px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox::backdrop { background: #1c1611; }
.lb-stage { position: relative; display: grid; place-items: center; min-width: 0; padding: 40px 74px; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lb-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; transition: background .15s; }
.lb-nav:hover:not(:disabled) { background: var(--orange); }
.lb-nav:disabled { opacity: .25; cursor: default; }
.lb-prev { left: 16px; }
.lb-prev .ico { transform: rotate(180deg); }
.lb-next { right: 16px; }
.lb-index { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; color: rgba(255, 255, 255, .55); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.lb-info { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 28px 24px; background: linear-gradient(160deg, var(--bg-a), var(--bg-b)); overflow: auto; }
.lb-close { position: absolute; top: 16px; right: 16px; }
.lb-info h2 { margin: 0; padding-right: 36px; font: 700 18px/1.35 var(--display); word-break: break-all; }
.lb-uploader { display: flex; align-items: center; gap: 8px; margin-top: -8px; font-size: 13px; color: var(--ink-2); }
.lb-uploader:empty { display: none; }
.lb-uploader .avatar { --size: 22px; }
.lb-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .7); font-size: 13px; }
.lb-meta dt { color: var(--muted); }
.lb-meta dd { margin: 0; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lb-meta dd.saved { color: var(--ok); font-weight: 600; }
.copy-field { display: flex; gap: 6px; }
.copy-field input { flex: 1; min-width: 0; height: 34px; font-size: 12px; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-danger { padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- 杂项 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--chip-ink);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.drag-ghost { position: fixed; top: -100px; left: -100px; padding: 7px 14px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 600; }

/* ---------- 通知 ---------- */
.pop-wrap { position: relative; }
.bell { position: relative; }
.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--white);
}
.notify-panel { width: 360px; padding: 0; overflow: hidden; }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 10px 18px; }
.np-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 17px var(--display); }
.np-tools { display: flex; }
.np-list { max-height: 380px; overflow: auto; padding: 0 8px 8px; }
.np-item { position: relative; display: flex; gap: 10px; padding: 10px 34px 10px 10px; border-radius: 14px; }
.np-item + .np-item { margin-top: 4px; }
.np-item:hover { background: rgba(255, 255, 255, .8); }
.np-item.unread { background: var(--orange-soft); }
.np-item small { display: block; margin-top: 2px; color: var(--faint); font-size: 11.5px; }
.np-del { position: absolute; top: 8px; right: 6px; width: 26px; height: 26px; opacity: 0; }
.np-item:hover .np-del { opacity: 1; }
.np-empty { display: grid; place-items: center; gap: 8px; padding: 34px 0; color: var(--muted); font-size: 13px; }
.np-empty .ico { width: 30px; height: 30px; color: var(--faint); }
.np-prefs { display: grid; gap: 10px; padding: 14px 18px 16px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .45); }
.np-prefs h4 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }

.notices { position: fixed; top: 84px; right: 22px; z-index: 150; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 28px); pointer-events: none; }
.notice {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 14px 40px 16px 14px;
  border-radius: 18px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  overflow: hidden;
  pointer-events: auto;
  animation: notice-in .3s var(--ease) both;
}
.notice.leaving { animation: notice-out .25s ease forwards; }
@keyframes notice-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes notice-out { to { opacity: 0; transform: translateX(30px); } }
.notice-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; }
.notice-success .notice-ico { background: rgba(61, 154, 91, .14); color: var(--ok); }
.notice-error .notice-ico { background: var(--danger-soft); color: var(--danger); }
.notice-info .notice-ico { background: var(--orange-soft); color: var(--orange-deep); }
.notice-body { min-width: 0; flex: 1; }
.notice-body b { display: block; font-size: 14px; line-height: 1.4; }
.notice-body p { margin: 2px 0 0; color: var(--ink-2); font-size: 12.5px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.notice-close { position: absolute; top: 10px; right: 8px; width: 26px; height: 26px; }
.notice-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--orange); transform-origin: left; animation: notice-timer linear forwards; }
.notice:hover .notice-timer { animation-play-state: paused; }
@keyframes notice-timer { to { transform: scaleX(0); } }

/* ---------- 上传弹窗 ---------- */
.up-drop {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 26px 16px;
  border: 2px dashed var(--line-2);
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.up-drop .ico { width: 30px; height: 30px; color: var(--orange); }
.up-drop:hover, .up-drop.over { border-color: var(--orange); background: #fff6ee; }
.up-files:empty { display: none; }
.up-summary { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.up-thumbs { display: flex; flex-wrap: wrap; gap: 10px; max-height: 164px; overflow: auto; padding: 8px 8px 2px 2px; }
.up-thumb { position: relative; width: 64px; height: 64px; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 2px solid #fff; background: #f1e7da; box-shadow: var(--shadow-sm); }
.up-remove { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--chip-ink); color: #fff; opacity: 0; transition: opacity .15s; }
.up-remove .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.up-thumb:hover .up-remove, .up-remove:focus-visible { opacity: 1; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mode { position: relative; display: grid; gap: 2px; padding: 12px; border: 1.5px solid var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, .7); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode b { font-size: 14px; color: var(--ink); }
.mode small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.mode:hover { border-color: var(--faint); }
.mode:has(input:checked) { border-color: var(--orange); background: #fff6ee; box-shadow: 0 0 0 3px var(--orange-soft); }
.mode:has(input:checked) b { color: var(--orange-deep); }
.mode:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- 回收站 ---------- */
.trash-tip { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; border-radius: 16px; font-size: 13px; color: var(--ink-2); }
.trash-tip .ico { color: var(--orange); }
.trash-grid { --cols: 200px; }
.trash-card { cursor: default; }
.trash-card .thumb { cursor: pointer; }
.trash-card .thumb img { filter: saturate(.75); }
.trash-meta { padding: 4px 12px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.trash-left { margin: 6px 12px 0; font-size: 11.5px; font-weight: 600; color: var(--orange-deep); }
.trash-left.soon { color: var(--danger); }
.trash-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px 12px; }

/* ---------- 响应式 ---------- */
/* 大屏 / 浏览器缩小显示时：装饰画、卡片同步放大，保持比例 */
@media (min-width: 1700px) { :root { --art-scale: 1.2; } }
@media (min-width: 2100px) { :root { --art-scale: 1.45; } .gallery { --cols: 210px; } }
@media (min-width: 2600px) { :root { --art-scale: 1.75; } .gallery { --cols: 240px; } }
@media (max-width: 1440px) { :root { --art-scale: .85; } }

@media (max-width: 1280px) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "hero hero" "stats stats" "trend overview" "side side"; grid-template-rows: none; min-height: 0; }
  .dash-side { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: none; contain: none; }
  .trend-card, .overview-card { min-height: 320px; contain: none; }
  .recent-card .recent-table { flex: none; }
}
@media (max-width: 860px) {
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "stats" "trend" "overview" "side"; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .trend { gap: 3px; }
  .tweek { display: none; }
}
@media (max-width: 980px) {
  .search input { width: 150px; }
  .roles-layout { grid-template-columns: minmax(0, 1fr); }
  .role-list { position: static; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .role-list-title { grid-column: 1 / -1; }
  .lib { grid-template-columns: minmax(0, 1fr); }
  .folders-card { position: static; }
  .folders-card .tree { max-height: 240px; }
  .stats-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .urow { grid-template-columns: minmax(180px, 1fr) 110px 80px 96px; }
  .urow > :nth-child(4), .urow > :nth-child(5) { display: none; }
  .login { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .art-login { display: none; }
}
@media (max-width: 720px) {
  .shell { padding: 0 14px 96px; }
  .topbar { height: 64px; margin: 0 -14px; padding: 0 14px; gap: 8px; }
  .topbar .logo { margin-right: 0; }
  .topbar .logo img { height: 28px; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; }
  #uploadBtn { display: none; }
  .menu-pill { font-size: 0; gap: 0; padding: 0 12px; }
  .menu-pill .ico { width: 18px; height: 18px; }
  .rail { top: auto; bottom: 14px; left: 50%; flex-direction: row; transform: translateX(-50%); border-radius: 24px; }
  .rail-gap { width: 16px; height: auto; }
  .hero { min-height: 0; padding-top: 14px; }
  .hero-sub { font-size: 13.5px; padding-right: 30%; }
  .hero .display { font-size: 52px; }
  .hero .art { transform: scale(.5); transform-origin: right top; right: -14px; top: 0; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .seg { flex-wrap: wrap; }
  .gallery-card { padding: 14px; }
  .gallery { --cols: 140px; gap: 10px; }
  .gallery.view-large { --cols: 100%; }
  .gallery.view-masonry { columns: 2; column-gap: 10px; }
  .view-masonry .card { margin-bottom: 10px; }
  .card .actions, .folder-actions, .check { opacity: 1; transform: none; }
  .view-list .card { grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 10px; }
  .view-list .meta { display: none; }
  .urow { grid-template-columns: minmax(0, 1fr) auto; }
  .urow > :nth-child(2), .urow > :nth-child(3) { display: none; }
  .urow.uhead { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-head { flex-direction: column; }
  .role-detail { padding: 16px; }
  .rd-savebar { flex-wrap: wrap; }
  .notices { top: 72px; right: 14px; }
  .notify-panel { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; }
  .lightbox[open] { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb-stage { padding: 16px 54px; }
  .lb-stage img { max-height: 55vh; }
  .lb-info { max-height: 45vh; }
  .tray { right: 12px; bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
