:root {
  --profit-color: #00F660;
  --loss-color: #F70000;
}

.portal-module-body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(1200px 460px at 8% -10%, rgba(5, 171, 206, 0.22), transparent 60%),
    radial-gradient(1000px 420px at 100% 0%, rgba(11, 18, 32, 0.12), transparent 60%),
    linear-gradient(180deg, #edf3f8 0%, #eef2f7 35%, #f7fafc 100%);
  color: var(--text);
}

/* Global portal white canvas (overrides older gradient background on short pages) */
body.portal-module-body {
  background: #ffffff !important;
}

body.portal-module-body .portal-wrap,
body.portal-module-body .portal-content {
  background: #ffffff !important;
}

.portal-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 14px 40px;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}
.portal-topbar.hidden {
  display: none;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(5, 171, 206, 0.2);
  padding: 5px;
}

.portal-brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-brand-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.portal-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-user-pill {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(5, 171, 206, 0.25);
  background: linear-gradient(180deg, #F7FDFF 0%, #E6F9FC 100%);
  color: #064F60;
  font-size: 12px;
  font-weight: 700;
}

.portal-outline-btn {
  border: 1px solid #d8e3ee;
  background: rgba(255,255,255,0.9);
  color: #0b1220;
  text-decoration: none;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.portal-nav {
  margin-top: 0;
  position: sticky;
  top: 0;
  z-index: 9;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  transform: translateZ(0);
}

.portal-nav-scroll {
  display: flex;
  gap: 6px;
  overflow-x: hidden;
  padding: 10px 14px;
  border-radius: 0;
  border: 0;
  background: #141921;
  backdrop-filter: none;
  flex-wrap: wrap;
}

.portal-nav-logo {
  display: inline-flex;
  align-items: center;
  padding-right: 8px;
  flex: 0 0 auto;
}

.portal-nav-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.portal-nav-link {
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.08);
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-weight: 600;
}

.portal-nav-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.portal-nav-link.is-active {
  background: transparent;
  border: 0;
  color: #05ABCE;
  box-shadow: none;
}

@media (min-width: 1024px) {
  .portal-nav-logo {
    margin-left: 10px;
  }
}


.portal-flash {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7e2ee;
  background: #fff;
  font-size: 13px;
}
.portal-flash.hidden { display: none; }
.portal-flash.success { background: #E6F9FC; border-color: #B5F2FA; color: #056D84; }
.portal-flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.portal-flash.info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.portal-content {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.portal-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e3ebf3;
  background: rgba(255,255,255,0.95);
}

.portal-page-header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.portal-page-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.portal-grid {
  display: grid;
  gap: 12px;
}
.portal-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.portal-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }

.portal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.portal-list {
  display: grid;
  gap: 10px;
}

.portal-list-item {
  border: 1px solid #e4edf6;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  padding: 12px;
}

.portal-list-item h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.portal-list-item p {
  margin: 4px 0;
  font-size: 13px;
  color: #334155;
}

.portal-form-grid {
  display: grid;
  gap: 10px;
}
.portal-form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }

.portal-empty {
  border: 1px dashed #d8e3ee;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  background: #fbfdff;
}

.portal-json {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
  font-size: 12px;
  overflow: auto;
  max-height: 420px;
}

.portal-mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  background: #fff;
  color: #334155;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}
.portal-badge.green { background: #E6F9FC; border-color: #C8F5FB; color: #056D84; }
.portal-badge.yellow { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.portal-badge.red { background: #fee2e2; border-color: #fecaca; color: #991b1b; }

.portal-toolbar-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.portal-select-inline {
  width: auto;
  min-width: 140px;
}

@media (max-width: 960px) {
  .portal-grid.two,
  .portal-grid.three,
  .portal-form-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portal-wrap {
    padding: 10px 8px 24px;
  }
  .portal-topbar {
    padding: 12px;
    border-radius: 16px;
  }
  .portal-page-header {
    padding: 12px;
  }
  .portal-page-header h1 {
    font-size: 18px;
  }
  .portal-brand-title {
    font-size: 16px;
  }
}

/* v9 module polish */
.portal-page-header {
  position: relative;
  overflow: hidden;
}

.portal-page-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -30px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(5, 171, 206, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.portal-page-header > * {
  position: relative;
  z-index: 1;
}

.portal-card-head h2 {
  letter-spacing: -0.02em;
}

.portal-card-head .muted,
.portal-card-head p.muted {
  font-size: 12px;
  line-height: 1.4;
}

.portal-list-item {
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.portal-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(5, 171, 206, 0.20);
  box-shadow: 0 12px 24px rgba(15,23,42,0.05);
}

.portal-badge {
  letter-spacing: 0.01em;
}

.portal-empty {
  background:
    radial-gradient(circle at 0% 0%, rgba(5, 171, 206, 0.05), transparent 55%),
    #fbfdff;
}

.portal-toolbar-inline .portal-select-inline {
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .portal-list-item {
    transition: none;
  }
}

/* Manual trading portal page */
.web-trade-page {
  --hy-green: #05ABCE;
  --hy-buy: #05ABCE;
  --hy-sell: #e11d48;
  width: 100%;
  max-width: 1280px;
  margin: -10px auto 0;
  padding: 0 0 34px;
  color: #0b1220;
  overflow-x: clip;
}

.web-trade-page,
.web-trade-page * {
  box-sizing: border-box;
}

.web-trade-topbar {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.web-trade-icon-btn {
  width: 48px;
  height: 48px;
  border: 0 !important;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #048FB0 !important;
  text-decoration: none;
  font-size: 24px;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-real-pill {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 250px;
  border: 2px solid rgba(5, 171, 206, 0.65);
  background: rgba(5, 171, 206, 0.07);
  border-radius: 999px;
  padding: 8px 22px;
}

.web-trade-real-pill span {
  border-radius: 999px;
  padding: 8px 18px;
  background: rgba(5, 171, 206, 0.14);
  color: #056D84;
  font-weight: 800;
}

.web-trade-real-pill strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.web-trade-title-row {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  min-width: 0;
}

.web-trade-title-row h1 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 900;
}

.web-trade-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.web-open-floating-title.pos,
.web-trade-section-head h2.pos,
.web-trade-row-profit.pos {
  color: #05ABCE;
}

.web-open-floating-title.neg,
.web-trade-section-head h2.neg,
.web-trade-row-profit.neg {
  color: #ef4444;
}

.web-trade-open-link {
  min-width: 96px;
  min-height: 36px;
  border: 1.5px solid rgba(5, 171, 206, .65);
  background: #F0FBFE;
  color: #087F98;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.web-trade-symbol-shell {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
}

.web-trade-symbol-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0;
}

.web-trade-symbol-scroll::-webkit-scrollbar {
  display: none;
}

.web-trade-symbol-scroll button,
.web-trade-search-btn {
  height: 40px;
  border-radius: 999px;
  border: 2px solid #BDE8F0 !important;
  background: #ffffff !important;
  color: #374151 !important;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-symbol-scroll button.active {
  border-color: rgba(5, 171, 206, .8) !important;
  background: rgba(5, 171, 206, .12) !important;
  color: #0b1220 !important;
}

.web-trade-search-btn {
  width: 40px;
  padding: 0;
  color: #048FB0 !important;
  position: sticky;
  right: 0;
}

.web-trade-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.web-trade-order-btn,
.web-trade-lot-input {
  height: 50px;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-order-btn.buy {
  border: 0 !important;
  color: #079CB8 !important;
  background: rgba(5, 171, 206, .14) !important;
}

.web-trade-order-btn.sell {
  border: 0 !important;
  color: #e11d48 !important;
  background: rgba(225, 29, 72, .13) !important;
}

.web-trade-order-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.web-trade-lot-input {
  width: 100%;
  border: 2px solid #CBEFF6;
  background: #fff;
  color: #0b1220;
  appearance: textfield;
}

.web-trade-lot-input::-webkit-outer-spin-button,
.web-trade-lot-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.web-trade-chart-card {
  border: 1px solid #cfd8e3;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.web-trade-chart-head {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(5, 171, 206, 0.58);
}

.web-trade-pair-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-pair-title span:first-child {
  color: #1a7dec;
  font-size: 22px;
  font-weight: 900;
}

.web-trade-pair-title span:nth-child(2) {
  color: #374151;
  font-size: 22px;
  font-weight: 800;
}

.web-trade-pair-title img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  transform: translateY(4px);
}

.web-trade-chart-head > span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.web-trade-chart-mobile-title {
  display: none;
}

.web-trade-chart-stage {
  position: relative;
  height: min(72vh, 760px);
  min-height: 550px;
  background: #fff;
}

.web-trade-chart-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.web-trade-chart-stage.is-loading canvas {
  filter: blur(2px);
}

.web-trade-chart-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .42);
  z-index: 2;
}

.web-trade-chart-loader.hidden {
  display: none;
}

.web-trade-chart-loader span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(5, 171, 206, .22);
  border-top-color: #05ABCE;
  animation: portalInlineSpinner .8s linear infinite;
}

.web-trade-open {
  margin-top: 18px;
}

.web-open-trades-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 34px;
}

.web-trade-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.web-trade-section-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}

.web-trade-section-head span {
  color: #64748b;
  font-weight: 800;
}

.web-trade-open-list {
  display: grid;
  gap: 10px;
}

.web-trade-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid #7DE9F5;
  background: #F3FCFE;
  border-radius: 16px;
  padding: 13px 14px;
  min-width: 0;
}

.web-trade-row-head,
.web-trade-row-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.web-trade-row-main {
  min-width: 0;
  flex: 1 1 auto;
}

.web-trade-row-title {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  font-size: 19px;
  font-weight: 900;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.web-trade-row-title strong,
.web-trade-row-title span {
  white-space: nowrap;
}

.web-trade-row-title span.buy {
  color: #2563eb;
}

.web-trade-row-title span.sell {
  color: #ef4444;
}

.web-trade-row-price,
.web-trade-row-protection {
  margin-top: 5px;
  color: #64748b;
  font-size: 15px;
  font-weight: 650;
}

.web-trade-row-price {
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.web-trade-row-price span {
  color: #94a3b8;
  padding: 0 5px;
}

.web-trade-row-protection {
  display: flex;
  gap: 14px;
}

.web-trade-row-protection .sl {
  color: #ef4444;
}

.web-trade-row-protection .tp {
  color: #05ABCE;
}

.web-trade-row-profit {
  color: #64748b;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.web-trade-row-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}

.web-trade-image-action {
  width: 34px;
  height: 34px;
  border: 0 !important;
  background: transparent !important;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-image-action img {
  max-width: 28px;
  max-height: 28px;
  display: block;
}

.web-trade-close-btn {
  min-width: 62px;
  height: 26px;
  min-height: 26px;
  border-radius: 7px;
  border: 0 !important;
  background: #EF4444 !important;
  color: #FFFFFF !important;
  padding: 0 10px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-no-positions {
  min-height: 270px;
  display: grid;
  place-items: center;
  border: 1px solid #e4edf6;
  border-radius: 16px;
  background: #fbfdff;
}

.web-trade-no-positions img {
  width: min(220px, 48vw);
  height: auto;
  display: block;
  opacity: .92;
}

.web-open-trades-empty {
  min-height: min(56vh, 520px);
}

.web-trade-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.web-trade-modal[hidden] {
  display: none !important;
}

.web-trade-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .46);
}

.web-trade-modal-card {
  position: relative;
  width: min(100%, 560px);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(5, 171, 206, .9);
  background: #F3FCFE;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.web-trade-modal-card.timeframe,
.web-trade-modal-card.protection {
  max-width: 380px;
  grid-template-rows: auto 1fr;
}

.web-trade-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #DCEFF4;
}

.web-trade-modal-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.web-trade-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #d1d5db !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-symbol-search {
  margin: 12px 14px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #cbd5df;
  background: #fff;
  color: #0b1220;
  padding: 0 13px;
  font-size: 16px;
  font-weight: 700;
}

.web-trade-symbol-results {
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 0 22px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.web-trade-symbol-results::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.web-trade-symbol-results button,
.web-trade-timeframe-options button {
  border: 1px solid #D8F2F7 !important;
  background: #fff !important;
  border-radius: 12px;
  color: #0b1220 !important;
  padding: 11px 12px;
  text-align: left;
  box-shadow: none !important;
  transform: none !important;
}

.web-trade-symbol-results button.active,
.web-trade-timeframe-options button.active {
  border-color: #05ABCE !important;
  background: #E6F9FC !important;
}

.web-trade-symbol-results strong {
  display: block;
  font-size: 15px;
}

.web-trade-symbol-results span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.web-trade-timeframe-options {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.web-trade-timeframe-options button {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.web-trade-field {
  display: grid;
  gap: 6px;
  margin: 14px 16px 0;
  font-weight: 800;
}

.web-trade-field input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid #cbd5df;
  background: #fff;
  color: #0b1220;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.web-trade-save-protection {
  margin: 16px;
  height: 44px;
  border: 0 !important;
  border-radius: 999px;
  background: #05ABCE !important;
  color: #fff !important;
  font-weight: 900;
  box-shadow: none !important;
  transform: none !important;
}

@media (max-width: 720px) {
  .web-trade-page {
    margin-top: -16px;
  }
  .web-open-trades-page {
    margin-top: -12px;
  }
  .web-open-trades-page .cth-topbar {
    margin-top: -6px;
    margin-bottom: 2px;
  }
  .web-trade-topbar {
    grid-template-columns: 22px 1fr 22px;
    gap: 8px;
  }
  .web-trade-icon-btn {
    width: 22px;
    height: 34px;
    color: #05ABCE !important;
    font-size: 22px;
  }
  .web-trade-real-pill {
    min-width: 0;
    width: auto;
    max-width: 220px;
    gap: 10px;
    padding: 6px 12px;
    border-width: 1px;
    border-color: #7DE9F5;
    background: #FFFFFF;
  }
  .web-trade-real-pill span {
    padding: 4px 10px;
    background: #E7F8FC;
    color: #056D84;
    font-size: 12px;
    font-weight: 700;
  }
  .web-trade-real-pill strong {
    font-size: 16px;
    font-weight: 700;
  }
  .web-trade-title-row {
    align-items: center;
  }
  .web-trade-title-line {
    gap: 18px;
  }
  .web-trade-open-link {
    min-width: 78px;
    min-height: 32px;
    padding: 0 16px;
    font-size: 14px;
  }
  .web-trade-symbol-scroll button {
    height: 34px;
    padding: 0 13px;
    border-width: 1px !important;
    border-color: #D8F3F8 !important;
    background: #FFFFFF !important;
    color: #4B5563 !important;
    font-size: 13px;
    font-weight: 700;
  }
  .web-trade-symbol-shell {
    grid-template-columns: 1fr 34px;
    gap: 8px;
    margin-bottom: 4px;
  }
  .web-trade-search-btn {
    width: 34px;
    height: 34px;
    border-width: 1px !important;
    border-color: #D8F3F8 !important;
    background: #FFFFFF !important;
    font-size: 14px;
  }
  .web-trade-symbol-scroll button.active {
    border-color: #7DE9F5 !important;
    background: #E6F9FC !important;
    color: #0B1220 !important;
  }
  .web-trade-actions {
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    gap: 12px;
  }
  .web-trade-order-btn,
  .web-trade-lot-input {
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
  }
  .web-trade-order-btn.buy {
    color: #05ABCE !important;
    background: #E6F9FC !important;
  }
  .web-trade-order-btn.sell {
    color: #FC003E !important;
    background: #FFECEE !important;
  }
  .web-trade-lot-input {
    border-width: 1px;
    border-color: #E6F9FC;
    padding: 0 8px;
  }
  .web-trade-chart-head {
    display: none;
  }
  .web-trade-chart-mobile-title {
    position: absolute;
    z-index: 3;
    top: 12px;
    left: 10px;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .web-trade-chart-mobile-title span:first-child {
    color: #0A9FC1;
    font-size: 14px;
    font-weight: 900;
  }
  .web-trade-chart-mobile-title span:nth-child(2) {
    color: #374151;
    font-size: 14px;
    font-weight: 800;
  }
  .web-trade-chart-mobile-title img {
    width: 9px;
    height: 9px;
    object-fit: contain;
    transform: translateY(3px);
  }
  .web-trade-chart-card {
    border: 0;
    border-radius: 0;
  }
  .web-trade-chart-stage {
    min-height: 550px;
    height: calc(100vh - 230px);
  }
  .web-trade-row {
    padding: 11px 10px;
  }
  .web-trade-row-head,
  .web-trade-row-body {
    gap: 8px;
  }
  .web-trade-row-title {
    gap: 6px;
    font-size: clamp(15px, 4.2vw, 17px);
  }
  .web-trade-row-profit {
    font-size: clamp(14px, 3.9vw, 17px);
  }
  .web-trade-row-price,
  .web-trade-row-protection {
    font-size: clamp(12px, 3.5vw, 14px);
  }
  .web-trade-row-actions {
    gap: 5px;
    justify-content: flex-end;
  }
  .web-trade-image-action {
    width: 28px;
    height: 28px;
  }
  .web-trade-image-action img {
    max-width: 23px;
    max-height: 23px;
  }
  .web-trade-close-btn {
    min-width: 62px;
    height: 26px;
    min-height: 26px;
    padding: 0 10px;
    font-size: 12px;
  }
  .web-trade-symbol-results {
    grid-template-columns: 1fr 1fr;
    padding-inline: 14px;
  }
}

@media (prefers-color-scheme: dark) {
  body.portal-module-body,
  body.portal-module-body .portal-wrap,
  body.portal-module-body .portal-content {
    background:
      radial-gradient(760px 420px at 82% 8%, rgba(5, 171, 206, 0.22), transparent 58%),
      radial-gradient(620px 360px at 16% 4%, rgba(4, 143, 176, 0.08), transparent 62%),
      linear-gradient(180deg, #05070a 0%, #030508 100%) !important;
    color: #f8fafc;
  }

  .portal-content,
  .web-trade-page,
  .web-open-trades-page {
    color: #f8fafc;
  }

  .portal-flash,
  .portal-topbar,
  .portal-page-header,
  .portal-card,
  .web-trade-row,
  .web-trade-modal-card,
  .web-trade-no-positions,
  .web-trade-chart-card {
    background: rgba(5, 9, 12, 0.78) !important;
    border-color: rgba(5, 171, 206, 0.58) !important;
    color: #f8fafc;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }

  .web-trade-chart-stage {
    background: #030508;
  }

  .web-trade-chart-loader {
    background: rgba(5, 7, 10, .52);
  }

  .web-trade-title-row h1,
  .web-trade-section-head h2,
  .web-trade-row-title strong,
  .web-trade-modal-head h3,
  .web-trade-symbol-results strong,
  .web-trade-timeframe-options button,
  .web-trade-field,
  .web-trade-real-pill strong {
    color: #f8fafc !important;
  }

  .web-trade-section-head span,
  .web-trade-row-price,
  .web-trade-row-protection,
  .web-trade-symbol-results span,
  .web-trade-modal-close,
  .web-trade-field input,
  .web-trade-chart-mobile-title span:nth-child(2),
  .web-trade-pair-title span:nth-child(2) {
    color: #a3a8b3 !important;
  }

  .web-trade-real-pill,
  .web-trade-symbol-scroll button,
  .web-trade-search-btn,
  .web-trade-lot-input,
  .web-trade-symbol-search,
  .web-trade-symbol-results button,
  .web-trade-timeframe-options button,
  .web-trade-field input,
  .web-trade-modal-close {
    background: rgba(8, 12, 16, 0.72) !important;
    border-color: rgba(86, 104, 118, 0.58) !important;
    color: #d1d5db !important;
  }

  .web-trade-modal-close {
    background: rgba(14, 18, 23, 0.92) !important;
    border-color: rgba(5, 171, 206, 0.44) !important;
    color: #f8fafc !important;
  }

  .web-trade-real-pill {
    border-color: rgba(5, 171, 206, 0.9) !important;
  }

  .web-trade-real-pill span,
  .web-trade-symbol-scroll button.active,
  .web-trade-symbol-results button.active,
  .web-trade-timeframe-options button.active,
  .web-trade-symbol-results button:hover,
  .web-trade-timeframe-options button:hover {
    background: rgba(5, 171, 206, 0.16) !important;
    border-color: #05ABCE !important;
    color: #05ABCE !important;
  }

  .web-trade-open-link {
    background: rgba(5, 171, 206, 0.14);
    border-color: rgba(5, 171, 206, 0.68);
    color: #56DFF8;
  }

  .web-trade-order-btn.buy {
    background: rgba(5, 171, 206, .18) !important;
    color: #05ABCE !important;
  }

  .web-trade-order-btn.sell {
    background: rgba(239, 68, 68, .18) !important;
    color: #ff4d67 !important;
  }

  .web-trade-row-price span,
  .web-trade-row-profit.profit-zero,
  .web-trade-row-profit:not(.pos):not(.neg) {
    color: #8f97a3 !important;
  }

  .web-trade-modal-backdrop {
    background: rgba(0, 0, 0, .68);
  }

  .web-trade-modal-head {
    border-color: rgba(148, 163, 184, .24);
  }

  .web-trade-close-btn {
    background: #d73535 !important;
  }

  .web-trade-chart-mobile-title span:first-child {
    color: #0A9FC1 !important;
  }

  .web-trade-pair-title span:first-child {
    color: #2f80ff !important;
  }

  .web-trade-chart-mobile-title img,
  .web-trade-pair-title img {
    filter: invert(75%) sepia(9%) saturate(292%) hue-rotate(179deg) brightness(88%) contrast(88%);
  }
}

@media (prefers-color-scheme: dark) {
  html {
    background: #030508 !important;
    color-scheme: dark;
  }

  body.portal-module-body {
    background: #030508 !important;
  }
}

/* Profit/loss color standard: match the master-trader trade result cards. */
.web-open-floating-title.pos,
.web-trade-section-head h2.pos,
.web-trade-row-profit.pos,
.pf-trades-section-total.profit-pos,
.pf-trade-profit.profit-pos,
.trade-profit.pos,
.profit-pos,
.profit-positive,
.pnl-positive,
.amount-positive,
.text-positive,
.text-success {
  color: var(--profit-color) !important;
}

.web-open-floating-title.neg,
.web-trade-section-head h2.neg,
.web-trade-row-profit.neg,
.pf-trades-section-total.profit-neg,
.pf-trade-profit.profit-neg,
.trade-profit.neg,
.profit-neg,
.profit-negative,
.pnl-negative,
.amount-negative,
.text-negative,
.text-danger {
  color: var(--loss-color) !important;
}

/* Closed trades: compact reference layout with live filters and summaries. */
body.portal-history-page-body {
  --cth-ink: #0B1426;
  --cth-muted: #69758C;
  --cth-cyan: #00B8E6;
  --cth-buy: #00A9D6;
  --cth-buy-bg: #E6F8FC;
  --cth-sell: #FF2445;
  --cth-sell-bg: #FDEDF0;
  --cth-profit: #00BE78;
  --cth-border: #E8EDF3;
  --cth-card: #FFFFFF;
  --cth-surface: #FFFFFF;
}

body.portal-history-page-body .portal-content {
  padding-top: 10px !important;
}

body.portal-history-page-body .cth-page.manual-history-page {
  width: min(100%, 1040px);
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 0 32px;
  color: var(--cth-ink);
  overflow: hidden;
}

body.portal-history-page-body .cth-heading-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  margin-bottom: 18px;
}

body.portal-history-page-body .cth-heading-row .cth-back {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: var(--cth-cyan) !important;
  font-size: 25px;
}

body.portal-history-page-body .cth-heading-row h1 {
  min-width: 0;
  margin: 0;
  color: var(--cth-ink) !important;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.045em;
}

body.portal-history-page-body .cth-symbol-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
  padding: 1px 1px 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.portal-history-page-body .cth-symbol-filters::-webkit-scrollbar {
  display: none;
}

body.portal-history-page-body .cth-symbol-pill {
  flex: 0 0 auto;
  min-height: 42px;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid #CBEAF2 !important;
  border-radius: 999px;
  background: var(--cth-card) !important;
  color: var(--cth-muted) !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transform: none !important;
}

body.portal-history-page-body .cth-symbol-pill.is-active,
body.portal-history-page-body .cth-symbol-pill[aria-selected="true"] {
  border-color: var(--cth-cyan) !important;
  background: #F2FCFE !important;
  color: var(--cth-ink) !important;
}

body.portal-history-page-body .cth-symbol-pill:focus-visible,
body.portal-history-page-body .cth-filter-submit:focus-visible,
body.portal-history-page-body .cth-date-field:focus-within {
  outline: 3px solid rgba(0, 184, 230, 0.22);
  outline-offset: 2px;
}

body.portal-history-page-body .cth-date-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 54px;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
}

body.portal-history-page-body .cth-date-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 62px;
  padding: 9px 13px;
  border: 1px solid var(--cth-border);
  border-radius: 15px;
  background: var(--cth-card);
  color: var(--cth-ink);
  cursor: pointer;
}

body.portal-history-page-body .cth-date-field > i {
  flex: 0 0 auto;
  color: var(--cth-ink);
  font-size: 21px;
}

body.portal-history-page-body .cth-date-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

body.portal-history-page-body .cth-date-copy > span {
  color: var(--cth-muted);
  font-size: 12px;
  line-height: 1.15;
}

body.portal-history-page-body .cth-date-copy strong {
  overflow: hidden;
  color: var(--cth-ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-history-page-body .cth-date-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
}

body.portal-history-page-body .cth-filter-submit {
  display: grid;
  place-items: center;
  width: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  border: 1px solid #BDE5F0 !important;
  border-radius: 17px;
  background: var(--cth-card) !important;
  color: var(--cth-cyan) !important;
  box-shadow: none !important;
  font-size: 22px;
  transform: none !important;
}

body.portal-history-page-body .cth-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0 0 12px;
}

body.portal-history-page-body .cth-summary-card {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  min-height: 70px;
  padding: 6px 7px;
  border: 1px solid rgba(232, 237, 243, 0.72);
  border-radius: 16px;
  text-align: center;
}

body.portal-history-page-body .cth-summary-trades {
  background: linear-gradient(135deg, #F1FBFE 0%, #EAF8FC 100%);
}

body.portal-history-page-body .cth-summary-profit {
  background: linear-gradient(135deg, #F3FFFA 0%, #EBFAF5 100%);
}

body.portal-history-page-body .cth-summary-winrate {
  background: linear-gradient(135deg, #FAFBFD 0%, #F4F6FA 100%);
}

body.portal-history-page-body .cth-summary-card span {
  overflow: hidden;
  max-width: 100%;
  color: var(--cth-muted);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-history-page-body .cth-summary-card strong {
  overflow: hidden;
  max-width: 100%;
  margin-top: 4px;
  color: var(--cth-ink);
  font-size: clamp(18px, 4vw, 25px);
  line-height: 1;
  font-weight: 820;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-history-page-body .cth-summary-card strong.is-positive,
body.portal-history-page-body .cth-trade-profit.is-positive {
  color: var(--cth-profit) !important;
}

body.portal-history-page-body .cth-summary-card strong.is-negative,
body.portal-history-page-body .cth-trade-profit.is-negative {
  color: var(--cth-sell) !important;
}

body.portal-history-page-body .cth-summary-card strong.is-neutral,
body.portal-history-page-body .cth-trade-profit.is-neutral {
  color: var(--cth-muted) !important;
}

body.portal-history-page-body .cth-trade-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

body.portal-history-page-body .cth-trade-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(max-content, auto);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 12px;
  min-width: 0;
  padding: 12px 15px;
  border: 1px solid var(--cth-border);
  border-radius: 16px;
  background: var(--cth-card);
  box-shadow: 0 5px 18px rgba(11, 20, 38, 0.025);
}

body.portal-history-page-body .cth-trade-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

body.portal-history-page-body .cth-trade-symbol {
  overflow: hidden;
  min-width: 0;
  color: var(--cth-ink) !important;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 820;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-history-page-body .cth-trade-side {
  flex: 0 0 auto;
  min-width: 78px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 820;
  text-align: center;
  white-space: nowrap;
}

body.portal-history-page-body .cth-trade-side.is-buy {
  background: var(--cth-buy-bg);
  color: var(--cth-buy);
}

body.portal-history-page-body .cth-trade-side.is-sell {
  background: var(--cth-sell-bg);
  color: var(--cth-sell);
}

body.portal-history-page-body .cth-trade-profit {
  justify-self: end;
  color: var(--cth-ink);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

body.portal-history-page-body .cth-trade-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--cth-muted);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

body.portal-history-page-body .cth-trade-prices i {
  flex: 0 0 auto;
  color: #8A96AB;
  font-size: 13px;
}

body.portal-history-page-body .cth-trade-closed {
  justify-self: end;
  max-width: 100%;
  color: var(--cth-muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

body.portal-history-page-body .cth-empty {
  width: 100%;
  min-height: 110px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid var(--cth-border);
  border-radius: 16px;
  background: var(--cth-card);
  color: var(--cth-muted);
  font-size: 15px;
  text-align: center;
}

body.portal-history-page-body .cth-load-more {
  min-height: 42px;
  padding: 11px 28px;
  border-color: #BDE5F0 !important;
  background: var(--cth-card) !important;
  color: var(--cth-ink) !important;
}

@media (min-width: 768px) {
  body.portal-history-page-body .cth-page.manual-history-page {
    padding-top: 0;
  }

  body.portal-history-page-body .cth-trade-card {
    padding: 14px 18px;
  }

  body.portal-history-page-body .cth-trade-symbol {
    font-size: 17px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body.portal-history-page-body .portal-content {
    padding-top: 0 !important;
  }
}

@media (max-width: 767px) {
  body.portal-history-page-body .portal-content {
    padding-top: 24px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.portal-history-page-body .cth-page.manual-history-page {
    padding-top: 0;
  }

  body.portal-history-page-body .cth-heading-row {
    margin-bottom: 15px;
  }

  body.portal-history-page-body .cth-heading-row h1 {
    font-size: 34px;
  }
}

@media (max-width: 374px) {
  body.portal-history-page-body .portal-content {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  body.portal-history-page-body .cth-heading-row h1 {
    font-size: 30px;
  }

  body.portal-history-page-body .cth-symbol-filters {
    gap: 8px;
  }

  body.portal-history-page-body .cth-symbol-pill {
    min-height: 39px;
    padding-inline: 15px;
    font-size: 14px;
  }

  body.portal-history-page-body .cth-date-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px;
    gap: 7px;
  }

  body.portal-history-page-body .cth-date-field {
    min-height: 58px;
    gap: 8px;
    padding: 8px 9px;
  }

  body.portal-history-page-body .cth-date-field > i {
    font-size: 17px;
  }

  body.portal-history-page-body .cth-date-copy strong {
    font-size: 12px;
  }

  body.portal-history-page-body .cth-filter-submit {
    width: 46px;
    min-width: 46px;
    font-size: 19px;
  }

  body.portal-history-page-body .cth-summary {
    gap: 6px;
  }

  body.portal-history-page-body .cth-summary-card {
    min-height: 66px;
    padding: 4px;
  }

  body.portal-history-page-body .cth-summary-card span {
    font-size: 11px;
  }

  body.portal-history-page-body .cth-summary-card strong {
    font-size: 17px;
  }

  body.portal-history-page-body .cth-trade-card {
    gap: 5px 7px;
    padding: 11px 10px;
  }

  body.portal-history-page-body .cth-trade-identity {
    gap: 6px;
  }

  body.portal-history-page-body .cth-trade-symbol {
    font-size: 14px;
  }

  body.portal-history-page-body .cth-trade-side {
    min-width: 70px;
    padding: 5px 6px;
    font-size: 10px;
  }

  body.portal-history-page-body .cth-trade-profit {
    font-size: 15px;
  }

  body.portal-history-page-body .cth-trade-prices {
    gap: 5px;
    font-size: 11px;
  }

  body.portal-history-page-body .cth-trade-closed {
    font-size: 9.5px;
  }
}

@media (prefers-color-scheme: dark) {
  body.portal-history-page-body {
    --cth-ink: #F8FAFC;
    --cth-muted: #A7B0BE;
    --cth-cyan: #18C9ED;
    --cth-buy: #37D1F1;
    --cth-buy-bg: rgba(0, 184, 230, 0.13);
    --cth-sell: #FF5A70;
    --cth-sell-bg: rgba(255, 36, 69, 0.13);
    --cth-profit: #18D991;
    --cth-border: rgba(148, 163, 184, 0.22);
    --cth-card: rgba(7, 14, 22, 0.92);
    --cth-surface: #030508;
  }

  body.portal-history-page-body .cth-symbol-pill,
  body.portal-history-page-body .cth-date-field,
  body.portal-history-page-body .cth-filter-submit,
  body.portal-history-page-body .cth-trade-card,
  body.portal-history-page-body .cth-empty,
  body.portal-history-page-body .cth-load-more {
    background: var(--cth-card) !important;
    border-color: var(--cth-border) !important;
    box-shadow: none !important;
  }

  body.portal-history-page-body .cth-symbol-pill.is-active,
  body.portal-history-page-body .cth-symbol-pill[aria-selected="true"] {
    background: rgba(0, 184, 230, 0.14) !important;
    border-color: var(--cth-cyan) !important;
  }

  body.portal-history-page-body .cth-summary-trades {
    background: rgba(0, 184, 230, 0.11) !important;
  }

  body.portal-history-page-body .cth-summary-profit {
    background: rgba(0, 190, 120, 0.10) !important;
  }

  body.portal-history-page-body .cth-summary-winrate {
    background: rgba(148, 163, 184, 0.09) !important;
  }

  body.portal-history-page-body .cth-summary-card {
    border-color: var(--cth-border) !important;
  }
}

/* Open trades reuses the history card scale; management controls expand on tap. */
body.portal-open-trades-page-body .cth-open-trade-shell {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.portal-open-trades-page-body .cth-open-trade-shell > summary {
  list-style: none;
  cursor: pointer;
}

body.portal-open-trades-page-body .cth-open-trade-shell > summary::-webkit-details-marker {
  display: none;
}

body.portal-open-trades-page-body .cth-open-trade-shell > summary::marker {
  content: "";
}

body.portal-open-trades-page-body .cth-open-trade-shell > summary:focus-visible {
  outline: 3px solid rgba(0, 184, 230, 0.22);
  outline-offset: 2px;
}

body.portal-open-trades-page-body .cth-trade-card {
  grid-template-columns: minmax(140px, 1fr) minmax(max-content, auto);
}

body.portal-open-trades-page-body .cth-trade-identity {
  overflow: visible;
}

body.portal-open-trades-page-body .cth-trade-symbol {
  flex: 0 0 auto;
  overflow: visible;
  min-width: max-content;
  text-overflow: clip;
}

body.portal-open-trades-page-body .cth-open-trade-management {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--cth-border);
  border-radius: 12px;
  background: var(--cth-card);
}

body.portal-open-trades-page-body .cth-open-trade-protection {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--cth-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body.portal-open-trades-page-body .cth-open-trade-protection .sl {
  color: var(--cth-sell);
}

body.portal-open-trades-page-body .cth-open-trade-protection .tp {
  color: var(--cth-buy);
}

body.portal-open-trades-page-body .cth-open-trade-management .web-trade-row-actions {
  margin-left: auto;
}

@media (max-width: 374px) {
  body.portal-open-trades-page-body .cth-trade-card {
    grid-template-columns: minmax(132px, 1fr) minmax(max-content, auto);
  }

  body.portal-open-trades-page-body .cth-open-trade-management {
    gap: 7px;
    margin-inline: 4px;
    padding: 7px 8px;
  }

  body.portal-open-trades-page-body .cth-open-trade-protection {
    gap: 7px;
    font-size: 10px;
  }
}

@media (prefers-color-scheme: dark) {
  body.portal-open-trades-page-body .cth-open-trade-management {
    border-color: var(--cth-border);
    background: var(--cth-card);
  }
}
