/* ============================================================
   MIPT 市场大厅专用样式 · marketplace / supply / demand / insights
   与 site.css 同源设计语言（深海军蓝 #06141F / 品牌蓝 #1259C4 / 琥珀金 #C9A227）
   ============================================================ */

.page-hero {
  background: linear-gradient(160deg, #06141f 0%, #0d2a44 58%, #103a5c 100%);
  color: #fff;
  padding: calc(var(--nav-h, 68px) + 56px) 0 62px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.55), transparent);
}
.page-hero h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin: 10px 0 12px;
  line-height: 1.25;
}
.page-hero .lead {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,.78);
  max-width: 720px;
  margin: 0;
}
.page-hero .crumb {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.page-hero .crumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.page-hero .crumb a:hover { color: #fff; }
.page-hero .hero-cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero--split .page-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 52px;
  align-items: center;
}

/* ---------- 数据计数条 ---------- */
.mkt-counts {
  display: flex;
  gap: 40px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.14);
  flex-wrap: wrap;
}
.mkt-counts > div { display: flex; flex-direction: column; gap: 4px; }
.mkt-counts b {
  font-size: 30px; font-weight: 800; color: #fff; line-height: 1;
  letter-spacing: -.6px;
}
.mkt-counts span { font-size: 12.5px; color: rgba(255,255,255,.6); }

/* ---------- 平台大厅：双边卡片 ---------- */
.mkt-split { display: grid; gap: 16px; }
.mkt-split-card {
  display: block;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color .22s, background .22s, transform .22s;
  position: relative;
  overflow: hidden;
}
.mkt-split-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #1259c4, #0d9488);
}
.mkt-split-card--demand::before {
  background: linear-gradient(180deg, #c9a227, #d85a30);
}
.mkt-split-card:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(201,162,39,.45);
  transform: translateY(-2px);
}
.mkt-split-k {
  font-size: 11px; letter-spacing: 2.4px; color: rgba(255,255,255,.45);
  font-weight: 700; margin-bottom: 6px;
}
.mkt-split-t { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.mkt-split-d { font-size: 13.5px; color: rgba(255,255,255,.68); line-height: 1.65; }
.mkt-split-n {
  display: flex; align-items: baseline; gap: 8px; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12);
}
.mkt-split-n b { font-size: 22px; font-weight: 800; color: #c9a227; }
.mkt-split-n span { font-size: 12px; color: rgba(255,255,255,.55); }

/* ---------- 门户特性 ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.portal-card {
  background: #fff;
  border: 1px solid var(--line, #e3e8ef);
  border-radius: 14px;
  padding: 26px 24px;
  transition: box-shadow .22s, transform .22s;
}
.portal-card:hover { box-shadow: 0 12px 32px rgba(6,20,31,.09); transform: translateY(-3px); }
.portal-ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #1259c4, #0d9488);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; letter-spacing: .5px;
}
.portal-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.portal-card p { font-size: 13.5px; line-height: 1.75; color: var(--ink-2, #46586b); margin: 0; }
.portal-cta { display: flex; gap: 12px; justify-content: center; margin-top: 36px; }

/* ---------- 工具条 ---------- */
.section--tight { padding: 44px 0 64px; }
.mkt-toolbar {
  display: flex; gap: 20px; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 26px;
  border-bottom: 1px solid var(--line, #e3e8ef);
}
.mkt-filters { display: flex; gap: 14px; flex-wrap: wrap; }
.mkt-filter { display: flex; flex-direction: column; gap: 6px; }
.mkt-filter > span { font-size: 12px; color: var(--ink-3, #7a8b9c); font-weight: 500; }
.mkt-filter select, .mkt-filter input {
  min-width: 132px; height: 38px; padding: 0 11px;
  border: 1px solid var(--line, #e3e8ef); border-radius: 9px;
  background: #fff; font-size: 13.5px; color: var(--ink-1, #14293d);
  font-family: inherit;
}
.mkt-filter input:focus, .mkt-filter select:focus {
  outline: none; border-color: #1259c4; box-shadow: 0 0 0 3px rgba(18,89,196,.1);
}
.mkt-filter--wide input { min-width: 220px; }

/* ---------- 卡片网格 ---------- */
.mkt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mkt-card {
  background: #fff;
  border: 1px solid var(--line, #e3e8ef);
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column;
  transition: box-shadow .22s, transform .22s, border-color .22s;
}
.mkt-card:hover {
  box-shadow: 0 14px 36px rgba(6,20,31,.1);
  transform: translateY(-3px);
  border-color: rgba(18,89,196,.35);
}
.mkt-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.mkt-chip {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--brand-blue-light, #e8f2fd); color: var(--brand-blue, #1259c4);
  letter-spacing: .3px;
}
.mkt-chip--stage { background: #e6f7f5; color: #0f6e56; }
.mkt-chip--pending { background: #fdf3e2; color: #854f0b; }
.mkt-card h3 {
  font-size: 16px; font-weight: 700; line-height: 1.45; margin: 0 0 10px;
  color: var(--ink-1, #14293d);
}
.mkt-card-desc {
  font-size: 13.5px; line-height: 1.72; color: var(--ink-2, #46586b);
  margin: 0 0 14px; flex: 1;
}
.mkt-meta {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px; padding: 13px 0; margin-bottom: 14px;
  border-top: 1px dashed var(--line, #e3e8ef);
  border-bottom: 1px dashed var(--line, #e3e8ef);
}
.mkt-meta div { display: flex; gap: 6px; font-size: 12.5px; min-width: 0; }
.mkt-meta b { color: var(--ink-3, #7a8b9c); font-weight: 500; flex-shrink: 0; }
.mkt-meta span { color: var(--ink-1, #14293d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.mkt-tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 5px;
  background: #f4f7fb; color: var(--ink-2, #46586b); border: 1px solid #e6ecf3;
}
.mkt-tag--cert { background: #fdf6e6; border-color: #f0e2bd; color: #854f0b; font-weight: 600; }
.mkt-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto;
}
.mkt-org { font-size: 12.5px; color: var(--ink-3, #7a8b9c); min-width: 0; }
.mkt-org b { display: block; color: var(--ink-1, #14293d); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-loading, .mkt-empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
  color: var(--ink-3, #7a8b9c); font-size: 14px;
}

/* ---------- 询盘弹窗 ---------- */
.mkt-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,20,31,.55);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.mkt-modal.open { display: flex; }
.mkt-modal-box {
  background: #fff; border-radius: 16px; padding: 30px;
  max-width: 520px; width: 100%; position: relative;
  max-height: 90vh; overflow-y: auto;
}
.mkt-modal-x {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 26px; line-height: 1;
  color: var(--ink-3, #7a8b9c); cursor: pointer;
}
.mkt-modal-box h3 { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.mkt-modal-target {
  font-size: 13.5px; color: var(--ink-2, #46586b);
  background: #f4f7fb; border-radius: 9px; padding: 11px 13px; margin-bottom: 18px;
  line-height: 1.6;
}
.mkt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mkt-field > span { font-size: 12.5px; color: var(--ink-3, #7a8b9c); font-weight: 500; }
.mkt-field input, .mkt-field textarea {
  border: 1px solid var(--line, #e3e8ef); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; font-family: inherit;
  color: var(--ink-1, #14293d); resize: vertical;
}
.mkt-field input:focus, .mkt-field textarea:focus {
  outline: none; border-color: #1259c4; box-shadow: 0 0 0 3px rgba(18,89,196,.1);
}
.btn-block { width: 100%; justify-content: center; }
.mkt-modal-msg { font-size: 13px; margin: 12px 0 0; text-align: center; min-height: 18px; }
.mkt-modal-msg.ok { color: #0f6e56; }
.mkt-modal-msg.err { color: #a32d2d; }

/* ---------- 洞察中心 ---------- */
.ins-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.ins-tab {
  border: 1px solid var(--line, #e3e8ef); background: #fff;
  padding: 9px 18px; border-radius: 22px; font-size: 13.5px;
  cursor: pointer; font-family: inherit; color: var(--ink-2, #46586b);
  transition: all .2s;
}
.ins-tab:hover { border-color: rgba(18,89,196,.4); color: #1259c4; }
.ins-tab.active { background: #1259c4; border-color: #1259c4; color: #fff; }
.ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ins-card {
  background: #fff; border: 1px solid var(--line, #e3e8ef);
  border-radius: 14px; overflow: hidden;
  transition: box-shadow .22s, transform .22s;
}
.ins-card:hover { box-shadow: 0 14px 36px rgba(6,20,31,.1); transform: translateY(-3px); }
.ins-cover {
  height: 118px; position: relative;
  background: linear-gradient(135deg, #0d2a44 0%, #1259c4 100%);
  display: flex; align-items: flex-end; padding: 14px;
}
.ins-cover--supply { background: linear-gradient(135deg, #064e42 0%, #0d9488 100%); }
.ins-cover--channel { background: linear-gradient(135deg, #5c3d12 0%, #c9a227 100%); }
.ins-cover--quality { background: linear-gradient(135deg, #4a1b0c 0%, #d85a30 100%); }
.ins-cover-k {
  font-size: 11px; letter-spacing: 2px; font-weight: 700;
  color: rgba(255,255,255,.85);
}
.ins-card-body { padding: 20px; }
.ins-card-kind {
  font-size: 11.5px; color: #1259c4; font-weight: 600;
  margin-bottom: 8px; display: block;
}
.ins-card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; }
.ins-card p { font-size: 13px; line-height: 1.72; color: var(--ink-2, #46586b); margin: 0 0 14px; }
.ins-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3, #7a8b9c);
  padding-top: 12px; border-top: 1px solid var(--line, #e3e8ef);
}
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: #fff; border: 1px solid var(--line, #e3e8ef);
  border-radius: 14px; padding: 22px;
}
.news-tag {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 5px; margin-bottom: 12px;
  background: #e8f2fd; color: #1259c4;
}
.news-card h3 { font-size: 15px; font-weight: 700; line-height: 1.55; margin: 0 0 10px; }
.news-date { font-size: 12px; color: var(--ink-3, #7a8b9c); margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .page-hero--split .page-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .mkt-grid { grid-template-columns: repeat(2, 1fr); }
  .ins-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .page-hero { padding: calc(var(--nav-h, 68px) + 36px) 0 46px; }
  .page-hero h1 { font-size: 26px; }
  .mkt-counts { gap: 22px; }
  .mkt-counts b { font-size: 24px; }
  .portal-grid, .mkt-grid, .ins-grid, .news-grid { grid-template-columns: 1fr; }
  .mkt-toolbar { flex-direction: column; align-items: stretch; }
  .mkt-filters { flex-direction: column; }
  .mkt-filter select, .mkt-filter input { width: 100%; }
  .mkt-meta { grid-template-columns: 1fr; }
}
