.dm-auto-sell-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(71, 161, 255, 0.34);
  background:
    radial-gradient(
      circle at top right,
      rgba(0, 202, 255, 0.10),
      transparent 42%
    ),
    var(
      --card-bg,
      rgba(7, 18, 44, 0.96)
    );
}

.dm-auto-sell-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(83, 216, 255, 0.82),
      rgba(88, 113, 255, 0.68),
      transparent
    );
  content: "";
}

.dm-auto-sell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dm-auto-sell-kicker {
  margin-bottom: 5px;
  color: #53d8ff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dm-auto-sell-title {
  color: #ffffff;
}

.dm-auto-sell-live {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(83, 240, 167, 0.25);
  border-radius: 999px;
  background: rgba(16, 79, 58, 0.22);
  color: #6ff2b4;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dm-auto-sell-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #53f0a7;
  box-shadow:
    0 0 11px rgba(83, 240, 167, 0.78);
}

.dm-auto-sell-summary-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 2fr)
    repeat(3, minmax(120px, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.dm-auto-sell-summary,
.dm-auto-sell-latest,
.dm-auto-sell-detail {
  border: 1px solid rgba(91, 137, 218, 0.18);
  background: rgba(4, 14, 38, 0.67);
}

.dm-auto-sell-summary {
  min-width: 0;
  padding: 14px;
  border-radius: 13px;
}

.dm-auto-sell-label {
  margin-bottom: 7px;
  color: rgba(167, 186, 229, 0.78);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.dm-auto-sell-metric {
  color: #ffffff;
  font-size: 1.14rem;
  font-weight: 900;
  line-height: 1.3;
}

.dm-auto-sell-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #ffd36a;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.dm-auto-sell-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 999px;
  background: #ffd36a;
  box-shadow:
    0 0 10px rgba(255, 211, 106, 0.6);
}

.dm-auto-sell-status.is-active {
  color: #65efad;
}

.dm-auto-sell-status.is-active
.dm-auto-sell-status-dot {
  background: #53f0a7;
  box-shadow:
    0 0 10px rgba(83, 240, 167, 0.7);
}

.dm-auto-sell-status.is-error {
  color: #ff9191;
}

.dm-auto-sell-status.is-error
.dm-auto-sell-status-dot {
  background: #ff7373;
  box-shadow:
    0 0 10px rgba(255, 115, 115, 0.7);
}

.dm-auto-sell-latest {
  padding: 15px;
  border-radius: 14px;
}

.dm-auto-sell-latest-title {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 900;
}

.dm-auto-sell-latest-message {
  margin-top: 4px;
  margin-bottom: 13px;
  color: rgba(174, 195, 236, 0.80);
  font-size: 0.80rem;
  font-weight: 650;
}

.dm-auto-sell-detail-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dm-auto-sell-detail {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
}

.dm-auto-sell-market,
.dm-auto-sell-reason {
  grid-column: span 2;
}

.dm-auto-sell-value {
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 0.91rem;
  font-weight: 800;
  line-height: 1.35;
}

.dm-auto-sell-positive {
  color: #53f0a7;
}

.dm-auto-sell-updated {
  margin-top: 10px;
  color: rgba(135, 158, 207, 0.64);
  font-size: 0.66rem;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 1050px) {
  .dm-auto-sell-summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .dm-auto-sell-status-summary {
    grid-column: span 2;
  }

  .dm-auto-sell-detail-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dm-auto-sell-header {
    align-items: center;
  }

  .dm-auto-sell-summary-grid,
  .dm-auto-sell-detail-grid {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .dm-auto-sell-status-summary,
  .dm-auto-sell-market,
  .dm-auto-sell-reason {
    grid-column: auto;
  }

  .dm-auto-sell-summary {
    min-height: auto;
  }

  .dm-auto-sell-live {
    padding: 6px 8px;
    font-size: 0.58rem;
  }

  .dm-auto-sell-updated {
    text-align: left;
  }
}

/* DREAMMAKER COMPLETED SELL JOURNAL V3 START */

.dm-sell-journal-section {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(105, 185, 255, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgba(8, 24, 48, 0.88),
      rgba(6, 17, 35, 0.94)
    );
}

.dm-sell-journal-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.dm-sell-journal-subtitle {
  margin-top: 4px;
  color: rgba(218, 232, 255, 0.62);
  font-size: 12px;
}

.dm-sell-journal-count-pill {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(91, 190, 255, 0.3);
  border-radius: 999px;
  color: #9fdcff;
  background: rgba(20, 103, 164, 0.14);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dm-sell-journal-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.dm-sell-journal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(108, 174, 255, 0.13);
  border-radius: 12px;
  background: rgba(5, 16, 34, 0.7);
}

.dm-sell-journal-main {
  min-width: 0;
  flex: 1 1 auto;
}

.dm-sell-journal-market {
  overflow: hidden;
  color: #edf6ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.dm-sell-journal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 7px;
  color: rgba(216, 231, 255, 0.66);
  font-size: 11px;
}

.dm-sell-side {
  color: #7ed8ff;
  font-weight: 800;
}

.dm-sell-journal-right {
  flex: 0 0 auto;
  text-align: right;
}

.dm-sell-journal-profit {
  font-size: 13px;
  font-weight: 800;
}

.dm-sell-journal-profit.is-positive {
  color: #75f0b2;
}

.dm-sell-journal-profit.is-negative {
  color: #ff8b9a;
}

.dm-sell-journal-profit.is-pending {
  color: #ffcf70;
}

.dm-sell-journal-time {
  margin-top: 5px;
  color: rgba(216, 231, 255, 0.55);
  font-size: 10px;
  white-space: nowrap;
}

.dm-sell-journal-empty {
  padding: 22px;
  border: 1px dashed rgba(114, 182, 255, 0.18);
  border-radius: 12px;
  color: rgba(220, 234, 255, 0.62);
  text-align: center;
  font-size: 12px;
}

.dm-sell-journal-empty.is-error {
  color: #ff9aa8;
}

@media (max-width: 700px) {
  .dm-sell-journal-heading-row,
  .dm-sell-journal-row {
    align-items: flex-start;
  }

  .dm-sell-journal-row {
    flex-direction: column;
  }

  .dm-sell-journal-right {
    width: 100%;
    text-align: left;
  }

  .dm-sell-journal-time {
    white-space: normal;
  }
}

/* DREAMMAKER COMPLETED SELL JOURNAL V3 END */

/* DREAMMAKER COMPLETED SELL JOURNAL V3.1 VISIBILITY START */

#dreammaker-auto-sell-card,
#dreammaker-auto-sell-card .card-inner {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#dreammaker-auto-sell-card {
  align-self: stretch;
}

#dreammaker-auto-sell-card .dm-auto-sell-latest {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#dreammaker-auto-sell-card .dm-sell-journal-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 120px;
  max-height: none !important;
  overflow: visible !important;
}

#dreammaker-auto-sell-card .dm-sell-journal-list {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  height: auto !important;
  min-height: 60px;
  max-height: 620px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#dreammaker-auto-sell-card
.dm-auto-sell-detail-grid {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#dreammaker-auto-sell-card
.dm-auto-sell-value {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 700px) {
  #dreammaker-auto-sell-card {
    width: 100%;
    min-width: 0;
  }

  #dreammaker-auto-sell-card
  .card-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  #dreammaker-auto-sell-card
  .dm-sell-journal-section {
    padding: 14px;
  }

  #dreammaker-auto-sell-card
  .dm-sell-journal-list {
    max-height: 720px !important;
  }

  #dreammaker-auto-sell-card
  .dm-sell-journal-market {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* DREAMMAKER COMPLETED SELL JOURNAL V3.1 VISIBILITY END */

/* DREAMMAKER JOURNAL V4 LAYOUT START */

#dreammaker-auto-sell-card,
#dreammaker-auto-sell-card *,
#dreammaker-auto-sell-card *::before,
#dreammaker-auto-sell-card *::after {
  box-sizing: border-box;
}

#dreammaker-auto-sell-card,
#dreammaker-auto-sell-card .card-inner {
  width: 100%;
  min-width: 0;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#dreammaker-auto-sell-card
.dm-auto-sell-summary-grid {
  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100%;
}

#dreammaker-auto-sell-card
.dm-auto-sell-status-summary {
  grid-column:
    1 / -1 !important;
}

#dreammaker-auto-sell-card
.dm-auto-sell-summary {
  width: 100%;
  min-width: 0 !important;
  height: auto !important;
  min-height: 128px;
  overflow: hidden;
}

#dreammaker-auto-sell-card
.dm-auto-sell-status {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#dreammaker-auto-sell-card
.dm-auto-sell-metric {
  max-width: 100%;
  font-size:
    clamp(
      1.25rem,
      3.2vw,
      2rem
    ) !important;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: normal;
}

#dreammaker-auto-sell-card
.dm-auto-sell-detail-grid {
  display: grid !important;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    ) !important;
  gap: 12px !important;
  width: 100%;
}

#dreammaker-auto-sell-card
.dm-auto-sell-market,
#dreammaker-auto-sell-card
.dm-auto-sell-reason {
  grid-column:
    span 2;
}

#dreammaker-auto-sell-card
.dm-auto-sell-detail,
#dreammaker-auto-sell-card
.dm-auto-sell-value {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#dreammaker-auto-sell-card
.dm-sell-journal-section {
  display: block !important;
  width: 100%;
  min-width: 0;
  height: auto !important;
  overflow: visible !important;
}

#dreammaker-auto-sell-card
.dm-sell-journal-list {
  display: grid !important;
  width: 100%;
  min-width: 0;
  max-height: 620px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#dreammaker-auto-sell-card
.dm-sell-journal-row {
  width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  #dreammaker-auto-sell-card
  .dm-auto-sell-detail-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;
  }

  #dreammaker-auto-sell-card
  .dm-auto-sell-market,
  #dreammaker-auto-sell-card
  .dm-auto-sell-reason {
    grid-column:
      1 / -1;
  }
}

@media (max-width: 680px) {
  #dreammaker-auto-sell-card
  .dm-auto-sell-summary-grid,
  #dreammaker-auto-sell-card
  .dm-auto-sell-detail-grid {
    grid-template-columns:
      minmax(
        0,
        1fr
      ) !important;
  }

  #dreammaker-auto-sell-card
  .dm-auto-sell-status-summary,
  #dreammaker-auto-sell-card
  .dm-auto-sell-market,
  #dreammaker-auto-sell-card
  .dm-auto-sell-reason {
    grid-column:
      auto !important;
  }

  #dreammaker-auto-sell-card
  .dm-auto-sell-summary {
    min-height: 112px;
  }

  #dreammaker-auto-sell-card
  .dm-auto-sell-header {
    align-items:
      flex-start;
  }

  #dreammaker-auto-sell-card
  .dm-auto-sell-live {
    flex:
      0 0 auto;
  }

  #dreammaker-auto-sell-card
  .dm-sell-journal-row {
    display: flex;
    flex-direction: column;
    align-items:
      flex-start;
  }

  #dreammaker-auto-sell-card
  .dm-sell-journal-right {
    width: 100%;
    text-align: left;
  }
}

/* DREAMMAKER JOURNAL V4 LAYOUT END */
