.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.results-head h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.results-head h2::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.show-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.result-item {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--item-accent, rgba(255, 255, 255, 0.1));
}

.result-item--gold { --item-accent: var(--gold); }
.result-item--green { --item-accent: var(--green); }
.result-item--red { --item-accent: var(--red); }
.result-item--blue { --item-accent: var(--blue); }

.result-item .label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.result-item .value {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.result-item .sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
  opacity: 0.85;
}

.value.green { color: var(--green); text-shadow: 0 0 20px rgba(52, 232, 154, 0.35); }
.value.red { color: var(--red); text-shadow: 0 0 20px rgba(255, 107, 122, 0.3); }
.value.gold { color: var(--gold); text-shadow: 0 0 20px rgba(240, 193, 75, 0.22); }
.value.blue { color: var(--blue); text-shadow: 0 0 20px rgba(94, 179, 255, 0.3); }

.direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
}

.direction-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.direction-badge.buy {
  background: rgba(52, 232, 154, 0.12);
  color: var(--green);
  border: 1px solid rgba(52, 232, 154, 0.35);
  box-shadow: 0 0 24px rgba(52, 232, 154, 0.18);
}

.direction-badge.sell {
  background: rgba(255, 107, 122, 0.12);
  color: var(--red);
  border: 1px solid rgba(255, 107, 122, 0.35);
  box-shadow: 0 0 24px rgba(255, 107, 122, 0.15);
}

.plan-summary,
.summary {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  border: 1px solid var(--border);
}

.plan-summary strong,
.summary strong { color: var(--text); }

.show-plan-panel {
  background: linear-gradient(160deg, rgba(22, 32, 48, 0.95), rgba(14, 22, 34, 0.92));
  border: 1px solid rgba(52, 232, 154, 0.12);
  border-radius: var(--radius, 14px);
  padding: 1.15rem 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex: 1;
  min-width: 0;
}

.show-plan-panel .results-head {
  margin-bottom: 0.7rem;
}

.show-plan-panel .results-head h2 {
  font-size: 0.88rem;
}

.show-plan-panel .results-head h2::before {
  width: 8px;
  height: 8px;
}

.show-plan-panel .show-meta {
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.show-plan-panel .direction-badge {
  font-size: 0.85rem;
  padding: 0.32rem 0.85rem;
}

.show-plan-panel .direction-badge::before {
  width: 8px;
  height: 8px;
}

.show-plan-panel .result-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.show-plan-panel .result-item {
  min-height: 5.25rem;
  padding: 0.85rem 0.6rem;
  border-radius: 12px;
}

.show-plan-panel .result-item .label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.show-plan-panel .result-item .value {
  font-size: 1.4rem;
  margin-top: 0.2rem;
}

.show-plan-panel .result-item .sub {
  display: none;
}

.show-plan-panel .trade-note {
  padding: 0.65rem 0.75rem;
}

.show-plan-panel .trade-note .note-label {
  font-size: 0.68rem;
}

.show-plan-panel .trade-note p {
  font-size: 0.9rem;
}

.show-modal-layout {
  display: flex;
  gap: 0.85rem;
  align-items: stretch;
  width: 100%;
}

.show-followup-panel {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(22, 32, 48, 0.95), rgba(14, 22, 34, 0.92));
  border: 1px solid rgba(94, 179, 255, 0.15);
  border-radius: var(--radius, 14px);
  padding: 2.5rem 0.9rem 0.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.show-followup-panel > label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.outcome-picker {
  margin-bottom: 0.55rem;
  flex-shrink: 0;
}

.outcome-picker .outcome-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.outcome-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.32rem;
}

.outcome-chip {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.38rem 0.35rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.outcome-chip:hover {
  filter: brightness(1.06);
}

.outcome-chip.is-active {
  transform: scale(1.02);
}

.outcome-chip--processing {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.16);
  color: #d8c4ff;
}

.outcome-chip--processing.is-active {
  border-color: rgba(167, 139, 250, 0.85);
  background: rgba(167, 139, 250, 0.32);
  color: #f5f3ff;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.4);
}

.outcome-chip--passed {
  border-color: rgba(52, 232, 154, 0.4);
  background: rgba(52, 232, 154, 0.14);
  color: #7dffc4;
}

.outcome-chip--passed.is-active {
  border-color: rgba(52, 232, 154, 0.8);
  background: rgba(52, 232, 154, 0.3);
  color: var(--green);
  box-shadow: 0 0 0 1px rgba(52, 232, 154, 0.4);
}

.outcome-chip--failed {
  border-color: rgba(255, 107, 122, 0.4);
  background: rgba(255, 107, 122, 0.14);
  color: #ffb3bc;
}

.outcome-chip--failed.is-active {
  border-color: rgba(255, 107, 122, 0.8);
  background: rgba(255, 107, 122, 0.3);
  color: var(--red);
  box-shadow: 0 0 0 1px rgba(255, 107, 122, 0.4);
}

.outcome-chip--manual {
  border-color: rgba(94, 179, 255, 0.4);
  background: rgba(94, 179, 255, 0.14);
  color: #9ed0ff;
}

.outcome-chip--manual.is-active {
  border-color: rgba(94, 179, 255, 0.8);
  background: rgba(94, 179, 255, 0.3);
  color: var(--blue);
  box-shadow: 0 0 0 1px rgba(94, 179, 255, 0.4);
}

.outcome-chip--canceled {
  grid-column: 1 / -1;
  border-color: rgba(240, 193, 75, 0.4);
  background: rgba(240, 193, 75, 0.14);
  color: #ffe08a;
}

.outcome-chip--canceled.is-active {
  border-color: rgba(240, 193, 75, 0.8);
  background: rgba(240, 193, 75, 0.3);
  color: var(--gold);
  box-shadow: 0 0 0 1px rgba(240, 193, 75, 0.4);
}

.show-followup-panel textarea {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: rgba(10, 16, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.show-followup-panel textarea:focus {
  border-color: rgba(94, 179, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(94, 179, 255, 0.12);
}

.show-followup-panel .btn-save-followup {
  margin-top: 0.65rem;
  align-self: flex-end;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

@media (max-width: 767px) {
  .show-modal-layout {
    flex-direction: column;
  }

  .show-followup-panel {
    width: 100%;
    padding-top: 0.75rem;
    min-height: 8rem;
  }
}

.trade-notes-block {
  margin-top: 0.55rem;
}

.trade-note {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.5rem 0.6rem;
  min-height: 2.75rem;
}

.trade-note .note-label {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.trade-note p {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}


/* Trade plan chart (TradingView-style) */
.trade-chart {
  margin-bottom: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  overflow: hidden;
  flex-shrink: 0;
  min-height: 0;
}

.trade-chart:not(.trade-chart--empty) {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .card--results .trade-chart {
    min-height: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .card--results .trade-chart--empty {
    flex: 0 0 5.5rem;
  }

  .card--results .trade-chart__plot {
    flex: 1;
    height: auto;
    min-height: 5.5rem;
  }

  .card--results .trade-chart__head {
    padding: 0.3rem 0.5rem;
    flex-shrink: 0;
  }

  .card--results .trade-chart__footer {
    padding: 0.3rem 0.45rem 0.4rem;
    flex-shrink: 0;
  }

  .card--results .trade-chart__band-label,
  .card--results .trade-chart__entry-line {
    font-size: 0.58rem;
  }

  .card--results .trade-chart__entry-box {
    min-width: 0;
    max-width: calc(100% - 3rem);
    padding: 0.25rem 0.45rem;
  }

  .card--results .trade-chart__stat-value {
    font-size: 0.78rem;
  }

  .results-aside .result-grid--calc {
    flex: 1;
    min-height: 0;
  }

  .result-grid--calc {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  }

  .result-grid--calc .result-item {
    min-height: 3.75rem;
    padding: 0.6rem 0.45rem;
    border-radius: 10px;
  }

  .result-grid--calc .result-item .label {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
  }

  .result-grid--calc .result-item .value {
    font-size: 1.1rem;
    margin-top: 0.15rem;
  }

  .result-grid--calc .result-item .sub {
    font-size: 0.6rem;
    display: block;
    margin-top: 0.1rem;
  }
}

@media (min-width: 1200px) {
  .result-grid--calc {
    grid-template-columns: repeat(3, 1fr);
  }

  .result-grid--calc .result-item {
    min-height: 4rem;
  }

  .result-grid--calc .result-item .value {
    font-size: 1.15rem;
  }
}

.trade-chart--empty {
  min-height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trade-chart__empty {
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.trade-chart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.trade-chart__title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

.trade-chart__dir {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.trade-chart__dir--long {
  color: var(--green);
  background: rgba(52, 232, 154, 0.12);
  border: 1px solid rgba(52, 232, 154, 0.3);
}

.trade-chart__dir--short {
  color: var(--red);
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.3);
}

.trade-chart__plot {
  position: relative;
  height: 13.5rem;
  min-height: 8rem;
}

.trade-chart__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trade-chart__grid {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.trade-chart__zone--profit {
  fill: rgba(52, 232, 154, 0.16);
}

.trade-chart__zone--risk {
  fill: rgba(125, 141, 168, 0.22);
}

.trade-chart__line {
  stroke-width: 1.5;
}

.trade-chart__line--tp {
  stroke: rgba(52, 232, 154, 0.7);
}

.trade-chart__line--entry {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-dasharray: 3 3;
}

.trade-chart__line--sl {
  stroke: rgba(255, 107, 122, 0.55);
}

.trade-chart__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.trade-chart__band {
  position: absolute;
  left: 0;
  right: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.35rem;
  min-height: 1.75rem;
}

.trade-chart__band-label {
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.trade-chart__band-label--target {
  color: #fff;
  background: rgba(38, 166, 154, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.trade-chart__band-label--stop {
  color: #fff;
  background: rgba(108, 117, 130, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.trade-chart__entry-box {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: min(14rem, calc(100% - 4.5rem));
  max-width: calc(100% - 4.5rem);
  padding: 0.32rem 0.55rem;
  border-radius: 6px;
  background: rgba(38, 166, 154, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.trade-chart__plot--short .trade-chart__entry-box {
  background: rgba(200, 75, 88, 0.95);
}

.trade-chart__entry-line {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-chart__prices {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3.25rem;
  pointer-events: none;
}

.trade-chart__price {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  padding: 0.14rem 0.3rem;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

.trade-chart__price--tp {
  color: #042a18;
  background: var(--green);
}

.trade-chart__price--entry {
  color: #1a1200;
  background: var(--gold);
}

.trade-chart__price--sl {
  color: #fff;
  background: rgba(90, 98, 112, 0.95);
}

@media (min-width: 768px) and (max-height: 720px) {
  .trade-chart__plot { height: 11rem; }
  .trade-chart__band-label,
  .trade-chart__entry-line { font-size: 0.56rem; }
}

@media (max-width: 520px) {
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .result-item .value { font-size: 1rem; }

  .show-plan-panel .result-grid { grid-template-columns: repeat(2, 1fr); }
  .show-plan-panel .result-item .sub { display: block; font-size: 0.58rem; }

  .trade-chart__plot { height: 11.5rem; }
  .trade-chart__band { right: 3rem; }
  .trade-chart__band-label { font-size: 0.54rem; padding: 0.22rem 0.4rem; }
  .trade-chart__entry-box { min-width: 0; max-width: calc(100% - 3.5rem); }
  .trade-chart__entry-line { font-size: 0.54rem; white-space: normal; }
  .trade-chart__price { font-size: 0.52rem; }
}
