/* ==========================================================================
   GM 网页后台 · 全站样式（唯一一份，页面不写内联样式表）
   规范：G10 iOS 18 浅色 / G17 五细节 / G20 圆角 4·8·12 / G22 提示走浮层
   圆角只允许 4 / 8 / 12 与正圆 50%，逐值写死，不设中间值变量。
   ========================================================================== */

:root {
  --canvas:     #F2F2F7;
  --card:       #FFFFFF;
  --text:       #1C1C1E;
  --text-2:     rgba(60, 60, 67, .60);
  --text-3:     rgba(60, 60, 67, .38);
  --hairline:   rgba(60, 60, 67, .20);
  --hairline-2: rgba(60, 60, 67, .10);
  --blue:       #007AFF;
  --blue-tint:  rgba(0, 122, 255, .10);
  --green:      #34C759;
  --red:        #FF3B30;
  --orange:     #FF9500;
  --purple:     #AF52DE;
  --fill:       rgba(118, 118, 128, .12);
  --fill-2:     rgba(118, 118, 128, .07);
  --rail-w:     232px;
  --content-x:  272px;
  --top-h:      52px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px -18px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;          /* G17.1 只开一次 */
  font-feature-settings: "tnum";
}
a { color: var(--blue); }
h1, h2, h3 { text-wrap: balance; }             /* G17.4 */
p { text-wrap: pretty; }
code {
  background: var(--fill-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
}

/* ==========================================================================
   悬浮玻璃侧栏
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 12px; bottom: 12px; left: 12px;
  z-index: 40;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 16px 40px -20px rgba(0, 0, 0, .22);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar-header { flex: 0 0 auto; padding: 18px 16px 10px; }
.sidebar-header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
}
.sidebar-role {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-nav {
  flex: 1 1 auto;
  padding: 4px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-group {
  padding: 12px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--text-3);
}
.sidebar-nav a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.sidebar-nav a:hover { background: var(--fill-2); }
.sidebar-nav a.active { background: var(--blue-tint); color: var(--blue); font-weight: 600; }
.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--hairline-2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.sidebar-footer .user-name {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-footer a {
  margin-left: auto;
  color: var(--blue);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--blue-tint);
  font-weight: 500;
}
.sidebar-footer a:hover { background: rgba(0, 122, 255, .18); }

/* ==========================================================================
   材质顶栏 + 32px 大标题
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--top-h);
  margin-left: var(--content-x);
  padding-right: 28px;
  background: rgba(242, 242, 247, .80);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--hairline); }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.topbar-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.2px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.topbar.is-scrolled .topbar-title { opacity: 1; transform: none; }
.topbar-actions { display: none; margin-left: auto; align-items: center; gap: 8px; }
.topbar-user {
  font-size: 13px;
  color: var(--text-2);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-exit {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.main {
  padding-left: var(--content-x);
  padding-right: 28px;
  padding-bottom: 48px;
  min-height: calc(100vh - var(--top-h));
}
.container { width: 100%; max-width: 1560px; }
.page-head { padding: 6px 0 18px; }
.page-head h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.6px;
}

/* ==========================================================================
   卡片与排版
   ========================================================================== */
.card {
  background: var(--card);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.card > .card-hint { margin: -6px 0 14px; font-size: 12px; color: var(--text-2); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row > * { margin: 0; }
.row-between { justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; }
.small { font-size: 12px; color: var(--text-2); }
.text-muted  { color: var(--text-2); }
.text-accent { color: var(--blue); font-weight: 600; }
.text-danger { color: #C4271C; }
.text-success { color: #1B7F3B; }
.text-mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.text-break { word-break: break-all; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label.inline { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
a.link { color: var(--blue); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ==========================================================================
   表单控件
   ========================================================================== */
select, input[type=text], input[type=password], input[type=number],
input[type=search], input[type=url], input[type=date] {
  background: var(--fill-2);
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
  height: 38px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
select {
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, rgba(60, 60, 67, .55) 50%),
                    linear-gradient(135deg, rgba(60, 60, 67, .55) 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select:hover, input:hover { background-color: rgba(118, 118, 128, .11); }
select:focus, input:focus, textarea:focus {
  background-color: var(--card);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, .16);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea {
  width: 100%;
  background: var(--fill-2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.65;
  font-family: inherit;
  outline: none;
  resize: vertical;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > .field-label { font-size: 12px; color: var(--text-2); }
.field > input, .field > select, .field > textarea { width: 100%; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid > .field-full { grid-column: 1 / -1; }

/* 勾选框: 20×20 方块, 选中填充系统蓝 + 白色对勾 (G20: 4px) */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--fill);
  transition: background .15s ease;
  position: relative;
}
.check input:checked + .check-box {
  background: var(--blue) no-repeat center / 14px 14px
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E");
}
.check input:focus-visible + .check-box { box-shadow: 0 0 0 3px rgba(0, 122, 255, .18); }

/* 按钮三档 */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 0 16px;
  height: 38px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, opacity .15s ease, transform .06s ease;
  -webkit-appearance: none;
  appearance: none;
}
button:hover, .btn:hover { background: #0071EB; }
button:active, .btn:active { transform: scale(.975); }
button.secondary, .btn.secondary { background: var(--blue-tint); color: var(--blue); }
button.secondary:hover, .btn.secondary:hover { background: rgba(0, 122, 255, .18); }
button.danger, .btn.danger { background: var(--red); color: #fff; }
button.danger:hover, .btn.danger:hover { background: #E63329; }
button.ghost, .btn.ghost { background: var(--fill-2); color: var(--text); }
button.ghost:hover, .btn.ghost:hover { background: var(--fill); }
button:disabled, .btn:disabled { opacity: .45; pointer-events: none; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 4px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; font-weight: 600; }
button.submitting, button[type=submit]:disabled { opacity: .55; pointer-events: none; }
form.inline { display: inline-flex; gap: 8px; align-items: center; }

/* ==========================================================================
   搜索 / 快捷筛选 / 分段控件
   ========================================================================== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search-form { display: flex; gap: 8px; flex: 1 1 auto; min-width: 260px; }
.search-form input[type=search], .search-form input[type=text] { flex: 1 1 auto; min-width: 160px; }
.quick-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--fill-2);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.quick-btn:hover { background: var(--fill); }
.quick-btn.active { background: var(--blue); color: #fff; font-weight: 500; }

.pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  background: var(--fill-2);
  border-radius: 8px;
}
.pills a, .pills button {
  padding: 6px 12px;
  height: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}
.pills a:hover, .pills button:hover { background: rgba(118, 118, 128, .10); }
.pills a.active, .pills button.active {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
}

/* ==========================================================================
   统计卡
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat { background: var(--fill-2); border-radius: 8px; padding: 14px 16px; }
.stat .label {
  color: var(--text-2);
  font-size: 12px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat .value {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.stat .value.stat-value-sm { font-size: 16px; letter-spacing: 0; }

/* ==========================================================================
   表格
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  background: var(--card);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--hairline-2);
  -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(60, 60, 67, .22);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: auto; }
th, td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(242, 242, 247, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--hairline);
}
td { border-bottom: 1px solid var(--hairline-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(0, 122, 255, .045); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; max-width: none; }
td.center, th.center { text-align: center; }
td.op-cell, th.op-cell { max-width: none; }
td.wrap { white-space: normal; word-break: break-word; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge.ok   { background: rgba(52, 199, 89, .16);  color: #1B7F3B; }
.badge.bad  { background: rgba(255, 59, 48, .12);  color: #C4271C; }
.badge.warn { background: rgba(255, 149, 0, .16);  color: #9A5B00; }
.badge.info { background: var(--blue-tint);        color: #0A5FBF; }

/* ==========================================================================
   内联提示（只留状态告警与字段校验，操作结果一律走浮层 — G22）
   ========================================================================== */
.msg { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.7; }
.msg.err  { background: rgba(255, 59, 48, .09); color: #C4271C; }
.msg.ok   { background: rgba(52, 199, 89, .10); color: #1B7F3B; }
.msg.info { background: var(--blue-tint);       color: #0A5FBF; }
.msg.warn { background: rgba(255, 149, 0, .09); color: #8A5200; }

/* 空态（G16: 语义插图 + 说明） */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px 20px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}
.empty::before {
  content: "";
  width: 40px;
  height: 40px;
  opacity: .5;
  background: no-repeat center / 40px 40px
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767680' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M3 9h18M8 14h8'/%3E%3C/svg%3E");
}
.empty .empty-action { margin-top: 4px; }

/* ==========================================================================
   分页
   ========================================================================== */
.pager {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--text-2);
}
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.pager a { background: var(--fill-2); }
.pager a:hover { background: var(--fill); }
.pager .pager-current { background: var(--blue); color: #fff; font-weight: 600; }
.pager .pager-gap { color: var(--text-3); padding: 0 4px; }
.pager .pager-info { color: var(--text-2); padding-left: 0; padding-right: 8px; }
.page-size { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin-left: auto; }
.page-size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--text);
  background: var(--fill-2);
  border-radius: 4px;
  text-decoration: none;
}
.page-size-btn:hover { background: var(--fill); }
.page-size-btn.active { background: var(--blue); color: #fff; font-weight: 600; }

/* ==========================================================================
   键值列表
   ========================================================================== */
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0; }
.kv > dt {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--hairline-2);
}
.kv > dd {
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--hairline-2);
  word-break: break-word;
}
.kv > dt:last-of-type, .kv > dd:last-of-type { border-bottom: 0; }

/* ==========================================================================
   弹窗 (sheet)
   ========================================================================== */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  padding: 32px 16px;
  overflow-y: auto;
}
.modal-mask.open { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: min(680px, 100%);
  margin: auto;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, .45);
  overflow: hidden;
  animation: sheetIn .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline-2);
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-close {
  background: var(--fill-2);
  border: 0;
  color: var(--text-2);
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
}
.modal-close:hover { background: var(--fill); color: var(--text); }
.modal-body { padding: 18px 20px 4px; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--hairline-2);
}
body.modal-open { overflow: hidden; }

/* ==========================================================================
   权限矩阵
   ========================================================================== */
.perm-table td, .perm-table th { white-space: normal; }
.perm-table td.perm-name { max-width: 220px; }
.perm-table td.perm-name b { display: block; font-weight: 600; }
.perm-table td.perm-name span { display: block; font-size: 12px; color: var(--text-2); }
.perm-table tr.perm-row-off td { background: rgba(255, 149, 0, .045); }
.perm-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

/* ==========================================================================
   浮层 (G22 唯一实现: #xz-toast)
   ========================================================================== */
#xz-toast {
  position: fixed;
  top: calc(var(--top-h) + 82px);
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.xz-toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 16px 40px -16px rgba(0, 0, 0, .28);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  cursor: pointer;
  animation: toastIn .24s cubic-bezier(.2, .8, .2, 1);
}
.xz-toast-item.out { animation: toastOut .18s ease forwards; }
.xz-toast-item::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.xz-toast-item.ok::before   { background: var(--green); }
.xz-toast-item.warn::before { background: var(--orange); }
.xz-toast-item.err::before  { background: var(--red); }
.xz-toast-item.err { color: #C4271C; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* ==========================================================================
   骨架 + 进度条 (G16)
   ========================================================================== */
#gm-skeleton {
  display: none;
  position: fixed;
  top: var(--top-h);
  right: 0; bottom: 0; left: var(--content-x);
  z-index: 80;
  padding: 28px;
  background: var(--canvas);
}
#gm-skeleton.on { display: block; }
.sk-block {
  position: relative;
  overflow: hidden;
  background: #E6E6EB;
  border-radius: 8px;
  margin-bottom: 16px;
}
.sk-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 100%);
  animation: skSweep 1.5s linear infinite;
}
.sk-title { height: 34px; width: 220px; background: transparent; margin-bottom: 22px; }
.sk-title::after { display: none; }
.sk-title span { display: block; height: 30px; width: 220px; border-radius: 8px; background: #E6E6EB; }
.sk-a { height: 96px; }
.sk-b { height: 240px; }
@keyframes skSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
#gm-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: var(--blue);
  z-index: 10000;
  opacity: 0;
  transition: width .5s ease, opacity .2s ease;
}
#gm-progress.on { opacity: 1; }

/* ==========================================================================
   入场动效 (G17.3: 34ms 步长, 最多 10 档; 表格不做)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .card, .stat, .page-head { animation: riseIn .34s cubic-bezier(.2, .8, .2, 1) both; }
  .card:nth-of-type(2), .stats-grid > .stat:nth-child(2) { animation-delay: 34ms; }
  .card:nth-of-type(3), .stats-grid > .stat:nth-child(3) { animation-delay: 68ms; }
  .card:nth-of-type(4), .stats-grid > .stat:nth-child(4) { animation-delay: 102ms; }
  .card:nth-of-type(5), .stats-grid > .stat:nth-child(5) { animation-delay: 136ms; }
  .card:nth-of-type(6), .stats-grid > .stat:nth-child(6) { animation-delay: 170ms; }
  .card:nth-of-type(n+7) { animation-delay: 204ms; }
}
@keyframes riseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; align-items: start; }

/* ==========================================================================
   登录页（两栏整版: 左品牌 / 右表单, 表单列 428, 控件 52 高）
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 428px; }
.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 64px;
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
}
.auth-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -14px rgba(0, 0, 0, .20);
  font-size: 30px;
  line-height: 1;
}
.auth-brand h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.8px; }
.auth-brand p { margin: 0; font-size: 16px; color: var(--text-2); max-width: 30em; }
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--card);
}
.auth-form { width: 100%; max-width: 428px; }
.auth-form h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.auth-form .form-note { margin: 0 0 24px; font-size: 13px; color: var(--text-2); }
.auth-form label.field { margin-bottom: 16px; }
.auth-form label.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.auth-form input[type=text], .auth-form input[type=password] { height: 52px; font-size: 16px; }
.auth-form button[type=submit] { width: 100%; height: 52px; margin-top: 8px; font-size: 17px; font-weight: 600; }
.auth-foot {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-2);
}
.auth-foot a {
  color: var(--blue);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--blue-tint);
  font-weight: 500;
}
.auth .err, .auth .warn { margin: 0 0 18px; }

/* ==========================================================================
   安装向导
   ========================================================================== */
.wizard { max-width: 880px; margin: 0 auto; padding: 40px 20px 60px; }
.wizard-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.wizard-steps span {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--fill-2);
  color: var(--text-2);
}
.wizard-steps span.on { background: var(--blue); color: #fff; font-weight: 600; }
.wizard-steps span.done { background: rgba(52, 199, 89, .16); color: #1B7F3B; }
.check-list { display: flex; flex-direction: column; gap: 0; }
.check-list .item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline-2);
  font-size: 13px;
}
.check-list .item:last-child { border-bottom: 0; }
.check-list .item .fix { color: var(--text-2); font-size: 12px; display: block; margin-top: 2px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --rail-w: 204px; --content-x: 240px; }
  .main { padding-right: 20px; }
  .topbar { padding-right: 20px; }
  .page-head h1 { font-size: 28px; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  body { display: flex; flex-direction: column; }
  :root { --content-x: 0px; }
  .topbar { order: 1; margin-left: 0; padding: 0 16px; top: 0; }
  .topbar-title { opacity: 1; transform: none; }
  .sidebar {
    order: 2;
    position: sticky;
    top: var(--top-h);
    bottom: auto;
    width: auto;
    height: auto;
    margin: 8px 12px 0;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    z-index: 45;
  }
  .sidebar-header { display: none; }
  .sidebar-nav { flex-direction: row; padding: 6px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav a { padding: 8px 12px; white-space: nowrap; font-size: 13px; }
  .nav-group { display: none; }
  .sidebar-footer { display: none; }
  .topbar-actions { display: flex; }
  .main { order: 3; padding: 0 12px 40px; min-height: auto; }
  .page-head { display: none; }
  #gm-skeleton { left: 0; padding: 16px; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { border-right: 0; border-bottom: 1px solid var(--hairline); padding: 32px 24px 24px; gap: 10px; justify-content: flex-start; }
  .auth-brand h1 { font-size: 26px; letter-spacing: -.4px; }
  .auth-mark { width: 48px; height: 48px; font-size: 24px; }
  .auth-form-wrap { padding: 28px 20px 40px; align-items: flex-start; }
  .auth-form { max-width: 100%; }
  .wizard { padding: 24px 12px 40px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .card { padding: 14px; margin-bottom: 12px; }
  .main { padding: 0 10px 36px; }
  select, input[type=text], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date] {
    height: 44px;
    font-size: 16px;
  }
  button, .btn { height: 44px; font-size: 15px; }
  .btn-xs { height: 32px; font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  th, td { padding: 9px 10px; font-size: 12px; max-width: 220px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .value { font-size: 22px; }
  .page-size { margin-left: 0; flex-basis: 100%; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  #xz-toast { right: 12px; left: 12px; }
  .xz-toast-item { max-width: none; }
  .modal-mask { padding: 16px 10px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  #gm-skeleton { top: 0; left: 0; padding: 12px; }
}
@media (max-width: 480px) {
  .main { padding: 0 8px 32px; }
  th, td { font-size: 11px; padding: 8px 8px; }
  .pager a, .pager span { height: 30px; padding: 0 9px; font-size: 12px; }
}

@media print {
  .sidebar, .topbar, .toolbar, .pager, form, .pills, .btn, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .main { padding: 0; }
  .page-head { display: block; padding: 0 0 12px; }
  .card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .table-wrap { max-height: none; overflow: visible; box-shadow: none; }
  table, th, td { color: #000; white-space: normal; }
  th { background: #f0f0f0; color: #000; position: static; }
  .badge { border: 1px solid #999; }
}

/* ==========================================================================
   系统更新（G18）：虚线投放区 + 分片进度
   ========================================================================== */
.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 20px;
  border: 1px dashed rgba(60, 60, 67, .28);   /* G17.5 允许保留的虚线投放区 */
  border-radius: 8px;
  background: var(--fill-2);
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.upload-box strong { font-size: 15px; font-weight: 600; }
.upload-box:hover { background: rgba(0, 122, 255, .06); border-color: rgba(0, 122, 255, .45); }
.upload-box.on { background: rgba(0, 122, 255, .10); border-color: var(--blue); }

.up-progress { margin-top: 14px; }
.up-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--fill);
  overflow: hidden;
  margin-bottom: 8px;
}
.up-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--blue);
  transition: width .2s ease;
}
