.btc-dashboard .bd-card-profit-loss {
  position: relative;
}

.btc-dashboard .bd-card-profit-loss .bd-card-signal {
  background: rgba(224, 138, 58, 0.18);
  color: var(--bd-accent);
}

.btc-dashboard .bd-card-realized-price .bd-card-signal[data-signal="buy-strong"] {
  background: rgba(0, 200, 83, 0.16);
  color: var(--bd-green);
}

.btc-dashboard .bd-card-realized-price .bd-card-signal[data-signal="buy"] {
  background: rgba(105, 240, 174, 0.14);
  color: #69f0ae;
}

.btc-dashboard .bd-card-realized-price .bd-card-signal[data-signal="neutral"] {
  background: rgba(255, 214, 0, 0.14);
  color: #ffd600;
}

.btc-dashboard .bd-card-realized-price .bd-card-signal[data-signal="sell"] {
  background: rgba(255, 109, 0, 0.14);
  color: #ff6d00;
}

.btc-dashboard .bd-card-realized-price .bd-card-signal[data-signal="sell-strong"] {
  background: rgba(255, 23, 68, 0.14);
  color: #ff1744;
}

.btc-dashboard .bd-profit-loss-current {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.btc-dashboard .bd-profit-loss-box {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--bd-border);
  border-radius: 10px;
  padding: 14px;
}

.btc-dashboard .bd-profit-loss-label {
  color: var(--bd-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.btc-dashboard .bd-profit-loss-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.btc-dashboard .bd-profit {
  color: var(--bd-green);
}

.btc-dashboard .bd-loss {
  color: var(--bd-red);
}

.btc-dashboard .bd-realized {
  color: #58a6ff;
}

.btc-dashboard .bd-profit-loss-bar {
  display: grid;
  grid-template-columns: minmax(0, 50.43fr) minmax(0, 49.56fr);
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  margin: 0 0 14px;
  background: var(--bd-bg);
}

.btc-dashboard .bd-profit-loss-bar span:first-child {
  background: linear-gradient(90deg, rgba(63, 185, 80, 0.5), rgba(63, 185, 80, 0.92));
}

.btc-dashboard .bd-profit-loss-bar span:last-child {
  background: linear-gradient(90deg, rgba(248, 81, 73, 0.9), rgba(248, 81, 73, 0.5));
}

.btc-dashboard .bd-profit-loss-note,
.btc-dashboard .bd-rsi-secondary-note {
  color: var(--bd-text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 14px;
}

.btc-dashboard .bd-profit-loss-toolbar {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin: 10px 0;
}

.btc-dashboard .bd-profit-loss-toolbar button {
  background: none;
  border: 1px solid var(--bd-border);
  border-radius: 4px;
  color: var(--bd-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.btc-dashboard .bd-profit-loss-toolbar button.active {
  background: rgba(224, 138, 58, 0.16);
  border-color: rgba(224, 138, 58, 0.45);
  color: var(--bd-accent);
}

.btc-dashboard .bd-profit-loss-chart {
  width: 100%;
  border: 1px solid var(--bd-border);
  border-radius: 10px;
  background: var(--bd-bg);
  min-height: 420px;
  overflow: hidden;
}

.btc-dashboard .bd-profit-loss-loading,
.btc-dashboard .bd-profit-loss-error {
  align-items: center;
  color: var(--bd-text-muted);
  display: flex;
  min-height: 420px;
  justify-content: center;
}

.btc-dashboard .bd-profit-loss-chart-shell {
  position: relative;
  width: 100%;
}

.btc-dashboard .bd-profit-loss-svg {
  display: block;
  height: auto;
  width: 100%;
}

.btc-dashboard .bd-pl-grid,
.btc-dashboard .bd-pl-grid-x {
  stroke: rgba(139, 148, 158, 0.18);
  stroke-width: 1;
}

.btc-dashboard .bd-pl-grid-x {
  stroke-dasharray: 2 8;
}

.btc-dashboard .bd-pl-midline {
  stroke: rgba(224, 138, 58, 0.55);
  stroke-dasharray: 5 6;
}

.btc-dashboard .bd-pl-axis {
  fill: var(--bd-text-muted);
  font-size: 12px;
}

.btc-dashboard .bd-pl-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.btc-dashboard .bd-pl-profit {
  stroke: var(--bd-green);
}

.btc-dashboard .bd-pl-loss {
  stroke: var(--bd-red);
}

.btc-dashboard .bd-realized-market-line {
  stroke: var(--bd-accent);
}

.btc-dashboard .bd-realized-line {
  stroke: #58a6ff;
  stroke-dasharray: 7 5;
}

.btc-dashboard .bd-realized-dot {
  fill: #58a6ff;
  stroke: var(--bd-bg);
  stroke-width: 2;
}

.btc-dashboard .bd-pl-hover-line {
  stroke: rgba(230, 237, 243, 0.42);
  stroke-width: 1;
}

.btc-dashboard .bd-pl-profit-dot {
  fill: var(--bd-green);
  stroke: var(--bd-bg);
  stroke-width: 2;
}

.btc-dashboard .bd-pl-loss-dot {
  fill: var(--bd-red);
  stroke: var(--bd-bg);
  stroke-width: 2;
}

.btc-dashboard .bd-pl-tooltip {
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: var(--bd-text);
  min-width: 210px;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

.btc-dashboard .bd-pl-tooltip strong,
.btc-dashboard .bd-pl-tooltip span {
  display: block;
}

.btc-dashboard .bd-pl-tooltip small {
  color: var(--bd-text-muted);
  display: block;
  margin-top: 2px;
}

.btc-dashboard .bd-profit-loss-source {
  color: var(--bd-text-muted);
  font-size: 0.78rem;
  margin: 8px 0 0;
}

.btc-dashboard .bd-profit-loss-source a {
  color: var(--bd-accent);
}

.btc-dashboard .bd-rsi-secondary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--bd-border);
}

.btc-dashboard .bd-rsi-secondary h4 {
  color: var(--bd-accent);
  font-size: 0.95rem;
  margin: 0 0 8px;
}

@media (max-width: 700px) {
  .btc-dashboard .bd-profit-loss-current {
    grid-template-columns: 1fr;
  }

  .btc-dashboard .bd-profit-loss-toolbar {
    justify-content: flex-start;
  }

  .btc-dashboard .bd-profit-loss-chart,
  .btc-dashboard .bd-profit-loss-loading,
  .btc-dashboard .bd-profit-loss-error {
    min-height: 300px;
  }
}
