:root {
  --shell-bg: #f5f7fb;
  --shell-panel: #ffffff;
  --shell-sidebar: #0f172a;
  --shell-sidebar-soft: #172033;
  --shell-text: #172033;
  --shell-muted: #667085;
  --shell-line: #e4e9f2;
  --shell-soft: #f8fafc;
  --shell-blue: #2563eb;
  --shell-blue-soft: #eff6ff;
  --shell-pink: #ff2f6d;
  --shell-green: #059669;
  --shell-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  --shell-shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.04);
}

body {
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #f8fafc 0, #eef4fb 320px, var(--shell-bg) 100%);
  color: var(--shell-text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.app-shell {
  grid-template-columns: 212px minmax(0, 1fr);
}

.app-shell > .sidebar,
body > .sidebar {
  display: block;
  width: 212px;
  padding: 18px 14px;
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.16), transparent 180px),
    var(--shell-sidebar);
  color: #d0d5dd;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.app-shell > .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

body > .sidebar {
  position: fixed;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 42px;
}

.brand::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--shell-blue), var(--shell-pink));
  color: #fff;
  content: "FM";
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.sidebar nav,
.sidebar .nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 0;
}

.sidebar a,
.sidebar .nav a,
.sidebar .nav button {
  display: flex;
  align-items: center;
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.sidebar a:hover,
.sidebar .nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar a.active,
.sidebar .nav a.active {
  background: #fff;
  color: #175cd3;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.page {
  min-width: 0;
}

.topbar,
.globalbar {
  height: 72px;
  border-bottom: 1px solid var(--shell-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  backdrop-filter: blur(14px);
}

.topbar {
  padding: 0 26px;
}

.globalbar {
  margin-left: 212px;
  padding: 0 26px;
}

body > .page {
  width: calc(100vw - 212px);
  max-width: 1480px;
  margin-left: 212px;
  padding: 22px 26px 48px;
}

@media (min-width: 1692px) {
  body > .page {
    margin-left: calc(212px + (100vw - 1692px) / 2);
  }
}

.breadcrumb {
  color: #738097;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  color: #111827;
  font-weight: 900;
}

.top-actions,
.account {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.top-actions span,
.account span,
.top-link-button {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.top-actions button,
#refreshBtn {
  height: 36px;
  border-color: var(--shell-blue);
  border-radius: 8px;
  background: var(--shell-blue);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.top-link-button {
  text-decoration: none;
  box-shadow: none;
}

.top-link-button:hover {
  border-color: #bfdbfe;
  background: var(--shell-blue-soft);
  color: #175cd3;
}

.category-market-tabs {
  top: 72px;
  max-width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

main {
  max-width: 1480px;
}

.status,
.product-card,
.module,
.rank-card,
.metric-card,
.table-wrap,
.trend-card,
.filter-card,
.list-card,
.hero,
.filters,
.metric-panel,
.trend,
.detail-panel,
.rank-panel,
.hero-panel {
  border-color: var(--shell-line);
  border-radius: 10px;
  box-shadow: var(--shell-shadow-soft);
}

.filter-card,
.list-card,
.product-card,
.module,
.hero-panel,
.metric-panel,
.trend,
.detail-panel,
.rank-panel {
  background: rgba(255, 255, 255, 0.96);
}

.filter-card,
.list-head,
.module-title,
.table-caption,
.table-caption-actions {
  border-bottom-color: #edf1f6;
}

th {
  background: #f8fafc;
  color: #475467;
  font-weight: 900;
}

td {
  color: #24324a;
}

tbody tr:hover {
  background: #fbfdff;
}

.search-box input,
input,
select {
  border-color: #d9e1ec;
}

.search-box input:focus,
input:focus,
select:focus {
  border-color: var(--shell-blue);
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell > .sidebar,
  body > .sidebar {
    display: none;
  }

  .topbar,
  .globalbar {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    min-height: 0;
    margin-left: 0;
    padding: 14px 16px;
  }

  body > .page {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding: 16px;
  }

  .category-market-tabs {
    top: 130px;
  }
}

/* 2026-06-13 全页面 UI 统一：外壳、卡片、按钮和表格语言同步。 */
:root {
  --shell-bg: #f4f7fb;
  --shell-line: #dce5f2;
  --shell-soft: #f8fbff;
  --shell-shadow: 0 18px 42px rgba(15, 23, 42, 0.065);
  --shell-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.045);
}

body {
  background:
    linear-gradient(180deg, #fbfdff 0, #eef4fb 340px, var(--shell-bg) 100%);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-shell > .sidebar,
body > .sidebar {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.2), transparent 210px),
    #0f172a;
}

.sidebar a,
.sidebar .nav a,
.sidebar .nav button {
  min-height: 42px;
  border-radius: 9px;
}

.sidebar a.active,
.sidebar .nav a.active {
  color: #175cd3;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.topbar,
.globalbar {
  border-bottom-color: #dbe3ef;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.top-actions span,
.account span,
.top-link-button {
  border-color: #d9e3f0;
  border-radius: 9px;
  background: #fff;
}

.top-actions button,
#refreshBtn {
  border-color: #2563eb;
  border-radius: 9px;
  background: #2563eb;
}

.status,
.product-card,
.module,
.rank-card,
.metric-card,
.table-wrap,
.trend-card,
.filter-card,
.list-card,
.hero,
.filters,
.metric-panel,
.trend,
.detail-panel,
.rank-panel,
.hero-panel,
.category-overview-module,
.fastmoss-section,
.industry-page-hero,
.industry-scatter-card,
.industry-list-card,
.industry-rank-card,
.strategy-analysis-card,
.price-trend-card,
.agent-card,
.agent-chat,
.agent-source-card {
  border-color: var(--shell-line);
  border-radius: 12px;
  box-shadow: var(--shell-shadow-soft);
}

.product-card,
.module,
.rank-card,
.metric-card,
.table-wrap,
.trend-card,
.filter-card,
.list-card,
.hero-panel,
.category-overview-module,
.fastmoss-section,
.industry-page-hero,
.industry-scatter-card,
.industry-list-card,
.industry-rank-card,
.strategy-analysis-card,
.price-trend-card {
  background: rgba(255, 255, 255, 0.97);
}

.module-title,
.table-caption,
.table-caption-actions,
.list-head,
.category-overview-title,
.fastmoss-section-head {
  border-bottom-color: #edf2f7;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

th {
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
}

td {
  color: #24324a;
}

tbody tr:hover {
  background: #f8fbff;
}

.search-box input,
input,
select {
  border-color: #d9e3f0;
  border-radius: 9px;
}

.search-box input:focus,
input:focus,
select:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.12);
}
