.nav-menu a.active { color: var(--primary); font-weight: 700; }
body.theme-mojin { --primary:#1B2838;--primary-dark:#111b27;--primary-light:#42566d;--primary-soft:#eef1f4;--accent:#C9A961;--gradient:linear-gradient(135deg,#1B2838,#111b27);--gradient-soft:linear-gradient(135deg,#eef1f4,#fff);--shadow-primary:0 8px 24px rgba(27,40,56,.2); }
body.theme-zijin { --primary:#4A2C5A;--primary-dark:#321d3e;--primary-light:#765086;--primary-soft:#f3edf6;--accent:#D4AF37;--gradient:linear-gradient(135deg,#4A2C5A,#321d3e);--gradient-soft:linear-gradient(135deg,#f3edf6,#fff);--shadow-primary:0 8px 24px rgba(74,44,90,.2); }
body.theme-yuebai { --primary:#5B7C99;--primary-dark:#405d76;--primary-light:#7f9bb2;--primary-soft:#eef4f8;--accent:#A8B5C0;--gradient:linear-gradient(135deg,#5B7C99,#405d76);--gradient-soft:linear-gradient(135deg,#eef4f8,#fff);--shadow-primary:0 8px 24px rgba(91,124,153,.2); }
body.theme-zhusa { --primary:#B22222;--primary-dark:#861818;--primary-light:#d34a4a;--primary-soft:#fbeeee;--accent:#D4A574;--gradient:linear-gradient(135deg,#B22222,#861818);--gradient-soft:linear-gradient(135deg,#fbeeee,#fff);--shadow-primary:0 8px 24px rgba(178,34,34,.2); }
body.theme-yaolan { --primary:#0F4C81;--primary-dark:#09365d;--primary-light:#3876aa;--primary-soft:#eaf2f9;--accent:#5B9BD5;--gradient:linear-gradient(135deg,#0F4C81,#09365d);--gradient-soft:linear-gradient(135deg,#eaf2f9,#fff);--shadow-primary:0 8px 24px rgba(15,76,129,.2); }
body.theme-dailv { --primary:#2D4A3E;--primary-dark:#1c3028;--primary-light:#587568;--primary-soft:#edf4f1;--accent:#8FBC8F;--gradient:linear-gradient(135deg,#2D4A3E,#1c3028);--gradient-soft:linear-gradient(135deg,#edf4f1,#fff);--shadow-primary:0 8px 24px rgba(45,74,62,.2); }
body.theme-xuantie { --primary:#2C2C2C;--primary-dark:#171717;--primary-light:#555;--primary-soft:#f1f1f1;--accent:#8C8C8C;--gradient:linear-gradient(135deg,#2C2C2C,#171717);--gradient-soft:linear-gradient(135deg,#f1f1f1,#fff);--shadow-primary:0 8px 24px rgba(44,44,44,.2); }
.template-alert { margin: 0 0 18px; padding: 12px 16px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); }
.template-alert.error { background: #fff0f0; color: #a71920; }
.cover-placeholder { height: 100%; min-height: 120px; background: var(--gradient-soft); display: grid; place-items: center; color: var(--primary); font-size: 28px; font-weight: 800; }
.theme-picker { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.theme-picker-header, .theme-picker-footer { padding: 16px; background: var(--bg-section); }
.theme-picker-header h4 { margin-bottom: 4px; }
.theme-picker-header p, .theme-picker-footer { color: var(--text-3); font-size: 13px; }
.theme-picker-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 16px; }
.theme-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; }
.theme-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.theme-card-swatch { height: 58px; position: relative; }
.theme-card-check { position: absolute; right: 8px; top: 7px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.theme-card-info { padding: 10px; }
.theme-card-name { font-weight: 700; }
.theme-card-en, .theme-card-desc { color: var(--text-3); font-size: 11px; }
.theme-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.theme-tag { padding: 2px 6px; background: var(--bg-section); border-radius: 4px; font-size: 10px; }
.detail-content img, .rich-content img { height: auto; margin: 20px auto; }
.company-article-images.single { grid-template-columns: 1fr; }
.company-article-images .cover-placeholder { min-height: 190px; }
.company-message-status { margin-top: 10px; min-height: 22px; color: var(--primary); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.event-date { width: 64px; flex: 0 0 64px; text-align: center; padding: 10px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.event-date strong { display: block; font-size: 24px; line-height: 1; }
.event-date span { font-size: 12px; }
.events-list .news-list-item { grid-template-columns: 76px 1fr; }
@media (max-width: 760px) {
  .theme-picker-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-header .brand-sub { display: none; }
  .header-actions .btn { display: none; }
}

/* Member directory filter, used by /companies. Keep this in the template bundle
   because the public member page no longer loads the legacy /css/style.css file. */
.member-filter-panel {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(153, 27, 45, .14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 36, 42, .055);
}

.member-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #eef0f3;
}

.member-filter-head strong {
  color: var(--text-1);
  font-size: 18px;
  font-weight: 800;
}

.member-filter-head span {
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
}

.member-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 92px;
  overflow: hidden;
  padding: 1px;
  transition: max-height .2s ease;
}

.member-filter.is-expanded {
  max-height: 420px;
  overflow-y: auto;
}

.member-filter a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.member-filter a.active,
.member-filter a:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(201, 35, 44, .18);
}

.member-filter-toggle {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
}

.member-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.member-level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 11px;
  font-weight: 800;
}

.member-level-chairman { background: #fef2f2; color: #dc2626; }
.member-level-vice_chairman { background: #fff7ed; color: #c2410c; }
.member-level-director { background: #eff6ff; color: #2563eb; }
.member-level-member { background: #f3f4f6; color: #4b5563; }
.member-level-badge.is-v { background: #dc2626; color: #fff; }

@media (max-width: 760px) {
  .member-filter-panel { padding: 16px; border-radius: 14px; }
  .member-filter-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .member-filter { max-height: 210px; }
}
