/* ============================================================
   定盘星服务器 · 控制台样式
   深色外壳 + 瓷白工作区；深浅两套主题共用同一组 token
   ============================================================ */

/**
 * 一套偏冷的石墨灰 + 一个仪器青。
 * 表面永远是灰的，颜色只出现在「信号」上：选中、主操作、今天那根柱子、那颗活着的绿灯。
 */
:root {
  color-scheme: light;

  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #f7f8f9;
  --panel-3: #eef0f2;
  --line: #e4e6ea;
  --line-2: #d4d8dd;

  --ink: #12151a;
  --ink-2: #444d59;
  --muted: #6e7783;

  --accent: #146c72;
  --accent-2: #0f565b;
  --accent-ink: #0d5b61;
  --accent-soft: #e7f1f2;

  --ok: #167d55;
  --ok-soft: #e7f4ee;
  --warn: #96671a;
  --warn-soft: #fbf2e1;
  --danger: #b93c34;
  --danger-soft: #fbecea;

  --row-hover: #f8f9fa;
  --row-sel: #eff6f6;
  --chart-grid: #ebedf0;
  --chart-zero: #e5e8ec;
  --chart-bar: #c9ced5;

  --sidebar: #0c0e11;
  --on-dark: #6fc3c9;
  --on-dark-ok: #45bf8b;
  --sidebar-2: #0c0e11;
  --sidebar-ink: #c2c8d1;
  --sidebar-ink-dim: #79828e;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --shadow-sm: 0 1px 2px rgba(13, 16, 23, .05);
  --shadow-md: 0 1px 2px rgba(13, 16, 23, .04), 0 16px 40px -28px rgba(13, 16, 23, .35);
  --shadow-lg: 0 32px 64px -40px rgba(13, 16, 23, .32);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a0c0f;
  --panel: #101317;
  --panel-2: #151a1f;
  --panel-3: #1b2127;
  --line: #222830;
  --line-2: #2e363f;

  --ink: #eceef1;
  --ink-2: #aeb6c0;
  --muted: #7c8693;

  --accent: #58b3ba;
  --accent-2: #74c6cc;
  --accent-ink: #8fd3d8;
  --accent-soft: #10282a;

  --ok: #45bf8b;
  --ok-soft: #0f241d;
  --warn: #d3a04a;
  --warn-soft: #241c10;
  --danger: #ef7468;
  --danger-soft: #2a1614;

  --row-hover: #14181d;
  --row-sel: #162327;
  --chart-grid: #1d232a;
  --chart-zero: #222931;
  --chart-bar: #2f3741;

  --sidebar: #07090b;
  --sidebar-2: #07090b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 1px 1px rgba(0, 0, 0, .4), 0 20px 44px -30px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .95);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .2s ease, color .2s ease;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, dt, ul, li, figure { margin: 0; }
ul { padding: 0; list-style: none; }
code, pre, .mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
}
.eyebrow.light { color: rgba(255, 255, 255, .45); }

/* ---------------- 启动 ---------------- */
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.boot-ring {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg);
}

.login-shell {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* 左侧是机柜面板：纯色近黑，靠一道 hairline 与右侧白面分开，没有任何渐变与网格 */
.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 36px 28px;
  color: #fff;
  background: #0c0e11;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.login-title { font-size: 24px; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; margin-top: 16px; }
.login-lede { margin-top: 12px; font-size: 13px; line-height: 1.75; color: rgba(255, 255, 255, .58); max-width: 30ch; }

.login-facts { display: flex; flex-direction: column; gap: 12px; }
.login-facts li {
  display: flex;
  gap: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .6);
}
.login-facts li span {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, .32);
  padding-top: 2px;
  flex: none;
}
.login-foot { font-size: 11px; letter-spacing: .01em; color: rgba(255, 255, 255, .3); }

.login-panel { padding: 40px 36px 32px; display: flex; flex-direction: column; }
.login-panel-head { margin-bottom: 24px; }
.login-panel-head h2 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; margin-top: 6px; }

/* 标志：一块透明底 + 一道 hairline，字形本身是唯一有颜色的部分，没有渐变球 */
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--on-dark);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .09);
}
.brand-mark.lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--on-dark);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .1);
}

.field { display: block; margin-bottom: 15px; }
.field > span {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.field input, .date, .select, .search input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder, .search input::placeholder { color: var(--muted); }
.field input:focus, .date:focus, .select:focus, .search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.login-err { color: var(--danger); font-size: 12.2px; margin: -4px 0 12px; }
.login-hint { margin-top: 16px; font-size: 11.4px; line-height: 1.7; color: var(--muted); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12.8px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--panel-2); border-color: var(--muted); color: var(--ink); }
.btn:active { transform: translateY(1px); }

/* 主操作：一块实心近黑，不用渐变撑体积 */
.btn.primary {
  background: #16191e;
  border-color: #16191e;
  color: #fff;
}
.btn.primary:hover { background: #232830; border-color: #232830; color: #fff; }
html[data-theme="dark"] .btn.primary {
  background: #eef0f3;
  border-color: #eef0f3;
  color: #0b0e11;
}
html[data-theme="dark"] .btn.primary:hover { background: #fff; border-color: #fff; color: #0b0e11; }

.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); background: var(--panel); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
/* 确认框里的主操作：实心红，一眼看出是「真的要删」 */
.btn.danger.solid { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger.solid:hover { background: color-mix(in srgb, var(--danger) 88%, #000); border-color: transparent; color: #fff; }
html[data-theme="dark"] .btn.danger.solid { color: #191012; }
html[data-theme="dark"] .btn.danger.solid:hover { background: color-mix(in srgb, var(--danger) 88%, #fff); color: #191012; }

.btn.sm { height: 29px; padding: 0 10px; font-size: 12.2px; border-radius: 8px; }
.btn.block { width: 100%; height: 40px; font-size: 13.2px; border-radius: 10px; margin-top: 4px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--panel); border-color: var(--line-2); color: var(--ink-2); }

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--panel); color: var(--ink); border-color: var(--line); }

.theme-btn { background: var(--panel); border-color: var(--line); }
.theme-btn .ico-moon { display: none; }
html[data-theme="dark"] .theme-btn .ico-sun { display: none; }
html[data-theme="dark"] .theme-btn .ico-moon { display: block; }

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 12.4px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s;
}
.link-btn:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { color: color-mix(in srgb, var(--danger) 82%, #000); }

/* ---------------- 外壳 ---------------- */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  border-right: 1px solid rgba(255, 255, 255, .05);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text strong { font-size: 13px; font-weight: 500; letter-spacing: 0; color: #fff; }
.brand-text span {
  font-size: 10px;
  font-weight: 400;
  color: var(--sidebar-ink-dim);
  letter-spacing: .01em;
  margin-top: 2px;
}

.nav { position: relative; display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-height: 0; }

/**
 * 垃圾桶沉到菜单最底部。
 * nav 撑满品牌与底部信息之间的空间，这一项的 auto 上外边距吃掉全部剩余高度，
 * 于是它永远贴着侧栏底部，上面的菜单顺序、尺寸、间距都不动。
 */
.nav-item.nav-item-bottom { margin-top: auto; }

/**
 * 跟着当前项滑动的高亮块。
 * 全站只有这一块：切页时它滑过去，而不是每一项各自亮起灭掉。
 */
.nav-pill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  z-index: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition:
    transform .28s var(--ease),
    height .24s var(--ease),
    opacity .16s var(--ease);
}
/* 左边那道竖条挂在这个块上，滑动时是同一块在动。纯色，不发光 */
.nav-pill::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--on-dark);
}
.nav-pill.no-anim { transition: none; }

.nav-label {
  position: relative;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .3);
  padding: 20px 10px 6px;
}

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-ink);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: .55;
  transition: opacity .16s var(--ease), color .16s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.nav-item:hover svg { opacity: .85; }
.nav-item:active { background: rgba(255, 255, 255, .07); }
.nav-item:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 2px;
}
.nav-item.is-active { color: #fff; }
.nav-item.is-active svg { opacity: 1; color: var(--on-dark); }

/* 垃圾桶条数：等宽数字，安静地待在右边 */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .07);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-item.is-active .nav-badge { color: #fff; background: rgba(255, 255, 255, .12); }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: #dfe4ea;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .05);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-meta strong { font-size: 12px; font-weight: 500; color: #fff; }
.user-meta span { font-size: 10px; color: var(--sidebar-ink-dim); }

.live { display: flex; align-items: center; gap: 7px; font-size: 11.2px; color: var(--sidebar-ink-dim); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #3a4152; flex: none; transition: background .3s ease; }
/* 平时就是一颗安静的绿灯；90 秒内有新上传才呼吸，代表「刚有数据进来」 */
.dot.on { background: var(--on-dark-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--on-dark-ok) 22%, transparent); }
.dot.on.fresh { animation: livePulse 2.4s ease-out infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent), 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
  62% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 0%, transparent), 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 0%, transparent), 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
}

.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.build { font-family: var(--mono); font-size: 9.5px; color: rgba(255, 255, 255, .26); letter-spacing: .02em; }
.sidebar-foot .link-btn { color: rgba(255, 255, 255, .5); font-size: 11.5px; }
.sidebar-foot .link-btn:hover { color: #fff; }

/* ---------------- 主区 ---------------- */
.main { min-width: 0; padding: 0 32px 56px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -32px;
  padding: 24px 32px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.topbar-title { min-width: 0; }
.topbar h1 { font-size: 24px; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; margin-top: 4px; }
.page-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.seg { display: inline-flex; padding: 3px; background: var(--panel-3); border-radius: 10px; }
.seg-item {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.2px;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.seg-item:hover { color: var(--ink); }
.seg-item.is-active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }

.view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1240px;
  margin-top: 24px;
  /* 只用位移做进场：不碰 opacity，动画被暂停时内容也不会隐形 */
  animation: rise .28s var(--ease);
}
@keyframes rise { from { transform: translateY(6px); } to { transform: none; } }

/* ---------------- 统计卡 ---------------- */
/* 三张等宽 + 一张更宽的金额卡：金额是这一屏最大的数字，靠字号而不是底色撑出来 */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 1.3fr; gap: 16px; }

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.stat-label { font-size: 12px; font-weight: 400; color: var(--muted); }
.stat-value {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.01em;
  margin-top: 12px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-value.sm { font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.5; margin-top: 16px; }
.stat-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 金额用等宽字排，像台账里对齐的一列数 */
.stat.wide .stat-value {
  font-family: var(--mono);
  font-size: 32px;
  letter-spacing: -.02em;
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card.flush { padding: 0; overflow: hidden; }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--ink); }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.card-head .link-btn { flex: none; padding-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }

/* 计数与状态都用文字，不再包一层彩色胶囊 */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tag.ok { border-color: color-mix(in srgb, var(--ok) 32%, var(--line)); color: var(--ok); }
.tag.warn { border-color: color-mix(in srgb, var(--warn) 32%, var(--line)); color: var(--warn); }

/* ---------------- 图表 ---------------- */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------------- 排行 ---------------- */
/* 名字 + 数字一行，下面一条 3px 的细条表示占比：只有第一名用信号色，其余是中性灰 */
.rank { display: flex; flex-direction: column; gap: 4px; }
.rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 6px 0;
}
.rank-name { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-track {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
}
.rank-track > i { display: block; height: 100%; border-radius: 2px; background: var(--line-2); }
.rank-row:first-child .rank-track > i { background: var(--accent); }

.empty { padding: 30px 6px; text-align: center; color: var(--muted); font-size: 12.4px; }
.empty .link-btn { margin-left: 4px; }

/* ---------------- 筛选区 ---------------- */
.filter-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.search { position: relative; flex: 1 1 250px; min-width: 190px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 32px; height: 36px; }

.date { width: 138px; height: 36px; color: var(--ink-2); }
.select { width: 120px; height: 36px; color: var(--ink-2); cursor: pointer; }
.select.wide { width: 138px; }

.amount-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel);
}
.range-label { font-size: 11.5px; color: var(--muted); }
.amount-input {
  width: 58px;
  height: 26px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  text-align: right;
  font-size: 12.6px;
  font-variant-numeric: tabular-nums;
}
.amount-input::placeholder { color: var(--muted); opacity: .75; }
.amount-input::-webkit-outer-spin-button, .amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-range .dash { color: var(--muted); font-size: 11.5px; }

.toolbar-hint { margin: 0 2px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------------- 批量操作条 ---------------- */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.bulk-bar .bar-sep { width: 1px; height: 15px; background: var(--line-2); }
/* 一行里四五个青链接太吵：默认用正文色，悬停才上色 */
.bulk-bar .link-btn { color: var(--ink-2); }
.bulk-bar .link-btn:hover { color: var(--accent-ink); }
.bulk-bar .link-btn.subtle { color: var(--muted); }
.bulk-bar .link-btn.subtle:hover { color: var(--ink-2); }
.bulk-bar .sel-count {
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}
.bulk-bar .sel-count.has { color: var(--accent-ink); }

/* 批量改版本：选中后才出现，避免空占位 */
/* 右侧整组：窗口窄时整体折到第二行，而不是把「删除选中」单独挤下去 */
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.bulk-ver {
  display: flex;
  align-items: center;
  gap: 7px;
  animation: verIn .16s ease-out;
}
@keyframes verIn { from { transform: translateY(-3px); } to { transform: none; } }
.bulk-ver-label {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: .01em;
}
.bulk-input {
  width: 150px;
  height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.8px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.bulk-input::placeholder { font-family: var(--font); color: var(--muted); opacity: .85; }
.bulk-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.bulk-input.shake { animation: shake .3s ease; border-color: var(--danger); }
@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.flex-1 { flex: 1; }

/* ---------------- 表格 ---------------- */
/* 表头在卡片内部吸顶，页面滚动时不会跑到顶栏底下去 */
.table-wrap { overflow: auto; max-height: min(72vh, 880px); }
.table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  padding: 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table thead th.num { text-align: right; }

/* 版本列表头的铅笔：一次点开批量改 */
.table thead th .th-batch {
  margin-left: 3px;
  padding: 0;
  width: 14px;
  height: 14px;
  line-height: 12px;
  vertical-align: -1px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font-size: 9.5px;
  opacity: .38;
  cursor: pointer;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}
.table thead th:hover .th-batch { opacity: 1; }
.table thead th .th-batch:hover { opacity: 1; color: var(--accent); border-color: var(--line-2); background: var(--panel); }

.table tbody td {
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--row-hover); }
.table tbody tr:last-child td { border-bottom: 0; }

.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.time { color: var(--muted); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; }
.table td.mono { font-family: var(--mono); font-size: 11.8px; color: var(--ink-2); letter-spacing: 0; }
.table td.ver { font-size: 11.4px; color: var(--muted); }
.table .amount { font-weight: 600; }

/* ---- 垃圾桶 ---- */
.trash-table { min-width: 640px; } /* 比主表窄，窄屏少滚动；操作列必须露出来 */
.trash-table tbody tr { cursor: default; }
.trash-table tbody td { color: var(--ink-2); }
.trash-table tbody tr:hover td { background: var(--row-hover); }
.trash-table td.row-actions { text-align: right; white-space: nowrap; }
.trash-table td.row-actions .ra { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.trash-table td.row-actions .btn.sm { height: 26px; padding: 0 10px; font-size: 11.8px; }
.trash-table td.row-actions .icon-btn {
  width: 26px;
  height: 26px;
  margin-left: 0;
  flex: none;
  border-radius: 7px;
}
.trash-table td.row-actions .icon-btn.danger { color: var(--danger); }
.trash-table td.row-actions .icon-btn.danger:hover {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
  color: var(--danger);
}
.trash-table .shop-cell,
.trash-table .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 1px; }
.trash-table tbody tr.is-sel td { background: var(--row-sel); }

#view-trash .toolbar-hint strong { color: var(--ink); font-weight: 620; }

.est {
  color: var(--muted);
  font-size: 9.5px;
  vertical-align: super;
  margin-left: 1px;
  cursor: help;
  border-bottom: 1px dotted transparent;
}
.est:hover { color: var(--ink-2); }

.table tbody td.copyable { position: relative; padding-right: 19px; cursor: copy; }
.table td.copyable .cp {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
  opacity: 0;
  cursor: pointer;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}
.table tbody td.copyable:hover .cp { opacity: 1; }
.table td.copyable .cp:hover { color: var(--ink); border-color: var(--line-2); background: var(--panel-2); opacity: 1; }
.table td.copyable .cp.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); opacity: 1; }

.table td.row-go { text-align: right; color: var(--muted); opacity: .45; padding-right: 8px; padding-left: 0; font-size: 15px; }
.table tbody tr:hover td.row-go { opacity: 1; color: var(--ink-2); }

/* 整行复制：固定在 › 左边，平时隐藏，鼠标进到行里才浮现 */
.table td.row-go { white-space: nowrap; }
.table td.row-go .row-cp {
  width: 18px;
  height: 18px;
  margin-right: 3px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  cursor: pointer;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}
.table tbody tr:hover td.row-go .row-cp,
.table td.row-go .row-cp:focus-visible { opacity: 1; }
.table td.row-go .row-cp:hover { color: var(--ink); border-color: var(--line-2); background: var(--panel-2); }
.table td.row-go .row-cp.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); opacity: 1; }
.table td .chip { font-size: 11.5px; }

/* 勾选列 */
.table th.pick { width: 3.5%; padding: 0; text-align: center; }
.table td.pick { padding: 0; text-align: center; cursor: default; }

.pickbox {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  position: relative;
  border: 1.5px solid var(--line-2);
  border-radius: 4.5px;
  background: var(--panel);
  cursor: pointer;
  vertical-align: middle;
  transition: background .13s, border-color .13s, box-shadow .13s;
}
.pickbox:hover { border-color: var(--accent); }
.pickbox:checked { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.pickbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}
.pickbox:indeterminate { background: var(--accent); border-color: var(--accent); }
.pickbox:indeterminate::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 5.5px;
  width: 7px;
  height: 1.6px;
  border-radius: 1px;
  background: #fff;
}

.table tbody tr.is-sel td { background: var(--row-sel); }
.table tbody tr.is-sel:hover td { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.table tbody tr.is-sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

/* 拼多多版本：可编辑 */
.table td.ver-cell { padding-right: 38px; cursor: default; }
.table td.ver-cell .cp { right: 20px; }
.table td.ver-cell .ed {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
  opacity: 0;
  cursor: pointer;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}
.table tbody tr:hover td.ver-cell .ed { opacity: 1; }.table td.ver-cell .ed:hover { color: var(--accent); border-color: var(--line-2); background: var(--panel-2); opacity: 1; }
.table td.ver-cell.editing { padding-right: 6px; overflow: visible; }
.ver-input {
  width: 100%;
  height: 27px;
  padding: 0 7px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
  font-size: 11.6px;
  outline: none;
}
.ver-empty { color: var(--muted); opacity: .6; }

/**
 * 状态标记：一个 5px 的圆点 + 一句短词，不再是一块彩色胶囊。
 * 颜色只表达结果（成功 / 已执行 / 失败），背景永远是纸面。
 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--line-2);
}
.chip.blue { color: var(--accent-ink); }
.chip.blue::before { background: var(--accent); }
.chip.green { color: var(--ok); }
.chip.green::before { background: var(--ok); }
.chip.amber { color: var(--warn); }
.chip.amber::before { background: var(--warn); }
.chip.red { color: var(--danger); }
.chip.red::before { background: var(--danger); }

/* 链接有无：两个短词，中间一个细点，不加底色 */
.linktag { font-size: 11.5px; color: var(--ink-2); }
.linktag.muted { color: var(--muted); }
.dotsep {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 6px;
  border-radius: 50%;
  background: var(--muted);
  vertical-align: 2px;
  opacity: .6;
}

/* 日志表的「结果」列：点 + 词 */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.st.ok { color: var(--ok); }
.st.ok::before { background: var(--ok); }
.st.warn { color: var(--warn); }
.st.warn::before { background: var(--warn); }
.st.fail { color: var(--danger); }
.st.fail::before { background: var(--danger); }

/* 概览底部的最近操作：三列对齐，时间等宽，动作与详情都收在一行里 */
.log-strip { display: flex; flex-direction: column; }
.log-line {
  display: grid;
  grid-template-columns: 64px 88px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.log-time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.log-act { color: var(--ink-2); }
.log-act.fail { color: var(--danger); }
.log-detail { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-empty { padding: 8px 0; font-size: 12px; color: var(--muted); }

/* 日志表的「操作」列：纯文字，颜色跟等级走 */
.act { font-size: 12px; color: var(--ink-2); }
.act.warn { color: var(--warn); }
.act.fail { color: var(--danger); }

.table td.detail { font-size: 11.8px; color: var(--ink-2); max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}
.page-info { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-btns { display: flex; gap: 8px; }

/* ---------------- 接口页 ---------------- */
.hint { font-size: 12.2px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.hint-inline { font-size: 11.8px; color: var(--muted); }

.copy-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
}
.copy-row code { flex: 1; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field-inline { display: flex; align-items: center; gap: 8px; }
.field-k { font-size: 11.5px; color: var(--muted); flex: none; }

.code-pill {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 11.8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code {
  margin: 0;
  padding: 13px 15px;
  border-radius: var(--r);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.6px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
  max-height: 320px;
}
.code.tall { max-height: 340px; }

.row-gap { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* ---------------- 设置 ---------------- */
.form { display: flex; flex-direction: column; }
.form .btn { align-self: flex-start; margin-top: 6px; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 11px 14px; font-size: 12.3px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink-2); word-break: break-all; }

/* ---------------- 抽屉 ---------------- */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 15, .42); backdrop-filter: blur(2px); }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(540px, 95vw);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 60px -40px rgba(0, 0, 0, .6);
  animation: slide .2s cubic-bezier(.2, .7, .3, 1);
}
@keyframes slide { from { transform: translateX(20px); opacity: .5; } to { transform: none; opacity: 1; } }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 15.5px; font-weight: 620; letter-spacing: -.015em; margin-top: 4px; }

.drawer-body { flex: 1; overflow: auto; padding: 18px 22px 28px; }

.drawer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.dgrid { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 11px 12px; font-size: 12.6px; margin-bottom: 16px; }
.dgrid dt { color: var(--muted); padding-top: 1px; }
.dgrid dd { color: var(--ink); word-break: break-all; }
.dgrid dd.long { font-size: 11.8px; line-height: 1.65; color: var(--ink-2); }

.edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
}
.edit-row .edit-k { font-size: 11.5px; color: var(--muted); flex: none; }
.edit-row input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12.3px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.edit-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }

.block-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  margin: 20px 0 8px;
}

.req-list { display: flex; flex-direction: column; }
.req-row {
  display: grid;
  grid-template-columns: 96px 124px minmax(0, 1fr) 96px minmax(0, 170px);
  gap: 10px;
  align-items: center;
  padding: 9px 2px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.req-row.head {
  border-top: 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.req-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 11.6px; }
.req-ip { font-family: var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.6px; }
.req-path { font-family: var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.6px; }
.req-sum { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.6px; }

/* ---------------- 确认对话框 ---------------- */
.confirm {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm[hidden] { display: none; }

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, .46);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .16s ease;
}
.confirm.in .confirm-backdrop { opacity: 1; }

.confirm-card {
  position: relative;
  width: min(392px, 100%);
  padding: 18px 18px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition: transform .18s cubic-bezier(.2, .7, .3, 1), opacity .18s ease;
}
.confirm.in .confirm-card { opacity: 1; transform: none; }

.confirm-head { display: flex; gap: 11px; align-items: flex-start; }
.confirm-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.confirm-icon.is-danger { background: var(--danger-soft); color: var(--danger); }

.confirm-text { min-width: 0; }
.confirm-text h3 { margin: 0; font-size: 14px; font-weight: 640; letter-spacing: -.01em; color: var(--ink); }
.confirm-msg {
  margin: 5px 0 0;
  font-size: 12.4px;
  line-height: 1.66;
  color: var(--ink-2);
  white-space: pre-line; /* 消息里的换行照原样显示 */
  word-break: break-word;
}

.confirm-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .confirm-backdrop, .confirm-card { transition: none; }
}

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  padding: 9px 16px;
  border-radius: 10px;
  background: #10141d;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 12.4px;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .8);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); border-color: transparent; }
html[data-theme="dark"] .toast { background: #f2f4fa; color: #0d1017; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .login-shell { max-width: 780px; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; max-width: 420px; }
  .login-aside { padding: 26px 26px 20px; gap: 20px; }
  .login-facts { display: none; }
  .login-panel { padding: 28px 26px 26px; }
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
  }
  .brand { padding: 0 8px 0 0; }
  .brand-text { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 3px; flex: 0 1 auto; }
  /* 横向条上按顺序排即可，auto 外边距会把这一项顶歪 */
  .nav-item.nav-item-bottom { margin-top: 0; }
  /* 横向条上滑动的块没有意义，直接换成静态底 */
  .nav-pill { display: none; }
  .nav-item { padding: 6px 9px; font-size: 12.2px; height: auto; }
  .nav-label { display: none; }
  .nav-item.is-active { background: rgba(255, 255, 255, .09); }
  .nav-item:hover svg { transform: none; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; gap: 10px; }
  .user-chip, .live, .build { display: none; }
  .main { padding: 0 14px 36px; }
  .topbar { margin: 0 -14px; padding: 14px 14px 12px; }
  .topbar h1 { font-size: 19px; }
  .view { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
