/* 种业企业会员展示平台 - 全站样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 卡片样式 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

/* 首页卡片网格：宽屏一行6个，中等屏5/4个，窄屏2列，手机1列 */
.home-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.home-card-grid .card img {
  aspect-ratio: 1 / 1;
  height: auto;
}

/* 卡片顶部标题区背景色（从卡片上边缘覆盖到标题行）：企业绿 / 招聘蓝 / 展会橙 */
.card-head {
  padding: 10px 15px;
}
.card-head h4 {
  margin: 0;
  font-size: 15px;
  color: #2c3e50;
}
.card-head.head-company {
  background: #f0f9eb;
  border-bottom: 1px solid #b7e4a5;
}
.card-head.head-recruit {
  background: #eaf4fe;
  border-bottom: 1px solid #bcdcf5;
}
.card-head.head-exhibition {
  background: #fdf6ec;
  border-bottom: 1px solid #f5cba7;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s;
}

.card:hover { transform: translateY(-3px); }

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body { padding: 15px; }

.card-body h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #2c3e50;
}

.card-body .company {
  color: #7f8c8d;
  font-size: 14px;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  background: #27ae60;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn:hover { background: #229954; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 8px; font-size: 12px; }
.btn-primary { background: #2980b9; }
.btn-block { display: block; width: 100%; text-align: center; }

/* 快捷操作按钮组：PC/平板一行自适应等宽铺满，空间不足时按按钮整体换行（不会出现按钮内文字折行） */
.shortcut-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.shortcut-btns .btn {
  flex: 1 1 auto;
  white-space: nowrap;
  margin: 0;
}

/* 底部TabBar */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.tab-item {
  text-decoration: none;
  color: #7f8c8d;
  font-size: 14px;
  padding: 5px 10px;
}

.tab-item.active {
  color: #27ae60;
  font-weight: bold;
}

/* 底部版权 */
.footer {
  text-align: center;
  padding: 20px;
  color: #95a5a6;
  font-size: 13px;
  margin-bottom: 50px;
}

.footer a { color: #95a5a6; text-decoration: none; }

/* 登录页面 */
.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 60px;
}

.login-container {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  max-width: 400px;
  width: 90%;
}

.login-container h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 22px;
}

.login-form { margin-bottom: 20px; }

/* 登录Tab切换 */
.login-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.login-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: #7f8c8d;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.login-tab.active {
  color: #27ae60;
  border-bottom-color: #27ae60;
  font-weight: bold;
}

.login-tab:hover {
  color: #27ae60;
}

.login-form h3 {
  color: #34495e;
  margin-bottom: 15px;
  font-size: 16px;
}

.form-group { margin-bottom: 15px; }

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.divider {
  text-align: center;
  color: #95a5a6;
  margin: 20px 0;
  position: relative;
}

.register-link {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.register-link a { color: #2980b9; }

.alert {
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

.alert-error { background: #fee; color: #c0392b; border: 1px solid #fcc; }
.alert-success { background: #efe; color: #27ae60; border: 1px solid #cfc; }

/* 作物分类页布局 */
.crop-layout {
  display: flex;
  gap: 20px;
}

.sidebar {
  width: 220px;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* 列表/筛选页：侧边栏吸顶 + 内部滚动。右侧内容很长时，一级/二级菜单始终停留在当前屏可直接点击 */
.crop-layout > .sidebar {
  position: sticky;
  top: 64px;
  align-self: flex-start;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.crop-layout > .sidebar::-webkit-scrollbar {
  width: 6px;
}
.crop-layout > .sidebar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.sidebar h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #2c3e50;
  padding-bottom: 10px;
  border-bottom: 2px solid #27ae60;
}

.category-list { list-style: none; }

.category-item {
  margin-bottom: 8px;
}

.category-item a {
  display: block;
  padding: 8px 12px;
  color: #34495e;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.category-item.active > a {
  background: #27ae60;
  color: #fff;
}

/* 省市区两级样式 */
.province-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.province-header:hover {
  background: #ecf0f1;
}

.province-header span {
  flex: 1;
  color: #34495e;
  font-weight: 500;
}

.province-header.active span {
  background: #27ae60;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
}

.toggle-icon {
  font-size: 12px;
  color: #7f8c8d;
  transition: transform 0.2s;
}

.crop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.crop-header:hover {
  background: #ecf0f1;
}

.crop-header a,
.crop-header span {
  flex: 1;
  color: #34495e;
  text-decoration: none;
  font-weight: 500;
}

/* 一级选中态：与公司/招聘页(province-header.active)一致，仅文字块高亮，不做整行铺绿 */
.crop-header.active span,
.crop-header.active a {
  background: #27ae60;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
}

.all-item {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  color: #2c3e50;
  transition: background 0.2s;
}

.all-item:hover {
  background: #ecf0f1;
}

.all-item.active {
  background: #27ae60;
  color: #fff;
}

/* ============ 后台弹窗（移动端适配） ============ */
.modal-mask {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 15px;
}
.modal-mask.show {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
}
.modal-box h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}
.modal-box .form-group {
  margin-bottom: 12px;
}
.modal-box .form-group label {
  display: block;
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 4px;
}
.modal-box input[type="text"],
.modal-box input[type="password"],
.modal-box input[type="number"],
.modal-box select,
.modal-box textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.modal-actions .btn {
  flex: 1;
}

/* 后台管理卡片（移动端友好） */
.admin-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.admin-card h4 {
  color: #2c3e50;
  margin-bottom: 6px;
  word-break: break-all;
}
.admin-card .meta {
  color: #7f8c8d;
  font-size: 13px;
  line-height: 1.6;
}
.admin-card .card-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.admin-card .tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.tag-green { background: #e8f8f0; color: #27ae60; }
.tag-orange { background: #fdf3e7; color: #e67e22; }
.tag-red { background: #fdeeee; color: #e74c3c; }
.tag-gray { background: #f0f0f0; color: #7f8c8d; }

/* 区域勾选树（弹窗内，省份卡片式响应式多列） */
.region-tree {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  align-items: start;
}
.region-tree .rt-province {
  margin-bottom: 0;
  border: 1px solid #e8ecef;
  border-radius: 6px;
  background: #fafbfc;
  padding: 4px 6px;
}
.region-tree .rt-province:has(input[data-rtype="province"]:checked) {
  border-color: #27ae60;
  background: #f2fbf6;
}
/* 展开时卡片占满整行，城市在整个区域框宽度内多列铺开 */
.region-tree .rt-province.rt-expanded {
  grid-column: 1 / -1;
}
.region-tree .rt-prov-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
/* 覆盖表单全局 input 100%宽度，勾选框保持正常尺寸方便点击 */
.region-tree input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  flex: none;
}
.region-tree .rt-prov-row > span {
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.region-tree .rt-name {
  cursor: pointer;
}
.region-tree .rt-cities {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px dashed #e0e4e8;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.region-tree .rt-expanded .rt-cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
}
.region-tree .rt-cities label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  white-space: nowrap;
}
/* 手机端：弹窗边距收窄，区域树单列铺满，省名完整显示 */
@media (max-width: 480px) {
  .modal-mask { padding: 8px; }
  .modal-box { padding: 12px; }
  .region-tree { padding: 6px; grid-template-columns: 1fr; gap: 5px; }
}

/* 作物二级分类卡片网格：宽屏一行4~6个，窄屏自动递减 */
.crop-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.crop-card-grid .admin-card {
  margin-bottom: 0;
  padding: 12px;
}
.crop-card-grid .admin-card h4 {
  font-size: 15px;
  text-align: center;
}
.crop-card-grid .admin-card .meta {
  text-align: center;
  font-size: 12px;
}
.crop-card-grid .card-btns {
  justify-content: center;
}
@media (max-width: 480px) {
  .crop-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 代理商会员卡片网格：PC一行3列、平板2列、手机1列（三端自由响应） */
.company-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.company-card-grid .admin-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.company-card-grid .admin-card .meta {
  flex: 1;
}
.company-card-grid .admin-card h4 {
  font-size: 15px;
}
.company-card-grid .form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.company-card-grid .form-inline select,
.company-card-grid .form-inline input {
  padding: 5px;
  font-size: 13px;
}
@media (max-width: 1024px) {
  .company-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .company-card-grid {
    grid-template-columns: 1fr;
  }
}

.city-list {
  list-style: none;
  margin-left: 15px;
  margin-top: 5px;
}

.city-item {
  margin-bottom: 4px;
}

.city-item a {
  display: block;
  padding: 6px 12px;
  color: #7f8c8d;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
}

.city-item a:hover {
  background: #ecf0f1;
  color: #27ae60;
}

.city-item.active a {
  background: #27ae60;
  color: #fff;
}

/* 三级：区县列表（缩进更深、字号更小，与省/市形成层次） */
.district-list {
  list-style: none;
  margin-left: 12px;
  margin-top: 4px;
}

.district-item {
  margin-bottom: 3px;
}

.district-item a {
  display: block;
  padding: 5px 10px;
  color: #95a5a6;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
}

.district-item a:hover {
  background: #ecf0f1;
  color: #27ae60;
}

.district-item.active a {
  background: #27ae60;
  color: #fff;
}

.sub-category {
  list-style: none;
  margin-left: 15px;
  margin-top: 5px;
}

.sub-category li.active a {
  background: #27ae60;
  color: #fff;
}

.sub-category li.empty-sub {
  font-size: 13px;
  color: #bdc3c7;
  padding: 5px 10px;
}

.sub-category li a {
  font-size: 13px;
  color: #7f8c8d;
  padding: 5px 10px;
}

.content {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.empty-tip {
  text-align: center;
  color: #95a5a6;
  padding: 40px 0;
}

/* 公司详情页 */
.company-layout {
  display: flex;
  gap: 20px;
}

/* 公司详情页：侧边菜单固定不动，右侧内容滚动 */
.company-detail .sidebar {
  position: sticky;
  top: 15px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.detail-menu {
  list-style: none;
}

.detail-menu li {
  margin-bottom: 8px;
}

.detail-menu li a {
  display: block;
  padding: 10px 12px;
  color: #34495e;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.detail-menu li.active a {
  background: #27ae60;
  color: #fff;
}

.activity-info {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #7f8c8d;
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #2c3e50;
  padding-bottom: 8px;
  border-bottom: 2px solid #27ae60;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th, .info-table td {
  padding: 10px;
  border: 1px solid #eee;
  text-align: left;
  font-size: 14px;
}

.info-table th {
  background: #f8f9fa;
  width: 150px;
  color: #34495e;
}

.exhibition-item, .recruit-item {
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 4px;
  margin-bottom: 10px;
}

.salary {
  color: #e74c3c;
  margin-left: 10px;
  font-size: 14px;
}

/* 产品详情页 */
.product-header {
  display: flex;
  gap: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-header img {
  width: 300px;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.product-info h1 {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 10px;
}

.product-info .company a {
  color: #2980b9;
  text-decoration: none;
}

.views {
  color: #95a5a6;
  font-size: 13px;
  margin-top: 10px;
}

/* 企业主页活跃度徽章 */
.activity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: #f0f1f3;
  color: #8a9199;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* 活跃度高亮分级：绿=很活跃 蓝=活跃 橙=一般 红=偏低 灰=未活跃 */
.activity-lv1 { background: #e7f6ec; color: #1e9e4f; }
.activity-lv2 { background: #eaf2fe; color: #1d6fd1; }
.activity-lv3 { background: #fdf2e0; color: #c07f16; }
.activity-lv4 { background: #fdecec; color: #cf3f3f; }
.activity-lv0 { background: #f0f1f3; color: #8a9199; }

.product-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.intro-section, .certificates-section {
  margin-bottom: 30px;
}

.certificates-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.certificate-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.certificate-card h4 {
  font-size: 16px;
  color: #27ae60;
  margin-bottom: 12px;
}

.cert-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.cert-table th, .cert-table td {
  padding: 8px 10px;
  border: 1px solid #eee;
  font-size: 14px;
  text-align: left;
}

.cert-table th {
  background: #f8f9fa;
  width: 140px;
}

.cert-image {
  max-width: 100%;
  border-radius: 4px;
}

/* ============ 产品详情页证书：两行文字 + 缩略图 ============ */
.cert-lines {
  margin-bottom: 12px;
}
.cert-line {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 2;
}
.cert-label {
  flex: 0 0 auto;
  min-width: 60px;
  white-space: nowrap;
  color: #7f8c8d;
}
.cert-value {
  color: #2c3e50;
  font-weight: 600;
  word-break: break-all;
}
.cert-thumb {
  display: block;
  width: 84px;
  height: 112px;
  object-fit: cover;
  background: #fafafa;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  cursor: zoom-in;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cert-thumb:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

/* ============ 证书查看弹窗（验证码 + 带水印大图） ============ */
.cert-modal-box {
  max-width: 820px;
  padding: 16px;
}
.cert-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cert-modal-head h3 {
  margin: 0;
  font-size: 16px;
}
.cert-modal-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f1f1f1;
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cert-modal-close:hover {
  background: #e6e6e6;
  color: #333;
}
.cert-verify-tip {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 12px;
}
.cert-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cert-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 132px;
  height: 50px;
  padding: 0 12px;
  background: linear-gradient(135deg, #f4f9f4, #eef7ff);
  border: 1px solid #dfe6e9;
  border-radius: 6px;
  user-select: none;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: Georgia, "Times New Roman", serif;
}
.cert-code span {
  display: inline-block;
}
/* 服务端签发的图片验证码：图片里是要认的字，答案不在前端 */
.cert-code-img {
  flex: 0 0 auto;
  width: 132px;
  height: 50px;
  border: 1px solid #dfe6e9;
  border-radius: 6px;
  background: #f4f6f8;
  cursor: pointer;
  user-select: none;
}
.cert-code-refresh {
  border: 1px solid #d9ead0;
  background: #fff;
  color: #27ae60;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.cert-code-refresh:hover {
  background: rgba(39, 174, 96, 0.08);
}
.cert-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.cert-input-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  letter-spacing: 2px;
}
.cert-input-row .btn {
  flex: 0 0 auto;
}
.cert-error {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
  color: #e74c3c;
}
.cert-view-canvas {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.cert-view-canvas img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  margin: 0 auto;
  border-radius: 4px;
}
.cert-watermark {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.cert-watermark-item {
  position: absolute;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  color: rgba(39, 174, 96, 0.3);
  transform: rotate(-28deg);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
@media (max-width: 768px) {
  .cert-thumb {
    width: 70px;
    height: 94px;
  }
  .cert-modal-box {
    padding: 12px;
  }
  .cert-code {
    min-width: 110px;
    height: 44px;
    font-size: 20px;
  }
  .cert-code-img {
    width: 110px;
    height: 44px;
  }
  .cert-view-canvas img {
    max-height: 58vh;
  }
  .cert-watermark-item {
    font-size: 12px;
  }
}

/* 列表组 */
.list-group { margin-top: 15px; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 4px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 响应式 */
@media (max-width: 768px) {
  /* 列表页/详情页：保留左侧窄侧边栏（约4个汉字宽度），与电脑端同构，右侧内容自适应 */
  .crop-layout, .company-layout {
    gap: 10px;
  }

  .sidebar {
    width: 90px;
    padding: 10px 8px;
  }

  .sidebar h3 {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    text-align: center;
  }

  .category-item a,
  .all-item {
    padding: 6px 4px;
    text-align: center;
    font-size: 13px;
  }

  .province-header,
  .crop-header {
    padding: 6px 4px;
    justify-content: center;
  }

  .province-header span,
  .crop-header a,
  .crop-header span {
    flex: none;
    text-align: center;
  }

  .city-list,
  .sub-category {
    margin-left: 0;
  }

  .city-item a {
    padding: 4px 2px;
    text-align: center;
    font-size: 12px;
  }

  .detail-menu li a {
    padding: 8px 4px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-header {
    flex-direction: column;
  }

  .product-header img {
    width: 100%;
    height: auto;
  }

  .home-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  /* 手机：首页卡片一行两列（电商风），gap 收窄提高空间利用率 */
  .home-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  /* 两列卡片变窄：内边距/字号收小；产品名最多两行、其他文本单行省略号，保证整齐等高 */
  .home-card-grid .card-body { padding: 10px; }
  .home-card-grid .card-head { padding: 8px 10px; }
  .home-card-grid .card-body h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
  }
  .home-card-grid .card-head h4 { font-size: 14px; }
  .home-card-grid .card-head h4,
  .home-card-grid .card-body p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-card-grid .card-body .company { font-size: 13px; }
  .home-card-grid .btn-sm { padding: 5px 10px; font-size: 12px; }

  /* 手机：内容区窄，列表卡片单列铺满 */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* 手机：快捷操作按钮竖排通栏，点击区域更大更整齐 */
  .shortcut-btns {
    flex-direction: column;
  }
  .shortcut-btns .btn {
    width: 100%;
  }
}

/* 极窄屏（320px 档）：两列每张不足 140px 太挤，回退单列 */
@media (max-width: 360px) {
  .home-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ========== "我的"页面：左侧内容导航 + 右侧内容切换 ========== */
.profile-tab { display: none; }
.profile-tab.active { display: block; }

/* 弹窗内日期时间控件与「新增业绩」统计 */
.modal-box input[type="datetime-local"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 13px;
}
.perf-day-btn {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  color: #7f8c8d;
  background: #f0f2f5;
  margin-left: 6px;
  text-decoration: none;
}
.perf-day-btn.on {
  background: #27ae60;
  color: #fff;
}
/* 统计周期按钮组：窄屏时整组独占一行并允许换行，避免三个按钮挤在一行溢出 */
.perf-days {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}
.perf-days .perf-day-btn {
  margin-left: 0;
}
@media (max-width: 768px) {
  .perf-days {
    width: 100%;
  }
  .perf-days .perf-day-btn {
    padding: 5px 10px;
  }
}
.perf-num {
  font-size: 22px;
  font-weight: bold;
  margin: 4px 0 2px;
}
.perf-label { font-size: 12px; color: #7f8c8d; }
.ad-bar {
  height: 8px;
  background: #ecf0f1;
  border-radius: 4px;
  overflow: hidden;
}
.ad-bar > div {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #27ae60, #f1c40f);
}

/* 移动端：与列表页一致，保留左侧窄侧边栏（由全局 .sidebar 的 768 断点规则接管，不再横向滚动） */

/* ===== 首页区块分批展示（默认 3 行，点「查看更多」每次追加 3 行） ===== */
.loadmore-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 18px 0 4px;
}
.loadmore-bar[hidden] { display: none; }
.loadmore-bar .btn-more {
  background: #fff;
  border: 1px solid #27ae60;
  color: #27ae60;
  border-radius: 20px;
  padding: 7px 30px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.loadmore-bar .btn-more:hover { background: #27ae60; color: #fff; }
.loadmore-tip { font-size: 13px; color: #95a5a6; }

/* ===== 代理商产品列表：推荐时长三档选择 ===== */
.dur-options { display: flex; flex-wrap: wrap; gap: 8px; }
.dur-opt {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #bdc3c7;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.dur-opt:hover { border-color: #27ae60; }
.dur-opt input { accent-color: #27ae60; }
.dur-opt:has(input:checked) {
  border-color: #27ae60;
  background: #e8f8ee;
  color: #1e7e34;
  font-weight: bold;
}
.reco-end-show {
  margin: 0;
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px dashed #bdc3c7;
  border-radius: 6px;
  font-size: 13px;
  color: #2c3e50;
}

/* 企业LOGO：公司列表卡片与企业主页 */
/* 卡片头：公司名独占一行居中（首页最新入驻、公司列表页共用） */
.card-head.head-company {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.card-head.head-company h4 {
  text-align: center;
  line-height: 1.35;
}
/* 注意：必须压过 .card img{width:100%;height:180px;object-fit:cover} 与 .home-card-grid .card img，否则 logo 会被拉满卡片
   用 aspect-ratio 让高度跟随宽度，LOGO 框始终是正方形（不再出现竖长方形） */
.card-body .company-body-wrap > img.company-logo-sm,
.home-card-grid .card-body .company-body-wrap > img.company-logo-sm {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d9ead0;
  border-radius: 8px;
  padding: 4px;
}
/* 无 LOGO 时的占位块，与 LOGO 同样的正方形尺寸，保证左右各占一半的布局稳定 */
.card-body .company-body-wrap > .company-logo-ph {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fbf6;
  border: 1px dashed #d9ead0;
  border-radius: 8px;
  color: #b7c3b0;
  font-size: 12px;
}
/* 企业主页 / 展会详情页头部：grid 两列（LOGO + 信息列），
   grid 下拉伸才可靠，LOGO 高度才能取到右侧信息列的实际高度；
   间距用固定值，不用 :has（个别浏览器不支持会导致间距为 0、文字贴上 LOGO） */
.company-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
/* 展会详情页里该头部是 .product-header(flex) 的子项，需撑满剩余宽度 */
.product-header > .company-profile-head {
  flex: 1;
  min-width: 0;
}
/* 右侧信息列：允许收缩并强制折行，避免长标题/长简介横向溢出压到 LOGO 上 */
.company-profile-main,
.product-info {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* 大 LOGO（.logo-fit-lg）：用 <img> 承载，高度自动跟随右侧信息列（上限 168px），
   宽度按图片原始比例自动 —— 竖长/横长 logo 都保持原比例，不会被塞进方框留白或变形 */
.company-profile-head > img.logo-fit-lg {
  position: relative;
  z-index: 1;
  align-self: stretch;
  width: auto;
  height: auto;
  max-height: 168px;
  max-width: 320px;
  object-fit: contain;
  background-color: #fff;
  border: 1px solid #d9ead0;
  border-radius: 10px;
  padding: 6px;
}
/* 兜底：万一浏览器缓存了改版前的旧 HTML（div + 背景图），这里给个方块尺寸，避免塌成细条 */
.company-profile-head > div.logo-fit-lg {
  position: relative;
  z-index: 1;
  align-self: center;
  width: 127px;
  height: 127px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid #d9ead0;
  border-radius: 10px;
  padding: 6px;
}
@media (max-width: 768px) {
  .company-profile-head {
    align-items: flex-start;
    gap: 12px;
  }
  .company-profile-head > img.logo-fit-lg {
    align-self: flex-start;
    max-height: 68px;
    max-width: 160px;
  }
  .company-profile-head > div.logo-fit-lg {
    width: 68px;
    height: 68px;
  }
}

/* 企业卡片正文：左 LOGO + 右侧信息列，左右各占卡片一半
   首页「最新入驻企业」、公司列表页、展会参展企业共用同一套结构 */
.card-body .company-body-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-body .company-body-wrap > .company-body-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}
.card-body .company-body-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #7f8c8d;
}
/* 卡片内「进入主页」按钮：字号缩小 + 禁止换行，四个字保持一行 */
.card-body .company-body-wrap .btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .card-body .company-body-wrap > .company-logo-ph {
    font-size: 11px;
  }
}

/* 展会LOGO：展会列表卡片、展会详情页（风格与企业LOGO一致）
   仍需压过 .card img{width:100%;height:180px;object-fit:cover} */
.card-body .company-body-wrap > img.exhibition-logo-sm {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d9ead0;
  border-radius: 8px;
  padding: 4px;
}
.card-body .company-body-wrap > .exhibition-logo-ph {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fbf6;
  border: 1px dashed #d9ead0;
  border-radius: 8px;
  color: #b7c3b0;
  font-size: 12px;
}
/* 展会详情页大 LOGO 复用 .logo-fit-lg（样式定义见上文 .company-profile-head > .logo-fit-lg） */
/* 后台展会卡片 / 审核弹窗内的展会LOGO */
.exh-logo-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.exh-logo-row > .exh-logo-box {
  flex: 0 0 72px;
  width: 72px;
}
.exh-logo-box img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d9ead0;
  border-radius: 8px;
  padding: 4px;
}
.exh-logo-ph {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fbf6;
  border: 1px dashed #d9ead0;
  border-radius: 8px;
  color: #b7c3b0;
  font-size: 11px;
}
.exh-logo-row > .exh-logo-main {
  flex: 1 1 0;
  min-width: 0;
}
