/* ============================================================
   网页管理系统 - 样式表
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a9c6a;
  --primary-dark: #147a53;
  --dark: #1c2b26;
  --grey-bg: #f5f7f6;
  --border: #e5e8e7;
  --text: #444;
  --text-light: #888;
  --danger: #e05c4f;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: var(--grey-bg);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }

/* ---------- 顶部导航 ---------- */
.topbar {
  background: #14201c;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; /* 移动端折叠菜单定位基准 */
}

/* 移动端汉堡按钮（默认隐藏，手机显示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.topnav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topnav a { color: #cfdbd6; }
.topnav a:hover { color: #fff; }
.topnav-user { color: #9fd9bd; }
.btn-logout {
  background: rgba(255,255,255,.1);
  padding: 5px 12px;
  border-radius: 6px;
}

/* ---------- 主体 ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  min-height: calc(100vh - 110px);
}

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 26px; color: var(--dark); }
.page-head p { color: var(--text-light); font-size: 14px; }

/* 页头右侧操作按钮（我的项目 ＋ 添加） */
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head-row .btn-add { flex-shrink: 0; margin-top: 4px; }

/* PN 码自助添加面板 */
.pn-panel .hint { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }
.pn-form { display: flex; gap: 12px; align-items: center; max-width: 520px; flex-wrap: wrap; }
.pn-form input {
  flex: 1;
  min-width: 240px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 4px;
  font-family: Consolas, Menlo, "Courier New", monospace;
}
.pn-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 156, 106, .12);
}

.footer {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding: 20px;
}

/* ---------- 卡片 / 项目网格 ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
  display: block;
}

.project-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;      /* 显示器比例 */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #eef1f0;
  display: block;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.project-card-name { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.project-card-desc { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.project-card-folder {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  background: rgba(26,156,106,.08);
  border-radius: 4px;
  padding: 2px 8px;
}

/* 分组标题 */
.group-head {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin: 8px 0 14px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}

/* 项目备注小标签 */
.project-card-remark {
  display: inline-block;
  font-size: 12px;
  color: #8a6d1a;
  background: #fff8e6;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
}

/* 卡片底部行：文件夹名居左、运行终端图标居右（右下角） */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
.card-foot .project-card-folder { margin: 0; }
.card-term { display: inline-flex; gap: 5px; align-items: center; flex-shrink: 0; }
.card-term-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #e6f7ee;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(26, 156, 106, .22);
}

/* ---------- 表格 ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.table th { background: #fafbfa; color: var(--dark); font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafdfb; }

/* ---------- 编辑项目：当前绑定用户 ---------- */
.bound-box {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 18px;
}
.bound-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.bound-head h3 { font-size: 15px; color: var(--dark); }
.bound-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.bound-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #eefaf2;
  border: 1px solid #c9ead8;
  border-radius: 999px;
  font-size: 13px;
  color: #146a48;
}
.bound-pill em {
  font-style: normal;
  background: rgba(26, 156, 106, .14);
  color: var(--primary);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 12px;
}
.bound-pill b {
  color: #e05c4f;
  background: #fdeeee;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 600;
}
.bound-pill.off { background: #f7f7f6; border-color: #e5e8e7; color: #888; }
.bound-pill.off em { background: #ececeb; color: #888; }

/* ---------- 徽标 / 小元素 ---------- */
.badge {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green { background: #e6f7ee; color: #147a53; }
.badge-blue  { background: #e8f1fb; color: #2f6bb0; }
.badge-grey  { background: #f0f2f1; color: #6a6f6d; }
.badge-red   { background: #fdeeee; color: #b0423a; }
.muted { color: #b6bbb9; }

/* ---------- 运行终端：勾选与列表图标 ---------- */
.term-opts { display: flex; gap: 16px; flex-wrap: wrap; }
.term-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  box-sizing: border-box;
  transition: all .15s;
}
.term-opt input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--primary); }
.term-opt svg { flex-shrink: 0; }
.term-opt .ico { color: #b6bbb9; }
.term-opt span { font-size: 14px; color: var(--text); white-space: nowrap; line-height: 1; }
.term-opt:hover { border-color: var(--primary); }
.term-msg {
  color: #e05c4f;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

.term-cell { white-space: nowrap; }
.term {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  margin-right: 6px;
  color: #c2c9c6;
  background: #f2f4f3;
  vertical-align: middle;
}
.term.on {
  color: var(--primary);
  background: #e6f7ee;
  box-shadow: inset 0 0 0 1px rgba(26, 156, 106, .25);
}

/* ---------- 公开访问图标与链接弹窗 ---------- */
.pub-cell { white-space: nowrap; }
.pub-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #c2c9c6;
  background: #f2f4f3;
  vertical-align: middle;
}
.pub-ic.on {
  color: var(--primary);
  background: #e6f7ee;
  box-shadow: inset 0 0 0 1px rgba(26, 156, 106, .25);
}
.btn.js-link { background: rgba(26, 156, 106, .12); color: var(--primary); }

.ovl {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 900;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ovl-box {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  box-sizing: border-box;
}
.ovl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ovl-head h3 { font-size: 18px; color: var(--dark); }
.ovl-close {
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}
.ovl-close:hover { color: #333; }
.ovl-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.ovl-input { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .ovl-row { flex-direction: column; align-items: stretch; }
}
.qr-box { max-width: 380px; text-align: center; }
.qr-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 10px;
}
.qr-preview img { width: 220px; height: 220px; display: block; }
.qr-pn {
  font-family: Consolas, Menlo, "Courier New", monospace;
  font-size: 13px;
  color: #3d6b58;
  background: #eef5f1;
  border: 1px solid #dbe9e2;
  border-radius: 6px;
  padding: 6px 10px;
  display: inline-block;
  margin-bottom: 4px;
  user-select: all;
}
.pn {
  font-family: Consolas, Menlo, "Courier New", monospace;
  font-size: 14px;
  letter-spacing: 1px;
  color: #3d6b58;
  background: #eef5f1;
  border: 1px solid #dbe9e2;
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
  user-select: all;
}

.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn { transition: filter .15s; }
.btn:hover { filter: brightness(.95); }
.table td form, .table td form .btn { margin: 0; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 14px; color: var(--dark); margin-bottom: 6px; font-weight: 600; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,156,106,.12);
}
.field-hint { font-size: 12px; color: #9aa6a1; margin-top: 6px; font-weight: 400; line-height: 1.5; }
.form-item input:disabled { background: #f0f2f1; color: #8a8f8c; cursor: not-allowed; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--border);
  color: var(--dark);
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; padding: 12px; }

/* ---------- 提示 ---------- */
.alert {
  background: #fff8e6;
  border: 1px solid #f0e0b0;
  color: #8a6d1a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error { background: #fdeeee; border-color: #f3c2bd; color: #b0423a; }
.alert-success { background: #eefaf2; border-color: #bfe6cf; color: #1d7a48; }

/* ---------- 登录/注册页 ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0e3b2c 0%, #1a9c6a 60%, #2fce8e 100%);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.auth-title { font-size: 24px; color: var(--dark); text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text-light); text-align: center; margin-bottom: 28px; }
.auth-link { text-align: center; font-size: 14px; margin-top: 20px; }
.auth-link a { color: var(--primary); font-weight: 600; }

/* ---------- 空状态 / 无权限 ---------- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h1 { font-size: 24px; color: var(--dark); margin-bottom: 10px; }
.empty-state p { color: var(--text-light); margin-bottom: 20px; }

/* ---------- 权限勾选 ---------- */
.perm-list { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 0; }
.perm-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.perm-item:last-child { border-bottom: none; }
.perm-item input { width: 18px; height: 18px; }
.perm-item .perm-name { font-weight: 600; color: var(--dark); }
.perm-item .perm-desc { font-size: 12px; color: var(--text-light); }
.perm-item .perm-remark {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: #8a6d1a;
  background: #fff8e6;
  border-radius: 4px;
  padding: 1px 8px;
}

/* ---------- 权限授权：搜索框与分组筛选 ---------- */
.sbox {
  width: 100%;
  max-width: 380px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.sbox:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 156, 106, .12);
}
.picker { position: relative; }
.picker-input { max-width: 100%; padding-right: 46px; }
.picker-clear {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dfe5e2;
  color: #6b7671;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.picker-clear:hover { background: #cfd8d4; color: #333; }
.picker-item b { font-weight: 700; }
.picker-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 60;
}
.picker-item {
  padding: 11px 14px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f1;
}
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: #eefaf2; color: var(--primary); }
.picker-empty { padding: 18px 14px; color: #999; text-align: center; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.chip-count {
  font-size: 11px;
  background: rgba(0, 0, 0, .06);
  border-radius: 999px;
  padding: 1px 7px;
}
.chip.active .chip-count { background: rgba(255, 255, 255, .25); }

/* ---------- 列表工具栏：搜索/筛选 ---------- */
.list-tool {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 16px;
}
.list-tool .sbox { margin: 0; }
.list-tool-count { font-size: 13px; color: var(--text-light); }

/* ---------- 管理面板卡片 ---------- */
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.panel h2 { font-size: 18px; color: var(--dark); margin-bottom: 16px; }
.panel .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) {
  /* 移动端：顶部导航改为折叠式 */
  .nav-toggle { display: flex; }
  .topnav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #14201c;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    gap: 2px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .topnav.open { display: flex; animation: navDown .25s ease; }
  @keyframes navDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .topnav a, .topnav-user { padding: 11px 14px; border-radius: 6px; }
  .topnav a:hover { background: rgba(255, 255, 255, .08); }
  .topnav-user { color: #9fd9bd; }
  .btn-logout { text-align: center; margin-top: 6px; }
}

@media (max-width: 640px) {
  .panel .row { grid-template-columns: 1fr; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.stat-card strong { display: block; font-size: 30px; color: var(--primary); }
.stat-card span { font-size: 13px; color: var(--text-light); }

/* ---------- 项目内小导航 ---------- */
.mini-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 24px;
}

.mini-nav a {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
}

.mini-nav a:hover { color: var(--primary); background: rgba(26,156,106,.08); }
.mini-nav .mini-nav-active { color: var(--primary); background: rgba(26,156,106,.12); font-weight: 600; }

code {
  background: #f0f2f1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
}

/* ============================================================
   新版布局：顶部栏 + 左侧导航菜单
   ============================================================ */
.app { min-height: 100vh; }
.layout { display: flex; align-items: stretch; }

/* 顶部栏（全宽，固定） */
.topbar-inner { max-width: 100%; padding: 0 24px; }
.topbar-user { margin-left: auto; font-size: 13px; color: #9fd9bd; }
.topbar-user strong { color: #ffffff; font-weight: 600; margin-left: 2px; }

/* 品牌图片 LOGO（与官网同款图样，白色字标版用于深色顶栏） */
.brand-img {
  display: flex;
  align-items: center;
  line-height: 1;
}
.brand-img img {
  display: block;
  height: 54px;          /* 原图 940:250 比例，保持等比 */
  width: auto;
  object-fit: contain;
  transform: translateY(8px);   /* 整体下移 8px */
}
@media (max-width: 900px) {
  .brand-img img { height: 46px; }
}

/* 左侧导航 */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #14201c;
  color: #cfdbd6;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(26, 156, 106, .35);
  color: #9fd9bd;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.side-user-name { font-size: 14px; color: #fff; font-weight: 600; }
.side-user-role { font-size: 12px; color: #7f948a; margin-top: 2px; }

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.side-item {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  color: #cfdbd6;
  font-size: 14px;
  white-space: nowrap;
}
.side-item svg { vertical-align: -3px; margin-right: 8px; flex-shrink: 0; }
.side-item:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.side-item.active { color: #fff; background: var(--primary); font-weight: 600; }

/* 分组标题（用户管理 / 项目管理）——可点击折叠 */
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 8px;
  color: #cfdbd6;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.side-parent:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.side-group.has-active .side-parent { color: #9fd9bd; }
.sp-txt { display: flex; align-items: center; gap: 10px; }
.sp-txt svg { flex-shrink: 0; }
.side-group .arr {
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 10px;
  opacity: .7;
}
.side-group.open .arr { transform: rotate(90deg); opacity: 1; }

.side-children {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 6px;
}
.side-group.open .side-children { display: flex; }
.side-children a {
  display: block;
  padding: 9px 12px 9px 18px;
  border-radius: 8px;
  color: #cfdbd6;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.side-children a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-children a.active {
  color: #fff;
  background: rgba(26, 156, 106, .22);
  border-left-color: var(--primary);
  font-weight: 600;
}

.side-foot { border-top: 1px solid rgba(255, 255, 255, .07); padding: 10px 12px 14px; }
.side-logout { color: #e8b4ae; }
.side-logout:hover { background: rgba(224, 92, 79, .15); color: #fff; }
.side-copy { font-size: 11px; color: #55655d; text-align: center; padding-top: 8px; }

/* 遮罩（移动端） */
.side-mask {
  display: none;
}

/* 主内容区 */
.main { flex: 1; min-width: 0; background: var(--grey-bg); }
.main .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 26px 28px 60px;
  min-height: calc(100vh - 56px);
  box-sizing: border-box;
}

/* 移动端：侧栏变为抽屉 */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .topbar-user { display: none; }
  .layout { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 276px;
    height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: none;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .side-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }
  .side-mask.show { opacity: 1; pointer-events: auto; }
  .main .container { padding: 18px 16px 50px; min-height: calc(100vh - 56px); }
}
