.portal-module-body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(1200px 460px at 8% -10%, rgba(39, 198, 96, 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(39, 198, 96, 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(39, 198, 96, 0.25);
  background: linear-gradient(180deg, #f7fff9 0%, #ecfdf3 100%);
  color: #0f5132;
  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: #27c660;
  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: #ecfdf3; border-color: #a7f3c0; color: #166534; }
.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: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.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(39,198,96,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(39,198,96,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(39,198,96,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: #27c660;
  --hy-buy: #10b981;
  --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: #16a34a !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(39, 198, 96, 0.65);
  background: rgba(39, 198, 96, 0.07);
  border-radius: 999px;
  padding: 8px 22px;
}

.web-trade-real-pill span {
  border-radius: 999px;
  padding: 8px 18px;
  background: rgba(39, 198, 96, 0.14);
  color: #15803d;
  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-trade-open-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 198, 96, .13);
  text-decoration: none;
  flex: 0 0 auto;
}

.web-trade-open-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(55%) sepia(98%) saturate(453%) hue-rotate(88deg) brightness(91%) contrast(91%);
}

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

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

.web-trade-open-link {
  border: 1px solid rgba(39, 198, 96, .55);
  background: #f0fbf4;
  color: #0b1220;
  border-radius: 999px;
  padding: 10px 18px;
  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 #bfd6cc !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(39, 198, 96, .8) !important;
  background: rgba(39, 198, 96, .12) !important;
  color: #0b1220 !important;
}

.web-trade-search-btn {
  width: 40px;
  padding: 0;
  color: #16a34a !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: #11a463 !important;
  background: rgba(16, 185, 129, .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: not-allowed;
}

.web-trade-lot-input {
  width: 100%;
  border: 2px solid #cfe4db;
  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-market-status {
  min-height: 20px;
  margin: -4px 0 12px;
  color: #7a8a9b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.web-trade-market-status.blocked {
  color: #ff6b7a;
}

.web-trade-market-status.ready {
  color: #28C660;
}

.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(39, 198, 96, 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(68vh, 720px);
  min-height: 520px;
  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(39, 198, 96, .22);
  border-top-color: #27c660;
  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 #67ea78;
  background: #f6fbf9;
  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: #10b981;
}

.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(103, 234, 120, .9);
  background: #f6fbf9;
  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 #dce6e2;
}

.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 #dbe7e0 !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: #27c660 !important;
  background: #e8f8ee !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: #27c660 !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: #27C660 !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: #7ff889;
    background: #FFFFFF;
  }
  .web-trade-real-pill span {
    padding: 4px 10px;
    background: #E7F7EE;
    color: #15803D;
    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-icon {
    width: 40px;
    height: 40px;
  }
  .web-trade-open-icon img {
    width: 22px;
    height: 22px;
  }
  .web-trade-open-link {
    padding: 9px 12px;
    font-size: 13px;
  }
  .web-trade-symbol-scroll button {
    height: 34px;
    padding: 0 13px;
    border-width: 1px !important;
    border-color: #D8EFE4 !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: #D8EFE4 !important;
    background: #FFFFFF !important;
    font-size: 14px;
  }
  .web-trade-symbol-scroll button.active {
    border-color: #7ff889 !important;
    background: #E5F7F2 !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: #27C660 !important;
    background: #E5F7F2 !important;
  }
  .web-trade-order-btn.sell {
    color: #FC003E !important;
    background: #FFECEE !important;
  }
  .web-trade-lot-input {
    border-width: 1px;
    border-color: #E5F7F2;
    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: #1687ff;
    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: 520px;
    height: calc(100vh - 260px);
  }
  .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(39, 198, 96, 0.22), transparent 58%),
      radial-gradient(620px 360px at 16% 4%, rgba(22, 163, 74, 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(39, 198, 96, 0.58) !important;
    color: #f8fafc;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }

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

  .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(39, 198, 96, 0.44) !important;
    color: #f8fafc !important;
  }

  .web-trade-real-pill {
    border-color: rgba(39, 198, 96, 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(39, 198, 96, 0.16) !important;
    border-color: #27c660 !important;
    color: #27c660 !important;
  }

  .web-trade-open-icon {
    background: rgba(39, 198, 96, 0.14);
    border: 1px solid rgba(39, 198, 96, 0.26);
  }

  .web-trade-order-btn.buy {
    background: rgba(16, 185, 129, .18) !important;
    color: #27c660 !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,
  .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;
  }
}
