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

:root {
  --primary: #4d6f8c;
  --primary-light: #6f879d;
  --primary-dark: #35546e;
  --secondary: #b7645d;
  --accent: #c39b4b;
  --success: #6f8b69;
  --warning: #c39b4b;
  --danger: #b7645d;

  --blue-soft: #d9e4ed;
  --red-soft: #ead7d2;
  --yellow-soft: #efe2bf;
  --green-soft: #dfe8d8;

  --text-primary: #28302d;
  --text-secondary: #666b67;
  --text-muted: #837d72;

  --bg-primary: #f8fbff;
  --bg-secondary: #edf4fb;
  --bg-soft: #f2f7fc;
  --bg-card: #fbfdff;

  --border: #d7e3ee;
  --border-light: #e5edf5;

  --shadow-sm: 0 1px 2px rgba(32, 38, 35, 0.07);
  --shadow: 0 8px 22px rgba(32, 38, 35, 0.11);
  --shadow-lg: 0 16px 38px rgba(32, 38, 35, 0.15);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 8px;

  --max-width: 1280px;
  --header-height: 60px;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  line-height: 1.58;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(45, 51, 60, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(27, 31, 36, 0.16);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max-width);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #f7f1e8;
  font-size: 15px;
  font-weight: 740;
}

.logo-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(229, 214, 177, 0.38);
  border-radius: 10px;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.78) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 74%, rgba(118, 214, 255, 0.68) 0 2px, transparent 3px),
    linear-gradient(135deg, #1e5f8f 0%, #2da6d9 40%, #e2bb66 100%);
  box-shadow:
    0 10px 24px rgba(11, 27, 40, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -10px 18px rgba(8, 20, 31, 0.2);
  color: transparent;
  font-size: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 5px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px 100%),
    linear-gradient(22deg, transparent 0 43%, rgba(255, 255, 255, 0.72) 44% 48%, transparent 49% 100%),
    conic-gradient(from 132deg, #f9df94, #65d5ff, #2d7bb5, #f9df94);
  box-shadow: 0 0 18px rgba(80, 190, 234, 0.42);
  clip-path: polygon(50% 0, 94% 31%, 77% 100%, 23% 100%, 6% 31%);
}

.logo-icon::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff8dc;
  box-shadow:
    11px -2px 0 #eafaff,
    15px 11px 0 #fff0b7,
    4px 16px 0 #8fe5ff;
}

.logo:hover .logo-icon {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(11, 27, 40, 0.34),
    0 0 22px rgba(78, 182, 229, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -10px 18px rgba(8, 20, 31, 0.2);
}

.logo-text {
  color: #f8f1df;
  letter-spacing: 0;
  text-shadow: 0 1px 12px rgba(226, 187, 102, 0.18);
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-link {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: rgba(247, 241, 232, 0.68);
  font-size: 14px;
  font-weight: 540;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  color: #f7f1e8;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: #f7f1e8;
  background: rgba(255, 255, 255, 0.13);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-box input {
  width: 260px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f7f1e8;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-box input::placeholder {
  color: rgba(247, 241, 232, 0.58);
}

.search-box input:focus {
  border-color: rgba(216, 181, 109, 0.7);
  box-shadow: 0 0 0 3px rgba(216, 181, 109, 0.18);
}

.search-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ead8b5;
  font-size: 16px;
  cursor: pointer;
}

/* Home hero */
.hero {
  padding: 28px 24px;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.94), rgba(237, 244, 251, 0.72)),
    linear-gradient(135deg, #f8fbff, #e8f3fb);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  text-align: left;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 214px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}

.hero-content h1 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.34;
  font-weight: 760;
  letter-spacing: 0;
}

.hero-content > p {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  opacity: 1;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 10px;
  width: 100%;
}

.stat-item {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(251, 253, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  display: block;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.2;
}

.stat-label {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 14px;
  opacity: 1;
}

/* Shared section titles */
.section-title {
  margin-bottom: 18px;
  text-align: left;
}

.section-title h2 {
  margin-bottom: 5px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 740;
  line-height: 1.35;
  letter-spacing: 0;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Module entry */
.modules {
  width: 100%;
  padding: 28px 24px;
}

.modules > .section-title,
.modules > .module-grid {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.module-card {
  position: relative;
  display: block;
  min-height: 176px;
  padding: 18px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--module-color, var(--primary));
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 124, 159, 0.38);
  box-shadow: var(--shadow);
}

.module-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--module-soft, var(--blue-soft));
  font-size: 22px;
}

.module-card h3 {
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 730;
}

.module-card > p {
  margin-bottom: 13px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.56;
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--module-soft, var(--blue-soft));
  color: var(--module-color, var(--primary-dark));
  font-size: 13px;
  font-weight: 540;
}

.module-card.culture,
.module-card.assets,
.module-card.standards {
  --module-color: var(--accent);
  --module-soft: var(--yellow-soft);
}

.module-card.demands {
  --module-color: var(--primary);
  --module-soft: var(--blue-soft);
}

.module-card.regulations,
.module-card.metadata {
  --module-color: var(--secondary);
  --module-soft: var(--red-soft);
}

.module-card.dictionary {
  --module-color: var(--primary);
  --module-soft: var(--blue-soft);
}

.module-card.quality {
  --module-color: var(--success);
  --module-soft: var(--green-soft);
}

/* Hot assets */
.hot-assets {
  padding: 28px 24px;
  background: #e8f1f8;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hot-assets > .section-title,
.hot-assets > .asset-list {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.asset-item {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.asset-item:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 124, 159, 0.38);
  box-shadow: var(--shadow);
}

.asset-header {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.asset-type,
.asset-dept {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.asset-type.table {
  background: var(--blue-soft);
  color: var(--primary-dark);
}

.asset-type.report {
  background: var(--red-soft);
  color: var(--secondary);
}

.asset-type.api {
  background: var(--yellow-soft);
  color: #77632f;
}

.asset-dept {
  background: var(--bg-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.asset-item h4 {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 730;
}

.asset-item > p {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.asset-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

/* Culture highlight */
.culture-highlight {
  width: 100%;
  padding: 28px 24px;
}

.culture-highlight > .section-title,
.culture-highlight > .culture-grid {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.culture-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 14px;
}

.culture-card {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.culture-card.quote {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-primary);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.86), rgba(255, 253, 248, 0.62)),
    linear-gradient(135deg, var(--blue-soft), var(--yellow-soft));
}

.quote-mark {
  margin-bottom: -12px;
  color: var(--primary);
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
  opacity: 0.42;
}

.culture-card.quote p {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.quote-author {
  color: var(--text-secondary);
  font-size: 14px;
}

.culture-card.story .story-badge,
.culture-card.tip .tip-badge,
.story-badge,
.tip-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.story-badge {
  background: var(--yellow-soft);
  color: #77632f;
}

.tip-badge {
  background: var(--blue-soft);
  color: var(--primary-dark);
}

.culture-card h4 {
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 730;
}

.culture-card > p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.56;
}

.culture-card > a {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
}

.culture-card > a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  padding: 28px 24px 22px;
  color: #d9d2c7;
  background: #2d333c;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #d9d2c7;
  font-size: 14px;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: #fffdf8;
}

.copyright {
  color: #a9a196;
  font-size: 13px;
}

/* Sub pages */
.page-container {
  width: 100%;
  min-height: calc(100vh - var(--header-height) - 160px);
  margin: 0 auto;
  padding: 26px 24px 34px;
}

.page-container > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.page-header {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.94), rgba(237, 244, 251, 0.72)),
    linear-gradient(135deg, #f8fbff, #e8f3fb);
}

.page-header h1 {
  margin-bottom: 5px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.36;
  letter-spacing: 0;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.page-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  min-height: 104px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--metric-color, var(--primary));
}

.metric-card .metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
}

.metric-card .metric-value {
  display: block;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 780;
  line-height: 1.2;
}

.metric-card .metric-note {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.insight-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 14px;
  margin-bottom: 18px;
}

.brief-card,
.focus-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.brief-card h2,
.focus-card h2,
.story-section-title h2 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.4;
}

.brief-card p,
.focus-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.soft-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.soft-tag.red {
  background: var(--red-soft);
  color: var(--secondary);
}

.soft-tag.yellow {
  background: var(--yellow-soft);
  color: #77632f;
}

.soft-tag.green {
  background: var(--green-soft);
  color: var(--success);
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mini-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
}

.mini-list-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

.story-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  margin-bottom: 18px;
}

.visual-story {
  position: relative;
  min-height: 248px;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(45, 51, 60, 0.86), rgba(77, 111, 140, 0.58)),
    var(--story-art, linear-gradient(135deg, #d9e4ed, #ead7d2));
  background-size: cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.visual-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(120deg, transparent 0 54%, rgba(255, 255, 255, 0.14) 54% 56%, transparent 56%),
    linear-gradient(0deg, rgba(27, 31, 36, 0.38), transparent 62%);
  pointer-events: none;
}

.visual-story > * {
  position: relative;
  z-index: 1;
}

.visual-story .story-kicker {
  width: fit-content;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.visual-story h2 {
  max-width: 620px;
  margin-bottom: 9px;
  color: #fff;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.42;
}

.visual-story p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.story-side {
  display: grid;
  gap: 14px;
}

.story-card {
  position: relative;
  min-height: 117px;
  padding: 16px 16px 16px 92px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.story-card::before {
  content: attr(data-icon);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--story-color, var(--blue-soft));
  font-size: 24px;
}

.story-card h3 {
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 740;
}

.story-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.progress-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.progress-item {
  display: grid;
  gap: 6px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-light);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--metric-color, var(--primary));
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.tab {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border-bottom: 0;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.tab:hover {
  color: var(--primary-dark);
  background: #edf1f3;
}

.tab.active {
  color: var(--text-primary);
  background: #e6dfd2;
}

.tab-content {
  display: block;
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.asset-submodules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.asset-submodule {
  position: relative;
  min-height: 112px;
  padding: 16px 16px 16px 18px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.asset-submodule::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--module-color, var(--primary));
}

.asset-submodule:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 124, 159, 0.34);
  box-shadow: var(--shadow);
}

.asset-submodule h3 {
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 730;
}

.asset-submodule p {
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-bar input,
.filter-bar select,
.form-field input,
.form-field select,
.form-field textarea {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(88, 124, 159, 0.14);
}

.demand-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  margin-bottom: 18px;
}

.form-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.form-title-row p {
  margin: 4px 0 0;
}

.demand-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.56;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.primary-btn,
.secondary-btn {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(53, 84, 110, 0.18);
}

.primary-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.secondary-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.secondary-btn:hover {
  color: var(--primary-dark);
  border-color: var(--primary);
}

.status-pill,
.type-pill,
.priority-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.status-pill,
.type-pill {
  background: var(--blue-soft);
  color: var(--primary-dark);
}

.priority-pill {
  background: var(--green-soft);
  color: var(--success);
}

.priority-较高 {
  background: var(--yellow-soft);
  color: #77632f;
}

.priority-紧急 {
  background: var(--red-soft);
  color: var(--secondary);
}

.demand-list-card {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table th {
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.data-table tbody tr:hover {
  background: var(--bg-soft);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.info-card {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.info-card:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 124, 159, 0.34);
  box-shadow: var(--shadow);
}

.info-card h2,
.info-card h3,
.info-card h4 {
  color: var(--text-primary);
  font-size: 15px !important;
  font-weight: 730;
  line-height: 1.4;
}

.info-card h3 {
  margin-bottom: 7px;
}

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

.info-card .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-soft) !important;
  color: #3f454c;
  font-size: 13px !important;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.page-btn {
  min-width: 34px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Special components in sub pages */
.lineage-flow {
  background: var(--bg-soft) !important;
  border: 1px solid var(--border);
}

.lineage-node {
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
}

.lineage-node.source {
  background: var(--yellow-soft) !important;
  color: #77632f !important;
  border-color: #d9c683 !important;
}

.lineage-node.process {
  background: var(--blue-soft) !important;
  color: var(--primary-dark) !important;
  border-color: #b6c8d6 !important;
}

.lineage-node.target {
  background: var(--red-soft) !important;
  color: var(--secondary) !important;
  border-color: #d8bbb4 !important;
}

.quality-score {
  border-radius: 999px !important;
  font-size: 14px !important;
}

.quality-score.high,
.quality-score.medium,
.quality-score.low {
  background: var(--yellow-soft) !important;
  color: #77632f !important;
}

.quality-bar {
  background: #eee7dd !important;
}

.quality-bar-fill.high,
.quality-bar-fill.medium,
.quality-bar-fill.low {
  background: var(--accent) !important;
}

.meta-item {
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm) !important;
}

.meta-item .label {
  color: var(--text-muted) !important;
  font-size: 13px !important;
}

.meta-item .value {
  color: var(--text-primary) !important;
  font-size: 14px !important;
}

.timeline::before {
  background: var(--border) !important;
}

.timeline-item::before {
  background: var(--primary) !important;
}

/* Low-saturation overrides for old inline colors */
[style*="color: #2563eb"],
[style*="color:#2563eb"],
[style*="color: var(--primary)"],
[style*="color:var(--primary)"] {
  color: var(--primary-dark) !important;
}

[style*="color: #7c3aed"],
[style*="color:#7c3aed"] {
  color: var(--secondary) !important;
}

[style*="color: #d97706"],
[style*="color:#d97706"],
[style*="color: var(--accent)"],
[style*="color:var(--accent)"],
[style*="color: #f59e0b"],
[style*="color:#f59e0b"] {
  color: #77632f !important;
}

[style*="color: #dc2626"],
[style*="color:#dc2626"],
[style*="color: #ef4444"],
[style*="color:#ef4444"] {
  color: var(--secondary) !important;
}

[style*="color: #10b981"],
[style*="color:#10b981"],
[style*="color: #059669"],
[style*="color:#059669"],
[style*="color: var(--success)"],
[style*="color:var(--success)"] {
  color: var(--success) !important;
}

[style*="rgba(37,99,235"],
[style*="rgba(37, 99, 235"],
[style*="rgba(59,130,246"],
[style*="rgba(59, 130, 246"] {
  background: var(--blue-soft) !important;
  color: var(--primary-dark) !important;
}

[style*="rgba(139,92,246"],
[style*="rgba(139, 92, 246"],
[style*="rgba(239,68,68"],
[style*="rgba(239, 68, 68"] {
  background: var(--red-soft) !important;
  color: var(--secondary) !important;
}

[style*="rgba(245,158,11"],
[style*="rgba(245, 158, 11"] {
  background: var(--yellow-soft) !important;
  color: #77632f !important;
}

[style*="rgba(16,185,129"],
[style*="rgba(16, 185, 129"] {
  background: var(--green-soft) !important;
  color: var(--success) !important;
}

[style*="border-top: 3px solid #dc2626"],
[style*="border-top:3px solid #dc2626"] {
  border-top-color: var(--secondary) !important;
}

[style*="border-top: 3px solid #7c3aed"],
[style*="border-top:3px solid #7c3aed"] {
  border-top-color: var(--primary) !important;
}

[style*="border-top: 3px solid var(--primary)"],
[style*="border-left: 4px solid var(--primary)"] {
  border-color: var(--primary) !important;
}

[style*="border-top: 3px solid var(--accent)"],
[style*="border-left: 4px solid var(--accent)"] {
  border-color: var(--accent) !important;
}

[style*="border-top: 3px solid var(--success)"],
[style*="border-left: 4px solid var(--success)"] {
  border-color: var(--success) !important;
}

[style*="font-size: 48px"] {
  font-size: 18px !important;
}

[style*="font-size: 28px"],
[style*="font-size: 24px"],
[style*="font-size: 22px"],
[style*="font-size: 20px"],
[style*="font-size: 18px"] {
  font-size: 15px !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-dashboard,
  .insight-panel,
  .story-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-submodules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .culture-grid {
    grid-template-columns: 1fr;
  }

  .demand-layout {
    grid-template-columns: 1fr;
  }

  .asset-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    flex: 0 0 100%;
  }

  .search-box {
    order: 2;
    margin-left: auto;
  }

  .search-box input {
    width: min(56vw, 220px);
  }

  .hero,
  .modules,
  .hot-assets,
  .culture-highlight,
  .page-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .module-grid,
  .hero-stats,
  .page-dashboard,
  .insight-panel,
  .story-showcase,
  .asset-submodules,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .story-card {
    padding-left: 16px;
    padding-top: 84px;
  }

  .form-title-row,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}
