﻿:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --header: #eef3f8;
  --header-2: #f7f9fc;
  --line: #d8e0e8;
  --line-soft: #e8edf2;
  --text: #152231;
  --muted: #687789;
  --muted-2: #8b99a8;
  --accent: #245b9d;
  --accent-soft: #e7f0fb;
  --green: #138a55;
  --red: #c8443a;
  --shadow: 0 12px 30px rgba(34, 55, 80, 0.08);
  --global-nav-height: 72px;
  font-family: "Microsoft YaHei", "寰蒋闆呴粦", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 1120px;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}

.global-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  flex: 0 0 var(--global-nav-height);
  height: var(--global-nav-height);
  border-bottom: 1px solid #dbe2ea;
  background: linear-gradient(135deg, #f8fafc 0%, #eef3f8 50%, #e8eef5 100%);
  box-shadow: 0 2px 12px rgba(22, 34, 51, 0.08);
  overflow: visible;
  transition: height 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.global-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #245b9d, #4a8fd4, #245b9d);
  z-index: 1;
}

.global-nav-inner {
  display: flex;
  align-items: center;
  width: min(1500px, calc(100vw - 48px));
  height: 100%;
  margin: 0 auto;
  gap: 36px;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.global-nav-toggle {
  position: absolute;
  left: 50%;
  bottom: -11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8a97a7;
  cursor: pointer;
  opacity: 0.55;
  transform: translateX(-50%);
  transition: opacity 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.global-nav-toggle:hover {
  opacity: 1;
  color: #627084;
}

.global-nav-toggle::before {
  content: "⌃";
  display: block;
  font-size: 16px;
  line-height: 1;
}

body.nav-collapsed .primary-nav {
  display: none;
}

body.nav-collapsed .global-nav-inner {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

body.nav-collapsed .global-nav {
  flex-basis: 24px;
  height: 24px;
  padding: 0;
}

body.nav-collapsed .global-nav-toggle::before {
  content: "⌄";
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  color: #1f54c9;
  text-decoration: none;
  line-height: 1;
}

.brand-name {
  color: #1f54c9;
  font-family: "Source Han Serif SC", "思源宋体", "Noto Serif SC", "思源宋体 CN", "方正字迹-行楷简", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-sub {
  color: #1f54c9;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.72;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex: 1;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

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

.primary-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: auto;
  justify-content: center;
  color: #0b1a30;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 14px;
}

.primary-nav-item.active {
  color: #1f54c9;
  text-decoration: underline;
  text-decoration-color: #1f54c9;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.primary-nav-item:hover {
  color: #1f54c9;
}

.primary-nav-item + .primary-nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  background: rgba(103, 114, 134, 0.22);
  transform: translateY(-50%);
}

.primary-nav-item-disabled {
  color: #9aa5b3;
  cursor: default;
}

.primary-nav-item-disabled:hover {
  color: #9aa5b3;
}

.primary-nav-subitem {
  color: #0b1a30;
  font-size: 17px;
  font-weight: 760;
  padding: 0 12px;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3a7bd5;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-login-btn:hover {
  color: #2d62ae;
  background: transparent;
  box-shadow: none;
}

.nav-login-btn.logged-in {
  color: #138a55;
}

.nav-login-btn.logged-in:hover {
  color: #0f7246;
}

/* Login blur overlay */
.login-blur-overlay {
  position: fixed;
  top: var(--global-nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: auto;
  overflow-y: hidden;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  transition: opacity 0.3s ease;
}

.login-blur-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.login-blur-message {
  position: absolute;
  top: auto;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  color: #4a5a72;
  letter-spacing: 0.04em;
  background: #ffffff;
  padding: 10px 24px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  border: 1px solid #e8edf2;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1700px, calc(100vw - 24px));
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding: 4px 0 4px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.product-detail-page {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  background: #f6f8fb;
}

.product-detail-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f6f8fb;
}

.market-observation-page {
  background: var(--bg);
}

.market-observation-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  flex-direction: column;
}

.market-observation-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 12px 0 10px;
}

.market-observation-source-tabs {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.market-observation-source-tabs::-webkit-scrollbar {
  display: none;
}

.source-tab {
  flex: 0 0 auto;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #536275;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  padding: 0 10px;
  white-space: nowrap;
}

.source-tab.active {
  border-color: #bfd4ef;
  background: var(--accent-soft);
  color: var(--accent);
}

.source-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: #536275;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.market-observation-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.market-observation-note {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.market-observation-open {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.market-observation-open:hover {
  text-decoration: underline;
}

.market-observation-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #ffffff;
}

.deep-report-shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.deep-report-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #ffffff;
}

.deep-report-assistant-tab {
  position: absolute;
  right: 0;
  top: 42%;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 46px;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(43, 89, 209, 0.2);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(43, 89, 209, 0.92);
  box-shadow: 0 2px 8px rgba(43, 89, 209, 0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.deep-report-assistant-tab:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(43, 89, 209, 0.12);
}

.deep-report-assistant-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(510px, 100%);
  border-left: 1px solid rgba(43, 89, 209, 0.2);
  background: #f5f7fb;
  box-shadow: -8px 0 24px rgba(44, 36, 22, 0.16);
  color: #17213a;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.deep-report-assistant-drawer.open {
  transform: translateX(0);
}

.deep-report-assistant-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid rgba(43, 89, 209, 0.14);
  background: #ffffff;
  padding: 18px 18px 16px 20px;
}

.deep-report-assistant-head strong {
  color: #17213a;
  font-size: 16px;
  font-weight: 800;
}

.deep-report-assistant-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(43, 89, 209, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: #52607a;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.deep-report-assistant-close:hover {
  color: #2b59d1;
}

.deep-report-assistant-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #f5f7fb;
}

.pending-module-shell {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.pending-module-shell p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

h1 {
  margin: 0;
  color: #102033;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 760;
}

.module-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  margin-top: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.module-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  height: 30px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 400;
  padding: 0 2px 5px;
}

.tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.searchbar {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
  width: 30.24%;
  min-width: 259px;
}

.data-note {
  margin: 0;
  color: #8b99a8;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.data-note span {
  color: inherit;
  font-weight: inherit;
}

/* --- 自选池：搜索栏卡片筛选 --- */
.pool-cards {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-right: auto;
}

.pool-card {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pool-card:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pool-card.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

/* 卡片选中高亮与各池子星标配色一致 */
.pool-card.is-active.pool-config {
  border-color: #d63a45;
  background: #d63a45;
}

.pool-card.is-active.pool-candidate {
  border-color: #e8a33d;
  background: #e8a33d;
}

.pool-card.is-active.pool-watch {
  border-color: #2e9e5b;
  background: #2e9e5b;
}

.pool-card.is-active.pool-fav {
  border-color: #1a1a1a;
  background: #1a1a1a;
}

.pool-card.pool-config:hover:not(.is-active) {
  border-color: #d63a45;
  color: #d63a45;
}

.pool-card.pool-candidate:hover:not(.is-active) {
  border-color: #e8a33d;
  color: #e8a33d;
}

.pool-card.pool-watch:hover:not(.is-active) {
  border-color: #2e9e5b;
  color: #2e9e5b;
}

.pool-card.pool-fav:hover:not(.is-active) {
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.pool-card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.pool-card.is-active .pool-card-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.selected-chip.pool-chip {
  border-color: #a9c6e8;
  background: var(--accent-soft);
  color: #1f4470;
}

.selected-chip.pool-chip button {
  background: #cfe0f5;
  color: #1f4470;
}

/* --- 自选池：基金简称单元格右侧的星标与弹层 --- */
.name-cell {
  padding-right: 26px;
}

thead .sticky-name {
  padding-right: 26px;
}

.fund-star {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: #b9c4d0;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.fund-star:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.fund-star.is-active {
  border-color: #e8b451;
  background: #fff6e2;
  color: #e8a33d;
}

/* 池子配色：配置池-红、候选池-橙、观察池-绿、自选池-黑 */
.fund-star.pool-config {
  border-color: #e06b72;
  background: #fdecec;
  color: #d63a45;
}

.fund-star.pool-candidate {
  border-color: #e8b451;
  background: #fff6e2;
  color: #e8a33d;
}

.fund-star.pool-watch {
  border-color: #5cb483;
  background: #e9f7ef;
  color: #2e9e5b;
}

.fund-star.pool-fav {
  border-color: #555555;
  background: #f1f1f1;
  color: #1a1a1a;
}

.fund-star.pool-config:hover {
  border-color: #d63a45;
  background: #fbdedd;
  color: #c22e39;
}

.fund-star.pool-candidate:hover {
  border-color: #e8a33d;
  background: #fdeecb;
  color: #d18f28;
}

.fund-star.pool-watch:hover {
  border-color: #2e9e5b;
  background: #d8efe1;
  color: #23854c;
}

.fund-star.pool-fav:hover {
  border-color: #1a1a1a;
  background: #e6e6e6;
  color: #000000;
}

.fund-star:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pool-popover {
  position: fixed;
  z-index: 70;
  width: 196px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(34, 55, 80, 0.18);
}

.pool-popover-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.pool-popover-hint {
  margin: 2px 0 8px;
  font-size: 11px;
  color: var(--muted-2);
}

.pool-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.pool-popover-item:hover {
  background: var(--accent-soft);
}

.pool-popover-item input {
  margin: 0;
  accent-color: var(--accent);
}

.pool-popover-item.pool-config input {
  accent-color: #d63a45;
}

.pool-popover-item.pool-candidate input {
  accent-color: #e8a33d;
}

.pool-popover-item.pool-watch input {
  accent-color: #2e9e5b;
}

.pool-popover-item.pool-fav input {
  accent-color: #1a1a1a;
}

.pool-popover-name {
  flex: 1 1 auto;
}

.pool-popover-count {
  color: var(--muted-2);
  font-size: 11px;
}

.search-field {
  position: relative;
  flex: 1;
}

.searchbar input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.searchbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 91, 157, 0.12);
}

.searchbar button {
  min-width: 82px;
  height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(34, 55, 80, 0.16);
}

.suggestions.is-open {
  display: block;
}

.suggestion-item {
  display: grid;
  grid-template-columns: 20px minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e4eaf1;
  background: #ffffff !important;
  color: #172335;
  cursor: pointer;
  appearance: none;
  padding: 10px 12px;
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item:hover,
.suggestion-item:focus,
.suggestion-item:active {
  background: #ffffff !important;
  color: #172335;
  outline: none;
}

.suggestion-item.is-selected {
  background: #ffe9e7 !important;
  color: #2d1d1b;
}

.suggestion-item.is-selected:hover,
.suggestion-item.is-selected:focus,
.suggestion-item.is-selected:active {
  background: #ffe1de !important;
  color: #2d1d1b;
}

.suggestion-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid #8ca2ba;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
}

.suggestion-item.is-selected .suggestion-check {
  border-color: #c84d45;
  background: #c84d45;
}

.suggestion-main {
  overflow: hidden;
  color: #122136;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-main small {
  color: #506278;
  font-weight: 700;
}

.suggestion-meta {
  overflow: hidden;
  color: #51657c;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-item.is-selected .suggestion-main,
.suggestion-item.is-selected .suggestion-main small,
.suggestion-item.is-selected .suggestion-meta {
  color: #2d1d1b;
}

.selected-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.selected-search:empty {
  display: none;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  border: 1px solid #f0a19a;
  border-radius: 999px;
  background: #ffe9e7;
  color: #5a221d;
  font-size: 11px;
  font-weight: 700;
  padding: 0 9px;
}

.selected-chip button {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #f6c8c3;
  color: #5a221d;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.table-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table-wrap {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 12px;
}

th,
td {
  height: 42px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 0 12px;
  white-space: nowrap;
  text-align: center;
}

th {
  padding: 0 8px;
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--header);
  color: #314155;
  font-size: 13px;
  font-weight: 760;
}

thead tr:first-child th {
  top: 0;
  height: 36px;
  color: var(--accent);
  background: #e6edf5;
  font-size: 13px;
  font-weight: 800;
}

thead tr:nth-child(2) th {
  top: 36px;
  height: 40px;
  font-size: 13px;
}

tbody tr.row-even td {
  background: #f5f6f8;
}

tbody tr.row-odd td {
  background: #ffffff;
}

tbody tr.virtual-spacer td {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  line-height: 0 !important;
}

tbody tr:hover td {
  background: #eef3f8;
}

tbody tr.row-highlight td {
  background: #ffe3e0 !important;
  box-shadow: inset 0 1px 0 #f0a19a, inset 0 -1px 0 #f0a19a;
}

tbody tr.row-highlight td:first-child {
  box-shadow: inset 0 1px 0 #f0a19a, inset 0 -1px 0 #f0a19a, 12px 0 18px rgba(34, 55, 80, 0.12);
}

th button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

th.sortable button::after {
  content: none;
}

th.sortable.sorted-asc button::after {
  content: "\2191";
  margin-left: 4px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
}

th.sortable.sorted-desc button::after {
  content: "\2193";
  margin-left: 4px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
}
.group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 760;
}

.group-toggle::after {
  content: "\2212";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 7px;
  border: 1px solid rgba(77, 92, 112, 0.22);
  border-radius: 999px;
  color: rgba(77, 92, 112, 0.5);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.85;
}

.group-collapsed .group-toggle::after {
  content: "+";
}

.collapsed-cell {
  min-width: 78px;
  color: var(--muted-2);
}

.sticky-name {
  position: sticky;
  left: 0;
  z-index: 3;
  width: auto;
  min-width: max-content;
  max-width: none;
  text-align: center;
  background: #ffffff !important;
  background-clip: padding-box;
  box-shadow: 12px 0 18px rgba(34, 55, 80, 0.1);
  opacity: 1;
}

thead .sticky-name {
  z-index: 6;
  background: #e6edf5 !important;
  font-size: 13px;
  font-weight: 800;
}

tbody td.sticky-name {
  background: #f5f6f8 !important;
}

tbody td {
  background-color: #f5f6f8;
}

thead tr th.module-basic {
  background-color: #e9f1fa;
}

thead tr th.module-performance {
  background-color: #edf6e9;
}

thead tr th.module-interval {
  background-color: #eaf6f4;
}

thead tr th.module-annual {
  background-color: #fff1d8;
}

thead tr th.module-intervalExcess {
  background-color: #eef7ff;
}

thead tr th.module-annualExcess {
  background-color: #fff0ea;
}

thead tr th.module-tag {
  background-color: #f0eaf8;
}

.module-head {
  border-left: 2px solid #c5d4e4;
}

.module-start {
  border-left: 2px solid #c5d4e4;
}

.name-cell strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

.name-cell span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
  text-overflow: ellipsis;
}

.clickable-name {
  cursor: pointer;
}

.clickable-name:hover strong {
  color: var(--accent);
}

.text {
  text-align: center;
}

.code {
  color: #a9b9c4;
  font-variant-numeric: tabular-nums;
}

.num {
  font-variant-numeric: tabular-nums;
}

.positive {
  color: var(--red);
}

.negative {
  color: var(--green);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 24px;
  border: 1px solid #c5dcf7;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 8px;
}

.empty {
  color: var(--muted-2);
}

.empty-state {
  height: 180px;
  color: var(--muted-2);
  font-size: 13px;
}

.w-sm {
  width: auto;
  min-width: max-content;
}

.w-md {
  width: auto;
  min-width: max-content;
}

.w-lg {
  width: auto;
  min-width: max-content;
}

.w-xl {
  width: auto;
  min-width: max-content;
}

@media (max-width: 1180px) {
  .global-nav {
    flex-basis: auto;
    height: auto;
    padding: 14px 0 16px;
  }

  .global-nav-inner {
    width: calc(100vw - 24px);
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand-name {
    font-size: 22px;
  }

  .primary-nav {
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
  }

  .primary-nav-item {
    min-width: 0;
    height: auto;
    padding: 0 12px;
    font-size: 16px;
  }

  .primary-nav-subitem {
    padding: 0 10px;
    font-size: 15px;
  }

  body {
    min-width: 0;
  }

  .shell {
    width: calc(100vw - 24px);
    padding-top: 20px;
  }

  .topbar,
  .search-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .search-row {
    display: grid;
    gap: 8px;
  }

  .searchbar {
    width: 100%;
    min-width: 0;
  }

  .topbar {
    display: grid;
  }
}

.toolbox-page {
  width: min(1700px, calc(100vw - 24px));
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 0 12px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 1 1 auto;
  align-content: start;
  align-items: start;
  padding: 8px 0;
}

.toolbox-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(34, 55, 80, 0.04);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.toolbox-card:hover {
  box-shadow: 0 8px 24px rgba(34, 55, 80, 0.10);
  transform: translateY(-2px);
}

.toolbox-card-pending {
  border-style: dashed;
  opacity: 0.85;
  cursor: pointer;
}

.toolbox-card-pending:hover {
  box-shadow: 0 8px 24px rgba(34, 55, 80, 0.10);
  transform: translateY(-2px);
}

.toolbox-card.showcase {
  max-width: none;
}

.showcase-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #fff;
}

.showcase-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 20px;
}

.showcase-banner-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex: 1;
  white-space: nowrap;
}

.showcase-banner-arrow {
  font-size: 20px;
  opacity: 0.85;
  transition: transform 0.2s;
}

.toolbox-card:hover .showcase-banner-arrow {
  transform: translateX(4px);
}

.showcase-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 18px 16px 8px;
}

.showcase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.showcase-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--header-2);
  font-size: 20px;
  transition: transform 0.2s;
}

.toolbox-card:hover .showcase-step-icon {
  transform: scale(1.06);
}

.showcase-step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.showcase-flow-arrow {
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 400;
  padding: 0 1px;
  margin-top: -16px;
}

.showcase-desc {
  margin: 8px 20px 14px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbox-card-status-pending {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: auto 8px;
  font-size: 7px;
  font-weight: 600;
  color: var(--muted-2);
  background: var(--header-2);
  border: 0;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: default;
}

/* 工具箱内嵌模态层 */
.toolbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.toolbox-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, 0.45);
}

.toolbox-modal-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--panel);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.toolbox-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 20, 30, 0.55);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.toolbox-modal-close:hover {
  background: rgba(15, 20, 30, 0.75);
}

.toolbox-modal-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #fff;
}

.report-login-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 247, 250, 0.92);
  backdrop-filter: blur(4px);
}

.report-login-card {
  width: 320px;
  padding: 32px 30px 30px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(22, 34, 51, 0.12);
  text-align: center;
}

.report-login-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.report-login-title {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 760;
  color: #102033;
}

.report-login-desc {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--muted);
}

.report-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-login-field input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.report-login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}

.report-login-error {
  margin: 0;
  font-size: 13px;
  color: var(--red);
}

.report-login-btn {
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.report-login-btn:hover {
  background: #1b4a82;
}

#industryRotationPage {
  width: 100% !important;
  max-width: none;
  padding: 0;
  margin: 0;
}

#industryRotationShell {
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

#industryRotationFrame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.powerbi-clip {
  overflow: hidden !important;
}

.powerbi-clip .deep-report-frame {
  height: calc(100% + 38px);
}

/* ========== Login Modal ========== */
.login-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 99999;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.login-overlay > * {
  pointer-events: auto;
}

.login-overlay.hidden {
  display: none;
}
.login-card {
  position: relative;
  width: 400px;
  padding: 36px 40px 32px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  text-align: center;
  z-index: 1;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.login-brand-name {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 800;
  color: #0b1a30;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.login-brand-sub {
  margin: 0 0 32px;
  font-size: 11px;
  font-weight: 300;
  color: #0b1a30;
  letter-spacing: 0.02em;
  opacity: 0.72;
  line-height: 1.4;
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8b99a8;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.login-close:hover {
  background: #f0f2f5;
  color: #152231;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.login-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 12px;
  font-weight: 600;
  color: #2a3d57;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-field input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 14px;
  border: 1.5px solid #d8e0e8;
  border-radius: 10px;
  font-size: 14px;
  color: #0b1a30;
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}

.login-field input:focus {
  border-color: #2d5a9a;
  box-shadow: 0 0 0 3px rgba(45, 90, 154, 0.10);
  background: #fff;
}

.login-field input::placeholder {
  color: #aab3c0;
  font-size: 13px;
}

.login-field-icon {
  position: absolute;
  right: 14px;
  bottom: 13px;
  font-size: 14px;
  opacity: 0.4;
  pointer-events: none;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef0ef;
  color: #c8443a;
  font-size: 13px;
  font-weight: 500;
  animation: loginErrorIn 0.25s ease;
}

@keyframes loginErrorIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: #245b9d;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(36, 91, 157, 0.35);
  background: #1b4a82;
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.login-btn-arrow {
  font-size: 16px;
  transition: transform 0.2s;
}

.login-btn:hover .login-btn-arrow {
  transform: translateX(4px);
}

.login-footer {
  margin: 24px 0 0;
  font-size: 11px;
  color: #9aa5b3;
  letter-spacing: 0.04em;
}

.login-overlay.hidden {
  display: none;
}
