/*
 * TDC user-facing design system
 * Source of truth: approved modern neon-neumorphism reference.
 * Loaded after the legacy theme so existing Blade/Bootstrap behavior is preserved.
 */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #e8eef3;
  --bg-2: #eef3f7;
  --surface: #e9eff4;
  --surface-raised: #edf3f7;
  --surface-pressed: #e3eaf0;
  --text: #17202a;
  --text-2: #5d6a76;
  --muted: #5b6873;
  --line: rgba(69, 84, 98, 0.14);
  --accent: #00ff95;
  --accent-2: #1479ff;
  --accent-soft: rgba(0, 255, 149, 0.12);
  --warning: #f7a823;
  --danger: #ef5e6f;
  --text-strong: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--muted);
  --text-disabled: #5b6873;
  --heading: var(--text);
  --link: #075fbf;
  --link-hover: #054b98;
  --placeholder: #5b6873;
  --input-text: var(--text);
  --table-text: var(--text-2);
  --modal-text: var(--text-2);
  --dropdown-text: var(--text-2);
  --badge-text: var(--text-2);
  --success-text: #006b43;
  --danger-text: #a9273b;
  --warning-text: #805000;
  --info-text: #075fbf;
  --on-dark: #f2f7fa;
  --on-light: #17202a;
  --on-accent: #07140e;
  --control-disabled-bg: #dee6ec;
  --control-readonly-bg: #e1e8ee;
  --toast-bg: #edf3f7;
  --toast-text: var(--text-2);
  --neon: #00ff95;
  --neon-rgb: 0, 255, 149;
  --shadow-out: 14px 14px 30px rgba(145, 159, 172, 0.34), -14px -14px 30px rgba(255, 255, 255, 0.9);
  --shadow-out-sm: 7px 7px 16px rgba(145, 159, 172, 0.3), -7px -7px 16px rgba(255, 255, 255, 0.82);
  --shadow-in: inset 5px 5px 12px rgba(145, 159, 172, 0.28), inset -5px -5px 12px rgba(255, 255, 255, 0.82);
  --control-raised: 8px 8px 17px rgba(145, 159, 172, 0.34), -8px -8px 17px rgba(255, 255, 255, 0.92);
  --control-hover: inset 3px 3px 8px rgba(145, 159, 172, 0.27), inset -3px -3px 8px rgba(255, 255, 255, 0.78);
  --control-active: inset 6px 6px 13px rgba(145, 159, 172, 0.34), inset -6px -6px 13px rgba(255, 255, 255, 0.86);
  --neon-hover: 0 0 0 1px rgba(0, 255, 149, 0.92), 0 0 11px rgba(0, 255, 149, 0.7), 0 0 26px rgba(0, 255, 149, 0.42), 0 0 48px rgba(0, 255, 149, 0.2);
  --neon-active: 0 0 0 1px rgba(0, 255, 149, 1), 0 0 9px rgba(0, 255, 149, 0.78), 0 0 20px rgba(0, 255, 149, 0.48), 0 0 36px rgba(0, 255, 149, 0.24);
  --focus: 0 0 0 4px rgba(20, 121, 255, 0.22);
  --glass: rgba(255, 255, 255, 0.38);
  --nav-bg: rgba(232, 238, 243, 0.78);
  --hero-glow: rgba(0, 255, 149, 0.16);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 13px;
  --tdc-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tdc-danger-soft: rgba(239, 94, 111, 0.11);
  --tdc-warning-soft: rgba(247, 168, 35, 0.12);
  --tdc-info-soft: rgba(20, 121, 255, 0.11);
  --tdc-overlay: rgba(23, 32, 42, 0.5);
  --tdc-link: var(--link);

  /* Resolve the older theme.css variables through this semantic source of truth. */
  --theme-link-text: var(--link);
  --theme-link-hover: var(--link-hover);
  --theme-status-primary: var(--info-text);
  --theme-status-success: var(--success-text);
  --theme-status-warning: var(--warning-text);
  --theme-status-danger: var(--danger-text);
  --theme-status-info: var(--info-text);

  /* Compatibility with the legacy HSL token system. */
  --white: 210 29% 13%;
  --black: 0 0% 100%;
  --light: 210 12% 42%;
  --body-bg: 207 31% 93%;
  --section-bg: 204 29% 94%;
  --heading-color: 210 29% 13%;
  --body-color: 208 12% 42%;
  --border-color: 210 17% 76%;
  --base-h: 155;
  --base-s: 100%;
  --base-l: 50%;
  --base: 155 100% 50%;
  --primary: 213 100% 54%;
  --header-box-shadow: var(--shadow-out-sm);
  --mobile-box-shadow: var(--shadow-out-sm);
  --box-shadow: var(--shadow-out-sm);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101419;
  --bg-2: #12181e;
  --surface: #171d23;
  --surface-raised: #1b2229;
  --surface-pressed: #12181d;
  --text: #f2f7fa;
  --text-2: #a9b4bd;
  --muted: #7f8c96;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #00ff95;
  --accent-2: #5e9cff;
  --accent-soft: rgba(0, 255, 149, 0.11);
  --warning: #ffc15a;
  --danger: #ff7184;
  --text-strong: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--muted);
  --text-disabled: #82909a;
  --heading: var(--text);
  --link: #78adff;
  --link-hover: #a7c8ff;
  --placeholder: #7f8c96;
  --input-text: var(--text);
  --table-text: var(--text-2);
  --modal-text: var(--text-2);
  --dropdown-text: var(--text-2);
  --badge-text: var(--text-2);
  --success-text: #00ff95;
  --danger-text: #ff8d9d;
  --warning-text: #ffc15a;
  --info-text: #78adff;
  --on-dark: #f2f7fa;
  --on-light: #17202a;
  --on-accent: #07140e;
  --control-disabled-bg: #20272e;
  --control-readonly-bg: #1d242b;
  --toast-bg: #1b2229;
  --toast-text: var(--text-2);
  --neon: #00ff95;
  --neon-rgb: 0, 255, 149;
  --shadow-out: 16px 16px 32px rgba(0, 0, 0, 0.5), -12px -12px 28px rgba(48, 61, 72, 0.18);
  --shadow-out-sm: 8px 8px 18px rgba(0, 0, 0, 0.43), -7px -7px 16px rgba(52, 64, 74, 0.16);
  --shadow-in: inset 5px 5px 12px rgba(0, 0, 0, 0.42), inset -5px -5px 12px rgba(53, 65, 75, 0.16);
  --control-raised: 9px 9px 19px rgba(0, 0, 0, 0.5), -8px -8px 18px rgba(58, 70, 81, 0.17);
  --control-hover: inset 4px 4px 9px rgba(0, 0, 0, 0.48), inset -4px -4px 9px rgba(57, 69, 80, 0.16);
  --control-active: inset 7px 7px 14px rgba(0, 0, 0, 0.58), inset -6px -6px 13px rgba(60, 72, 83, 0.14);
  --neon-hover: 0 0 0 1px rgba(0, 255, 149, 0.98), 0 0 12px rgba(0, 255, 149, 0.82), 0 0 30px rgba(0, 255, 149, 0.5), 0 0 58px rgba(0, 255, 149, 0.24);
  --neon-active: 0 0 0 1px rgba(0, 255, 149, 1), 0 0 10px rgba(0, 255, 149, 0.88), 0 0 24px rgba(0, 255, 149, 0.56), 0 0 42px rgba(0, 255, 149, 0.28);
  --focus: 0 0 0 4px rgba(94, 156, 255, 0.22);
  --glass: rgba(255, 255, 255, 0.035);
  --nav-bg: rgba(16, 20, 25, 0.78);
  --hero-glow: rgba(0, 255, 149, 0.12);
  --tdc-danger-soft: rgba(255, 113, 132, 0.1);
  --tdc-warning-soft: rgba(255, 193, 90, 0.1);
  --tdc-info-soft: rgba(94, 156, 255, 0.1);
  --tdc-overlay: rgba(0, 0, 0, 0.66);
  --tdc-link: var(--link);

  --theme-link-text: var(--link);
  --theme-link-hover: var(--link-hover);
  --theme-status-primary: var(--info-text);
  --theme-status-success: var(--success-text);
  --theme-status-warning: var(--warning-text);
  --theme-status-danger: var(--danger-text);
  --theme-status-info: var(--info-text);

  --white: 200 33% 96%;
  --black: 210 22% 8%;
  --light: 207 14% 71%;
  --body-bg: 210 22% 8%;
  --section-bg: 210 21% 11%;
  --heading-color: 200 33% 96%;
  --body-color: 207 14% 71%;
  --border-color: 0 0% 100% / 0.08;
  --base: 155 100% 50%;
  --primary: 217 100% 68%;
  --header-box-shadow: var(--shadow-out-sm);
  --mobile-box-shadow: var(--shadow-out-sm);
  --box-shadow: var(--shadow-out-sm);
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  overflow-x: clip;
  font-family: var(--tdc-font) !important;
  color: var(--text-secondary) !important;
  background:
    radial-gradient(circle at 14% 8%, var(--hero-glow), transparent 28%),
    radial-gradient(circle at 90% 2%, rgba(20, 121, 255, 0.11), transparent 24%),
    linear-gradient(145deg, var(--bg), var(--bg-2)) !important;
  background-attachment: fixed !important;
  transition: background 0.35s ease, color 0.25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 52%, rgba(var(--neon-rgb), 0.018) 75%, transparent 100%);
}

body,
button,
input,
select,
textarea {
  font-family: var(--tdc-font) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading) !important;
  font-family: var(--tdc-font) !important;
  font-weight: 800;
  letter-spacing: -0.025em;
}

p,
li,
label {
  color: var(--text-secondary) !important;
}

:where(.text-muted, .text--muted, .form-text, .help-block, .help-text, .hint, figcaption) {
  color: var(--text-muted) !important;
}

:where(.text-secondary, .text-body-secondary, .text-body) {
  color: var(--text-secondary) !important;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
}

::selection {
  color: var(--on-accent);
  background: rgba(var(--neon-rgb), 0.72);
}

* {
  scrollbar-color: rgba(var(--neon-rgb), 0.48) var(--surface-pressed);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--surface-pressed);
}

*::-webkit-scrollbar-thumb {
  border: 3px solid var(--surface-pressed);
  border-radius: 999px;
  background: rgba(var(--neon-rgb), 0.5);
}

.container {
  width: min(100% - 40px, 1440px) !important;
  max-width: 1440px !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.tdc-page-main {
  display: block;
  min-height: 50vh;
  outline: none;
}

.tdc-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 12px 16px;
  border: 1px solid var(--neon);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--neon-hover);
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.tdc-skip-link:focus {
  color: var(--text);
  transform: translateY(0);
}

/* Reusable surface primitives */
.tdc-neo,
.neo,
.tdc-surface {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out) !important;
}

.tdc-neo-sm,
.neo-sm,
.tdc-card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.tdc-neo-inset,
.neo-inset,
.tdc-inset {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md);
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

/* Shared tactile controls. Brand mint is illumination, never a normal fill. */
:where(
  .tdc-neo-control,
  .btn:not(.btn-close),
  .theme-toggle,
  .tdc-theme-toggle,
  .header-button,
  .user-info__button,
  .language-wrapper,
  .market-action-btn,
  .market-hero-search__button,
  .market-pill,
  .pagination .page-link,
  .slick-arrow,
  .swiper-button-next,
  .swiper-button-prev,
  .profile-setting__bar-icon,
  .dashboard-body__bar-icon,
  .close-profile-sidebar,
  .sidebar-menu__close,
  .user-dropdown-wrapper__close,
  .scroll-top,
  .inventory-grid-toolbar button,
  .product-details__quantity button,
  .quantity_box button
) {
  min-height: 46px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--control-raised) !important;
  cursor: pointer;
  touch-action: manipulation;
  transform: translateY(0) scale(1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
  will-change: transform, box-shadow;
}

:where(
  .tdc-neo-control,
  .btn:not(.btn-close),
  .tdc-theme-toggle,
  .header-button,
  .user-info__button,
  .language-wrapper,
  .market-action-btn,
  .market-hero-search__button,
  .market-pill,
  .pagination .page-link,
  .slick-arrow,
  .profile-setting__bar-icon,
  .dashboard-body__bar-icon,
  .close-profile-sidebar,
  .sidebar-menu__close,
  .user-dropdown-wrapper__close,
  .scroll-top
):focus-visible {
  outline: none !important;
  border-color: var(--accent-2) !important;
  box-shadow: var(--control-hover), var(--focus) !important;
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .tdc-neo-control,
    .btn:not(.btn-close),
    .tdc-theme-toggle,
    .header-button,
    .user-info__button,
    .language-wrapper,
    .market-action-btn,
    .market-hero-search__button,
    .market-pill,
    .pagination .page-link,
    .slick-arrow,
    .swiper-button-next,
    .swiper-button-prev,
    .profile-setting__bar-icon,
    .dashboard-body__bar-icon,
    .close-profile-sidebar,
    .sidebar-menu__close,
    .user-dropdown-wrapper__close,
    .scroll-top,
    .inventory-grid-toolbar button,
    .product-details__quantity button,
    .quantity_box button
  ):not(:disabled):not(.disabled):hover {
    color: var(--text) !important;
    background: var(--surface-pressed) !important;
    border-color: rgba(var(--neon-rgb), 0.95) !important;
    box-shadow: var(--control-hover), var(--neon-hover) !important;
    transform: translateY(2px) scale(0.995);
    filter: none !important;
  }
}

:where(
  .tdc-neo-control,
  .btn:not(.btn-close),
  .tdc-theme-toggle,
  .header-button,
  .user-info__button,
  .language-wrapper,
  .market-action-btn,
  .market-hero-search__button,
  .market-pill,
  .pagination .page-link,
  .slick-arrow,
  .swiper-button-next,
  .swiper-button-prev,
  .profile-setting__bar-icon,
  .dashboard-body__bar-icon,
  .close-profile-sidebar,
  .sidebar-menu__close,
  .user-dropdown-wrapper__close,
  .scroll-top,
  .inventory-grid-toolbar button,
  .product-details__quantity button,
  .quantity_box button
):not(:disabled):not(.disabled):active {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  border-color: var(--neon) !important;
  box-shadow: var(--control-active), var(--neon-active) !important;
  transform: translateY(3px) scale(0.982);
  filter: none !important;
}

:where(.btn, button, input, select, textarea):disabled,
:where(.btn, button).disabled,
:where(.btn, button, input, select, textarea)[aria-disabled="true"] {
  color: var(--text-disabled) !important;
  background: var(--control-disabled-bg) !important;
  border-color: var(--line) !important;
  -webkit-text-fill-color: var(--text-disabled) !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: var(--shadow-in) !important;
  transform: none !important;
}

.btn,
.market-action-btn,
.market-hero-search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 19px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.btn-sm,
.btn.btn-sm,
.market-action-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 14px !important;
}

.btn-lg,
.btn.btn-lg {
  min-height: 54px;
  padding: 13px 24px;
}

.btn--base,
.btn-outline--base,
.btn--primary,
.btn-primary,
.btn-success,
.btn--success,
.btn-info,
.btn--info {
  border-color: rgba(var(--neon-rgb), 0.26) !important;
}

.btn--base :where(i, svg),
.btn-outline--base :where(i, svg),
.btn--primary :where(i, svg),
.btn-primary :where(i, svg),
.market-action-btn :where(i, svg),
.market-hero-search__button :where(i, svg) {
  color: var(--neon) !important;
}

.btn-danger,
.btn--danger,
.btn-outline-danger,
.text--danger {
  color: var(--danger-text) !important;
  border-color: rgba(239, 94, 111, 0.34) !important;
}

.btn-warning,
.btn--warning,
.btn-outline-warning,
.text--warning {
  color: var(--warning-text) !important;
  border-color: rgba(247, 168, 35, 0.34) !important;
}

.text--base,
.text-success,
.text--success {
  color: var(--success-text) !important;
}

html[data-theme="dark"] :where(.text--base, .text-success, .text--success) {
  color: var(--success-text) !important;
}

:where(.text-danger, .text--danger) {
  color: var(--danger-text) !important;
}

:where(.text-warning, .text--warning) {
  color: var(--warning-text) !important;
}

:where(.text-info, .text--info, .text-primary, .text--primary) {
  color: var(--info-text) !important;
}

/* Theme toggle */
.tdc-theme-toggle {
  min-width: 46px;
  padding: 8px 12px;
  gap: 9px;
  font-weight: 800;
}

.tdc-theme-toggle--compact {
  width: 46px;
  min-width: 46px;
  padding: 0 !important;
}

.tdc-theme-toggle__icons {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--accent-2);
}

.tdc-theme-toggle__icons i {
  position: absolute;
  font-size: 1.15rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.tdc-theme-toggle__sun,
html[data-theme="dark"] .tdc-theme-toggle__moon {
  opacity: 0;
  transform: scale(0.7) rotate(-20deg);
}

html[data-theme="dark"] .tdc-theme-toggle__sun,
html[data-theme="light"] .tdc-theme-toggle__moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.tdc-theme-toggle__label,
.tdc-theme-toggle--compact .tdc-theme-toggle__label {
  display: none;
}

.tdc-auth-theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1060;
}

/* Inputs and form controls */
.form-group,
.form--group {
  margin-bottom: 22px;
}

.form--label,
.form-label,
label {
  margin-bottom: 9px;
  color: var(--text) !important;
  font-size: 0.88rem;
  font-weight: 750;
}

.form--label.required::after,
.form-label.required::after,
label.required::after {
  color: var(--danger-text) !important;
}

:where(
  .form--control,
  .form-control,
  .form-select,
  select,
  textarea,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
  .select2-container--default .select2-selection--single,
  .select2-container--default .select2-selection--multiple,
  .custom-input-group-text,
  .input-group-text
) {
  min-height: 50px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--input-text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

:where(.form--control, .form-control, .form-select, select, textarea, input)::placeholder {
  color: var(--placeholder) !important;
  opacity: 1;
}

:where(.form--control, .form-control, .form-select, select, textarea, input):-webkit-autofill,
:where(.form--control, .form-control, .form-select, select, textarea, input):-webkit-autofill:hover,
:where(.form--control, .form-control, .form-select, select, textarea, input):-webkit-autofill:focus {
  -webkit-text-fill-color: var(--input-text) !important;
  box-shadow: var(--shadow-in), inset 0 0 0 1000px var(--surface-pressed) !important;
  caret-color: var(--input-text);
}

select option,
select optgroup {
  color: var(--input-text);
  background: var(--surface-raised);
}

:where(
  .form--control,
  .form-control,
  .form-select,
  select,
  textarea,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
  .select2-container--focus .select2-selection,
  .select2-container--open .select2-selection
):focus {
  outline: none !important;
  border-color: var(--accent-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in), var(--focus) !important;
}

textarea.form--control,
textarea.form-control,
textarea {
  min-height: 130px;
  padding-top: 14px;
  resize: vertical;
}

.input-group > :not(:first-child),
.input-group > :not(:last-child) {
  border-radius: var(--radius-md) !important;
}

.input-group {
  gap: 8px;
}

.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
  border: 1px solid var(--line) !important;
  background-color: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
  accent-color: var(--accent);
}

.form-check-input:checked {
  border-color: var(--accent-2) !important;
  background-color: var(--accent-2) !important;
  box-shadow: var(--focus) !important;
}

.form-check-input:focus {
  border-color: var(--accent-2) !important;
  box-shadow: var(--focus) !important;
}

.form--control.is-invalid,
.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: var(--danger) !important;
  box-shadow: var(--shadow-in), 0 0 0 3px var(--tdc-danger-soft) !important;
}

.invalid-feedback,
.text-danger,
.text--danger,
.error-message {
  color: var(--danger-text) !important;
}

.valid-feedback,
.text-success,
.text--success {
  color: var(--success-text) !important;
}

.form--control.is-valid,
.form-control.is-valid,
.was-validated .form-control:valid {
  border-color: var(--success-text) !important;
  box-shadow: var(--shadow-in), 0 0 0 3px var(--accent-soft) !important;
}

input[readonly],
textarea[readonly],
select[readonly],
[contenteditable="false"] {
  color: var(--text-secondary) !important;
  background: var(--control-readonly-bg) !important;
  -webkit-text-fill-color: var(--text-secondary) !important;
  opacity: 1 !important;
}

.form-check-input:disabled ~ .form-check-label,
.form-check-input[aria-disabled="true"] ~ .form-check-label {
  color: var(--text-disabled) !important;
  opacity: 1 !important;
}

:where(input, textarea, select):disabled::placeholder {
  color: var(--text-disabled) !important;
  opacity: 1 !important;
}

.password-show-hide {
  display: grid !important;
  width: 44px;
  min-height: 44px;
  place-items: center;
  color: var(--accent-2) !important;
  cursor: pointer;
}

.select2-dropdown,
.select2-container--default .select2-results > .select2-results__options {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--dropdown-text) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.select2-results__option {
  min-height: 44px;
  padding: 11px 14px !important;
  color: var(--dropdown-text) !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--selected {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in);
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered,
.select2-container--default .select2-search--inline .select2-search__field,
.select2-container--default .select2-search--dropdown .select2-search__field {
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--input-text) !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-search--inline .select2-search__field::placeholder,
.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
  color: var(--placeholder) !important;
  -webkit-text-fill-color: var(--placeholder) !important;
  opacity: 1 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--line) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  border: 1px solid var(--line) !important;
  color: var(--input-text) !important;
  background: var(--surface-raised) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
.select2-container--default .select2-selection__clear,
.select2-container--default .select2-selection--single .select2-selection__arrow {
  color: var(--text-muted) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--text-muted) transparent transparent transparent !important;
}

.select2-container--default.select2-container--disabled .select2-selection,
.select2-container--default .select2-results__option[aria-disabled="true"] {
  color: var(--text-disabled) !important;
  background: var(--control-disabled-bg) !important;
  opacity: 1 !important;
}

.select2-results__message {
  color: var(--text-muted) !important;
}

/* Header and navigation */
.header,
.header.fixed-header {
  position: sticky !important;
  top: 18px !important;
  right: auto !important;
  left: auto !important;
  z-index: 1030;
  width: min(calc(100% - 40px), 1440px) !important;
  min-height: 72px;
  margin: 18px auto 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  color: var(--text);
  background: var(--nav-bg) !important;
  box-shadow: var(--shadow-out-sm) !important;
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

.site-header__container {
  width: 100% !important;
  padding: 0 16px !important;
}

.header .navbar {
  min-height: 70px;
  padding: 10px 0 !important;
  gap: 16px;
}

.header .navbar-brand.logo {
  flex: 0 0 auto;
  max-width: 145px;
  margin-right: 12px;
  padding: 5px 8px;
  border-radius: 14px;
}

.header .navbar-brand.logo img {
  display: block;
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}

.site-header__collapse {
  min-width: 0;
}

.site-header__menu {
  gap: 4px;
  margin: 0 auto;
}

.header .nav-item .nav-link {
  min-height: 44px;
  padding: 11px 13px !important;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-2) !important;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

/* Retire the legacy full-width underline from main.css without affecting tab navigation. */
.header .nav-item > .nav-link::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
}

.header .nav-item.active > .nav-link,
.header .nav-item > .nav-link.active,
.header .nav-item > .nav-link[aria-current="page"] {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  border-color: rgba(var(--neon-rgb), 0.32) !important;
  box-shadow: var(--shadow-in) !important;
}

@media (hover: hover) and (pointer: fine) {
  .header .nav-item > .nav-link:hover {
    color: var(--text) !important;
    background: var(--surface-pressed) !important;
    border-color: rgba(var(--neon-rgb), 0.62) !important;
    box-shadow: var(--control-hover), 0 0 16px rgba(var(--neon-rgb), 0.24) !important;
    transform: translateY(1px);
  }
}

.header .nav-link:focus-visible,
.footer-menu__link:focus-visible,
.user-info-dropdown__link:focus-visible,
.dropdown-item:focus-visible {
  outline: none;
  border-radius: 12px;
  box-shadow: var(--focus) !important;
}

.site-header__desktop-actions,
.site-header__cta-group,
.site-header__utility-group {
  gap: 10px !important;
}

.site-header__utility-group {
  display: flex;
  align-items: center;
}

.site-header__nav-btn,
.user-info__button {
  min-height: 46px !important;
  white-space: nowrap;
}

.user-info__button {
  padding: 7px 12px !important;
  gap: 8px;
  font-weight: 800;
}

.user-info__button-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.header-account-button {
  gap: 8px;
}

.account-icon,
.user-info__icon {
  display: grid !important;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in);
}

.navbar-toggler.header-button {
  width: 46px;
  min-width: 46px;
  padding: 0 !important;
}

.body-overlay,
.sidebar-overlay {
  background: var(--tdc-overlay) !important;
  backdrop-filter: blur(3px);
}

.dropdown-menu,
.user-info .user-info-dropdown,
.user-dropdown-wrapper,
.wallet-dropdown .dropdown-menu,
.langList_dropdow {
  z-index: 1050;
  padding: 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out) !important;
}

.user-info .user-info-dropdown {
  top: calc(100% + 14px) !important;
  min-width: 270px;
  max-height: min(70vh, 580px);
  overflow-y: auto;
}

.dropdown-item,
.user-info-dropdown__link,
.language-list,
.setting-list__link,
.account-list__link {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px !important;
  border-radius: 12px;
  color: var(--dropdown-text) !important;
  background: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.user-info-dropdown__link:hover,
.user-info-dropdown__link.active,
.language-list:hover,
.language-list.active,
.setting-list__link:hover,
.setting-list__item.active .setting-list__link,
.account-list__link:hover,
.account-list__item.active .account-list__link {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.dropdown-item.disabled,
.dropdown-item:disabled,
.user-info-dropdown__link[aria-disabled="true"],
.language-list[aria-disabled="true"] {
  color: var(--text-disabled) !important;
  background: transparent !important;
  -webkit-text-fill-color: var(--text-disabled) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.dropdown-divider,
.dropdown-menu hr,
.user-info-dropdown hr {
  border-color: var(--line) !important;
  opacity: 1 !important;
}

.dropdown-header {
  color: var(--text-muted) !important;
}

.wallet-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 4px;
}

.wallet-summary__label {
  color: var(--muted) !important;
}

.wallet-summary__amount {
  color: var(--text) !important;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

/* Cards, panels, and content sections */
:where(
  .card,
  .custom--card,
  .account-form,
  .contactus-form,
  .contact-form-right,
  .blog-sidebar,
  .blog-item,
  .forum-card,
  .forum-post-card,
  .seller-summary-card,
  .seller-listing-card,
  .verification-area,
  .verification-code-wrapper,
  .cookies-card,
  .how-work-section__panel,
  .testimonial-shell,
  .testimonails-card,
  .cta-card,
  .client-section__inner,
  .market-hero-panel,
  .market-thread-board,
  .market-detail-card,
  .product-details,
  .profile-setting__sidebar,
  .profile-setting__content,
  .sidebar-menu,
  .listing-hero-card,
  .listing-summary-card,
  .listing-panel,
  .deposit-history-search-card,
  .deposit-history-summary-card,
  .deposit-history-panel,
  .deposit-balance-card,
  .deposit-panel,
  .dashboard-notice,
  .dashboard-balance-card,
  .dashboard-metric-card,
  .dashboard-panel,
  .support-index-highlight-card,
  .support-index-filter-bar,
  .support-index-summary-card,
  .support-index-panel,
  .transactions-filter-card,
  .transactions-summary-card,
  .transactions-panel,
  .withdraw-balance-card,
  .withdraw-panel,
  .withdraw-form-panel,
  .withdraw-detail-card,
  .withdraw-history-search-card,
  .withdraw-history-summary-card,
  .withdraw-history-panel,
  .escrow-create__panel,
  .escrow-create__summary,
  .escrow-detail-simple__panel,
  .premium-feature-card,
  .inventory-automation-card,
  .inventory-entry-panel,
  .inventory-saved-panel,
  .inventory-grid-shell,
  .payment-item,
  .deposit-selected-card,
  .deposit-info
) {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.card {
  overflow: visible;
}

.card-header,
.card-footer,
.modal-header,
.modal-footer {
  border-color: var(--line) !important;
  color: var(--text) !important;
  background: transparent !important;
}

.card-header:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-body {
  color: var(--text-2);
}

.section-bg,
.section-bg-two,
.account-sell-section,
.influential-profile-section,
.how-work-section {
  background: transparent !important;
}

.py-120 {
  padding-top: clamp(64px, 7vw, 104px) !important;
  padding-bottom: clamp(64px, 7vw, 104px) !important;
}

.py-60 {
  padding-top: clamp(38px, 5vw, 64px) !important;
  padding-bottom: clamp(38px, 5vw, 64px) !important;
}

.section-heading {
  margin-bottom: 36px;
}

.section-heading__subtitle,
.banner-content__badge,
.market-hero-panel__eyebrow,
.dashboard-eyebrow,
[class$="__eyebrow"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #00784b !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

html[data-theme="dark"] :where(.section-heading__subtitle, .banner-content__badge, .market-hero-panel__eyebrow, .dashboard-eyebrow, [class$="__eyebrow"]) {
  color: var(--accent) !important;
}

.section-heading__subtitle::before,
.banner-content__badge::before,
.market-hero-panel__eyebrow::before,
.dashboard-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.section-heading__title {
  max-width: 820px;
  margin-bottom: 0 !important;
  font-size: clamp(1.8rem, 3vw, 2.75rem) !important;
}

/* Homepage */
.homepage-shell {
  padding-bottom: 48px;
}

.banner-section {
  min-height: auto !important;
  padding: 38px 0 26px !important;
  background: transparent !important;
}

.banner-section > [class*="banner-section__shape"] {
  display: none !important;
}

.banner-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(32px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-out);
}

.banner-shell::after {
  content: "";
  position: absolute;
  top: -150px;
  right: -140px;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--neon-rgb), 0.28), transparent 68%);
  filter: blur(8px);
}

.banner-content__title {
  max-width: 830px;
  margin: 18px 0 !important;
  font-size: clamp(2.65rem, 5vw, 4.7rem) !important;
  line-height: 0.99 !important;
  letter-spacing: -0.055em !important;
}

.banner-content__desc {
  max-width: 680px;
  color: var(--text-2) !important;
  font-size: clamp(1rem, 1.5vw, 1.18rem) !important;
  line-height: 1.72;
}

.banner-content__button {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 32px;
}

.banner-content__form {
  display: flex;
  width: min(100%, 520px);
  gap: 10px;
}

.banner-content__form .form--control {
  flex: 1 1 240px;
}

.banner-thumb__inner,
.banner-thumb {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.banner-thumb img {
  border-radius: 18px;
}

.banner-content__rating {
  margin-top: 30px;
  color: var(--text-2);
}

.category-item,
.why-choose__item,
.blog-item,
.testimonails-card,
.account__tab,
.how-work__content {
  height: 100%;
  padding: 22px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.cate-outer {
  display: block;
  height: 100%;
}

.category-thumb,
.why-choose__icon,
.how-work__icon,
.contact-item__icon,
.dashboard-metric-card__icon,
.listing-summary-card__icon,
[class$="__icon-box"] {
  display: grid !important;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line) !important;
  border-radius: 17px !important;
  color: var(--accent-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.why-choose__number,
.how-work__step,
.category-item__count,
.blog-item__category {
  color: #00784b !important;
  font-weight: 850;
}

html[data-theme="dark"] :where(.why-choose__number, .how-work__step, .category-item__count, .blog-item__category) {
  color: var(--accent) !important;
}

.cta-section {
  padding: 34px 0 68px;
  background: transparent !important;
}

.cta-card {
  padding: clamp(24px, 4vw, 44px) !important;
}

.cta-left .input-group {
  flex-wrap: nowrap;
}

.client-logos img {
  opacity: 0.74;
  filter: grayscale(0.35);
}

/* Marketplace, listings, auctions, and forum */
.market-hub,
.market-detail-page,
.seller-listings-page,
.forum-page,
.blog,
.blog-detial-section,
.contact-section {
  background: transparent !important;
}

.market-hero-shell {
  border-radius: var(--radius-xl) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.market-hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-out) !important;
}

.market-hero-panel::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--neon-rgb), 0.2), transparent 68%);
  pointer-events: none;
}

.market-hero-panel__title {
  margin-bottom: 14px !important;
  font-size: clamp(2.1rem, 4vw, 4rem) !important;
  letter-spacing: -0.055em !important;
}

.market-hero-panel__text {
  max-width: 760px;
  color: var(--text-2) !important;
  line-height: 1.7;
}

.market-hero-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 0.42fr)) auto;
  gap: 12px;
  margin-top: 28px;
}

.market-hero-search__field {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--muted) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-hero-search__field :where(input, select) {
  min-height: 48px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.market-pill-swiper {
  overflow: visible !important;
}

.market-pill {
  min-height: 44px;
  padding: 10px 15px;
  white-space: nowrap;
}

.market-pill.active {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  border-color: rgba(var(--neon-rgb), 0.4) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-thread-board {
  overflow: visible !important;
  padding: 10px !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-out) !important;
}

.market-thread-board__head {
  padding: 15px 18px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px;
  color: var(--text-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-thread-row {
  margin-top: 10px;
  padding: 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: 19px !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.market-thread-row--clickable {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .market-thread-row--clickable:hover {
    border-color: rgba(var(--neon-rgb), 0.24) !important;
    box-shadow: var(--shadow-out-sm), 0 0 24px rgba(var(--neon-rgb), 0.08) !important;
    transform: translateY(-3px);
  }
}

.market-product-title,
.market-seller-card__name,
.account__name a,
.product-item__title a,
.forum-title a,
.blog-item__title-link {
  color: var(--text) !important;
}

.market-product-date,
.market-product-meta,
.market-seller-card__joined,
.market-seller-card__reviews,
.listing-cell-subtext {
  color: var(--muted) !important;
}

.market-action-btn {
  width: 100%;
  min-height: 52px;
}

.market-seller-card,
.market-seller-card__body,
.market-product-main {
  color: var(--text-2) !important;
  background: transparent !important;
}

.market-product-thumb,
.product-item__thumb,
.account-listing-details__thumb,
.auction-card__thumb {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-seller-popover {
  z-index: 1060;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-2) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--shadow-out) !important;
}

.market-empty-state,
.listing-empty-state,
.deposit-history-empty,
.support-index-empty,
.transactions-empty,
.withdraw-history-empty,
.empty-slip-message {
  padding: clamp(32px, 6vw, 64px) !important;
  border: 1px dashed rgba(var(--neon-rgb), 0.28) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-pagination,
.pagination {
  gap: 9px;
}

.pagination .page-link {
  display: grid;
  min-width: 44px;
  height: 44px;
  padding: 0 12px !important;
  place-items: center;
}

.pagination .page-item.active .page-link {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  border-color: rgba(var(--neon-rgb), 0.46) !important;
  box-shadow: var(--shadow-in) !important;
}

.forum-category,
.forum-card,
.forum-post,
.forum-comment,
.comment-item,
.latest-blog {
  border-color: var(--line) !important;
  color: var(--text-2) !important;
  background: transparent !important;
}

/* Authentication and security */
.account-section {
  min-height: 100dvh !important;
  padding: 54px 0 !important;
  background-image: none !important;
  background-color: transparent !important;
}

.account-section::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 8%, var(--hero-glow), transparent 28%),
    radial-gradient(circle at 90% 2%, rgba(20, 121, 255, 0.11), transparent 24%),
    linear-gradient(145deg, var(--bg), var(--bg-2));
}

.account-inner {
  min-height: calc(100dvh - 108px);
  display: flex;
  align-items: center;
}

.account-form {
  padding: clamp(25px, 4vw, 42px) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-out) !important;
}

.account-form__logo {
  display: inline-flex;
  max-width: 180px;
  min-height: 54px;
  align-items: center;
  margin-bottom: 18px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-pressed);
  box-shadow: var(--shadow-in);
}

.account-form__desc,
.have-account__text,
.verification-text {
  color: var(--text-2) !important;
  line-height: 1.65;
}

.have-account__link,
.forgot-password,
.try-again-link {
  color: var(--tdc-link) !important;
  font-weight: 800;
}

.verification-code-wrapper {
  width: min(100%, 560px);
  padding: 12px;
}

.verification-area {
  padding: clamp(24px, 4vw, 38px) !important;
}

/* Modals, alerts, badges, tabs, accordions, and tooltips */
.modal {
  --bs-modal-color: var(--modal-text);
  --bs-modal-bg: var(--surface);
  --bs-modal-border-color: var(--line);
}

.modal-backdrop.show {
  opacity: 0.62;
}

.custom--modal .modal-content,
.modal-content {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xl) !important;
  color: var(--modal-text) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out) !important;
}

.modal-body {
  color: var(--modal-text) !important;
}

.modal-title,
.modal-body :where(strong, b),
.modal-content .list-group-item :where(strong, b) {
  color: var(--text-strong) !important;
}

.modal-content .list-group-item {
  border-color: var(--line) !important;
  color: var(--modal-text) !important;
  background: var(--surface-pressed) !important;
}

.modal-body :where(p, li, dd, dt, small, .small, .form-text) {
  color: inherit !important;
}

.btn-close,
.modal .close,
.modal-icon {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  place-items: center;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
  opacity: 1 !important;
}

.alert,
[class*="alert--"] {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.alert-success,
.alert--success {
  color: var(--success-text) !important;
  border-color: rgba(var(--neon-rgb), 0.28) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)), var(--accent-soft) !important;
}

.alert-danger,
.alert--danger {
  color: var(--danger-text) !important;
  border-color: rgba(239, 94, 111, 0.32) !important;
  background: var(--tdc-danger-soft) !important;
}

.alert-warning,
.alert--warning {
  color: var(--warning-text) !important;
  border-color: rgba(247, 168, 35, 0.32) !important;
  background: var(--tdc-warning-soft) !important;
}

.alert-info,
.alert--info {
  color: var(--info-text) !important;
  border-color: rgba(20, 121, 255, 0.28) !important;
  background: var(--tdc-info-soft) !important;
}

:where(.alert, [class*="alert--"]) :where(p, span, small, strong, b, a, i) {
  color: inherit !important;
}

.badge,
[class*="badge--"],
[class*="status--"],
.status-badge,
.listing-chip,
.dashboard-chip,
.support-index-chip,
.transactions-chip,
.withdraw-chip,
.deposit-chip,
.deposit-history-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  color: var(--text-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.badge--success,
.badge-success,
.bg-success,
[class*="status--success"] {
  color: var(--success-text) !important;
  border-color: rgba(var(--neon-rgb), 0.28) !important;
  background: var(--accent-soft) !important;
}

html[data-theme="dark"] :where(.badge--success, .badge-success, .bg-success, [class*="status--success"]) {
  color: var(--success-text) !important;
}

.badge--danger,
.badge-danger,
.bg-danger,
[class*="status--danger"] {
  color: var(--danger-text) !important;
  border-color: rgba(239, 94, 111, 0.3) !important;
  background: var(--tdc-danger-soft) !important;
}

.badge--warning,
.badge-warning,
.bg-warning,
[class*="status--warning"] {
  color: var(--warning-text) !important;
  border-color: rgba(247, 168, 35, 0.3) !important;
  background: var(--tdc-warning-soft) !important;
}

html[data-theme="dark"] :where(.badge--warning, .badge-warning, .bg-warning, [class*="status--warning"]) {
  color: var(--warning-text) !important;
}

:where(.badge--info, .badge-info, .bg-info, [class*="status--info"], .badge--primary, .badge-primary) {
  color: var(--info-text) !important;
  border-color: rgba(20, 121, 255, 0.34) !important;
  background: var(--tdc-info-soft) !important;
}

:where(.badge--base, .badge--dark, .badge-dark, .badge--secondary, .badge-secondary) {
  color: var(--badge-text) !important;
  border-color: var(--line) !important;
  background: var(--surface-pressed) !important;
}

:where(
  .badge,
  [class*="badge--"],
  [class*="status--"],
  .status-badge,
  [class*="chip--"],
  [class*="pill--"]
) :where(span, small, strong, b, i) {
  color: inherit !important;
}

.nav-tabs,
.nav-pills {
  gap: 9px;
  border: 0 !important;
}

.nav-tabs .nav-link,
.nav-pills .nav-link,
.seller-create-tab {
  min-height: 44px;
  padding: 10px 15px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--control-raised) !important;
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active,
.seller-create-tab.active {
  color: var(--text) !important;
  border-color: rgba(var(--neon-rgb), 0.36) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.accordion-item,
.custom--accordion .accordion-item {
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.accordion-button,
.custom--accordion .accordion-button,
.accordion-body {
  color: var(--text-2) !important;
  background: transparent !important;
}

.accordion-button:not(.collapsed) {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.tooltip-inner,
.popover {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

/* Data tables */
.table-responsive {
  padding: 10px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.table {
  --bs-table-color: var(--table-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line);
  margin-bottom: 0 !important;
  color: var(--table-text) !important;
  background: transparent !important;
}

.table > :not(caption) > * > * {
  padding: 14px 13px !important;
  border-color: var(--line) !important;
  color: var(--table-text) !important;
  background: transparent !important;
  box-shadow: none !important;
  vertical-align: middle;
}

.table thead th,
.table thead tr th,
[class$="-table"] thead th {
  border-bottom: 1px solid var(--line) !important;
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table thead th:first-child {
  border-radius: 13px 0 0 13px;
}

.table thead th:last-child {
  border-radius: 0 13px 13px 0;
}

.table tbody tr {
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
}

.table tbody tr:last-child {
  border-bottom: 0 !important;
}

.table tbody tr:hover {
  background: rgba(var(--neon-rgb), 0.035) !important;
}

.table :where(.amount, [class*="amount"], [class*="balance"], time) {
  font-variant-numeric: tabular-nums;
}

.table :where(strong, b, a:not(.badge):not(.btn)) {
  color: var(--text-strong) !important;
}

.table :where(small, .small, .text-muted, .text--muted, time) {
  color: var(--text-muted) !important;
}

.table--responsive--md tbody tr td::before,
.table--responsive--lg tbody tr td::before,
.table--responsive--xl tbody tr td::before,
.table--responsive--xxl tbody tr td::before {
  color: var(--text-muted) !important;
}

.table caption {
  color: var(--text-muted) !important;
}

/* Dashboard, wallet, escrow, listing management, inventory, and settings */
.dashboard-shell,
.listing-index-shell,
.deposit-history-shell,
.deposit-shell,
.support-index-page,
.transactions-page,
.withdraw-page,
.withdraw-history-page,
.escrow-index-page,
.escrow-create-page,
.escrow-detail-page,
.inventory-automation-page,
.premium-features-page,
.profile-setting-section {
  color: var(--text-2) !important;
  background: transparent !important;
}

.dashboard-balance-card,
.wallet-balance-card,
.deposit-balance-card,
.withdraw-balance-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px) !important;
  box-shadow: var(--shadow-out) !important;
}

.dashboard-balance-card::after,
.wallet-balance-card::after,
.deposit-balance-card::after,
.withdraw-balance-card::after,
.premium-feature-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  z-index: -1;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--neon-rgb), 0.18), transparent 68%);
}

.dashboard-balance-card h3,
.wallet-balance-card h3,
.deposit-balance-card h3,
.withdraw-balance-card h3,
[class$="__value"],
[class*="balance"] strong {
  color: var(--text) !important;
  font-variant-numeric: tabular-nums;
}

.dashboard-metric-card,
.listing-summary-card,
.deposit-history-summary-card,
.support-index-summary-card,
.transactions-summary-card,
.withdraw-history-summary-card {
  height: 100%;
  min-height: 126px;
  padding: 21px !important;
}

.dashboard-quick-action,
.dashboard-health-item,
.withdraw-method-list__item,
.payment-item,
.listing-record,
.deposit-record,
.transaction-record,
.withdraw-record,
.support-ticket-record {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-2) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.dashboard-quick-action {
  min-height: 82px;
  padding: 15px !important;
}

.dashboard-progress,
.progress {
  overflow: hidden;
  height: 9px;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.progress-bar,
.dashboard-progress__bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important;
  box-shadow: 0 0 20px rgba(var(--neon-rgb), 0.28);
}

.profile-setting__sidebar,
.sidebar-menu {
  padding: 16px !important;
}

.profile-setting__content {
  padding: clamp(20px, 4vw, 34px) !important;
}

.profile-setting__sidebar .list-group-item,
.sidebar-menu__item,
.setting-list__item,
.account-list__item {
  border: 0 !important;
  color: var(--text-2) !important;
  background: transparent !important;
}

.seller-create-hero__content,
.seller-create-hero__aside,
.seller-create-card,
.seller-create-note,
.seller-create-checklist,
.create-listing-section,
.create-listing-destination,
.create-listing-upload,
.create-listing-editor,
.create-listing-price-group,
.create-listing-tags {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.create-listing-section {
  padding: clamp(20px, 3vw, 30px) !important;
}

.create-listing-section__head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line) !important;
}

.create-listing-upload__trigger,
.create-listing-editor__tool,
.seller-toggle {
  border-color: var(--line) !important;
  color: var(--text-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.escrow-create__summary-row,
.escrow-detail-simple__row,
.wallet-cell,
.deposit-info__item,
.withdraw-history-detail-item {
  padding: 12px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.escrow-create__summary-value,
.escrow-detail-simple__value,
.withdraw-history-detail-item__value {
  color: var(--text) !important;
  font-weight: 800;
}

.inventory-grid-shell,
.inventory-entry-panel,
.inventory-saved-panel {
  overflow: visible;
  padding: 16px !important;
}

.inventory-grid-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.inventory-product-input {
  min-width: 280px;
}

.inventory-entry-row--invalid {
  background: var(--tdc-danger-soft) !important;
}

.inventory-entry-row--duplicate {
  background: var(--tdc-warning-soft) !important;
}

.premium-feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(23px, 4vw, 36px) !important;
  border-color: rgba(var(--neon-rgb), 0.22) !important;
}

/* Normalize page-local legacy palettes onto the shared token system. */
.profile-setting-section.account-polish {
  --account-surface: var(--surface-raised) !important;
  --account-surface-soft: var(--surface-pressed) !important;
  --account-surface-softer: var(--surface) !important;
  --account-border: var(--line) !important;
  --account-text: var(--text) !important;
  --account-muted: var(--text-2) !important;
  --account-shadow: var(--shadow-out-sm) !important;
  background: transparent !important;
}

.dashboard-shell {
  --dashboard-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --dashboard-surface-soft: var(--surface) !important;
  --dashboard-surface-muted: var(--surface-pressed) !important;
  --dashboard-border: var(--line) !important;
  --dashboard-border-strong: rgba(var(--neon-rgb), 0.24) !important;
  --dashboard-muted: var(--text-2) !important;
  --dashboard-muted-strong: var(--text) !important;
  --dashboard-shadow: var(--shadow-out-sm) !important;
}

.listing-index-shell {
  --listing-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --listing-surface-soft: var(--surface-pressed) !important;
  --listing-border: var(--line) !important;
  --listing-border-strong: rgba(var(--neon-rgb), 0.24) !important;
  --listing-muted: var(--text-2) !important;
  --listing-muted-strong: var(--text) !important;
  --listing-shadow: var(--shadow-out-sm) !important;
}

.deposit-shell {
  --deposit-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --deposit-border: var(--line) !important;
  --deposit-border-strong: rgba(var(--neon-rgb), 0.24) !important;
  --deposit-muted: var(--text-2) !important;
  --deposit-muted-strong: var(--text) !important;
  --deposit-shadow: var(--shadow-out-sm) !important;
}

.deposit-history-shell {
  --deposit-history-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --deposit-history-border: var(--line) !important;
  --deposit-history-muted: var(--text-2) !important;
  --deposit-history-muted-strong: var(--text) !important;
  --deposit-history-shadow: var(--shadow-out-sm) !important;
}

.support-index-page {
  --support-index-bg: transparent !important;
  --support-index-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --support-index-border: var(--line) !important;
  --support-index-text: var(--text) !important;
  --support-index-muted: var(--text-2) !important;
  --support-index-accent: var(--accent-2) !important;
  --support-index-warning: var(--warning) !important;
  --support-index-danger: var(--danger) !important;
  --support-index-info: var(--accent-2) !important;
  --support-index-shadow: var(--shadow-out-sm) !important;
}

.transactions-page {
  --transactions-bg: transparent !important;
  --transactions-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --transactions-soft-surface: var(--surface-pressed) !important;
  --transactions-table-shell-bg: var(--surface) !important;
  --transactions-row-bg: transparent !important;
  --transactions-row-bg-hover: rgba(var(--neon-rgb), 0.035) !important;
  --transactions-border: var(--line) !important;
  --transactions-soft-border: var(--line) !important;
  --transactions-row-border: var(--line) !important;
  --transactions-row-border-hover: rgba(var(--neon-rgb), 0.22) !important;
  --transactions-text: var(--text) !important;
  --transactions-muted: var(--text-2) !important;
  --transactions-accent: var(--accent-2) !important;
  --transactions-warning: var(--warning) !important;
  --transactions-danger: var(--danger) !important;
  --transactions-info: var(--accent-2) !important;
  --transactions-shadow: var(--shadow-out-sm) !important;
}

.withdraw-page {
  --withdraw-bg: transparent !important;
  --withdraw-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --withdraw-surface-soft: var(--surface-pressed) !important;
  --withdraw-surface-strong: var(--surface-raised) !important;
  --withdraw-border: var(--line) !important;
  --withdraw-text: var(--text) !important;
  --withdraw-muted: var(--text-2) !important;
  --withdraw-accent: var(--accent-2) !important;
  --withdraw-accent-soft: var(--tdc-info-soft) !important;
  --withdraw-accent-strong: var(--neon) !important;
  --withdraw-warning: var(--warning) !important;
  --withdraw-danger: var(--danger) !important;
  --withdraw-shadow: var(--shadow-out) !important;
  --withdraw-shadow-soft: var(--shadow-out-sm) !important;
}

.withdraw-history-page {
  --withdraw-history-bg: transparent !important;
  --withdraw-history-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --withdraw-history-surface-soft: var(--surface-pressed) !important;
  --withdraw-history-surface-strong: var(--surface-raised) !important;
  --withdraw-history-border: var(--line) !important;
  --withdraw-history-text: var(--text) !important;
  --withdraw-history-muted: var(--text-2) !important;
  --withdraw-history-accent: var(--accent-2) !important;
  --withdraw-history-accent-soft: var(--tdc-info-soft) !important;
  --withdraw-history-warning: var(--warning) !important;
  --withdraw-history-danger: var(--danger) !important;
  --withdraw-history-info: var(--accent-2) !important;
  --withdraw-history-shadow: var(--shadow-out-sm) !important;
}

.escrow-create-page,
.escrow-index-page,
.escrow-detail-page,
.escrow-detail-simple {
  --escrow-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --escrow-surface-soft: var(--surface-pressed) !important;
  --escrow-border: var(--line) !important;
  --escrow-copy: var(--text) !important;
  --escrow-muted: var(--text-2) !important;
  --escrow-shadow: var(--shadow-out-sm) !important;
}

.twofactor-page,
.twofactor-shell {
  --twofactor-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --twofactor-page-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --twofactor-page-surface-soft: var(--surface-pressed) !important;
  --twofactor-border: var(--line) !important;
  --twofactor-page-border: var(--line) !important;
  --twofactor-copy: var(--text) !important;
  --twofactor-page-text: var(--text) !important;
  --twofactor-muted: var(--text-2) !important;
  --twofactor-page-muted: var(--text-2) !important;
  --twofactor-shadow: var(--shadow-out-sm) !important;
  --twofactor-page-shadow: var(--shadow-out-sm) !important;
}

.profile-overview-page,
.profile-overview-card,
.general-profile-page {
  --profile-overview-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --profile-overview-border: var(--line) !important;
  --profile-overview-muted: var(--text-2) !important;
  --profile-overview-shadow: var(--shadow-out-sm) !important;
  --profile-surface: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  --profile-surface-soft: var(--surface-pressed) !important;
  --profile-border: var(--line) !important;
  --profile-copy: var(--text) !important;
  --profile-copy-muted: var(--text-2) !important;
  --profile-shadow: var(--shadow-out-sm) !important;
}

/* Listing-detail and reusable marketplace-card overrides. */
.market-detail-shell,
.market-gallery-card,
.market-detail-sidebar,
.market-content-card,
.market-related-shell,
.market-related-card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.market-detail-shell,
.market-related-shell {
  padding: clamp(16px, 3vw, 26px) !important;
}

.market-info-box,
.market-url-box,
.market-auction-box,
.market-price-panel,
.market-payment-box,
.market-bid-box,
.market-account-info-box,
.market-mini-stat,
.market-fee-summary,
.market-delivery-estimate,
.market-quantity-modal__summary,
.market-review-card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-2) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-detail-title,
.market-info-box .value,
.market-price-panel__value,
.market-related-card__title a,
.market-related-card__seller-name,
.market-related-card__pricebox .value,
.market-review-card__name {
  color: var(--text) !important;
}

.market-info-box .label,
.market-url-box .label,
.market-detail-chip,
.market-related-card__meta,
.market-related-card__seller-joined,
.market-related-card__pricebox .label,
.market-review-card__date {
  color: var(--muted) !important;
}

.market-gallery-main__item,
.market-gallery-thumb__item,
.market-related-card__thumb {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-related-card__body {
  padding: 18px !important;
  color: var(--text-2) !important;
  background: transparent !important;
}

.market-related-card__seller,
.market-seller-card,
.market-seller-profile,
.remaining-time .box {
  border-color: var(--line) !important;
  color: var(--text-secondary) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-seller-card__content h5,
.market-seller-profile__content h4,
.market-related-card__rating,
.market-seller-card__rating,
.market-seller-profile__rating,
.remaining-time .box span {
  color: var(--text-strong) !important;
}

.market-related-stars i.is-active,
.market-stars i.is-active {
  color: var(--warning-text) !important;
  text-shadow: none !important;
}

.market-url-box a,
.market-info-list .value a {
  color: var(--link) !important;
}

.market-url-box a:hover,
.market-info-list .value a:hover {
  color: var(--link-hover) !important;
}

.market-tabs .nav-link {
  border-color: var(--line) !important;
  color: var(--text-secondary) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--control-raised) !important;
}

html body[class] .market-detail-page :where(
  .market-qty-box .form-control,
  .market-form-control,
  .market-review-form .form--control,
  .market-quantity-control input
) {
  border-color: var(--line) !important;
  color: var(--input-text) !important;
  background: var(--surface-pressed) !important;
  -webkit-text-fill-color: var(--input-text) !important;
  box-shadow: var(--shadow-in) !important;
}

/* Seller storefront still ships with a page-local dark palette. */
.seller-store {
  color: var(--text-secondary) !important;
  background: transparent !important;
}

.seller-store__header,
.seller-listing-card {
  border-color: var(--line) !important;
  color: var(--text-secondary) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

.seller-store__stat,
.seller-store__type-summary span,
.seller-listing-card__image {
  border-color: var(--line) !important;
  color: var(--text-secondary) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.seller-store__title-block h1,
.seller-store__section-head h2,
.seller-listing-card h3,
.seller-listing-card__footer strong,
.seller-store__stat strong {
  color: var(--text-strong) !important;
}

.seller-store__meta,
.seller-store__rating-row,
.seller-store__type-summary,
.seller-listing-card__meta,
.seller-store__stat span,
.seller-listing-card__footer span,
.seller-listing-card__date {
  color: var(--text-muted) !important;
}

.seller-store__eyebrow,
.seller-store__section-head > span {
  color: var(--success-text) !important;
}

.market-related-card__badge,
.market-related-card__verify,
.market-detail-badge,
.market-detail-chip {
  color: var(--text-2) !important;
  border: 1px solid var(--line) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

.market-related-card__action,
.market-main-btn,
.market-report-btn,
.market-seller-store-link,
.market-gallery-arrow,
.market-quantity-control__btn,
.market-quantity-modal__confirm {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px !important;
  border: 1px solid rgba(var(--neon-rgb), 0.26) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--control-raised) !important;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  :where(.market-related-card__action, .market-main-btn, .market-report-btn, .market-seller-store-link, .market-gallery-arrow, .market-quantity-control__btn, .market-quantity-modal__confirm):hover {
    color: var(--text) !important;
    background: var(--surface-pressed) !important;
    border-color: rgba(var(--neon-rgb), 0.95) !important;
    box-shadow: var(--control-hover), var(--neon-hover) !important;
    transform: translateY(2px) scale(0.995);
  }
}

:where(.market-related-card__action, .market-main-btn, .market-report-btn, .market-seller-store-link, .market-gallery-arrow, .market-quantity-control__btn, .market-quantity-modal__confirm):active {
  background: var(--surface-pressed) !important;
  border-color: var(--neon) !important;
  box-shadow: var(--control-active), var(--neon-active) !important;
  transform: translateY(3px) scale(0.982);
}

/* Profile completion and other setup cards that carry page-local CSS. */
.profile-completion-page {
  min-height: auto !important;
  background: transparent !important;
}

.profile-completion-card {
  overflow: visible !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xl) !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out) !important;
}

.profile-completion-card__header,
.profile-completion-field,
.profile-completion-phone-group .input-group-text {
  border-color: var(--line) !important;
  color: var(--text-2) !important;
  background: transparent !important;
}

.profile-completion-card__header h2,
.profile-completion-card__eyebrow {
  color: var(--text) !important;
}

.profile-completion-card__header p {
  color: var(--text-2) !important;
}

.profile-completion-input,
.profile-completion-phone-group .form--control {
  border-color: var(--line) !important;
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

/* Footer */
.footer-area {
  width: min(calc(100% - 40px), 1440px);
  margin: 46px auto 24px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  color: var(--text-2);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out);
}

.footer-area .py-60 {
  padding: 34px 30px !important;
}

.footer-item__logo {
  max-width: 170px;
  margin-bottom: 18px;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
}

.footer-menu__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 4px;
  color: var(--text-2) !important;
  font-weight: 700;
}

.footer-menu__link:hover {
  color: var(--text) !important;
}

.language-wrapper {
  min-width: 210px;
  padding: 8px 13px !important;
}

.footer-language-search {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
}

.language_text,
.language_text_select,
.language-empty,
.bottom-footer-text p {
  color: var(--text-2) !important;
}

.bottom-footer {
  padding: 14px 30px !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

/* Miscellaneous global UI */
.breadcrumb {
  width: min(calc(100% - 40px), 1440px);
  min-height: 108px !important;
  margin: 26px auto 0;
  padding: 26px 30px !important;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xl) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--shadow-out) !important;
}

.breadcrumb::before,
.breadcrumb::after {
  opacity: 0.18 !important;
}

.breadcrumb__link,
.breadcrumb__item {
  color: var(--text-2) !important;
}

.breadcrumb__item:last-child {
  color: var(--text) !important;
}

.scroll-top {
  right: 20px !important;
  bottom: 20px !important;
  width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
}

.cookies-card {
  right: 20px !important;
  bottom: 78px !important;
  max-width: min(390px, calc(100vw - 32px));
  padding: 22px !important;
}

.rich-text-field,
.ck.ck-editor,
.trix-content {
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  --rich-text-toolbar-bg: var(--surface-raised);
  --rich-text-toolbar-border: var(--line);
  --rich-text-toolbar-button-bg: var(--surface);
  --rich-text-toolbar-button-bg-hover: var(--surface-pressed);
  --rich-text-toolbar-button-border: var(--line);
  --rich-text-toolbar-button-border-active: rgba(var(--neon-rgb), 0.4);
}

[aria-busy="true"] {
  cursor: progress;
}

[aria-busy="true"] :where(button[type="submit"], input[type="submit"]) {
  pointer-events: none;
  opacity: 0.7;
}

/* Responsive system */
@media (max-width: 1399px) and (min-width: 1200px) {
  .site-header__cta-group {
    display: none !important;
  }

  .header .nav-item .nav-link {
    padding-inline: 10px !important;
    font-size: 0.8rem;
  }
}

@media (max-width: 1199px) {
  .header,
  .header.fixed-header {
    top: 10px !important;
    margin-top: 10px !important;
  }

  .site-header__theme-toggle.d-xl-none {
    display: inline-flex !important;
    margin-left: auto;
  }

  .site-header__collapse {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    padding: 16px !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
    background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
    box-shadow: var(--shadow-out) !important;
  }

  .site-header__menu {
    align-items: stretch !important;
    gap: 6px;
  }

  .header .nav-item .nav-link {
    width: 100%;
  }

  .site-header__mobile-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .site-header__mobile-actions .btn {
    width: 100%;
  }

  .market-hero-search {
    grid-template-columns: 1fr 1fr;
  }

  .market-hero-search__field--search,
  .market-hero-search__button {
    grid-column: span 2;
  }
}

@media (max-width: 991px) {
  .py-120 {
    padding-top: 62px !important;
    padding-bottom: 62px !important;
  }

  .banner-shell {
    padding: 36px 28px;
  }

  .banner-content__title {
    font-size: clamp(2.5rem, 8vw, 4rem) !important;
  }

  .footer-item > .flex-between,
  .footer-item > .flex-center {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .bottom-footer .row > div,
  .footer-menu.style-right {
    text-align: left !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 767px) {
  .container {
    width: min(100% - 22px, 1440px) !important;
  }

  .header,
  .header.fixed-header,
  .footer-area,
  .breadcrumb {
    width: min(calc(100% - 22px), 1440px) !important;
  }

  .header,
  .header.fixed-header {
    border-radius: 20px !important;
  }

  .header .navbar-brand.logo {
    max-width: 125px;
    margin-right: 0;
  }

  .account-inner {
    min-height: calc(100dvh - 72px);
  }

  .account-section {
    padding: 36px 0 !important;
  }

  .account-form {
    padding: 25px 20px !important;
  }

  .banner-section {
    padding-top: 28px !important;
  }

  .banner-shell,
  .market-hero-panel {
    padding: 30px 23px !important;
  }

  .banner-content__title {
    font-size: clamp(2.35rem, 12vw, 3.15rem) !important;
  }

  .banner-content__desc,
  body {
    font-size: 0.96rem;
  }

  .banner-content__form,
  .cta-left .input-group {
    align-items: stretch;
    flex-direction: column;
  }

  .banner-content__form .form--control {
    width: 100%;
    flex: 0 0 auto;
  }

  .banner-content__form .btn,
  .cta-left .input-group .btn {
    width: 100%;
  }

  .market-hero-search {
    grid-template-columns: 1fr;
  }

  .market-hero-search__field--search,
  .market-hero-search__button {
    grid-column: auto;
  }

  .market-thread-board {
    padding: 8px !important;
  }

  .market-thread-row {
    padding: 14px !important;
  }

  .table-responsive {
    padding: 7px;
  }

  .modal-dialog {
    margin: 11px !important;
  }

  .modal-content {
    max-height: calc(100dvh - 22px);
    overflow-y: auto !important;
  }

  .footer-area {
    margin-top: 28px;
    border-radius: 22px;
  }

  .footer-area .py-60,
  .bottom-footer {
    padding: 24px 18px !important;
  }

  .language-wrapper {
    width: 100%;
    min-width: 0;
  }

  .langList_dropdow {
    width: min(320px, calc(100vw - 44px));
  }

  .breadcrumb {
    min-height: 90px !important;
    padding: 22px 20px !important;
    border-radius: 22px !important;
  }

  .cookies-card {
    right: 16px !important;
    left: 16px !important;
    bottom: 72px !important;
    width: auto;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 16px, 1440px) !important;
  }

  .header,
  .header.fixed-header,
  .footer-area,
  .breadcrumb {
    width: min(calc(100% - 16px), 1440px) !important;
  }

  .site-header__container {
    padding: 0 10px !important;
  }

  .header .navbar {
    gap: 7px;
  }

  .header .navbar-brand.logo {
    max-width: 105px;
  }

  .header-account-button .account-icon {
    display: none !important;
  }

  .header-account-button .btn span {
    display: none;
  }

  .header-account-button .btn {
    width: 44px;
    min-width: 44px;
    padding: 0 !important;
  }

  .site-header__mobile-actions {
    grid-template-columns: 1fr;
  }

  .banner-content__button .btn,
  .market-hero-search__button {
    width: 100%;
  }

  .section-heading__title {
    font-size: 1.75rem !important;
  }

  .dashboard-metric-card,
  .listing-summary-card,
  .deposit-history-summary-card,
  .support-index-summary-card,
  .transactions-summary-card,
  .withdraw-history-summary-card {
    min-height: 112px;
  }

  .tdc-auth-theme-toggle {
    top: 10px;
    right: 10px;
  }

  .scroll-top {
    right: 10px !important;
    bottom: 10px !important;
  }
}

/* Cheaper effects for mobile, touch-first, and motion-sensitive clients. */
@media (max-width: 767px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  html[data-theme="light"] {
    --shadow-out: 0 8px 20px rgba(145, 159, 172, 0.24);
    --shadow-out-sm: 0 4px 12px rgba(145, 159, 172, 0.22);
    --shadow-in: inset 0 2px 6px rgba(145, 159, 172, 0.25);
    --control-raised: 0 4px 12px rgba(145, 159, 172, 0.24);
    --control-hover: inset 0 2px 6px rgba(145, 159, 172, 0.24);
    --control-active: inset 0 3px 8px rgba(145, 159, 172, 0.3);
    --neon-hover: 0 0 0 1px rgba(0, 255, 149, 0.78), 0 0 10px rgba(0, 255, 149, 0.28);
    --neon-active: 0 0 0 1px rgba(0, 255, 149, 0.9), 0 0 8px rgba(0, 255, 149, 0.34);
  }

  html[data-theme="dark"] {
    --shadow-out: 0 8px 20px rgba(0, 0, 0, 0.38);
    --shadow-out-sm: 0 4px 12px rgba(0, 0, 0, 0.34);
    --shadow-in: inset 0 2px 6px rgba(0, 0, 0, 0.42);
    --control-raised: 0 4px 12px rgba(0, 0, 0, 0.4);
    --control-hover: inset 0 2px 6px rgba(0, 0, 0, 0.44);
    --control-active: inset 0 3px 8px rgba(0, 0, 0, 0.5);
    --neon-hover: 0 0 0 1px rgba(0, 255, 149, 0.82), 0 0 10px rgba(0, 255, 149, 0.32);
    --neon-active: 0 0 0 1px rgba(0, 255, 149, 0.94), 0 0 8px rgba(0, 255, 149, 0.38);
  }

  body {
    background: linear-gradient(145deg, var(--bg), var(--bg-2)) !important;
    background-attachment: scroll !important;
    transition-duration: 0.18s;
  }

  body::before {
    display: none;
  }

  .header,
  .header.fixed-header,
  .body-overlay,
  .sidebar-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .header,
  .header.fixed-header {
    background: var(--surface) !important;
  }

  .banner-shell::after,
  .market-hero-panel::after,
  .dashboard-balance-card::after,
  .wallet-balance-card::after,
  .deposit-balance-card::after,
  .withdraw-balance-card::after,
  .premium-feature-card::after {
    filter: none !important;
    opacity: 0.55;
  }

  :where(.btn, button, a, input, select, textarea, .market-thread-row--clickable) {
    transition-duration: 0.16s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  :where(.btn, button, a, .market-thread-row--clickable):hover,
  :where(.btn, button, a, .market-thread-row--clickable):active {
    transform: none !important;
  }
}

/* Premium Features progressive-disclosure page (2026-07-21). */
.premium-features-page__container {
  max-width: 1120px;
}

.premium-feature-tabs {
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.premium-feature-tabs .nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: max-content;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-pressed);
}

.premium-feature-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  font-weight: 700;
  white-space: nowrap;
}

.premium-feature-tabs .nav-link:hover {
  border-color: var(--line) !important;
  color: var(--text) !important;
  background: var(--surface-raised) !important;
}

.premium-feature-tabs .nav-link.active {
  border-color: rgba(var(--neon-rgb), 0.72) !important;
  color: var(--text-strong) !important;
  background: var(--surface-raised) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--neon-rgb), 0.12);
}

.premium-feature-tabs .nav-link:focus-visible,
.premium-feature-disclosure__toggle:focus-visible,
.premium-past-features > summary:focus-visible,
.premium-custom-frame-advanced > summary:focus-visible {
  outline: 3px solid var(--neon) !important;
  outline-offset: 2px;
}

.premium-feature-tab-content > .tab-pane {
  min-width: 0;
}

.premium-feature-tab-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.premium-feature-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.premium-feature-disclosure {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-out-sm);
  scroll-margin-top: 92px;
  overflow: clip;
}

.premium-feature-disclosure.is-active,
.premium-feature-disclosure--owned {
  border-color: rgba(var(--neon-rgb), 0.46);
}

.premium-feature-disclosure__toggle {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 92px;
  padding: 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.premium-feature-disclosure__toggle:hover {
  background: rgba(var(--neon-rgb), 0.035);
}

.premium-feature-disclosure__summary,
.premium-feature-disclosure__heading > span:first-child {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.premium-feature-disclosure__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.premium-feature-disclosure__heading .h5,
.premium-feature-disclosure__description {
  overflow-wrap: anywhere;
}

.premium-feature-disclosure__description {
  color: var(--text-secondary);
  line-height: 1.5;
}

.premium-feature-disclosure__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.premium-feature-disclosure__meta strong {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.premium-feature-disclosure__action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 44px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.premium-feature-disclosure__action i {
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 180ms ease;
}

.premium-feature-disclosure__toggle[aria-expanded="true"] .premium-feature-disclosure__action i {
  transform: rotate(180deg);
}

.premium-feature-disclosure__panel {
  border-top: 1px solid var(--line);
}

.premium-feature-disclosure__body {
  display: grid;
  gap: 18px;
  padding: clamp(16px, 3vw, 26px);
}

.premium-feature-disclosure__full-description {
  max-width: 75ch;
  margin: 0;
  color: var(--text-secondary);
}

.premium-feature-disclosure__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.premium-feature-disclosure__links .btn {
  min-height: 44px;
}

.premium-feature-plan-selector__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.premium-feature-plan-choice {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.premium-feature-plan-choice > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.premium-feature-plan-choice__body {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-secondary);
  background: var(--surface-pressed);
}

.premium-feature-plan-choice__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.premium-feature-plan-choice__price {
  color: var(--text-strong);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.premium-feature-plan-choice > input:checked + .premium-feature-plan-choice__body {
  border-color: rgba(var(--neon-rgb), 0.78);
  box-shadow: inset 0 0 0 1px rgba(var(--neon-rgb), 0.16);
}

.premium-feature-plan-choice > input:focus-visible + .premium-feature-plan-choice__body {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
}

.premium-feature-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.premium-feature-detail-facts > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
}

.premium-feature-detail-facts dt,
.premium-feature-detail-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.premium-feature-detail-facts dt {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.premium-feature-detail-facts dd {
  margin-top: 4px;
  color: var(--text-strong);
  font-weight: 700;
}

.premium-current-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
}

.premium-current-preview__label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.premium-custom-frame-advanced,
.premium-past-features {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
  overflow: clip;
}

.premium-custom-frame-advanced > summary,
.premium-past-features > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text-strong);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.premium-custom-frame-advanced > summary::-webkit-details-marker,
.premium-past-features > summary::-webkit-details-marker {
  display: none;
}

.premium-custom-frame-fit,
.premium-past-features__body {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.premium-feature-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: clamp(28px, 7vw, 56px) 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface-pressed);
  text-align: center;
}

.premium-feature-empty-state > i {
  color: var(--accent);
  font-size: 2.25rem;
}

.premium-feature-empty-state .btn {
  min-height: 44px;
}

@media (max-width: 767px) {
  .premium-feature-disclosure__toggle {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
    min-height: 88px;
    padding: 14px;
  }

  .premium-feature-disclosure__toggle .user-feature-card__icon {
    width: 44px;
    height: 44px;
  }

  .premium-feature-disclosure__action {
    grid-column: 2;
    justify-content: flex-start;
  }

  .premium-feature-disclosure__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .premium-feature-plan-selector__grid,
  .premium-feature-detail-facts {
    grid-template-columns: 1fr;
  }

  .premium-feature-disclosure__links {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .premium-feature-tabs .nav-link {
    min-width: 230px;
  }

  .premium-feature-disclosure__meta {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-feature-disclosure__panel.collapsing {
    transition: none !important;
  }

  .premium-feature-disclosure__action i {
    transition: none;
  }
}

/* Premium Feature interactive previews. All cosmetic selectors stay component-scoped. */
.premium-live-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-secondary);
  background: var(--surface-pressed);
}

.premium-live-preview__header,
.premium-live-preview__notice,
.premium-live-preview__confirmation dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.premium-live-preview__header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.premium-live-preview__reset,
.premium-live-preview__option {
  min-height: 44px;
  touch-action: manipulation;
}

.premium-live-preview__notice {
  justify-content: flex-start;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--neon-rgb), 0.35);
  border-radius: 10px;
  color: var(--text);
  background: rgba(var(--neon-rgb), 0.06);
}

.premium-live-preview__comparison,
.premium-live-preview__capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.premium-live-preview__pane,
.premium-live-preview__capability-grid > div,
.premium-live-preview__profile,
.premium-live-preview__post {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.premium-live-preview__pane,
.premium-live-preview__capability-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.premium-live-preview__pane > span,
.premium-live-preview__capability-grid span,
.premium-live-preview__profile > span,
.premium-live-preview__pane small,
.premium-live-preview__capability-grid small,
.premium-live-preview__avatar-comparison small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.premium-live-preview :is(.is-premium, .premium-live-preview__pane.is-premium) {
  border-color: rgba(var(--neon-rgb), 0.52);
  box-shadow: inset 0 0 0 1px rgba(var(--neon-rgb), 0.08);
}

.premium-live-preview__styled-text {
  color: var(--user-feature-style-color, var(--text-strong)) !important;
  overflow-wrap: anywhere;
}

.premium-live-preview__styled-text.is-bold { font-weight: 800; }
.premium-live-preview__styled-text.is-italic { font-style: italic; }
.premium-live-preview__styled-text.has-glow-soft { text-shadow: 0 0 2px var(--user-feature-glow-color, currentColor), 0 0 6px var(--user-feature-glow-color, currentColor); }
.premium-live-preview__styled-text.has-glow-medium { text-shadow: 0 0 2px var(--user-feature-glow-color, currentColor), 0 0 7px var(--user-feature-glow-color, currentColor), 0 0 13px var(--user-feature-glow-color, currentColor); }
.premium-live-preview__styled-text.has-glow-strong { text-shadow: 0 0 2px var(--user-feature-glow-color, currentColor), 0 0 8px var(--user-feature-glow-color, currentColor), 0 0 16px var(--user-feature-glow-color, currentColor), 0 0 25px var(--user-feature-glow-color, currentColor); }

.premium-live-preview__color-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.premium-live-preview__color-facts > span:not(.premium-live-preview__color-swatch) {
  display: grid;
  gap: 1px;
}

.premium-live-preview__color-facts small { color: var(--text-muted); }
.premium-live-preview__color-facts strong { color: var(--text-strong); font-variant-numeric: tabular-nums; }

.premium-live-preview__color-swatch {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--surface-raised);
  border-radius: 50%;
  background: var(--preview-selected-color, transparent);
  box-shadow: 0 0 0 1px var(--line);
}

.premium-live-preview__color-swatch--glow {
  background: var(--preview-glow-color, transparent);
}

.premium-live-preview__readability-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--warning-text);
  font-size: 0.82rem;
}

.premium-live-preview__readability-note[hidden] { display: none !important; }

.premium-live-preview__avatar-comparison {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.premium-live-preview__avatar-comparison > div {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.premium-live-preview__avatar-comparison > div > img,
.premium-live-preview__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.premium-live-preview__avatar-tester {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.premium-live-preview__avatar-tester[hidden] { display: none !important; }
.premium-live-preview__avatar-tester > img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.premium-live-preview__avatar-tester dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin: 0; }
.premium-live-preview__avatar-tester dl > div { min-width: 0; }
.premium-live-preview__avatar-tester :is(dt, dd) { margin: 0; overflow-wrap: anywhere; }
.premium-live-preview__avatar-tester dt { color: var(--text-muted); font-size: 0.75rem; }
.premium-live-preview__avatar-tester dd { color: var(--text-strong); font-weight: 700; }
.premium-live-preview__avatar-tester .premium-live-preview__eligibility { grid-column: 1 / -1; }

.premium-live-preview__eligibility {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text-secondary);
  background: var(--surface-pressed);
}

.premium-live-preview__eligibility.is-accepted { border-color: rgba(var(--neon-rgb), 0.48); color: var(--success-text); }
.premium-live-preview__eligibility.is-rejected { border-color: var(--danger-text); color: var(--danger-text); }

.premium-live-preview__option-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.premium-live-preview__option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.premium-live-preview__option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-secondary);
  background: var(--surface-raised);
  cursor: pointer;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, background-color 180ms ease-out;
}

.premium-live-preview__option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(var(--neon-rgb), 0.08);
  box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.16);
}

.premium-live-preview__option:focus-visible,
.premium-live-preview :is(input, select, textarea, button):focus-visible {
  outline: 3px solid rgba(var(--neon-rgb), 0.55);
  outline-offset: 2px;
}

.premium-avatar-frame-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.premium-avatar-frame-gallery__option {
  min-height: 74px;
  justify-content: flex-start;
  text-align: left;
}

.premium-avatar-frame-gallery__option > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.premium-avatar-frame-gallery__option strong,
.premium-avatar-frame-gallery__option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-custom-frame-fit {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-pressed);
}

.premium-custom-frame-fit__control {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(120px, 2fr) 48px;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.premium-custom-frame-fit__control output {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 575px) {
  .premium-avatar-frame-gallery { grid-template-columns: 1fr; }
  .premium-custom-frame-fit__control { grid-template-columns: 1fr 48px; }
  .premium-custom-frame-fit__control > span { grid-column: 1 / -1; }
}

.premium-live-preview__custom-icon,
.premium-live-preview__swatch {
  display: inline-grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 10px;
}

.premium-live-preview__post p { margin: 4px 0; }
.premium-live-preview__post .user-feature-signature { white-space: pre-line; overflow-wrap: anywhere; }

.premium-live-preview__profile-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-pressed);
}

.premium-live-preview .tdc-premium-preview-theme--emerald .premium-live-preview__profile-header,
.premium-live-preview .premium-live-preview__swatch.tdc-premium-preview-theme--emerald {
  border-color: #159d68;
  box-shadow: inset 0 0 22px rgba(21, 157, 104, 0.13);
}

.premium-live-preview .tdc-premium-preview-theme--midnight .premium-live-preview__profile-header,
.premium-live-preview .premium-live-preview__swatch.tdc-premium-preview-theme--midnight {
  border-color: #3d73d8;
  box-shadow: inset 0 0 22px rgba(61, 115, 216, 0.14);
}

.premium-live-preview .tdc-premium-preview-theme--platinum .premium-live-preview__profile-header,
.premium-live-preview .premium-live-preview__swatch.tdc-premium-preview-theme--platinum {
  border-color: #81909f;
  box-shadow: inset 0 0 22px rgba(129, 144, 159, 0.16);
}

.premium-live-preview .tdc-premium-preview-theme--royal .premium-live-preview__profile-header,
.premium-live-preview .premium-live-preview__swatch.tdc-premium-preview-theme--royal {
  border-color: #9e72d6;
  box-shadow: inset 0 0 22px rgba(158, 114, 214, 0.15);
}

.premium-live-preview__confirmation {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.premium-live-preview__confirmation dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 8px;
}

.premium-live-preview__confirmation dl > div { align-items: flex-start; }
.premium-live-preview__confirmation :is(dt, dd) { margin: 0; overflow-wrap: anywhere; }
.premium-live-preview__confirmation dt { color: var(--text-muted); font-size: 0.78rem; }
.premium-live-preview__confirmation dd { color: var(--text); font-weight: 700; text-align: right; }

.premium-feature-payment-modal .modal-content {
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text-secondary);
  background: var(--surface-raised);
  box-shadow: var(--shadow-out);
}

.premium-feature-payment-modal .modal-header,
.premium-feature-payment-modal .modal-footer {
  gap: 12px;
  border-color: var(--line);
}

.premium-feature-payment-modal .modal-title { color: var(--text-strong); }

.premium-feature-payment-modal .btn-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 50%;
  opacity: 0.78;
}

.premium-feature-payment-modal .btn-close:focus-visible,
.premium-feature-payment-modal .btn:focus-visible {
  outline: 3px solid rgba(var(--neon-rgb), 0.55);
  outline-offset: 2px;
  box-shadow: none;
}

.premium-feature-payment-modal__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  margin: 0;
}

.premium-feature-payment-modal__facts > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-pressed);
}

.premium-feature-payment-modal__facts > .premium-feature-payment-modal__configuration { grid-column: 1 / -1; }
.premium-feature-payment-modal__facts :is(dt, dd) { margin: 0; overflow-wrap: anywhere; }
.premium-feature-payment-modal__facts dt { color: var(--text-muted); font-size: 0.78rem; }
.premium-feature-payment-modal__facts dd { color: var(--text-strong); font-weight: 700; text-align: right; }
.premium-feature-payment-modal .modal-footer .btn { min-height: 44px; }

@media (max-width: 991px) {
  .premium-live-preview__option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
  .premium-live-preview__header { align-items: flex-start; flex-direction: column; }
  .premium-live-preview__reset { width: 100%; }
  .premium-live-preview__comparison,
  .premium-live-preview__capability-grid,
  .premium-live-preview__confirmation dl { grid-template-columns: 1fr; }
  .premium-live-preview__confirmation dd { text-align: left; }
  .premium-feature-payment-modal__facts { grid-template-columns: 1fr; }
  .premium-feature-payment-modal__facts > .premium-feature-payment-modal__configuration { grid-column: auto; }
  .premium-feature-payment-modal__facts > div { flex-direction: column; }
  .premium-feature-payment-modal__facts dd { text-align: left; }
  .premium-feature-payment-modal .modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .premium-feature-payment-modal .modal-footer .btn { width: 100%; }
  .premium-live-preview__avatar-tester { grid-template-columns: 1fr; }
  .premium-live-preview__avatar-tester > img { justify-self: center; }
  .premium-live-preview__avatar-tester dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .premium-live-preview *,
  .premium-live-preview *::before,
  .premium-live-preview *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .premium-feature-payment-modal * { transition-duration: 0.01ms !important; }
}

/* Premium Features shop, inventory, history, and safe identity presentation. */
.user-feature-shop__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.user-feature-shop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-feature-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.user-feature-wallet {
  min-width: min(100%, 220px);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-pressed);
  text-align: right;
}

.user-feature-wallet small,
.user-feature-wallet strong {
  display: block;
}

.user-feature-wallet small {
  color: var(--text-muted);
}

.user-feature-wallet strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.user-feature-group__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.user-feature-card,
.user-feature-history-card,
.user-feature-inventory-card,
.user-feature-filters,
.user-feature-checkout {
  border-color: var(--line) !important;
  background: var(--surface-raised) !important;
  box-shadow: var(--shadow-out) !important;
}

.user-feature-card__facts.user-feature-history-card__facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-feature-history-card__configuration {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
}

.user-feature-history-card__configuration > div + div {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.premium-feature-preview {
  margin: 18px 0 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-pressed);
}

.premium-feature-preview__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.premium-feature-preview__heading > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.premium-feature-preview__heading > small,
.premium-feature-preview__sample > span,
.premium-feature-preview__sample > small,
.premium-feature-preview__avatars small {
  color: var(--text-muted);
}

.premium-feature-preview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.premium-feature-preview__sample {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.premium-feature-preview__username {
  color: #12a866;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(18, 168, 102, 0.55);
}

.premium-feature-preview__title {
  color: #8a67d5;
  font-weight: 800;
  text-shadow: 0 0 5px rgba(138, 103, 213, 0.45);
}

.premium-feature-preview__avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 14px;
}

.premium-feature-preview__avatars > div {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.premium-feature-preview__post {
  max-width: 620px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.premium-feature-preview__post p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

.premium-feature-preview__themes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.premium-feature-preview__theme {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.premium-feature-preview__theme > span {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.premium-feature-preview__theme--emerald { color: #159d68; }
.premium-feature-preview__theme--midnight { color: #3d73d8; }
.premium-feature-preview__theme--platinum { color: #81909f; }
.premium-feature-preview__theme--royal { color: #9e72d6; }

.user-feature-entitlement-history {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
  overflow: hidden;
}

.user-feature-entitlement-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.user-feature-entitlement-history > summary::-webkit-details-marker { display: none; }
.user-feature-entitlement-history > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

.user-feature-entitlement-history__entries {
  display: grid;
  gap: 10px;
  max-height: 520px;
  padding: 12px;
  border-top: 1px solid var(--line);
  overflow: auto;
}

.user-feature-entitlement-history__entry {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.user-feature-entitlement-history__entry dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
}

.user-feature-entitlement-history__entry dt,
.user-feature-entitlement-history__entry dd {
  display: inline;
  margin: 0;
}

.user-feature-entitlement-history__entry dt {
  margin-right: 5px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.user-feature-entitlement-history__entry dd {
  color: var(--text);
  overflow-wrap: anywhere;
}

.user-feature-entitlement-history__configuration {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.user-feature-renewal {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.user-feature-renewal__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.user-feature-renewal__summary > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
}

.user-feature-renewal__summary span,
.user-feature-renewal__summary strong {
  display: block;
}

.user-feature-renewal__summary span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.user-feature-card.is-active {
  border-color: rgba(var(--neon-rgb), 0.62) !important;
  box-shadow: var(--shadow-out), inset 0 0 0 1px rgba(var(--neon-rgb), 0.14) !important;
}

.user-feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(var(--neon-rgb), 0.55);
  border-radius: 14px;
  color: var(--accent);
  background: var(--surface-pressed);
  font-size: 1.45rem;
}

.user-feature-card__facts,
.user-feature-item-facts,
.user-feature-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.user-feature-card__facts > span,
.user-feature-card__facts > div,
.user-feature-item-facts > div,
.user-feature-rules > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-pressed);
}

.user-feature-card__facts small,
.user-feature-card__facts strong,
.user-feature-card__facts dt,
.user-feature-card__facts dd,
.user-feature-card__price small,
.user-feature-card__price strong,
.user-feature-item-facts dt,
.user-feature-item-facts dd,
.user-feature-rules dt,
.user-feature-rules dd {
  display: block;
  margin: 0;
}

.user-feature-item-facts dt,
.user-feature-rules dt,
.user-feature-card__facts small,
.user-feature-card__facts dt,
.user-feature-card__price small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.user-feature-card__facts dd {
  margin: 3px 0 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.user-feature-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.user-feature-offer small {
  display: block;
  color: var(--text-muted);
}

.user-feature-timeline article {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 20px 4px;
}

.user-feature-timeline__dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(var(--neon-rgb), 0.12);
}

.user-feature-timeline small {
  display: block;
  color: var(--text-muted);
}

.user-feature-identity {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.user-feature-identity__name,
.user-feature-identity__title {
  color: var(--user-feature-style-color, var(--text)) !important;
  overflow-wrap: anywhere;
}

.user-feature-identity .is-bold { font-weight: 800; }
.user-feature-identity .is-italic { font-style: italic; }
.user-feature-identity .has-glow-soft { text-shadow: 0 0 2px var(--user-feature-glow-color, currentColor), 0 0 6px var(--user-feature-glow-color, currentColor); }
.user-feature-identity .has-glow-medium { text-shadow: 0 0 2px var(--user-feature-glow-color, currentColor), 0 0 7px var(--user-feature-glow-color, currentColor), 0 0 13px var(--user-feature-glow-color, currentColor); }
.user-feature-identity .has-glow-strong { text-shadow: 0 0 2px var(--user-feature-glow-color, currentColor), 0 0 8px var(--user-feature-glow-color, currentColor), 0 0 16px var(--user-feature-glow-color, currentColor), 0 0 25px var(--user-feature-glow-color, currentColor); }
.user-feature-identity__title { margin-top: 2px; font-size: 0.75rem; }

.user-feature-identity__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--surface-pressed);
  font-size: 0.68rem;
  line-height: 1.4;
}

.user-feature-profile-cosmetic--emerald { border-color: rgba(var(--neon-rgb), 0.7); }
.user-feature-profile-cosmetic--midnight { border-color: var(--accent-2); }
.user-feature-profile-cosmetic--platinum { border-color: #8a99a8; }
.user-feature-profile-cosmetic--royal { border-color: #b68cff; }

.seller-store.user-feature-profile-theme--emerald .seller-store__header {
  border-color: rgba(var(--neon-rgb), 0.7);
  box-shadow: inset 0 0 28px rgba(var(--neon-rgb), 0.08), var(--shadow-out);
}

.seller-store.user-feature-profile-theme--midnight .seller-store__header {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 30px rgba(20, 121, 255, 0.1), var(--shadow-out);
}

.seller-store.user-feature-profile-theme--platinum .seller-store__header {
  border-color: #8a99a8;
  box-shadow: inset 0 0 28px rgba(138, 153, 168, 0.12), var(--shadow-out);
}

.seller-store.user-feature-profile-theme--royal .seller-store__header {
  border-color: #b68cff;
  box-shadow: inset 0 0 30px rgba(182, 140, 255, 0.12), var(--shadow-out);
}

.user-feature-signature {
  margin-top: 18px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.user-feature-signature--panel,
.user-feature-signature--accent {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface-pressed);
}

.user-feature-signature--accent { box-shadow: inset 0 0 18px rgba(var(--neon-rgb), 0.07); }

@media (max-width: 767px) {
  .user-feature-shop__hero { align-items: stretch; flex-direction: column; }
  .user-feature-wallet { text-align: left; }
  .user-feature-group__heading { align-items: flex-start; flex-direction: column; }
  .user-feature-section__heading { align-items: flex-start; flex-direction: column; }
  .user-feature-shop__actions > .btn { flex: 1 1 140px; min-height: 44px; }
  .user-feature-card__facts,
  .user-feature-history-card__facts,
  .user-feature-item-facts,
  .user-feature-rules { grid-template-columns: 1fr; }
  .user-feature-renewal__summary { grid-template-columns: 1fr; }
  .user-feature-offer { align-items: flex-start; flex-direction: column; }
  .premium-feature-preview__heading { flex-direction: column; }
  .premium-feature-preview__grid,
  .premium-feature-preview__themes,
  .user-feature-entitlement-history__entry dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .premium-feature-preview__username,
  .premium-feature-preview__title { text-shadow: none; }
}

/*
 * Cross-theme readability completion.
 * This final user-only layer wins over page-local legacy dark palettes while
 * preserving genuinely dark image overlays and brand-filled Telegram actions.
 */
html body[class] :where(
  .card,
  .custom--card,
  .modal-content,
  .dropdown-menu,
  .user-info-dropdown,
  .table-responsive,
  .tdc-surface,
  .tdc-card,
  .tdc-neo,
  .tdc-neo-sm,
  .form-field
) :where(.text-white, .text-light, .text-dark, .text-black) {
  color: var(--text-strong) !important;
}

html body[class] :where(
  .card,
  .custom--card,
  .modal-content,
  .dropdown-menu,
  .user-info-dropdown,
  .table-responsive,
  .tdc-surface,
  .tdc-card,
  .form-field
) :where(.bg-white, .bg-light, .bg-dark) {
  color: var(--text-secondary) !important;
  background: var(--surface-pressed) !important;
}

html body[class] :where(
  .market-hub,
  .market-detail-page,
  .seller-store,
  .seller-listings-page,
  .listing-index-shell,
  .listing-inventory-page,
  .dashboard-shell,
  .deposit-shell,
  .deposit-history-shell,
  .support-index-page,
  .transactions-page,
  .withdraw-page,
  .withdraw-history-page,
  .escrow-index-page,
  .escrow-create-page,
  .escrow-detail-page,
  .inventory-automation-page,
  .premium-features-page,
  .profile-setting-section,
  .profile-overview-page,
  .general-profile-page,
  .twofactor-page,
  .profile-completion-page,
  .notification-settings-page,
  .forum-compose,
  .forum-page,
  .forum-thread,
  .blog-detial-section,
  .contact-section
) :where(
  strong,
  b,
  [class*="__title"],
  [class*="__name"],
  [class*="__value"],
  [class*="__amount"],
  [class*="__counter"],
  [class$="-counter"]
) {
  color: var(--text-strong) !important;
}

html body[class] :where(
  .market-hub,
  .market-detail-page,
  .seller-store,
  .seller-listings-page,
  .listing-index-shell,
  .listing-inventory-page,
  .dashboard-shell,
  .deposit-shell,
  .deposit-history-shell,
  .support-index-page,
  .transactions-page,
  .withdraw-page,
  .withdraw-history-page,
  .escrow-index-page,
  .escrow-create-page,
  .escrow-detail-page,
  .inventory-automation-page,
  .premium-features-page,
  .profile-setting-section,
  .profile-overview-page,
  .general-profile-page,
  .twofactor-page,
  .profile-completion-page,
  .notification-settings-page,
  .forum-compose,
  .forum-page,
  .forum-thread,
  .blog-detial-section,
  .contact-section
) :where(
  small,
  .small,
  [class*="__desc"],
  [class*="__meta"],
  [class*="__date"],
  [class*="__subtext"],
  [class*="__joined"],
  [class*="__reviews"],
  [class*="__copy"],
  [class*="__stamp"],
  [class*="__hint"],
  [class*="empty-text"]
) {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

html body[class] :where(
  .market-hub,
  .market-detail-page,
  .seller-listings-page,
  .listing-index-shell,
  .dashboard-shell,
  .deposit-shell,
  .deposit-history-shell,
  .support-index-page,
  .transactions-page,
  .withdraw-page,
  .withdraw-history-page,
  .escrow-index-page,
  .escrow-create-page,
  .escrow-detail-page,
  .inventory-automation-page,
  .premium-features-page,
  .profile-setting-section,
  .twofactor-page,
  .profile-completion-page
) :where([class*="__label"], [class*="__eyebrow"]) {
  color: var(--text-muted) !important;
}

html body[class] :where(
  .section-heading__subtitle,
  .market-hero-panel__eyebrow,
  .market-filter-panel__eyebrow,
  .market-toolbar__label,
  .market-detail-eyebrow,
  .market-panel-title,
  .dashboard-eyebrow,
  [class*="-hero__eyebrow"],
  [class*="-panel__eyebrow"]
) {
  color: var(--success-text) !important;
}

html body[class] :where(
  .market-seller-popover__details,
  .market-seller-popover__stats,
  .market-info-box .label,
  .market-url-box .label,
  .market-price-panel__label,
  .market-mini-stat .label,
  .market-quantity-modal__summary span,
  .market-quantity-modal__field label,
  .market-fee-summary span,
  .listing-cell-subtext
) {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

html body[class] :where(
  .dashboard-inline-link,
  .listing-inline-link,
  .deposit-history-clear,
  .market-filter-clear,
  .escrow-create__deposit-link,
  .profile-overview__nav-link
) {
  color: var(--link) !important;
}

html body[class] :where(
  .form-field,
  .forum-comment-form,
  .forum-reply-form,
  .forum-comment,
  .forum-category-hint
) {
  border-color: var(--line) !important;
  color: var(--text-secondary) !important;
  background: var(--surface-pressed) !important;
}

html body[class] .form-field :where(.title, .value, i) {
  color: var(--text-strong) !important;
}

html body[class] :where(
  .profile-setting-section.account-polish .profile-setting__header-title .text,
  .profile-setting-section.account-polish .setting-list__link i,
  .profile-setting-section.account-polish .account-polish-list i,
  .profile-setting-section.account-polish .account-polish-stat i,
  .profile-setting-section.account-polish .account-toggle-card__icon,
  .notification-settings-page .notification-panel__badge,
  .notification-settings-page .notification-row__icon,
  .twofactor-step__index,
  .escrow-create__inline-note i,
  .profile-overview__value code,
  .profile-overview__social-link i,
  .forum-category-pill,
  .forum-comments__head span,
  .forum-empty i,
  .forum-empty--compact i
) {
  color: var(--success-text) !important;
}

html body[class] .dashboard-hero__title span {
  color: var(--success-text) !important;
}

html body[class] :where(.forum-post-card__title a, .forum-latest, .modal-body a:not(.btn)):hover {
  color: var(--link-hover) !important;
}

html body[class] .modal-body a:not(.btn) {
  color: var(--link) !important;
}

html body[class] .inventory-row-detail {
  color: var(--danger-text) !important;
}

html body[class] :where(.escrow-index__live, .escrow-detail-simple__live) {
  border-color: var(--line) !important;
  color: var(--text-secondary) !important;
  background: var(--surface-pressed) !important;
}

html body[class] :where(.escrow-index__live, .escrow-detail-simple__live).is-stale {
  color: var(--warning-text) !important;
  border-color: rgba(247, 168, 35, 0.34) !important;
}

html body[class] :where(.escrow-index__stamp, .escrow-detail-simple__live-stamp) {
  color: var(--text-muted) !important;
}

html body[class] .profile-overview__status.is-success,
html body[class] .profile-overview__check.is-done .profile-overview__check-mark {
  border-color: rgba(var(--neon-rgb), 0.28) !important;
  color: var(--success-text) !important;
  background: var(--accent-soft) !important;
}

html body[class] .profile-overview__status.is-warning {
  border-color: rgba(247, 168, 35, 0.3) !important;
  color: var(--warning-text) !important;
  background: var(--tdc-warning-soft) !important;
}

html body[class] .profile-overview__status.is-muted {
  border-color: var(--line) !important;
  color: var(--text-muted) !important;
  background: var(--surface-pressed) !important;
}

html body[class] .escrow-detail-simple__activity-item--success .escrow-detail-simple__activity-icon {
  color: var(--success-text) !important;
  background: var(--accent-soft) !important;
}

html body[class] .escrow-detail-simple__activity-item--warning .escrow-detail-simple__activity-icon {
  color: var(--warning-text) !important;
  background: var(--tdc-warning-soft) !important;
}

html body[class] .escrow-detail-simple__activity-item--danger .escrow-detail-simple__activity-icon {
  color: var(--danger-text) !important;
  background: var(--tdc-danger-soft) !important;
}

html body[class] :where(
  .escrow-detail-simple__activity-item--info,
  .escrow-detail-simple__activity-item--primary
) .escrow-detail-simple__activity-icon {
  color: var(--info-text) !important;
  background: var(--tdc-info-soft) !important;
}

.rich-text-field,
.rich-text-field .ck.ck-editor,
.rich-text-field .ck.ck-editor__main > .ck-editor__editable,
.rich-text-field .ck.ck-dropdown__panel,
.rich-text-field .ck.ck-balloon-panel,
.rich-text-field .ck.ck-list,
.rich-text-field .ck.ck-input,
.rich-text-field .ck.ck-input-text,
.rich-text-field__textarea,
.rich-text-field__preview {
  border-color: var(--line) !important;
  color: var(--input-text) !important;
  background: var(--surface-pressed) !important;
}

.rich-text-field .ck.ck-toolbar,
.rich-text-field .ck.ck-toolbar-dropdown .ck-toolbar {
  border-color: var(--line) !important;
  color: var(--input-text) !important;
  background: var(--surface-raised) !important;
}

.rich-text-field .ck.ck-button,
.rich-text-field .ck.ck-dropdown > .ck-button,
.rich-text-field__preview-toggle {
  border-color: var(--line) !important;
  color: var(--input-text) !important;
  background: var(--surface) !important;
}

.rich-text-field .ck.ck-button.ck-disabled,
.rich-text-field .ck.ck-dropdown > .ck-button.ck-disabled {
  color: var(--text-disabled) !important;
  background: var(--control-disabled-bg) !important;
  opacity: 1 !important;
}

.rich-text-field__textarea::placeholder,
.rich-text-field .ck.ck-editor__editable > .ck-placeholder::before {
  color: var(--placeholder) !important;
  opacity: 1 !important;
}

.rich-text-field__footer,
.rich-text-content figcaption {
  color: var(--text-muted) !important;
}

.rich-text-content {
  color: var(--text-secondary) !important;
}

.rich-text-content :where(p, li, div, span, dd, dt, blockquote, figcaption, td) {
  color: inherit !important;
}

.rich-text-content :where(h1, h2, h3, h4, h5, h6, strong, b, th) {
  color: var(--text-strong) !important;
}

.rich-text-content a {
  color: var(--link) !important;
}

.rich-text-content a:hover {
  color: var(--link-hover) !important;
}

html[data-theme] body .iziToast {
  border: 1px solid var(--line) !important;
  color: var(--toast-text) !important;
  background: var(--toast-bg) !important;
  box-shadow: var(--shadow-out-sm) !important;
}

html[data-theme] body .iziToast > .iziToast-body .iziToast-title {
  color: var(--text-strong) !important;
}

html[data-theme] body .iziToast > .iziToast-body .iziToast-message {
  color: var(--toast-text) !important;
}

html[data-theme] body .iziToast > .iziToast-close {
  color: var(--text-strong) !important;
  opacity: 1 !important;
}

html body[class] :where(
  .badge,
  [class*="badge--"],
  [class*="status--"],
  .status-badge,
  [class*="chip--"],
  [class*="pill--"]
) :where(span, small, strong, b, i) {
  color: inherit !important;
  opacity: 1 !important;
}

html body[class] :is(
  .btn:not(.btn-close),
  button,
  input,
  select,
  textarea,
  [role="button"]
):disabled,
html body[class] :is(.btn, button, input, select, textarea, [role="button"])[aria-disabled="true"],
html body[class] :is(.btn, button).disabled {
  border-color: var(--line) !important;
  color: var(--text-disabled) !important;
  background: var(--control-disabled-bg) !important;
  -webkit-text-fill-color: var(--text-disabled) !important;
  box-shadow: var(--shadow-in) !important;
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/*
 * Final legacy-specificity guard.
 * Several older page-local styles used highly specific neon gradients for
 * actions. Keep every normal action tactile and neutral even when those
 * declarations are present earlier in the cascade.
 */
html body[class] :is(
  .btn:not(.btn-close),
  .market-action-btn,
  .market-hero-search__button,
  .market-filter-btn,
  .market-main-btn,
  .market-related-card__action,
  .market-seller-store-link,
  .market-quantity-modal__confirm,
  .seller-store__market-link,
  .seller-listing-card__action,
  .seller-create-submit__primary,
  .dashboard-uid__copy
) {
  top: auto !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--control-raised) !important;
  filter: none !important;
  transform: translateY(0) scale(1) !important;
}

html body[class] :is(
  .btn--base,
  .btn-outline--base,
  .btn--primary,
  .btn-primary,
  .btn--success,
  .btn-success,
  .market-action-btn--buy,
  .market-filter-btn--apply,
  .market-main-btn,
  .market-related-card__action,
  .market-seller-store-link,
  .market-quantity-modal__confirm,
  .seller-store__market-link,
  .seller-listing-card__action,
  .seller-create-submit__primary,
  .dashboard-uid__copy
) {
  border-color: rgba(var(--neon-rgb), 0.3) !important;
}

html body[class] :is(.market-pill.active, .market-tabs .nav-link.active) {
  border-color: rgba(var(--neon-rgb), 0.74) !important;
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in), 0 0 14px rgba(var(--neon-rgb), 0.12) !important;
}

html body[class] .forum-category-row {
  border: 1px solid var(--line) !important;
  color: var(--text-2) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--control-raised) !important;
}

html body[class] .forum-category-row.active {
  border-color: rgba(var(--neon-rgb), 0.32) !important;
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--shadow-in) !important;
}

@media (hover: hover) and (pointer: fine) {
  html body[class] .forum-category-row:hover {
    border-color: rgba(var(--neon-rgb), 0.95) !important;
    color: var(--text) !important;
    background: var(--surface-pressed) !important;
    box-shadow: var(--control-hover), var(--neon-hover) !important;
    transform: translateY(2px) scale(0.995) !important;
  }

  html body[class] :is(
    .btn:not(.btn-close),
    .market-action-btn,
    .market-hero-search__button,
    .market-filter-btn,
    .market-main-btn,
    .market-related-card__action,
    .market-seller-store-link,
    .market-quantity-modal__confirm,
    .seller-store__market-link,
    .seller-listing-card__action,
    .seller-create-submit__primary,
    .dashboard-uid__copy
  ):not(:disabled):not(.disabled):hover {
    top: auto !important;
    border-color: rgba(var(--neon-rgb), 0.95) !important;
    color: var(--text) !important;
    background: var(--surface-pressed) !important;
    box-shadow: var(--control-hover), var(--neon-hover) !important;
    filter: none !important;
    transform: translateY(2px) scale(0.995) !important;
  }
}

html body[class] :is(
  .btn:not(.btn-close),
  .market-action-btn,
  .market-hero-search__button,
  .market-filter-btn,
  .market-main-btn,
  .market-related-card__action,
  .market-seller-store-link,
  .market-quantity-modal__confirm,
  .seller-store__market-link,
  .seller-listing-card__action,
  .seller-create-submit__primary,
  .dashboard-uid__copy
):not(:disabled):not(.disabled):active {
  top: auto !important;
  border-color: var(--neon) !important;
  color: var(--text) !important;
  background: var(--surface-pressed) !important;
  box-shadow: var(--control-active), var(--neon-active) !important;
  filter: none !important;
  transform: translateY(3px) scale(0.982) !important;
}

@media (prefers-reduced-motion: reduce) {
  html body[class] :is(
    .btn:not(.btn-close),
    .market-action-btn,
    .market-filter-btn,
    .market-main-btn,
    .market-related-card__action,
    .seller-store__market-link,
    .seller-listing-card__action,
    .seller-create-submit__primary,
    .dashboard-uid__copy
  ):hover,
  html body[class] :is(
    .btn:not(.btn-close),
    .market-action-btn,
    .market-filter-btn,
    .market-main-btn,
    .market-related-card__action,
    .seller-store__market-link,
    .seller-listing-card__action,
    .seller-create-submit__primary,
    .dashboard-uid__copy
  ):active {
    transform: none !important;
  }
}

/*
 * Premium style colors are user-authored paint values. This invariant must
 * remain after every theme/readability rule so those rules cannot recolor the
 * actual username/title glyphs while leaving only their swatches unchanged.
 */
html body[class] [data-user-feature-styled-text] {
  color: var(--user-feature-style-color) !important;
  -webkit-text-fill-color: var(--user-feature-style-color) !important;
  border: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body[class] [data-user-feature-styled-text]:not(.has-glow-soft):not(.has-glow-medium):not(.has-glow-strong) {
  text-shadow: none !important;
}

html body[class] [data-user-feature-styled-text].has-glow-soft {
  text-shadow: 0 0 2px var(--user-feature-glow-color), 0 0 6px var(--user-feature-glow-color) !important;
}

html body[class] [data-user-feature-styled-text].has-glow-medium {
  text-shadow: 0 0 2px var(--user-feature-glow-color), 0 0 7px var(--user-feature-glow-color), 0 0 13px var(--user-feature-glow-color) !important;
}

html body[class] [data-user-feature-styled-text].has-glow-strong {
  text-shadow: 0 0 2px var(--user-feature-glow-color), 0 0 8px var(--user-feature-glow-color), 0 0 16px var(--user-feature-glow-color), 0 0 25px var(--user-feature-glow-color) !important;
}

/* Responsive surface reliability completion. */
body.tdc-surface-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.sidebar-overlay {
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  border: 0;
  z-index: 1025 !important;
  cursor: pointer;
  touch-action: manipulation;
}

.sidebar-overlay.show {
  z-index: 1025 !important;
}

.header-account-button {
  min-width: 0;
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
}

.site-header__account-trigger,
.site-header__mobile-wallet {
  display: inline-flex;
  min-width: 46px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface)) !important;
  box-shadow: var(--control-raised) !important;
  touch-action: manipulation;
}

.site-header__account-trigger {
  width: 46px;
  padding: 0 !important;
}

.site-header__mobile-wallet {
  width: auto;
  padding-inline: 12px !important;
}

.site-header__account-trigger .account-icon {
  display: grid !important;
}

.site-header__account-trigger:focus-visible,
.site-header__mobile-wallet:focus-visible,
.user-dropdown-wrapper__close:focus-visible {
  outline: none;
  box-shadow: var(--focus), var(--neon-hover) !important;
}

.user-dropdown-wrapper {
  right: auto !important;
  left: 0 !important;
  width: min(92vw, 400px) !important;
  min-width: 0 !important;
  max-width: 400px;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh;
  padding:
    max(12px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left)) !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate3d(-105%, 0, 0) !important;
  transition: transform 0.22s ease-out, visibility 0.22s ease-out;
  visibility: hidden;
  z-index: 1040 !important;
  scrollbar-gutter: stable;
}

.user-dropdown-wrapper.show {
  transform: translate3d(0, 0, 0) !important;
  visibility: visible;
}

[dir="rtl"] .user-dropdown-wrapper {
  right: 0 !important;
  left: auto !important;
  transform: translate3d(105%, 0, 0) !important;
}

[dir="rtl"] .user-dropdown-wrapper.show {
  transform: translate3d(0, 0, 0) !important;
}

.user-dropdown-wrapper__close {
  position: sticky !important;
  top: max(0px, env(safe-area-inset-top)) !important;
  right: auto !important;
  left: auto !important;
  z-index: 2;
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px;
  margin-inline-start: auto;
  padding: 0;
  place-items: center;
  line-height: 1;
  touch-action: manipulation;
}

.user-dropdown-wrapper > nav,
.user-dropdown-wrapper .user-info-dropdown,
.user-dropdown-wrapper .user-info-dropdown__item,
.user-dropdown-wrapper .user-info-dropdown__link {
  min-width: 0;
  max-width: 100%;
}

.user-dropdown-wrapper .user-info-dropdown {
  position: static !important;
  width: 100%;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  visibility: visible;
  opacity: 1;
  transform: none;
}

.user-dropdown-wrapper .user-info-dropdown__link .text,
.user-dropdown-wrapper .wallet-summary__row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-setting__sidebar,
.left-sidebar,
.sidebar-menu {
  max-height: 100dvh;
  overscroll-behavior: contain;
}

.profile-setting__sidebar[aria-hidden="true"],
.left-sidebar[aria-hidden="true"],
.sidebar-menu[aria-hidden="true"] {
  pointer-events: none;
}

.tdc-page-main,
.tdc-page-main :where(.container, .row, [class*="col-"], .card, .card-body, .card-header, form, fieldset) {
  min-width: 0;
  max-width: 100%;
}

.tdc-page-main :where(img, video, canvas, svg, iframe) {
  max-width: 100%;
}

.tdc-page-main :where(h1, h2, h3, h4, h5, h6, p, li, td, th, dd, dt, .alert, .badge) {
  overflow-wrap: anywhere;
}

.tdc-page-main :where(
  [class*="__value"],
  [class*="__amount"],
  [class*="__balance"],
  .wallet-summary__amount
) {
  min-width: 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.route-user-wallet-index .card-body.d-flex {
  flex-wrap: wrap;
}

.route-user-wallet-index .card-body.d-flex > .btn {
  flex: 1 1 120px;
}

.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.modal-dialog,
.modal-content,
.dropdown-menu,
.popover {
  max-width: calc(100vw - 22px);
}

.modal {
  z-index: 1055;
}

.modal-backdrop {
  z-index: 1050;
}

@media (min-width: 1200px) {
  .user-dropdown-wrapper {
    display: none !important;
  }
}

@media (max-width: 1199px) {
  .site-header__collapse {
    z-index: 2;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .header-account-button + .site-header__theme-toggle {
    margin-left: 0 !important;
    margin-inline-start: 0 !important;
  }
}

@media (max-width: 767px) {
  .header-account-button .account-icon {
    display: grid !important;
  }

  .header-account-button .site-header__mobile-wallet span {
    display: none;
  }

  .site-header__mobile-wallet {
    width: 46px;
    padding: 0 !important;
  }
}

@media (max-width: 520px) {
  .header .navbar-brand.logo {
    margin-inline-end: 0 !important;
  }
}

@media (max-width: 360px) {
  .header .navbar {
    gap: 4px;
  }

  .header .navbar-brand.logo,
  .header .navbar-brand.logo img {
    width: 40px;
    max-width: 40px;
    max-height: 40px;
  }

  .site-header__account-trigger,
  .site-header__mobile-wallet,
  .site-header__theme-toggle,
  .navbar-toggler.header-button {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .header-account-button {
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-dropdown-wrapper {
    transition-duration: 0.01ms !important;
  }
}
