/* 全站统一顶栏 — CrossPilot 品牌色 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  padding: 0.5rem 0.75rem;
  backdrop-filter: blur(8px);
}
.site-header__inner {
  display: flex;
  height: 3.5rem;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  border: 1px solid #e1e3e5;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(31, 33, 36, 0.06), 0 10px 28px -24px rgba(31, 33, 36, 0.45);
}
.site-header--nav-only .site-header__inner--nav-only {
  justify-content: center;
  height: auto;
  min-height: 3rem;
  padding: 0.625rem 1rem;
}
.site-header__inner--with-brand {
  flex-direction: column;
  align-items: stretch;
  height: auto;
  min-height: 3rem;
  padding: 0.625rem 1rem 0.75rem;
  gap: 0.5rem;
}
.site-header__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  text-decoration: none;
  color: inherit;
}
.site-header__brand-logo {
  height: 30px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  flex-shrink: 0;
}
.site-header__brand-logo--icon {
  height: 36px;
  width: 36px;
  max-width: 36px;
  object-fit: contain;
  display: block;
}
.site-header__brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(120deg, #0A2540 0%, #0056B3 55%, #00B4AD 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-header__inner--with-brand .site-header__nav--only {
  justify-content: flex-start;
}
@media (min-width: 640px) {
  .site-header__inner--with-brand {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .site-header__inner--with-brand .site-header__nav--only {
    justify-content: flex-end;
    width: auto;
    flex: 1;
  }
}
.site-header__nav--only {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
}
@media (min-width: 640px) {
  .site-header__inner { padding: 0 1.25rem; }
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}
.site-header__logo {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--brand-gradient);
  box-shadow: 0 1px 2px rgba(31, 33, 36, 0.08);
}
.site-header__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-header__subtitle {
  display: none;
  font-size: 0.75rem;
  color: #6d7175;
}
@media (min-width: 640px) {
  .site-header__subtitle { display: block; }
}
.site-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.page-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid #e1e3e5;
  background: #f6f6f7;
  font-size: 11px;
  font-weight: 600;
  color: #202223;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
@media (min-width: 1024px) {
  .page-nav-btn { padding: 0 12px; }
}
.page-nav-btn:hover {
  border-color: var(--brand-primary-border);
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.page-nav-btn--primary {
  border-color: transparent;
  background: var(--brand-gradient);
  color: #fff;
}
.page-nav-btn--primary:hover {
  background: linear-gradient(135deg, #009e98 0%, #004a9e 100%);
  color: #fff;
}
.language-select {
  height: 36px;
  border-radius: 12px;
  border: 1px solid #e1e3e5;
  background: #f6f6f7;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: #202223;
  box-shadow: 0 1px 2px rgba(31, 33, 36, 0.08);
}
.language-select:hover { border-color: #c9cccf; }
.language-select:focus {
  border-color: var(--brand-teal);
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-focus-ring);
}
.site-header-status {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #e1e3e5;
  background: #f6f6f7;
  font-size: 10px;
  font-weight: 500;
  color: #6d7175;
  white-space: nowrap;
}
.site-header-status--ok {
  border-color: var(--brand-primary-border);
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.site-header-status--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.site-header-status--warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.page-intro {
  overflow: hidden;
  border: 1px solid #e1e3e5;
  border-radius: 16px;
  background: #fff;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(31, 33, 36, 0.06), 0 10px 28px -24px rgba(31, 33, 36, 0.45);
}
.page-intro h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-intro p {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6d7175;
}
.dq-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.dq-badge--verified {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.dq-badge--reference {
  background: var(--brand-primary-light-2);
  color: #3b5f9f;
}
.dq-badge--estimate {
  background: #fff4e4;
  color: #8a6116;
}
.dq-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 11px;
  line-height: 1.45;
  color: #6d7175;
}

.project-context-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 0.25rem;
}
.project-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  border-radius: 12px;
  border: 1px solid #e1e3e5;
  background: #fafbfb;
  padding: 0.45rem 0.75rem;
  font-size: 11px;
  color: #6d7175;
}
.project-context-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-teal);
}
.project-context-value {
  font-weight: 600;
  color: #202223;
}
.data-health-bar {
  border-radius: 12px;
  border: 1px solid #e1e3e5;
  background: #fafbfb;
  padding: 0.65rem 0.85rem;
  font-size: 11px;
  line-height: 1.5;
  color: #4b4f56;
}
.factory-warn {
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  padding: 0.65rem 0.85rem;
  font-size: 12px;
  line-height: 1.45;
}
.supplier-precision {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.1rem 0.45rem;
  font-size: 9px;
  font-weight: 700;
  margin-right: 0.35rem;
}
.supplier-precision--verified { background: var(--brand-primary-light); color: var(--brand-primary-dark); }
.supplier-precision--partial { background: var(--brand-primary-light-2); color: #3730a3; }
.supplier-precision--estimated { background: #fff1e6; color: #b45309; }
.margin-estimate-warn {
  margin-top: 0.65rem;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  padding: 0.55rem 0.75rem;
  font-size: 11px;
  line-height: 1.45;
}
