/* PC 后台布局：左侧树形导航 + 顶栏 + 内容区 */
.app { display: flex; height: 100vh; overflow: hidden; }

/* 侧栏 */
.side {
  width: 228px;
  flex: 0 0 228px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.side-logo {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.side-logo .name { font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.side-logo .sub { margin-top: 3px; font-size: 11px; color: var(--text-3); }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.nav-group { margin-top: 10px; }
.nav-group-title {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 1px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.nav-item:hover { background: var(--brand-soft-2); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 500; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
}
.nav-item .badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.side-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.6;
}

/* 主区 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar .crumb { font-size: 13px; color: var(--text-2); }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.content { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }

/* 页头与筛选 */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.page-title { font-size: 18px; }
.page-desc { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.filter-bar .input, .filter-bar .select { width: 180px; height: 34px; font-size: 13px; }
.pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px 0; font-size: 13px; color: var(--text-2);
}
.pager .pbtn { display: flex; gap: 8px; }

/* 概览数字 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.stat .k { font-size: 12px; color: var(--text-3); }
.stat .v {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}
.stat .v small { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.stat.brand { background: var(--brand-soft); border-color: #F6D9BC; }
.stat.brand .v { color: var(--brand-text); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-title { font-size: 14px; margin-bottom: 10px; }
.mini-list { font-size: 13px; }
.mini-list li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.mini-list li:last-child { border-bottom: none; }
.mini-list { margin: 0; padding: 0; }

/* 权限矩阵 */
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.perm-group { border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; }
.perm-group h4 { font-size: 13px; margin-bottom: 8px; color: var(--text-2); }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.perm-item input { accent-color: var(--brand); width: 15px; height: 15px; }
.perm-item.locked { color: var(--text-3); }
.role-switch { display: flex; gap: 8px; margin-bottom: 14px; }
.role-tab {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 13px;
}
.role-tab.active { background: var(--brand-soft); border-color: #F6D9BC; color: var(--brand-text); font-weight: 500; }
.role-tab.locked::after { content: " 不可改"; font-size: 11px; color: var(--text-3); }

/* 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1000px 460px at 12% -10%, #FFEBD6 0%, rgba(255, 235, 214, 0) 60%),
    radial-gradient(760px 380px at 100% 110%, #FFF3E4 0%, rgba(255, 243, 228, 0) 62%),
    var(--page);
  padding: 20px;
}
.login-card {
  width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 30px 30px 24px;
}
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-card .mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 600;
}
.login-card h2 { font-size: 17px; }
.login-card .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.login-card .btn-primary { height: 40px; font-size: 14px; margin-top: 6px; }
.login-foot { margin-top: 18px; text-align: center; font-size: 11px; color: var(--text-3); line-height: 1.7; }

/* 人员多选：一串可点的名字 */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.chip {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
  user-select: none; transition: all .12s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-text); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); font-weight: 600; }

/* 系统设置：左侧分类子菜单 + 右侧内容 */
.set-wrap { display: grid; grid-template-columns: 184px 1fr; gap: 16px; align-items: start; }
.set-menu {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; position: sticky; top: 12px;
}
.set-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--text-2);
  cursor: pointer; transition: background .12s;
}
.set-menu-item:hover { background: var(--brand-soft-2); }
.set-menu-item.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 500; }
.set-dot {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.set-body { min-width: 0; }
.set-tip { font-size: 12px; color: var(--text-3); margin: 0 2px 10px; }
.set-sys {
  margin-left: 6px; font-size: 10px; padding: 1px 6px; border-radius: 8px;
  background: #F4F0EA; color: var(--text-3); font-weight: 400;
}
.set-hint { line-height: 1.6; margin-top: 4px; }

/* 微信授权块 */
.wx-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #FDFAF6; }
.wx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; }
.wx-grid .field { margin-bottom: 0; }
.set-wx-msg { font-size: 12px; line-height: 1.7; margin-top: 8px; color: var(--text-3); }
.set-wx-msg.bad { color: var(--danger); }
@media (max-width: 1080px) {
  .set-wrap { grid-template-columns: 1fr; }
  .set-menu { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
}
