/* ==========================================================================
   校园助手 SaaS 后台样式（对齐参考站 xyxy.funyog.com 的视觉规范）
   顶部 #00a65a 绿条 50px / 左侧 120px 深紫 #393a6a / 二级白色面板 115px
   ========================================================================== */

/* ---------- 基础 ---------- */
html, body { height: 100%; }
body {
  background: #f5f5f5;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
a { text-decoration: none; }

/* ---------- 顶部导航（绿色） ---------- */
.layui-layout-admin .layui-header {
  height: 50px;
  background: #00a65a !important;
  border-bottom: none;
  box-shadow: none;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item {
  height: 50px;
  line-height: 50px;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
  color: #fff;
  font-size: 13px;
  padding: 0 10px;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a .layui-icon {
  color: #fff;
  font-size: 15px;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a:hover {
  background: rgba(0, 0, 0, .08);
}
.layui-layout-admin .layui-header .layui-nav-bar { display: none; }
.layui-layout-admin .layui-layout-left { left: 120px; padding-left: 6px; }
.layui-layout-admin .layui-layout-left .layui-nav-item { margin: 0 5px; }
.layui-layout-admin .layui-layout-right { padding-right: 10px; }
.layui-layout-admin .layui-header .layui-nav-child {
  top: 50px;
  border: none;
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  padding: 5px 0;
}
.layui-layout-admin .layui-header .layui-nav-child dd a {
  color: #333 !important;
  font-size: 13px;
  line-height: 36px;
  height: 36px;
  padding: 0 20px;
}
.layui-layout-admin .layui-header .layui-nav-child dd a:hover {
  background: #f5f5f5;
  color: #00a65a !important;
}
.layui-layout-admin .layui-header .layui-nav-child dd.layui-this a { color: #00a65a !important; }

/* 顶部 logo（与侧栏同宽，嵌在侧栏顶部） */
.layui-layout-admin .layui-logo {
  width: 120px;
  height: 50px;
  line-height: 50px;
  padding: 0;
  text-align: center;
  background: #00a65a;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  box-shadow: none;
  position: static;
  overflow: hidden;
}

/* ---------- 左侧一级菜单（120px 深紫） ---------- */
.layui-layout-admin .layui-side {
  width: 120px;
  top: 0;
  bottom: 0;
  background: #393a6a;
  z-index: 1001;
  box-shadow: 1px 0 2px rgba(0, 0, 0, .06);
}
.layui-layout-admin .layui-side-scroll {
  width: 120px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.layui-layout-admin .layui-side-scroll::-webkit-scrollbar { width: 0; }
.layui-layout-admin .layui-side .layui-nav {
  width: 120px;
  margin-top: 0;
  padding: 0 0 60px;
  background: transparent;
}
.layui-layout-admin .layui-side .layui-nav-item {
  position: relative;
  height: auto;
  line-height: normal;
}
.layui-layout-admin .layui-side .layui-nav-item > a {
  position: relative;
  display: block;
  height: 40px;
  line-height: 40px;
  padding: 8px 30px 8px 45px;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  box-sizing: content-box;
}
.layui-layout-admin .layui-side .layui-nav-item a i {
  position: absolute;
  top: 50%;
  left: 20px;
  margin-top: -8px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 16px;
  color: rgba(255, 255, 255, .7);
}
.layui-layout-admin .layui-side .layui-nav-item a cite {
  font-style: normal;
  font-size: 14px;
  color: inherit;
  line-height: 40px;
}
.layui-layout-admin .layui-side .layui-nav-item a:hover {
  background: rgba(0, 0, 0, .16);
}
.layui-layout-admin .layui-side .layui-nav-item a:hover cite { color: #fff; }
.layui-layout-admin .layui-side .layui-nav-item.layui-this > a {
  background: rgba(0, 0, 0, .26);
  color: #fff;
}
.layui-layout-admin .layui-side .layui-nav-item.layui-this > a cite { color: #fff; }
.layui-layout-admin .layui-side .layui-nav-more { display: none; }

/* ---------- 二级菜单（白色 115px 面板） ---------- */
.wb-subnav {
  position: fixed;
  left: 120px;
  top: 50px;
  bottom: 0;
  width: 115px;
  background: #fff;
  border-right: 1px solid #efefef;
  z-index: 999;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
}
.wb-subnav.show { display: block; }
.wb-subnav::-webkit-scrollbar { width: 0; }
.wb-subnav .subnav-scene {
  height: 78px;
  line-height: 78px;
  padding-left: 18px;
  font-size: 14px;
  color: #333;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-subnav .menu-header {
  height: 50px;
  line-height: 50px;
  padding-left: 15px;
  font-size: 12px;
  color: #333;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-subnav .menu-header:hover { background: #f5f5f5; }
.wb-subnav ul { list-style: none; margin: 0; padding: 0; }
.wb-subnav ul li { height: 50px; line-height: 50px; font-size: 12px; }
.wb-subnav ul li a {
  display: block;
  height: 100%;
  padding-left: 25px;
  color: #7c838a;
  line-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-subnav ul.single li a { padding-left: 15px; color: #666; }
.wb-subnav ul li a:hover { background: rgba(123, 125, 229, .1); color: #7b7de5; }
.wb-subnav ul li a.wb-on {
  background: rgba(123, 125, 229, .2);
  color: #7b7de5;
}

/* ---------- 内容区 ---------- */
.layui-layout-admin .layui-body {
  left: 235px;
  top: 50px;
  bottom: 0;
  background: #f5f5f5;
  overflow: auto;
}
.layui-layout-admin .layui-body.no-sub { left: 120px; }
.wb-main { padding: 15px; min-height: 100%; box-sizing: border-box; }

/* ---------- 页面标题 ---------- */
.wb-page-head {
  padding: 0 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wb-page-head h2 { font-size: 16px; color: #333; font-weight: 600; }
.wb-page-head .wb-desc { font-size: 12px; color: #999; margin-top: 5px; }

/* ---------- 卡片（对齐 layui-card 视觉） ---------- */
.wb-card {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  padding: 15px;
}
.wb-card + .wb-card { margin-top: 15px; }
.wb-card-title {
  font-size: 14px;
  color: #333;
  font-weight: 400;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f6f6f6;
}

/* 统计卡片（对齐原站 layui-card + layuiadmin-card-list） */
.wb-stat-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -7.5px 0;
}
.wb-stat {
  flex: 1 1 25%;
  max-width: 25%;
  box-sizing: border-box;
  padding: 0 7.5px;
  margin-bottom: 15px;
}
.wb-stat .inner {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  height: 100%;
}
.wb-stat .hd {
  padding: 12px 15px 0;
  font-size: 14px;
  color: #333;
  line-height: 20px;
}
.wb-stat .hd .today { float: right; color: #666; font-size: 12px; }
.wb-stat .bd { padding: 5px 15px 15px; }
.wb-stat .num {
  font-size: 26px;
  color: #333;
  line-height: 1.2;
  margin: 6px 0 8px;
  font-weight: 400;
}
.wb-stat .num .unit { font-size: 16px; }
.wb-stat .num.green { color: #558800; }
.wb-stat .num.orange { color: #d97706; }
.wb-stat .row { font-size: 13px; color: #666; line-height: 24px; }
.wb-stat .row span { float: right; color: #999; }
.wb-stat .row span.money { color: #999; }

/* ---------- 筛选栏 / 工具栏 ---------- */
.wb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.wb-toolbar .layui-btn { margin: 0; }
.wb-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 6px;
}
.wb-filter input,
.wb-filter select {
  height: 34px;
  width: 160px;
  display: inline-block;
  padding: 0 8px;
  border: 1px solid #e6e6e6;
  border-radius: 2px;
  font-size: 13px;
  color: #333;
  background: #fff;
}
.wb-filter .lab { font-size: 13px; color: #666; }

/* ---------- 表格 ---------- */
.layui-table-view { border-color: #f0f0f0; }
.layui-table th { background: #f2f2f2; font-weight: 400; color: #666; }
.layui-table-cell { height: auto; line-height: 28px; }
.layui-table-cell .layui-btn-xs {
  margin: 0 4px 0 0;
  padding: 0 8px;
  height: 24px;
  line-height: 24px;
  font-size: 12px;
}
.layui-table-cell .layui-btn-xs:last-child { margin-right: 0; }
.wb-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
  background: #f2f2f2;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- 列表单元格：商品/订单/会员复合列 ---------- */
/* 参考站改写了 layui 默认单元格：允许换行、自适应高度（原值照抄） */
.layui-table-cell {
  height: auto;
  line-height: 20px;
  padding: 5px 5px;
  overflow: visible;
  white-space: normal;
  box-sizing: border-box;
  word-break: break-all;
}
.wb-cell-prod { display: flex; align-items: center; gap: 8px; line-height: 18px; }
.wb-cell-prod .wb-thumb { width: 68px; height: 68px; flex: none; }
.wb-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: #eef1f4; }
.wb-cell-txt { min-width: 0; }
.wb-cell-1 { color: #333; word-break: break-all; }
.wb-cell-2 { color: #f56c6c; font-size: 12px; margin-top: 3px; }
.layui-table-cell .wb-cell-1,
.layui-table-cell .wb-cell-2 { line-height: 18px; }

/* ---------- 按钮配色（对齐参考站 #009688） ---------- */
.layui-btn { background-color: #009688; height: 38px; line-height: 38px; border-radius: 2px; }
.layui-btn:hover { opacity: .9; color: #fff; }
.layui-btn-normal { background-color: #1E9FFF; }
.layui-btn-danger { background-color: #FF5722; }
.layui-btn-warm { background-color: #FFB800; }
.layui-btn-primary { background-color: #fff; border: 1px solid #c9c9c9; color: #555; }
.layui-btn-primary:hover { border-color: #009688; color: #009688; }

/* ---------- 列表页：工具条 + 搜索区（参考站：左 5/12 按钮，右 7/12 搜索） ---------- */
.layui-card-body::after { content: ''; display: block; clear: both; }
.layui-option-but .layui-btn { margin: 0 5px 10px 0; }
.layui-option-but { min-height: 48px; }
.layui-form-search { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.layui-form-search .layui-inline { display: flex; align-items: center; margin-bottom: 10px; }
.layui-form-search .layui-form-label {
  width: 60px; padding: 9px 15px; font-size: 14px; color: #666; text-align: right;
}
.layui-form-search .layui-input-inline { width: 120px; margin-right: 0; }
.layui-form-search .layui-input,
.layui-form-search select {
  height: 38px; border: 1px solid #e6e6e6; border-radius: 2px; font-size: 14px;
  padding: 0 0 0 10px; background: #fff; color: #333;
}
.layui-form-search .layui-btn { width: 57px; padding: 0; margin-bottom: 10px; }
.wb-table-wrap { clear: both; padding-top: 2px; width: 100%; }
.layui-table-box { width: 100%; }
.layui-table-header { background: #f2f2f2; }
.layui-table-header th { font-weight: 400; color: #666; }
.layui-table-view { border: 1px solid #e6e6e6; border-radius: 0; }

/* ---------- 表单 ---------- */
.wb-form-card { background: #fff; padding: 20px 20px 60px; border-radius: 2px; }
.wb-form-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px 20px;
  border-top: 1px solid #f2f2f2;
  margin: 0 -20px -60px;
}
.layui-form-label { width: 130px; font-size: 13px; color: #555; }
.layui-input-block { margin-left: 160px; }
.layui-form-item .layui-input-inline { margin-right: 10px; }

/* ---------- 表单 Tab（添加商品） ---------- */
.wb-tabs {
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 18px;
}
.wb-tabs a {
  display: inline-block;
  padding: 0 20px;
  height: 42px;
  line-height: 42px;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
}
.wb-tabs a.on { color: #00a65a; border-bottom-color: #00a65a; }

/* ---------- 图片上传组件 ---------- */
.wb-upload { display: inline-block; }
.wb-up-box {
  width: 90px;
  height: 90px;
  border: 1px dashed #d9d9d9;
  border-radius: 2px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}
.wb-up-box .wb-up-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-up-box .wb-up-ph { font-size: 26px; color: #c9c9c9; line-height: 1; }
.wb-up-tip { font-size: 12px; color: #999; margin-top: 4px; line-height: 18px; }

/* ---------- 权限树 ---------- */
.wb-perm-tree {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 2px;
}
.wb-perm-tree .grp {
  font-weight: 600;
  color: #333;
  margin: 8px 0 4px;
  border-bottom: 1px dashed #eee;
  padding-bottom: 4px;
}
.wb-perm-tree label {
  display: inline-block;
  min-width: 150px;
  font-size: 13px;
  color: #666;
  margin: 2px 0;
}

/* ---------- 徽标 ---------- */
.wb-badge { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 12px; }
.wb-badge.g { background: #e6f7f1; color: #0f9d76; }
.wb-badge.r { background: #fdecec; color: #d9534f; }
.wb-badge.o { background: #fff4e5; color: #e08a1e; }
.wb-badge.b { background: #eaf2ff; color: #2b7de9; }
.wb-tag {
  display: inline-block;
  padding: 0 6px;
  height: 20px;
  line-height: 20px;
  font-size: 12px;
  border-radius: 2px;
  background: #f2f2f2;
  color: #666;
  margin-left: 4px;
}

/* ---------- 无权限 ---------- */
.wb-noperm { padding: 100px 0; text-align: center; }
.wb-noperm i { font-size: 48px; color: #ffb800; }
.wb-noperm p { color: #666; margin-top: 14px; font-size: 15px; }

/* ---------- 登录页（蓝底卡片，对齐原站 #2D8CF0） ---------- */
.wb-login {
  min-height: 100vh;
  background: #2d8cf0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-login .box {
  width: 420px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
  padding: 26px 40px 34px;
  box-sizing: border-box;
}
.wb-login h1 {
  font-size: 22px;
  text-align: center;
  color: #2d8cf0;
  margin: 0 0 26px;
  font-weight: 400;
  letter-spacing: 1px;
}
.wb-login .layui-input {
  height: 38px;
  padding-left: 38px;
  border-color: #e2e2e2;
  font-size: 13px;
}
.wb-login .fi { position: relative; margin-bottom: 16px; }
.wb-login .fi .ic {
  position: absolute;
  left: 12px;
  top: 11px;
  font-size: 16px;
  color: #c2c2c2;
  z-index: 1;
}
.wb-login .fi .layui-input:focus { border-color: #2d8cf0; }
.wb-login .cap { display: flex; gap: 10px; }
.wb-login .cap .fi { flex: 1; margin-bottom: 0; }
.wb-login .cap img {
  width: 118px;
  height: 38px;
  border: 1px solid #e2e2e2;
  border-radius: 2px;
  cursor: pointer;
  background: #fff;
  display: block;
}
.wb-login .rem {
  color: #666;
  font-size: 13px;
  margin: 16px 0 20px;
  line-height: 20px;
}
.wb-login .rem input[type=checkbox] {
  -webkit-appearance: checkbox;
  appearance: auto;
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
  vertical-align: -2px;
  cursor: pointer;
  border: 1px solid #d2d2d2;
}
.wb-login .layui-btn {
  width: 100%;
  height: 44px;
  line-height: 44px;
  font-size: 14px;
  background: #0076fe;
  letter-spacing: 2px;
}
.wb-login .err {
  color: #d9534f;
  text-align: center;
  font-size: 13px;
  margin-bottom: 12px;
}
.wb-login .tip { text-align: center; color: #bbb; font-size: 12px; margin-top: 16px; }

/* ---------- 侧栏收起态（仅图标） ---------- */
body.wb-side-collapsed .layui-layout-admin .layui-side,
body.wb-side-collapsed .layui-layout-admin .layui-side-scroll,
body.wb-side-collapsed .layui-layout-admin .layui-side .layui-nav { width: 60px; }
body.wb-side-collapsed .layui-layout-admin .layui-logo { width: 60px; font-size: 0; }
body.wb-side-collapsed .layui-layout-admin .layui-side .layui-nav-item a { font-size: 0; }
body.wb-side-collapsed .layui-layout-admin .layui-side .layui-nav-item a i {
  font-size: 19px;
  margin-bottom: 0;
}
body.wb-side-collapsed .layui-layout-admin .layui-layout-left { left: 60px; }
body.wb-side-collapsed .wb-subnav { left: 60px; }
body.wb-side-collapsed .layui-layout-admin .layui-body { left: 175px; }
body.wb-side-collapsed .layui-layout-admin .layui-body.no-sub { left: 60px; }

/* ---------- layui 卡片（对齐原站 layuiadmin 风格） ---------- */
.layui-card { border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.layui-card-header {
  height: 42px;
  line-height: 42px;
  padding: 0 15px;
  border-bottom: 1px solid #f6f6f6;
  font-size: 14px;
  color: #333;
}
.layui-card-body { padding: 15px; }
.layuiadmin-card-list { padding: 0 15px 10px; }
.layuiadmin-card-list p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #666;
  line-height: 24px;
}
.layuiadmin-big-font {
  font-size: 26px;
  color: #333;
  line-height: 1.25;
  margin: 4px 0 8px;
  font-weight: 400;
}
.layuiadmin-span-color {
  color: #999;
  font-size: 13px;
  float: right;
}

/* 栅格用 flex，避免 float 因卡片高度不齐而错位 */
.layui-row.layui-col-space15 {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.layui-row.layui-col-space15 > [class*="layui-col-"] {
  box-sizing: border-box;
}
.layui-row.layui-col-space15 > .layui-col-md3 { flex: 0 0 25%; max-width: 25%; }
.layui-row.layui-col-space15 > .layui-col-md6 { flex: 0 0 50%; max-width: 50%; }
.layui-row.layui-col-space15 > .layui-col-md9 { flex: 0 0 75%; max-width: 75%; }
.layui-row.layui-col-space15 > .layui-col-md12,
.layui-row.layui-col-space15 > .layui-col-sm12 { flex: 0 0 100%; max-width: 100%; }
.layui-row.layui-col-space15 > [class*="layui-col-"] > .layui-card { height: 100%; }

/* ---------- 响应式 ---------- */
@media screen and (max-width: 992px) {
  .wb-stat { flex: 0 0 50%; max-width: 50%; }
}
@media screen and (max-width: 560px) {
  .wb-stat { flex: 0 0 100%; max-width: 100%; }
  .wb-login .box { width: 92%; padding: 22px 20px 28px; }
}

/* 表格行内操作按钮（对齐参考站 admin.css .table-btn） */
.table-btn{height:28px;line-height:26px;margin:5px 2px 0;padding:0 10px;min-width:55px;border:1px solid #dedede;background-color:#fff;color:#555;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none;font-size:12px}
.table-btn:hover{border-color:#009688;color:#009688}

/* 控制台折线图图例 */
.wb-chart-legend{text-align:center;padding:6px 0 2px;color:#666;font-size:12px}
.wb-chart-legend span{margin:0 12px}
.wb-chart-legend i{display:inline-block;width:10px;height:3px;background:#999;vertical-align:middle;margin-right:5px}
