/* ==========================================================================
   ENVO 电子工牌 · 管理后台样式
   ========================================================================== */

:root {
  --brand:        #3b56ff;
  --brand-dark:   #2a41d8;
  --brand-soft:   #eef1ff;
  --side-bg:      #151a2b;
  --side-bg2:     #1c2338;
  --side-fg:      #a8b0c8;
  --side-fg-on:   #ffffff;

  --bg:           #f4f6fb;
  --card:         #ffffff;
  --line:         #e5e8f0;
  --line-soft:    #eef0f6;

  --fg:           #1a1f36;
  --fg-2:         #4b5468;
  --fg-3:         #8b93a8;

  --ok:           #0f9d58;
  --ok-soft:      #e7f6ee;
  --warn:         #d97706;
  --warn-soft:    #fef4e6;
  --danger:       #e03131;
  --danger-soft:  #fdecec;
  --info:         #2563eb;
  --info-soft:    #eaf0fe;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --shadow:    0 1px 2px rgba(20, 26, 46, .04), 0 6px 20px -8px rgba(20, 26, 46, .10);
  --shadow-lg: 0 12px 40px -12px rgba(20, 26, 46, .22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

/* ---------------------------------------------------------------- 布局 */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; flex: 0 0 240px;
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg2) 100%);
  color: var(--side-fg);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.brand {
  padding: 22px 20px 18px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  background: linear-gradient(135deg, #4d6bff, #7a5cff);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 6px 16px -6px rgba(77,107,255,.8);
}
.brand-text b { display: block; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.25; }
.brand-text span { display: block; font-size: 11px; color: #6f7a96; letter-spacing: .12em; text-transform: uppercase; }

.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #5c6684; padding: 14px 10px 7px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--side-fg); font-size: 13.5px; font-weight: 500;
  text-decoration: none; margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #e6eaf5; text-decoration: none; }
.nav a.on {
  background: linear-gradient(90deg, rgba(77,107,255,.28), rgba(77,107,255,.10));
  color: #fff; box-shadow: inset 2px 0 0 #5c78ff;
}
.nav a svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.nav a.on svg { opacity: 1; }

.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11.5px; color: #5c6684; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px; flex: 0 0 62px;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; }
.topbar .crumb { font-size: 12px; color: var(--fg-3); }
.me { display: flex; align-items: center; gap: 12px; }
.me-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px 5px 5px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
}
.me-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #4d6bff, #7a5cff); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
}
.me-name { font-size: 13px; font-weight: 600; padding-right: 8px; }

.content { padding: 26px; max-width: 1280px; width: 100%; }

/* ---------------------------------------------------------------- 卡片 */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  margin-bottom: 20px; overflow: hidden;
}
.card-head {
  padding: 17px 20px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--fg-3); font-weight: 400; margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .lead { font-size: 13px; color: var(--fg-3); margin-top: 4px; }

/* ---------------------------------------------------------------- 统计 */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 17px 18px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12.5px; color: var(--fg-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 29px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; line-height: 1.15; }
.stat .d { font-size: 12px; color: var(--fg-3); }
.stat.accent { background: linear-gradient(140deg, #2b3fd0, #4353ff 55%, #6d5cff); border-color: transparent; color: #fff; }
.stat.accent .k, .stat.accent .d { color: rgba(255,255,255,.78); }

/* ---------------------------------------------------------------- 表格 */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fg-3);
  padding: 12px 16px; background: #fafbfe; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: #fafbff; }
table.tbl td.actions { text-align: right; white-space: nowrap; }
table.tbl .nowrap { white-space: nowrap; }

.cell-strong { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--fg-3); }

.logo-chip {
  width: 40px; height: 40px; border-radius: 9px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); padding: 3px;
}
.logo-empty {
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 14px;
  border: 1px solid #dfe4ff;
}
.avatar-chip { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line);
               display: inline-block; overflow: hidden; vertical-align: middle; flex-shrink: 0; }

/* ---------------------------------------------------------------- 徽章 */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok      { background: var(--ok-soft);     color: #0b7a45; }
.badge.off     { background: var(--danger-soft); color: #b32525; }
.badge.warn    { background: var(--warn-soft);   color: #a35b04; }
.badge.info    { background: var(--info-soft);   color: #1d4ed8; }
.badge.neutral { background: #f0f2f7;            color: var(--fg-2); }
.badge.plain   { background: #f0f2f7; color: var(--fg-2); }
.badge.plain::before { display: none; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; line-height: 1.4;
  font-family: inherit; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .06s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px -6px rgba(59,86,255,.75); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--fg-2); }
.btn-ghost:hover { border-color: #cdd3e2; color: var(--fg); background: #fbfcff; }
.btn-danger { background: #fff; border-color: #f3c9c9; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #eab0b0; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #c62828; color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-group { display: inline-flex; gap: 6px; }

/* ---------------------------------------------------------------- 表单 */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.field label.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fg); }
.field .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--fg-3); margin-top: 5px; }

.inp, .sel, .ta {
  width: 100%; padding: 10px 13px; border-radius: 9px;
  border: 1px solid #d9dee9; background: #fff; color: var(--fg);
  font-size: 14px; font-family: inherit; line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.inp:focus, .sel:focus, .ta:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(59,86,255,.13);
}
.inp::placeholder, .ta::placeholder { color: #aab1c2; }
.ta { resize: vertical; min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.7; }

.sel {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}

.inp-group { display: flex; }
.inp-group .inp { border-radius: 9px 0 0 9px; }
.inp-group .btn { border-radius: 0 9px 9px 0; }
.inp-prefix { display: flex; align-items: stretch; }
.inp-prefix .addon {
  display: grid; place-items: center; padding: 0 12px;
  border: 1px solid #d9dee9; border-right: none; border-radius: 9px 0 0 9px;
  background: #f7f8fc; color: var(--fg-3); font-size: 13px; white-space: nowrap;
}
.inp-prefix .inp { border-radius: 0 9px 9px 0; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px; background: #d3d8e4;
  position: relative; transition: background .18s; flex: 0 0 42px;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch .txt { font-size: 13.5px; }

/* 单选卡片组 */
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-cards label {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; border: 1px solid #d9dee9; border-radius: 9px;
  font-size: 13.5px; background: #fff; transition: all .15s;
}
.radio-cards label:hover { border-color: #c3cbdd; }
.radio-cards input { accent-color: var(--brand); }
.radio-cards label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.theme-dots { display: inline-flex; gap: 4px; margin-left: 4px; }
.theme-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }

/* 上传 */
.uploader { display: flex; align-items: center; gap: 14px; }
.uploader .preview {
  width: 74px; height: 74px; border-radius: 14px; border: 1px dashed #ccd3e2;
  background: #fafbfe; display: grid; place-items: center; overflow: hidden; flex: 0 0 74px;
}
.uploader .preview img { width: 100%; height: 100%; object-fit: contain; }
.uploader .preview.round { border-radius: 50%; }
.uploader .preview img.round { object-fit: cover; }
.uploader .preview .ph { font-size: 11px; color: #aab1c2; text-align: center; line-height: 1.3; padding: 4px; }

/* 默认头像图案（员工未上传照片时的兜底）：通用人像剪影，按容器等比缩放 */
.avatar-ph {
  position: relative; display: block; width: 100%; height: 100%;
  background: linear-gradient(155deg, #eaeffb 0%, #d9e2f4 100%);
}
.avatar-ph::before {                 /* 头 */
  content: ''; position: absolute; left: 50%; top: 22%;
  width: 35%; height: 35%; margin-left: -17.5%; border-radius: 50%;
  background: #a8b6d3;
}
.avatar-ph::after {                  /* 肩 */
  content: ''; position: absolute; left: 50%; bottom: 0;
  width: 60%; height: 30%; margin-left: -30%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: #a8b6d3;
}

/* ---------------------------------------------------------------- 提示条 */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; border-radius: var(--r); font-size: 13.5px;
  margin-bottom: 16px; border: 1px solid transparent; line-height: 1.6;
}
.alert svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2px; }
.alert.ok    { background: var(--ok-soft);     border-color: #bfe6d1; color: #0b6b3e; }
.alert.err   { background: var(--danger-soft); border-color: #f6cdcd; color: #a11f1f; }
.alert.warn  { background: var(--warn-soft);   border-color: #f5dcb4; color: #8a5205; }
.alert.info  { background: var(--info-soft);   border-color: #c9d9fb; color: #1a44b8; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert li { margin-bottom: 2px; }

/* ---------------------------------------------------------------- 筛选栏 */

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .inp, .filters .sel { width: auto; min-width: 150px; }
.filters .search { min-width: 240px; flex: 1 1 240px; max-width: 380px; }

.tabs { display: inline-flex; gap: 2px; background: #eef0f6; border-radius: 9px; padding: 3px; }
.tabs a {
  padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--fg-2); text-decoration: none;
}
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(20,26,46,.10); }

/* ---------------------------------------------------------------- 分页 */

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--fg-3); }
.pager .pages { display: flex; gap: 5px; }
.pager .pages a, .pager .pages span {
  min-width: 33px; height: 33px; padding: 0 9px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; border: 1px solid var(--line);
  color: var(--fg-2); background: #fff; text-decoration: none;
}
.pager .pages a:hover { border-color: #c3cbdd; background: #fbfcff; text-decoration: none; }
.pager .pages .on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .pages .gap { border: none; background: none; color: var(--fg-3); }

/* ---------------------------------------------------------------- 空状态 */

.empty { text-align: center; padding: 56px 20px; color: var(--fg-3); }
.empty .ico {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px;
  background: #f2f4fa; display: grid; place-items: center; color: #b6bdcf;
}
.empty h3 { font-size: 15px; color: var(--fg-2); margin-bottom: 5px; }
.empty p { font-size: 13px; margin-bottom: 16px; }

/* ---------------------------------------------------------------- 图表 */

.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bars .bar .col {
  width: 100%; max-width: 46px; border-radius: 7px 7px 3px 3px; min-height: 4px;
  background: linear-gradient(180deg, #5c78ff, #3b56ff); transition: height .5s cubic-bezier(.2,.8,.2,1);
}
.bars .bar .col.zero { background: #e6e9f2; }
.bars .bar .lab { font-size: 11px; color: var(--fg-3); }
.bars .bar .num { font-size: 11.5px; font-weight: 600; color: var(--fg-2); }

/* ---------------------------------------------------------------- 登录页 */

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(77,107,255,.16), transparent 60%),
    radial-gradient(700px 460px at 92% 8%, rgba(122,92,255,.14), transparent 60%),
    #f4f6fb;
}
.auth-card {
  width: 100%; max-width: 396px; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 34px 32px 30px;
}
.auth-logo {
  width: 52px; height: 52px; border-radius: 15px; margin-bottom: 18px;
  background: linear-gradient(135deg, #4d6bff, #7a5cff); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 19px; letter-spacing: .5px;
  box-shadow: 0 10px 24px -10px rgba(77,107,255,.85);
}
.auth-card h1 { font-size: 21px; margin-bottom: 6px; }
.auth-card .sub { font-size: 13px; color: var(--fg-3); margin-bottom: 22px; }
.auth-card .field { margin-bottom: 15px; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--fg-3); text-align: center; }

/* ---------------------------------------------------------------- 弹窗 */

.modal-mask {
  position: fixed; inset: 0; background: rgba(18,23,38,.46); backdrop-filter: blur(2px);
  display: none; place-items: center; z-index: 100; padding: 20px;
}
.modal-mask.show { display: grid; }
.modal {
  width: 100%; max-width: 410px; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 24px; animation: pop .16s ease-out;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 16px; margin-bottom: 8px; }
.modal p { font-size: 13.5px; color: var(--fg-2); margin-bottom: 20px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 9px; }

/* ---------------------------------------------------------------- 头像裁剪浮窗 */

.crop-mask {
  position: fixed; inset: 0; background: rgba(18,23,38,.6); backdrop-filter: blur(2px);
  display: none; place-items: center; z-index: 120; padding: 18px;
}
.crop-mask.show { display: grid; }
.crop-card {
  width: 100%; max-width: 390px; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 20px; animation: pop .16s ease-out;
}
.crop-card h3 { font-size: 16px; margin-bottom: 6px; }
.crop-card .sub { font-size: 12.5px; color: var(--fg-3); line-height: 1.6; margin-bottom: 14px; }
.crop-stage {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 1 / 1;
  margin: 0 auto; border-radius: 12px; overflow: hidden;
  background: #171b2c; touch-action: none; cursor: grab;
  -webkit-user-select: none; user-select: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-img {
  position: absolute; left: 0; top: 0; max-width: none;
  transform-origin: 0 0; will-change: transform;
  -webkit-user-drag: none; pointer-events: none;
}
.crop-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(10,14,26,.45), inset 0 0 0 2px rgba(255,255,255,.9);
}
.crop-zoom { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 0 4px; }
.crop-zoom input[type="range"] { flex: 1; accent-color: var(--brand); cursor: pointer; }
.crop-zico { width: 16px; text-align: center; font-size: 14px; color: var(--fg-3); user-select: none; }
.crop-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }

/* ---------------------------------------------------------------- Toast */

#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast-item {
  background: #1a1f36; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: slideDown .22s ease-out;
}
@keyframes slideDown { from { transform: translateY(-14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------------------------------------------------------------- 其它 */

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--fg-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.text-r { text-align: right; }
.small { font-size: 12.5px; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }

.kv { display: grid; grid-template-columns: 116px 1fr; gap: 9px 16px; font-size: 13.5px; }
.kv dt { color: var(--fg-3); }
.kv dd { margin: 0; }

.hero-note {
  background: linear-gradient(135deg, #eef1ff, #f6f4ff);
  border: 1px solid #dfe4ff; border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 20px;
}
.hero-note h3 { font-size: 14.5px; margin-bottom: 5px; color: var(--brand-dark); }
.hero-note p { font-size: 13px; color: var(--fg-2); margin: 0; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: relative; }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding: 10px; }
  .nav-group { display: none; }
  .nav a { white-space: nowrap; margin: 0; }
  .content { padding: 18px; }
  .topbar { padding: 0 16px; }
}

/* ---------------------------------------------------------- 管理员权限 */

.stack > * + * { margin-top: 16px; }

.scope-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scope-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line, #d8dbe3);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink, #2b2f36);
  background: var(--card, #fff);
  transition: border-color .15s ease, background .15s ease;
  user-select: none;
}
.scope-item:hover { border-color: var(--brand, #4353ff); }
.scope-item:has(input:checked) {
  border-color: var(--brand, #4353ff);
  background: color-mix(in srgb, var(--brand, #4353ff) 8%, transparent);
  font-weight: 600;
}
.scope-item input { accent-color: var(--brand, #4353ff); margin: 0; }
