@charset "utf-8";
/* ==============================================================
   后台管理样式
   ============================================================== */
* { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: "Microsoft YaHei", Arial, sans-serif; background: #f2f5f3; color: #333; font-size: 13px; }
a { color: #48b634; text-decoration: none; }
a:hover { color: #31b015; }

/* 顶部 */
.topbar { height: 60px; background: linear-gradient(90deg, #48b634, #31b015); color: #fff; display: flex; align-items: center; padding: 0 24px; position: fixed; left: 0; right: 0; top: 0; z-index: 100; }
.topbar .logo { font-size: 19px; font-weight: bold; }
.topbar .logo span { font-size: 12px; opacity: .8; font-weight: normal; margin-left: 8px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 13px; }
.topbar .right a { color: #fff; opacity: .92; }
.topbar .right a:hover { opacity: 1; text-decoration: underline; }

/* 布局 */
.sidebar { width: 200px; position: fixed; left: 0; top: 60px; bottom: 0; background: #fff; border-right: 1px solid #e6e6e6; overflow-y: auto; padding-top: 12px; }
.sidebar a { display: block; padding: 13px 22px; color: #444; font-size: 14px; border-left: 3px solid transparent; }
.sidebar a:hover { background: #f3f9f1; color: #31b015; }
.sidebar a.on { background: #eef7ec; color: #31b015; font-weight: bold; border-left-color: #31b015; }
.sidebar .group { padding: 14px 22px 6px; color: #999; font-size: 12px; letter-spacing: 1px; }

.main { margin: 60px 0 0 200px; padding: 22px 26px 60px; min-height: calc(100vh - 60px); }

/* 面板 */
.panel { background: #fff; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 20px; overflow: hidden; }
.panel-hd { padding: 14px 20px; border-bottom: 1px solid #eee; font-size: 15px; font-weight: bold; display: flex; align-items: center; gap: 12px; }
.panel-hd .fr { margin-left: auto; }
.panel-bd { padding: 20px; }

/* 表格 */
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { border-bottom: 1px solid #eee; padding: 11px 12px; text-align: left; font-size: 13px; }
.grid th { background: #fafbf9; color: #666; font-weight: normal; white-space: nowrap; }
.grid tr:hover td { background: #fafdf9; }
.grid td.opt a { margin-right: 8px; }
.grid .thumb { width: 56px; height: 42px; object-fit: cover; border: 1px solid #eee; border-radius: 3px; }

/* 表单 */
.form-row { display: flex; margin-bottom: 16px; align-items: flex-start; }
.form-row > label { width: 130px; text-align: right; padding-right: 14px; line-height: 34px; color: #555; }
.form-row > .field { flex: 1; max-width: 760px; }
.form-row .tip { color: #999; font-size: 12px; line-height: 26px; }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=email], select, textarea {
  border: 1px solid #ddd; border-radius: 4px; padding: 8px 10px; font-size: 13px; width: 100%; outline: none; font-family: inherit;
}
textarea { line-height: 22px; min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #48b634; }
input.inline { width: auto; display: inline-block; }

.btn { display: inline-block; padding: 9px 20px; border: 0; border-radius: 4px; background: #48b634; color: #fff; cursor: pointer; font-size: 13px; }
.btn:hover { background: #31b015; color: #fff; }
.btn.gray { background: #888; }
.btn.gray:hover { background: #666; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.btn.red { background: #d9534f; }
.btn.red:hover { background: #c9302c; }
.btn-row { padding-left: 130px; }
.btn-row .btn { margin-right: 10px; }

.msg-tip { padding: 11px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 13px; line-height: 22px; }
.msg-tip.success { background: #eef9ea; color: #2c7c1c; border: 1px solid #c3e6b6; }
.msg-tip.error, .msg-tip.err { background: #fdecec; color: #b33; border: 1px solid #f4c5c5; }
.msg-tip.info { background: #eaf3fd; color: #2c6fb5; border: 1px solid #bcdcf6; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eee; color: #666; }
.tag.on { background: #e4f4de; color: #31b015; }
.tag.off { background: #eee; color: #999; }

/* 统计卡片 */
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-box { flex: 1; min-width: 180px; background: #fff; border-radius: 6px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.05); border-left: 4px solid #31b015; }
.stat-box .num { font-size: 28px; font-weight: bold; color: #31b015; line-height: 40px; }
.stat-box .lbl { color: #888; font-size: 13px; }
.stat-box.orange { border-left-color: #f0ad4e; }
.stat-box.orange .num { color: #f0ad4e; }
.stat-box.blue { border-left-color: #5bc0de; }
.stat-box.blue .num { color: #5bc0de; }
.stat-box.gray { border-left-color: #999; }
.stat-box.gray .num { color: #777; }

/* 筛选条 */
.filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter input[type=text], .filter select { width: auto; min-width: 150px; }

/* 登录页 */
.login-wrap { width: 380px; margin: 10vh auto; background: #fff; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.12); overflow: hidden; }
.login-wrap .hd { background: linear-gradient(90deg, #48b634, #31b015); color: #fff; padding: 26px; text-align: center; }
.login-wrap .hd h2 { margin: 0; font-size: 20px; }
.login-wrap .hd p { margin: 6px 0 0; opacity: .9; font-size: 12px; }
.login-wrap .bd { padding: 26px 26px 30px; }
.login-wrap .field { margin-bottom: 16px; }
.login-wrap .field label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; }
.login-wrap .field input { height: 42px; }
.login-wrap .btn { width: 100%; height: 44px; line-height: 44px; font-size: 15px; padding: 0; }
.login-foot { text-align: center; color: #999; font-size: 12px; padding-top: 14px; }

/* 富文本编辑器 */
.wb-editor { border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.wb-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid #eee; background: #fafbf9; }
.wb-toolbar button { border: 1px solid #e2e2e2; background: #fff; border-radius: 3px; padding: 4px 9px; cursor: pointer; font-size: 12px; color: #444; }
.wb-toolbar button:hover { background: #eef7ec; border-color: #b9dfae; color: #31b015; }
.wb-toolbar input[type=color] { width: 28px; height: 26px; padding: 0; border: 1px solid #e2e2e2; background: #fff; cursor: pointer; }
.wb-area { min-height: 320px; padding: 14px; line-height: 24px; font-size: 14px; outline: none; }
.wb-area:focus { background: #fffdf7; }
.wb-src { display: none; width: 100%; min-height: 320px; border: 0; border-radius: 0; font-family: Consolas, Menlo, monospace; font-size: 13px; line-height: 22px; }
.wb-editor.src-on .wb-area { display: none; }
.wb-editor.src-on .wb-src { display: block; }

/* 上传按钮组 */
.up-wrap { display: flex; gap: 10px; align-items: center; }
.up-wrap .preview { width: 120px; height: 90px; border: 1px dashed #ccc; border-radius: 4px; object-fit: cover; background: #fafafa; }
.img-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.img-list .item { position: relative; }
.img-list .item img { width: 90px; height: 68px; object-fit: cover; border: 1px solid #eee; border-radius: 3px; }
.img-list .item span { position: absolute; right: -6px; top: -6px; background: #d9534f; color: #fff; border-radius: 50%; width: 18px; height: 18px; line-height: 18px; text-align: center; cursor: pointer; font-size: 12px; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .form-row > label { width: 92px; }
}
