/* GRAM-X soft gray theme.
   Keep this file small and last-loaded. Do not override the hero podium/top-products block. */

body[data-theme="dim"] {
  color-scheme: light;
  --bg: #e8edf3;
  --bg-2: #dfe6ee;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --surface-2: #f5f7fa;
  --surface-3: #eaf0f6;
  --line: rgba(126, 140, 155, 0.28);
  --line-strong: rgba(85, 99, 115, 0.36);
  --text: #141a22;
  --muted: #677280;
  --muted-2: #96a0ac;
  --green: #17b66a;
  --purple: #0f9f5f;
  --purple-2: #087a49;
  --cyan: #0f9f5f;
  --brand-grad: linear-gradient(135deg, #0f9f5f, #26c978);
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.1);
  --topbar-bg: rgba(248, 250, 252, 0.9);
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 255, 255, 0.9), transparent 330px),
    radial-gradient(circle at 88% 8%, rgba(21, 128, 61, 0.08), transparent 360px),
    linear-gradient(180deg, #f3f5f8 0%, #e8edf3 54%, #dfe6ee 100%) !important;
  color: var(--text) !important;
}

/* UI hotfix 2026-06-18: full-screen chat, cleaner theme, visible service icons. */
:root {
  --bg: #f3f6f8;
  --bg-2: #e8eef2;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --surface-2: #f7fafb;
  --surface-3: #eef3f6;
  --line: rgba(39, 56, 72, 0.12);
  --line-strong: rgba(39, 56, 72, 0.22);
  --text: #111827;
  --muted: #607080;
  --muted-2: #8a98a6;
  --green: #10b981;
  --cyan: #0ea5e9;
  --pink: #f97316;
  --shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --brand-grad: linear-gradient(135deg, #16c784, #0ea5e9);
}

body[data-theme="dim"] {
  --bg: #071014 !important;
  --bg-2: #0b171c !important;
  --surface: #101b21 !important;
  --surface-rgb: 16, 27, 33 !important;
  --surface-2: #15232b !important;
  --surface-3: #1d3039 !important;
  --line: rgba(148, 163, 184, 0.16) !important;
  --line-strong: rgba(148, 163, 184, 0.3) !important;
  --text: #f4f8fb !important;
  --muted: #9eb0bd !important;
  --muted-2: #718492 !important;
  --green: #29d391 !important;
  --cyan: #38bdf8 !important;
  --pink: #fb923c !important;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42) !important;
  --topbar-bg: rgba(10, 18, 23, 0.9) !important;
  --brand-grad: linear-gradient(135deg, #29d391, #38bdf8) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.08), transparent 30vw),
    radial-gradient(circle at 90% 8%, rgba(41, 211, 145, 0.08), transparent 28vw),
    var(--bg) !important;
}

body:not([data-theme="dim"]) {
  background:
    radial-gradient(circle at 8% 0%, rgba(14, 165, 233, 0.1), transparent 34vw),
    radial-gradient(circle at 92% 2%, rgba(16, 185, 129, 0.1), transparent 32vw),
    var(--bg) !important;
}

body:not([data-theme="dim"]) .topbar,
body:not([data-theme="dim"]) .bottom-dock {
  background: rgba(255, 255, 255, 0.88) !important;
}

.market-header {
  min-height: 390px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 16% 18%, rgba(56, 189, 248, 0.24), transparent 260px),
    radial-gradient(circle at 86% 22%, rgba(16, 185, 129, 0.22), transparent 260px),
    linear-gradient(135deg, #0c1720 0%, #10242a 48%, #081116 100%) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28) !important;
}

body:not([data-theme="dim"]) .market-header {
  background:
    radial-gradient(circle at 14% 16%, rgba(14, 165, 233, 0.18), transparent 270px),
    radial-gradient(circle at 86% 22%, rgba(16, 185, 129, 0.2), transparent 270px),
    linear-gradient(135deg, #ffffff 0%, #eef7f6 55%, #e9f1f7 100%) !important;
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.1) !important;
}

.market-header h1 {
  letter-spacing: 0 !important;
}

.market-header h1 span {
  color: #f8fbff !important;
}

.market-header .subline {
  color: rgba(226, 232, 240, 0.86) !important;
}

body:not([data-theme="dim"]) .market-header h1 span {
  color: #12202a !important;
}

body:not([data-theme="dim"]) .market-header .subline {
  color: #536574 !important;
}

/* Absolute EOF polish pass. */
body[data-active-view="support"] .dx-message-top-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-active-view="support"] .dx-message-top-tabs button {
  height: 36px !important;
  padding: 0 10px !important;
  justify-content: flex-start !important;
  font-size: 12px !important;
}

.guest-register-btn {
  min-width: 120px !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .guest-register-btn {
    min-width: 0 !important;
  }
}

body[data-theme="dim"][data-active-view="support"] .dx-message-top-tabs button,
body[data-theme="dim"][data-active-view="support"] .dx-message-subtabs button {
  background: #15232b !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #a8bac8 !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-message-top-tabs button.active,
body[data-theme="dim"][data-active-view="support"] .dx-message-subtabs button.active {
  background: rgba(41, 211, 145, 0.16) !important;
  border-color: rgba(41, 211, 145, 0.46) !important;
  color: #29d391 !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-message-top-tabs button,
body[data-theme="dim"][data-active-view="support"] .dx-message-subtabs button {
  background: #15232b !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #a8bac8 !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-message-top-tabs button.active,
body[data-theme="dim"][data-active-view="support"] .dx-message-subtabs button.active {
  background: rgba(41, 211, 145, 0.16) !important;
  border-color: rgba(41, 211, 145, 0.46) !important;
  color: #29d391 !important;
}

/* Absolute EOF polish pass. */
body[data-active-view="support"] .dx-message-top-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-active-view="support"] .dx-message-top-tabs button {
  height: 36px !important;
  padding: 0 10px !important;
  justify-content: flex-start !important;
  font-size: 12px !important;
}

.guest-register-btn {
  min-width: 120px !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .guest-register-btn {
    min-width: 0 !important;
  }
}

/* Navigation polish: consistent controls, less visual noise. */
.topbar {
  min-height: 66px !important;
  gap: 14px !important;
}

.brand-mark,
body[data-theme="dim"] .brand-mark {
  width: 40px !important;
  height: 40px !important;
  border-radius: 11px !important;
  background: var(--brand-grad) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.online-badge {
  min-width: 92px !important;
  height: 30px !important;
  justify-content: center !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
  overflow: hidden !important;
}

.command-search {
  height: 40px !important;
  border-radius: 14px !important;
  background: var(--surface-2) !important;
  border-color: var(--line-strong) !important;
  box-shadow: none !important;
}

.command-search input {
  height: 38px !important;
  font-size: 14px !important;
}

.command-search span,
.command-search kbd {
  color: var(--muted) !important;
}

.icon-nav-link,
.nav-link,
.icon-button,
.profile-pill,
.guest-login-btn,
.guest-register-btn {
  transform: none !important;
  box-shadow: none !important;
}

.icon-nav-link,
.nav-link {
  min-height: 40px !important;
  border-radius: 12px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: var(--muted) !important;
}

.icon-nav-link span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: var(--surface-2) !important;
  color: var(--green) !important;
}

.icon-nav-link.active,
.nav-link.active {
  background: color-mix(in srgb, var(--green) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--green) 36%, transparent) !important;
  color: var(--text) !important;
}

.icon-nav-link.active span,
body[data-theme="dim"] .icon-nav-link.active span {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
}

.top-actions {
  gap: 8px !important;
}

.icon-button,
.top-action-icon,
#themeToggle {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 13px !important;
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  font-size: 16px !important;
}

.profile-pill {
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  padding: 0 12px !important;
}

.profile-pill-avatar,
.profile-pill .profile-pill-avatar,
body[data-theme="dim"] .profile-pill span {
  width: 30px !important;
  height: 30px !important;
  color: #ffffff !important;
}

.guest-login-btn,
.guest-register-btn {
  min-height: 40px !important;
  border-radius: 13px !important;
  padding: 0 16px !important;
}

.guest-register-btn {
  background: var(--brand-grad) !important;
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover,
  .icon-button:hover,
  .top-action-icon:hover,
  .icon-nav-link:hover,
  .nav-link:hover,
  .profile-pill:hover,
  .guest-login-btn:hover,
  .guest-register-btn:hover,
  .command-search:hover {
    transform: none !important;
  }
}

body[data-active-view="support"] .dx-message-top-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 10px !important;
}

body[data-active-view="support"] .dx-message-top-tabs button {
  min-width: 0 !important;
  height: 34px !important;
  padding: 0 8px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  justify-content: center !important;
  gap: 5px !important;
  font-size: 12px !important;
  color: var(--muted) !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
}

body[data-active-view="support"] .dx-message-top-tabs button.active {
  color: var(--text) !important;
  background: rgba(41, 211, 145, 0.14) !important;
  border-color: rgba(41, 211, 145, 0.32) !important;
}

body[data-active-view="support"] .dx-message-subtabs {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  padding: 10px !important;
}

body[data-active-view="support"] .dx-message-subtabs button {
  min-width: 0 !important;
  height: 42px !important;
  border-radius: 11px !important;
  overflow: hidden !important;
  justify-content: center !important;
  white-space: nowrap !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  color: var(--muted) !important;
}

body[data-active-view="support"] .dx-message-subtabs button.active {
  color: var(--text) !important;
  background: rgba(41, 211, 145, 0.14) !important;
  border-color: rgba(41, 211, 145, 0.32) !important;
}

@media (max-width: 1180px) {
  .online-badge {
    min-width: 34px !important;
    width: 34px !important;
    padding: 0 !important;
  }

  .online-word {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .topbar {
    min-height: 62px !important;
    padding: 10px 16px !important;
  }

  .online-badge {
    margin-left: 0 !important;
  }

  .command-search {
    height: 44px !important;
    border-radius: 15px !important;
  }

  .mobile-search-bar {
    border-radius: 16px !important;
    background: var(--surface-2) !important;
    border: 1px solid var(--line-strong) !important;
  }
}

@media (max-width: 520px) {
  .topbar .icon-button,
  .topbar .top-action-icon,
  .topbar #themeToggle,
  .topbar .profile-pill {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .profile-pill b,
  .notify-wrap + #themeToggle {
    display: none !important;
  }
}

.eyebrow,
.hero-feature-row span {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #bfffe3 !important;
}

body:not([data-theme="dim"]) .eyebrow,
body:not([data-theme="dim"]) .hero-feature-row span {
  background: rgba(255, 255, 255, 0.72) !important;
  color: #087f5b !important;
}

.bg-app-icons {
  pointer-events: none !important;
}

.bg-icon-item {
  width: 58px !important;
  height: 58px !important;
  border-radius: 18px !important;
  opacity: 0.82 !important;
  filter: none !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16) !important;
  backdrop-filter: blur(10px);
}

.bg-icon-item img {
  width: 34px !important;
  height: 34px !important;
}

.bg-icon-item:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.26) !important;
}

body:not([data-theme="dim"]) .bg-icon-item {
  opacity: 0.74 !important;
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(39, 56, 72, 0.12) !important;
}

.bg-icon-item.icon-tg { top: 7% !important; left: 4% !important; }
.bg-icon-item.icon-steam { top: 14% !important; right: 7% !important; }
.bg-icon-item.icon-roblox { bottom: 11% !important; left: 6% !important; }
.bg-icon-item.icon-discord { top: 56% !important; left: 3% !important; }
.bg-icon-item.icon-tiktok { top: 8% !important; right: 24% !important; }
.bg-icon-item.icon-insta { bottom: 8% !important; right: 32% !important; }

.hero-right-content {
  background: rgba(9, 18, 24, 0.74) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26) !important;
}

body:not([data-theme="dim"]) .hero-right-content {
  background: rgba(255, 255, 255, 0.76) !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12) !important;
}

body:not([data-theme="dim"]) .hero-podium-title,
body:not([data-theme="dim"]) .podium-prod-title {
  color: var(--text) !important;
  text-shadow: none !important;
}

.service-choice,
.mobile-service-tile,
.chip,
.segmented {
  border-color: var(--line) !important;
}

.service-choice.active,
.mobile-service-tile.active,
.chip.active,
.segmented.active,
body[data-theme="dim"] .service-choice.active,
body[data-theme="dim"] .mobile-service-tile.active,
body[data-theme="dim"] .chip.active,
body[data-theme="dim"] .segmented.active {
  background: color-mix(in srgb, var(--green) 18%, var(--surface)) !important;
  border-color: color-mix(in srgb, var(--green) 48%, var(--line)) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

.service-choice img,
.mobile-service-tile img,
.product-category-row img,
.popular-chip img,
.market-category img {
  filter: none !important;
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body[data-theme="dim"] img[src*="steam.svg"],
body[data-theme="dim"] img[src*="tiktok.svg"] {
  filter: none !important;
}

.product-seller-ava,
.product-seller-ava img,
.seller-avatar,
.seller-profile-modal-avatar,
.dx-message-avatar,
.dx-bubble-avatar,
.profile-pill-avatar,
.avatar,
.side-profile .avatar {
  border-radius: 50% !important;
}

.product-card,
.panel,
.sidebar,
.toolbar,
.stats-bar,
.stat-item,
.side-profile,
.range-card,
.seller-card {
  border-color: var(--line) !important;
  box-shadow: var(--shadow) !important;
}

@media (min-width: 901px) {
  body[data-active-view="support"] main {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100dvh - 62px) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-active-view="support"] .chat-page-view.active {
    display: block !important;
    height: calc(100dvh - 62px) !important;
  }

  body[data-active-view="support"] .dx-chat-layout {
    width: 100% !important;
    max-width: none !important;
    height: calc(100dvh - 62px) !important;
    min-height: calc(100dvh - 62px) !important;
    display: grid !important;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body[data-active-view="support"] .dx-chat-sidebar,
  body[data-active-view="support"] .dx-chat-main {
    height: 100% !important;
    min-height: 0 !important;
  }

  body[data-active-view="support"] .dx-message-list,
  body[data-active-view="support"] .dx-chat-messages {
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

body[data-active-view="support"] .dx-chat-layout,
body[data-active-view="support"] .dx-chat-sidebar,
body[data-active-view="support"] .dx-chat-head,
body[data-active-view="support"] .dx-chat-input-area {
  background: var(--surface) !important;
}

body[data-active-view="support"] .dx-chat-main,
body[data-active-view="support"] .dx-chat-messages,
body[data-active-view="support"] .dx-message-list {
  background:
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--cyan) 10%, transparent), transparent 360px),
    var(--surface-2) !important;
}

body[data-active-view="support"] .dx-bubble-other,
body[data-active-view="support"] .dx-bubble {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

body[data-active-view="support"] .dx-bubble-own {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
}

body[data-active-view="support"] .dx-message-top-tabs,
body[data-active-view="support"] .dx-message-subtabs {
  background: var(--surface) !important;
}

@media (max-width: 900px) {
  .market-header {
    min-height: 420px !important;
    border-radius: 18px !important;
  }

  .mobile-services-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 10px;
  }

  .mobile-service-tile {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
  }

  .mobile-service-tile .tile-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-2);
  }

  .mobile-service-tile .tile-icon img {
    width: 26px;
    height: 26px;
  }

  .mobile-service-tile strong,
  .mobile-service-tile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-view="support"] main {
    width: 100% !important;
    padding: 0 0 calc(76px + env(safe-area-inset-bottom)) !important;
  }

  body[data-active-view="support"] .chat-page-view.active {
    height: calc(100dvh - 62px - 76px - env(safe-area-inset-bottom)) !important;
  }

  body[data-active-view="support"] .dx-chat-layout {
    height: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }
}

@media (max-width: 520px) {
  .market-header h1 {
    font-size: 30px !important;
    line-height: 1.08 !important;
  }

  .market-header .subline {
    font-size: 14px !important;
  }

  .hero-feature-row {
    gap: 7px !important;
  }

  .hero-feature-row span {
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .mobile-services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

body[data-theme="dim"] .topbar {
  background: rgba(248, 250, 252, 0.9) !important;
  border-color: rgba(126, 140, 155, 0.28) !important;
  box-shadow: 0 10px 34px rgba(31, 41, 55, 0.08) !important;
}

body[data-theme="dim"] .brand,
body[data-theme="dim"] .brand strong,
body[data-theme="dim"] .brand-copy,
body[data-theme="dim"] .brand-copy strong {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body[data-theme="dim"] .brand small,
body[data-theme="dim"] .brand-copy small {
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted) !important;
}

body[data-theme="dim"] .brand-mark,
body[data-theme="dim"] .auth-logo-mark,
body[data-theme="dim"] .profile-pill-avatar,
body[data-theme="dim"] .avatar,
body[data-theme="dim"] .seller-avatar,
body[data-theme="dim"] .seller-profile-modal-avatar,
body[data-theme="dim"] .side-profile .avatar,
body[data-theme="dim"] .stat-icon,
body[data-theme="dim"] .timeline span,
body[data-theme="dim"] .category-cards span {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
  border-color: rgba(15, 159, 95, 0.35) !important;
  box-shadow: 0 12px 28px rgba(15, 159, 95, 0.18) !important;
}

body[data-theme="dim"] .command-search,
body[data-theme="dim"] .mobile-search-bar,
body[data-theme="dim"] .icon-button,
body[data-theme="dim"] .profile-pill,
body[data-theme="dim"] .nav-link,
body[data-theme="dim"] .chip,
body[data-theme="dim"] .segmented,
body[data-theme="dim"] .popular-chip,
body[data-theme="dim"] .market-category,
body[data-theme="dim"] .mobile-service-tile,
body[data-theme="dim"] .category-cards button,
body[data-theme="dim"] .payment-methods button,
body[data-theme="dim"] .service-choice,
body[data-theme="dim"] .rail-actions button,
body[data-theme="dim"] input,
body[data-theme="dim"] select,
body[data-theme="dim"] textarea {
  background: rgba(248, 250, 252, 0.88) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

body[data-theme="dim"] input::placeholder,
body[data-theme="dim"] textarea::placeholder {
  color: var(--muted-2) !important;
}

body[data-theme="dim"] .market-header {
  background:
    radial-gradient(circle at 82% 16%, rgba(34, 197, 94, 0.18), transparent 310px),
    radial-gradient(circle at 8% 92%, rgba(15, 23, 42, 0.08), transparent 280px),
    linear-gradient(135deg, #ffffff 0%, #f3f6f9 54%, #e5ebf2 100%) !important;
  border-color: rgba(126, 140, 155, 0.3) !important;
  box-shadow: 0 24px 70px rgba(31, 41, 55, 0.12) !important;
}

body[data-theme="dim"] .market-header::before,
body[data-theme="dim"] .market-header::after {
  display: none !important;
}

body[data-theme="dim"] .market-header h1,
body[data-theme="dim"] .market-header h1 span,
body[data-theme="dim"] .product-title,
body[data-theme="dim"] .panel h2,
body[data-theme="dim"] .seller-hero h2,
body[data-theme="dim"] .section-head h2,
body[data-theme="dim"] .price-line strong,
body[data-theme="dim"] .card-stats b {
  color: var(--text) !important;
}

body[data-theme="dim"] .subline,
body[data-theme="dim"] .panel p,
body[data-theme="dim"] .product-meta,
body[data-theme="dim"] label,
body[data-theme="dim"] .toolbar span,
body[data-theme="dim"] .side-profile span,
body[data-theme="dim"] .stat-item small {
  color: var(--muted) !important;
}

body[data-theme="dim"] .eyebrow,
body[data-theme="dim"] .hero-feature-row span,
body[data-theme="dim"] .live-pill,
body[data-theme="dim"] .online-badge,
body[data-theme="dim"] .badge.green,
body[data-theme="dim"] .product-art .badge,
body[data-theme="dim"] .product-card .quality-list span {
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.3) !important;
}

body[data-theme="dim"] .instant-delivery-banner,
body[data-theme="dim"] .product-card,
body[data-theme="dim"] .panel,
body[data-theme="dim"] .sidebar,
body[data-theme="dim"] .toolbar,
body[data-theme="dim"] .side-profile,
body[data-theme="dim"] .range-card,
body[data-theme="dim"] .seller-card,
body[data-theme="dim"] .rail-card,
body[data-theme="dim"] .drawer-panel,
body[data-theme="dim"] .notify-popover,
body[data-theme="dim"] .auth-panel,
body[data-theme="dim"] .profile-panel,
body[data-theme="dim"] .deal-card,
body[data-theme="dim"] .reviews-box,
body[data-theme="dim"] .similar-box,
body[data-theme="dim"] .seller-detail,
body[data-theme="dim"] .favorite-list {
  background: rgba(255, 255, 255, 0.86) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.28) !important;
  box-shadow: 0 16px 42px rgba(31, 41, 55, 0.09) !important;
}

body[data-theme="dim"] .product-art,
body[data-theme="dim"] .hero-microgrid div,
body[data-theme="dim"] .integration-list span,
body[data-theme="dim"] .spec-grid div,
body[data-theme="dim"] .mini-checks span,
body[data-theme="dim"] .payment-stack span,
body[data-theme="dim"] .quality-list span,
body[data-theme="dim"] .quantity-box,
body[data-theme="dim"] .notify-empty,
body[data-theme="dim"] .notify-row,
body[data-theme="dim"] .notify-row-item,
body[data-theme="dim"] .stat-item,
body[data-theme="dim"] .card-stats span {
  background: #f3f6f9 !important;
  border-color: rgba(126, 140, 155, 0.24) !important;
}

body[data-theme="dim"] .primary-button,
body[data-theme="dim"] .guest-register-btn,
body[data-theme="dim"] .product-buy-button,
body[data-theme="dim"] .auth-submit,
body[data-theme="dim"] .dock-main,
body[data-theme="dim"] .toolbar-controls .segmented.active,
body[data-theme="dim"] .payment-methods.compact button.active,
body[data-theme="dim"] .dipx-pay.active,
body[data-theme="dim"] .dipx-amount.active,
body[data-theme="dim"] .dx-bubble-own,
body[data-theme="dim"] .top-action-icon.active,
body[data-theme="dim"] .legal-nav-btn.active .legal-nav-icon {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
  border-color: rgba(22, 184, 105, 0.38) !important;
  box-shadow: 0 12px 28px rgba(22, 184, 105, 0.22) !important;
}

body[data-theme="dim"] .secondary-button,
body[data-theme="dim"] .guest-login-btn,
body[data-theme="dim"] .text-button,
body[data-theme="dim"] .google-auth-button {
  background: rgba(255, 255, 255, 0.82) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.34) !important;
  box-shadow: none !important;
}

body[data-theme="dim"] .market-actions .primary-button {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 16px 34px rgba(22, 184, 105, 0.24) !important;
}

body[data-theme="dim"] .market-actions .hero-sell-btn,
body[data-theme="dim"] .market-actions .secondary-button {
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.34) !important;
  box-shadow: none !important;
}

body[data-theme="dim"] .nav-link.active,
body[data-theme="dim"] .nav-link:hover,
body[data-theme="dim"] .dock-item.active,
body[data-theme="dim"] .chip.active,
body[data-theme="dim"] .quick-tabs .chip.active,
body[data-theme="dim"] .segmented.active,
body[data-theme="dim"] .market-category.active,
body[data-theme="dim"] .mobile-service-tile.active,
body[data-theme="dim"] .service-choice.active,
body[data-theme="dim"] .legal-nav-btn.active,
body[data-theme="dim"] .mf-chip.active {
  background: rgba(22, 184, 105, 0.11) !important;
  color: #087a49 !important;
  border-color: rgba(22, 184, 105, 0.28) !important;
  box-shadow: none !important;
}

body[data-theme="dim"] .icon-nav-link span {
  background: #ecfdf3 !important;
  color: #087a49 !important;
  border-color: #c7f8d8 !important;
  box-shadow: none !important;
}

body[data-theme="dim"] .icon-nav-link.active span {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
}

body[data-theme="dim"] .price-line strong,
body[data-theme="dim"] .seller-online,
body[data-theme="dim"] .verified,
body[data-theme="dim"] .dipx-plugin-price,
body[data-theme="dim"] .dipx-badge-progress,
body[data-theme="dim"] .legal-page__updated {
  color: #059669 !important;
}

body[data-theme="dim"] .seller-profile-tabs button,
body[data-theme="dim"] .seller-profile-tabs button.active {
  background: rgba(248, 250, 252, 0.86) !important;
  color: var(--text) !important;
  border: 1px solid rgba(126, 140, 155, 0.28) !important;
}

body[data-theme="dim"] .seller-profile-tabs button.active {
  background: rgba(22, 184, 105, 0.12) !important;
  color: #087a49 !important;
  border-color: rgba(22, 184, 105, 0.28) !important;
}

body[data-theme="dim"] .seller-profile-layout,
body[data-theme="dim"] .seller-profile-main,
body[data-theme="dim"] .seller-profile-panel {
  color: var(--text) !important;
}

body[data-theme="dim"] .nav-link.active::after,
body[data-theme="dim"] .product-card::after,
body[data-theme="dim"] .online-dot,
body[data-theme="dim"] .status-dot,
body[data-theme="dim"] .risk-meter span,
body[data-theme="dim"] .progress-fill {
  background: #17b66a !important;
  background-image: none !important;
  box-shadow: 0 0 12px rgba(22, 184, 105, 0.22) !important;
}

body[data-theme="dim"] input:focus,
body[data-theme="dim"] select:focus,
body[data-theme="dim"] textarea:focus,
body[data-theme="dim"] button:focus-visible,
body[data-theme="dim"] a:focus-visible {
  outline: 2px solid rgba(22, 184, 105, 0.5) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(22, 184, 105, 0.1) !important;
}

body[data-theme="dim"] .bottom-dock {
  background: rgba(248, 250, 252, 0.92) !important;
  border-color: rgba(126, 140, 155, 0.28) !important;
  box-shadow: 0 -14px 36px rgba(31, 41, 55, 0.14) !important;
}

/* Preserve the original dark top-products podium. */
body[data-theme="dim"] .hero-right-content {
  background: linear-gradient(135deg, rgba(15, 45, 28, 0.9), rgba(6, 27, 15, 0.95)) !important;
  border: 1px solid rgba(74, 222, 128, 0.25) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body[data-theme="dim"] .hero-podium-title {
  color: #ffffff !important;
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.5) !important;
}

body[data-theme="dim"] .podium-prod-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(74, 222, 128, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
}

body[data-theme="dim"] .podium-prod-card:hover {
  border-color: #22c55e !important;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.25) !important;
}

body[data-theme="dim"] .podium-prod-title,
body[data-theme="dim"] .podium-seller-name {
  color: #ffffff !important;
}

body[data-theme="dim"] .podium-prod-category,
body[data-theme="dim"] .podium-prod-price,
body[data-theme="dim"] .podium-prod-badge {
  color: #10b981 !important;
}

body[data-theme="dim"] .podium-prod-badge {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 0 !important;
}

body[data-theme="dim"] .place-1 .podium-pedestal {
  background: linear-gradient(180deg, #eab308, #ca8a04) !important;
  border: 1px solid #fef08a !important;
  border-bottom: 0 !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

body[data-theme="dim"] .place-2 .podium-pedestal {
  background: linear-gradient(180deg, #94a3b8, #64748b) !important;
  border: 1px solid #cbd5e1 !important;
  border-bottom: 0 !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

body[data-theme="dim"] .place-3 .podium-pedestal {
  background: linear-gradient(180deg, #d97706, #b45309) !important;
  border: 1px solid #fcd34d !important;
  border-bottom: 0 !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

@media (max-width: 900px) {
  body[data-theme="dim"] .market-header {
    background:
      radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.16), transparent 240px),
      linear-gradient(135deg, #ffffff 0%, #f2f5f8 62%, #e4ebf2 100%) !important;
  }

  body[data-theme="dim"] .market-actions {
    align-items: stretch;
  }

  body[data-theme="dim"] .mobile-search-bar {
    background: rgba(248, 250, 252, 0.9) !important;
  }
}

.auth-card .auth-benefits {
  min-width: 0 !important;
  overflow: visible !important;
}

.auth-card .auth-benefits span {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

@media (max-width: 560px) {
  .auth-card .auth-benefits {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  .auth-card .auth-benefits span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    padding: 6px 7px !important;
    text-align: center !important;
    line-height: 1.15 !important;
  }
}

.seller-lot-management,
.seller-lot-management > *,
.lot-management-head,
.lot-management-list,
.lot-management-row,
.lot-management-info {
  min-width: 0 !important;
  max-width: 100% !important;
}

.lot-management-head,
.lot-management-list,
.lot-management-row {
  width: 100% !important;
}

.lot-management-info strong,
.lot-management-info span,
.lot-management-head h3 {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

@media (max-width: 900px) {
  .seller-lot-management {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .lot-management-row {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .lot-management-row > div:last-child {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* Hard gray base: applies to both theme states, so the page never falls back to white. */
html,
body,
body[data-theme="light"],
body[data-theme="dim"] {
  --bg: #dfe5ec;
  --bg-2: #d3dbe5;
  --surface: #f6f8fb;
  --surface-rgb: 246, 248, 251;
  --surface-2: #eef2f6;
  --surface-3: #e5ebf2;
  --line: rgba(103, 116, 132, 0.28);
  --line-strong: rgba(78, 91, 108, 0.38);
  background:
    radial-gradient(circle at 18% -10%, rgba(255, 255, 255, 0.58), transparent 300px),
    radial-gradient(circle at 90% 4%, rgba(23, 182, 106, 0.08), transparent 340px),
    linear-gradient(180deg, #e8edf3 0%, #dfe5ec 46%, #d3dbe5 100%) !important;
}

body[data-theme="light"] .app-shell,
body[data-theme="dim"] .app-shell,
body[data-theme="light"] main,
body[data-theme="dim"] main,
body[data-theme="light"] .catalog-view,
body[data-theme="dim"] .catalog-view,
body[data-theme="light"] .content,
body[data-theme="dim"] .content,
body[data-theme="light"] .view,
body[data-theme="dim"] .view {
  background: transparent !important;
}

body[data-theme="light"] .topbar,
body[data-theme="dim"] .topbar,
body[data-theme="light"] .bottom-dock,
body[data-theme="dim"] .bottom-dock {
  background: rgba(239, 243, 248, 0.94) !important;
  border-color: rgba(103, 116, 132, 0.25) !important;
}

body[data-theme="light"] .panel,
body[data-theme="dim"] .panel,
body[data-theme="light"] .sidebar,
body[data-theme="dim"] .sidebar,
body[data-theme="light"] .product-card,
body[data-theme="dim"] .product-card,
body[data-theme="light"] .auth-card,
body[data-theme="dim"] .auth-card,
body[data-theme="light"] .profile-card,
body[data-theme="dim"] .profile-card,
body[data-theme="light"] .seller-view .panel,
body[data-theme="dim"] .seller-view .panel,
body[data-theme="light"] .dx-chat-layout,
body[data-theme="dim"] .dx-chat-layout {
  background: rgba(246, 248, 251, 0.92) !important;
  border-color: rgba(103, 116, 132, 0.24) !important;
  box-shadow: 0 18px 46px rgba(31, 41, 55, 0.09) !important;
}

body[data-theme="light"] .command-search,
body[data-theme="dim"] .command-search,
body[data-theme="light"] .mobile-search-bar,
body[data-theme="dim"] .mobile-search-bar,
body[data-theme="light"] .chip,
body[data-theme="dim"] .chip,
body[data-theme="light"] input,
body[data-theme="dim"] input,
body[data-theme="light"] select,
body[data-theme="dim"] select,
body[data-theme="light"] textarea,
body[data-theme="dim"] textarea {
  background: #eef2f6 !important;
  border-color: rgba(103, 116, 132, 0.26) !important;
}

/* Support/chat screens are heavily custom styled, so keep them in the same soft-gray system. */
body[data-theme="dim"][data-active-view="support"],
body[data-theme="dim"] .dx-chat-layout,
body[data-theme="dim"] .dx-chat-sidebar,
body[data-theme="dim"] .dx-chat-main,
body[data-theme="dim"] .dx-chat-header,
body[data-theme="dim"] .dx-chat-list,
body[data-theme="dim"] .dx-chat-thread,
body[data-theme="dim"] .dx-chat-empty,
body[data-theme="dim"] .dx-chat-panel {
  background: #eef3f7 !important;
  color: var(--text) !important;
}

body[data-theme="dim"] .dx-chat-layout {
  border-color: rgba(126, 140, 155, 0.28) !important;
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.1) !important;
}

body[data-theme="dim"] .dx-chat-tabs,
body[data-theme="dim"] .dx-chat-filters,
body[data-theme="dim"] .dx-chat-topbar,
body[data-theme="dim"] .dx-chat-nav,
body[data-theme="dim"] .dx-message-top-tabs,
body[data-theme="dim"] .dx-message-subtabs,
body[data-theme="dim"] .message-tabs {
  background: rgba(248, 250, 252, 0.9) !important;
  border-color: rgba(126, 140, 155, 0.28) !important;
}

body[data-theme="dim"] .dx-chat-filters button,
body[data-theme="dim"] .dx-chat-tabs button,
body[data-theme="dim"] .dx-message-top-tabs button,
body[data-theme="dim"] .dx-message-subtabs button,
body[data-theme="dim"] .message-tabs button,
body[data-theme="dim"] .dx-chat-action,
body[data-theme="dim"] .dx-chat-input,
body[data-theme="dim"] .dx-chat-input input {
  background: rgba(255, 255, 255, 0.86) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.3) !important;
}

body[data-theme="dim"] .dx-chat-filters button.active,
body[data-theme="dim"] .dx-chat-tabs button.active,
body[data-theme="dim"] .dx-message-top-tabs button.active,
body[data-theme="dim"] .dx-message-subtabs button.active,
body[data-theme="dim"] .message-tabs button.active {
  background: rgba(22, 184, 105, 0.12) !important;
  color: #087a49 !important;
  border-color: rgba(22, 184, 105, 0.28) !important;
  box-shadow: none !important;
}

body[data-theme="dim"] .dx-message-row,
body[data-theme="dim"] .message-list div,
body[data-theme="dim"] .deal-chat-card,
body[data-theme="dim"] .deal-card {
  background: rgba(255, 255, 255, 0.82) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.28) !important;
}

body[data-theme="dim"] .dx-message-row.active {
  background: linear-gradient(90deg, rgba(22, 184, 105, 0.16), rgba(255, 255, 255, 0.86)) !important;
  border-left-color: #17b66a !important;
  box-shadow: inset 4px 0 0 #17b66a !important;
}

body[data-theme="dim"] .dx-message-row strong,
body[data-theme="dim"] .dx-message-row b,
body[data-theme="dim"] .message-list strong,
body[data-theme="dim"] .dx-chat-title,
body[data-theme="dim"] .dx-chat-title strong {
  color: var(--text) !important;
}

body[data-theme="dim"] .dx-message-row span,
body[data-theme="dim"] .dx-message-row p,
body[data-theme="dim"] .message-list span,
body[data-theme="dim"] .dx-chat-subtitle,
body[data-theme="dim"] .dx-chat-time {
  color: var(--muted) !important;
}

body[data-theme="dim"] .dx-bubble-own {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
}

body[data-theme="dim"] .dx-bubble-other,
body[data-theme="dim"] .dx-bubble {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--text) !important;
  border-color: rgba(126, 140, 155, 0.28) !important;
}

body[data-theme="dim"] .dx-chat-avatar,
body[data-theme="dim"] .dx-message-avatar,
body[data-theme="dim"] .deal-avatar {
  background: var(--brand-grad) !important;
  color: #ffffff !important;
}

body[data-theme="dim"] .dx-message-top-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 10px 12px !important;
  overflow: hidden !important;
}

body[data-theme="dim"] .dx-message-top-tabs button {
  min-width: 0 !important;
  width: 100% !important;
  padding: 0 6px !important;
  justify-content: center !important;
  gap: 2px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

body[data-theme="dim"] .dx-message-top-tabs button b {
  flex: 0 0 12px !important;
  width: 12px !important;
  min-width: 12px !important;
  max-width: 12px !important;
  height: 12px !important;
  font-size: 9px !important;
}

body[data-theme="dim"] .dx-message-subtabs {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  padding: 10px 12px !important;
}

body[data-theme="dim"] .dx-message-subtabs button {
  min-width: 0 !important;
  width: 100% !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

body[data-theme="dim"] .dx-message-subtabs .dx-message-muted-action {
  width: 44px !important;
  min-width: 44px !important;
}

@media (max-width: 900px) {
  body[data-theme="dim"] .dx-chat-layout,
  body[data-theme="dim"] .dx-chat-sidebar,
  body[data-theme="dim"] .dx-chat-main {
    background: #eef3f7 !important;
  }

  body[data-theme="dim"] .dx-chat-filters,
  body[data-theme="dim"] .dx-chat-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-theme="dim"] .dx-chat-filters::-webkit-scrollbar,
  body[data-theme="dim"] .dx-chat-tabs::-webkit-scrollbar {
    display: none;
  }
}

/* Desktop chats: compact, light, no giant empty dark canvas. */
@media (min-width: 901px) {
  body[data-active-view="support"] main {
    width: min(1120px, calc(100% - 48px)) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 18px 0 32px !important;
  }

  body[data-active-view="support"] .dx-chat-layout {
    width: 100% !important;
    max-width: 1120px !important;
    height: min(600px, calc(100vh - 118px)) !important;
    min-height: 520px !important;
    grid-template-columns: 330px minmax(0, 1fr) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  body[data-active-view="support"] .dx-chat-sidebar,
  body[data-active-view="support"] .dx-chat-main {
    height: 100% !important;
    min-height: 0 !important;
    background: #eef3f7 !important;
  }

  body[data-active-view="support"] .dx-message-list {
    height: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    background: #eef3f7 !important;
  }

  body[data-active-view="support"] .dx-chat-messages {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 18px 20px !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(238, 243, 247, 0.86)),
      #eef3f7 !important;
  }

  body[data-active-view="support"] .dx-chat-head {
    min-height: 68px !important;
    background: rgba(246, 248, 251, 0.96) !important;
    border-bottom: 1px solid rgba(103, 116, 132, 0.22) !important;
  }

  body[data-active-view="support"] .dx-chat-input-area {
    padding: 12px 18px !important;
    background: rgba(246, 248, 251, 0.96) !important;
    border-top: 1px solid rgba(103, 116, 132, 0.22) !important;
  }

  body[data-active-view="support"] .dx-bubble,
  body[data-active-view="support"] .dx-bubble-other {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--text) !important;
    border: 1px solid rgba(103, 116, 132, 0.22) !important;
    box-shadow: 0 10px 26px rgba(31, 41, 55, 0.08) !important;
  }
}

/* Final visual override. Keep this at EOF so old redesign fragments cannot win. */
body[data-theme="dim"] {
  color-scheme: dark !important;
  --bg: #071014 !important;
  --bg-2: #0b171c !important;
  --surface: #101b21 !important;
  --surface-rgb: 16, 27, 33 !important;
  --surface-2: #15232b !important;
  --surface-3: #1d3039 !important;
  --line: rgba(148, 163, 184, 0.16) !important;
  --line-strong: rgba(148, 163, 184, 0.3) !important;
  --text: #f4f8fb !important;
  --muted: #9eb0bd !important;
  --muted-2: #718492 !important;
  --green: #29d391 !important;
  --cyan: #38bdf8 !important;
  --pink: #fb923c !important;
  --brand-grad: linear-gradient(135deg, #29d391, #38bdf8) !important;
  --topbar-bg: rgba(10, 18, 23, 0.9) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.08), transparent 30vw),
    radial-gradient(circle at 90% 8%, rgba(41, 211, 145, 0.08), transparent 28vw),
    var(--bg) !important;
  color: var(--text) !important;
}

body:not([data-theme="dim"]) {
  color-scheme: light !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(14, 165, 233, 0.1), transparent 34vw),
    radial-gradient(circle at 92% 2%, rgba(16, 185, 129, 0.1), transparent 32vw),
    var(--bg) !important;
}

body[data-theme="dim"] .dx-chat-layout,
body[data-theme="dim"] .dx-chat-sidebar,
body[data-theme="dim"] .dx-chat-main {
  background: var(--surface) !important;
}

body[data-theme="dim"] .dx-chat-messages,
body[data-theme="dim"] .dx-message-list {
  background:
    radial-gradient(circle at 82% 0%, rgba(56, 189, 248, 0.1), transparent 360px),
    var(--surface-2) !important;
}

@media (min-width: 901px) {
  body[data-active-view="support"] main {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100dvh - 62px) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-active-view="support"] .chat-page-view.active {
    display: block !important;
    height: calc(100dvh - 62px) !important;
  }

  body[data-active-view="support"] .dx-chat-layout {
    width: 100% !important;
    max-width: none !important;
    height: calc(100dvh - 62px) !important;
    min-height: calc(100dvh - 62px) !important;
    display: grid !important;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 900px) {
  body[data-active-view="support"] main {
    width: 100% !important;
    padding: 0 0 calc(76px + env(safe-area-inset-bottom)) !important;
  }

  body[data-active-view="support"] .chat-page-view.active {
    height: calc(100dvh - 62px - 76px - env(safe-area-inset-bottom)) !important;
  }

  body[data-active-view="support"] .dx-chat-layout {
    height: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }
}

/* EOF theme authority: wins over old body[data-theme=dim] selectors above. */
body[data-theme="dim"] .topbar,
body[data-theme="dim"] .bottom-dock {
  background: rgba(10, 18, 23, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26) !important;
}

body[data-theme="dim"] .brand strong {
  color: #f4f8fb !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

body[data-theme="dim"] .brand small {
  color: #7f93a3 !important;
}

body[data-theme="dim"] .market-header {
  background:
    radial-gradient(circle at 14% 14%, rgba(56, 189, 248, 0.16), transparent 260px),
    radial-gradient(circle at 84% 22%, rgba(41, 211, 145, 0.16), transparent 300px),
    linear-gradient(135deg, #0b151b 0%, #12242b 52%, #081116 100%) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42) !important;
}

body:not([data-theme="dim"]) .market-header {
  background:
    radial-gradient(circle at 14% 16%, rgba(14, 165, 233, 0.16), transparent 270px),
    radial-gradient(circle at 86% 22%, rgba(16, 185, 129, 0.18), transparent 270px),
    linear-gradient(135deg, #ffffff 0%, #f4faf9 58%, #eef5f9 100%) !important;
  border-color: rgba(39, 56, 72, 0.12) !important;
}

body[data-theme="dim"] .market-header h1 span,
body[data-theme="dim"] .market-header .desktop-title,
body[data-theme="dim"] .market-header .mobile-title {
  color: #f8fbff !important;
  -webkit-text-fill-color: #f8fbff !important;
}

body[data-theme="dim"] .market-header .subline,
body[data-theme="dim"] .instant-banner-text p {
  color: #a8bac8 !important;
}

body[data-theme="dim"] .eyebrow,
body[data-theme="dim"] .hero-feature-row span {
  background: rgba(255, 255, 255, 0.075) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: #aef5dd !important;
}

body[data-theme="dim"] .hero-right-content {
  background: rgba(12, 26, 32, 0.84) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34) !important;
}

body[data-theme="dim"] .instant-delivery-banner {
  background: linear-gradient(90deg, rgba(41, 211, 145, 0.11), rgba(56, 189, 248, 0.04)) !important;
  border-color: rgba(41, 211, 145, 0.24) !important;
}

body[data-theme="dim"] .instant-banner-text h2,
body[data-theme="dim"] .instant-banner-text h3 {
  color: #f4f8fb !important;
}

body[data-theme="dim"] .market-actions .hero-sell-btn,
body[data-theme="dim"] .market-actions .secondary-button {
  color: #eaf2f7 !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}

body[data-theme="dim"] .bg-icon-item {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body[data-theme="dim"] .sidebar,
body[data-theme="dim"] .panel,
body[data-theme="dim"] .product-card,
body[data-theme="dim"] .toolbar,
body[data-theme="dim"] .stats-bar,
body[data-theme="dim"] .stat-item,
body[data-theme="dim"] .side-profile,
body[data-theme="dim"] .range-card,
body[data-theme="dim"] .seller-card,
body[data-theme="dim"] .filter-block,
body[data-theme="dim"] .search-box {
  background: #101b21 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28) !important;
}

body[data-theme="dim"] .product-art {
  background:
    radial-gradient(circle at 50% 34%, rgba(41, 211, 145, 0.14), transparent 90px),
    linear-gradient(180deg, #15232b, #0f1a20) !important;
}

body[data-theme="dim"] .service-choice,
body[data-theme="dim"] .mobile-service-tile,
body[data-theme="dim"] .chip,
body[data-theme="dim"] .segmented,
body[data-theme="dim"] input,
body[data-theme="dim"] select,
body[data-theme="dim"] textarea {
  background: #15232b !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #f4f8fb !important;
}

body[data-theme="dim"] .service-choice.active,
body[data-theme="dim"] .mobile-service-tile.active,
body[data-theme="dim"] .chip.active,
body[data-theme="dim"] .segmented.active {
  background: rgba(41, 211, 145, 0.16) !important;
  border-color: rgba(41, 211, 145, 0.48) !important;
  color: #f4f8fb !important;
}

body[data-theme="dim"][data-active-view="support"] {
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.08), transparent 360px),
    #071014 !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-chat-layout,
body[data-theme="dim"][data-active-view="support"] .dx-chat-sidebar,
body[data-theme="dim"][data-active-view="support"] .dx-chat-head,
body[data-theme="dim"][data-active-view="support"] .dx-chat-input-area,
body[data-theme="dim"][data-active-view="support"] .dx-message-top-tabs,
body[data-theme="dim"][data-active-view="support"] .dx-message-subtabs {
  background: #101b21 !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-chat-main,
body[data-theme="dim"][data-active-view="support"] .dx-chat-messages,
body[data-theme="dim"][data-active-view="support"] .dx-message-list {
  background:
    radial-gradient(circle at 82% 0%, rgba(56, 189, 248, 0.08), transparent 360px),
    #15232b !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-message-row,
body[data-theme="dim"][data-active-view="support"] .deal-chat-card,
body[data-theme="dim"][data-active-view="support"] .dx-bubble-other {
  background: #101b21 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

body[data-theme="dim"][data-active-view="support"] .dx-message-row.active {
  background: rgba(41, 211, 145, 0.13) !important;
}

body:not([data-theme="dim"]) .market-header h1 span,
body:not([data-theme="dim"]) .market-header .desktop-title,
body:not([data-theme="dim"]) .market-header .mobile-title {
  color: #12202a !important;
  -webkit-text-fill-color: #12202a !important;
}

body:not([data-theme="dim"]) .market-header .subline {
  color: #536574 !important;
}

/* Absolute EOF polish pass. */
body[data-active-view="support"] .dx-message-top-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-active-view="support"] .dx-message-top-tabs button {
  height: 36px !important;
  padding: 0 10px !important;
  justify-content: flex-start !important;
  font-size: 12px !important;
}

.guest-register-btn {
  min-width: 120px !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .guest-register-btn {
    min-width: 0 !important;
  }
}
