/* 农业与生态产业平台 · 跨模块公共样式（导航条 / 页脚条 / 面包屑 / 溯源徽标） */
:root {
  --ag-accent: #2f7a5b;
  --ag-ink: #10241b;
}

.agbar {
  --ag-accent: #2f7a5b;
  position: relative;
  z-index: 80;
  background: #0d1512;
  color: #e8efe9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.agbar[data-mod="agri"] { --ag-accent: #2f7a5b; }
.agbar[data-mod="eco"] { --ag-accent: #1f5a43; }
.agbar[data-mod="herbal"] { --ag-accent: #77702f; }

.agbar__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.agbar__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
/* 防止 /agriculture/、/herbal/ 的全局 a 颜色把深色栏里的品牌字压暗 */
.agbar a.agbar__brand,
.agbar a.agbar__brand:hover { color: #ffffff; text-decoration: none; }
.agbar__brand em {
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #9fb3a6;
}

.agbar__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.agbar__nav::-webkit-scrollbar { display: none; }

/* 提高选择器优先级：/agriculture/ 与 /herbal/ 的全局 a 颜色规则不能覆盖胶囊文字 */
.agbar a.agbar__link {
  display: inline-block;
  padding: 6px 13px;
  border-radius: 999px;
  color: #d8e5dc;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.agbar a.agbar__link:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  text-decoration: none;
}
.agbar a.agbar__link:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  text-decoration: none;
  outline: 2px solid #9fd3b6;
  outline-offset: 2px;
}
.agbar a.agbar__link.is-active {
  background: var(--ag-accent);
  color: #ffffff;
}

.agfoot {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 28px;
  padding: 22px 0 8px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}
.agfoot__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.agfoot__note {
  margin: 0;
  max-width: 560px;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.72;
}
.agfoot__links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.agfoot__links a { color: inherit; opacity: 0.8; text-decoration: none; }
.agfoot__links a:hover { opacity: 1; text-decoration: underline; }
.agfoot__records {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 0;
  font-size: 12px;
}
.agfoot__records a { color: inherit; opacity: 0.72; text-decoration: none; }
.agfoot__records a:hover { opacity: 1; text-decoration: underline; }

/* 溯源徽标：三站共用 */
.ag-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.6;
  border: 1px solid currentColor;
  opacity: 0.85;
  white-space: nowrap;
}
.ag-badge--unsure { color: #9a6a12; }
.ag-badge.is-ok { color: #2f7a5b; }
.ag-badge.is-draft { color: #6b7280; }
.ag-badge.is-off { color: #a3413a; }
.ag-prov { font-size: 12px; opacity: 0.75; line-height: 1.6; }
.ag-prov a { color: inherit; }

/* 空态与分页：三站共用，避免各自复制一份 */
.ag-muted { opacity: 0.68; }
.ag-empty {
  border: 1px dashed rgba(16, 36, 27, 0.22);
  border-radius: 12px;
  padding: 22px 20px;
  margin: 18px 0;
  background: rgba(255, 255, 255, 0.6);
}
.ag-empty p { margin: 0 0 6px; }
.ag-empty__hint { font-size: 12.5px; opacity: 0.7; }
.ag-pager {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 4px;
  font-size: 13.5px;
}
.ag-pager__link {
  padding: 5px 12px;
  border: 1px solid rgba(16, 36, 27, 0.2);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
}
.ag-pager__link:hover { border-color: var(--ag-accent, #2f7a5b); }
.ag-pager__now { opacity: 0.7; }

@media (max-width: 640px) {
  .agbar__inner { padding: 8px 14px; gap: 10px; }
  .agbar__brand em { display: none; }
  .agbar__nav { margin-left: 0; width: 100%; }
  .agfoot { flex-direction: column; gap: 10px; }
}
