:root {
  --fh-accent: #b45309;
  --fh-accent-soft: #fef3c7;
  --fh-border: rgba(15, 23, 42, 0.12);
  --fh-green: #16a34a;
  --fh-green-bg: #f0fdf4;
  --fh-amber: #d97706;
  --fh-amber-bg: #fffbeb;
  --fh-gray: #64748b;
}

.page-head-sub {
  color: #64748b;
}

/* ─── 搜索区 ─── */
.fh-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

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

.fh-search-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--fh-border);
  border-radius: 12px;
  font-size: 1.1rem;
  transition: border-color 0.2s;
}

.fh-search-input:focus {
  outline: none;
  border-color: var(--fh-accent);
}

.fh-search-btn {
  padding: 0 20px;
  border: 1px solid var(--fh-accent);
  background: var(--fh-accent-soft);
  color: #92400e;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--fh-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 240px;
  overflow: auto;
}

.search-dropdown__empty {
  padding: 12px 16px;
  color: #94a3b8;
  text-align: center;
}

.search-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.search-dropdown__item:hover {
  background: var(--fh-accent-soft);
}

/* ─── 摘要条 ─── */
.fh-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--fh-accent-soft);
  border-radius: 12px;
  border: 1px solid #fcd34d;
  font-size: 0.95rem;
}

.fh-summary-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #92400e;
  margin-right: auto;
}

.fh-summary-item {
  color: #78350f;
}

.fh-summary-item strong {
  font-size: 1.1rem;
  margin-left: 4px;
}

/* ─── 股息率颜色 ─── */
.fh-yield--high {
  color: var(--fh-green);
  font-weight: 700;
}

.fh-yield--mid {
  color: var(--fh-amber);
  font-weight: 700;
}

.fh-yield--low {
  color: var(--fh-gray);
}

/* ─── 网格布局 ─── */
.fh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .fh-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: #f8fafc;
  border: 1px solid var(--fh-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #334155;
}

/* ─── 试算区 ─── */
.fh-calc-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 12px;
}

.fh-calc-row label {
  font-size: 0.88rem;
  color: #64748b;
}

.fh-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fh-input-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--fh-border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.fh-input-group--sm {
  max-width: 100px;
}

.fh-input-suffix {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
}

.fh-slider-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fh-slider-group input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
}

.fh-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fh-accent);
  cursor: pointer;
}

.fh-calc-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--fh-border);
}

.fh-calc-result-label {
  font-size: 0.88rem;
  color: #64748b;
}

.fh-calc-result-value {
  font-size: 1.6rem;
  font-weight: 800;
  margin-left: auto;
}

/* ─── 对照表 ─── */
.fh-yield-table-wrap {
  margin-top: 14px;
}

.fh-yield-table-wrap h3 {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 8px;
  font-weight: 600;
}

.fh-yield-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.fh-yield-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--fh-border);
}

.fh-yield-table td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ─── 历史买入回报 ─── */
.fh-holding-results {
  margin-top: 14px;
}

.fh-holding-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fh-border);
}

.fh-holding-label {
  font-size: 0.88rem;
  color: #64748b;
  min-width: 110px;
}

.fh-holding-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-left: auto;
}

.fh-holding-unit {
  font-size: 0.82rem;
  color: #94a3b8;
}

.fh-progress {
  margin-top: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.fh-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #16a34a);
  width: 0;
  transition: width 0.3s ease;
}

.fh-progress-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #64748b;
  text-align: right;
}

/* ─── 历史分红 ─── */
.fh-year-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  margin-top: 14px;
  padding-top: 8px;
}

.fh-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.fh-bar-fill {
  width: 100%;
  max-width: 28px;
  background: #f59e0b;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.fh-bar-label {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 4px;
}

.fh-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 14px;
}

.fh-history-table th,
.fh-history-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--fh-border);
  text-align: left;
}

.fh-history-table td.num {
  font-variant-numeric: tabular-nums;
}

.fh-link-btn {
  background: none;
  border: none;
  color: var(--fh-accent);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}

.fh-link-btn:hover {
  color: #92400e;
}

/* ─── 逐笔明细 ─── */
.fh-events-wrap {
  margin-top: 14px;
}

.fh-events-toggle {
  background: none;
  border: 1px solid var(--fh-border);
  border-radius: 8px;
  padding: 6px 14px;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
}

.fh-events-toggle:hover {
  border-color: var(--fh-accent);
  color: var(--fh-accent);
}

.fh-events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 10px;
}

.fh-events-table th,
.fh-events-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--fh-border);
  text-align: left;
}

.fh-events-table td.num {
  font-variant-numeric: tabular-nums;
}

/* ─── 通用 ─── */
.muted-inline {
  color: #64748b;
  font-size: 0.85rem;
}

.fh-disclaimer {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.82rem;
}

select {
  padding: 8px 10px;
  border: 1px solid var(--fh-border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  cursor: pointer;
}
