#tradeProfitForm > .field-row.two.with-top-gap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dde7ef;
}

#tradeProfitForm > .field-row.two.with-top-gap > .field {
  gap: 0;
  min-width: 0;
}

#tradeProfitForm > .field-row.two.with-top-gap > .field:first-child {
  flex: 1 1 auto;
}

#tradeProfitForm > .field-row.two.with-top-gap > .field:last-child {
  flex: 0 1 auto;
  justify-items: end;
}

#tradeProfitForm > .field-row.two.with-top-gap label {
  display: none;
}

#tradeProfitStatus {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

#tradeProfitStatus:not(:empty) {
  border: 1px solid #d9e3ec;
  background: #f1f6fb;
  color: #52677b;
}

#tradeProfitStatus.success {
  border-color: #bde5cf;
  background: var(--accent-soft);
  color: #0b6a43;
}

#tradeProfitStatus.error {
  border-color: #efc2be;
  background: var(--danger-soft);
  color: var(--danger);
}

#tradeProfitResult .metric {
  min-height: 92px;
}

#tradeProfitView .history-metric.featured.tone-positive .value {
  color: #0b6a43;
}

#tradeProfitView .history-metric.featured.tone-amber .value {
  color: #8a5d00;
}

#tradeProfitView .trade-profit-breakdown-grid {
  display: grid;
}

#tradeProfitView .record-group {
  border-radius: 14px;
  border-color: #d8e3ec;
  box-shadow: none;
}

#tradeProfitView .record-group-title {
  font-size: 17px;
}

#tradeProfitView .record-group-list {
  gap: 8px;
}

#tradeProfitView .trade-profit-breakdown-group {
  align-content: flex-start;
  min-width: 0;
}

#tradeProfitView .trade-profit-breakdown-group .record-group-note {
  display: none;
}

#tradeProfitView .trade-profit-breakdown-item main {
  gap: 4px;
}

#tradeProfitView .trade-profit-breakdown-item .tag {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

#tradeProfitView .trade-profit-breakdown-pnl {
  flex: 0 0 auto;
  text-align: right;
  overflow-wrap: anywhere;
}

#tradeProfitView .trade-profit-breakdown-pnl.positive {
  color: #0b6a43;
}

#tradeProfitView .trade-profit-breakdown-pnl.negative {
  color: var(--danger);
}

#tradeProfitView .trade-profit-detail-item {
  align-content: flex-start;
}

#tradeProfitView .trade-profit-detail-item main {
  width: 100%;
}

#tradeProfitView .trade-profit-detail-item .list-sub {
  align-items: flex-start;
}

#tradeProfitView .trade-profit-detail-item .tag {
  min-height: 24px;
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.35;
}

:root[data-theme="dark"] #tradeProfitView .history-metric.featured.tone-positive .value {
  color: var(--accent);
}

:root[data-theme="dark"] #tradeProfitView .history-metric.featured.tone-amber .value {
  color: var(--amber);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-breakdown-pnl.positive {
  color: var(--accent);
}

@media (max-width: 720px) {
  #tradeProfitView .section-head {
    flex-direction: column;
  }

  #tradeProfitView .record-group-meta {
    align-self: flex-start;
  }
}

#tradeProfitView.trade-profit-page {
  gap: 18px;
}

#tradeProfitView .trade-profit-stack {
  gap: 18px;
}

#tradeProfitView .trade-profit-compose-section,
#tradeProfitView .trade-profit-analysis-section,
#tradeProfitView .trade-profit-recent-section {
  border-radius: 18px;
  border-color: #d4e0ea;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 253, 255, 0.96) 100%);
  box-shadow: 0 14px 32px rgba(16, 32, 51, 0.055);
}

#tradeProfitView .trade-profit-compose-section {
  border-color: #ccddec;
  background:
    linear-gradient(135deg, rgba(248, 252, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 45%, rgba(246, 252, 249, 0.98) 100%);
}

#tradeProfitView .section-head {
  align-items: flex-start;
  padding: 20px 22px 0;
}

#tradeProfitView .section-head h2 {
  font-size: 20px;
  line-height: 1.15;
}

#tradeProfitView .section-head .note {
  max-width: 360px;
  padding: 7px 10px;
  border: 1px solid #dbe7f0;
  border-radius: 999px;
  background: #f6f9fc;
  color: #5a6e82;
  line-height: 1.35;
}

#tradeProfitView .section-body {
  padding: 18px 22px 22px;
}

#tradeProfitView .trade-profit-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #d5e6f1;
  border-radius: 14px;
  background:
    linear-gradient(90deg, #f7fbff 0%, #f5fcf8 100%);
  color: #4f6478;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

#tradeProfitView .trade-profit-help span {
  flex: 0 0 auto;
  margin: 0;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #c9dcec;
  border-radius: 999px;
  background: #ffffff;
  color: #25618f;
  font-size: 12px;
  font-weight: 800;
}

#tradeProfitForm {
  display: grid;
  gap: 10px;
}

#tradeProfitRows.list {
  gap: 0;
  overflow: hidden;
  border: 1px solid #e1eaf2;
  border-radius: 14px;
  background: #ffffff;
}

#tradeProfitView .trade-profit-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf3f8;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#tradeProfitView .trade-profit-row:last-child {
  border-bottom: 0;
}

#tradeProfitView .trade-profit-row:hover {
  background: #f8fbfe;
}

#tradeProfitView .trade-profit-row-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8e5ff;
  border-radius: 999px;
  background: #f7faff;
  color: #1d5fb8;
  font-size: 12px;
  font-weight: 800;
}

#tradeProfitView .record-group-head {
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 12px;
}

#tradeProfitView .trade-profit-row .record-group-title {
  font-size: 16px;
}

#tradeProfitView .trade-profit-row .record-group-note {
  margin-top: 5px;
  line-height: 1.45;
}

#tradeProfitView .record-group-meta {
  min-height: 28px;
  padding: 0 10px;
  border-color: #d5e2ec;
  background: #f5f9fc;
  color: #556b7f;
}

#tradeProfitView .trade-profit-fields {
  grid-template-columns: minmax(92px, 0.7fr) minmax(190px, 1.35fr) minmax(96px, 0.75fr) repeat(2, minmax(168px, 1fr));
  gap: 8px;
}

#tradeProfitView .trade-profit-fields .field {
  gap: 0;
}

#tradeProfitView .trade-profit-fields label {
  display: none;
}

#tradeProfitView .field-row.two label,
#tradeProfitView .field-row.four label,
#tradeProfitView .field-row.one label {
  color: #63768a;
  font-size: 12px;
  font-weight: 700;
}

#tradeProfitView .field input,
#tradeProfitView .field select {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  border-color: transparent;
  background: #f5f8fb;
  color: var(--text);
  font-size: 14px;
}

#tradeProfitView .field input::placeholder {
  color: #9aaabd;
}

#tradeProfitView .field input:focus,
#tradeProfitView .field select:focus {
  border-color: #1f6feb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

#tradeProfitForm > .field-row.two.with-top-gap {
  margin-top: 0;
  padding: 10px;
  border-radius: 12px;
  border-color: #d5e2ec;
  background: #f6f9fc;
}

#tradeProfitForm > .field-row.two.with-top-gap .inline {
  gap: 8px;
}

#tradeProfitView .btn {
  min-height: 36px;
  border-radius: 10px;
  font-weight: 800;
}

#tradeProfitView .btn.primary {
  border-color: #0e7d51;
  background: #118f5a;
  box-shadow: 0 10px 18px rgba(17, 143, 90, 0.16);
}

#tradeProfitView .btn.primary:hover {
  border-color: #0b6a43;
  background: #0b6f49;
}

#tradeProfitView .btn.ghost {
  color: #536a7f;
}

#tradeProfitView .btn.danger {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

#tradeProfitView .btn.danger:hover {
  border-color: #efc2be;
  background: var(--danger-soft);
}

#tradeProfitStatus {
  min-height: 36px;
  max-width: 100%;
  justify-content: flex-end;
  text-align: right;
  line-height: 1.35;
  font-size: 13px;
}

#tradeProfitStatus:not(:empty),
#tradeProfitStatus.success,
#tradeProfitStatus.error {
  padding: 6px 10px;
  border-radius: 10px;
}

#tradeProfitView .trade-profit-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

#tradeProfitView .trade-profit-row-status {
  max-width: 180px;
  color: #66798c;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tradeProfitView .trade-profit-row-status.success {
  color: #177a52;
}

#tradeProfitView .trade-profit-row-status.error {
  color: var(--danger);
}

#tradeProfitResult {
  grid-template-columns: minmax(108px, 0.62fr) repeat(6, minmax(0, 1fr));
  gap: 8px;
}

#tradeProfitResult.with-top-gap,
#tradeProfitDetail.with-top-gap,
#tradeProfitRecordsSummary.with-top-gap,
#tradeProfitRecordsBreakdown.with-top-gap {
  margin-top: 10px;
}

#tradeProfitView .history-summary-grid {
  gap: 8px;
}

#tradeProfitView .metric,
#tradeProfitView .history-metric.featured {
  border-radius: 12px;
  padding: 10px 12px;
  opacity: 1;
  box-shadow: none;
}

#tradeProfitView .history-metric.featured {
  min-height: 78px;
}

#tradeProfitResult .metric:first-child {
  padding-left: 10px;
  padding-right: 10px;
}

#tradeProfitView .metric .label {
  margin-bottom: 4px;
  color: #66798c;
  font-size: 12px;
  font-weight: 800;
}

#tradeProfitView .metric .value,
#tradeProfitView .history-metric.featured .value {
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: 0;
}

#tradeProfitView .history-metric.featured .value {
  font-size: 22px;
}

#tradeProfitView .metric .sub {
  margin-top: 4px;
  line-height: 1.4;
}

#tradeProfitDetail {
  gap: 8px;
}

#tradeProfitView .trade-profit-result-table {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border-color: #d6e2ec;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

#tradeProfitView .trade-profit-result-head,
#tradeProfitView .trade-profit-result-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(150px, 0.9fr) minmax(140px, 0.8fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(92px, 0.55fr);
  align-items: center;
  gap: 10px;
}

#tradeProfitView .trade-profit-result-head {
  padding: 9px 12px;
  border-bottom: 1px solid #e7eef5;
  background: #f7fafc;
  color: #65788a;
  font-size: 12px;
  font-weight: 800;
}

#tradeProfitView .trade-profit-result-head span,
#tradeProfitView .trade-profit-result-row > * {
  text-align: center;
}

#tradeProfitView .trade-profit-result-list {
  display: grid;
}

#tradeProfitView .trade-profit-result-row {
  min-height: 48px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #2c3c4d;
  font-size: 13px;
}

#tradeProfitView .trade-profit-result-row:last-child {
  border-bottom: 0;
}

#tradeProfitView .trade-profit-result-row.error {
  background: #fff8f7;
}

#tradeProfitView .trade-profit-result-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#tradeProfitView .trade-profit-result-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

#tradeProfitView .trade-profit-result-main strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tradeProfitView .trade-profit-symbol-edit {
  min-height: 24px;
  padding: 0 6px;
  border-color: #d8e4ee;
  border-radius: 7px;
  color: #536a7f;
  font-size: 11px;
  line-height: 1;
}

#tradeProfitView .trade-profit-result-main span,
#tradeProfitView .trade-profit-result-mini span {
  color: #66798c;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#tradeProfitView .trade-profit-result-value {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
}

#tradeProfitView .trade-profit-result-value.positive {
  color: #0b6a43;
}

#tradeProfitView .trade-profit-result-value.negative {
  color: var(--danger);
}

#tradeProfitView .trade-profit-result-mini {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
}

#tradeProfitView .trade-profit-result-mini strong {
  color: #34475a;
  font-size: 12px;
  font-weight: 800;
}

#tradeProfitView .trade-profit-result-mini span {
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
}

#tradeProfitView .trade-profit-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

#tradeProfitView .record-group-list .list-item {
  padding: 11px 12px;
  border-radius: 12px;
  border-color: #dfe8f0;
  background: #ffffff;
  box-shadow: none;
}

#tradeProfitView .trade-profit-detail-item {
  min-height: 86px;
}

#tradeProfitView .trade-profit-detail-item .tag {
  white-space: normal;
}

#tradeProfitView .list-title {
  font-size: 14px;
  line-height: 1.35;
}

#tradeProfitView .list-sub {
  gap: 7px;
}

#tradeProfitView .tag {
  min-height: 25px;
  padding: 0 9px;
  border-color: #d9e4ee;
  background: #f7fafc;
  font-weight: 700;
}

#tradeProfitView .tag.green {
  border-color: #c6e7d3;
}

#tradeProfitView .tag.blue {
  border-color: #cbdcff;
}

#tradeProfitView .tag.amber {
  border-color: #efdba4;
}

#tradeProfitView .tag.danger {
  border-color: #efc2be;
}

#tradeProfitView .trade-profit-records-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
  gap: 18px;
}

#tradeProfitView .trade-profit-analysis-section .field-row.four,
#tradeProfitView .trade-profit-analysis-section .field-row.one {
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe6ef;
  border-radius: 16px;
  background: #f7fafc;
}

#tradeProfitView .trade-profit-analysis-section .field-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#tradeProfitRecordsSummary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#tradeProfitView .trade-profit-breakdown-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#tradeProfitView .trade-profit-breakdown-group {
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
}

#tradeProfitView .trade-profit-breakdown-group .record-group-head {
  padding-bottom: 10px;
}

#tradeProfitView .trade-profit-breakdown-group .record-group-title {
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#tradeProfitView .trade-profit-sort-arrow {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #d8e3ec;
  border-radius: 999px;
  background: #f1f6fb;
  color: #52677b;
  flex: 0 0 auto;
}

#tradeProfitView .trade-profit-sort-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  transform: translate(-50%, -50%);
}

#tradeProfitView .trade-profit-sort-arrow.asc::before {
  border-bottom: 6px solid currentColor;
}

#tradeProfitView .trade-profit-sort-arrow.desc::before {
  border-top: 6px solid currentColor;
}

#tradeProfitView .trade-profit-sort-arrow.idle::before {
  border-top: 6px solid currentColor;
  opacity: 0.48;
}

#tradeProfitView .trade-profit-breakdown-item {
  align-items: center;
  min-height: 54px;
}

#tradeProfitView .trade-profit-breakdown-item .list-title {
  font-size: 14px;
}

#tradeProfitView .trade-profit-breakdown-pnl {
  max-width: 48%;
  font-size: 15px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums lining-nums;
}

#tradeProfitView .trade-profit-recent-section .section-body {
  padding-top: 14px;
}

#tradeProfitView .trade-profit-recent-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#tradeProfitView .trade-profit-recent-item {
  align-items: flex-start;
  padding: 13px;
  border-radius: 14px;
}

#tradeProfitView .trade-profit-recent-section .field {
  margin-bottom: 12px;
}

#tradeProfitView .trade-profit-record-item .list-sub,
#tradeProfitView .trade-profit-recent-item .list-sub {
  gap: 6px;
}

#tradeProfitView .trade-profit-note-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

#tradeProfitView .trade-profit-note-preview {
  flex: 1 1 240px;
  min-width: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#tradeProfitView .trade-profit-note-panel {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #f8fbff;
}

#tradeProfitView .trade-profit-note-panel.is-open {
  display: block;
}

#tradeProfitView .trade-profit-note-panel .field {
  margin-bottom: 8px;
}

#tradeProfitView .trade-profit-note-panel textarea {
  min-height: 80px;
}

#tradeProfitView .trade-profit-note-actions {
  justify-content: space-between;
  gap: 12px;
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-compose-section,
:root[data-theme="dark"] #tradeProfitView .trade-profit-analysis-section,
:root[data-theme="dark"] #tradeProfitView .trade-profit-recent-section,
:root[data-theme="dark"] #tradeProfitView .trade-profit-result-table,
:root[data-theme="dark"] #tradeProfitView .trade-profit-result-card,
:root[data-theme="dark"] #tradeProfitView .trade-profit-breakdown-group {
  border-color: var(--line);
  background: linear-gradient(180deg, #1b2025 0%, #181c20 100%);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] #tradeProfitView .section-head .note,
:root[data-theme="dark"] #tradeProfitView .trade-profit-help,
:root[data-theme="dark"] #tradeProfitForm > .field-row.two.with-top-gap,
:root[data-theme="dark"] #tradeProfitView .trade-profit-analysis-section .field-row.four,
:root[data-theme="dark"] #tradeProfitView .trade-profit-analysis-section .field-row.one {
  border-color: var(--line);
  background: #151a1f;
  color: var(--muted);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-help span,
:root[data-theme="dark"] #tradeProfitRows.list,
:root[data-theme="dark"] #tradeProfitView .trade-profit-row-index,
:root[data-theme="dark"] #tradeProfitView .record-group-meta,
:root[data-theme="dark"] #tradeProfitStatus:not(:empty),
:root[data-theme="dark"] #tradeProfitView .record-group-list .list-item {
  border-color: var(--line);
  background: #11161b;
  color: var(--text);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-note-panel {
  border-color: var(--line);
  background: #151a1f;
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-row {
  border-color: var(--line);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-row:hover {
  background: #151a1f;
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-result-head,
:root[data-theme="dark"] #tradeProfitView .trade-profit-result-row.error {
  border-color: var(--line);
  background: #151a1f;
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-result-row {
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-result-main span,
:root[data-theme="dark"] #tradeProfitView .trade-profit-result-mini span,
:root[data-theme="dark"] #tradeProfitView .trade-profit-row-status {
  color: var(--muted);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-result-mini strong {
  color: var(--text);
}

:root[data-theme="dark"] #tradeProfitView .trade-profit-fields label,
:root[data-theme="dark"] #tradeProfitView .field-row.two label,
:root[data-theme="dark"] #tradeProfitView .field-row.four label,
:root[data-theme="dark"] #tradeProfitView .field-row.one label,
:root[data-theme="dark"] #tradeProfitView .metric .label {
  color: var(--muted);
}

:root[data-theme="dark"] #tradeProfitView .field input,
:root[data-theme="dark"] #tradeProfitView .field select {
  border-color: transparent;
  background: #11161b;
  color: var(--text);
}

:root[data-theme="dark"] #tradeProfitView .field input:focus,
:root[data-theme="dark"] #tradeProfitView .field select:focus {
  border-color: var(--blue);
  background: #151a1f;
}

:root[data-theme="dark"] #tradeProfitView .btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #08100c;
}

:root[data-theme="dark"] #tradeProfitView .btn.ghost {
  color: var(--muted);
}

:root[data-theme="dark"] #tradeProfitView .tag {
  border-color: var(--line);
  background: #151a1f;
  color: var(--muted);
}

@media (max-width: 1320px) {
  #tradeProfitView .trade-profit-fields {
    grid-template-columns: minmax(88px, 0.65fr) minmax(180px, 1.35fr) minmax(92px, 0.75fr) repeat(2, minmax(150px, 1fr));
  }

  #tradeProfitResult {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #tradeProfitRecordsSummary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  #tradeProfitResult {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tradeProfitView .trade-profit-records-grid {
    grid-template-columns: 1fr;
  }

  #tradeProfitView .trade-profit-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tradeProfitView .trade-profit-result-head,
  #tradeProfitView .trade-profit-result-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.85fr) minmax(120px, 0.75fr) minmax(128px, 0.8fr) minmax(128px, 0.8fr) minmax(80px, 0.5fr);
  }
}

@media (max-width: 720px) {
  #tradeProfitView .section-head {
    padding: 16px 16px 0;
  }

  #tradeProfitView .section-head .note {
    max-width: none;
    text-align: left;
  }

  #tradeProfitView .section-body {
    padding: 16px;
  }

  #tradeProfitView .trade-profit-help {
    display: grid;
  }

  #tradeProfitView .trade-profit-fields,
  #tradeProfitView .trade-profit-analysis-section .field-row.four,
  #tradeProfitView .trade-profit-analysis-section .field-row.one,
  #tradeProfitRecordsSummary,
  #tradeProfitView .trade-profit-breakdown-grid,
  #tradeProfitResult {
    grid-template-columns: 1fr;
  }

  #tradeProfitView .trade-profit-row {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: flex-start;
  }

  #tradeProfitView .trade-profit-row-index {
    width: 24px;
    height: 24px;
  }

  #tradeProfitView .trade-profit-row-actions {
    grid-column: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #tradeProfitView .trade-profit-row-status {
    max-width: none;
  }

  #tradeProfitView .trade-profit-result-head {
    display: none;
  }

  #tradeProfitView .trade-profit-result-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: flex-start;
  }

  #tradeProfitView .trade-profit-result-main strong,
  #tradeProfitView .trade-profit-result-main span {
    white-space: normal;
  }

  #tradeProfitForm > .field-row.two.with-top-gap {
    align-items: stretch;
    flex-direction: column;
  }

  #tradeProfitForm > .field-row.two.with-top-gap .inline {
    align-items: stretch;
  }

  #tradeProfitForm > .field-row.two.with-top-gap .btn {
    flex: 1 1 auto;
  }

  #tradeProfitStatus {
    justify-content: flex-start;
    text-align: left;
  }

  #tradeProfitView .record-group-head {
    align-items: flex-start;
  }

  #tradeProfitView .trade-profit-breakdown-pnl {
    max-width: none;
  }

  #tradeProfitView .trade-profit-recent-item {
    flex-direction: column;
  }

  #tradeProfitView .trade-profit-note-actions {
    align-items: flex-start;
  }
}
