/* 寸光寸进管理后台 · Bootstrap 5 之上的薄主题层
   控件一律使用 Bootstrap 原生组件，此处只管布局与品牌色 */
:root {
  --cg-brand: #2E7D6B;
  --cg-brand-deep: #17594A;
}

body { background: #F6F7F4; }

/* 登录 */
.login-mask {
  position: fixed; inset: 0; z-index: 1050;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #20433A, #122B25);
}
.login-card { width: 360px; border-radius: 1rem; }
.login-logo { font-size: 44px; line-height: 1; }

/* 布局：侧栏 + 主区 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0;
  background: #FFFFFF;
  border-right: 1px solid rgba(31,64,55,.08);
}
#nav .btn { width: 100%; text-align: left; border: 0; }
#nav .btn.active,
#nav .btn.on {
  background: var(--cg-brand);
  color: #fff;
}
.main { min-width: 0; }
.editor { max-width: 980px; margin: 0 auto; }
.editor label { font-weight: 600; font-size: .875rem; }
.editor .card { border-radius: .75rem; }
.editor .card-header {
  background: #fff;
  border-bottom: 1px solid rgba(31,64,55,.08);
  font-weight: 700;
}

/* 诊断测试悬浮窗 */
.tester {
  position: fixed; right: 20px; bottom: 20px; z-index: 1040;
  width: 300px;
}
.tester.collapsed .tester-body { display: none; }
.tester-head { cursor: pointer; user-select: none; font-weight: 600; }
.tester-head .tester-arrow { transition: transform .2s; }
.tester.collapsed .tester-arrow { transform: rotate(-90deg); }

.hidden { display: none !important; }

/* ---- Layui 主题适配 ---- */
#nav .layui-btn.active, #nav .layui-btn.on, #nav .btn.active { background: var(--cg-brand); color: #fff; border-color: transparent; }
.src-tag { margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(31,64,55,.08); color: #5b6f68; font-weight: 600; }
.src-tag.src-ai { background: rgba(232,162,61,.16); color: #b07314; }
