.fund-intent-view {
  overflow-y: auto;
  padding: 0 26px 28px;
  color: var(--ui-text, #16202a);
}

.fund-intent-panel {
  display: grid;
  gap: 16px;
  width: min(1220px, 100%);
  margin: 0 auto;
}

.fund-intent-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.fund-intent-header h1 {
  margin: 5px 0 7px;
  font-size: clamp(27px, 3vw, 36px);
  letter-spacing: -.035em;
}

.fund-intent-header p {
  max-width: 720px;
  margin: 0;
  color: var(--ui-muted, #687786);
  line-height: 1.65;
}

.fund-intent-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 9px 13px;
  border: 1px solid rgba(28, 117, 102, .2);
  border-radius: 999px;
  background: rgba(31, 134, 114, .08);
  color: #267565;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.fund-intent-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.fund-intent-code-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e9b7f;
  box-shadow: 0 0 0 4px rgba(46, 155, 127, .12);
}

.fund-intent-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(150px, .8fr) minmax(200px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--ui-border, #dfe6eb);
  border-radius: 18px;
  background: var(--ui-surface, #fff);
  box-shadow: 0 10px 30px rgba(25, 47, 65, .055);
}

.fund-intent-field {
  display: grid;
  gap: 7px;
}

.fund-intent-field > span {
  color: var(--ui-muted, #647483);
  font-size: 12px;
  font-weight: 700;
}

.fund-intent-field select,
.fund-intent-field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--ui-border-strong, #ced9e0);
  border-radius: 11px;
  outline: none;
  background: var(--ui-surface, #fff);
  color: var(--ui-text, #18232d);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.fund-intent-field select { padding: 0 34px 0 12px; }
.fund-intent-field input { padding: 0 12px; }

.fund-intent-field select:focus,
.fund-intent-field input:focus {
  border-color: rgba(27, 105, 131, .58);
  box-shadow: 0 0 0 3px rgba(27, 105, 131, .1);
}

.fund-intent-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  color: var(--ui-muted, #627280);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.fund-intent-active-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fund-intent-active-toggle > span {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #ccd5dc;
  transition: background .18s ease;
}

.fund-intent-active-toggle > span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(21, 41, 57, .25);
  transition: transform .18s ease;
}

.fund-intent-active-toggle input:checked + span { background: #287c70; }
.fund-intent-active-toggle input:checked + span::after { transform: translateX(14px); }

.fund-intent-query-btn {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #173f53, #1f6c78);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(24, 88, 103, .2);
}

.fund-intent-query-btn:hover { filter: brightness(1.06); }
.fund-intent-query-btn:disabled { cursor: wait; opacity: .65; }

.fund-intent-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 34px;
}

.fund-intent-direction-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--ui-border, #dfe6eb);
  border-radius: 10px;
  background: #f3f6f8;
}

.fund-intent-direction-switch button {
  min-height: 29px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ui-muted, #687785);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fund-intent-direction-switch button.active {
  background: #fff;
  color: #183e51;
  box-shadow: 0 2px 8px rgba(26, 54, 72, .1);
}

.fund-intent-status {
  color: var(--ui-muted, #6d7c89);
  font-size: 12px;
  text-align: right;
}

.fund-intent-status.success { color: #267866; }
.fund-intent-status.warning { color: #9d6a21; }
.fund-intent-status.error { color: #aa443e; }

.fund-intent-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.fund-intent-stats article {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid var(--ui-border, #dfe6eb);
  border-radius: 16px;
  background: var(--ui-surface, #fff);
}

.fund-intent-stats article::after {
  content: '';
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(35, 102, 126, .055);
}

.fund-intent-stats article.bullish::after { background: rgba(184, 67, 55, .07); }
.fund-intent-stats article.bearish::after { background: rgba(35, 128, 98, .075); }
.fund-intent-stats span { color: var(--ui-muted, #6a7986); font-size: 12px; font-weight: 650; }
.fund-intent-stats strong { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.fund-intent-stats .bullish strong { color: #b1463e; }
.fund-intent-stats .bearish strong { color: #277b61; }
.fund-intent-stats small { color: #89959f; font-size: 11px; }

.fund-intent-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 260px;
  padding: 54px 20px;
  border: 1px dashed #ccd9e0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249, 251, 252, .75), rgba(244, 248, 249, .55));
  text-align: center;
}

.fund-intent-empty strong { margin-top: 8px; font-size: 15px; }
.fund-intent-empty p { max-width: 520px; margin: 0; color: var(--ui-muted, #75838f); font-size: 12px; line-height: 1.7; }
.fund-intent-empty-mark { display: flex; align-items: end; gap: 5px; height: 36px; }
.fund-intent-empty-mark span { width: 7px; border-radius: 5px; background: #88a9b4; }
.fund-intent-empty-mark span:nth-child(1) { height: 18px; }
.fund-intent-empty-mark span:nth-child(2) { height: 32px; background: #3f7f8e; }
.fund-intent-empty-mark span:nth-child(3) { height: 24px; background: #66a093; }

.fund-intent-result {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr);
  gap: 14px;
  align-items: start;
}

.fund-intent-table-card,
.fund-intent-detail {
  border: 1px solid var(--ui-border, #dfe6eb);
  border-radius: 18px;
  background: var(--ui-surface, #fff);
  box-shadow: 0 10px 30px rgba(25, 47, 65, .045);
}

.fund-intent-table-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 17px;
  border-bottom: 1px solid var(--ui-border, #e2e8ec);
}

.fund-intent-table-card > header div { display: flex; align-items: baseline; gap: 10px; }
.fund-intent-table-card > header span { font-size: 14px; font-weight: 750; }
.fund-intent-table-card > header strong,
.fund-intent-table-card > header small { color: var(--ui-muted, #75838f); font-size: 11px; font-weight: 600; }
.fund-intent-table-scroll { max-height: 610px; overflow: auto; }

.fund-intent-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.fund-intent-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 13px;
  border-bottom: 1px solid var(--ui-border, #e2e8ec);
  background: #f7f9fa;
  color: #71808d;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.fund-intent-table th:first-child,
.fund-intent-table th:nth-child(2) { text-align: left; }
.fund-intent-table td { padding: 12px 13px; border-bottom: 1px solid #edf1f3; text-align: right; white-space: nowrap; }
.fund-intent-table td:first-child,
.fund-intent-table td:nth-child(2) { text-align: left; }
.fund-intent-table tbody tr { cursor: pointer; transition: background .14s ease; }
.fund-intent-table tbody tr:hover { background: #f7fafb; }
.fund-intent-table tbody tr.selected { background: rgba(32, 108, 126, .075); box-shadow: inset 3px 0 #287789; }
.fund-intent-table td:first-child strong,
.fund-intent-table td:first-child span { display: block; }
.fund-intent-table td:first-child strong { color: #20303b; font-size: 12px; }
.fund-intent-table td:first-child span { margin-top: 3px; color: #89959f; font-size: 10px; }
.fund-intent-action span { display: block; line-height: 1.55; }
.fund-intent-table .positive,
.fund-intent-detail .positive { color: #b3433a; }
.fund-intent-table .negative,
.fund-intent-detail .negative { color: #23775d; }
.fund-intent-no-result { height: 180px; color: #7d8a95; text-align: center !important; }

.fund-intent-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.fund-intent-badge.intent-long { background: rgba(184, 67, 55, .1); color: #aa4139; }
.fund-intent-badge.intent-short { background: rgba(35, 128, 98, .11); color: #247158; }
.fund-intent-badge.intent-neutral { background: #edf1f3; color: #687783; }

.fund-intent-detail {
  position: sticky;
  top: 0;
  min-height: 390px;
  padding: 19px;
}

.fund-intent-detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fund-intent-detail-top > div > span { color: #788691; font-size: 11px; }
.fund-intent-detail-top h2 { margin: 4px 0 0; font-size: 21px; }
.fund-intent-reason { min-height: 58px; margin: 16px 0; color: #5e6e7a; font-size: 12px; line-height: 1.72; }
.fund-intent-confidence-line { display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: center; font-size: 11px; color: #73818c; }
.fund-intent-confidence-line strong { color: #294b5b; font-size: 12px; }
.fund-intent-confidence-line i { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 999px; background: #e7ecef; }
.fund-intent-confidence-line b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #477c8a, #2f947e); }

.fund-intent-position-grid,
.fund-intent-pnl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.fund-intent-position-grid div,
.fund-intent-pnl-grid div { padding: 10px 11px; border-radius: 10px; background: #f6f8f9; }
.fund-intent-position-grid dt,
.fund-intent-pnl-grid span { color: #7c8993; font-size: 10px; }
.fund-intent-position-grid dd { margin: 4px 0 0; color: #263945; font-size: 13px; font-weight: 750; }
.fund-intent-pnl-title { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.fund-intent-pnl-title span { font-size: 12px; font-weight: 750; }
.fund-intent-pnl-title small { color: #8b97a0; font-size: 10px; }
.fund-intent-pnl-grid { margin-top: 8px; }
.fund-intent-pnl-grid strong { display: block; margin-top: 4px; color: #314652; font-size: 12px; }
.fund-intent-detail > footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid #e8edef; color: #8a96a0; font-size: 9px; }
.fund-intent-detail-empty { display: grid; min-height: 330px; place-items: center; color: #82909a; font-size: 12px; text-align: center; }

.fund-intent-disclaimer {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-left: 3px solid #d5a457;
  border-radius: 3px 10px 10px 3px;
  background: rgba(210, 164, 87, .08);
  color: #75654b;
  font-size: 11px;
  line-height: 1.6;
}

.fund-intent-disclaimer strong { white-space: nowrap; }

@media (max-width: 1020px) {
  .fund-intent-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fund-intent-query-btn { min-width: 160px; }
  .fund-intent-result { grid-template-columns: 1fr; }
  .fund-intent-detail { position: static; }
}

@media (max-width: 720px) {
  .fund-intent-view { padding: 0 12px 20px; }
  .fund-intent-header { display: grid; gap: 12px; }
  .fund-intent-code-badge { justify-self: start; }
  .fund-intent-header-actions { justify-self: start; }
  .fund-intent-controls { grid-template-columns: 1fr; padding: 13px; }
  .fund-intent-query-btn { width: 100%; }
  .fund-intent-toolbar { align-items: stretch; flex-direction: column; }
  .fund-intent-direction-switch { display: grid; grid-template-columns: repeat(4, 1fr); }
  .fund-intent-direction-switch button { padding: 0 7px; }
  .fund-intent-status { min-height: 18px; text-align: left; }
  .fund-intent-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fund-intent-stats article { min-height: 98px; padding: 14px; }
  .fund-intent-stats strong { font-size: 23px; }
  .fund-intent-table-scroll { max-height: none; overflow: visible; }
  .fund-intent-table thead { display: none; }
  .fund-intent-table,
  .fund-intent-table tbody,
  .fund-intent-table tr,
  .fund-intent-table td { display: block; width: 100%; }
  .fund-intent-table tbody { padding: 7px; }
  .fund-intent-table tbody tr { margin: 8px 0; padding: 8px 10px; border: 1px solid #e2e8ec; border-radius: 12px; }
  .fund-intent-table tbody tr.selected { box-shadow: inset 3px 0 #287789; }
  .fund-intent-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 3px; border: 0; text-align: right !important; white-space: normal; }
  .fund-intent-table td::before { content: attr(data-label); color: #83909a; font-size: 10px; }
  .fund-intent-table td:first-child { align-items: flex-start; }
  .fund-intent-action span { display: inline; margin-left: 8px; }
  .fund-intent-detail { padding: 16px; }
  .fund-intent-disclaimer { display: grid; }
}
