/* ===================================================================
   JatonProductInformationWeb —— 后台管理样式（layui 布局 + 响应式补充）
   =================================================================== */

/* ---------- 登录页 ---------- */
.admin-login-body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(135deg, #1c2b3a 0%, #1769d0 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  width: 380px; max-width: 92vw; background: #fff; border-radius: 14px;
  padding: 34px 32px; box-shadow: 0 16px 50px rgba(0,0,0,.25);
}
.login-logo {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 14px;
  background: #fff; border: 1px solid #eef2f7;
  display: flex; align-items: center; justify-content: center;
}
.login-logo img { width: 60px; height: 60px; display: block; }
.login-card h2 { text-align: center; font-size: 17px; color: #1c2b3a; margin: 0 0 24px; font-weight: 600; }

/* ---------- 后台框架 ---------- */
.admin-head {
  position: sticky; top: 0; z-index: 999;
  background: #1c2b3a; color: #fff; height: 54px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
}
.admin-head .h-brand { font-weight: 600; font-size: 16px; }
.admin-head .h-right a { color: #c6d2de; margin-left: 16px; font-size: 13px; }
.admin-head .h-right a:hover { color: #fff; }

.admin-body { display: flex; min-height: calc(100vh - 54px - 42px); }
.admin-side {
  width: 200px; flex-shrink: 0; background: #233447;
  padding-top: 12px; overflow-y: auto;
}
.admin-side .menu a {
  display: block; color: #c6d2de; padding: 13px 20px; font-size: 14px;
  border-left: 3px solid transparent; transition: .2s;
}
.admin-side .menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side .menu a.active { background: #1769d0; color: #fff; border-left-color: #2b9aff; }
.admin-main { flex: 1; background: #f4f6f9; padding: 18px; overflow: auto; }
.admin-main iframe { width: 100%; height: calc(100vh - 90px - 42px); border: 0; background: #f4f6f9; }

/* 后台页脚：贴住视口底部，切换菜单始终显示 */
.jpi-admin-footer {
  height: 42px; line-height: 42px; background: #1c2b3a; color: #8fa2b5;
  text-align: center; font-size: 12px;
}

.admin-page { background: #fff; border-radius: 10px; padding: 20px; min-height: 70vh; }
.admin-page .layui-card { box-shadow: none; }
.page-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.page-tools .spacer { flex: 1; }

/* 封面缩略 */
.cover-thumb {
  width: 66px; height: 42px; border-radius: 6px; background: #dde4ec; background-size: cover;
  background-position: center; display: flex; align-items: center; justify-content: center;
  color: #8aa0b8; font-size: 12px;
}

/* ---------- 手机端适配 ---------- */
@media (max-width: 768px) {
  .admin-body { flex-direction: column; }
  .admin-side { width: 100%; display: flex; overflow-x: auto; padding: 0; }
  .admin-side .menu { display: flex; }
  .admin-side .menu a { border-left: 0; border-bottom: 3px solid transparent; padding: 12px 16px; white-space: nowrap; }
  .admin-side .menu a.active { border-bottom-color: #2b9aff; }
  .admin-main { padding: 12px; }
  .admin-page { padding: 14px; }
  .layui-table-view { overflow-x: auto; }

  /* 页眉：标题不换行省略 + 右侧紧凑 */
  .admin-head { padding: 0 10px; }
  .admin-head .h-brand {
    font-size: 14px; flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .admin-head .h-right a { margin-left: 8px; font-size: 12px; white-space: nowrap; }

  /* 工具栏：筛选/搜索占满一行，按钮换行紧凑 */
  .page-tools { gap: 8px; }
  .page-tools #industrySel { width: 100% !important; }
  .page-tools #kwBox { width: 100% !important; }
  .page-tools .layui-btn { flex: 1 1 auto; padding: 0 10px; white-space: nowrap; }
}

@media (max-width: 520px) {
  .admin-head { height: 48px; }
  .admin-head .h-brand { font-size: 13px; }
  .admin-head .h-right a#curUser {
    max-width: 110px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; display: inline-block; vertical-align: middle;
  }
  .page-tools .layui-btn { flex: 1 1 46%; text-align: center; }
}
