:root {
  --brand-red: #9e2235;
  --brand-red-dark: #7d1928;
  --brand-red-soft: #f6eaea;
  --brand-red-tint: #fbf5f5;
  --nav-bg-start: #fdf2e6;
  --nav-bg-end: #fdf8f2;
  --text-primary: #1f2329;
  --text-secondary: #5c626b;
  --text-muted: #8f959e;
  --border-light: #eee8e4;
  --card-border: #efe8e5;
  --bg-page: #ffffff;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 顶部导航栏 */
.top-header {
  background: linear-gradient(90deg, var(--nav-bg-start) 0%, var(--nav-bg-end) 100%);
  border-bottom: 1px solid #f0e4d8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-red) 0%, #c83e52 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-red);
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav-item {
  font-size: 14px;
  color: #4a4542;
  text-decoration: none;
  white-space: nowrap;
  padding: 18px 2px;
  position: relative;
  cursor: pointer;
  transition: color 0.15s;
}

.top-nav-item:hover {
  color: var(--brand-red);
}

.top-nav-item.active {
  color: var(--brand-red);
  font-weight: 600;
}

.top-nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--brand-red);
  border-radius: 2px;
}

.badge-new {
  display: inline-block;
  font-size: 10px;
  background: var(--brand-red);
  color: #fff;
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 3px;
  vertical-align: 1px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.source-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #ebd8d4;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a06b;
}

.source-dot.demo {
  background: #d97706;
}

/* 主体容器 */
.main-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 24px 56px;
}

.page-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.data-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* 二级 Tab 栏 */
.sub-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
}

.sub-tab {
  padding: 10px 2px 12px;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  border: none;
  background: none;
  font-family: inherit;
  transition: color 0.15s;
}

.sub-tab:hover {
  color: var(--brand-red);
}

.sub-tab.active {
  color: var(--brand-red);
  font-weight: 600;
}

.sub-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  background: var(--brand-red);
  border-radius: 2px;
}

.tab-mvp-tag {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 3px;
}

/* 市场筛选行 */
.market-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.market-label {
  font-size: 13px;
  color: var(--text-muted);
}

.segmented-group {
  display: inline-flex;
  background: #f5f5f5;
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background: #fff;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 章节标题栏 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 3.5px;
  height: 16px;
  background: var(--brand-red);
  border-radius: 2px;
}

/* 全景图上半区：地图 + 统计矩阵 */
.overview-top-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.map-panel {
  position: relative;
  min-height: 410px;
  display: flex;
  flex-direction: column;
}

.chart-canvas-map {
  width: 100%;
  height: 410px;
}

.map-fallback-tip {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 4px;
}

/* 统计矩阵表格 */
.matrix-card {
  background: var(--brand-red-tint);
  border: 1px solid #f0e2e2;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(158, 34, 53, 0.04);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
}

.matrix-table thead th {
  background: var(--brand-red-soft);
  color: #4f4646;
  font-weight: 500;
  padding: 14px 10px;
  border-bottom: 1px solid #eedede;
}

.matrix-table tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid #f3e8e8;
  color: var(--text-primary);
}

.matrix-table tbody tr:last-child td {
  border-bottom: none;
  background: #f9efef;
  font-weight: 600;
}

.matrix-table tbody td:first-child {
  color: #4a4242;
  font-weight: 500;
}

.matrix-num {
  color: var(--brand-red);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.matrix-num.clickable {
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.matrix-num.clickable:hover {
  background: var(--brand-red);
  color: #fff;
}

.matrix-num.zero {
  color: #b5a7a7;
  font-weight: 400;
}

.matrix-footnote {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-muted);
  background: #fffafa;
  border-top: 1px solid #f3e8e8;
  display: flex;
  justify-content: space-between;
}

/* 下半区：保荐机构 & 律所/会所 双卡片 */
.overview-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.radio-group {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.radio-label input[type="radio"] {
  accent-color: var(--brand-red);
  cursor: pointer;
}

.chart-canvas-rank {
  width: 100%;
  height: 390px;
}

/* 审核动态页面 */
.filter-box {
  background: #faf8f7;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  color: var(--text-muted);
  width: 68px;
  flex-shrink: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  border: 1px solid #e6deda;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.chip-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.chip-btn.active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  font-weight: 500;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.input-control,
.select-control {
  height: 34px;
  border: 1px solid #dfd7d3;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  font-family: inherit;
  outline: none;
}

.input-control {
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}

.input-control:focus,
.select-control:focus {
  border-color: var(--brand-red);
}

.action-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #dfd7d3;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.action-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.action-btn.primary {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.action-btn.primary:hover {
  background: var(--brand-red-dark);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 960px;
}

.data-table thead th {
  background: #faf4f4;
  color: #514747;
  font-weight: 600;
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid #eee4e4;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid #f4efef;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #fdf9f9;
}

.company-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}

.company-link:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

.board-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f5eff0;
  color: var(--brand-red);
  font-weight: 500;
  white-space: nowrap;
}

.stage-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}

.stage-受理 { background: #e8f3ff; color: #1668dc; }
.stage-问询 { background: #fff4e5; color: #c46b00; }
.stage-上市委 { background: #ede9fe; color: #6d28d9; }
.stage-提交注册 { background: #e6f7ee; color: #15803d; }
.stage-中止 { background: #f3f4f6; color: #6b7280; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 6px;
}

/* 二期规划占位卡片 */
.placeholder-card {
  border: 1px dashed #e2d4d2;
  background: #fdfafa;
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  max-width: 720px;
  margin: 24px auto;
}

.placeholder-card h3 {
  font-size: 18px;
  color: var(--brand-red);
  margin-bottom: 10px;
}

.placeholder-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 14px;
}

.placeholder-meta {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .overview-top-grid,
  .overview-bottom-grid {
    grid-template-columns: 1fr;
  }
  .top-nav {
    display: none;
  }
}

/* 新增历史完结阶段标签 */
.stage-注册同意 { background: #e6f7ee; color: #0f7a44; }
.stage-终止 { background: #fdecec; color: #b42318; }

.data-table tbody tr.clickable-row {
  cursor: pointer;
}

.chip-count {
  font-size: 11px;
  opacity: 0.78;
  margin-left: 3px;
}

/* ==================== 项目详情页（还原图 2） ==================== */
.detail-view {
  background: #f5f6f8;
  margin: -26px -24px -56px;
  padding-bottom: 56px;
  min-height: calc(100vh - 58px);
}

.detail-banner {
  background: linear-gradient(90deg, #f8d7b6 0%, #fce8d4 45%, #fdf6ee 100%);
  padding: 20px 24px;
  border-bottom: 1px solid #f0decb;
}

.detail-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.back-btn {
  border: 1px solid rgba(158, 34, 53, 0.25);
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-red);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.back-btn:hover {
  background: var(--brand-red);
  color: #fff;
}

.detail-company-name {
  font-size: 22px;
  font-weight: 700;
  color: #1f2329;
}

.detail-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #5c534c;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.live-status-pill {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #3d424a;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 5 节点审核进度时间轴 */
.timeline-strip {
  background: #fff;
  padding: 28px 24px 26px;
  border-bottom: 1px solid #eceef2;
}

.timeline-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}

.timeline-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 56px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 4px;
  background: #d9dde3;
  border-radius: 2px;
  z-index: 1;
}

.timeline-step.done:not(:last-child)::after {
  background: #2fa36b;
}

.timeline-label {
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 13px;
  color: #8f959e;
  height: 20px;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.timeline-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c4c9d1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.timeline-step.done .timeline-circle {
  background: #2fa36b;
  box-shadow: 0 0 0 4px rgba(47, 163, 107, 0.15);
}

/* 详情主体内容区 */
.detail-body {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.detail-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e6e8ec;
}

.detail-tab {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 2px 10px;
  cursor: pointer;
  position: relative;
}

.detail-tab.active {
  color: var(--brand-red);
  font-weight: 600;
}

.detail-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  background: var(--brand-red);
  border-radius: 2px;
}

.detail-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
}

.detail-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2329;
  margin-bottom: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
}

.info-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #f0f1f4;
}

.info-label {
  width: 108px;
  flex-shrink: 0;
  font-size: 13px;
  color: #8f959e;
}

.info-value {
  font-size: 13.5px;
  color: #1f2329;
  word-break: break-word;
  flex: 1;
}

.info-value.highlight {
  color: var(--brand-red);
  font-weight: 600;
}

.info-value a {
  color: var(--brand-red);
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

/* 信披文件列表 */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid #f0ecea;
  border-radius: 8px;
  background: #fcfbfb;
  transition: border-color 0.15s, background 0.15s;
}

.doc-row:hover {
  border-color: #dfbfc4;
  background: #fdf6f6;
}

.doc-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.doc-cat {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--brand-red-soft);
  color: var(--brand-red);
  white-space: nowrap;
}

.doc-link {
  color: #1f2329;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-link:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

.doc-date {
  font-size: 12px;
  color: #8f959e;
  white-space: nowrap;
}

.detail-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 16px;
}

@media (max-width: 820px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  .timeline-inner {
    overflow-x: auto;
    gap: 12px;
  }
}
