/* plugins/投資儀表板/frontend/invest.css */
.invest-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--background);
}
.invest-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.invest-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.invest-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.invest-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted-foreground);
  font-size: 14px;
}
.invest-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.invest-summary-row {
  display: flex;
  gap: 24px;
}
.invest-summary-row + .invest-summary-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.invest-summary-item {
  flex: 1;
  min-width: 0;
}
.invest-summary-label {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 2px;
}
.invest-summary-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
}
.invest-update-time {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted-foreground);
}
.invest-holdings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invest-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.invest-holding-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.invest-holding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.invest-holding-symbol {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.invest-symbol-code {
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground);
}
.invest-symbol-name {
  font-size: 13px;
  color: var(--muted-foreground);
}
.invest-delete-icon {
  font-size: 12px;
  color: var(--muted-foreground);
}
.invest-holding-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invest-detail-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.invest-detail-label {
  color: var(--muted-foreground);
  min-width: 32px;
}
.invest-detail-value {
  color: var(--foreground);
  margin-right: 16px;
}
.invest-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--muted-foreground);
  gap: 12px;
}
.invest-empty-state p {
  font-size: 14px;
  margin: 0;
}
.invest-add-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.invest-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invest-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.invest-tabs-list {
  margin-bottom: 12px;
}
.invest-tab-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.invest-summary-compact {
  padding: 12px 14px;
}
.invest-summary-compact .invest-summary-value {
  font-size: 16px;
}
.invest-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invest-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.invest-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.invest-card-symbol {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.invest-card-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.invest-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground);
}
.invest-card-pnl {
  font-size: 14px;
  font-weight: 600;
}
.invest-card-expand {
  font-size: 10px;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}
.invest-card-expand.invest-expanded {
  transform: rotate(180deg);
}
.invest-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px 10px;
  font-size: 12px;
  color: var(--muted-foreground);
  flex-wrap: wrap;
}
.invest-card-detail {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.invest-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.invest-detail-grid > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.invest-card-actions {
  display: flex;
  gap: 8px;
}
.invest-card-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--muted);
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.invest-badge-fund {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.invest-badge-deposit {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}
.invest-xirr-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}
.invest-cashflow-section {
  margin-top: 4px;
}
.invest-cashflow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.invest-cashflow-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.invest-cashflow-empty {
  font-size: 12px;
  color: var(--muted-foreground);
  padding: 8px 0;
}
.invest-cashflow-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.invest-cashflow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
}
.invest-cf-date {
  color: var(--muted-foreground);
  min-width: 80px;
}
.invest-cf-type {
  color: var(--muted-foreground);
  min-width: 48px;
}
.invest-cf-amount {
  font-weight: 600;
  flex: 1;
  text-align: right;
}
.invest-net-worth {
  font-size: 24px;
}
.invest-badge-insurance {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.invest-badge-loan {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.invest-badge-other {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}
.invest-etf-list {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 4px;
  background: var(--background);
}
.invest-etf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.invest-etf-item:last-child {
  border-bottom: none;
}
.invest-etf-item:hover {
  background: var(--muted);
}
.invest-etf-code {
  font-weight: 700;
  color: var(--foreground);
  min-width: 72px;
}
.invest-etf-name {
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
