/* 练字猫咪 · 管理后台（lianzi.artv.cn）
 * 骨架借鉴 hdh.artv.cn/template/web：白底顶栏 + 深色侧栏分组菜单 + 主区卡片。
 * 主色跟模板走 #1472ff；品牌点缀用小程序同款金/橙不抢戏。 */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f7fa; }

/* ---- 登录页 ---- */
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1c2b45 0%, #274b8f 55%, #1472ff 130%);
}
.login-card {
  width: 400px; padding: 42px 40px 34px; background: #fff; border-radius: 12px;
  box-shadow: 0 18px 60px rgba(10, 25, 60, .35);
}
.login-logo { text-align: center; font-size: 46px; line-height: 1; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; color: #1f2d3d; margin: 12px 0 4px; }
.login-sub { text-align: center; font-size: 12px; color: #909399; margin-bottom: 26px; }
.login-btn { width: 100%; margin-top: 6px; }
.login-fine { margin-top: 16px; text-align: center; font-size: 12px; color: #c0c4cc; }

/* ---- 布局 ---- */
.layout { height: 100%; }
.aside {
  background: #1f2d3d; color: #bfcbd9; width: 220px; overflow-y: auto;
}
.aside::-webkit-scrollbar { width: 4px; }
.aside::-webkit-scrollbar-thumb { background: #3a4a5f; border-radius: 2px; }
.brand {
  height: 60px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.aside .el-menu { border-right: none; background: transparent; }
.aside .el-menu-item, .aside .el-sub-menu__title { color: #bfcbd9; }
.aside .el-menu-item:hover, .aside .el-sub-menu__title:hover { background: #263445; }
.aside .el-menu-item.is-active { background: #1472ff; color: #fff; }
.header {
  height: 60px; background: #fff; display: flex; align-items: center; padding: 0 24px;
  border-bottom: 1px solid #e6e9f0; justify-content: space-between;
}
.header-crumb { font-size: 15px; color: #303133; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 14px; }
.main { padding: 16px; overflow-y: auto; background: #f5f7fa; }

/* ---- 工作台 ---- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi-card {
  background: #fff; border-radius: 8px; padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0,21,41,.06);
}
.kpi-label { font-size: 13px; color: #909399; }
.kpi-value { font-size: 28px; font-weight: 700; color: #1f2d3d; margin-top: 6px; }
.kpi-value.warn { color: #e6a23c; }
.kpi-value.money { color: #1472ff; }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.dash-card { background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,21,41,.06); }
.dash-title { font-size: 14px; font-weight: 600; color: #303133; margin-bottom: 12px; }

/* ---- 列表页通用 ---- */
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.page-card { background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,21,41,.06); }
.pager { margin-top: 14px; display: flex; justify-content: flex-end; }
.state-tag { cursor: default; }
.mono { font-family: Consolas, Monaco, monospace; font-size: 12px; }
.muted { color: #909399; }
.w100 { width: 100%; }

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ---- 商品发布页（v4.86.526 · 小鹅通式整页表单）---- */
.gf-head { margin-bottom: 14px; }
.gf-title { font-size: 18px; font-weight: 700; color: #1f2d3d; margin: 6px 0 4px; }
.gf-card {
  background: #fff; border: 1px solid #e6e9f0; border-radius: 10px;
  padding: 16px 20px; margin-bottom: 14px; max-width: 860px;
}
.gf-sec { font-size: 15px; font-weight: 600; color: #303133; margin-bottom: 14px; }
.gf-pic-label { font-size: 13px; color: #606266; margin: 10px 0 8px; }
.gf-up-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.gf-up {
  width: 110px; height: 110px; border: 1px dashed #c0c8d4; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #909399; cursor: pointer; background: #fafbfc; transition: border-color .15s, color .15s;
  user-select: none;
}
.gf-up:hover { border-color: #1472ff; color: #1472ff; }
.gf-up.busy { opacity: .55; pointer-events: none; }
.gf-up > div:first-child { font-size: 26px; line-height: 1; }
.gf-up-t { font-size: 12px; margin-top: 6px; }
.gf-up-cover { width: 140px; height: 140px; }
.gf-up-wide { width: 100%; height: 72px; flex-direction: row; gap: 10px; }
.gf-up-wide > div:first-child { font-size: 22px; }
.gf-thumb { position: relative; width: 110px; height: 110px; border-radius: 8px; overflow: hidden; border: 1px solid #e6e9f0; }
.gf-thumb-cover { width: 140px; height: 140px; }
.gf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-thumb-mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: rgba(0,0,0,.45); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.gf-thumb:hover .gf-thumb-mask { opacity: 1; }
.gf-thumb-mask span { cursor: pointer; }
.gf-up-col { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.gf-drow {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border: 1px solid #e6e9f0; border-radius: 8px; background: #fafbfc;
}
.gf-dno {
  width: 22px; height: 22px; border-radius: 50%; background: #1472ff; color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none;
}
.gf-dimg { height: 64px; width: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.gf-dops { display: flex; gap: 14px; margin-left: auto; }
.gf-foot { margin-top: 16px; display: flex; gap: 10px; }
.gl-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.gl-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f5; color: #909399; font-size: 12px;
}

@media (max-width: 768px) {
  .gf-card { padding: 12px; }
  .gf-up, .gf-thumb { width: 88px; height: 88px; }
  .gf-up-cover, .gf-thumb-cover { width: 110px; height: 110px; }
  .gf-drow { flex-wrap: wrap; }
  .gf-dops { margin-left: 34px; }
}

/* ---- 手机自动适配（≤768px：侧栏变抽屉 + 窄屏重排） ---- */
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-row .el-button { margin-left: 0; }
.header-left { display: flex; align-items: center; }
.hamburger { display: none; font-size: 22px; cursor: pointer; color: #303133; margin-right: 10px; }
.mask { display: none; }
@media (max-width: 768px) {
  .login-card { width: 92vw; max-width: 400px; padding: 30px 22px 24px; }
  .aside {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 2001;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .aside.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.3); }
  .mask {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 2000;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .mask.show { opacity: 1; pointer-events: auto; }
  .hamburger { display: inline-flex; align-items: center; }
  .header { padding: 0 12px; }
  .header-crumb { font-size: 13px; }
  .header-right { gap: 8px; }
  .header-right .muted { display: none; }
  .main { padding: 8px; }
  .page-card, .dash-card { padding: 12px; overflow-x: auto; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-card { padding: 12px 14px; }
  .kpi-value { font-size: 22px; }
  .pager { justify-content: center; }
  .el-dialog { width: 92% !important; max-width: 92vw !important; }
  .el-message-box, .el-drawer { width: 92% !important; max-width: 92vw !important; }
  .toolbar .el-input, .toolbar .el-select { width: 100% !important; }
}
