@font-face {
  font-family: "TsangerJinKai02";
  src: url("/assets/fonts/TsangerJinKai02-W04.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "TsangerJinKai02";
  src: url("/assets/fonts/TsangerJinKai02-W05.ttf") format("truetype");
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --kami-serif: "TsangerJinKai02", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
  --kami-mono: "JetBrains Mono", "TsangerJinKai02", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --kami-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans SC", sans-serif;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(0, 0, 0, 0.05);
  --text: #1d1d1f;
  --muted: #86868b;
  --soft: #424245;
  --blue: #0071e3;
  --green: #24b24b;
  --red: #ff3b30;
  --amber: #ff9500;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(0, 0, 0, 0.01);
}

* { 
  box-sizing: border-box; 
}

.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.h-full { height: 100%; }

.text-muted {
  color: var(--muted) !important;
}

html { 
  background: var(--bg); 
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 113, 227, 0.03) 0%, transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 60%, #ececf1 100%);
  color: var(--text);
  font-family: var(--kami-serif);
  font-synthesis: none;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  padding: 0;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: none; outline: none; }

code,
pre,
kbd,
samp,
.mono,
.font-mono,
.time-cell,
.neon-green,
.neon-red {
  font-family: var(--kami-mono) !important;
}

/* 顶部悬浮导航气泡 */
.floating-nav {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 28px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px;
  border-radius: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text);
}

.nav-btn.btn-active,
.nav-btn.tab-active {
  background: white;
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(180deg, #333336, #1d1d1f);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  font-size: 16px;
}

.brand strong { 
  display: block; 
  font-family: var(--kami-serif);
  font-size: 18px; 
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand small { 
  display: block; 
  color: var(--muted); 
  font-size: 10px; 
  margin-top: 1px; 
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 主内容容器限制 */
.main-wrapper {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.update-text {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.update-text::before {
  content: "当前 ";
  color: var(--muted);
  font-weight: 600;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: white;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  position: relative;
}

.icon-button:hover {
  background: var(--bg);
  color: var(--text);
}

.icon-button.voice-active {
  color: var(--blue);
  border-color: rgba(0, 113, 227, 0.2);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.1);
}

.status-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.status-dot.muted {
  background: #b8b8bc;
  box-shadow: none;
}

/* 核心卡片栅格 */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card,
.apple-card {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 86px;
  padding: 16px 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow);
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--kami-serif);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

/* 珍珠磨砂小卡片 */
.apple-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow);
}

.apple-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 113, 227, 0.25);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.starred-card {
  border-color: rgba(255, 149, 0, 0.25) !important;
  background: rgba(255, 149, 0, 0.02) !important;
}

/* 免跳页全宽 K线抽屉 */
.kline-drawer {
  grid-column: 1 / -1;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kline-drawer.open {
  max-height: 480px;
  opacity: 1;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  margin-top: 8px;
  margin-bottom: 12px;
}

/* 极简徽章 */
.apple-badge {
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.apple-badge-blue {
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.12);
  color: var(--blue);
}

.apple-badge-gray {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--soft);
}

.apple-badge-amber {
  background: rgba(255, 149, 0, 0.06);
  border: 1px solid rgba(255, 149, 0, 0.12);
  color: var(--amber);
}

/* 极光红绿 */
.neon-green {
  color: var(--green) !important;
  font-weight: 700;
}

.neon-red {
  color: var(--red) !important;
  font-weight: 700;
}

/* 顶部选择 tab */
.apple-tab-bar {
  background: rgba(0, 0, 0, 0.03);
  padding: 4px;
  border-radius: 12px;
  display: inline-flex;
}

.apple-tab-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 8px;
  transition: all 0.25s;
  background: transparent;
}

.apple-tab-btn:hover {
  color: var(--text);
}

.apple-tab-btn.apple-active {
  background: white;
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
}

.pagination-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  background: white;
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg);
}

.pagination-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.pagination-btn:disabled {
  opacity: 0.3;
}

/* 模态弹窗 */
.modal-card {
  width: min(500px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.modal-head strong {
  font-family: var(--kami-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  border-bottom: 0;
  background: rgba(0, 0, 0, 0.01);
}

.modal-body {
  padding: 20px;
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.note-card textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: white;
  color: var(--text);
  padding: 12px;
  outline: 0;
}

.primary-button,
.ghost-button {
  min-height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: var(--blue);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.primary-button:hover {
  background: #0077ed;
  transform: translateY(-1px);
}

.ghost-button {
  border: 1px solid var(--panel-border);
  background: white;
  color: var(--soft);
}

.ghost-button:hover {
  background: var(--bg);
}

.close-button {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.close-button:hover {
  color: var(--text);
}

/* 滚动条 */
.custom-scroll::-webkit-scrollbar { 
  width: 4px; 
  height: 4px; 
}
.custom-scroll::-webkit-scrollbar-thumb { 
  background: rgba(0, 0, 0, 0.08); 
  border-radius: 999px; 
}
.custom-scroll::-webkit-scrollbar-thumb:hover { 
  background: rgba(0, 0, 0, 0.15); 
}

/* 响应式 */
@media (max-width: 900px) {
  body { padding: 16px; }
  .floating-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    margin-bottom: 20px;
  }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 520px) {
  body { padding: 12px; }
  .metric-grid { gap: 10px; }
  .metric-card { min-height: 76px; padding: 12px 14px; }
  .metric-card strong { font-size: 24px; }
}

/* 顶部选择 tab 重新设计 */
.tab-strip {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.main-tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: none;
  cursor: pointer;
}

.main-tab:hover {
  color: #0f172a;
}

.main-tab.tab-active {
  background: #ffffff;
  color: #007aff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.signal-panel-head {
  align-items: flex-start;
  gap: 16px;
}

.signal-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.view-toggle-btn.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.signal-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.signal-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--kami-sans);
}

.signal-table th {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.75);
}

.signal-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.signal-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
  white-space: nowrap;
}

.signal-table tbody tr {
  transition: background-color 0.18s ease;
}

.signal-table tbody tr:hover {
  background: rgba(0, 113, 227, 0.045);
}

.signal-table .row-strong {
  background: rgba(36, 178, 75, 0.035);
}

.signal-table .row-caution {
  background: rgba(255, 149, 0, 0.04);
}

.symbol-cell {
  cursor: pointer;
}

.symbol-cell strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.symbol-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.confidence-pill {
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.confidence-pill span {
  font-size: 10px;
  opacity: 0.75;
}

.confidence-high {
  color: #047857;
  background: rgba(16, 185, 129, 0.13);
}

.confidence-mid {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.confidence-low {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
}

.setup-badge,
.risk-badge,
.alert-badge,
.backtest-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.setup-trend_breakout {
  color: #047857;
  background: rgba(16, 185, 129, 0.13);
}

.setup-counter_trend_breakout {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
}

.setup-extension_chase {
  color: #be123c;
  background: rgba(244, 63, 94, 0.12);
}

.setup-watch_breakout {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.risk-low {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.risk-mid {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
}

.risk-high {
  color: #be123c;
  background: rgba(244, 63, 94, 0.13);
}

.alert-badge {
  color: #075985;
  background: rgba(14, 165, 233, 0.11);
}

.backtest-chip {
  color: #334155;
  background: rgba(15, 23, 42, 0.05);
}

.table-star {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  color: #94a3b8;
  cursor: pointer;
}
.table-star i {
  pointer-events: none;
}

.table-star.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.positive {
  color: #059669;
  font-weight: 800;
}

.negative {
  color: #dc2626;
  font-weight: 800;
}

.time-cell {
  color: var(--muted);
  font-size: 12px;
}

.action-cell button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  margin-left: 4px;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.04);
}

.action-cell button:hover {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
}

.empty-row {
  padding: 56px !important;
  text-align: center;
  color: var(--muted);
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 18px;
}

/* 气泡组件样式 */
.bubble-item {
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  box-sizing: border-box;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: bubble-float 4.2s ease-in-out infinite;
}

/* 3D 顶部弯曲高光 */
.bubble-item::before {
  content: '';
  position: absolute;
  top: 6%;
  left: 15%;
  width: 32%;
  height: 16%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
  border-radius: 50% / 40% 40% 60% 60%;
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.bubble-item:hover {
  transform: scale(1.15) !important;
  animation-play-state: paused;
  z-index: 10;
}

/* 悬停时高光变亮 */
.bubble-item:hover::before {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.05));
}

.bubble-item.starred-bubble {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.5) !important;
}

.bubble-item.starred-bubble::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid #f59e0b;
  opacity: 0.5;
  animation: bubble-pulse 2s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes bubble-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes bubble-float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}




/* 气泡详情模态框 & 仪表盘表格额外样式 */
#bubble-details-modal table, #panel-6 table {
  border-collapse: collapse;
}

#bubble-details-modal tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

.details-structure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.details-structure-grid > div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.details-structure-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}

.details-structure-grid strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

#panel-6 tbody tr {
  transition: background-color 0.2s ease;
}

#panel-6 tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

#panel-6 th, #panel-6 td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Tutorial posts */
.tutorial-panel {
  max-width: 980px;
  margin: 0 auto;
}

#post-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

#post-category-tabs button {
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

#post-category-tabs button.tab-active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

#search-input {
  width: min(100%, 320px);
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: var(--text) !important;
}

.post-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.035);
  padding: 28px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.post-meta .name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.post-meta .handle {
  font-size: 12px;
  color: var(--muted);
}

.post-content h3 {
  color: #0071e3 !important;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.25;
  letter-spacing: 0;
}

.post-content div {
  color: #2f3033 !important;
  font-size: 15.5px;
  line-height: 1.9;
  letter-spacing: 0;
}

.post-card img[alt="行情图片"] {
  aspect-ratio: 16 / 10;
  max-height: none !important;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
  background: #fff;
}

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

@media (max-width: 700px) {
  .signal-panel-head,
  .signal-head-actions {
    align-items: stretch;
    justify-content: flex-start;
  }

  .view-toggle {
    width: 100%;
  }

  .view-toggle-btn {
    flex: 1;
    justify-content: center;
  }

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

  .post-card {
    padding: 20px;
    border-radius: 22px;
  }

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

/* 信号筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  flex-wrap: wrap;
}

.filter-bar select {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.filter-bar select:hover {
  border-color: rgba(0, 113, 227, 0.25);
}

.filter-bar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
}

#filter-reset-btn {
  min-height: 32px;
  padding: 4px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#filter-reset-btn:hover {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.filter-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* 移动端视图 */
@media (max-width: 767px) {
  .mobile-view table {
    font-size: 12px;
  }

  .mobile-view th,
  .mobile-view td {
    padding: 8px 4px;
  }

  .filter-vertical {
    flex-direction: column;
    gap: 6px;
  }

  .filter-vertical select {
    width: 100%;
  }

  .filter-bar {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
  }
}

/* ===== 首次报警闪光动画 ===== */
@keyframes firstAlertFlash {
  0%   { background-color: rgba(34, 197, 94, 0.7); }
  50%  { background-color: rgba(34, 197, 94, 0.15); }
  100% { background-color: rgba(34, 197, 94, 0.7); }
}
@keyframes firstAlertPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.3); }
  50%      { box-shadow: 0 0 20px rgba(34, 197, 94, 0.7); }
}
tr.first-alert {
  background-color: rgba(34, 197, 94, 0.08);
}
tr.first-alert td {
  border-color: rgba(34, 197, 94, 0.3) !important;
}
tr.first-alert .symbol-cell strong {
  color: #16a34a !important;
  font-weight: 900;
}

.bubble-item.first-alert-bubble {
  border: 3px solid #22c55e !important;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
  animation: firstAlertPulse 2s ease-in-out infinite;
}

/* ====================== 每日回测仪表盘样式 ====================== */

/* 仪表盘卡片网格 */
.dashboard-cards {
  display: grid;
}

/* 仪表盘统计卡片 */
.dashboard-cards .stat-card,
.stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-2px);
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--kami-serif);
  line-height: 1;
  color: #0f172a;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.stat-card .stat-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.stat-card-green .stat-value {
  color: #22c55e;
}

.stat-card-red .stat-value {
  color: #ef4444;
}

/* 胜率进度条 */
.win-row {
  margin-bottom: 10px;
}

.win-row:last-child {
  margin-bottom: 0;
}

.win-header {
  margin-bottom: 2px;
}

.win-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.win-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 4px;
}

/* 仪表盘表格 */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--kami-sans);
  color: var(--text);
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
}

.dashboard-table th {
  padding: 12px 10px;
  color: var(--soft);
  background: rgba(0,0,0,0.03);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-transform: uppercase;
}

.dashboard-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}

.dashboard-table tbody tr {
  transition: background-color 0.18s ease;
}

.dashboard-table tbody tr:hover {
  background: rgba(0, 113, 227, 0.04);
}

.dashboard-table .dashboard-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.dashboard-table .dashboard-row:nth-child(even):hover {
  background: rgba(0, 113, 227, 0.04);
}

/* 报警轨迹按钮 */
.trajectory-btn {
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.trajectory-btn:hover {
  border-color: rgba(0, 113, 227, 0.25);
  background: rgba(0, 113, 227, 0.04);
}

/* 弹出层滚动条 */
#alert-trajectory-popover.custom-scroll::-webkit-scrollbar {
  width: 3px;
}

#alert-trajectory-popover.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* 弹出层动画 */
#alert-trajectory-popover {
  animation: popover-in 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 仪表盘移动端适配 */
@media (max-width: 767px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .stat-card .stat-label {
    font-size: 11px;
  }

  .dashboard-table {
    font-size: 11px;
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: 8px 6px;
  }

  #alert-trajectory-popover {
    max-width: 260px;
    max-height: 260px;
  }
}

@media (max-width: 520px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .stat-card {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .stat-card .stat-value {
    font-size: 20px;
  }
}

/* ===== 面板卡片（脱离 Tailwind 依赖） ===== */
.panel-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--shadow);
}

/* ===== 骨架屏加载动画 ===== */
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.skeleton-block {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 无障碍：减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bubble-item {
    animation: none !important;
  }

  .bubble-item:hover {
    transform: none !important;
  }
}

/* ===== Premium 仪表盘统计卡片 ===== */
.premium-stat-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.premium-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: background 0.3s;
}

.premium-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.premium-stat-card.card-blue::before {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
}

.premium-stat-card.card-green::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.premium-stat-card.card-orange::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.premium-stat-card.card-red::before {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.premium-stat-left {
  display: flex;
  flex-direction: column;
}

.premium-stat-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.premium-stat-value {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--kami-sans);
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.premium-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  margin-top: 6px;
}

.premium-stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* SVG 径向环图动画 */
.radial-gauge circle {
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 评级有效性 Banner */
.verdict-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.verdict-valid {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.verdict-invalid {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

/* 仪表盘表格行交互 */
.dashboard-table tbody tr.dashboard-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dashboard-table tbody tr.dashboard-row:hover {
  background: rgba(0, 113, 227, 0.05) !important;
}

/* 日期控件与刷新按钮优化 */
#dashboard-date {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  outline: none;
  font-family: var(--kami-sans);
}

#dashboard-date:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

#panel-6 .panel-head button {
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--blue);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#panel-6 .panel-head button:hover {
  background: #0077ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

#panel-6 .panel-head button:active {
  transform: translateY(0);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  vertical-align: middle;
}

/* ===== 3-Pane Workstation Layout CSS ===== */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* Left Sidebar Navigation */
.app-sidebar {
  display: flex;
  flex-direction: column;
  width: 248px;
  height: 100%;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s, border-color 0.3s;
}

.app-sidebar.collapsed {
  width: 76px;
  opacity: 1;
  pointer-events: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.sidebar-brand-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.sidebar-brand strong {
  font-family: var(--kami-serif);
  font-size: 16px;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sidebar-signal-count {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.sidebar-signal-count span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-btn i {
  font-size: 14px;
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
}

.sidebar-btn span {
  white-space: nowrap;
}

.sidebar-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
}

.sidebar-btn.btn-active,
.sidebar-btn.tab-active {
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  font-weight: 600;
}

.sidebar-brand-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sidebar-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.sidebar-voice-btn {
  position: relative;
  margin-top: 18px;
}

.sidebar-voice-btn.voice-on {
  color: #0891b2;
  background: rgba(6, 182, 212, 0.1);
}

.sidebar-voice-btn.voice-off {
  color: var(--muted);
}

.voice-status-dot {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #cbd5e1;
}

.voice-status-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

.sidebar-close-btn-top {
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-close-btn-top:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

/* Middle Workspace Pane */
.app-workspace {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding: 8px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 170px;
}

.workspace-title {
  font-family: var(--kami-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-icon-btn {
  background: transparent;
  border: none;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.2s;
}

.header-icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.voice-label {
  display: none;
}

.app-sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 14px 10px;
}

.app-sidebar.collapsed .sidebar-brand-main {
  flex: 0 0 auto;
}

.app-sidebar.collapsed .sidebar-brand strong,
.app-sidebar.collapsed #signal-count-badge,
.app-sidebar.collapsed .voice-label,
.app-sidebar.collapsed .sidebar-close-btn-top,
.app-sidebar.collapsed .sidebar-btn span {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-brand-actions {
  display: none;
}

.app-sidebar.collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

.app-sidebar.collapsed .sidebar-nav {
  align-items: center;
  padding: 14px 10px;
}

.app-sidebar.collapsed .sidebar-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

.app-sidebar.collapsed .sidebar-btn i {
  width: auto;
  font-size: 16px;
}

/* Right Details Panel */
.app-details-pane {
  display: flex;
  flex-direction: column;
  width: min(980px, 58vw);
  min-width: min(760px, calc(100vw - 360px));
  max-width: calc(100vw - 280px);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
  z-index: 900;
  flex-shrink: 0;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s, border-color 0.3s;
}

#app-details-pane,
#details-resizer {
  display: none !important;
}

.app-details-pane.collapsed {
  min-width: 0;
  width: 0px;
  border-left: none;
  opacity: 0;
  pointer-events: none;
}

.details-resizer {
  width: 8px;
  height: 100%;
  cursor: col-resize;
  flex: 0 0 8px;
  background: transparent;
  position: relative;
  z-index: 950;
}

.details-resizer::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.2s;
}

.details-resizer:hover::before,
body.details-resizing .details-resizer::before {
  background: var(--blue);
}

body.details-resizing {
  cursor: col-resize;
  user-select: none;
}

.app-details-pane.maximized {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  min-width: 0;
  max-width: none;
  height: 100vh;
  z-index: 3000;
  border-left: none;
}

.app-details-pane.maximized .details-content {
  padding: 16px;
  gap: 0;
}

.app-details-pane.maximized .details-section-card:not(.details-chart-card) {
  display: none;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.details-title-wrap {
  display: flex;
  align-items: baseline;
}

.details-symbol {
  font-family: var(--kami-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
}

.details-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.details-icon-btn,
.details-icon-link {
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}

.details-icon-btn:hover,
.details-icon-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.details-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.details-section-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.details-chart-card {
  flex: 1;
  min-height: 0;
}

.details-section-card .section-title {
  font-family: var(--kami-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.detail-stat-box {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.detail-stat-label {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.details-structure-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--soft);
}

.details-structure-row .struct-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.details-structure-row .struct-item strong {
  color: var(--text);
}

.tv-chart-container {
  width: 100%;
  height: clamp(560px, 72vh, 860px) !important;
  min-height: 560px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: #ffffff;
}

.app-details-pane.maximized .tv-chart-container {
  height: calc(100vh - 104px) !important;
  min-height: calc(100vh - 104px);
}

body.details-open #app-workspace {
  min-width: 480px;
}

body.details-open .workspace-header {
  padding: 8px 14px;
}

body.details-open .header-right {
  display: none;
}

body.details-open .main-wrapper {
  padding: 16px;
}

body.details-open .panel-card {
  padding: 16px;
  border-radius: 18px;
}

body.details-open .signal-panel-head {
  align-items: center;
}

body.details-open .tab-strip {
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

body.details-open .main-tab {
  padding: 8px 12px;
  font-size: 12px;
}

body.details-open .signal-head-actions {
  gap: 8px;
}

body.details-open .update-text {
  display: none;
}

body.details-open .filter-bar {
  gap: 8px;
}

body.details-open .filter-bar select {
  min-width: 0;
  max-width: 128px;
}

body.details-open .signal-table-wrap {
  overflow-x: hidden;
}

body.details-open .signal-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

body.details-open .signal-table th,
body.details-open .signal-table td {
  padding: 12px 8px;
}

body.details-open .signal-table th:nth-child(1),
body.details-open .signal-table td:nth-child(1),
body.details-open .signal-table th:nth-child(2),
body.details-open .signal-table td:nth-child(2),
body.details-open .signal-table th:nth-child(8),
body.details-open .signal-table td:nth-child(8),
body.details-open .signal-table th:nth-child(9),
body.details-open .signal-table td:nth-child(9),
body.details-open .signal-table th:nth-child(10),
body.details-open .signal-table td:nth-child(10),
body.details-open .signal-table th:nth-child(11),
body.details-open .signal-table td:nth-child(11),
body.details-open .signal-table th:nth-child(12),
body.details-open .signal-table td:nth-child(12) {
  display: none;
}

body.details-open .signal-table th:nth-child(3),
body.details-open .signal-table td:nth-child(3) {
  width: 24%;
}

body.details-open .signal-table th:nth-child(4),
body.details-open .signal-table td:nth-child(4),
body.details-open .signal-table th:nth-child(13),
body.details-open .signal-table td:nth-child(13) {
  width: 18%;
}

body.details-open .signal-table th:nth-child(5),
body.details-open .signal-table td:nth-child(5) {
  width: 22%;
}

body.details-open .signal-table th:nth-child(6),
body.details-open .signal-table td:nth-child(6),
body.details-open .signal-table th:nth-child(7),
body.details-open .signal-table td:nth-child(7) {
  width: 18%;
}

.update-time-wrap {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}

.details-history-table-wrap {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--muted);
  font-size: 11px;
}

/* Private Memo Overlay Drawer */
.details-memo-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--panel-border);
  border-radius: 18px 18px 0 0;
  padding: 16px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.04);
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.details-memo-drawer.active {
  transform: translateY(0);
}

.memo-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.memo-drawer-head strong {
  font-size: 13px;
  color: var(--text);
}

.memo-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.details-memo-drawer textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.01);
  outline: none;
  resize: none;
  transition: all 0.2s;
  color: var(--text);
}

.details-memo-drawer textarea:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.1);
}

.memo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.memo-btn-ghost,
.memo-btn-primary {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.memo-btn-ghost {
  background: transparent;
  color: var(--soft);
  border: 1px solid var(--panel-border);
}

.memo-btn-ghost:hover {
  background: rgba(0, 0, 0, 0.03);
}

.memo-btn-primary {
  background: var(--blue);
  color: #ffffff;
}

.memo-btn-primary:hover {
  background: #0062c4;
}

/* Custom styles for tables in details */
.details-history-table-wrap th {
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--panel-border);
  padding: 6px 8px;
  font-size: 10px;
}

.details-history-table-wrap td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.02);
}

.signal-table-wrap {
  width: 100%;
  overflow-x: auto;
}

/* Ensure global layout scrolling works */
body {
  overflow: hidden;
}
