/* ============================================================
   土罗罗后台控制台 —— Material Design 3 (Material You) 主题
   说明：本文件只做视觉层重做。所有 class 名沿用 app.js 里已有的
   （card / toolbar / btn / tag / stat / kv / modal-* / toast ...），
   因此 app.js 的业务逻辑与 DOM 生成完全不用改。
   ============================================================ */

:root {
  /* ---- 品牌色（seed: 靛紫） ---- */
  --primary: #6a5ae0;
  --on-primary: #ffffff;
  --primary-container: #e9e3ff;
  --on-primary-container: #1d1547;
  --primary-hover: #5b4bd4;

  --secondary: #5c5670;
  --secondary-container: #e6dff5;
  --on-secondary-container: #1b1730;

  --tertiary: #7b5260;
  --tertiary-container: #ffd8e4;
  --on-tertiary-container: #31101d;

  /* ---- 表面层级 ---- */
  --surface: #faf8fd;
  --surface-low: #f4f1fa;
  --surface-lowest: #ffffff;
  --surface-high: #eeebf4;
  --surface-highest: #e5e1ee;

  --on-surface: #1c1b22;
  --on-surface-variant: #625b71;
  --outline: #7a7488;
  --outline-variant: #ded9e6;

  /* ---- 语义色 ---- */
  --error: #b3261e;
  --on-error: #ffffff;
  --error-container: #f9dedc;
  --on-error-container: #410e0b;

  --success: #146c43;
  --success-container: #d2f0de;
  --on-success-container: #052e16;

  --warning: #8a5300;
  --warning-container: #ffe2bd;
  --on-warning-container: #2e1800;

  --info: #0a5f9e;
  --info-container: #d6e9ff;
  --on-info-container: #001d33;

  /* ---- 形状 ---- */
  --r-xs: 6px;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 24px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* ---- 高度（MD3 elevation） ---- */
  --el-0: none;
  --el-1: 0 1px 2px rgba(28, 27, 34, .06), 0 1px 3px 1px rgba(28, 27, 34, .04);
  --el-2: 0 1px 2px rgba(28, 27, 34, .06), 0 2px 6px 2px rgba(28, 27, 34, .05);
  --el-3: 0 2px 4px rgba(28, 27, 34, .06), 0 4px 10px 3px rgba(28, 27, 34, .06);
  --el-4: 0 6px 18px 4px rgba(28, 27, 34, .10), 0 2px 6px rgba(28, 27, 34, .06);

  --sidebar-w: 264px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "PingFang SC",
               "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; }

::selection { background: var(--primary-container); color: var(--on-primary-container); }

/* 滚动条（细） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d7d2e0; border-radius: var(--r-pill); border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #bfb9cc; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   登录页
   ============================================================ */
.login-mask {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--surface);
}
.login-mask.hide { display: none; }

.login-shell {
  display: flex;
  width: min(1040px, 100%);
  min-height: 560px;
  background: var(--surface-lowest);
  border-radius: var(--r-2xl);
  box-shadow: var(--el-4);
  overflow: hidden;
}

/* 左侧品牌区 */
.login-hero {
  flex: 1.15;
  position: relative;
  padding: 48px 44px;
  color: #fff;
  display: flex; flex-direction: column;
  background:
    radial-gradient(900px 480px at 12% 8%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(700px 420px at 88% 92%, rgba(155, 107, 239, .55) 0%, rgba(155, 107, 239, 0) 60%),
    linear-gradient(140deg, #3f34a8 0%, #6a5ae0 48%, #9b6bef 100%);
}
.login-hero::after {
  content: ""; position: absolute; right: -90px; top: -90px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.login-hero::before {
  content: ""; position: absolute; left: -70px; bottom: -110px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.hero-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.hero-logo {
  width: 42px; height: 42px; border-radius: var(--r-m);
  background: rgba(255, 255, 255, .20);
  border: 1px solid rgba(255, 255, 255, .35);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; letter-spacing: 1px;
}
.hero-name { font-size: 18px; font-weight: 600; letter-spacing: .5px; }

.login-hero h1 {
  position: relative; z-index: 1;
  margin: 56px 0 12px;
  font-size: 32px; line-height: 1.32; font-weight: 700;
  letter-spacing: -.4px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}
.login-hero > p {
  position: relative; z-index: 1;
  margin: 0 0 28px; max-width: 380px;
  font-size: 14px; line-height: 1.75;
  color: rgba(255, 255, 255, .82);
}

.hero-points { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.hero-points li {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; font-size: 13.5px;
  color: rgba(255, 255, 255, .92);
}
.hero-points li::before {
  content: ""; flex: 0 0 auto; margin-top: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .16);
}

.hero-foot {
  position: relative; z-index: 1;
  margin-top: auto; padding-top: 24px;
  font-size: 12px; letter-spacing: .6px;
  color: rgba(255, 255, 255, .62);
}

/* 右侧表单区 */
.login-card {
  flex: 1;
  padding: 52px 46px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--surface-lowest);
}
.login-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.2px; }
.login-card .tip { margin: 0 0 30px; color: var(--on-surface-variant); font-size: 13px; }

.field { display: block; margin-bottom: 18px; }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--on-surface-variant); letter-spacing: .3px; }

.login-card input {
  width: 100%; height: 52px;
  padding: 0 16px;
  font-size: 15px; font-family: inherit; color: var(--on-surface);
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-s);
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-card input:hover { background: var(--surface-high); }
.login-card input:focus {
  background: var(--surface-lowest);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(106, 90, 224, .16);
}
.login-card input::placeholder { color: #a7a1b5; }

.login-card button {
  width: 100%; height: 50px; margin-top: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px; font-family: inherit;
  color: var(--on-primary); background: var(--primary);
  border: 0; border-radius: var(--r-pill); cursor: pointer;
  box-shadow: var(--el-1);
  transition: background .16s, box-shadow .16s, transform .1s;
}
.login-card button:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--el-2); }
.login-card button:active:not(:disabled) { transform: translateY(1px); }
.login-card button:disabled { background: #c3bfcd; box-shadow: none; cursor: not-allowed; }

.login-note { margin-top: 20px; font-size: 12px; color: #9a94a8; text-align: center; }

.err { color: var(--error); font-size: 13px; min-height: 20px; margin-top: 10px; }
.login-card .err { margin-top: 12px; }

@media (max-width: 900px) {
  .login-shell { flex-direction: column; min-height: 0; }
  .login-hero { display: none; }
  .login-card { padding: 40px 28px; }
}

/* ============================================================
   顶栏（App bar）
   ============================================================ */
#topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface-low) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--outline-variant);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 0 16px;
  position: relative; z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #9b6bef 100%);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--el-1);
}
.brand-text { font-weight: 600; letter-spacing: .2px; }
.brand-text em { font-style: normal; color: var(--on-surface-variant); font-weight: 400; margin-left: 6px; font-size: 13px; }

.me { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.me-chip {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px 0 6px;
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-pill);
  box-shadow: var(--el-1);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-container); color: var(--on-primary-container);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.me-info { display: flex; flex-direction: column; line-height: 1.25; }
#me-name { font-weight: 600; font-size: 13px; }
.me .roles { color: var(--on-surface-variant); font-size: 11.5px; }
.me .old { color: var(--on-surface-variant); }

/* ============================================================
   布局
   ============================================================ */
#main { display: flex; height: calc(100vh - var(--topbar-h)); }

#sidebar {
  width: var(--sidebar-w); flex: 0 0 auto;
  background: var(--surface-low);
  border-right: 1px solid var(--outline-variant);
  padding: 14px 12px 24px;
  overflow-y: auto;
}

.nav-group {
  padding: 16px 14px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: #9a94a8; text-transform: uppercase;
}
.nav-group:first-child { padding-top: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 44px; margin-bottom: 2px; padding: 0 14px;
  color: var(--on-surface-variant);
  font-size: 14px; font-weight: 500;
  border-radius: var(--r-pill);
  cursor: pointer; user-select: none;
  transition: background .14s, color .14s;
}
.nav-item svg { width: 22px; height: 22px; flex: 0 0 auto; fill: currentColor; opacity: .85; }
.nav-item:hover { background: var(--surface-highest); color: var(--on-surface); }
.nav-item.active {
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 700;
}
.nav-item.active svg { opacity: 1; }

#content-wrap { flex: 1; overflow: auto; padding: 26px 30px 60px; }

#pagehead { margin-bottom: 22px; }
#ph-title { margin: 0 0 4px; font-size: 26px; font-weight: 700; letter-spacing: -.4px; }
#ph-sub { margin: 0; color: var(--on-surface-variant); font-size: 13.5px; }

#content { /* app.js 直接写这里 */ }

/* ============================================================
   卡片 / 工具栏
   ============================================================ */
.card {
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-l);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--el-1);
}
.card > .toolbar:first-child { margin-top: -2px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar > b { font-size: 15px; font-weight: 700; margin-right: 2px; }

.toolbar input, .toolbar select {
  height: 38px; padding: 0 12px;
  font-size: 13.5px; font-family: inherit; color: var(--on-surface);
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-s);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.toolbar input:hover, .toolbar select:hover { border-color: var(--outline); }
.toolbar input:focus, .toolbar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(106, 90, 224, .14);
}
.toolbar input[type="date"] { min-width: 172px; }
.toolbar select { min-width: 108px; cursor: pointer; }

/* ============================================================
   按钮（MD3: filled / tonal / outlined / text）
   ============================================================ */
button.btn {
  height: 38px; padding: 0 20px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  color: var(--on-primary); background: var(--primary);
  border: 1px solid transparent; border-radius: var(--r-pill);
  cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .1s, color .16s;
  box-shadow: var(--el-1);
}
button.btn:hover { background: var(--primary-hover); box-shadow: var(--el-2); }
button.btn:active { transform: translateY(1px); }

/* gray → outlined */
button.btn.gray {
  color: var(--primary); background: transparent;
  border-color: var(--outline-variant); box-shadow: none;
}
button.btn.gray:hover { background: var(--primary-container); border-color: transparent; box-shadow: none; }

button.btn.danger { color: var(--on-error); background: var(--error); }
button.btn.danger:hover { background: #8f1d16; }

button.btn.ok { color: #fff; background: var(--success); }
button.btn.ok:hover { background: #0f5a37; }

button.btn:disabled { background: var(--surface-highest); color: #a7a1b5; box-shadow: none; cursor: not-allowed; }
button.btn.gray:disabled { background: transparent; border-color: var(--outline-variant); }

button.ghost {
  height: 34px; padding: 0 14px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--primary); background: transparent;
  border: 1px solid var(--outline-variant); border-radius: var(--r-pill);
  cursor: pointer; transition: background .16s, border-color .16s;
}
button.ghost:hover { background: var(--primary-container); border-color: transparent; }

/* 表格里的小按钮（行内操作） */
td button, .toolbar button:not(.btn) {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; margin: 0 4px 4px 0;
  border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest); color: var(--primary);
  transition: background .14s, color .14s, border-color .14s;
}
td button:hover, .toolbar button:not(.btn):hover { background: var(--primary-container); border-color: transparent; }

/* ============================================================
   表格
   ============================================================ */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--surface-lowest);
}
th {
  padding: 12px 14px;
  background: var(--surface-low);
  color: var(--on-surface-variant);
  font-weight: 700; font-size: 12.5px; letter-spacing: .3px;
  white-space: nowrap; text-align: left;
  border-bottom: 1px solid var(--outline-variant);
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0edf5;
  text-align: left; vertical-align: top;
  color: var(--on-surface);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--surface-low); }
td.nowrap { white-space: nowrap; }

/* 各页主表格：列多时给足最小宽度，避免「宣嘉」这类短昵称被逐字换行；
   视口不够就让容器横向滚动，而不是把列挤变形。（# 开头的是 app.js 里各表格容器 id） */
#u-table, #a-table, #s-table, #d-table, #t-table, #r-table, #m-table { overflow-x: auto; }
#u-table > table, #a-table > table, #s-table > table, #d-table > table,
#t-table > table, #r-table > table, #m-table > table { min-width: 900px; }

/* 徽标类短列不参与换行压缩 */
td .tag { white-space: nowrap; }

/* 用户查询表：ID / 昵称 / 手机 都是"绝不该逐字换行"的短列。
   表格是 auto 布局，给内容加 nowrap 后列宽会按内容自动撑开。 */
#u-table th:nth-child(1), #u-table td:nth-child(1),
#u-table th:nth-child(2), #u-table td:nth-child(2),
#u-table th:nth-child(3), #u-table td:nth-child(3),
#u-table th:nth-child(7), #u-table td:nth-child(7) { white-space: nowrap; }

/* ============================================================
   标签（chip）
   ============================================================ */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; margin: 0 6px 6px 0;
  border-radius: var(--r-xs);
  font-size: 12px; font-weight: 600; line-height: 1.5;
  background: var(--surface-highest); color: var(--on-surface-variant);
  border: 1px solid transparent;
  /* 表格里列宽较窄时，"未认证 / 企业认证" 会被拆成两行 —— 必须不换行 */
  white-space: nowrap;
}
/* 表格单元格内的 chip 收紧外边距，避免撑高行 */
td .tag { margin: 0 6px 0 0; }
.tag.g, .tag.online, .tag.rec { background: var(--success-container); color: var(--on-success-container); }
.tag.r, .tag.offline, .tag.unrec { background: var(--error-container); color: var(--on-error-container); }
.tag.b { background: var(--info-container); color: var(--on-info-container); }
.tag.y { background: var(--warning-container); color: var(--on-warning-container); }

.empty { padding: 34px 20px; text-align: center; color: #9a94a8; font-size: 13.5px; }

/* ============================================================
   分页
   ============================================================ */
.pager { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--on-surface-variant); }

/* ============================================================
   统计卡
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden;
  padding: 20px 22px;
  border-radius: var(--r-l);
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--el-1);
  transition: box-shadow .18s, transform .18s;
}
.stat:hover { box-shadow: var(--el-2); transform: translateY(-2px); }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--on-surface-variant); font-size: 12.5px; margin-top: 4px; }

/* 统计卡轮流配色（MD3 tonal） */
.stat-grid .stat:nth-child(4n+1) { background: var(--primary-container); border-color: transparent; }
.stat-grid .stat:nth-child(4n+1) .n { color: var(--on-primary-container); }
.stat-grid .stat:nth-child(4n+1) .l { color: color-mix(in srgb, var(--on-primary-container) 70%, transparent); }
.stat-grid .stat:nth-child(4n+2) { background: var(--secondary-container); border-color: transparent; }
.stat-grid .stat:nth-child(4n+2) .n { color: var(--on-secondary-container); }
.stat-grid .stat:nth-child(4n+2) .l { color: color-mix(in srgb, var(--on-secondary-container) 70%, transparent); }
.stat-grid .stat:nth-child(4n+3) { background: var(--tertiary-container); border-color: transparent; }
.stat-grid .stat:nth-child(4n+3) .n { color: var(--on-tertiary-container); }
.stat-grid .stat:nth-child(4n+3) .l { color: color-mix(in srgb, var(--on-tertiary-container) 70%, transparent); }
.stat-grid .stat:nth-child(4n+4) { background: var(--success-container); border-color: transparent; }
.stat-grid .stat:nth-child(4n+4) .n { color: var(--on-success-container); }
.stat-grid .stat:nth-child(4n+4) .l { color: color-mix(in srgb, var(--on-success-container) 70%, transparent); }

/* ============================================================
   弹窗（MD3 Dialog，28px 圆角）
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(28, 25, 45, .42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask.show { display: flex; animation: fadeIn .16s ease-out; }

.modal-box {
  width: 780px; max-width: 94vw; max-height: 88vh;
  background: var(--surface-lowest);
  border-radius: var(--r-2xl);
  box-shadow: var(--el-4);
  overflow: hidden; display: flex; flex-direction: column;
  animation: dialogIn .2s cubic-bezier(.2, .9, .3, 1.1);
}
.modal-head {
  padding: 20px 24px 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; font-weight: 700; letter-spacing: -.2px;
}
.modal-head button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--on-surface-variant);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s;
}
.modal-head button:hover { background: var(--surface-highest); }
.modal-body { padding: 0 24px 24px; overflow: auto; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }

/* 详情键值对 */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv .k { color: var(--on-surface-variant); font-weight: 600; }
.kv .v { word-break: break-all; }

/* 表单行 */
.form-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.form-row label { width: 92px; color: var(--on-surface-variant); font-size: 13px; font-weight: 600; padding-top: 9px; flex: 0 0 auto; }
.form-row input, .form-row textarea, .form-row select {
  flex: 1; min-width: 0; padding: 9px 12px;
  font-family: inherit; font-size: 13.5px; color: var(--on-surface);
  background: var(--surface-low);
  border: 1px solid var(--outline-variant); border-radius: var(--r-s);
  outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  background: var(--surface-lowest);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(106, 90, 224, .14);
}
.form-row textarea { min-height: 72px; resize: vertical; line-height: 1.6; }

.auth-img {
  max-width: 100%; max-height: 280px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-m);
  box-shadow: var(--el-1);
  display: block;
}

/* ============================================================
   提示（MD3 Snackbar）
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  min-width: 260px; max-width: 560px;
  padding: 14px 20px;
  background: #2f2b3f; color: #f3f0fa;
  font-size: 13.5px; line-height: 1.5;
  border-radius: var(--r-m);
  box-shadow: var(--el-4);
  display: none; z-index: 99;
  animation: snackIn .22s cubic-bezier(.2, .9, .3, 1.1);
}
.toast.show { display: block; }
@keyframes snackIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

pre.raw {
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-m);
  padding: 12px; font-size: 12px; line-height: 1.6;
  overflow: auto; max-height: 260px;
}

/* ============================================================
   权限勾选 / 看板
   ============================================================ */
.chkbox-wrap {
  max-height: 320px; overflow: auto;
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-m);
  padding: 10px;
}
.chk {
  display: inline-flex; align-items: center; gap: 6px;
  width: 232px; font-size: 12.5px; padding: 5px 8px;
  border-radius: var(--r-s); cursor: pointer;
  transition: background .12s;
}
.chk:hover { background: var(--surface-highest); }
.chk input { margin: 0; accent-color: var(--primary); width: 15px; height: 15px; }

.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* dl / board 里的裸 table 加容器感 */
.dl > div, .board > div { min-width: 0; }
.dl table, .board table { box-shadow: var(--el-1); }
.dl > div > div:first-child, .board > div > div:first-child { font-weight: 700; margin-bottom: 8px; }

/* lg-body 里动态塞的提示文字 */
#lg-body { min-height: 60px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
  :root { --sidebar-w: 220px; }
  #content-wrap { padding: 20px 18px 48px; }
}
@media (max-width: 780px) {
  #main { flex-direction: column; height: auto; }
  #sidebar {
    width: 100%; border-right: 0; border-bottom: 1px solid var(--outline-variant);
    display: flex; flex-wrap: wrap; padding: 10px;
  }
  .nav-group { display: none; }
  .nav-item { width: auto; flex: 0 0 auto; }
  #content-wrap { padding: 16px 14px 40px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
