:root {
  color-scheme: light;
  --ds-ink: #061b35;
  --ds-heading: #062b52;
  --ds-muted: #61758c;
  --ds-blue: #0078d4;
  --ds-cyan: #1fc7f2;
  --ds-gold: #b8882f;
  --ds-red: #c90022;
  --ds-line: rgba(0, 95, 174, .12);
  --ds-panel: rgba(255, 255, 255, .84);
  --ds-card: #fff;
  --ds-shadow: 0 14px 34px rgba(8, 55, 92, .065);
  --ds-card-shadow: 0 10px 24px rgba(8, 55, 92, .06);
  --ds-radius: 8px;
  --ds-panel-radius: 14px;
  --ds-font: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: var(--ds-font);
  color: var(--ds-ink);
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .10)),
    radial-gradient(circle at 10% 8%, rgba(31, 199, 242, .15), transparent 26%),
    radial-gradient(circle at 92% 12%, rgba(0, 95, 174, .10), transparent 28%),
    linear-gradient(135deg, #f6fbff, #edf6fb 52%, #fff) !important;
}

.topbar {
  min-height: 68px;
  height: auto;
  padding: 10px 30px;
  background: rgba(255, 255, 255, .90) !important;
  border-bottom: 1px solid rgba(0, 103, 177, .14);
  box-shadow: 0 10px 28px rgba(8, 31, 54, .055);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 260px;
  height: 48px;
  object-fit: contain;
}

.brand-title {
  border-left-color: rgba(0, 95, 174, .14) !important;
}

.brand-title strong {
  color: var(--ds-ink);
  font-size: 17px !important;
  font-weight: 900;
  line-height: 1.25;
}

.brand-title span {
  margin-top: 4px;
  color: #6a7f92 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.25;
}

.button,
button.button,
a.button {
  height: 38px;
  min-width: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px !important;
  border: 1px solid rgba(0, 153, 255, .30);
  background: rgba(255, 255, 255, .78);
  color: #07345f;
  font: 900 14px/1 var(--ds-font);
  box-shadow: none;
  white-space: nowrap;
  cursor: pointer;
}

.button:hover,
button.button:hover,
a.button:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(0, 153, 255, .54);
}

.button.primary {
  color: #fff;
  border-color: rgba(31, 199, 242, .38);
  background: linear-gradient(135deg, var(--ds-blue), var(--ds-cyan));
  box-shadow: 0 10px 22px rgba(0, 117, 198, .16);
}

.button.danger {
  color: #a0001b;
  border-color: rgba(201, 0, 34, .24);
  background: rgba(255, 244, 246, .88);
}

.panel,
.search-panel,
.filter-panel,
.project-panel,
.list-panel,
.detail-panel {
  border-radius: var(--ds-panel-radius) !important;
  border: 1px solid var(--ds-line) !important;
  background: var(--ds-panel) !important;
  box-shadow: var(--ds-shadow) !important;
  backdrop-filter: blur(16px);
}

.page {
  padding-top: 24px;
}

.section {
  max-width: 1320px;
}

.section-title,
.panel-title h2,
.panel-head h2,
.panel h2,
.dialog-head h2,
.dialog h2 {
  color: #07345f;
  font-size: 20px;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: 0;
}

input,
select,
textarea,
.filter-select {
  min-height: 40px;
  border-radius: 7px !important;
  border: 1px solid rgba(6, 54, 96, .14) !important;
  background: #fff !important;
  color: var(--ds-ink);
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
textarea:focus,
.filter-select:focus {
  border-color: rgba(31, 199, 242, .70) !important;
  box-shadow: 0 0 0 3px rgba(31, 199, 242, .12) !important;
}

.filters,
.search-panel,
.filter-panel {
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.grid,
.project-list,
.industry-grid {
  gap: 12px !important;
}

.project-list,
.industry-grid,
#projectGrid {
  align-items: stretch;
}

#projectGrid.grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.project-card,
.industry,
.item,
.step {
  border-radius: 10px !important;
  border: 1px solid rgba(0, 95, 174, .12) !important;
  background: var(--ds-card) !important;
  box-shadow: var(--ds-card-shadow) !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card,
.project-card,
.industry,
.item {
  min-width: 0;
  overflow: hidden;
}

.card,
.project-card,
.item {
  min-height: 168px;
}

.industry {
  min-height: 210px;
}

.card:hover,
.project-card:hover,
.industry:hover,
.item:hover,
.step:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 120, 212, .34) !important;
  box-shadow: 0 14px 30px rgba(8, 55, 92, .10) !important;
}

#projectGrid .card.org-card {
  position: relative;
  padding-left: 14px;
  border-color: color-mix(in srgb, var(--org-color, var(--ds-blue)) 32%, rgba(0, 95, 174, .12)) !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--org-color, var(--ds-blue)) 13%, #fff) 0%, #fff 50%, #f7fbfe 100%) !important;
}

#projectGrid .card.org-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--org-color, var(--ds-blue));
  box-shadow: 0 0 12px color-mix(in srgb, var(--org-color, var(--ds-blue)) 42%, transparent);
}

#projectGrid .card.org-card:hover {
  border-color: color-mix(in srgb, var(--org-color, var(--ds-blue)) 58%, rgba(0, 95, 174, .12)) !important;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--org-color, var(--ds-blue)) 13%, rgba(8, 55, 92, .10)) !important;
}

#projectGrid .card.org-card .org-chip {
  border-color: color-mix(in srgb, var(--org-color, var(--ds-blue)) 36%, rgba(0, 95, 174, .12)) !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--org-color, var(--ds-blue)) 18%, #fff), #f7fcff) !important;
  color: color-mix(in srgb, var(--org-color, var(--ds-blue)) 78%, #062b52) !important;
}

#projectGrid .card.org-card .org-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--org-color, var(--ds-blue));
  box-shadow: 0 0 8px color-mix(in srgb, var(--org-color, var(--ds-blue)) 55%, transparent);
}

.card h3,
.project-card h3,
.industry h2,
.item h3,
.step strong {
  color: var(--ds-heading);
  font-size: 17px !important;
  line-height: 1.30 !important;
  font-weight: 900;
  letter-spacing: 0;
}

.card h3,
.project-card h3,
.industry h2,
.item h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-meta,
.facts,
.detail-grid,
.fields,
.edit-grid {
  gap: 8px !important;
}

.meta,
.fact,
.detail-field,
.field,
.summary-card {
  border-radius: 8px !important;
  border: 1px solid rgba(0, 95, 174, .10) !important;
  background: #f6fbfe !important;
}

.meta,
.fact {
  min-width: 0;
  overflow: hidden;
}

.meta b,
.fact b,
.detail-field strong,
.field strong {
  color: #284c6d !important;
  font-size: 12px !important;
  font-weight: 900;
}

.meta span,
.fact span,
.detail-field span,
.field span {
  color: #425c75;
  font-size: 13px;
  line-height: 1.62;
}

.meta span,
.fact span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag,
.chip,
.pill,
.state {
  border-radius: 6px !important;
  border: 1px solid rgba(31, 199, 242, .20);
  background: #eef8fe;
  color: #075fbd;
  font-size: 12px;
  font-weight: 900;
}

.modal {
  background: rgba(6, 27, 53, .30) !important;
  backdrop-filter: blur(12px);
}

.dialog,
.mini-dialog {
  border-radius: 16px !important;
  border: 1px solid rgba(31, 199, 242, .34) !important;
  background: #f8fcff !important;
  box-shadow: 0 28px 72px rgba(0, 48, 88, .22) !important;
}

.topbar-brand,
.brand {
  min-width: 0;
}

.topbar-actions,
.nav,
.dialog-actions,
.dialog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-actions button,
.home-button,
.ai-button,
.knowledge-button,
.primary-button,
.secondary-button {
  height: 38px;
  min-width: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px !important;
  border: 1px solid rgba(0, 153, 255, .30) !important;
  background: rgba(255, 255, 255, .78) !important;
  color: #07345f !important;
  font: 900 14px/1 var(--ds-font) !important;
  box-shadow: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.primary-button {
  color: #fff !important;
  border-color: rgba(31, 199, 242, .38) !important;
  background: linear-gradient(135deg, var(--ds-blue), var(--ds-cyan)) !important;
}

.feature-card,
.operation-panel,
.union-card,
.category-card,
.project-rules-card,
.knowledge-item,
.empty-result {
  border-radius: 10px !important;
  border: 1px solid rgba(0, 95, 174, .12) !important;
  background: #fff !important;
  box-shadow: var(--ds-card-shadow) !important;
}

.feature-card strong,
.union-card-head strong,
.category-card h3,
.operation-panel h2 {
  color: var(--ds-heading) !important;
  letter-spacing: 0;
}

.comparison-grid,
.feature-row,
.knowledge-list {
  gap: 12px !important;
}

.section-head,
.panel-head,
.dialog-head {
  min-width: 0;
}

.empty {
  border-radius: 12px !important;
  border: 1px dashed rgba(0, 95, 174, .24) !important;
  background: rgba(255, 255, 255, .52) !important;
  color: var(--ds-muted) !important;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-title {
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  .brand img {
    width: 220px;
  }
}

@media (max-width: 1180px) {
  #projectGrid.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #projectGrid.grid,
  .project-list,
  .industry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  #projectGrid.grid,
  .project-list,
  .industry-grid {
    grid-template-columns: 1fr !important;
  }
}
