/* Desk tokens ? Magnetic Partner ? graphite */
:root {
  --bg: #12161A;
  --nav-bg: #12161A;
  --bg-soft: #1A1F26;
  --bg-ink: #0E1216;
  /* Fields match flat desk chrome ? no muddy fill slabs */
  --field: transparent;
  --field-hover: rgba(255, 255, 255, 0.03);
  --field-border: rgba(255, 255, 255, 0.08);
  --field-border-hover: rgba(255, 255, 255, 0.14);
  --field-shadow: none;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #F3F5F7;
  --muted: #A8B2BF;
  --faint: #8B95A3;
  --accent: #2c2c2c;
  --accent-soft: rgba(255, 255, 255, 0.14);
  --ok: #2dbe6c;
  --bad: #f14d4d;
  --warn: #ffb020;
  --font: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --panel: #181D24;
  --panel-raised: #1F252E;
  /* Quiet card surface ? same as settings-hub tiles (not the old charcoal slab) */
  --desk-card-bg: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.02)
    ),
    #12161A;
  --desk-card-border: rgba(255, 255, 255, 0.06);
  --desk-card-radius: 12px;
  --radius: 12px;
  --radius-sm: 8px;
  --desk-nav-w: 240px;
}

* { box-sizing: border-box; }

html.desk-html {
  overflow-x: clip;
  /* Dark by default so native chrome the CSS can't reach — scrollbars in Firefox,
     form controls, date pickers — is painted dark instead of the OS light default.
     The light theme block below flips this back to `light`. */
  color-scheme: dark;
}

html.desk-html,
body.desk {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  /* subpixel/auto ? antialiased makes light UI chrome look muddy on dark */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
  background-color: var(--bg);
  background-image: none;
}

body.desk {
  --desk-nav-w: 240px;
  --desk-frame-gap: 0;
  --desk-frame-radius: 0;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  padding-left: var(--desk-nav-w);
  position: relative;
  background: var(--bg);
}

/* Premium flat desk ? no grain overlay (revert: restore body.desk::before noise) */
body.desk::before {
  display: none !important;
  content: none;
}

body.desk > .desk-body {
  position: relative;
  z-index: 1;
}

/* Phone topbar + scrim ? hidden on desktop */
.desk-topbar,
.desk-scrim {
  display: none;
}

.desk-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.desk-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px solid var(--line);
}

.desk-pager__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.desk-pager__pages {
  display: flex;
  align-items: center;
  gap: 2px;
}

.desk-pager__nav,
.desk-pager__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.desk-pager__nav:hover,
.desk-pager__num:hover {
  border-color: var(--line);
}

.desk-pager__num.is-current {
  border-color: var(--line);
  color: var(--text);
  cursor: default;
}

.desk-pager__nav.is-disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.55;
  pointer-events: none;
}

/* ?? Index rail: same surface as work ?? */
.desk-nav {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: var(--desk-nav-w, 240px);
  height: auto;
  bottom: 0;
  max-height: 100dvh;
  padding: 8px 0 12px;
  border: 0;
  border-right: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  overflow: hidden;
}

.desk-nav::after {
  display: none;
}

.desk-nav__brand {
  position: relative;
  flex-shrink: 0;
  padding: 16px 16px 14px;
  border-bottom: 0;
  background: transparent;
}

.desk-nav__brand::before {
  display: none;
}

.desk-nav__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.desk-nav__title--stack {
  align-items: center;
}

.desk-nav__title--wordmark {
  display: block;
  width: 100%;
  gap: 0;
}

.desk-nav__title--textonly {
  display: block;
  width: 100%;
  padding: 2px 0 4px;
}

.desk-nav__wordmark {
  display: block;
  width: 100%;
  max-width: 208px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  object-position: left center;
}

.desk-nav__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.desk-nav__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.desk-nav__mark-plate {
  fill: #1F252D;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

@media (prefers-reduced-motion: reduce) {
  .desk-nav__mark animate {
    display: none;
  }
}

.desk-nav__title-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.desk-nav__title-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.desk-nav__title--textonly .desk-nav__title-text strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  background: linear-gradient(180deg, #f4f7fb 0%, #d7e2ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.desk-nav__title-text em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  line-height: 1.2;
}

.desk-nav__title:hover,
.desk-nav__title:hover strong {
  color: var(--text);
}

.desk-nav__title--textonly:hover .desk-nav__title-text strong {
  background: linear-gradient(180deg, #ffffff 0%, #e8f1fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.desk-nav__index {
  margin: 8px 0 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 20px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.desk-nav__list::-webkit-scrollbar {
  width: 3px;
}

.desk-nav__list::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.desk-nav__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
}

.desk-nav__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.desk-nav__a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 11px 13px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.desk-nav__ico {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 1;
  color: var(--muted);
  stroke-width: 1.7;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.desk-nav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

.desk-nav__a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.desk-nav__a:hover .desk-nav__ico {
  opacity: 1;
  color: var(--text);
}

.desk-nav__a.is-active {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.desk-nav__a.is-active .desk-nav__ico {
  opacity: 1;
  color: var(--v2-text-secondary, var(--accent));
}

.desk-nav__a.is-active::before {
  display: none;
}

.desk-nav__end {
  display: none;
}

.desk-nav__foot {
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px 12px 14px;
  border-top: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 4;
}

.desk-account {
  position: relative;
  width: 100%;
}

.desk-account__btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text, #e8edf4);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.desk-account__btn:hover,
.desk-account.is-open .desk-account__btn {
  background: rgba(255, 255, 255, 0.05);
}

.desk-account__btn:focus-visible {
  outline: 2px solid #3c9bf4;
  outline-offset: 2px;
}

.desk-account__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.desk-account__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text, #e8edf4);
}

.desk-account__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted, #8b949e);
}

.desk-account__chev {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  color: var(--muted, #8b949e);
  opacity: 0.85;
}

.desk-account__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: #1e252c;
  border: 0;
  display: grid;
  place-items: center;
}

.desk-account__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.desk-account__initials {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9fb0c3;
}

.desk-account__pop {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1f25;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}

.desk-account__pop[hidden] {
  display: none !important;
}

.desk-account__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text, #e8edf4);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.desk-account__item:hover,
.desk-account__item:focus-visible {
  background: rgba(60, 155, 244, 0.12);
  outline: none;
}

.desk-account__item.is-active {
  background: rgba(60, 155, 244, 0.16);
  color: #fff;
}

.desk-account__item--danger {
  color: #f0a8a4;
}

.desk-account__item--danger:hover,
.desk-account__item--danger:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.desk-account__item-ico {
  flex-shrink: 0;
  opacity: 0.9;
}

.desk-account__langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 2px 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.desk-account__themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 2px 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.desk-account__theme {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #8b949e);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.desk-account__theme:hover {
  color: var(--text, #e8edf4);
  background: rgba(255, 255, 255, 0.05);
}

.desk-account__theme.is-active {
  color: #0a0b0c;
  background: #3c9bf4;
}

.desk-account__theme .desk-account__item-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.95;
}

.desk-account__lang-form,
.desk-account__logout-form {
  margin: 0;
  display: block;
}

.desk-account__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #8b949e);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.desk-account__lang:hover {
  color: var(--text, #e8edf4);
  background: rgba(255, 255, 255, 0.05);
}

.desk-account__lang.is-active {
  color: #0a0b0c;
  background: #3c9bf4;
}

.desk-nav__support {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #f5f5f5;
  border-radius: var(--radius-sm);
  background: #f5f5f5;
  color: #0a0b0c;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.desk-nav__support:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0b0c;
  filter: none;
}

.desk-nav__support-ico {
  flex-shrink: 0;
}

.desk-nav__foot-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.desk-nav__out-form {
  margin: 0;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
}

.desk-lang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-ink);
  overflow: hidden;
}

.desk-lang--rail,
.desk-lang--tape {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-ink);
  overflow: hidden;
}

.desk-lang__form {
  margin: 0;
  min-width: 0;
}

.desk-lang__form + .desk-lang__form {
  border-left: 1.5px solid var(--line-strong);
}

.desk-lang--rail .desk-lang__form + .desk-lang__form,
.desk-lang--tape .desk-lang__form + .desk-lang__form {
  border-left: 1px solid var(--line-strong);
}

.desk-lang__sep {
  display: none;
}

.desk-lang__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.desk-lang--rail .desk-lang__btn,
.desk-lang--tape .desk-lang__btn {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-lang__flag {
  width: 14px;
  height: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 1px;
  opacity: 0.85;
}

.desk-lang__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.desk-lang--rail .desk-lang__btn:hover,
.desk-lang--tape .desk-lang__btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.desk-lang__btn:hover .desk-lang__flag {
  opacity: 1;
}

.desk-lang__btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.desk-lang--rail .desk-lang__btn.is-active,
.desk-lang--tape .desk-lang__btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.desk-lang__btn.is-active .desk-lang__flag {
  opacity: 1;
}

.desk-lang--login {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 132px;
  margin: 0;
  background: var(--bg-ink);
}

.desk-nav__meta {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--faint);
  font-family: var(--mono);
}

.desk-nav__out {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.desk-nav__out:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ?? Work surface: flush with rail ?? */
.desk-body {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  overflow: clip;
}

.desk-section {
  min-width: 0;
  max-width: 100%;
}

.desk-section__lede {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.4;
}

.desk-dep-crypto {
  margin-top: 2px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

/* Legacy tape removed ? language/logout live in rail foot */
.desk-tape { display: none !important; }

/* Desktop page chrome */
.desk-work-top,
.desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 48px;
  padding: 10px 20px 4px;
  border-bottom: 0;
  background: transparent;
  max-width: none;
}

.desk-work-top--actions {
  justify-content: flex-end;
}

.desk-work-top__text,
.desk-head__text {
  min-width: 0;
}

.desk-work-top__actions,
.desk-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.desk-work-top__eye,
.desk-head__eye {
  margin: 0 0 2px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-work-top__title,
.desk-head__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.staff-desk__main,
.desk-main {
  max-width: none;
  margin: 0;
  padding: 8px 10px 40px;
}

.desk-main--flush {
  padding-top: 8px;
}

.desk-main > .staff-h1 { display: none; }

.staff-h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.staff-lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.68;
  max-width: 62ch;
}

.staff-lede strong { color: var(--text); font-weight: 600; }

/* ?? Balance + KPI panels ?? */
.desk-panel {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.desk-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.desk-panel__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.desk-balance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.desk-balance--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 640px;
}

.desk-balance--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
}

.desk-balance__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
}

.desk-balance__item:first-child {
  padding-left: 16px;
}

.desk-balance__item:last-child {
  border-right: 1px solid var(--line);
}

.desk-balance__label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-balance__value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.15;
}

.desk-balance__hint {
  font-size: 11px;
  line-height: 1.35;
  color: var(--faint);
  letter-spacing: -0.01em;
}

/* ?? Metric cards ?? */
.desk-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  border: 0;
}

.desk-metrics--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.desk-metrics--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.desk-metrics--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.desk-metrics--6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.desk-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  min-width: 0;
}

.desk-metric:first-child {
  padding-left: 16px;
}

.desk-metric:last-child {
  border-right: 1px solid var(--line);
}

.desk-metric__label {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.desk-metric__value {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--text);
}

.desk-metric__hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  max-width: 28ch;
  text-align: center;
}

/* ?? Sections flush on matte desk (no nested panel chrome) ?? */
.desk-section {
  margin: 0 0 22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: deskIn 0.45s ease both;
}

.desk-section.desk-lk-tools,
.desk-section:has(> .desk-lk-tools__grid),
.desk-section:has(> .desk-settings-hub),
.desk-section:has(> .desk-settings-hub__bar),
.desk-section[data-desk-settings-hub],
.desk-section:has(> .desk-metrics),
.desk-section:has(> .desk-balance),
.desk-section:has(> .desk-wallets),
.desk-section:has(> .desk-wd--card),
.desk-section.desk-section--cards {
  margin-bottom: 22px;
}

.desk-section.desk-lk-tools > .desk-section__label,
.desk-section:has(> .desk-lk-tools__grid) > .desk-section__label,
.desk-section[data-desk-settings-hub] .desk-section__label,
.desk-section:has(> .desk-wallets) > .desk-section__label,
.desk-section:has(> .desk-wd--card) > .desk-section__label,
.desk-section.desk-section--cards > .desk-section__label {
  margin: 0 0 12px;
  padding: 0 2px;
}

/* Interactive tiles keep a quiet surface; lists stay flat */
.desk-section.desk-lk-tools .desk-lk-card,
.desk-section:has(> .desk-lk-tools__grid) .desk-lk-card,
.desk-section[data-desk-settings-hub] .desk-settings-card,
.desk-section:has(> .desk-settings-hub) .desk-settings-card,
.desk-section.desk-section--cards .desk-lk-card,
.desk-section.desk-section--cards .desk-settings-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}

.desk-section:has(> .desk-metrics) .desk-metric,
.desk-section:has(> .desk-balance) .desk-balance__item {
  background: transparent;
}

.desk-section:has(> .desk-table-scroll:first-child) > .desk-pager {
  margin: 0;
  padding: 12px 0 4px;
}

.desk-section > .desk-table-scroll,
.desk-section .desk-table-scroll {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

.desk-section .desk-table-scroll .staff-table {
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
}

.desk-section .desk-table-scroll .staff-table th,
.desk-section .desk-table-scroll .staff-table td {
  padding: 12px 14px;
}

.desk-section .desk-table-scroll .staff-table thead th {
  color: #e6edf5;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border-bottom: 1px solid var(--line-strong);
  border-right: 0;
}

.desk-section .desk-table-scroll .staff-table tbody td {
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.desk-section .desk-table-scroll .staff-table tbody tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.desk-section > .desk-pager {
  margin-top: 12px;
  padding-top: 12px;
}

.desk-section__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.desk-section__toolbar--end {
  justify-content: flex-end;
}

.desk-section__toolbar .desk-section__label {
  margin: 0;
  padding: 0;
  border: 0;
}

.desk-section__title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.desk-section__title-row .desk-section__label {
  margin: 0;
  padding: 0;
  border: 0;
}

.desk-section__title-row .desk-status {
  flex-shrink: 0;
  transform: translateY(-0.5px);
}

.desk-section__label {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-row {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 16px;
  margin-bottom: 16px;
}

.desk-row--settings-top {
  grid-template-columns: minmax(0, 640px) minmax(280px, 1fr);
  gap: 20px 24px;
  align-items: start;
  margin-bottom: 20px;
}

.desk-row--settings-top > .desk-section {
  margin-bottom: 0;
  min-width: 0;
}

.desk-row--settings-top .desk-wallets,
.desk-row--settings-top .desk-wd--card {
  max-width: none;
  width: 100%;
  height: 100%;
}

.desk-row--3,
.desk-row--dash-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* Dashboard: quiet cards ? same surface as modals */
.desk-dash .desk-balance__item,
.desk-dash .desk-metric {
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: 10px;
}

.desk-dash .desk-filter.desk-panel {
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: var(--desk-card-radius);
  padding: 12px 14px;
}

.desk-dash .desk-row > .desk-section {
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: var(--desk-card-radius);
  padding: 14px 16px;
  box-shadow: none;
}

/* Dashboard cards: same column rhythm top/bottom, equal height in a row */
.desk-dash .desk-row--dash-main > .desk-section,
.desk-dash .desk-row--3 > .desk-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.desk-dash .desk-row--dash-main > .desk-section .desk-chart,
.desk-dash .desk-row--dash-main > .desk-section .desk-donut,
.desk-dash .desk-row--3 > .desk-section .desk-chart {
  flex: 1 1 auto;
  min-height: 220px;
}

.desk-dash .desk-row--3 > .desk-section .desk-bars {
  flex: 0 0 auto;
}

.desk-chart {
  position: relative;
  height: 260px;
  margin-top: 4px;
}

.desk-chart--sm { height: 200px; }

/* Geography donut ? premium ring + flag legend */
.desk-donut {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 0.95fr);
  gap: 18px 20px;
  align-items: center;
  margin-top: 8px;
  min-height: 220px;
}

.desk-donut__ring {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.desk-donut__ring canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.desk-donut__center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  pointer-events: none;
  text-align: center;
  transition: opacity 0.12s ease;
}

.desk-donut__ring.is-tip-open .desk-donut__center {
  opacity: 0;
}

.desk-donut__tip {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 108px;
  max-width: calc(100% - 28px);
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: #1E2328;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: center;
  pointer-events: none;
  box-shadow: none;
}

.desk-donut__tip[hidden] {
  display: none !important;
}

.desk-donut__tip-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.desk-donut__tip-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.desk-donut__tip-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.desk-donut__center strong {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.desk-donut__center span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.desk-donut__legend {
  list-style: none;
  margin: 0;
  padding: 0 6px 0 0;
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.desk-donut__legend::-webkit-scrollbar {
  width: 3px;
}

.desk-donut__legend::-webkit-scrollbar-track {
  background: transparent;
  margin: 2px 0;
}

.desk-donut__legend::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.desk-donut__legend::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.desk-donut__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.desk-donut__pct {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.desk-donut__n {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 1.25em;
  text-align: right;
}

.desk-donut__item--asset {
  grid-template-columns: minmax(0, 1.4fr) auto auto;
}

.desk-donut__item--asset .desk-asset__net {
  display: none;
}

.desk-donut__item--asset .desk-asset__ico,
.desk-donut__item--asset .desk-asset__fallback {
  width: 18px;
  height: 18px;
}

.desk-donut__item--asset .desk-asset__tick {
  font-size: 11px;
}

@media (max-width: 1100px) {
  .desk-donut {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
  }

  .desk-donut__legend {
    width: 100%;
    max-width: 260px;
  }
}

/* Dashboard filter ? modular panel */
.desk-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-raised);
}

.desk-filter.desk-panel {
  padding: 14px 16px;
}

.desk-filter__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.desk-filter__more {
  display: none;
}

.desk-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--v2-text-secondary, var(--accent));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

/* Period segmented control ? quiet, matches frosted desk cards */
.desk-period {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.desk-period a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  margin-right: 0;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.desk-period a.is-active {
  color: var(--text);
  border-color: transparent;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.desk-period a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.desk-period a.is-active:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.desk-dash .desk-period {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(0, 0, 0, 0.16);
}

.desk-filter__rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.desk-filter__date,
.desk-filter__select,
.desk-filter__country,
.desk-filter__q {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  min-width: 0;
  box-shadow: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.desk-filter__q {
  width: min(280px, 100%);
  flex: 1 1 200px;
}

.desk-filter__q::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  margin: 0;
  background: center / 12px 12px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none'%3E%3Cpath d='M2 2l8 8M10 2L2 10' stroke='%239AA3B2' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  cursor: pointer;
}

/* Users list: flat toolbar, compact email field next to actions */
.desk-filter--users {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.desk-filter--users .desk-filter__rail {
  width: auto;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.desk-filter--users .desk-filter__q {
  width: 220px;
  flex: 0 0 220px;
}

.desk-filter--users .desk-field__btn {
  margin-left: 0;
}

.desk-filter__date {
  width: 132px;
  color-scheme: dark;
}

.desk-filter__select {
  max-width: 180px;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239AA3B2' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-color: var(--field);
  cursor: pointer;
}

/* Custom filter dropdown (replaces native OS select popup) */
.desk-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 200px;
  min-width: 0;
  vertical-align: middle;
}

.desk-dd__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: none !important;
}

.desk-dd__btn {
  --desk-dd-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b949e' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --desk-dd-chevron-right: 2px;
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0 18px 0 2px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.15s ease;
}

/* Chevron as ::after ? survives background shorthand + iOS button quirks */
.desk-dd__btn::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--desk-dd-chevron-right);
  width: 10px;
  height: 6px;
  margin-top: -3px;
  background-image: var(--desk-dd-chevron);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 6px;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.desk-dd.is-open > .desk-dd__btn::after {
  transform: rotate(180deg);
}

.desk-dd__btn:hover,
.desk-dd.is-open .desk-dd__btn {
  color: var(--text);
}

.desk-dd__btn:focus {
  outline: none;
  color: var(--text);
}

.desk-dd__value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-right: 2px;
}

.desk-dd__value > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-dd__logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}

.desk-dd__menu {
  --desk-scroll-thumb: rgba(255, 255, 255, 0.34);
  --desk-scroll-thumb-hover: rgba(255, 255, 255, 0.48);
  --desk-scroll-track: rgba(255, 255, 255, 0.06);
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  min-width: max(100%, 200px);
  max-width: min(320px, 86vw);
  max-height: min(280px, 50vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--v2-line-strong, var(--line-strong));
  border-radius: 12px;
  background: var(--v2-raised, #2c2c2c);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--desk-scroll-thumb) var(--desk-scroll-track);
  -ms-overflow-style: auto;
}

.desk-dd__menu::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.desk-dd__menu::-webkit-scrollbar-track {
  margin: 4px 2px;
  background: var(--desk-scroll-track);
  border-radius: 999px;
}

.desk-dd__menu::-webkit-scrollbar-thumb {
  background: var(--desk-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-dd__menu::-webkit-scrollbar-thumb:hover {
  background: var(--desk-scroll-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-dd__menu::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-dd__menu[hidden] {
  display: none !important;
}

.desk-dd__menu--fixed {
  position: fixed !important;
  margin: 0;
}

.desk-dd__opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.desk-dd__opt > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-dd__opt:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.desk-dd__opt.is-selected {
  background: var(--accent-soft);
  color: var(--text);
}

.desk-filter__country {
  width: 44px;
  text-transform: uppercase;
  text-align: center;
}

.desk-filter__date:hover,
.desk-filter__select:hover,
.desk-filter__country:hover,
.desk-filter__q:hover,
.desk-filter__date:focus,
.desk-filter__select:focus,
.desk-filter__country:focus,
.desk-filter__q:focus {
  color: var(--text);
  outline: none;
}

.desk-filter__dash {
  color: var(--faint);
  padding: 0 6px;
  font-size: 13px;
}

.desk-filter__sep {
  width: 1px;
  height: 14px;
  margin: 0 14px;
  background: var(--line-strong);
  flex-shrink: 0;
}

.desk-filter__go {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  padding: 0 14px;
  margin: 0;
  height: 36px;
  border-radius: var(--radius-sm);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.desk-filter__go:hover {
  background: transparent;
  color: var(--v2-text-secondary, var(--accent));
}

.desk-filter__reset {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.desk-filter__reset:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

/* Forms / inputs (settings, login ? keep quiet fields) */
.desk-toolbar input,
.desk-toolbar select,
.staff-filters input,
.staff-filters select,
.crm-filters input,
.crm-filters select,
.staff-form input,
.staff-form select,
.staff-form textarea,
.staff-rail input {
  width: 100%;
  min-width: 118px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-ink);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.staff-form textarea {
  height: auto;
  min-height: 140px;
  padding: 10px 12px;
  resize: none;
  line-height: 1.45;
}

.staff-broadcast__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}

.staff-broadcast__emoji-wrap {
  position: relative;
}

.staff-broadcast__emoji-btn {
  min-height: 36px;
}

.staff-broadcast__emoji-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: min(320px, 78vw);
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: #121316;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.staff-broadcast__emoji-panel[hidden] {
  display: none !important;
}

.staff-broadcast__emoji-item {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 1;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.staff-broadcast__emoji-item:hover,
.staff-broadcast__emoji-item:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.staff-broadcast__file {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.staff-broadcast__file input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
}

.staff-broadcast__file .staff-btn {
  pointer-events: none;
  min-height: 36px;
}

.staff-broadcast__file-name {
  font-size: 12px;
  color: var(--muted, #8b949e);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-broadcast__preview {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-ink);
}

.staff-broadcast__preview[hidden] {
  display: none !important;
}

.staff-broadcast__preview img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #0b0b0c;
}

.staff-broadcast__preview-clear {
  min-height: 34px;
  align-self: center;
}

.desk-toolbar input:focus,
.desk-toolbar select:focus,
.staff-form input:focus,
.staff-form select:focus,
.staff-form textarea:focus {
  outline: none;
  border-color: rgba(106, 159, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(106, 159, 212, 0.1);
}

@media (max-width: 900px) {
  .desk-filter {
    flex-direction: column;
    align-items: flex-start;
  }
}

.staff-filters,
.crm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.staff-filters label,
.crm-filters label {
  display: grid;
  gap: 6px;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.crm-period { display: contents; }

/* Legacy class bridges ? flat desk */
.crm-panel,
.staff-card,
.staff-stat,
.crm-kpi {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 28px;
  animation: none;
}

.crm-panel::before,
.crm-kpi::before { display: none !important; }

.crm-kpis,
.staff-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 36px;
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
}

.crm-kpis > *,
.staff-grid > .staff-stat {
  padding: 20px 16px 18px 0;
  border-right: 1.5px solid var(--line);
}

.crm-kpis > *:last-child,
.staff-grid > .staff-stat:last-child { border-right: 0; }

.crm-kpis > *:not(:first-child),
.staff-grid > .staff-stat:not(:first-child) { padding-left: 16px; }

.crm-kpi__label,
.staff-stat span {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.crm-kpi__value,
.staff-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text) !important;
}

.crm-kpi__sub { margin-top: 6px; font-size: 12px; color: var(--muted); }

.crm-panel__head,
.crm-panel h2,
.staff-card h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--line);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-board,
.crm-split,
.staff-split {
  display: grid;
  gap: 40px;
  margin-bottom: 36px;
}

.crm-board { grid-template-columns: 1.55fr 0.85fr; }
.crm-split,
.staff-split { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.crm-chart-wrap {
  position: relative;
  height: 260px;
}

.crm-chart-wrap--sm { height: 200px; }

/* Tables ? brighter, slightly larger list type */
.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  color: var(--text);
}

.staff-table th,
.staff-table td {
  text-align: left;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.45;
}

.staff-table th {
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom-color: var(--line-strong);
  padding-bottom: 9px;
}

.staff-table td {
  color: var(--text);
  font-weight: 500;
}

.staff-table .desk-muted,
.staff-table .desk-faint {
  color: var(--muted);
}

.staff-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
}

.staff-table tbody tr.desk-row-link {
  cursor: pointer;
}

.staff-table tbody tr.desk-row-link:hover td {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.staff-table tbody tr.desk-row-link:hover .desk-muted {
  color: var(--muted);
}

.staff-form {
  display: grid;
  gap: 14px;
  max-width: 440px;
}

.staff-form label {
  display: grid;
  gap: 7px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.staff-btn,
a.staff-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--v2-line-strong, #454545);
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 9px;
  background: linear-gradient(180deg, #343434, #292929);
  color: var(--v2-text, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font: inherit;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.staff-btn:hover,
a.staff-btn:hover {
  background: linear-gradient(180deg, #3e3e3e, #313131);
  border-color: #565656;
  color: #fff;
}

.staff-btn:active,
a.staff-btn:active {
  background: #272727;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.staff-btn--ghost {
  background: transparent;
  border: 1px solid var(--v2-line, #333);
  color: var(--v2-text-secondary, #d4d4d4);
  box-shadow: none;
}

.staff-btn--ghost:hover {
  border-color: var(--v2-line-strong, #454545);
  background: var(--v2-raised, rgba(255, 255, 255, 0.05));
  color: #fff;
}

.staff-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: none !important;
}

.staff-badge--ok { color: var(--ok); }
.staff-badge--wait { color: var(--v2-text-secondary, var(--accent)); }
.staff-badge--bad { color: var(--bad); }

.desk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.desk-status--ok {
  color: #5ee9a0;
  background: rgba(45, 190, 108, 0.12);
}

.desk-status--bad {
  color: #fb9ba0;
  background: rgba(241, 77, 77, 0.12);
}

/* Status badge + inline row action (e.g. withdrawal "Reverse") in the same
   cell — was joined with a single literal space in the template, so the
   button sat crammed against the badge with no real gap or shared baseline. */
.desk-status-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.desk-side {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.desk-side--yes {
  color: #22c55e;
}

.desk-side--no {
  color: #ef4444;
}

.desk-status--wait {
  color: #ecc75a;
  background: rgba(196, 160, 53, 0.14);
}

.desk-status--dns .desk-status__label {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.desk-status--ok.desk-status--dns .desk-status__label,
.desk-status--wait.desk-status--dns .desk-status__label {
  color: inherit;
}

.desk-dns-cell {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.desk-dns-ssl {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(45, 190, 108, 0.12);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #5ee9a0;
  opacity: 1;
}

.desk-dns-ssl--wait {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

/* Was bare inline text (no box) sitting right next to two boxed pills
   (.desk-status, .desk-dns-ssl) in the same row — read as an unstyled
   afterthought next to its siblings. Give it the same quiet-chip family
   so the row reads as one designed unit instead of "2 pills + a stray link". */
.desk-dns-refresh {
  appearance: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.desk-dns-refresh:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--v2-line, rgba(255, 255, 255, 0.08));
}

.desk-dns-refresh:focus-visible {
  outline: none;
  color: var(--v2-text-secondary, var(--accent));
  border-color: var(--v2-text-secondary, var(--accent));
}

.desk-dns-refresh:disabled,
.desk-dns-refresh.is-busy {
  opacity: 0.4;
  cursor: wait;
  color: var(--faint);
  text-decoration: none;
}

.desk-status__check,
.desk-status__fail,
.desk-status__wait {
  display: inline-flex;
  flex-shrink: 0;
}

.desk-status__check {
  color: #22c55e;
}

.desk-status__fail {
  color: #ef4444;
}

.desk-status__wait {
  color: #c4a035;
}

.desk-status__check svg,
.desk-status__fail svg,
.desk-status__wait svg {
  display: block;
}

.desk-check-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.desk-check-toggle svg {
  display: block;
}

/* Off + invite = green (click to enable / approve). On = red (click to remove). */
.desk-check-toggle.is-invite {
  color: #22c55e;
  background: transparent;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.45));
}

.desk-check-toggle.is-on {
  color: #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.45));
}

.desk-check-toggle:hover {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.desk-check-toggle.is-invite:hover {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.6));
}

.desk-check-toggle.is-on:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.55));
}

.desk-check-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--v2-accent, #D4544C) 55%, transparent);
  outline-offset: 2px;
}

.desk-check-toggle.is-on:focus-visible {
  outline-color: rgba(239, 68, 68, 0.55);
}

.desk-check-toggle:active {
  transform: scale(0.94);
}

.desk-fail-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.45));
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, filter 0.12s ease, transform 0.12s ease;
}

.desk-fail-toggle svg {
  display: block;
}

.desk-fail-toggle.is-on {
  color: #f87171;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.55));
}

.desk-fail-toggle:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6));
}

.desk-fail-toggle.is-on:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
}

.desk-fail-toggle:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.55);
  outline-offset: 2px;
}

.desk-fail-toggle:active {
  transform: scale(0.94);
}

.staff-mono {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  word-break: break-all;
  color: var(--text);
}

.staff-table .staff-mono {
  font-size: 14px;
}

.desk-tx-link {
  color: var(--v2-text-secondary, var(--accent));
  text-decoration: none;
  word-break: break-all;
}
.desk-tx-link:hover {
  text-decoration: underline;
  color: #6bb6f7;
}

.desk-asset {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  vertical-align: middle;
}

.desk-asset__ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.desk-asset__fallback {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-ink);
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.desk-asset__meta {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.15;
}

.desk-asset__tick {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.desk-asset__net {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.desk-tx {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 8px 5px 9px;
  /* Was hardcoded #12161e/1.5px var(--line-strong) — a leftover v1 navy
     chip that ignored the v2 graphite palette entirely, so it always
     looked slightly blue/off next to everything else. Pull from the v2
     tokens (falls back to the old values outside the v2 shell). */
  border: 1px solid var(--v2-line, var(--line-strong));
  border-radius: var(--v2-radius-xs, var(--radius-sm));
  background: var(--v2-well, #12161e);
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
  vertical-align: middle;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.desk-tx--plain {
  cursor: default;
}

a.desk-tx:hover {
  color: var(--text);
  border-color: var(--v2-line-strong, rgba(255, 255, 255, 0.2));
  background: var(--v2-raised, #16181f);
}

.desk-tx__hash {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.desk-tx__ico {
  flex-shrink: 0;
  opacity: 0.55;
}

a.desk-tx:hover .desk-tx__ico {
  opacity: 0.9;
}

.staff-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.staff-rail {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1.5px solid var(--line);
}

.staff-rail:last-of-type { border-bottom: 0; }

.staff-rail__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.staff-rail__primary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  flex-direction: row;
  text-transform: none;
  letter-spacing: 0;
}

.desk-warn {
  margin: 0 0 20px;
  max-width: 62ch;
  padding: 10px 0;
  border-top: 1px solid rgba(180, 70, 70, 0.35);
  border-bottom: 1px solid rgba(180, 70, 70, 0.35);
  color: #c47a7a;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* ?? Payout wallets (compact rows, desk-native) ?? */
.desk-wallets {
  display: grid;
  gap: 0;
  max-width: 640px;
  box-sizing: border-box;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.desk-wallets__alert {
  margin: 0 0 16px;
  max-width: 640px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.desk-wallets__head,
.desk-wallet {
  display: grid;
  grid-template-columns: 22px 84px minmax(0, 1fr) 32px;
  gap: 10px 12px;
  align-items: center;
}

.desk-wallets__head {
  position: relative;
  padding: 0 0 8px;
  border-bottom: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Divider lines removed per request — spacing alone (.desk-wallet padding)
   separates rows now. */
.desk-wallets__head::after,
.desk-wallet:not(:last-child)::after {
  content: none;
  display: none;
}

.desk-wallets__stack {
  display: flex;
  flex-direction: column;
}

.desk-wallet {
  position: relative;
  padding: 8px 0;
  border-bottom: 0;
}

.desk-wallet__coin {
  grid-column: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.desk-wallet__coin img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.desk-wallet__name {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.desk-wallet__ticker {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.desk-wallet__net {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1;
}

.desk-wallet__edit,
.desk-wallet__edit-slot {
  grid-column: 4;
}

.desk-wallet__edit-slot {
  width: 32px;
  height: 32px;
}

.desk-wallet__edit {
  appearance: none;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #8b949e);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.desk-wallet__edit svg {
  display: block;
  flex-shrink: 0;
}

.desk-wallet__edit:hover {
  color: #3c9bf4;
  background: transparent;
}

.desk-wallet__edit:focus-visible {
  outline: 2px solid #3c9bf4;
  outline-offset: 2px;
  color: #3c9bf4;
}

.desk-wallet__edit--save {
  color: #6bcf8e;
}

.desk-wallet__edit--save:hover {
  color: #8fdbab;
}

.desk-wallet.is-saving .desk-wallet__edit--save {
  opacity: 0.45;
  cursor: wait;
}

.desk-wallet__addr {
  grid-column: 3;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.desk-wallet.is-locked .desk-wallet__addr[readonly] {
  color: var(--muted);
  /* Was a hardcoded near-black (#0c0e12) left over from the old theme —
     stood out against the v2 card/well palette. Use the same recessed
     "well" surface the rest of v2 uses for inset/read-only content. */
  background: var(--v2-well, #242424);
  border-color: var(--line);
  cursor: default;
}

.desk-wallet.is-editing .desk-wallet__addr {
  color: var(--text);
  background: var(--field-hover);
  border-color: rgba(255, 255, 255, 0.22);
  cursor: text;
}

.desk-wallet:not(.is-locked) .desk-wallet__addr:hover,
.desk-wallet.is-editing .desk-wallet__addr:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--field-hover);
}

.desk-wallet:not(.is-locked) .desk-wallet__addr:focus,
.desk-wallet.is-editing .desk-wallet__addr:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--field-hover);
}

.desk-wallets__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}

.desk-wallets__actions .desk-muted {
  font-size: 12px;
}

.desk-text-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.desk-text-link:hover { color: var(--v2-text-secondary, var(--accent)); }

.desk-user-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.desk-user-link:hover { color: var(--v2-text-secondary, var(--accent)); }

.desk-domain-link {
  color: var(--muted);
  text-decoration: none;
}

.desk-domain-link:hover {
  color: var(--v2-text-secondary, var(--accent));
  text-decoration: underline;
}

.desk-ns {
  line-height: 1.55;
}

.desk-ns-actions {
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

/* Keep td as table-cell (flex on td breaks row borders). */
.desk-ns-actions-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.desk-ns-actions form {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.desk-copy {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desk-copy:hover {
  color: #fff;
}

.desk-copy:focus-visible {
  outline: 1px solid rgba(106, 159, 212, 0.4);
  outline-offset: 2px;
}

.desk-copy.is-copied {
  color: var(--ok);
}

.desk-worker-creds {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.desk-worker-creds__row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.desk-worker-creds__k {
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-worker-creds__row .desk-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.desk-worker-creds__tg {
  color: var(--v2-text-secondary, var(--accent));
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

a.desk-worker-creds__tg:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.desk-worker-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
}

.desk-worker-id__tg {
  font-weight: 500;
}

.desk-worker-id__tag {
  font-size: 12px;
  color: var(--muted);
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-actions--row {
  margin-top: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-actions__inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.desk-worker-acts {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
}

.desk-worker-acts__pct,
.desk-worker-acts__ban {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.desk-worker-acts .staff-btn,
.desk-worker-acts .desk-field__btn {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  margin: 0;
  white-space: nowrap;
}

.desk-worker-acts__pill {
  flex: 0 0 auto;
  align-self: center;
}

.desk-pct-input {
  width: 72px;
  height: 34px;
  min-height: 34px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft, #1a1f26);
  color: var(--text);
  padding: 0 8px;
  margin: 0;
  font: inherit;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  vertical-align: middle;
}

.desk-table-scroll .staff-table td .desk-worker-acts {
  width: auto;
}

@media (max-width: 900px) {
  .desk-table-scroll .staff-table.is-cardable .desk-worker-acts {
    width: 100%;
    flex-wrap: wrap;
    white-space: normal;
  }
}

.desk-kyc-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 2px 8px;
}

.desk-kyc-detail__dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.desk-kyc-detail__row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
}

.desk-kyc-detail__row dt {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.desk-kyc-detail__row dd {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.desk-kyc-detail__shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.desk-kyc-detail__shot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.desk-kyc-detail__shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0b0b0c;
}

.desk-kyc-detail__shot span {
  padding: 0 8px 8px;
}

.desk-kyc-detail__shot.is-empty {
  cursor: default;
}

.desk-kyc-detail__shot-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.03);
}

.desk-kyc-detail__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-kyc-modal__panel {
  width: min(640px, 100%) !important;
  max-height: min(90vh, 820px) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.desk-kyc-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 18px;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .desk-kyc-detail__shots {
    grid-template-columns: 1fr;
  }
}

.desk-support__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.desk-worker-creds__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--faint);
}

.desk-muted {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
}

.staff-ok,
.staff-error,
.staff-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  max-width: 640px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.55;
  color: var(--text, #f5f5f5);
  transition: opacity 0.35s ease, transform 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}

.staff-ok.is-flash-out,
.staff-error.is-flash-out,
.staff-warn.is-flash-out {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.staff-ok[hidden],
.staff-error[hidden],
.staff-warn[hidden] {
  display: none !important;
}

.staff-ok::before,
.staff-error::before,
.staff-warn::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
}

.staff-ok {
  border-color: rgba(76, 175, 122, 0.22);
  background: rgba(76, 175, 122, 0.05);
}

.staff-ok::before {
  background: var(--ok);
}

.staff-error {
  border-color: rgba(217, 122, 130, 0.22);
  background: rgba(217, 122, 130, 0.05);
}

.staff-error::before {
  background: var(--bad);
}

.staff-warn {
  border-color: rgba(212, 168, 75, 0.28);
  background: rgba(212, 168, 75, 0.06);
}

.staff-warn::before {
  background: #d4a84b;
}

.desk-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 0 0 20px;
  max-width: 720px;
}

.desk-dl > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.desk-dl dt {
  margin: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-dl dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.desk-pwd {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.desk-pwd--lines {
  gap: 12px;
  max-width: none;
}

.desk-pwd__line {
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: center;
  margin: 0;
  min-width: 0;
}

.desk-pwd__line-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.3;
}

.desk-pwd__pw {
  position: relative;
  display: block;
  min-width: 0;
}

.desk-pwd__pw .desk-field__input {
  width: 100%;
  padding-left: 12px;
  padding-right: 42px;
}

.desk-pwd__eye {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 6px;
  left: auto;
  transform: translateY(-50%);
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.12s ease;
}

.desk-pwd__eye:hover,
.desk-pwd__eye.is-on {
  color: var(--text);
  background: transparent;
}

.desk-pwd__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

@media (max-width: 520px) {
  .desk-pwd__line {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .desk-pwd__row {
    grid-template-columns: 1fr;
  }
}

.desk-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 520px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1.5px solid var(--line);
}

.desk-field-row--tight {
  max-width: 560px;
}

.desk-field-row > .desk-field__btn,
.desk-field-row > a.desk-field__btn {
  height: 42px;
  align-self: end;
}

.desk-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.desk-pill--ok { color: var(--ok); }

.desk-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.desk-presence.is-online {
  color: #4a9d6f;
  border-color: rgba(45, 190, 108, 0.26);
  background: rgba(45, 190, 108, 0.1);
}

.desk-presence.is-offline {
  color: #9aa3b0;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.desk-presence__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
}

.desk-presence__label {
  color: inherit;
}

/* Legacy class kept for any cached HTML / support tweaks */
.desk-status--presence {
  gap: 6px;
}

.desk-presence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
}

.desk-pill--wait { color: var(--warn); }

.desk-email-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.desk-2fa-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.desk-2fa-cell .desk-copy {
  font-size: 12px;
  word-break: break-all;
}

.desk-lk-tools__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.desk-lk-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--desk-card-border);
  border-radius: var(--desk-card-radius);
  background: var(--desk-card-bg);
}

.desk-lk-card--wide {
  grid-column: 1 / -1;
}

.desk-lk-card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text, #f5f5f5);
}

.desk-lk-card__meta {
  margin: -4px 0 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.desk-lk-card__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.desk-lk-card__row--markets {
  grid-template-columns: minmax(160px, 280px);
}

.desk-lk-card__hint {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.desk-field--grow {
  min-width: 0;
}

.desk-field__input--markets {
  min-height: 180px;
  height: auto;
  padding: 8px;
  font-size: 13px;
  line-height: 1.35;
}

/* Field-sized custom dropdown (category) */
.desk-dd--field {
  display: block;
  width: 100%;
  max-width: none;
  position: relative;
  z-index: 1;
}

.desk-dd--field.is-open {
  z-index: 120;
}

.desk-dd__btn--field {
  --desk-dd-chevron-right: 14px;
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  justify-content: flex-start;
  border: 1px solid var(--desk-card-border, var(--field-border));
  border-radius: var(--desk-card-radius, 12px);
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.012em;
  transition:
    border-color 0.14s ease,
    background-color 0.14s ease,
    box-shadow 0.14s ease,
    color 0.14s ease;
}

.desk-dd__btn--field .desk-dd__value {
  flex: 1 1 auto;
  padding-right: 4px;
}

.desk-dd--field:hover .desk-dd__btn--field,
.desk-dd--field.is-open .desk-dd__btn--field {
  border-color: var(--field-border-hover);
  color: var(--text);
  background-color: var(--field-hover);
}

.desk-dd--field.is-open .desk-dd__btn--field {
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.18));
  background-color: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.desk-dd--field.is-disabled .desk-dd__btn--field {
  opacity: 0.55;
  cursor: not-allowed;
}

.desk-dd--field .desk-dd__menu {
  left: 0;
  right: 0;
  min-width: 100%;
  max-width: none;
  max-height: min(320px, 55vh);
  padding: 6px;
}

.desk-dd__menu--scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--desk-scroll-thumb) var(--desk-scroll-track);
  -ms-overflow-style: auto;
}

.desk-dd__menu--scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.desk-dd__menu--scroll::-webkit-scrollbar-track {
  margin: 6px 2px;
  background: var(--desk-scroll-track);
  border-radius: 999px;
}

.desk-dd__menu--scroll::-webkit-scrollbar-thumb {
  background: var(--desk-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-dd__menu--scroll::-webkit-scrollbar-thumb:hover {
  background: var(--desk-scroll-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-dd__menu--scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-dd__opt.is-disabled {
  opacity: 0.45;
  cursor: default;
}

/* Markets pick list */
.desk-plist {
  position: relative;
  width: 100%;
  min-width: 0;
}

.desk-plist__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.desk-plist__list {
  --desk-scroll-thumb: rgba(255, 255, 255, 0.34);
  --desk-scroll-thumb-hover: rgba(255, 255, 255, 0.48);
  --desk-scroll-track: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  min-height: 180px;
  overflow: auto;
  padding: 6px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--field);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--desk-scroll-thumb) var(--desk-scroll-track);
}

.desk-plist__list::-webkit-scrollbar {
  width: 8px;
}

.desk-plist__list::-webkit-scrollbar-track {
  margin: 6px 2px;
  background: var(--desk-scroll-track);
  border-radius: 999px;
}

.desk-plist__list::-webkit-scrollbar-thumb {
  background: var(--desk-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-plist__list::-webkit-scrollbar-thumb:hover {
  background: var(--desk-scroll-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-plist__list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-plist__opt {
  appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted, #8b949e);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.desk-plist__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-plist__opt:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text, #f5f5f5);
}

.desk-plist__opt.is-selected {
  background: var(--accent-soft, rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text, #f5f5f5);
  font-weight: 600;
}

.desk-plist__opt.is-disabled,
.desk-plist__opt:disabled {
  opacity: 0.5;
  cursor: default;
}

.desk-plist.is-disabled .desk-plist__list {
  opacity: 0.65;
}

.desk-lk-card,
.desk-lk-card__row,
.desk-lk-tools__grid {
  overflow: visible;
}

.desk-trade {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.desk-trade__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: var(--bg-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.desk-trade__action {
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.desk-trade__action:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.desk-trade__action.is-active {
  background: #f5f5f5;
  border-color: transparent;
  color: #0a0b0c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.desk-trade__action.is-active:hover {
  background: #ffffff;
  color: #0a0b0c;
}

.desk-trade__avail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted, #8b949e);
}

.desk-trade__avail strong {
  color: var(--text, #f5f5f5);
  font-variant-numeric: tabular-nums;
}

.desk-trade__market-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Same YES/NO language as profile pos-outcome pills */
.desk-trade__sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #141516;
}

.desk-trade__side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.desk-trade__side:hover {
  background: rgba(255, 255, 255, 0.04);
}

.desk-trade__side--yes.is-active,
.desk-trade__side--yes.is-active:hover {
  background: #2ee59d;
  color: #0a0b0c;
}

.desk-trade__side--no.is-active,
.desk-trade__side--no.is-active:hover {
  background: #ff6b7a;
  color: #0a0b0c;
}

.desk-trade__side span {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.desk-trade__amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desk-trade__currency {
  color: var(--muted, #8b949e);
  font-weight: 600;
}

.desk-trade__summary {
  display: grid;
  gap: 6px;
}

.desk-trade__sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted, #8b949e);
}

.desk-trade__sum-row strong {
  color: var(--text, #f5f5f5);
  font-variant-numeric: tabular-nums;
}

.desk-trade__hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted, rgba(255, 255, 255, 0.45));
}

.desk-trade__hint[hidden],
.desk-trade__error[hidden] {
  display: none !important;
}

.desk-trade__error {
  margin: 0;
  color: #ff6b7a;
  font-size: 12px;
}

.desk-lk-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.desk-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.desk-check:hover {
  color: var(--text, #f5f5f5);
}

.desk-check input,
.desk-support-settings__domain > input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: var(--bg-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition:
    border-color 0.14s ease,
    background-color 0.14s ease,
    box-shadow 0.14s ease;
}

.desk-check input::before,
.desk-support-settings__domain > input[type='checkbox']::before {
  content: '';
  width: 10px;
  height: 10px;
  transform: scale(0.55);
  opacity: 0;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.2 6.2l2.4 2.4 5.2-5.2' stroke='%230a0b0c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition:
    transform 0.12s ease,
    opacity 0.12s ease;
}

.desk-check:hover input,
.desk-support-settings__domain:hover > input[type='checkbox'] {
  border-color: rgba(255, 255, 255, 0.28);
  background: #16181f;
}

.desk-check input:checked,
.desk-support-settings__domain > input[type='checkbox']:checked {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: none;
}

.desk-check input:checked::before,
.desk-support-settings__domain > input[type='checkbox']:checked::before {
  opacity: 1;
  transform: scale(1);
}

.desk-check input:focus-visible,
.desk-support-settings__domain > input[type='checkbox']:focus-visible {
  outline: 2px solid var(--v2-text-secondary, rgba(255, 255, 255, 0.4));
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .desk-lk-tools__grid {
    grid-template-columns: 1fr;
  }

  .desk-lk-card--wide {
    grid-column: auto;
  }
}

.desk-mini-actions {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.desk-mini-actions .desk-field__btn {
  height: 26px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.desk-mini-btn {
  appearance: none;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #f5f5f5;
  border-radius: 6px;
  background: #f5f5f5;
  color: #0a0b0c;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.desk-mini-btn:hover {
  color: #0a0b0c;
  border-color: #ffffff;
  background: #ffffff;
}

a.desk-mini-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  box-sizing: border-box;
}

.desk-mini-btn--danger {
  color: #0a0b0c;
  border-color: #f5f5f5;
  background: #f5f5f5;
}

.desk-mini-btn--danger:hover {
  color: #0a0b0c;
  border-color: #ffffff;
  background: #ffffff;
}

.desk-field__btn--danger {
  color: var(--bad);
  border-color: rgba(217, 122, 130, 0.4);
  background: transparent;
}

.desk-field__btn--danger:hover {
  color: #f0a0a6;
  border-color: rgba(217, 122, 130, 0.6);
}

.desk-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

select.desk-field__input {
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b949e' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 6px;
}

select.desk-field__input option {
  color: #0d1117;
  background: #fff;
}

.desk-wd-rule-modal__metric .desk-wd-rules__mode {
  width: 100%;
}

.desk-wd-rule-modal__metric .desk-wd-rules__mode button {
  flex: 1;
  white-space: nowrap;
}

.desk-field__label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-field__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.desk-field__status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
}

.desk-pixel-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.desk-pixel-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}

.desk-pixel-field__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.desk-pixel-field__logo {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

.desk-pixel-field__logo img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  border-radius: 3px;
}

.desk-pixel-field__head .desk-field__label {
  margin: 0;
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.desk-pixel-field.is-locked .desk-pixel-field__input[readonly] {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
  resize: none;
  opacity: 0.92;
}

.desk-pixel-field.is-editing .desk-pixel-field__input {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
  cursor: text;
  pointer-events: auto;
}

.desk-field__req {
  margin-left: 4px;
  color: #f04438;
  font-weight: 700;
  letter-spacing: 0;
}

.desk-field__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--desk-card-border, var(--field-border));
  border-radius: 12px;
  background: var(--field);
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.012em;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.desk-field__input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.desk-field__input[type='number']::-webkit-outer-spin-button,
.desk-field__input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.desk-field__input--area,
textarea.desk-field__input,
.desk-field__textarea {
  height: auto;
  min-height: 96px;
  padding: 11px 14px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}

.desk-field__input::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-weight: 400;
  opacity: 1;
}

.desk-field__input:hover {
  border-color: var(--field-border-hover);
  background-color: var(--field-hover);
}

.desk-field__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.18));
  background-color: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.desk-field__input:disabled,
.desk-field__input[readonly] {
  opacity: 0.62;
  cursor: default;
  color: var(--muted);
  background-color: transparent;
  box-shadow: none;
}

.desk-field__input:disabled:hover,
.desk-field__input[readonly]:hover {
  border-color: var(--desk-card-border, var(--field-border));
  background-color: transparent;
}

.desk-field__input:-webkit-autofill,
.desk-field__input:-webkit-autofill:hover,
.desk-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 99999s ease-out;
  box-shadow: 0 0 0 1000px #12161a inset;
}

.desk-field__btn,
a.desk-field__btn {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--v2-line-strong, #454545);
  border-radius: 9px;
  background: linear-gradient(180deg, #343434, #292929);
  color: var(--v2-text, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.desk-field__btn:hover,
a.desk-field__btn:hover {
  color: #fff;
  border-color: #565656;
  background: linear-gradient(180deg, #3e3e3e, #313131);
}

.desk-field__btn:active,
a.desk-field__btn:active {
  background: #272727;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.desk-wd {
  display: grid;
  gap: 22px;
  max-width: 720px;
}

.desk-wd--card {
  box-sizing: border-box;
  gap: 16px;
  max-width: 640px;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.desk-wd--in-card {
  display: grid;
  gap: 16px;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.desk-wd__lede {
  margin: 0;
  max-width: none;
  font-size: 12.5px;
  line-height: 1.45;
}

.desk-wd__status {
  margin: 0;
  width: fit-content;
}

.desk-wd--card .desk-notify-steps {
  margin: 0;
  max-width: none;
  padding-left: 18px;
}

.desk-wd__notify {
  display: grid;
  gap: 10px;
}

.desk-wd__notify .desk-section__label {
  margin: 0;
}

/* Segmented control ? shared track for mode radios (Show/Hide, SMTP, captcha, ?) */
.desk-wd__modes,
.desk-promo-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: none;
}

.desk-wd__modes--tri {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Options for .desk-promo-type (footer / legal / promo) ? same pill as .desk-wd__mode */
.desk-promo-type__opt {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 34px;
  cursor: pointer;
  user-select: none;
}

.desk-promo-type__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.desk-promo-type__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c2cad6;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
  line-height: 1.25;
  box-shadow: none;
  transition: color 0.14s ease, background 0.14s ease;
}

.desk-promo-type__opt:hover span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.desk-promo-type__opt input:checked + span {
  color: #0a0b0c;
  background: #f5f5f5;
  box-shadow: none;
}

.desk-promo-type__opt:has(input:checked):hover span,
.desk-promo-type__opt input:checked + span:hover {
  color: #0a0b0c;
  background: #ffffff;
}

.desk-promo-type__opt input:focus-visible + span {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 1px;
}

.desk-field__btn--ghost {
  border-color: #f5f5f5;
  background: #f5f5f5;
  color: #0a0b0c;
}

.desk-field__btn--ghost:hover {
  color: #0a0b0c;
  border-color: #ffffff;
  background: #ffffff;
}

.desk-wd__mode {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.desk-wd__mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.desk-wd__mode span {
  display: block;
  box-shadow: none;
  padding: 0;
}

.desk-wd__mode:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.desk-wd__mode.is-on,
.desk-wd__mode:has(input:checked) {
  color: #0a0b0c;
  background: #f5f5f5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.desk-wd__mode.is-on:hover,
.desk-wd__mode:has(input:checked):hover {
  color: #0a0b0c;
  background: #ffffff;
}

.desk-wd__mode.is-on span,
.desk-wd__mode:has(input:checked) span {
  box-shadow: none;
  padding-bottom: 0;
}

.desk-wd__mode:has(input:focus-visible) {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 1px;
}

/* Withdraw UI: Off / Error / Success */
.desk-wd__mode:has(input[value='default']) {
  color: var(--muted, #a8b2bf);
}

.desk-wd__mode:has(input[value='default']):hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.desk-wd__mode.is-on:has(input[value='default']),
.desk-wd__mode:has(input[value='default']:checked) {
  color: #0a0b0c;
  background: #c8d2de;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.desk-wd__mode.is-on:has(input[value='default']):hover,
.desk-wd__mode:has(input[value='default']:checked):hover {
  color: #0a0b0c;
  background: #dce3ec;
}

.desk-wd__mode:has(input[value='force_error']) {
  color: #ff8b8b;
}

.desk-wd__mode:has(input[value='force_error']):hover {
  color: #ffb0b0;
  background: rgba(241, 77, 77, 0.12);
}

.desk-wd__mode.is-on:has(input[value='force_error']),
.desk-wd__mode:has(input[value='force_error']:checked) {
  color: #ffffff;
  background: #f14d4d;
  box-shadow: 0 1px 3px rgba(241, 77, 77, 0.45);
}

.desk-wd__mode.is-on:has(input[value='force_error']):hover,
.desk-wd__mode:has(input[value='force_error']:checked):hover {
  color: #ffffff;
  background: #ff5c5c;
}

.desk-wd__mode:has(input[value='force_success']) {
  color: #6fd99a;
}

.desk-wd__mode:has(input[value='force_success']):hover {
  color: #9aebba;
  background: rgba(45, 190, 108, 0.12);
}

.desk-wd__mode.is-on:has(input[value='force_success']),
.desk-wd__mode:has(input[value='force_success']:checked) {
  color: #06140c;
  background: #2dbe6c;
  box-shadow: 0 1px 3px rgba(45, 190, 108, 0.4);
}

.desk-wd__mode.is-on:has(input[value='force_success']):hover,
.desk-wd__mode:has(input[value='force_success']:checked):hover {
  color: #06140c;
  background: #39d47a;
}

.desk-wd__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  padding-top: 2px;
}

.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.desk-wd__actions .desk-field__btn,
.desk-wd__actions a.desk-field__btn,
.desk-wallets__actions .desk-field__btn,
.desk-wallets__actions a.desk-field__btn,
.desk-ns-modal__actions .desk-field__btn,
.desk-ns-modal__actions .staff-btn,
.desk-ns-modal__actions a.staff-btn,
.desk-legal__actions .desk-field__btn,
.desk-support-settings__actions .desk-field__btn,
.desk-support-settings__actions .staff-btn,
.desk-pixel-code-modal__actions .desk-field__btn,
.desk-pixel-code-modal__actions .staff-btn,
.desk-promo-form__actions .desk-field__btn,
.desk-promo-form__actions .staff-btn,
.desk-promo-form__actions a.staff-btn,
.staff-actions .staff-btn,
.staff-actions a.staff-btn,
.desk-domain-meta__actions .desk-field__btn,
.desk-domain-meta__foot .desk-field__btn {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.desk-wd__hint,
.desk-muted.desk-wd__hint,
p.desk-wd__hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 12px;
  max-width: 42rem;
  color: #ffb020;
  -webkit-text-fill-color: #ffb020;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.desk-wd__hint::before {
  content: '';
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  background-color: #ffb020;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' fill='%23000' d='M12 2.8L1.6 21.2h20.8L12 2.8zM11 9.1h2v5.4h-2V9.1zm0 7.1h2v2h-2v-2z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' fill='%23000' d='M12 2.8L1.6 21.2h20.8L12 2.8zM11 9.1h2v5.4h-2V9.1zm0 7.1h2v2h-2v-2z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* Player-facing withdraw popup preview ? site matte charcoal */
.bw-wd-result {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 10, 11, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bw-wd-result__card {
  width: min(360px, 100%);
  padding: 20px 18px 18px;
  border-radius: 18px;
  background: #161617;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #f5f5f5;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: stretch;
  animation: deskIn 0.22s ease both;
}

.bw-wd-result__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  animation: bwWdIconIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bw-wd-result__svg {
  width: 48px;
  height: 48px;
  display: block;
  overflow: visible;
}

.bw-wd-result__disc {
  stroke: none;
}

.bw-wd-result__mark {
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
}

.bw-wd-result__dot {
  fill: #fff;
  stroke: none;
}

.bw-wd-result.is-ok .bw-wd-result__disc {
  fill: #22c55e;
}

.bw-wd-result.is-err .bw-wd-result__disc {
  fill: #ef4444;
}

@keyframes bwWdIconIn {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.bw-wd-result__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 130%;
  color: #f5f5f5;
}

.bw-wd-result__msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  white-space: pre-wrap;
}

.bw-wd-result__list {
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bw-wd-result__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bw-wd-result__row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.bw-wd-result__row dt {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
}

.bw-wd-result__row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f5f5f5;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bw-wd-result__row--accent dd {
  color: #ef4444;
  font-weight: 700;
}

.bw-wd-result__btn {
  appearance: none;
  width: 100%;
  height: 44px;
  margin-top: 2px;
  border: 0;
  border-radius: 28px;
  background: #3c9bf4;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.bw-wd-result__btn:hover {
  background: #5aabf6;
}

.bw-wd-result__btn:active {
  transform: scale(0.99);
}

@media (max-width: 700px) {
  .desk-dl { grid-template-columns: 1fr; }
  .desk-field-row { grid-template-columns: 1fr; }
  /* Keep binary segments side-by-side ? stacking looked like cheap divider rows */
  .desk-wd__modes,
  .desk-promo-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-wd__modes--tri {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Country bars ? quiet */
.crm-bars,
.desk-bars { display: grid; gap: 12px; }

.desk-bars--compact {
  gap: 8px;
  margin: 0 0 16px;
}

.desk-bars--compact + .desk-chart {
  margin-top: 4px;
}

.crm-bar,
.desk-bar {
  display: grid;
  grid-template-columns: 56px 1fr 36px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.crm-bar--source {
  grid-template-columns: minmax(88px, 1.35fr) 1fr 36px;
}

.crm-bar--domain {
  grid-template-columns: minmax(96px, 1.6fr) 1fr 36px;
}

.desk-domain-bar {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.desk-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.desk-source__logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}

.desk-source__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-source--text {
  font-weight: 500;
}

.crm-cc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.crm-cc__flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.crm-cc__flag--unk {
  display: inline-block;
  width: 18px;
  height: 13px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.crm-cc__code {
  line-height: 1;
}

.crm-bar__track,
.desk-bar__track {
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.crm-bar__fill,
.desk-bar__fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.8s ease;
}

.crm-bar strong,
.desk-bar strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Login ? split shell */
body.staff-login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  overflow: hidden;
}

.staff-login-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  padding: 32px 20px;
}

.staff-login-shell .desk-lang--login {
  top: 20px;
  right: auto;
  left: 24px;
  z-index: 5;
  background: rgba(18, 20, 26, 0.92);
  border: 1.5px solid var(--line);
}

.staff-login-shell__panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(400px, 100%);
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.staff-login-wrap {
  /* legacy fallback if used elsewhere */
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.staff-login {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: 0;
}

.staff-login__brand {
  display: grid;
  gap: 6px;
  margin: 0 0 36px;
  color: var(--text);
}

.staff-login__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.staff-login__brand strong {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.staff-login__brand > span:last-child {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.staff-login__coins {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.staff-login__coin {
  position: relative;
  width: 32px;
  height: 32px;
  margin-left: -6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
  object-position: center;
  /* Light hairline — black SOL stays readable without a dark outline ring */
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.14);
  image-rendering: auto;
  -webkit-user-drag: none;
}

.staff-login__coin:first-child {
  margin-left: 0;
}

.staff-login__coin:nth-child(1) { z-index: 1; }
.staff-login__coin:nth-child(2) { z-index: 2; }
.staff-login__coin:nth-child(3) { z-index: 3; }
.staff-login__coin:nth-child(4) { z-index: 4; }
.staff-login__coin:nth-child(5) { z-index: 5; }
.staff-login__coin:nth-child(6) { z-index: 6; }
.staff-login__coin:nth-child(7) { z-index: 7; }
.staff-login__coin:nth-child(8) { z-index: 8; }

@media (max-width: 420px) {
  .staff-login__coin {
    width: 28px;
    height: 28px;
    margin-left: -5px;
  }
}

.staff-login h1 {
  margin: 0 0 28px;
  font-size: 26px;
  letter-spacing: -0.04em;
  font-weight: 600;
  line-height: 1.15;
}

.staff-login .staff-lede {
  margin: -16px 0 28px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 36ch;
}

.staff-login .staff-lede a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.staff-login .staff-lede a:hover {
  color: var(--muted);
}

.staff-login label,
.staff-login__field {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.staff-login input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--desk-card-border, var(--field-border));
  border-radius: var(--desk-card-radius, 12px);
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  letter-spacing: -0.012em;
  text-transform: none;
  font-weight: 450;
  transition:
    border-color 0.14s ease,
    background-color 0.14s ease,
    box-shadow 0.14s ease;
}

.staff-login input::placeholder {
  color: rgba(168, 178, 191, 0.48);
}

.staff-login input:hover {
  border-color: var(--field-border-hover);
  background-color: var(--field-hover);
}

.staff-login input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.18));
  background-color: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.staff-login input:user-invalid {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: none;
}

.staff-login__pw {
  position: relative;
  display: block;
}

.staff-login__pw input {
  padding-right: 44px;
}

.staff-login__eye {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.12s ease;
}

.staff-login__eye:hover {
  color: var(--text);
  background: transparent;
}

.staff-login__eye.is-on {
  color: var(--text);
}

.staff-login .staff-btn {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  filter: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.staff-login .staff-btn:hover {
  filter: none;
  background: transparent;
  color: var(--v2-text-secondary, var(--accent));
  border-color: rgba(255, 255, 255, 0.35);
}


.crm-top__eyebrow {
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes deskIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1100px) {
  .desk-metrics,
  .crm-kpis,
  .staff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .desk-metric:nth-child(3n),
  .crm-kpis > *:nth-child(3n),
  .staff-grid > .staff-stat:nth-child(3n) { border-right: 0; }
  .crm-board,
  .desk-row,
  .desk-row--dash-main,
  .desk-row--3 { grid-template-columns: 1fr; gap: 32px; }
  .crm-split,
  .staff-split { grid-template-columns: 1fr; }
}

/* ?? Tablet + phone: drawer shell (desktop sidebar untouched above this) ?? */
@media (max-width: 960px) {
  body.desk {
    --desk-topbar-h: 56px;
    /* No gap under fixed topbar ? a separate gutter showed as a color seam */
    --desk-topbar-gap: 0px;
    padding: 0;
    padding-left: 0;
    /* Clear fixed topbar (56px chrome + notch) only */
    padding-top: calc(var(--desk-topbar-h) + env(safe-area-inset-top, 0px));
  }

  body.desk.is-nav-open {
    overflow: hidden;
  }

  .desk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    box-sizing: border-box;
    min-height: calc(var(--desk-topbar-h) + env(safe-area-inset-top, 0px));
    padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    border-bottom: 0;
    box-shadow: none;
    background: var(--bg);
    background-color: var(--bg);
  }

  /* Force brand LEFT + menu RIGHT even if legacy HTML still has menu first */
  .desk-topbar__brand {
    order: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
    color: var(--text);
  }

  .desk-topbar__brand--stack {
    align-items: center;
  }

  .desk-topbar__brand--wordmark {
    gap: 0;
  }

  .desk-topbar__wordmark {
    display: block;
    width: auto;
    max-width: min(176px, 58vw);
    height: 28px;
    object-fit: contain;
    object-position: left center;
  }

  .desk-topbar__mark,
  .desk-topbar__logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
  }

  .desk-topbar__mark {
    overflow: visible;
    shape-rendering: geometricPrecision;
  }

  .desk-topbar__brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
  }

  .desk-topbar__brand-text strong,
  .desk-topbar__brand > strong {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desk-topbar__brand--textonly .desk-topbar__brand-text strong {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #f4f7fb 0%, #d7e2ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  .desk-topbar__brand-text em,
  .desk-topbar__brand > em {
    display: block;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Legacy topbar: strong+em were direct children ? stack like sidebar */
  .desk-topbar__brand:not(:has(.desk-topbar__brand-text)) {
    flex-wrap: wrap;
    row-gap: 1px;
    column-gap: 10px;
  }
  .desk-topbar__brand:not(:has(.desk-topbar__brand-text)) > strong {
    flex: 1 1 auto;
    min-width: 0;
  }
  .desk-topbar__brand:not(:has(.desk-topbar__brand-text)) > em {
    flex: 1 1 100%;
  }

  /* Frameless ? just the three bars */
  .desk-topbar__menu {
    order: 2;
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 40px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    box-shadow: none;
    transition: color 0.15s ease, opacity 0.15s ease;
  }

  .desk-topbar__menu:hover {
    background: transparent;
    color: var(--text);
    opacity: 0.82;
  }

  .desk-topbar__menu:active {
    background: transparent;
    opacity: 0.7;
  }

  .desk-topbar__menu:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
  }

  .desk-topbar__menu[aria-expanded='true'] {
    background: transparent;
    color: var(--text);
    opacity: 1;
  }

  .desk-topbar__menu-ico {
    display: block;
    width: 22px;
    height: 16px;
    overflow: visible;
  }

  .desk-topbar__menu-line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    transform-origin: 11px 8px;
    transition: transform 0.2s ease, opacity 0.16s ease;
  }

  .desk-topbar__menu[aria-expanded='true'] .desk-topbar__menu-line--a {
    transform: translateY(6px) rotate(45deg);
  }

  .desk-topbar__menu[aria-expanded='true'] .desk-topbar__menu-line--b {
    opacity: 0;
    transform: scaleX(0.35);
  }

  .desk-topbar__menu[aria-expanded='true'] .desk-topbar__menu-line--c {
    transform: translateY(-6px) rotate(-45deg);
  }

  @media (prefers-reduced-motion: reduce) {
    .desk-topbar__menu-line {
      transition: none;
    }
  }

  /* Legacy bars (if any old HTML) */
  .desk-topbar__menu-bars,
  .desk-topbar__menu-bars::before,
  .desk-topbar__menu-bars::after {
    display: block;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    position: relative;
  }

  .desk-topbar__menu-bars::before,
  .desk-topbar__menu-bars::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .desk-topbar__menu-bars::before { top: -5px; }
  .desk-topbar__menu-bars::after { top: 5px; }

  @media (prefers-reduced-motion: reduce) {
    .desk-topbar__mark animate {
      display: none;
    }
  }

  .desk-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.desk.is-nav-open .desk-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  html.desk-html,
  body.desk {
    overflow-x: clip;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: auto;
    font-weight: 500;
    color: var(--text);
  }

  .desk-body {
    min-height: calc(100dvh - var(--desk-topbar-h) - env(safe-area-inset-top, 0px) - var(--desk-topbar-gap));
    border: 0;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
    overflow-x: clip;
  }

  .desk-work-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    min-height: 40px;
    /* Air lives on the same surface as content ? not a body gutter under the topbar */
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg);
  }

  .desk-work-top__title {
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .desk-work-top__actions {
    width: auto;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  .desk-work-top__actions .staff-btn,
  .desk-work-top__actions a.staff-btn,
  .desk-work-top__actions .desk-field__btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    justify-content: center;
  }

  .desk-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(300px, 86vw);
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 8px 0 12px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    overflow: hidden;
  }

  body.desk.is-nav-open .desk-nav {
    transform: translateX(0);
  }

  .desk-nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 8px 0 20px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .desk-nav__a {
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
  }

  .desk-nav__foot {
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    border-top: 0;
  }

  .desk-account__btn {
    min-height: 48px;
  }

  .desk-account__avatar {
    width: 36px;
    height: 36px;
  }

  .desk-account__item {
    min-height: 44px;
    font-size: 14px;
  }

  .desk-account__lang {
    min-height: 40px;
  }

  .desk-nav__support {
    min-height: 44px;
    font-size: 14px;
  }

  .desk-nav__foot-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .desk-lang--rail .desk-lang__btn {
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .desk-nav__out {
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }

  .desk-nav__a.is-active::before {
    display: none;
  }

  .desk-nav__end {
    display: none;
  }

  .desk-tape {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    flex-wrap: wrap;
    row-gap: 8px;
    min-height: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .desk-head {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-top: 14px;
    flex-wrap: wrap;
  }

  .desk-head__title {
    font-size: clamp(20px, 5vw, 26px);
    overflow-wrap: anywhere;
  }

  .desk-main,
  .staff-desk__main {
    padding: 4px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
  }

  .desk-main--flush,
  .staff-desk__main.desk-main--flush {
    padding-top: 4px;
  }

  .desk-balance,
  .desk-balance--2,
  .desk-balance--3,
  .desk-balance--4 {
    grid-template-columns: 1fr 1fr;
    max-width: none;
    gap: 10px;
  }

  .desk-balance__item {
    padding: 12px 14px;
  }

  .desk-balance__item:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .desk-metrics,
  .desk-metrics--3,
  .desk-metrics--4,
  .desk-metrics--5,
  .desk-metrics--6,
  .crm-kpis,
  .staff-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .desk-metric,
  .crm-kpis > *,
  .staff-grid > .staff-stat {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    padding: 12px 14px;
    min-width: 0;
  }

  .desk-metric:nth-child(3n),
  .crm-kpis > *:nth-child(3n),
  .staff-grid > .staff-stat:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .desk-metric:nth-child(2n),
  .crm-kpis > *:nth-child(2n),
  .staff-grid > .staff-stat:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .desk-metric:last-child:nth-child(odd),
  .crm-kpis > *:last-child:nth-child(odd),
  .staff-grid > .staff-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 1px solid var(--line);
  }

  .desk-metric__value,
  .desk-balance__value {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .desk-metric__label,
  .desk-metric__hint {
    overflow-wrap: anywhere;
  }

  .desk-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 10px 12px;
  }

  .desk-filter__bar {
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .desk-filter__more {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #f5f5f5;
    border-radius: var(--radius-sm);
    background: #f5f5f5;
    color: #0a0b0c;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
  }

  .desk-filter__more:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: #0a0b0c;
  }

  .desk-filter__more[aria-expanded='true'] {
    border-color: #ffffff;
    background: #ffffff;
    color: #0a0b0c;
  }

  .desk-filter__more[aria-expanded='true'] .desk-filter__count {
    background: rgba(255, 255, 255, 0.18);
  }

  .desk-period {
    flex: 0 1 auto;
    width: max-content;
    max-width: calc(100% - 96px);
    min-width: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 3px;
    scrollbar-width: none;
  }

  .desk-period::-webkit-scrollbar {
    display: none;
  }

  .desk-period a {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }

  .desk-filter[data-desk-filter-collapse] .desk-filter__rail {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    align-items: stretch;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .desk-filter[data-desk-filter-collapse].is-open .desk-filter__rail {
    display: grid;
  }

  .desk-filter__dash,
  .desk-filter__sep {
    display: none;
  }

  .desk-filter__date,
  .desk-filter__select,
  .desk-filter__country,
  .desk-filter__q,
  .desk-dd {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .desk-filter--users .desk-filter__q {
    width: 100%;
    flex: 1 1 auto;
  }

  .desk-filter--users .desk-field__btn {
    margin-left: 0;
  }

  .desk-filter__date,
  .desk-filter__country,
  .desk-filter__q,
  .desk-dd__btn {
    height: 40px;
    padding: 0 10px;
    border: 1.5px solid var(--line-strong);
    border-radius: 8px;
    background-color: var(--field);
  }

  .desk-dd__btn {
    --desk-dd-chevron-right: 12px;
    width: 100%;
    justify-content: flex-start;
    padding-right: 28px;
    background-image: none;
    color: var(--muted);
  }

  .desk-dd__btn--field {
    --desk-dd-chevron-right: 14px;
    padding-right: 36px;
  }

  /* Mobile: keep a visible scrollbar rail in dropdowns / scroll panels */
  .desk-dd__menu,
  .desk-dd__menu--scroll,
  .desk-plist__list,
  .desk-promo-modal__panel {
    overflow-y: scroll;
    scrollbar-width: auto;
    scrollbar-gutter: stable;
  }

  .desk-dd__menu,
  .desk-dd__menu--fixed {
    background: var(--v2-raised, #2c2c2c) !important;
    border-color: var(--v2-line-strong, #454545) !important;
  }

  .desk-dd__menu::-webkit-scrollbar,
  .desk-dd__menu--scroll::-webkit-scrollbar,
  .desk-plist__list::-webkit-scrollbar,
  .desk-promo-modal__panel::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    -webkit-appearance: none;
  }

  .desk-dd__menu::-webkit-scrollbar-thumb,
  .desk-dd__menu--scroll::-webkit-scrollbar-thumb,
  .desk-plist__list::-webkit-scrollbar-thumb,
  .desk-promo-modal__panel::-webkit-scrollbar-thumb {
    background: var(--desk-scroll-thumb, rgba(255, 255, 255, 0.4));
    border: 2px solid transparent;
    background-clip: padding-box;
    min-height: 36px;
  }

  .desk-dd,
  .desk-filter__country {
    grid-column: 1 / -1;
  }

  .desk-dd__menu {
    left: 0;
    right: 0;
    min-width: 100%;
    max-width: none;
  }

  .desk-filter__go,
  .desk-filter__reset {
    grid-column: span 1;
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    justify-content: center;
    text-align: center;
  }

  .desk-filter__go {
    color: var(--text);
  }

  .desk-filter__reset {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
  }

  .desk-chart,
  .desk-chart--sm {
    height: 200px;
    max-width: 100%;
  }

  .desk-donut {
    grid-template-columns: 1fr;
    justify-items: stretch;
    min-height: 0;
  }

  .desk-donut__ring {
    max-width: 200px;
  }

  .desk-donut__legend {
    width: 100%;
    max-width: none;
    max-height: 200px;
  }

  .crm-bar,
  .desk-bar,
  .crm-bar--source,
  .crm-bar--domain {
    grid-template-columns: minmax(64px, 0.9fr) 1fr minmax(28px, auto);
    gap: 8px;
  }

  .desk-table-scroll {
    margin-inline: 0;
    padding-inline: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .desk-section > .desk-table-scroll,
  .desk-section:has(> .desk-table-scroll:first-child) .desk-table-scroll {
    border-radius: inherit;
  }

  /* Table lists: no double panel strip behind cards */
  .desk-section:has(> .desk-table-scroll),
  .desk-section:has(> .desk-table-scroll:first-child),
  .desk-section:has(> .desk-section__label + .desk-table-scroll) {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    overflow: visible;
    padding-left: 0;
    padding-right: 0;
  }

  .desk-section:has(.staff-table.is-cardable) > .desk-table-scroll,
  .desk-table-scroll:has(.staff-table.is-cardable) {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  /* Phone cards: no horizontal scroll; labels stamped by JS */
  .desk-table-scroll .staff-table.is-cardable {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: visible;
    background: transparent;
  }

  .desk-table-scroll .staff-table.is-cardable thead {
    display: none !important;
  }

  .desk-table-scroll .staff-table.is-cardable tbody {
    display: block;
    width: 100%;
    background: transparent;
  }

  .desk-table-scroll .staff-table.is-cardable tbody tr {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 8px 16px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    overflow: hidden;
  }

  .desk-table-scroll .staff-table.is-cardable tbody tr:last-child {
    margin-bottom: 0;
  }

  .desk-table-scroll .staff-table.is-cardable tbody tr:hover,
  .desk-table-scroll .staff-table.is-cardable tbody tr:hover td,
  .desk-table-scroll .staff-table.is-cardable tbody tr.desk-row-link:hover td {
    background: rgba(255, 255, 255, 0.03);
  }

  .desk-section .desk-table-scroll .staff-table.is-cardable tbody td,
  .desk-table-scroll .staff-table.is-cardable tbody td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 6px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--line-strong, rgba(255, 255, 255, 0.1));
    border-radius: 0;
    background: transparent !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    position: static !important;
    left: auto !important;
    box-shadow: none !important;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.4;
    -webkit-font-smoothing: auto;
  }

  .desk-section .desk-table-scroll .staff-table.is-cardable tbody tr:last-child td,
  .desk-table-scroll .staff-table.is-cardable tbody td:last-child {
    border-bottom: 0;
  }

  .desk-table-scroll .staff-table.is-cardable tbody td::before {
    content: attr(data-label);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.35;
    padding-top: 3px;
  }

  .desk-table-scroll .staff-table.is-cardable tbody td[data-label=''],
  .desk-table-scroll .staff-table.is-cardable tbody td[colspan] {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }

  .desk-table-scroll .staff-table.is-cardable tbody td[data-label='']::before,
  .desk-table-scroll .staff-table.is-cardable tbody td[colspan]::before {
    display: none;
  }

  .desk-table-scroll .staff-table.is-cardable tbody td[colspan] {
    text-align: center;
    color: var(--muted);
    font-weight: 500;
    padding: 18px 8px;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-ns-actions-inner,
  .desk-table-scroll .staff-table.is-cardable .desk-mini-actions:not(.desk-wd-rules__acts-inner) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-ns-actions-inner form,
  .desk-table-scroll .staff-table.is-cardable .desk-mini-actions form,
  .desk-table-scroll .staff-table.is-cardable td[data-label=''] form {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-wd-rules__acts-inner {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    width: auto;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-mini-btn,
  .desk-table-scroll .staff-table.is-cardable .desk-ban-btn,
  .desk-table-scroll .staff-table.is-cardable td[data-label=''] .desk-field__btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    justify-content: center;
    color: #0a0b0c;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-wd-rules__acts-inner .desk-mini-btn {
    flex: 0 0 auto;
    min-height: 26px;
    height: 26px;
    width: auto;
  }

  .desk-table-scroll .staff-table.is-cardable .staff-mono,
  .desk-table-scroll .staff-table.is-cardable .desk-copy,
  .desk-table-scroll .staff-table.is-cardable a:not(.desk-tx):not(.desk-mini-btn):not(.desk-ban-btn) {
    color: var(--text);
    font-weight: 600;
  }

  /* Chips/links must not stretch across the value column */
  .desk-table-scroll .staff-table.is-cardable tbody td {
    justify-items: start;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-tx,
  .desk-table-scroll .staff-table.is-cardable .desk-copy,
  .desk-table-scroll .staff-table.is-cardable .desk-asset {
    width: max-content;
    max-width: 100%;
    justify-self: start;
    min-width: 0;
  }

  .desk-table-scroll .staff-table.is-cardable .desk-tx__hash {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Fallback before JS stamps cards: still avoid page-wide swipe */
  .desk-table-scroll .staff-table:not(.is-cardable) {
    display: block;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .staff-table,
  .staff-mono,
  .desk-copy,
  .desk-tx,
  .desk-domain-bar {
    max-width: 100%;
  }

  .staff-mono,
  .desk-copy {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .desk-asset {
    max-width: 140px;
  }

  .desk-dl {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .desk-field-row {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .desk-field-row .desk-field__btn,
  .desk-field-row a.desk-field__btn {
    width: auto;
    flex: 0 0 auto;
  }

  .desk-wd,
  .desk-pwd,
  .desk-wallets,
  .staff-form {
    max-width: none;
    width: 100%;
  }

  .desk-wd__modes,
  .desk-promo-type {
    grid-template-columns: 1fr 1fr;
  }

  .desk-wd__modes--tri {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desk-wallets__head,
  .desk-wallet {
    grid-template-columns: 22px 72px minmax(0, 1fr) 32px;
    gap: 8px 10px;
  }

  .desk-wallets__actions,
  .desk-wd__actions,
  .staff-actions {
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .desk-wd__actions .desk-field__btn,
  .desk-wd__actions a.desk-field__btn,
  .desk-wallets__actions .desk-field__btn,
  .staff-actions .staff-btn,
  .staff-actions a.staff-btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    justify-content: center;
    text-align: center;
  }

  .desk-field__btn,
  a.desk-field__btn,
  .staff-btn,
  a.staff-btn {
    min-height: 32px;
  }

  .staff-filters,
  .crm-filters,
  .desk-toolbar {
    width: 100%;
  }

  .staff-filters label,
  .crm-filters label,
  .desk-toolbar label {
    flex: 1 1 100%;
    min-width: 0;
  }

  .staff-filters input,
  .staff-filters select,
  .crm-filters input,
  .crm-filters select,
  .desk-toolbar input,
  .desk-toolbar select,
  .staff-form input,
  .staff-form select,
  .staff-form textarea {
    min-width: 0;
    max-width: 100%;
  }

  .desk-lang--login {
    top: 12px;
    right: 12px;
    left: 12px;
    min-width: 0;
    width: auto;
  }

  body.staff-login-page {
    overflow: auto;
  }

  .staff-login-shell {
    min-height: 100dvh;
  }

  .staff-login-wrap {
    padding: 72px 16px 32px;
    overflow-x: clip;
  }

  .staff-login {
    width: 100%;
  }

  .staff-login h1 {
    font-size: clamp(24px, 7vw, 32px);
  }
}

/* ?? Narrow phone ?? */
@media (max-width: 640px) {
  .desk-balance,
  .desk-balance--2,
  .desk-balance--3,
  .desk-balance--4 {
    grid-template-columns: 1fr;
  }

  .desk-balance__item,
  .desk-balance__item:not(:first-child),
  .desk-balance__item:nth-child(2n) {
    border-right: 0;
    padding: 10px 0;
  }

  .desk-balance__item + .desk-balance__item {
    border-top: 1.5px solid var(--line);
  }

  .desk-metrics,
  .desk-metrics--3,
  .desk-metrics--4,
  .desk-metrics--5,
  .desk-metrics--6,
  .crm-kpis,
  .staff-grid {
    grid-template-columns: 1fr 1fr;
  }

  .desk-wd__modes,
  .desk-promo-type {
    grid-template-columns: 1fr 1fr;
  }

  .desk-wd__modes--tri {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desk-wd__mode {
    border: 0;
  }

  .desk-wallets__head {
    display: none;
  }

  .desk-wallet {
    grid-template-columns: 22px minmax(0, 1fr) 32px;
    grid-template-rows: auto auto;
  }

  .desk-wallet__coin {
    grid-column: 1;
    grid-row: 1;
  }

  .desk-wallet__name {
    grid-column: 2;
    grid-row: 1;
  }

  .desk-wallet__edit,
  .desk-wallet__edit-slot {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .desk-wallet__addr {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .desk-wallet:not(:last-child)::after {
    right: 0;
  }

  .desk-wd__actions .desk-field__btn,
  .desk-wd__actions a.desk-field__btn,
  .desk-wallets__actions .desk-field__btn,
  .staff-actions .staff-btn,
  .staff-actions a.staff-btn {
    flex: 0 0 auto;
    width: auto;
  }

  .crm-bar,
  .desk-bar,
  .crm-bar--source,
  .crm-bar--domain {
    grid-template-columns: minmax(56px, 0.85fr) 1fr 32px;
  }

  .desk-table-scroll .staff-table {
    min-width: 520px;
  }

}

/* ??? Partner support inbox / thread ??? */
body.desk:has(.desk-support--desk) {
  height: 100dvh;
  overflow: hidden;
}

body.desk:has(.desk-support--desk) > .desk-body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.desk-main:has(> .desk-support--desk) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  /* slim outer gutter so the card radius stays visible against the desk bg */
  padding: 8px;
}

.desk-support--desk {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--v2-line, var(--desk-card-border));
  border-radius: 18px;
  background: var(--v2-card, var(--desk-card-bg));
  overflow: hidden;
  box-shadow: var(--v2-shadow, none);
}

/* Higher-specificity guard: .desk-section {border-color:transparent} later in
   the file was erasing the chat frame — keep the rounded v2 border visible.
   border-radius forced !important too — a later .desk-section rule (same
   0,1,0 specificity) was winning on source order and squaring the corners. */
body.desk-v2 .desk-support--desk {
  border: 1px solid var(--v2-line) !important;
  border-radius: 18px !important;
  overflow: hidden;
  background: var(--v2-card);
  box-shadow: var(--v2-shadow);
}

.desk-support__rail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.desk-support__rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-support__search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.desk-support__search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #8b95a5);
  pointer-events: none;
}

.desk-support__search-input {
  width: 100%;
  height: 40px;
  padding-left: 36px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.desk-support__search-input:hover,
.desk-support__search-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.desk-support__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.desk-support__icon-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.desk-support__filters--rail {
  flex: 0 0 auto;
  width: calc(100% - 24px);
  margin: 10px 12px 0;
  box-sizing: border-box;
}

.desk-support__filters--rail .desk-support__filter {
  flex: 1 1 0;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.desk-support__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  margin-top: 8px;
}

.desk-support__list::-webkit-scrollbar {
  width: 10px;
  -webkit-appearance: none;
}

.desk-support__list::-webkit-scrollbar-thumb {
  background: var(--v2-line-strong, rgba(255, 255, 255, 0.18));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-support__list::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--v2-line, #333) 45%, transparent);
}

.desk-support__list-empty {
  margin: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.desk-support__item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}

.desk-support__item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.desk-support__item.is-active {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 3px 0 0 var(--v2-text-secondary, #d4d4d4);
}

.desk-support__item.is-closed {
  opacity: 0.72;
}

.desk-support__item-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

/* Read/unread indicator — every row used to render identically (same bold
   weight, same color) whether it had unread messages or not, so there was
   no way to scan the list and tell what still needs attention. */
.desk-support__item-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v2-text-secondary, #d4d4d4);
}

.desk-support__item-badge {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #141414;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.desk-support__item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.desk-support__item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.desk-support__item-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  /* Read by default — everything used to be 600/bold regardless of state.
     .is-unread bumps this back up so unread threads visibly pop. */
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--v2-text-secondary, var(--muted));
}

.desk-support__item.is-unread .desk-support__item-email {
  font-weight: 700;
  color: var(--text);
}

.desk-support__item-time {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.desk-support__item.is-unread .desk-support__item-time {
  color: var(--v2-text-secondary, var(--text));
  font-weight: 600;
}

.desk-support__item-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--muted);
}

.desk-support__item.is-unread .desk-support__item-preview {
  color: var(--v2-text-secondary, var(--muted));
}

.desk-support__pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.desk-support__empty-pane {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  color: var(--muted, #8b95a5);
  background-color: var(--v2-well, #242424);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 15px 15px;
}

.desk-support__empty-ico {
  opacity: 0.55;
  color: #aab4c2;
}

.desk-support__empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: #e8eef6;
}

.desk-support__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.desk-support__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-left: auto;
}

.desk-support-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.desk-support-settings-modal .desk-promo-modal__panel {
  width: min(440px, calc(100vw - 24px));
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.desk-support-settings-modal .desk-promo-modal__head {
  flex: 0 0 auto;
  padding: 10px 14px;
}

.desk-support-settings-modal .desk-promo-modal__head h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.desk-support-settings-modal .desk-promo-modal__x {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.desk-support-settings-modal__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px 16px 16px;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}

.desk-support-settings__flash {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.desk-support-settings--modal {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  flex: 0 0 auto;
  overflow: visible;
  width: 100%;
  min-width: 0;
}

.desk-support-settings--modal > .desk-field,
.desk-support-settings--modal > .desk-support-settings__avatar,
.desk-support-settings--modal > .desk-support-settings__actions {
  width: 100%;
  min-width: 0;
}

.desk-notify-steps {
  margin: 0 0 18px;
  padding: 0 0 0 18px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.desk-notify-steps li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.desk-smtp-row {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 640px) {
  .desk-smtp-row {
    grid-template-columns: 1fr;
  }
}

.desk-smtp-test {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.desk-notify-steps li:last-child {
  margin-bottom: 0;
}

.desk-support-settings__hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.desk-support-settings__avatar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  min-width: 0;
}

.desk-support-settings__preview-wrap {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 0;
  background: var(--v2-raised, #1a2028);
  /* Matte dark edge ? white border reads as a glossy rim */
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.desk-support-settings__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Parent clips the circle ? radius on img causes shiny AA fringe */
  border-radius: 0;
  display: block;
  filter: none;
  -webkit-filter: none;
  image-rendering: auto;
}

.desk-support-settings__avatar-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.desk-support-settings__upload {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.desk-support-settings__file-btn.desk-field__btn {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.desk-support-settings__clear {
  font-size: 12px;
  white-space: nowrap;
  margin: 0;
}

.desk-support-settings__file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  flex: 0 0 auto;
}

.desk-support-settings__file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.desk-support-settings__file-name {
  font-size: 11px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.desk-support-settings__welcome-field {
  width: 100%;
}

.desk-support-settings__welcome {
  display: block;
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  resize: none;
  font-size: 13px;
  line-height: 1.35;
  padding: 0 12px;
  box-sizing: border-box;
}

.desk-support-settings__welcome-hint {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.35;
}

.desk-support-settings__domains {
  --desk-scroll-thumb: rgba(255, 255, 255, 0.34);
  --desk-scroll-thumb-hover: rgba(255, 255, 255, 0.48);
  --desk-scroll-track: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 10px;
  background: var(--field);
  scrollbar-width: thin;
  scrollbar-color: var(--desk-scroll-thumb) var(--desk-scroll-track);
}

.desk-support-settings__domains::-webkit-scrollbar {
  width: 8px;
}

.desk-support-settings__domains::-webkit-scrollbar-track {
  margin: 6px 2px;
  background: var(--desk-scroll-track);
  border-radius: 999px;
}

.desk-support-settings__domains::-webkit-scrollbar-thumb {
  background: var(--desk-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-support-settings__domains::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-support-settings__domain {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.desk-support-settings__domain:last-child {
  border-bottom: 0;
}

.desk-support-settings__domain:hover {
  background: rgba(255, 255, 255, 0.03);
}

.desk-support-settings__domain:has(input:checked) {
  background: rgba(58, 143, 214, 0.07);
}

.desk-support-settings__domain > input[type='checkbox'] {
  margin: 0;
  flex: 0 0 auto;
}

.desk-support-settings__domain-host {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text, #f5f5f5);
}

.desk-support-settings__domain-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3c9bf4;
  box-shadow: 0 0 0 2px rgba(60, 155, 244, 0.18);
}

.desk-support-settings__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-support-settings__actions--bar {
  margin-top: auto;
  justify-content: flex-end;
}

.desk-support-settings--modal .desk-support-settings__actions--bar {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding-top: 14px;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-support-settings--modal .desk-support-settings__save {
  min-width: 108px;
  min-height: 36px;
  padding: 0 18px;
}

.desk-support-settings__save {
  min-width: 120px;
  background: #f5f5f5 !important;
  border-color: #f5f5f5 !important;
  color: #0a0b0c !important;
}

.desk-support-settings__save:hover:not(:disabled) {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #0a0b0c !important;
}

.desk-support-settings__save:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.desk-support__filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.desk-support__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  margin-right: 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.desk-support__filter:last-child {
  margin-right: 0;
}

.desk-support__filter:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.desk-support__filter.is-active {
  color: var(--text);
  border-bottom-color: transparent;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.desk-support__filter.is-active:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.desk-support__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: #f0f0f0;
  color: #141414;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.desk-support__preview {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.desk-support--desk .desk-support--thread {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--desk-card-bg, #1c1c1c);
}

.desk-support--thread {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(720px, 100%);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.desk-support__chat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex: 0 0 auto;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.015);
}

.desk-support__chat-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 220px;
}

.desk-support__chat-id {
  min-width: 0;
}

.desk-support__chat-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.desk-support__chat-email .desk-user-link {
  color: inherit;
  text-decoration: none;
}

.desk-support__chat-email .desk-user-link:hover {
  color: #fff;
  text-decoration: underline;
}

.desk-support__chat-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 2px 0 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.desk-support__chat-sub [data-desk-support-presence] {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.desk-support__chat-sub .desk-status--presence,
.desk-support__chat-sub .desk-presence {
  font-weight: 550;
  font-size: 11px;
  letter-spacing: 0;
}

.desk-support__chat-sub-rest {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-support__pane-back {
  display: none;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #6bb6f7;
  text-decoration: none;
  white-space: nowrap;
}

.desk-support__pane-back:hover {
  text-decoration: underline;
}

.desk-support__pane-back-ico {
  display: none;
}

.desk-support__icon-action {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #b8c2d0;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.desk-support__icon-action:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.desk-support--desk .desk-support__stream {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: auto;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.desk-support--desk .desk-support__compose {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-top: 0;
  z-index: 2;
}

.desk-support__closed-note {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.desk-support__back {
  margin: 0;
}

.desk-support__meta-dl {
  margin: 0 0 20px;
  max-width: none;
}

.desk-support__meta-dl dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.desk-support__thread-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.desk-support__thread-actions form,
.desk-support__toggle-form {
  margin: 0;
}

.desk-support__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.desk-support__toggle:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.desk-support__toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--v2-accent, #D4544C) 55%, transparent);
  outline-offset: 2px;
}

.desk-support__toggle-track {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--v2-bad, #c23b3b);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: background 0.18s ease;
}

.desk-support__toggle.is-on .desk-support__toggle-track {
  background: var(--v2-ok, #2dbe6c);
}

.desk-support__toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.desk-support__toggle.is-on .desk-support__toggle-knob {
  transform: translateX(18px);
}

.desk-support__toggle-label {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  min-width: 3.2em;
  text-align: left;
  color: #e8eef6;
}

.desk-support__toggle.is-on .desk-support__toggle-label {
  color: #9be7b8;
}

.desk-support__toggle:not(.is-on) .desk-support__toggle-label {
  color: #f0a0a0;
}

/* Withdraw Error/Success switch ? same language as support open/closed toggle */
.desk-wd__mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}

.desk-wd-eswitch {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.desk-wd-eswitch--off .desk-wd-eswitch__track {
  background: var(--v2-line-strong, #4b5563);
}

.desk-wd-eswitch--off .desk-wd-eswitch__label {
  color: var(--muted, #a8b2bf);
  min-width: 2.8em;
}

/* Section ON (override active) ? green */
.desk-wd-eswitch--off.is-on .desk-wd-eswitch__track {
  background: var(--v2-ok, #2dbe6c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.desk-wd-eswitch--off.is-on .desk-wd-eswitch__label {
  color: #9be7b8;
}

.desk-wd-eswitch--off.is-on .desk-wd-eswitch__knob {
  transform: translateX(18px);
}

/* Section OFF (rules apply) ? gray, knob left */
.desk-wd-eswitch--off.is-off .desk-wd-eswitch__track {
  background: #4b5563;
}

.desk-wd-eswitch--off.is-off .desk-wd-eswitch__label {
  color: var(--muted, #a8b2bf);
}

.desk-wd-eswitch--off.is-off .desk-wd-eswitch__knob {
  transform: translateX(0);
}

.desk-wd__mode-row.is-override-off [data-desk-wd-eswitch] {
  opacity: 0.42;
  pointer-events: none;
}

.desk-wd__mode-row.is-override-off ~ .desk-field.is-disabled,
.desk-field.is-disabled {
  opacity: 0.45;
}

.desk-field.is-disabled .desk-field__input,
.desk-field.is-disabled .desk-field__input--area {
  cursor: not-allowed;
}

.desk-wd-eswitch__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desk-wd-eswitch__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px 6px 8px;
  min-height: 38px;
  border: 1px solid var(--v2-line, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  background: var(--v2-raised, rgba(255, 255, 255, 0.03));
  color: var(--text, #e8edf4);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.desk-wd-eswitch__btn:hover {
  border-color: var(--v2-line-strong, rgba(255, 255, 255, 0.18));
}

.desk-wd-eswitch__btn:focus-visible {
  outline: 2px solid var(--v2-text-secondary, rgba(255, 255, 255, 0.55));
  outline-offset: 2px;
}

.desk-wd-eswitch__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 2.8em;
  transition: color 0.15s ease;
}

.desk-wd-eswitch.is-idle .desk-wd-eswitch__btn {
  border-color: rgba(255, 255, 255, 0.1);
}

.desk-wd-eswitch__track {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--v2-bad, #c23b3b);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: background 0.18s ease;
}

.desk-wd-eswitch.is-on .desk-wd-eswitch__track {
  background: var(--v2-ok, #2dbe6c);
}

.desk-wd-eswitch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.desk-wd-eswitch.is-on .desk-wd-eswitch__knob {
  transform: translateX(18px);
}

.desk-wd-eswitch__label {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  min-width: 4.2em;
  text-align: left;
  color: #f0a0a0;
}

.desk-wd-eswitch.is-on .desk-wd-eswitch__label {
  color: #9be7b8;
}

.desk-wd-eswitch.is-idle .desk-wd-eswitch__label {
  color: #f0a0a0;
}

.desk-support__stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 16px;
  padding: 18px 20px 22px;
  min-height: 200px;
  max-height: min(56vh, 560px);
  overflow-y: scroll;
  border: 1px solid var(--line);
  background: var(--bg-ink);
  border-radius: var(--radius-sm);
  scroll-behavior: smooth;
}

.desk-support__stream::-webkit-scrollbar {
  width: 10px;
  -webkit-appearance: none;
}

.desk-support__stream::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--v2-line, #333) 40%, transparent);
}

.desk-support__stream::-webkit-scrollbar-thumb {
  background: var(--v2-line-strong, rgba(255, 255, 255, 0.16));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-support__stream::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-support__msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  max-width: min(640px, 92%);
  background: transparent;
}

.desk-support__msg:last-child {
  border-bottom: 0;
}

.desk-support__msg--user {
  align-self: flex-start;
  align-items: flex-start;
}

.desk-support__msg--agent {
  align-self: flex-end;
  align-items: flex-end;
}

.desk-support__msg--system {
  display: none;
}

.desk-support__msg-line {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.desk-support__msg--agent .desk-support__msg-line {
  flex-direction: row-reverse;
}

.desk-support__msg-row {
  display: contents;
}

.desk-support__msg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: min(420px, 100%);
}

.desk-support__msg--agent .desk-support__msg-stack {
  max-width: min(420px, calc(100% - 42px));
  /* The foot row (time · Edit · Delete) is often wider than a short bubble.
     Left-aligning everything (the default) let that wide foot dictate the
     stack's width while the bubble sat flush left inside it — for short
     replies the bubble visibly drifted away from the avatar, looking
     scattered/misaligned message to message. Right-align so the bubble and
     its foot both hug the avatar edge, like a normal "sent" chat bubble. */
  align-items: flex-end;
}

/* Wrapper (span) ? clips the circle. Never put absolute fill on bare img.avatar. */
.desk-support__avatar {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  align-self: flex-end;
  border: 0;
  background: var(--v2-raised, #1a2028);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.desk-support__avatar > .desk-support__avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  border: 0;
  display: block;
  filter: none;
  -webkit-filter: none;
  image-rendering: auto;
  background: transparent;
  box-shadow: none;
}

/* Legacy bare <img class="desk-support__avatar"> ? keep as a chip, not fullscreen */
img.desk-support__avatar {
  position: static;
  inset: auto;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
  background: var(--v2-raised, #1a2028);
}

.desk-support__msg--user .desk-support__avatar,
.desk-support__chat-av,
.desk-support__item-av {
  display: none !important;
}

.desk-support__bubble {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 0;
}

.desk-support__msg--user .desk-support__bubble {
  background: #f2f3f5;
  border: 1px solid #e2e4e9;
  color: #141414;
  border-top-left-radius: 6px;
}

.desk-support__msg--agent .desk-support__bubble {
  background: #2f6fed;
  color: #ffffff;
  border: 1px solid #2f6fed;
  border-top-right-radius: 6px;
}

.desk-support__who {
  font-size: 11px;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--v2-muted, #8b95a5);
  /* A bare max-width:100% never clips — flex items shrink-wrap to their
     content, so a long customer email just stretched the whole bubble
     column wide open next to short "Support" headers (uneven, scattered
     look). Cap it to the same width the bubble itself is allowed. */
  max-width: min(420px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-inline-start: 0;
}

.desk-support__msg--agent .desk-support__who {
  max-width: min(462px, 100%);
  padding-inline-end: 42px;
  box-sizing: border-box;
}

/* Time + edit now live together on one line under the bubble (was two
   stacked lines — bubble, then "Редактировать" on its own row, then the
   clock on a third row below that. Three lines of chrome for a one-word
   reply read as unfinished/template-y). */
.desk-support__msg-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 16px;
}

.desk-support__msg-time {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--v2-faint, #7d8796);
  font-variant-numeric: tabular-nums;
  padding-inline-start: 0;
  line-height: 1.2;
}

.desk-support__meta {
  display: none;
}

.desk-support__meta-right {
  display: none;
}

.desk-support__edit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8b95a5;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.12s ease;
}

.desk-support__edit::before {
  content: '·';
  color: var(--v2-faint, #7d8796);
}

.desk-support__edit:hover,
.desk-support__edit:focus-visible {
  color: #d4dce8;
  outline: none;
}

.desk-support__edit--danger:hover,
.desk-support__edit--danger:focus-visible {
  color: var(--bad, #f14d4d);
}

.desk-support__edit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.desk-support__edit[hidden] {
  display: none !important;
}

.desk-support__edit-form {
  display: grid;
  gap: 8px;
  margin: 0;
  width: 100%;
  color: inherit;
}

.desk-support__edit-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: inherit;
  resize: none;
  field-sizing: content;
  overflow: auto;
  max-height: 240px;
}

.desk-support__edit-input:hover,
.desk-support__edit-input:focus,
.desk-support__edit-input:focus-visible {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.desk-support__edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.desk-support__edit-save,
.desk-support__edit-cancel {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
}

.desk-support__msg--agent .desk-support__edit-save {
  color: rgba(10, 18, 14, 0.88);
}

.desk-support__msg--agent .desk-support__edit-cancel {
  color: rgba(10, 18, 14, 0.55);
}

.desk-support__msg--agent .desk-support__edit-save:hover,
.desk-support__msg--agent .desk-support__edit-cancel:hover,
.desk-support__msg--agent .desk-support__edit-save:focus-visible,
.desk-support__msg--agent .desk-support__edit-cancel:focus-visible {
  color: #0a120e;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.desk-support__edit-err {
  margin: 0;
  font-size: 12px;
  font-weight: 550;
  color: #7a1f1f;
}

.desk-support__bubble.is-editing {
  width: auto;
}

.desk-support__body {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
}

.desk-support__body .desk-support__link {
  color: var(--v2-text-secondary, var(--accent));
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.desk-support__body .desk-support__link:hover {
  color: #6bb6f7;
}

.desk-support__img-wrap {
  display: block;
  margin-top: 8px;
  max-width: min(360px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: inherit;
}

.desk-support__img-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.desk-support__img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: #0e1218;
  pointer-events: none;
}

.chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  overflow: hidden;
  background: rgba(6, 8, 12, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chat-lightbox[hidden] {
  display: none !important;
}

.chat-lightbox__img {
  display: block;
  box-sizing: border-box;
  max-width: min(960px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.chat-lightbox__close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 22, 28, 0.92);
  color: #f5f5f5;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.chat-lightbox__close:hover {
  background: rgba(32, 38, 48, 0.96);
  border-color: rgba(255, 255, 255, 0.45);
}

.chat-lightbox__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.desk-support__attach-preview {
  position: relative;
  display: inline-block;
  margin: 0 0 10px;
  max-width: min(280px, 100%);
}

.desk-support__attach-preview[hidden] {
  display: none !important;
}

.desk-support__attach-preview img {
  display: block;
  max-width: 100%;
  max-height: 160px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--line-strong);
}

.desk-support__attach-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.75);
  color: #f5f5f5;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.desk-support__compose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
}

.desk-support__field {
  margin: 0;
}

.desk-support__editor {
  position: relative;
  min-width: 0;
}

.desk-support__editor .desk-support__input {
  display: block;
  width: 100%;
  padding: 12px 44px 12px 14px;
  resize: none;
  min-height: 106px;
}

.desk-support__attach-ico {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  margin: 0;
  cursor: pointer;
  user-select: none;
  line-height: 0;
}

.desk-support__attach-ico-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #0a0b0c;
  background: #f5f5f5;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.desk-support__attach-ico:hover .desk-support__attach-ico-btn,
.desk-support__attach-ico:focus-within .desk-support__attach-ico-btn {
  color: #0a0b0c;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.desk-support__compose:has([data-desk-support-preview]:not([hidden])) .desk-support__attach-ico-btn {
  color: #0a0b0c;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Legacy text attach control (until compose HTML is redeployed) */
.desk-support__attach-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 14px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #f5f5f5;
  color: #0a0b0c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.desk-support__attach-btn:hover {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  color: #0a0b0c;
}

.desk-support__attach-btn input[type='file'] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
}

.desk-support__file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.desk-support__msg--user .desk-support__body {
  /* Bubble bg is a fixed light gray (#f2f3f5), but this was set to
     var(--text), which is white in dark/v2 theme -> invisible text.
     Match the bubble's own fixed dark color instead of the themed var. */
  color: #141414;
}

.desk-support__msg--agent .desk-support__body {
  color: #0a120e;
}

.desk-support__msg--agent .desk-support__body .desk-support__link {
  color: #064e2a;
}

.desk-support__msg--agent .desk-support__body .desk-support__link:hover {
  color: #04381e;
}

.desk-support__msg--agent .desk-support__edit-form {
  color: #0a120e;
}

.desk-support__compose {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 14px 16px;
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.desk-support__compose--bar {
  gap: 10px;
  padding: 12px 14px 14px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.14);
}

.desk-support__compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.desk-support__compose--bar .desk-support__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: none !important;
  outline: none;
  field-sizing: content;
}

.desk-support__compose--bar .desk-support__input::placeholder {
  color: #7d8796;
}

.desk-support__compose--bar .desk-support__input:focus {
  border-color: rgba(45, 190, 108, 0.45);
  box-shadow: 0 0 0 2px rgba(45, 190, 108, 0.12);
}

.desk-support__compose--bar .desk-support__attach-ico {
  position: static;
  flex: 0 0 auto;
}

.desk-support__compose--bar .desk-support__attach-ico-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: #c2cad6;
  background: var(--field);
}

.desk-support__compose--bar .desk-support__attach-ico:hover .desk-support__attach-ico-btn,
.desk-support__compose--bar .desk-support__attach-ico:focus-within .desk-support__attach-ico-btn {
  color: #fff;
  background: var(--field-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.desk-support__send {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--v2-line-strong, rgba(255, 255, 255, 0.22));
  border-radius: 12px;
  background: var(--v2-raised, rgba(255, 255, 255, 0.06));
  color: var(--v2-text, #fff);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.desk-support__send:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0a0b0c;
}

.desk-support__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.desk-support__compose .desk-field__input--area,
.desk-support__compose textarea {
  min-height: 110px;
  resize: none !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.desk-support__compose--bar textarea.desk-support__input {
  min-height: 44px;
}

.desk-support__compose .desk-field__input--area::-webkit-scrollbar,
.desk-support__compose textarea::-webkit-scrollbar {
  width: 8px;
}

.desk-support__compose .desk-field__input--area::-webkit-scrollbar-track,
.desk-support__compose textarea::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 8px;
}

.desk-support__compose .desk-field__input--area::-webkit-scrollbar-thumb,
.desk-support__compose textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-support__compose .desk-field__input--area::-webkit-scrollbar-thumb:hover,
.desk-support__compose textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
  background-clip: padding-box;
}

.desk-support__compose .desk-field__input--area::-webkit-scrollbar-button,
.desk-support__compose textarea::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-support__empty-stream {
  margin: 0;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}

/* ??? User ban ??? */
.desk-ban-cell {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}

.desk-ban-cell form {
  margin: 0;
  display: inline-flex;
}

.desk-ban-btn {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #f5f5f5;
  border-radius: 6px;
  background: #f5f5f5;
  color: #0a0b0c;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.desk-ban-btn:hover {
  color: #0a0b0c;
  border-color: #ffffff;
  background: #ffffff;
}

.desk-ban-btn--off {
  color: #0a0b0c;
  border-color: #f5f5f5;
  background: #f5f5f5;
}

.desk-ban-btn--off:hover {
  color: #0a0b0c;
  border-color: #ffffff;
  background: #ffffff;
}

.desk-pill--ban {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #f04444;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.desk-pill--soft {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.desk-row-link.is-banned td {
  opacity: 0.78;
}

.desk-ban__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.desk-ban__copy {
  min-width: 0;
  flex: 1 1 240px;
}

.desk-ban__status {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.desk-ban__status--on {
  color: #41cc59;
}

.desk-ban__status--off {
  color: #f04444;
}

.desk-ban__meta {
  margin: 0;
  max-width: 52ch;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.desk-ban__form {
  margin: 0;
  flex: 0 0 auto;
}

/* ?? Partner promo codes ?? */
.desk-promo-modal[hidden] {
  display: none !important;
}

.desk-promo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.desk-promo-modal__scrim {
  position: absolute;
  inset: 0;
  /* Same plane as desk page ? not a black pit that turns panels ?gray? */
  background: rgba(18, 22, 26, 0.62);
  backdrop-filter: blur(5px) saturate(1.04);
  -webkit-backdrop-filter: blur(5px) saturate(1.04);
}

.desk-promo-modal:not([hidden]) .desk-promo-modal__scrim {
  animation: deskModalScrimIn 0.22s ease both;
}

@keyframes deskModalScrimIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Dim interaction only ? do NOT blur chrome (blur made modals look like a different gray) */
body.desk.is-desk-modal-open .desk-nav,
body.desk.is-desk-modal-open .desk-work-top,
body.desk.is-desk-modal-open .desk-head {
  filter: none;
  pointer-events: none;
}

body.desk.is-desk-modal-open .desk-main > *:not(.desk-promo-modal),
body.desk.is-desk-modal-open .staff-desk__main > *:not(.desk-promo-modal) {
  filter: none;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .desk-promo-modal:not([hidden]) .desk-promo-modal__scrim {
    animation: none;
  }

  .desk-promo-modal__scrim {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 14, 18, 0.78);
  }

  body.desk.is-desk-modal-open .desk-nav,
  body.desk.is-desk-modal-open .desk-work-top,
  body.desk.is-desk-modal-open .desk-head,
  body.desk.is-desk-modal-open .desk-main > *:not(.desk-promo-modal),
  body.desk.is-desk-modal-open .staff-desk__main > *:not(.desk-promo-modal) {
    filter: none;
  }
}

.desk-promo-modal__panel {
  --desk-scroll-thumb: rgba(255, 255, 255, 0.34);
  --desk-scroll-thumb-hover: rgba(255, 255, 255, 0.48);
  --desk-scroll-track: rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  border: 1px solid var(--desk-card-border);
  border-radius: var(--desk-card-radius);
  background: var(--desk-card-bg);
  box-shadow: none;
  color: var(--text);
  scrollbar-width: thin;
  scrollbar-color: var(--desk-scroll-thumb) var(--desk-scroll-track);
  -ms-overflow-style: auto;
}

.desk-promo-modal__panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.desk-promo-modal__panel::-webkit-scrollbar-track {
  margin: 6px 2px;
  background: var(--desk-scroll-track);
  border-radius: 999px;
}

.desk-promo-modal__panel::-webkit-scrollbar-thumb {
  background: var(--desk-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-promo-modal__panel::-webkit-scrollbar-thumb:hover {
  background: var(--desk-scroll-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-promo-modal__panel::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-promo-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--v2-line, rgba(255, 255, 255, 0.06));
  background: transparent;
}

.desk-promo-modal__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.desk-promo-modal__x {
  appearance: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.desk-promo-modal__x:hover {
  color: #f5f7fa;
  background: rgba(255, 255, 255, 0.05);
}

/* Force all desk modals = settings-hub quiet cards (not charcoal #171c23) */
.desk-promo-modal__panel,
.desk-settings-modal .desk-promo-modal__panel,
.desk-settings-modal--wide .desk-promo-modal__panel,
.desk-ns-modal .desk-promo-modal__panel,
.desk-support-settings-modal .desk-promo-modal__panel,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--v2-card, #1c1c1c) 92%, #ffffff 8%), var(--v2-card, #1c1c1c) 46%) !important;
  border: 1px solid var(--v2-line, rgba(255, 255, 255, 0.06)) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

.desk-settings-modal .desk-promo-modal__head,
.desk-promo-modal__head,
.desk-settings-modal[data-desk-settings-modal='tools'] .desk-promo-modal__head {
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

/* Kill leftover solid --panel / gray shells inside modals */
.desk-promo-modal .desk-wd,
.desk-promo-modal .desk-wd--card,
.desk-settings-modal .desk-wd,
.desk-settings-modal .desk-wd--card,
.desk-settings-modal .desk-pwd,
.desk-settings-modal .desk-settings-modal__form,
.desk-settings-modal .desk-settings-modal__body,
.desk-promo-modal .desk-promo-modal__body,
.desk-ns-modal .desk-ns-modal__body,
.desk-support-settings-modal .desk-support-settings-modal__body {
  background: transparent !important;
  box-shadow: none !important;
}

.desk-promo-modal .desk-wd--card,
.desk-settings-modal .desk-wd--card {
  border: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* Shared modal field chrome ? same quiet card language */
.desk-promo-modal .desk-field__input,
.desk-promo-modal .desk-field__textarea,
.desk-promo-modal select.desk-field__input,
.desk-promo-modal textarea.desk-field__input {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.desk-promo-modal .desk-field__input:hover,
.desk-promo-modal .desk-field__textarea:hover,
.desk-promo-modal select.desk-field__input:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.desk-promo-modal .desk-field__label,
.desk-promo-modal .desk-promo-form__lab {
  color: #dce4ee;
}

.desk-promo-modal .desk-wd__modes,
.desk-promo-modal .desk-promo-type {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

/* Domain NS handoff after add */
.desk-ns-modal .desk-promo-modal__panel {
  width: min(520px, 100%);
}

.desk-ns-modal .desk-promo-modal__head h2 {
  font-size: 18px;
}

.desk-ns-modal__body {
  padding: 22px 22px 24px;
  display: grid;
  gap: 16px;
}

.desk-ns-modal__host {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.02em;
}

.desk-ns-modal__host-label {
  color: var(--muted);
}

.desk-ns-modal__host .staff-mono {
  font-size: 15px;
  color: var(--text);
}

.desk-ns-modal__rows {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
}

.desk-ns-modal__row {
  display: grid;
  gap: 6px;
}

.desk-ns-modal__label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-ns-modal__row .desk-copy {
  justify-self: start;
  font-size: 15px;
  color: var(--text);
}

.desk-ns-modal__guide-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-ns-modal__guide {
  margin: 0;
  padding: 0 0 0 1.2em;
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.desk-ns-modal__guide li::marker {
  color: var(--muted);
}

.desk-ns-modal__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.desk-ns-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

/* ?? Domain settings hub: compact equal rectangles ?? */
.desk-settings-hub__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.desk-settings-hub__bar .desk-section__label {
  margin: 0;
}

.desk-settings-hub__copy {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

.desk-settings-copy .desk-field {
  position: relative;
  z-index: 2;
}

.desk-settings-copy .desk-dd--field.is-open {
  z-index: 140;
}

.desk-settings-copy .desk-dd__btn--field {
  min-height: 34px;
  height: 34px;
  font-size: 13px;
}

.desk-settings-copy__sections {
  margin: 4px 0 2px;
}

.desk-settings-copy__sections-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.desk-settings-copy__sections-head .desk-field__label {
  margin: 0;
}

.desk-settings-copy__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0 0 4px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.desk-settings-copy__item {
  min-width: 0;
}

.desk-settings-copy__item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-settings-copy__hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--bad, #d97a82);
}

.desk-settings-copy__hint[hidden] {
  display: none !important;
}

.desk-settings-copy--empty .desk-wd__actions {
  margin-top: 4px;
}

@media (max-width: 520px) {
  .desk-settings-copy__grid {
    grid-template-columns: 1fr;
  }
}

.desk-settings-hub {
  --desk-settings-card-h: 100px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  align-items: stretch;
}

/* Partner account settings ? exchange-style sidebar + panel */
.desk-acct-settings {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 920px;
}

.desk-acct-settings__lede {
  margin: -6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #8b949e);
}

.desk-acct-settings__layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.desk-acct-settings__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 12px;
}

.desk-acct-settings__nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted, #8b949e);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.desk-acct-settings__nav-btn:hover {
  color: var(--text, #e8edf4);
  background: rgba(255, 255, 255, 0.04);
}

.desk-acct-settings__nav-btn.is-active {
  color: var(--text, #e8edf4);
  background: rgba(255, 255, 255, 0.08);
}

.desk-acct-settings__nav-btn:focus-visible {
  outline: 2px solid var(--v2-accent, #D4544C);
  outline-offset: 2px;
}

.desk-acct-settings__main {
  min-width: 0;
}

.desk-acct-settings__panel[hidden] {
  display: none !important;
}

.desk-acct-settings__panel-head {
  margin: 0 0 18px;
}

.desk-acct-settings__panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text, #e8edf4);
  line-height: 1.25;
}

.desk-acct-settings__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #8b949e);
}

.desk-acct-settings__panel-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
}

.desk-acct-settings__panel-body .desk-settings-modal__form,
.desk-acct-settings__panel-body .desk-wd,
.desk-acct-settings__panel-body .desk-pwd,
.desk-acct-settings__panel-body .desk-wallets {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.desk-acct-settings__panel-body .desk-wd__lede {
  margin-top: 0;
}

.desk-acct-settings--domain {
  max-width: 1100px;
  margin-top: 8px;
}

.desk-domain-meta {
  --dm-accent: var(--v2-accent, #9aa0a8);
  box-sizing: border-box;
  position: relative;
  max-width: 840px;
  margin: 0 0 22px;
  padding: 0;
  border: 1px solid var(--v2-line, rgba(255, 255, 255, 0.06));
  border-radius: 18px;
  background:
    radial-gradient(120% 100% at 100% -10%, color-mix(in srgb, var(--dm-accent) 6%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--v2-card, #1c1c1c) 94%, #ffffff 6%), var(--v2-card, #1c1c1c) 46%);
  box-shadow: var(--v2-shadow, 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.4));
  overflow: hidden;
  isolation: isolate;
}

/* status-driven accent — waiting NS reads amber, linked reads green, a DNS
   error reads red, so the card itself signals state at a glance */
.desk-domain-meta--ok   { --dm-accent: #5ee9a0; }
.desk-domain-meta--wait { --dm-accent: #ecc75a; }
.desk-domain-meta--bad  { --dm-accent: #fb9ba0; }

.desk-domain-meta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--dm-accent) 18%, var(--dm-accent) 55%, transparent);
  opacity: 0.4;
  z-index: 2;
}

.desk-domain-meta > summary {
  list-style: none;
}

.desk-domain-meta > summary::-webkit-details-marker {
  display: none;
}

.desk-domain-meta__summary {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.desk-domain-meta__host {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text, #f3f5f7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-domain-meta__badge {
  flex: 0 0 auto;
  display: inline-flex;
  max-width: 42%;
}

.desk-domain-meta__badge .desk-status {
  max-width: 100%;
}

.desk-domain-meta__badge .desk-status__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-domain-meta__chevron {
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--muted, #a8b2bf);
  transition: transform 0.16s ease;
}

.desk-domain-meta[open] > .desk-domain-meta__summary .desk-domain-meta__chevron {
  transform: rotate(180deg);
}

.desk-domain-meta__body {
  box-sizing: border-box;
  min-width: 0;
  padding: 18px 20px 18px;
}

.desk-domain-meta__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid transparent;
  background-image: linear-gradient(90deg, transparent, var(--line, rgba(255, 255, 255, 0.12)) 12%, var(--line, rgba(255, 255, 255, 0.12)) 88%, transparent);
  background-position: bottom;
  background-repeat: no-repeat;
  background-size: 100% 1px;
}

.desk-domain-meta__identity {
  min-width: 0;
  flex: 1 1 auto;
}

.desk-domain-meta__eyebrow {
  display: block;
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #a8b2bf);
}

.desk-domain-meta__title {
  margin: 0;
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text, #f3f5f7);
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
}

a.desk-domain-meta__title:hover {
  color: var(--v2-text-secondary, #d4d4d4);
}

.desk-domain-meta__head-status {
  flex: 0 0 auto;
  padding-top: 2px;
}

.desk-domain-meta__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.desk-domain-meta__tile {
  box-sizing: border-box;
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  border: 1px solid var(--v2-line, rgba(255, 255, 255, 0.06));
  border-radius: 14px;
  background-color: var(--v2-well, #242424);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 15px 15px;
  transition: border-color 0.15s ease;
}

.desk-domain-meta__tile:hover {
  border-color: var(--v2-line-strong, rgba(255, 255, 255, 0.14));
}

.desk-domain-meta__k {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-muted, #a0a0a0);
}

.desk-domain-meta__v {
  min-width: 0;
}

.desk-domain-meta__v .desk-copy,
.desk-domain-meta__v .desk-muted {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.desk-domain-meta__v .desk-copy {
  max-width: 100%;
  padding: 2px 0;
  color: var(--text, #f3f5f7);
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.desk-domain-meta__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06));
}

.desk-domain-meta__foot .desk-field__btn {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* Avoid double ??????????? ? status tile already has the quiet refresh link */
.desk-domain-meta__foot[data-desk-dns-refresh-bar] {
  display: none;
}

@media (max-width: 640px) {
  .desk-domain-meta {
    margin-bottom: 14px;
    max-width: none;
  }

  .desk-domain-meta__summary {
    display: flex;
  }

  .desk-domain-meta__summary:active {
    background: rgba(255, 255, 255, 0.03);
  }

  /* Hostname already in summary ? hide duplicate title (new head + legacy h2) */
  .desk-domain-meta__head,
  .desk-domain-meta__title,
  .desk-domain-meta__body > .desk-section__label {
    display: none !important;
  }

  .desk-domain-meta__body {
    display: none;
    padding: 12px 14px 14px;
  }

  .desk-domain-meta[open] > .desk-domain-meta__body {
    display: block;
  }

  .desk-domain-meta[open] > .desk-domain-meta__summary {
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  }

  .desk-domain-meta__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .desk-domain-meta__tile {
    padding: 11px 12px;
  }

  .desk-domain-meta__body > .desk-dl {
    margin: 0;
    gap: 12px;
  }
}

@media (min-width: 641px) {
  .desk-domain-meta > .desk-domain-meta__summary {
    display: none !important;
  }

  .desk-domain-meta > .desk-domain-meta__body {
    display: block !important;
  }
}

.desk-acct-settings--user {
  max-width: 1100px;
}

.desk-acct-settings--domain .desk-acct-settings__panel-body,
.desk-acct-settings--user .desk-acct-settings__panel-body {
  max-width: 560px;
}

.desk-acct-settings--domain .desk-acct-settings__panel-body--wide,
.desk-acct-settings--user .desk-acct-settings__panel-body--wide {
  max-width: 840px;
}

.desk-wd-macros__lede {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
}

/* ??? Domain withdraw rules + geo-tiers ??? */
.desk-wd-rules {
  display: grid;
  gap: 14px;
}

.desk-wd-rules__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desk-wd-rules__tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: #c8d2de;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.desk-wd-rules__tab.is-active {
  border-color: rgba(60, 155, 244, 0.45);
  background: rgba(60, 155, 244, 0.14);
  color: #fff;
}

.desk-wd-rules__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.desk-wd-rules__head-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-wd-rules__table td,
.desk-wd-rules__table th {
  vertical-align: top;
}

.desk-wd-rules__name {
  font-weight: 700;
  color: var(--text);
}

.desk-wd-rules__sub {
  font-size: 12px;
  margin-top: 2px;
}

.desk-wd-rules__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  color: #f0a29c;
}

.desk-wd-rules__badge--dep {
  background: rgba(212, 160, 60, 0.18);
  color: #e8c37a;
}

.desk-wd-rules__badge--vip {
  background: rgba(60, 155, 244, 0.18);
  color: #7ec0f8;
}

.desk-user-vip {
  display: grid;
  gap: 8px;
}

.desk-user-vip--panel {
  gap: 18px;
  max-width: 440px;
}

/* Soft/ban pills keep margin-left for inline chips; alone under dt they must flush left. */
.desk-user-vip .desk-user-dl .desk-pill {
  margin-left: 0;
}

.desk-user-vip__hint {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
}

.desk-user-vip__form .desk-dd--field {
  width: 100%;
}

.desk-user-vip__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .desk-user-vip__grid {
    grid-template-columns: 1fr;
  }
}

.desk-user-vip__form,
.desk-user-vip__thresholds {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-user-vip__form .desk-field,
.desk-user-vip__thresholds .desk-field {
  margin: 0;
}

.desk-user-vip__select {
  min-width: 200px;
  flex: 1 1 180px;
  margin: 0;
}

.desk-wd-rules__geo-line {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #c8d2de;
}

.desk-wd-rules__geo-line span {
  color: #8b97a8;
  min-width: 22px;
}

.desk-wd-rules__fb {
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.desk-wd-rules__acts {
  white-space: nowrap;
  vertical-align: middle;
}

.desk-wd-rules__acts-inner {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
}

.desk-wd-rules__acts-inner .desk-mini-btn {
  flex: 0 0 auto;
  width: auto;
}

.desk-wd-rules__save {
  margin-top: 12px;
}

.desk-wd-rules__mode {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-wd-rules__mode button,
button.desk-wd-rules__mode {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c8d2de;
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.desk-wd-rules__mode button:hover,
button.desk-wd-rules__mode:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Neutral graphite/white selected state — matches .desk-wd__mode.is-on and
   .desk-promo-type__opt (the rest of the app moved off colored accents;
   the old #3c9bf4 blue was a leftover and clashed with everything else). */
.desk-wd-rules__mode button.is-on,
button.desk-wd-rules__mode.is-on {
  background: #f5f5f5;
  color: #0a0b0c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.desk-wd-rules__mode button.is-on:hover,
button.desk-wd-rules__mode.is-on:hover {
  color: #0a0b0c;
  background: #ffffff;
}

.desk-wd-rules__mode--wrap {
  flex-wrap: wrap;
  width: auto;
  max-width: 100%;
}

.desk-wd-rule-modal__cta .desk-wd-rules__mode {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
}

/* Each option is its own chip (border + bg) so a wrapping 2-line label
   doesn't read as a layout bug next to two 1-line labels floating in an
   otherwise-empty shared track. */
.desk-wd-rule-modal__cta .desk-wd-rules__mode button {
  flex: none;
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.25;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: #c8d2de;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.desk-wd-rule-modal__cta .desk-wd-rules__mode button:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.desk-wd-rule-modal__cta .desk-wd-rules__mode button.is-on {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0a0b0c;
}

.desk-wd-rule-modal__insurance {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(60, 155, 244, 0.22);
  background: rgba(60, 155, 244, 0.06);
}

.desk-wd-rule-modal__err {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.desk-wd-rule-modal__err[hidden] {
  display: none !important;
}

.desk-wd-rule-tier__hint {
  margin: 0 0 8px;
  color: #8b9aab;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}

.desk-wd-rule-modal__insurance[hidden] {
  display: none;
}

.desk-geo-tiers {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.desk-geo-tier {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
}

.desk-geo-tier.is-active {
  border-color: rgba(60, 155, 244, 0.5);
  box-shadow: 0 0 0 1px rgba(60, 155, 244, 0.18);
}

.desk-geo-tier__pick {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.desk-geo-tier__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 155, 244, 0.18);
  color: #3c9bf4;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.desk-geo-tier__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.desk-geo-tier__meta strong {
  color: var(--text);
  font-size: 14px;
}

.desk-geo-tier__meta em {
  font-style: normal;
  font-size: 12px;
  color: #8b97a8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-geo-tier__tools {
  display: inline-flex;
  gap: 4px;
}

.desk-geo-detail {
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 10px;
}

.desk-geo-detail__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: space-between;
}

.desk-geo-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desk-geo-detail__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #c8d2de;
}

.desk-geo-pick__panel {
  max-width: 720px;
  width: min(720px, 96vw);
}

.desk-geo-pick__body {
  padding: 0 16px 16px;
  display: grid;
  gap: 10px;
}

.desk-geo-pick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  max-height: min(48vh, 360px);
  overflow: auto;
  padding: 4px;
}

.desk-geo-pick__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  cursor: pointer;
}

.desk-geo-pick__item:has(input:checked) {
  border-color: rgba(60, 155, 244, 0.45);
  background: rgba(60, 155, 244, 0.12);
}

.desk-geo-pick__item.is-taken:not(:has(input:checked)) {
  opacity: 0.35;
  pointer-events: none;
}

.desk-wd-rule-modal__panel {
  max-width: 440px;
  width: min(440px, 94vw);
  max-height: min(86vh, 640px);
  overflow: auto;
}

.desk-wd-rule-modal__body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
}

.desk-wd-rule-modal__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.desk-wd-rule-modal__metric .desk-wd-rules__mode {
  width: 100%;
}

.desk-wd-rule-modal__tiers {
  display: grid;
  gap: 8px;
}

.desk-wd-rule-tier {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 6px;
}

.desk-wd-rule-tier__title {
  font-weight: 650;
  color: var(--text);
  font-size: 12px;
}

.desk-wd-rule-tier__title em {
  font-style: normal;
  font-weight: 500;
  color: #8b97a8;
  margin-left: 6px;
  font-size: 11px;
}

.desk-wd-rule-tier__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.desk-wd-rule-tier__row--range {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.desk-wd-rule-tier__row--range .desk-field {
  min-width: 0;
}

.desk-wd-rule-tier__row--range .desk-field__label {
  text-align: center;
  width: 100%;
}

.desk-wd-rule-modal__mode.desk-wd-rules__mode {
  width: 100%;
}

.desk-wd-rule-modal__mode.desk-wd-rules__mode button {
  flex: 1;
}

.desk-wd-rule-modal__msg {
  min-height: 72px;
}

.desk-wd-rule-modal__name .desk-field__hint {
  font-size: 11.5px;
}

.desk-wd-rule-modal__actions {
  margin-top: 2px;
}

.desk-wd-rule-modal__panel .desk-field__input {
  height: 40px;
}

.desk-wd-rule-modal__panel textarea.desk-field__input {
  height: auto;
}

@media (max-width: 700px) {
  .desk-wd-rule-modal__grid,
  .desk-wd-rule-tier__row {
    grid-template-columns: 1fr;
  }

  .desk-wd-rule-modal__cta .desk-wd-rules__mode {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px;
  }

  .desk-wd-rule-modal__cta .desk-wd-rules__mode button {
    width: 100%;
    flex: none;
    justify-content: center;
    text-align: center;
    white-space: normal;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.25;
  }
}

.desk-wd-macros__presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 12px;
}

.desk-wd-macros__presets-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b97a8;
}

.desk-wd-macros__list {
  display: grid;
  gap: 8px;
}

.desk-wd-macro {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.18);
}

.desk-wd-macro.is-off {
  opacity: 0.55;
}

.desk-wd-macro.is-hit {
  border-color: rgba(60, 155, 244, 0.55);
  box-shadow: 0 0 0 1px rgba(60, 155, 244, 0.2);
}

.desk-wd-macro__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.desk-wd-macro__idx {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8d2de;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.desk-wd-macro__on {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #c8d2de;
  cursor: pointer;
  user-select: none;
}

.desk-wd-macro__on input {
  margin: 0;
}

.desk-wd-macro__tools {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.desk-wd-macro__when {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.desk-wd-macro__cell--kyc {
  grid-column: span 2;
}

.desk-wd-macro__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desk-wd-macro__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 600;
  color: #c8d2de;
  cursor: pointer;
  user-select: none;
}

.desk-wd-macro__chip:has(input:checked) {
  border-color: rgba(60, 155, 244, 0.45);
  color: #fff;
  background: rgba(60, 155, 244, 0.12);
}

.desk-wd-macro__chip input {
  margin: 0;
}

.desk-wd-macro__then {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: end;
}

.desk-wd-macro__msg {
  min-width: 0;
}

.desk-wd-macros__empty {
  margin: 4px 0 0;
}

.desk-wd-macros__test {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 10px;
}

.desk-wd-macros__test-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.desk-wd-macros__test-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.desk-wd-macros__test-out {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #c8d2de;
}

.desk-wd-macros__test-out.is-hit {
  color: #3c9bf4;
}

.desk-wd-macros__test-out.is-miss {
  color: #8b97a8;
}

@media (max-width: 900px) {
  .desk-wd-macro__when {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-wd-macro__cell--kyc {
    grid-column: span 2;
  }

  .desk-wd-macros__test-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .desk-wd-macro__when,
  .desk-wd-macros__test-row {
    grid-template-columns: 1fr;
  }

  .desk-wd-macro__cell--kyc {
    grid-column: auto;
  }

  .desk-wd-macro__then {
    grid-template-columns: 1fr;
  }
}

.desk-user-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.desk-user-dl {
  margin: 0;
}

.desk-user-dl__balance {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.desk-acct-settings--user .desk-dl > div {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-acct-settings--user .desk-dl > div:last-child {
  border-bottom: 0;
}

/* Account info card was capped at the shared 560px form width, leaving a
   big empty gutter down the right side of the (much wider) card. It's a
   plain label/value grid, not a form, so let it use more of the card and
   add a 3rd column instead of stretching 2 columns thin. Desktop only —
   the 700px breakpoint below already collapses .desk-dl to 1 column. */
@media (min-width: 701px) {
  #desk-acct-panel-account .desk-acct-settings__panel-body {
    max-width: 820px;
  }
  .desk-user-dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.desk-auto-kyc__delay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
  gap: 10px;
  align-items: end;
}

@media (max-width: 560px) {
  .desk-auto-kyc__delay {
    grid-template-columns: 1fr;
  }
}

.desk-acct-settings__jump {
  display: none;
  margin: 0;
  min-width: 0;
}

.desk-acct-settings__jump .desk-dd--field {
  width: 100%;
}

.desk-acct-settings__jump .desk-dd__btn--field {
  --desk-dd-chevron-right: 14px;
  min-height: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.desk-acct-settings__jump .desk-dd__menu {
  max-height: min(60vh, 360px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #151a20;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.desk-acct-settings__jump .desk-dd__opt {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
}

.desk-acct-settings__jump-select {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.desk-acct-settings__panel {
  scroll-margin-top: calc(var(--desk-topbar-h, 56px) + env(safe-area-inset-top, 0px) + 12px);
  padding: 22px 24px;
  border: 1px solid var(--v2-line, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  background-color: var(--v2-card, #1c1c1c);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: 10px 10px;
  box-shadow: none;
}
html[data-desk-theme="light"] .desk-acct-settings__panel {
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

@media (max-width: 820px) {
  .desk-acct-settings {
    max-width: none;
    gap: 14px;
  }

  .desk-acct-settings--domain,
  .desk-acct-settings--user {
    max-width: none;
    margin-top: 4px;
  }

  .desk-acct-settings__layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .desk-acct-settings__nav {
    position: sticky;
    top: calc(var(--desk-topbar-h, 56px) + env(safe-area-inset-top, 0px));
    z-index: 6;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 -4px;
    padding: 8px 4px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg);
    scroll-snap-type: x proximity;
  }

  .desk-acct-settings__nav::-webkit-scrollbar {
    display: none;
  }

  .desk-acct-settings__nav-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    scroll-snap-align: start;
  }

  .desk-acct-settings__nav-btn.is-active {
    border-color: color-mix(in srgb, var(--v2-accent, #D4544C) 45%, transparent);
    background: color-mix(in srgb, var(--v2-accent, #D4544C) 16%, transparent);
    color: var(--text);
  }

  .desk-acct-settings__panel-head {
    margin: 0 0 12px;
  }

  .desk-acct-settings__panel-title {
    font-size: 16px;
  }

  .desk-acct-settings__panel-body,
  .desk-acct-settings--domain .desk-acct-settings__panel-body,
  .desk-acct-settings--user .desk-acct-settings__panel-body,
  .desk-acct-settings--domain .desk-acct-settings__panel-body--wide,
  .desk-acct-settings--user .desk-acct-settings__panel-body--wide {
    max-width: none;
    gap: 12px;
  }

  .desk-acct-settings__panel-body .desk-wd__actions,
  .desk-acct-settings__panel-body .desk-wallets__actions {
    width: auto;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  .desk-acct-settings__panel-body .desk-wd__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wallets__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wd__actions a.desk-field__btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    justify-content: center;
  }

  .desk-acct-settings .desk-field__input,
  .desk-acct-settings .desk-field__input--area,
  .desk-acct-settings textarea.desk-field__input {
    min-height: 44px;
    font-size: 16px; /* avoid iOS zoom */
  }

  .desk-acct-settings textarea.desk-field__input,
  .desk-acct-settings .desk-field__input--area {
    min-height: 96px;
  }

  .desk-acct-settings .desk-table-scroll {
    margin: 0 -4px;
    padding: 0 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .desk-acct-settings .staff-table {
    min-width: 520px;
  }

  .desk-acct-settings .desk-wd-eswitch,
  .desk-acct-settings .desk-wd-eswitch__btn {
    max-width: 100%;
  }

  .desk-acct-settings .desk-smtp-form__secure .desk-wd-eswitch__label {
    min-width: 5.5em;
  }
}

/* Phone: section picker instead of a long chip strip */
@media (max-width: 640px) {
  .desk-acct-settings__jump {
    display: grid;
    gap: 6px;
    /* Was position: sticky, pinned just under the topbar. That only works
       if its "top" offset exactly matches the real topbar height at all
       times (it kept drifting out of sync — v1/v2 height mismatch, then a
       scrollIntoView landing short) and each mismatch let this bar cover
       part of the panel below it. Scrolling away with the page like a
       normal block removes the failure mode entirely — nothing to get out
       of sync with, nothing for it to sit on top of. */
    position: static;
    margin: 0 -2px;
    padding: 8px 2px 12px;
    background: var(--bg);
    border-bottom: none;
  }

  .desk-acct-settings__jump-select {
    min-height: 48px;
    border-radius: 12px;
    padding-inline: 14px;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.01em;
  }

  .desk-acct-settings__jump .desk-dd__btn--field {
    --desk-dd-chevron-right: 16px;
    min-height: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 650;
    padding-right: 40px;
  }

  .desk-acct-settings__jump .desk-dd.is-open {
    z-index: 30;
  }

  .desk-acct-settings__jump + .desk-acct-settings__panel,
  .desk-acct-settings__panel {
    margin-top: 16px;
  }

  /* SSR jump is always present ? hide chip strip + panel titles on phone */
  .desk-acct-settings:has([data-desk-acct-jump]) .desk-acct-settings__nav {
    display: none;
  }

  .desk-acct-settings:has([data-desk-acct-jump]) .desk-acct-settings__panel-head {
    display: none;
  }

  /* The picker (.desk-acct-settings__jump) is sticky just below the topbar
     and has real height of its own (~48px button + padding ? about 68px on
     phone). scroll-margin-top only reserved space for the topbar, so
     scrollIntoView (fired when you pick a section from the dropdown)
     landed the panel a few px short — just enough to clip its 18px rounded
     top corners under the picker's button. Reserve the picker's height too,
     with room to spare. */
  .desk-acct-settings:has([data-desk-acct-jump]) .desk-acct-settings__panel {
    scroll-margin-top: calc(var(--desk-topbar-h, 56px) + env(safe-area-inset-top, 0px) + 100px);
  }

  .desk-user-top {
    gap: 8px;
    margin-bottom: 4px;
  }

  .desk-acct-settings--user .desk-dl {
    gap: 0;
  }

  .desk-acct-settings--user .desk-dl > div {
    padding: 12px 0;
    display: grid;
    gap: 6px;
  }

  .desk-acct-settings--user .desk-dl dt {
    font-size: 11px;
  }

  .desk-acct-settings--user .desk-dl dd {
    font-size: 14px;
  }

  .desk-acct-settings--user .desk-email-status {
    flex-wrap: wrap;
    gap: 8px;
  }

  .desk-logo-brand__control {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .desk-logo-brand__field {
    flex: 1 1 100%;
  }

  .desk-logo-brand__save,
  .desk-acct-settings__panel-body .desk-wd__actions {
    margin-bottom: 0;
  }

  .desk-acct-settings__panel-body .desk-wd__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wallets__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wd__actions a.desk-field__btn {
    flex: 0 0 auto;
    width: auto;
  }

  .desk-section:has(+ .desk-acct-settings),
  .desk-main > .desk-section:first-of-type {
    margin-bottom: 12px;
  }

  .desk-main > .desk-section .desk-dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .desk-main > .desk-section .desk-dl > div {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .desk-main > .desk-section .desk-dl > div:last-child {
    border-bottom: 0;
  }

  .desk-main > .staff-lede {
    margin-bottom: 10px;
  }

  .desk-wallets__stack {
    gap: 10px;
  }

  .desk-wallet {
    min-height: 48px;
  }

  .desk-settings-copy__grid {
    grid-template-columns: 1fr;
  }

  .desk-auto-kyc__delay {
    grid-template-columns: 1fr;
  }

  .desk-acct-settings .desk-wd-eswitch__btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    padding: 8px 12px;
  }

  .desk-acct-settings .staff-table-wrap,
  .desk-acct-settings .desk-table-scroll {
    border-radius: 12px;
  }

  .desk-acct-settings .desk-seo-serp__card {
    padding: 12px;
  }
}

@media (max-width: 1100px) {
  .desk-settings-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .desk-settings-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .desk-settings-hub {
    grid-template-columns: 1fr;
  }
}

.desk-settings-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  height: var(--desk-settings-card-h);
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--desk-card-border);
  border-radius: var(--desk-card-radius);
  background: var(--desk-card-bg);
  color: inherit;
  text-align: center;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}

button.desk-settings-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), #151a20;
}

button.desk-settings-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.desk-settings-card--inline {
  cursor: default;
  gap: 8px;
}

.desk-settings-card--inline:hover {
  border-color: var(--desk-card-border);
  background: var(--desk-card-bg);
}

.desk-settings-card__main,
.desk-settings-card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
}

.desk-settings-card__title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
  text-align: center;
}

.desk-settings-card__brands {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1px;
}

.desk-settings-card__brand {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.desk-settings-card__brand img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

.desk-settings-card__status {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.desk-settings-card__status .desk-status {
  font-size: 10px;
}

.desk-settings-card__status .desk-status__label {
  font-size: 10px;
}

.desk-settings-card__action {
  display: none;
}

.desk-settings-card__inline {
  width: 100%;
  min-width: 0;
}

.desk-settings-card__form {
  display: block;
  margin: 0;
  width: 100%;
}

.desk-settings-card__compact {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  align-items: end;
  justify-items: stretch;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.desk-settings-card__compact--captcha {
  grid-template-columns: 1fr auto;
  align-items: center;
  max-width: 220px;
}

.desk-settings-card__field {
  margin: 0;
  min-width: 0;
}

.desk-settings-card__field .desk-field__label {
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--muted);
}

.desk-settings-card__field .desk-field__input {
  min-height: 30px;
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
}

.desk-settings-card__save {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
}

.desk-settings-card__modes {
  width: 100%;
  min-width: 0;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
}

.desk-settings-card__modes .desk-wd__mode {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 7px;
}

.desk-settings-card__row {
  display: none;
}

/* Compact settings dialogs ? same card surface as desk */
.desk-settings-modal .desk-promo-modal__panel {
  width: min(440px, 100%);
  max-height: min(92dvh, 860px);
  overflow: auto;
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: var(--desk-card-radius);
  box-shadow: none;
  -webkit-overflow-scrolling: touch;
}

.desk-settings-modal--wide .desk-promo-modal__panel {
  width: min(780px, 100%);
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-promo-modal__panel {
  width: min(560px, calc(100vw - 24px));
  max-height: min(86dvh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-promo-modal__panel.is-dd-fill {
  overflow: hidden;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-settings-modal__body {
  padding: 8px 10px 10px;
  gap: 6px;
  overflow: visible;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-promo-modal__head {
  padding: 8px 10px;
  position: relative;
  z-index: 6001;
  background: transparent;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-promo-modal__head h2 {
  font-size: 13px;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-lk-tools--modal,
.desk-settings-modal[data-desk-settings-modal='tools'] .desk-lk-card--trade,
.desk-settings-modal[data-desk-settings-modal='tools'] .desk-lk-trade-head {
  overflow: visible;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-lk-trade-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 8px;
}

.desk-settings-modal[data-desk-settings-modal='tools'] .desk-lk-trade-head .desk-dd--field.is-open {
  z-index: 50;
}

/* Full-bleed market list: pinned to modal panel edges under the title. */
.desk-dd__menu--tools-fill {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 0 0 10px 10px !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-top: 1px solid var(--line-strong) !important;
  box-shadow: none !important;
  max-width: none !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  z-index: 6000 !important;
  background: #151a20 !important;
}

.desk-dd__menu--tools-fill .desk-dd__opt {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  font-size: 12.5px;
  gap: 0;
}

.desk-dd__menu--tools-fill .desk-dd__opt + .desk-dd__opt {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-dd__menu--tools-fill .desk-dd__opt > span {
  flex: 1 1 auto;
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-settings-modal[data-desk-settings-modal='deposits'] .desk-promo-modal__panel,
.desk-settings-modal[data-desk-settings-modal='withdrawals'] .desk-promo-modal__panel,
.desk-settings-modal[data-desk-settings-modal='bets'] .desk-promo-modal__panel {
  width: min(900px, 100%);
  max-height: min(88dvh, 900px);
}

.desk-settings-modal .desk-table-scroll {
  margin: 0;
  max-height: min(60dvh, 560px);
  overflow: auto;
}

.desk-user-account {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.desk-user-account__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
}

.desk-user-account__cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.desk-user-account__k {
  margin: 0;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.desk-user-account__v {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.desk-user-account__v--balance {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.desk-user-account__cell--access .desk-user-account__v {
  display: grid;
  gap: 6px;
}

.desk-user-account__hint {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
}

.desk-user-account .desk-email-status {
  gap: 8px;
}

@media (max-width: 1100px) {
  .desk-user-account__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .desk-user-account__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 10px 0 14px;
  }
}

@media (max-width: 480px) {
  .desk-user-account__grid {
    grid-template-columns: 1fr;
  }
}

.desk-settings-modal .desk-ban--modal {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.desk-settings-modal .desk-lk-tools--modal {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-tools__grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-card {
  padding: 8px 10px;
  gap: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.07);
}

.desk-settings-modal .desk-lk-tools--modal .desk-field {
  gap: 3px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-field__label {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.desk-settings-modal .desk-lk-tools--modal .desk-field__input:not(.desk-field__input--markets) {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 7px;
}

.desk-settings-modal .desk-lk-tools--modal select.desk-field__input:not(.desk-field__input--markets) {
  padding-right: 26px;
  background-position: right 8px center;
}

.desk-settings-modal .desk-lk-tools--modal .desk-field__btn {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-card__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #8b949e);
}

.desk-lk-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.desk-lk-card--bar {
  padding: 5px 8px !important;
}

.desk-lk-card--balance {
  padding: 8px 10px !important;
}

.desk-lk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
}

.desk-lk-bar--balance {
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 10px;
  min-height: 32px;
}

.desk-lk-bar__money {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.desk-lk-bar--gen {
  align-items: center;
}

.desk-lk-bar__bal {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text, #f5f5f5);
  line-height: 1;
  white-space: nowrap;
}

.desk-lk-bar__amount-input {
  width: 72px !important;
  flex: 0 0 72px;
}

.desk-lk-bar__id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
}

.desk-lk-bar__id--inline {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.desk-lk-bar__id .desk-lk-card__hint {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
}

.desk-lk-bar__id .desk-lk-card__meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text, #f5f5f5);
}

.desk-lk-bar__amount {
  width: 72px;
  flex: 0 0 72px;
}

.desk-lk-bar__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.desk-lk-bar__check {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--muted, #8b949e);
}

.desk-lk-bar .desk-lk-card__actions,
.desk-lk-bar__actions {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-bar .desk-field__btn {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.desk-lk-card--compact {
  height: 100%;
}

.desk-lk-card__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desk-lk-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.desk-lk-card__foot .desk-lk-card__actions {
  margin: 0;
}

.desk-lk-card--trade {
  gap: 6px;
}

.desk-lk-trade-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 8px;
}

.desk-lk-trade-head__market {
  min-width: 0;
}

.desk-lk-trade-head__refresh {
  align-self: end;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-trade-head .desk-dd__btn--field {
  --desk-dd-chevron-right: 10px;
  height: 28px;
  min-height: 28px;
  padding: 0 28px 0 8px;
  font-size: 12px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-card--trade > .desk-trade {
  margin-top: 2px;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-trade__tabs {
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-trade__action {
  height: 26px;
  font-size: 11px;
  border-radius: 6px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-trade__avail {
  font-size: 11px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-trade__market-name {
  font-size: 12px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-trade__sides {
  min-height: 30px;
  padding: 2px;
}

.desk-settings-modal .desk-lk-tools--modal .desk-trade__side {
  min-height: 28px;
  font-size: 10px;
  padding: 0 10px;
}

.desk-trade__row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  gap: 8px 10px;
  align-items: end;
}

.desk-trade__dollars {
  min-width: 0;
}

.desk-lk-trade-actions {
  display: flex !important;
  margin-top: 4px;
  visibility: visible !important;
  opacity: 1 !important;
}

.desk-lk-trade-actions .desk-field__btn,
.desk-lk-trade-actions [data-trade-submit] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  visibility: visible !important;
}

.desk-lk-trade-actions [data-trade-submit]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.desk-settings-modal .desk-lk-tools--modal .desk-lk-trade-actions {
  display: flex !important;
  margin-top: 6px;
}

@media (max-width: 700px) {
  .desk-lk-pair {
    grid-template-columns: 1fr;
  }

  .desk-lk-card--balance {
    padding: 12px !important;
  }

  .desk-lk-bar--balance {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    min-height: 0;
  }

  .desk-lk-bar__money {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .desk-lk-bar__bal {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desk-lk-bar__amount-input {
    width: 100% !important;
    flex: none;
    height: 36px;
    min-height: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .desk-lk-bar__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-lk-bar__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--muted, #8b949e);
    box-sizing: border-box;
  }

  .desk-lk-bar__check span {
    flex: 1 1 auto;
    min-width: 0;
  }

  .desk-lk-bar__actions,
  .desk-lk-bar--balance .desk-lk-card__actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    flex-direction: row !important;
    width: 100%;
    gap: 8px;
  }

  .desk-lk-bar--balance .desk-lk-card__actions .desk-field__btn,
  .desk-settings-modal .desk-lk-tools--modal .desk-lk-bar--balance .desk-field__btn {
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
  }

  .desk-lk-trade-head {
    grid-template-columns: 1fr auto;
  }

  .desk-lk-trade-head__market {
    grid-column: 1 / -1;
  }

  .desk-trade__row {
    grid-template-columns: 1fr;
  }
}

.desk-settings-modal .desk-field-row {
  margin-top: 8px;
  padding-top: 12px;
  max-width: none;
}

.desk-settings-modal .desk-promo-modal__head {
  padding: 12px 14px;
}

.desk-settings-modal .desk-promo-modal__head h2 {
  font-size: 14px;
  font-weight: 600;
}

.desk-settings-modal .desk-promo-modal__x {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.desk-settings-modal__body {
  padding: 18px 20px 20px;
  display: grid;
  gap: 14px;
}

.desk-settings-modal__hint {
  display: none !important;
}

.desk-settings-modal__form,
.desk-settings-modal .desk-wd {
  gap: 10px;
}

.desk-settings-modal .desk-wallets,
.desk-settings-modal .desk-wd--card {
  max-width: none;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.desk-settings-modal .desk-pwd {
  display: grid;
  gap: 10px;
  max-width: none;
}

.desk-settings-modal .desk-notify-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.desk-settings-modal .desk-field__label {
  margin-bottom: 0;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.desk-settings-modal .desk-field__input,
.desk-settings-modal .desk-field__textarea {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 10px;
}

.desk-settings-modal .desk-field__textarea,
.desk-settings-modal .desk-field__input--area {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
}

.desk-settings-modal .desk-wd__actions {
  margin-top: 2px;
  gap: 6px;
}

.desk-settings-modal .desk-wd__mode {
  min-height: 34px;
}

.desk-settings-modal .desk-logo-brand__top {
  gap: 8px;
}

.desk-settings-modal .desk-logo-brand__control {
  gap: 12px;
}

.desk-settings-modal .desk-logo-icon__preview-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.desk-settings-modal .desk-logo-icon__preview {
  width: 42px;
  height: 42px;
}

.desk-settings-modal .desk-logo-icon__plus {
  font-size: 22px;
}

.desk-settings-modal .desk-logo-brand__field .desk-field__input {
  height: 42px;
  min-height: 42px;
}

.desk-settings-modal .desk-logo-brand__save {
  margin: 4px 0 0;
}

/* Pixels modal ? tile grid + nested code editor */
.desk-settings-modal[data-desk-settings-modal='pixels'] .desk-promo-modal__panel {
  width: min(480px, calc(100vw - 24px)) !important;
}

.desk-settings-modal[data-desk-settings-modal='pixels'] .desk-settings-modal__body {
  display: grid;
  justify-items: center;
  padding: 14px 16px 16px;
  overflow: visible;
}

.desk-settings-modal[data-desk-settings-modal='pixels'] .desk-pixels-form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  gap: 14px;
}

.desk-pixels-form__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.desk-pixel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 112px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.desk-pixel-tile.is-set {
  border-color: rgba(45, 190, 108, 0.35);
  background: rgba(45, 190, 108, 0.06);
}

.desk-pixel-tile__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.desk-pixel-tile__logo,
.desk-pixel-tile__logo img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  border-radius: 5px;
}

.desk-pixel-tile__name {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
}

.desk-pixel-tile__plus {
  appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f5;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.desk-pixel-tile__plus:hover {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0a0b0c;
}

.desk-pixel-tile__plus:active {
  transform: scale(0.96);
}

.desk-pixel-tile__plus:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.desk-pixel-tile__plus-ico {
  display: none;
  line-height: 0;
}

.desk-pixel-tile:not(.is-set) .desk-pixel-tile__plus-ico--add,
.desk-pixel-tile.is-set .desk-pixel-tile__plus-ico--set {
  display: grid;
}

.desk-pixel-tile.is-set .desk-pixel-tile__plus {
  border-color: rgba(45, 190, 108, 0.45);
  background: rgba(45, 190, 108, 0.14);
  color: #6eef9c;
}

.desk-pixel-tile.is-set .desk-pixel-tile__plus:hover {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0a0b0c;
}

.desk-settings-modal[data-desk-settings-modal='pixels'] .desk-wd__actions {
  justify-content: center;
  gap: 6px;
}

.desk-settings-modal[data-desk-settings-modal='pixels'] .desk-wd__actions .desk-field__btn {
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

/* Nested pixel code editor */
.desk-pixel-code-modal {
  z-index: 95;
}

.desk-pixel-code-modal__panel {
  width: min(420px, calc(100vw - 28px)) !important;
  max-height: min(84dvh, 560px) !important;
}

.desk-pixel-code-modal__body {
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
}

.desk-pixel-code-modal__input {
  min-height: 160px !important;
  height: 160px !important;
  max-height: 220px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

.desk-pixel-code-modal__actions {
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
}

@media (max-width: 560px) {
  .desk-pixels-form__grid {
    grid-template-columns: 1fr;
  }
}

/* SMTP / pixels: horizontal desk layout on PC */

.desk-smtp-editor__warn {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.desk-smtp-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .desk-smtp-form__grid {
    grid-template-columns: minmax(0, 1.5fr) 96px minmax(0, 1.15fr);
    gap: 10px 12px;
    align-items: start;
  }

  .desk-smtp-form__host {
    grid-column: 1;
  }

  .desk-smtp-form__port {
    grid-column: 2;
  }

  .desk-smtp-form__secure {
    grid-column: 3;
  }

  .desk-smtp-form__user {
    grid-column: 1 / 3;
  }

  .desk-smtp-form__pass {
    grid-column: 3;
  }

  .desk-smtp-form__from-email {
    grid-column: 1 / 3;
  }

  .desk-smtp-form__from-name {
    grid-column: 3;
  }

  .desk-smtp-editor .desk-smtp-test {
    margin-top: -2px;
  }

  .desk-smtp-editor .desk-smtp-test .desk-wd__actions {
    justify-content: flex-start;
  }

  .desk-pixels-form__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
    justify-content: center;
  }

}

.desk-settings-modal .desk-smtp-row {
  display: contents;
}

.desk-settings-modal__sub {
  margin: 0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.desk-settings-site__tabs {
  display: flex;
  gap: 3px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: var(--bg-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.desk-settings-site__tab {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.desk-settings-site__tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.desk-settings-site__tab.is-active {
  color: #0a0b0c;
  background: #f5f5f5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.desk-settings-site__tab.is-active:hover {
  color: #0a0b0c;
  background: #ffffff;
}

.desk-settings-site__pane[hidden] {
  display: none !important;
}

/* Site (footer / legal): compact by default, grow only for custom editors */
.desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-modal__panel {
  width: min(400px, 100%);
}

.desk-settings-modal[data-desk-settings-modal='site']:has([data-desk-footer-custom]:not([hidden])) .desk-promo-modal__panel,
.desk-settings-modal[data-desk-settings-modal='site']:has([data-desk-legal-custom]:not([hidden])) .desk-promo-modal__panel {
  width: min(520px, 100%);
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-settings-modal__body {
  padding: 12px 14px 14px;
  gap: 8px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-form,
.desk-settings-modal[data-desk-settings-modal='site'] .desk-legal__form {
  display: grid;
  gap: 10px;
  max-width: none;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-legal__modes,
.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-form__modes {
  margin: 0;
  max-width: none;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-wd__actions {
  margin: 0;
  justify-content: flex-start;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-wd__actions .desk-field__btn {
  width: auto;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel {
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel__toolbar {
  display: flex;
  justify-content: flex-end;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel__toolbar .desk-field__btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  align-items: start;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel__span2 {
  grid-column: 1 / -1;
  min-width: 0;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field {
  margin: 0;
  gap: 3px;
  min-width: 0;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__label {
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input,
.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area {
  min-height: 32px;
  height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area {
  min-height: 52px;
  height: 52px;
  resize: none;
  line-height: 1.35;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area::-webkit-scrollbar-track {
  background: transparent;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-footer-panel .desk-field__input--area::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.desk-settings-modal .desk-legal__body {
  min-height: min(52vh, 560px);
  max-height: min(52vh, 560px);
  height: auto;
  overflow-y: auto;
}

.desk-settings-modal .desk-footer-panel__title {
  display: none;
}

.desk-settings-modal .desk-legal__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
}

.desk-settings-modal .desk-legal__tab {
  padding: 6px 8px;
  font-size: 11px;
}

.desk-settings-modal .desk-legal__actions,
.desk-settings-modal .desk-legal__modes,
.desk-settings-modal .desk-footer-form__modes {
  margin-bottom: 0;
}

.desk-settings-modal .desk-notify-steps,
.desk-settings-modal .desk-warn {
  display: none;
}

/* Create promo ? vertical stack; works for new (__block) and legacy (__grid) markup */
.desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__panel {
  width: min(400px, 100%);
  max-height: min(92vh, 720px);
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__head {
  padding: 14px 16px;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__head h2 {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  padding: 16px !important;
  margin: 0;
  box-sizing: border-box;
}

/* Kill legacy 2-col grid if old partner.js still on host */
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin: 0 !important;
  width: 100%;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__block,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form .desk-field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  width: 100%;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__block[hidden],
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form .desk-field[hidden] {
  display: none !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__lab,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form .desk-field__label {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c8d2de;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form .desk-field__input,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form input.desk-field__input,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form textarea.desk-field__input,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form textarea.desk-field__input--area,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__text-input {
  display: block !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  line-height: 40px !important;
  resize: none !important;
  overflow: hidden !important;
}

/* Code row: input + Generate ? same height, bottom-aligned with label above */
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
  margin: 0 !important;
  width: 100%;
}

/* Legacy: label wraps input inside __code ? pin button to input row only */
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) {
  grid-template-rows: auto 40px !important;
  row-gap: 10px !important;
  column-gap: 8px !important;
  align-items: stretch !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) > .desk-field {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) > .desk-field__btn,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) > button {
  grid-column: 2 !important;
  grid-row: 2 !important;
  align-self: stretch !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code .desk-field__input,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code .desk-field__btn,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code > button {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code .desk-field__btn,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code > button {
  margin: 0 !important;
  padding: 0 14px !important;
  font-size: 12.5px;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 !important;
  width: 100%;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__reward {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin: 0 !important;
  width: 100%;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__actions,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form .staff-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--line);
  grid-template-columns: none !important;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__actions .staff-btn,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form__actions .staff-btn--ghost,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-form .staff-actions .staff-btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  justify-content: center;
  font-size: 12.5px;
  border-radius: 8px;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 36px;
  cursor: pointer;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c2cad6;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
  line-height: 1.25;
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt:hover span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt input:checked + span {
  color: #0a0b0c;
  background: #f5f5f5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt:has(input:checked):hover span,
.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt input:checked + span:hover {
  color: #0a0b0c;
  background: #ffffff;
}

.desk-promo-modal[data-desk-promo-modal] .desk-promo-type__opt input:focus-visible + span {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 1px;
}

.desk-promo-form__hint {
  display: none !important;
}

@media (max-width: 380px) {
  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code,
  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__row {
    grid-template-columns: 1fr !important;
  }

  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__actions {
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__actions .staff-btn,
  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__actions .staff-btn--ghost {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
  }

  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) {
    grid-template-rows: auto auto auto !important;
  }

  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) > .desk-field {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) > .desk-field__btn,
  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code:has(> .desk-field) > button {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: auto;
    justify-self: start;
  }

  .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__code .desk-field__btn {
    width: auto;
  }
}

/* ?? Domain legal editor ?? */
.desk-legal__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 18px;
  border-bottom: 1.5px solid var(--line);
}

.desk-legal__tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.desk-legal__tab:hover {
  color: var(--text);
}

.desk-legal__tab.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.desk-legal__form {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.desk-legal__modes {
  max-width: 480px;
}

.desk-legal__custom[hidden] {
  display: none !important;
}

.desk-legal__custom {
  display: grid;
  gap: 16px;
}

.desk-legal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-footer-form {
  display: grid;
  gap: 20px;
  max-width: 1100px;
}

.desk-footer-form__modes {
  max-width: 420px;
}

.desk-footer-panel[hidden] {
  display: none !important;
}

.desk-footer-panel {
  display: block;
  margin: 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.desk-footer-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.desk-footer-panel__col {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 16px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.desk-footer-panel__title {
  margin: 0 0 2px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c8d2de;
}

.desk-footer-panel__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.desk-footer-panel .desk-field {
  margin: 0;
  gap: 6px;
  min-width: 0;
}

.desk-footer-panel .desk-field__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted, #a8b2bf);
}

.desk-footer-panel .desk-field__input,
.desk-footer-panel .desk-field__input--area {
  min-width: 0;
}

.desk-footer-panel .desk-field__input--area {
  min-height: 88px;
  height: 88px;
  resize: vertical;
  overflow-y: auto;
  line-height: 1.45;
}

@media (max-width: 960px) {
  .desk-footer-panel__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .desk-footer-panel__pair {
    grid-template-columns: 1fr;
  }

  .desk-footer-panel__col {
    padding: 14px;
  }
}

.desk-legal__body {
  min-height: min(70vh, 760px);
  max-height: min(70vh, 760px);
  height: auto;
  width: 100%;
  overflow-y: auto;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.06);
}

.desk-acct-settings .desk-legal__body {
  min-height: calc(100vh - 260px);
  max-height: calc(100vh - 260px);
}

.desk-legal__body::-webkit-scrollbar {
  width: 10px;
}

.desk-legal__body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.desk-legal__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.desk-legal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.42);
  background-clip: padding-box;
}

html.desk-html[data-desk-theme="light"] .desk-legal__body {
  scrollbar-color: rgba(15, 23, 42, 0.35) rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-legal__body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-legal__body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.32);
  border: 2px solid transparent;
  background-clip: padding-box;
}

html.desk-html[data-desk-theme="light"] .desk-legal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.48);
  background-clip: padding-box;
}

/* ?? Live user activity logs ?? */
.desk-logs {
  width: 100%;
  max-width: none;
}

.desk-logs__live {
  display: none !important;
}

.desk-logs__head,
.desk-log {
  display: grid;
  grid-template-columns:
    minmax(148px, 0.9fr)
    minmax(260px, 2.6fr)
    minmax(52px, 0.45fr)
    minmax(100px, 0.75fr)
    minmax(140px, 1fr)
    minmax(170px, 1.2fr);
  gap: 10px 28px;
  align-items: center;
  width: 100%;
}

.desk-logs--platform .desk-logs__head,
.desk-logs--platform .desk-log {
  grid-template-columns:
    minmax(132px, 0.85fr)
    minmax(110px, 0.85fr)
    minmax(240px, 2.4fr)
    minmax(52px, 0.45fr)
    minmax(100px, 0.75fr)
    minmax(130px, 1fr)
    minmax(160px, 1.15fr);
}

.desk-log__worker {
  display: block;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-filter--logs {
  margin: 0 0 18px;
}

.desk-logs__head {
  box-sizing: border-box;
  min-height: 42px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: #e6edf5;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.desk-logs__stream {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  border-bottom: 1.5px solid var(--line);
}

.desk-logs__empty {
  margin: 0;
  padding: 28px 0 24px;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

.desk-log {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  animation: deskIn 0.28s ease both;
  min-width: 0;
}

.desk-log:last-child {
  border-bottom: 0;
}

.desk-log__time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-log__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.desk-log__summary-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-log__ok {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--ok);
  /* Icon-only in logs ? no status chip frame */
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1;
  white-space: nowrap;
}

.desk-log__ok.desk-status,
.desk-log__ok.desk-status--ok,
.desk-logs .desk-log__ok.desk-status {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ok);
}

.desk-log__ok .desk-status__check {
  display: inline-flex;
}

.desk-log__geo,
.desk-log__source,
.desk-log__host,
.desk-log__mail {
  min-width: 0;
  overflow: hidden;
}

.desk-log__domain,
.desk-log__email {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: #dce4ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

a.desk-log__domain,
a.desk-log__email {
  color: var(--text);
  font-weight: 600;
}

a.desk-log__domain:hover,
a.desk-log__email:hover {
  color: var(--v2-text-secondary, var(--accent));
}

.desk-logs .desk-pager {
  margin: 0;
  padding: 12px 16px 14px;
}

/* Tablet only: keep wide log grid with inner scroll */
@media (max-width: 1100px) and (min-width: 961px) {
  .desk-logs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .desk-logs__head,
  .desk-logs__stream,
  .desk-log {
    min-width: 960px;
  }

  .desk-logs--platform .desk-logs__head,
  .desk-logs--platform .desk-logs__stream,
  .desk-logs--platform .desk-log {
    min-width: 1120px;
  }
}

/* Domain settings ? brand logo + SEO SERP preview */
.desk-logo-brand__top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 4px;
}

.desk-logo-brand__label {
  display: block;
  margin: 0;
}

.desk-logo-brand__control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.desk-logo-brand__field {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  width: auto;
}

.desk-logo-brand__field .desk-field__input {
  width: 100%;
  box-sizing: border-box;
}

.desk-logo-brand__save {
  margin: 8px 0 18px;
}
.desk-logo-brand + .desk-wd,
[data-desk-logo-brand] > .desk-wd + .desk-wd {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line, rgba(255,255,255,0.08));
}
.desk-logo-icon__preview-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--field);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.desk-logo-icon__preview-wrap:hover,
.desk-logo-icon__preview-wrap:focus-visible {
  border-color: var(--v2-text-secondary, var(--accent));
  outline: none;
}
.desk-logo-icon__preview-wrap--empty {
  background: rgba(255, 255, 255, 0.03);
}
.desk-logo-icon__preview {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.desk-logo-icon__plus {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.desk-logo-icon__hint {
  margin: 0;
}
.desk-logo-icon__file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.desk-field__textarea {
  min-height: 84px;
  resize: none;
  line-height: 1.4;
  padding-top: 10px;
  padding-bottom: 10px;
}
.desk-seo {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
[data-desk-logo-brand] > .desk-wd {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line, rgba(255,255,255,0.08));
}
[data-desk-logo-brand] > .desk-logo-brand {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.desk-seo__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.desk-logo-brand__footer {
  margin-top: 8px;
}
.desk-seo__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, rgba(255,255,255,0.55));
}
.desk-seo-serp {
  margin-top: 4px;
}
.desk-seo-serp[hidden] {
  display: none !important;
}
.desk-seo-serp__card {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.desk-seo-serp__cite {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  min-width: 0;
}
.desk-seo-serp__cite-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.desk-seo-serp__fav {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f4;
}
.desk-seo-serp__fav img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
.desk-seo-serp__fav-ph {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dadce0;
}
.desk-seo-serp__site {
  font-size: 14px;
  line-height: 1.25;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desk-seo-serp__host {
  font-size: 12px;
  line-height: 1.25;
  color: #4d5156;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desk-seo-serp__title {
  font-size: 20px;
  line-height: 1.3;
  color: #1a0dab;
  font-weight: 400;
  margin: 2px 0 4px;
  word-break: break-word;
}
.desk-seo-serp__desc {
  font-size: 14px;
  line-height: 1.45;
  color: #4d5156;
  word-break: break-word;
}

.desk-seo-index {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 560px;
}

.desk-seo-index__title {
  font-size: 15px;
  margin: 0 0 8px;
}

.desk-seo-index__status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}

.desk-seo-index__stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.desk-seo-index__stat-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #a8b2bf);
}

.desk-seo-index__stat-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text, #f3f5f7);
  word-break: break-word;
}

.desk-seo-index__stat-meta {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted, #a8b2bf);
  overflow-wrap: anywhere;
}

.desk-seo-index__files {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

.desk-seo-index__steps {
  margin: 0 0 16px;
  padding: 0 0 0 1.15rem;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #a8b2bf);
}

.desk-seo-index__steps li {
  padding-left: 2px;
}

.desk-seo-index__steps li::marker {
  color: #3c9bf4;
  font-weight: 600;
}

.desk-seo-index__form {
  gap: 12px;
  margin-bottom: 14px;
}

.desk-seo-index__form .desk-field__input--area {
  min-height: 110px;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
}

.desk-seo-index__advanced {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.desk-seo-index__advanced > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted, #a8b2bf);
  user-select: none;
}

.desk-seo-index__advanced > summary::-webkit-details-marker {
  display: none;
}

.desk-seo-index__advanced > summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  vertical-align: 1px;
  transition: transform 0.12s ease;
}

.desk-seo-index__advanced[open] > summary::before {
  transform: rotate(90deg);
}

.desk-seo-index__advanced[open] > summary {
  color: var(--text, #f3f5f7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.desk-seo-index__advanced-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.desk-seo-index__ask {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.desk-seo-index__ask .desk-field__hint {
  margin: 0;
  max-width: 280px;
}

html.desk-html[data-desk-theme="light"] .desk-seo-index {
  border-top-color: rgba(15, 23, 42, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-seo-index__stat {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.03);
}

@media (max-width: 560px) {
  .desk-seo-index__status {
    grid-template-columns: 1fr;
  }
}

/* ?? Magnetic Partner polish (final pass) ?? */
.desk-row > .desk-section {
  margin-bottom: 0;
  height: 100%;
}

/* Nested modules stay light on the flat desk (dashboard has its own quiet cards) */
.desk-section:not(.desk-lk-tools):not([data-desk-settings-hub]):not(.desk-section--cards) .desk-metric,
.desk-section:not(.desk-lk-tools):not([data-desk-settings-hub]):not(.desk-section--cards) .desk-balance__item,
.desk-panel .desk-metric {
  background: transparent;
  border-color: var(--line);
}

.desk-dash .desk-balance__item,
.desk-dash .desk-metric {
  background: var(--desk-card-bg);
  border-color: var(--desk-card-border);
}

.desk-section:not(.desk-lk-tools):not([data-desk-settings-hub]):not(.desk-section--cards) .desk-lk-card,
.desk-section:not(.desk-lk-tools):not([data-desk-settings-hub]):not(.desk-section--cards) .desk-settings-card,
.desk-section .desk-support__compose:not(.desk-support__compose--bar),
.desk-section .desk-filter,
.desk-panel .desk-lk-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}

.desk-section {
  border-color: transparent;
}

.staff-table thead th {
  background: transparent;
  color: #e6edf5;
}

.desk-section--logs {
  padding: 0;
  overflow: visible;
}

.desk-section--logs .desk-logs__head {
  border-radius: 0;
}

.desk-filter__sep {
  display: none;
}

.desk-work-top__actions .staff-btn,
.desk-work-top__actions a.staff-btn,
.desk-head__actions .staff-btn,
.desk-head__actions a.staff-btn {
  border-radius: var(--radius-sm);
}

.desk-pager {
  border-top-color: var(--line);
}

.desk-pager__nav,
.desk-pager__num {
  border-radius: var(--radius-sm);
}

.desk-pager__num.is-current {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--v2-text-secondary, var(--accent));
}

/* ?? Phone polish: all desk sections (worker + owner) ?? */
@media (max-width: 960px) {
  .desk-nav__a {
    margin: 0;
  }

  .desk-row,
  .desk-row--3,
  .desk-row--dash-main {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .desk-main,
  .staff-desk__main {
    padding: 4px max(16px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }

  .desk-main--flush,
  .staff-desk__main.desk-main--flush {
    padding-top: 4px;
  }

  .desk-section {
    margin-bottom: 16px;
    padding: 0;
  }

  .desk-section:has(> .desk-table-scroll:first-child),
  .desk-section--logs {
    padding: 0;
  }

  .desk-section__label {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .desk-pager {
    justify-content: center;
    gap: 10px;
    padding: 12px 10px 14px;
    margin-top: 0;
  }

  .desk-pager__nav,
  .desk-pager__num {
    min-height: 40px;
    min-width: 40px;
    font-size: 13px;
  }

  .desk-mini-btn,
  .desk-ban-btn {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .desk-email-status,
  .desk-2fa-cell .desk-email-status {
    gap: 8px;
  }

  .desk-ns-actions-inner {
    flex-wrap: wrap;
    gap: 6px;
  }

  .desk-field__btn,
  a.desk-field__btn,
  .staff-btn,
  a.staff-btn {
    min-height: 32px;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Logs ? stacked cards (no page-wide horizontal scroll) */
  .desk-logs,
  .desk-logs--platform {
    overflow-x: visible;
  }

  .desk-logs__head {
    display: none;
  }

  .desk-logs__stream,
  .desk-log,
  .desk-logs--platform .desk-logs__stream,
  .desk-logs--platform .desk-log {
    min-width: 0;
  }

  .desk-log,
  .desk-logs--platform .desk-log {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "time geo"
      "summary summary"
      "source source"
      "host host"
      "mail mail";
    gap: 6px 10px;
    padding: 12px 14px;
    align-items: start;
  }

  .desk-logs--platform .desk-log {
    grid-template-areas:
      "time geo"
      "worker worker"
      "summary summary"
      "source source"
      "host host"
      "mail mail";
  }

  .desk-log__time { grid-area: time; white-space: normal; }
  .desk-log__geo { grid-area: geo; justify-self: end; }
  .desk-log__worker-cell { grid-area: worker; }
  .desk-log__summary {
    grid-area: summary;
    max-width: none;
  }
  .desk-log__summary-text {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .desk-log__source { grid-area: source; }
  .desk-log__host { grid-area: host; }
  .desk-log__mail { grid-area: mail; }

  .desk-log__domain,
  .desk-log__email {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  /* Modals / sheets */
  .desk-promo-modal {
    display: grid;
    place-items: end stretch;
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  }

  .desk-promo-modal__panel,
  .desk-settings-modal .desk-promo-modal__panel,
  .desk-settings-modal--wide .desk-promo-modal__panel,
  .desk-ns-modal .desk-promo-modal__panel,
  .desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__panel,
  .desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-modal__panel,
  .desk-settings-modal[data-desk-settings-modal='site']:has([data-desk-footer-custom]:not([hidden])) .desk-promo-modal__panel,
  .desk-settings-modal[data-desk-settings-modal='site']:has([data-desk-legal-custom]:not([hidden])) .desk-promo-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(92dvh, 100%);
    margin: 0;
    border-radius: 14px 14px 10px 10px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .desk-settings-modal__body,
  .desk-promo-modal__body,
  .desk-ns-modal__body {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .desk-settings-hub {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .desk-settings-hub__bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .desk-settings-hub__copy {
    width: 100%;
    min-height: 44px;
  }

  .desk-settings-card {
    height: auto;
    min-height: 96px;
    padding: 14px 12px;
  }

  /* Support ? phone: lock viewport, no page scroll; only list/stream scroll */
  html.desk-html:has(.desk-support--desk) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.desk:has(.desk-support--desk) {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.desk:has(.desk-support--desk) > .desk-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  .desk-main:has(> .desk-support--desk),
  .staff-desk__main:has(> .desk-support--desk) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding: 0 !important;
    margin: 0;
  }

  .desk-support-settings-modal .desk-promo-modal__panel {
    width: min(100%, calc(100vw - 16px));
    max-height: min(90dvh, calc(100dvh - 24px));
  }

  .desk-section.desk-support--desk,
  .desk-support--desk {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .desk-support__rail {
    border-right: 0;
    border-bottom: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  /* Inbox: full-height dialog list only (hide empty chat pane) */
  .desk-support--desk:not(:has([data-desk-support-thread])) .desk-support__pane {
    display: none;
  }

  .desk-support--desk:has([data-desk-support-thread]) .desk-support__rail {
    display: none;
  }

  .desk-support--desk:has([data-desk-support-thread]) {
    grid-template-rows: minmax(0, 1fr);
  }

  .desk-support--desk .desk-support__pane {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .desk-support--desk .desk-support--thread {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }

  .desk-support--desk .desk-support__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .desk-support--desk .desk-support__stream {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .desk-support--desk .desk-support__compose,
  .desk-support--desk .desk-support__compose--bar {
    flex: 0 0 auto;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .desk-support__pane-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: #e8eef6;
    text-decoration: none;
  }

  .desk-support__pane-back:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .desk-support__pane-back-ico {
    display: block;
    font-size: 16px;
    line-height: 1;
  }

  .desk-support__pane-back-txt {
    display: none;
  }

  .desk-support__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .desk-support__head-actions {
    width: auto;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }

  .desk-support__head-actions .desk-field__btn,
  .desk-support__head-actions a.desk-field__btn {
    width: auto;
    align-self: flex-start;
  }

  .desk-support__rail-head {
    flex: 0 0 auto;
    padding: 10px 12px 8px;
    gap: 8px;
  }

  .desk-support__filters,
  .desk-support__filters--rail {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 0 12px 10px;
    padding: 3px;
    gap: 3px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .desk-support__filters--rail .desk-support__filter,
  .desk-support__filter {
    flex: unset;
    width: auto;
    min-width: 0;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 4px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }

  .desk-support__item {
    padding: 12px 14px;
  }

  .desk-support__item-email {
    font-size: 13px;
  }

  .desk-support__compose .desk-field__input--area,
  .desk-support__editor .desk-support__input,
  .desk-support__compose--bar .desk-support__input {
    min-height: 44px;
    max-height: 112px;
    padding: 10px 44px 10px 12px;
  }

  .desk-support__chat-head {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    flex: 0 0 auto;
    padding: 10px 12px;
  }

  .desk-support__pane-back {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .desk-support__chat-person {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    align-self: center;
    overflow: hidden;
  }

  .desk-support__chat-id {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .desk-support__chat-email {
    flex-wrap: nowrap;
    gap: 6px;
    font-size: 13px;
    min-width: 0;
  }

  .desk-support__chat-email .desk-user-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .desk-support__chat-sub {
    margin: 0;
    font-size: 11px;
    flex-wrap: nowrap;
    gap: 6px;
  }

  /* Dot only on phone — label collided with Open/Closed toggle */
  .desk-support__chat-sub .desk-status--presence .desk-status__label,
  .desk-support__chat-sub .desk-presence__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .desk-support__thread-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-self: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .desk-support__thread-actions .desk-mini-btn,
  .desk-support__thread-actions .desk-field__btn {
    flex: 0 0 auto;
    min-height: 34px;
  }

  .desk-support__icon-action {
    width: 34px;
    height: 34px;
  }

  .desk-support__toggle {
    padding: 3px 8px 3px 3px;
    gap: 8px;
  }

  .desk-support__toggle-track {
    flex-basis: 38px;
    width: 38px;
    height: 22px;
  }

  .desk-support__toggle-knob {
    width: 18px;
    height: 18px;
  }

  .desk-wd-eswitch__btn {
    padding: 3px 8px 3px 3px;
    gap: 8px;
    min-height: 32px;
  }

  .desk-wd-eswitch__track {
    flex-basis: 38px;
    width: 38px;
    height: 22px;
  }

  .desk-wd-eswitch__knob {
    width: 18px;
    height: 18px;
  }

  .desk-wd-eswitch.is-on .desk-wd-eswitch__knob {
    transform: translateX(16px);
  }

  .desk-support__toggle.is-on .desk-support__toggle-knob {
    transform: translateX(16px);
  }

  .desk-support__toggle-label {
    font-size: 11.5px;
    min-width: 0;
  }

  .desk-support__msg {
    max-width: 94%;
  }

  .desk-support__msg-stack {
    max-width: min(100%, 100%);
  }

  .desk-support__msg--agent .desk-support__msg-stack {
    max-width: calc(100% - 40px);
  }

  /* LK tools / cards */
  .desk-lk-tools__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .desk-lk-card {
    padding: 14px;
  }

  .desk-lk-card__actions {
    flex-direction: column;
  }

  .desk-lk-card__actions .desk-field__btn,
  .desk-lk-card__actions a.desk-field__btn {
    width: 100%;
  }

  .desk-lk-bar--balance .desk-lk-card__actions,
  .desk-lk-bar__actions {
    flex-direction: row !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  /* Ban / access */
  .desk-ban__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .desk-ban__copy {
    flex: 0 0 auto;
    width: 100%;
  }

  .desk-ban__status {
    margin: 0 0 4px;
  }

  .desk-ban__meta {
    max-width: none;
  }

  .desk-section.desk-ban {
    padding: 14px;
  }

  .desk-ban__form,
  .desk-ban__form .desk-ban-btn {
    width: 100%;
  }

  .desk-ban-btn {
    min-height: 44px;
  }

  /* Broadcast (super) */
  .staff-broadcast,
  .staff-broadcast__form,
  .staff-broadcast__toolbar {
    width: 100%;
    max-width: none;
  }

  .staff-broadcast__toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .staff-broadcast__toolbar .staff-btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
    justify-content: center;
  }

  /* Domain DNS / NS cells */
  .desk-ns {
    white-space: normal;
    word-break: break-word;
  }

  .desk-dl > div {
    gap: 4px 10px;
  }

  .desk-dl dt {
    font-size: 10.5px;
  }

  .desk-dl dd {
    overflow-wrap: anywhere;
  }

  /* Settings / domain / user detail pages */
  .desk-main > .staff-lede {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
  }

  .desk-main > .staff-lede + .desk-section,
  .desk-main > .staff-ok + .desk-section,
  .desk-main > .staff-error + .desk-section {
    margin-top: 4px;
  }

  .desk-section:has(> .desk-dl),
  .desk-domain-meta.desk-section {
    margin-bottom: 14px;
    padding-bottom: 0;
  }

  .desk-section:has(> .desk-dl) > .desk-section__label {
    margin-bottom: 10px;
    font-size: 13px;
    letter-spacing: -0.01em;
    text-transform: none;
    font-weight: 650;
    color: var(--text);
    overflow-wrap: anywhere;
  }

  .desk-section:has(> .desk-dl) > .desk-dl {
    gap: 12px;
    margin-bottom: 0;
  }

  .desk-section:has(> .desk-dl) > .desk-wd__actions {
    margin-top: 12px !important;
    width: auto;
    max-width: 100%;
  }

  .desk-section:has(> .desk-dl) > .desk-wd__actions .desk-field__btn {
    width: auto;
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
  }

  .desk-work-top__title {
    font-size: 15px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .desk-acct-settings .desk-wallets {
    padding: 12px 0 0;
  }

  .desk-acct-settings .desk-wallet__addr {
    font-size: 13px;
    min-height: 40px;
  }

  .desk-acct-settings .desk-email-status {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .desk-acct-settings .desk-pwd__line {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }

  .desk-acct-settings .desk-settings-site__tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .desk-acct-settings .desk-settings-site__tab {
    flex: 1 1 auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .desk-acct-settings .desk-smtp-form__grid,
  .desk-acct-settings .desk-pixels-form__grid,
  .desk-acct-settings .desk-field-row {
    grid-template-columns: 1fr;
  }

  /* Login */
  .staff-login-wrap {
    padding: max(64px, calc(48px + env(safe-area-inset-top, 0px))) max(16px, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }

  .staff-login .staff-btn {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .desk-settings-hub {
    grid-template-columns: 1fr;
  }

  .desk-metrics,
  .desk-metrics--3,
  .desk-metrics--4,
  .desk-metrics--5,
  .desk-metrics--6,
  .crm-kpis,
  .staff-grid {
    grid-template-columns: 1fr 1fr;
  }

  .desk-filter__rail {
    grid-template-columns: 1fr;
  }

  .desk-filter__go,
  .desk-filter__reset {
    grid-column: 1 / -1;
    width: 100%;
  }

  .desk-period a {
    min-height: 30px;
    padding-left: 9px;
    padding-right: 9px;
  }

  .desk-section {
    border-radius: 0;
  }

  .desk-pixels-form__grid {
    grid-template-columns: 1fr;
  }
}


/* Wallets settings modal ? address fields sized to content, not stretched */
.desk-settings-modal[data-desk-settings-modal='wallets'] .desk-promo-modal__panel,
.desk-settings-modal--wide:has([data-desk-wallet]) .desk-promo-modal__panel {
  width: min(560px, calc(100vw - 24px)) !important;
}

.desk-settings-modal[data-desk-settings-modal='wallets'] .desk-wallet,
.desk-settings-modal--wide:has([data-desk-wallet]) .desk-wallet,
.desk-settings-modal .desk-wallets .desk-wallet {
  grid-template-columns: 22px 72px minmax(18ch, 46ch) 32px;
  justify-content: start;
  max-width: 100%;
}

.desk-settings-modal[data-desk-settings-modal='wallets'] .desk-wallet__addr,
.desk-settings-modal--wide:has([data-desk-wallet]) .desk-wallet__addr,
.desk-settings-modal .desk-wallets .desk-wallet__addr {
  width: 100%;
  max-width: 46ch;
  justify-self: start;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.1);
}

.desk-settings-modal[data-desk-settings-modal='wallets'] .desk-wallets__head,
.desk-settings-modal--wide:has([data-desk-wallet]) .desk-wallets__head {
  grid-template-columns: 22px 72px minmax(18ch, 46ch) 32px;
  justify-content: start;
}

/* Notify settings ? bot token / chat id: same compact width, not full modal stretch */
.desk-settings-modal[data-desk-settings-modal='notify'] .desk-promo-modal__panel {
  width: min(380px, calc(100vw - 24px)) !important;
}

.desk-settings-modal[data-desk-settings-modal='notify'] .desk-settings-modal__body,
.desk-settings-modal[data-desk-settings-modal='notify'] .desk-wd,
.desk-settings-modal[data-desk-settings-modal='notify'] .desk-wd--in-card {
  width: 100%;
  max-width: none;
}

.desk-settings-modal[data-desk-settings-modal='notify'] .desk-wd--in-card .desk-field__input {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}


/* Site settings ? compact modern mode switch */
.desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-type.desk-legal__modes,
.desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-type.desk-footer-form__modes {
  width: 100%;
  max-width: none;
  min-height: 0;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-type__opt,
.desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-type__opt span {
  min-height: 30px;
}

.desk-settings-modal[data-desk-settings-modal='site'] .desk-promo-type__opt span {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 7px;
}


/* =====
   FINAL: modals === settings-hub cards (quiet wash on page bg ? not charcoal gray)
   ========================================================================== */
body.desk .desk-promo-modal .desk-promo-modal__panel,
body.desk .desk-settings-modal .desk-promo-modal__panel,
body.desk .desk-settings-modal--wide .desk-promo-modal__panel,
body.desk .desk-ns-modal .desk-promo-modal__panel,
body.desk .desk-support-settings-modal .desk-promo-modal__panel,
body.desk .desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__panel,
body.desk [class*='desk-'][class*='-modal'] .desk-promo-modal__panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--v2-card, #1c1c1c) 92%, #ffffff 8%), var(--v2-card, #1c1c1c) 46%) !important;
  border: 1px solid var(--v2-line, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

body.desk .desk-promo-modal .desk-promo-modal__head,
body.desk .desk-settings-modal .desk-promo-modal__head {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.desk .desk-promo-modal__scrim {
  background: rgba(5, 5, 5, 0.66) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* ?? Acct settings: premium frameless site tabs / mode switch / LK tools ?? */
.desk-acct-settings .desk-settings-site {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
}

.desk-acct-settings .desk-settings-site__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.desk-acct-settings .desk-settings-site__tab {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 40px;
  margin: 0 0 -1px;
  padding: 10px 16px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted, #a8b2bf);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  box-shadow: none;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.desk-acct-settings .desk-settings-site__tab:hover {
  color: var(--text, #f3f5f7);
  background: transparent;
}

.desk-acct-settings .desk-settings-site__tab.is-active,
.desk-acct-settings .desk-settings-site__tab.is-active:hover {
  color: var(--text, #f3f5f7);
  background: transparent;
  border-bottom-color: #ffffff;
  box-shadow: none;
}

.desk-acct-settings .desk-footer-form__modes,
.desk-acct-settings .desk-legal__modes,
.desk-acct-settings .desk-promo-type.desk-footer-form__modes,
.desk-acct-settings .desk-promo-type.desk-legal__modes {
  width: auto;
  max-width: 280px;
  margin: 0;
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.desk-acct-settings .desk-promo-type__opt span {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted, #a8b2bf);
  box-shadow: none;
}

.desk-acct-settings .desk-promo-type__opt:hover span {
  color: var(--text, #f3f5f7);
  background: rgba(255, 255, 255, 0.05);
}

.desk-acct-settings .desk-promo-type__opt input:checked + span,
.desk-acct-settings .desk-promo-type__opt:has(input:checked):hover span,
.desk-acct-settings .desk-promo-type__opt input:checked + span:hover {
  color: #0a0b0c;
  background: #f5f5f5;
  box-shadow: none;
}

.desk-acct-settings .desk-footer-form,
.desk-acct-settings .desk-legal__form {
  gap: 16px;
  max-width: 760px;
}

.desk-acct-settings .desk-footer-panel {
  padding-top: 14px;
  border-top-color: rgba(255, 255, 255, 0.06);
}

.desk-acct-settings .desk-footer-panel__grid {
  gap: 12px;
}

.desk-acct-settings .desk-footer-panel__col {
  gap: 11px;
  padding: 15px 15px 16px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.desk-acct-settings .desk-footer-panel__title {
  padding-bottom: 9px;
  margin-bottom: 2px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.desk-acct-settings .desk-footer-panel .desk-field {
  gap: 5px;
}

.desk-acct-settings .desk-footer-panel .desk-field__label {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #a8b2bf);
}

.desk-acct-settings .desk-footer-panel .desk-field__input,
.desk-acct-settings .desk-footer-panel .desk-field__input--area {
  min-height: 42px;
  padding: 0 13px;
  font-size: 13.5px;
  border-radius: 10px;
}

.desk-acct-settings .desk-footer-panel .desk-field__input--area {
  min-height: 90px;
  height: 90px;
  padding: 10px 13px;
  resize: vertical;
  line-height: 1.45;
}

.desk-acct-settings .desk-footer-panel__pair {
  gap: 10px;
}

@media (max-width: 860px) {
  .desk-acct-settings .desk-footer-panel__grid {
    grid-template-columns: 1fr;
  }
}

/* LK tools inside user settings ? frameless, not stretched */
.desk-acct-settings .desk-lk-tools,
.desk-acct-settings .desk-lk-tools--modal {
  max-width: 560px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.desk-acct-settings .desk-lk-tools__grid,
.desk-acct-settings .desk-lk-tools--modal .desk-lk-tools__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  max-width: 560px;
}

.desk-acct-settings .desk-lk-card,
.desk-acct-settings .desk-lk-card--wide,
.desk-acct-settings .desk-lk-card--bar,
.desk-acct-settings .desk-lk-card--balance,
.desk-acct-settings .desk-lk-card--trade {
  grid-column: auto;
  gap: 10px;
  margin: 0;
  padding: 16px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.desk-acct-settings .desk-lk-card:first-child {
  padding-top: 0 !important;
}

.desk-acct-settings .desk-lk-card:last-child {
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

.desk-acct-settings .desk-lk-card__title {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c8d2de;
}

.desk-acct-settings .desk-lk-bar--balance {
  flex-wrap: wrap;
  gap: 10px 12px;
  min-height: 0;
}

.desk-acct-settings .desk-lk-bar__bal {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.desk-acct-settings .desk-lk-bar__amount-input,
.desk-acct-settings .desk-lk-bar__amount {
  width: 96px !important;
  flex: 0 0 96px;
}

.desk-acct-settings .desk-lk-bar__check {
  flex: 1 1 160px;
  font-size: 12px;
  color: var(--muted, #a8b2bf);
  white-space: normal;
}

.desk-acct-settings .desk-lk-bar .desk-field__btn,
.desk-acct-settings .desk-lk-bar__actions .desk-field__btn {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
}

.desk-acct-settings .desk-lk-card--trade {
  gap: 12px;
}

.desk-acct-settings .desk-lk-trade-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.desk-acct-settings .desk-lk-trade-head .desk-dd__btn--field,
.desk-acct-settings .desk-lk-trade-head .desk-field__input {
  height: 40px;
  min-height: 40px;
  font-size: 13px;
  border-radius: 9px;
}

.desk-acct-settings .desk-lk-card--trade > .desk-trade {
  margin: 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: transparent;
  gap: 10px;
}

.desk-acct-settings .desk-trade__tabs,
.desk-acct-settings .desk-trade__sides {
  max-width: 320px;
  border: 0;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  padding: 3px;
}

.desk-acct-settings .desk-lk-trade-actions,
.desk-acct-settings .desk-lk-card__actions {
  margin-top: 4px;
}

.desk-acct-settings .desk-lk-trade-actions .desk-field__btn,
.desk-acct-settings .desk-lk-card__actions .desk-field__btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 9px;
}

@media (max-width: 640px) {
  .desk-acct-settings .desk-settings-site,
  .desk-acct-settings .desk-lk-tools,
  .desk-acct-settings .desk-lk-tools--modal,
  .desk-acct-settings .desk-lk-tools__grid {
    max-width: none;
  }

  .desk-acct-settings .desk-settings-site__tab {
    flex: 1 1 auto;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
  }

  .desk-acct-settings .desk-footer-form__modes,
  .desk-acct-settings .desk-legal__modes {
    max-width: none;
    width: 100%;
  }

  .desk-acct-settings .desk-lk-bar--balance {
    flex-wrap: wrap;
  }

  .desk-acct-settings .desk-lk-bar__actions {
    width: auto;
    max-width: 100%;
  }

  .desk-acct-settings .desk-lk-bar__actions .desk-field__btn {
    flex: 0 0 auto;
    width: auto;
  }
}

/* Mobile: keep save / action buttons compact (not full-bleed) */
@media (max-width: 960px) {
  .desk-wd__actions,
  .desk-wallets__actions,
  .staff-actions,
  .desk-promo-form__actions,
  .desk-ns-modal__actions,
  .desk-domain-meta__actions,
  .desk-legal__actions,
  .desk-pixel-code-modal__actions,
  .desk-settings-modal .desk-wd__actions,
  .desk-acct-settings__panel-body .desk-wd__actions,
  .desk-acct-settings__panel-body .desk-wallets__actions,
  .desk-work-top__actions,
  .desk-field-row {
    width: auto !important;
    max-width: 100%;
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .desk-support-settings__actions,
  .desk-support-settings__actions--bar {
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .desk-wd__actions .desk-field__btn,
  .desk-wd__actions a.desk-field__btn,
  .desk-wallets__actions .desk-field__btn,
  .desk-wallets__actions a.desk-field__btn,
  .staff-actions .staff-btn,
  .staff-actions a.staff-btn,
  .desk-promo-form__actions .staff-btn,
  .desk-promo-form__actions .desk-field__btn,
  .desk-ns-modal__actions .desk-field__btn,
  .desk-ns-modal__actions .staff-btn,
  .desk-domain-meta__actions .desk-field__btn,
  .desk-legal__actions .desk-field__btn,
  .desk-support-settings__actions .desk-field__btn,
  .desk-support-settings__actions .staff-btn,
  .desk-support-settings__save,
  .desk-pixel-code-modal__actions .desk-field__btn,
  .desk-pixel-code-modal__actions .staff-btn,
  .desk-settings-modal .desk-wd__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wd__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wallets__actions .desk-field__btn,
  .desk-acct-settings__panel-body .desk-wd__actions a.desk-field__btn,
  .desk-section:has(> .desk-dl) > .desk-wd__actions .desk-field__btn,
  .desk-work-top__actions .staff-btn,
  .desk-work-top__actions a.staff-btn,
  .desk-work-top__actions .desk-field__btn,
  .desk-field-row .desk-field__btn,
  .desk-field-row a.desk-field__btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 12.5px;
    border-radius: 8px;
  }
}

/* === Desk light theme === */
html.desk-html[data-desk-theme="light"] {
  color-scheme: light;
  --bg: #F4F6F8;
  --nav-bg: #FFFFFF;
  --bg-soft: #EEF1F5;
  --bg-ink: #E8ECF1;
  --field: #FFFFFF;
  --field-hover: rgba(15, 23, 42, 0.035);
  --field-border: rgba(15, 23, 42, 0.12);
  --field-border-hover: rgba(15, 23, 42, 0.2);
  --field-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --text: #0F172A;
  --muted: #64748B;
  --faint: #94A3B8;
  --accent: #2c2c2c;
  --accent-soft: rgba(15, 23, 42, 0.06);
  --ok: #159a4c;
  --bad: #dc3b3b;
  --warn: #c88400;
  --panel: #FFFFFF;
  --panel-raised: #FFFFFF;
  --desk-card-bg: #FFFFFF;
  --desk-card-border: rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"],
html.desk-html[data-desk-theme="light"] body.desk {
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.desk-html[data-desk-theme="light"] body.desk {
  background: var(--bg);
}

html.desk-html[data-desk-theme="light"] .desk-nav,
html.desk-html[data-desk-theme="light"] .desk-body,
html.desk-html[data-desk-theme="light"] .desk-main,
html.desk-html[data-desk-theme="light"] .desk-topbar {
  background: var(--bg);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-nav {
  background: var(--nav-bg);
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
}

html.desk-html[data-desk-theme="light"] .desk-nav__a {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-nav__a:hover,
html.desk-html[data-desk-theme="light"] .desk-nav__a.is-active {
  color: var(--text);
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-nav__a.is-active {
  background: rgba(60, 155, 244, 0.12);
  color: #0b4f86;
}

html.desk-html[data-desk-theme="light"] .desk-nav__foot,
html.desk-html[data-desk-theme="light"] .desk-nav__meta,
html.desk-html[data-desk-theme="light"] .desk-nav__sub {
  color: var(--muted);
  border-color: var(--line);
}

html.desk-html[data-desk-theme="light"] .desk-account__btn:hover,
html.desk-html[data-desk-theme="light"] .desk-account.is-open .desk-account__btn {
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-account__pop {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

html.desk-html[data-desk-theme="light"] .desk-account__item {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-account__item:hover,
html.desk-html[data-desk-theme="light"] .desk-account__item:focus-visible {
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-account__langs,
html.desk-html[data-desk-theme="light"] .desk-account__themes {
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-account__lang,
html.desk-html[data-desk-theme="light"] .desk-account__theme {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-account__lang:hover,
html.desk-html[data-desk-theme="light"] .desk-account__theme:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-account__lang.is-active,
html.desk-html[data-desk-theme="light"] .desk-account__theme.is-active {
  color: #0a0b0c;
  background: #3c9bf4;
}

html.desk-html[data-desk-theme="light"] .desk-account__avatar {
  background: #E8EEF5;
  color: #334155;
}

html.desk-html[data-desk-theme="light"] .desk-account__initials {
  color: #475569;
}

html.desk-html[data-desk-theme="light"] .desk-work-top__title,
html.desk-html[data-desk-theme="light"] .desk-work-top__eye,
html.desk-html[data-desk-theme="light"] .staff-h1,
html.desk-html[data-desk-theme="light"] .desk-panel__title {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-nav__title--textonly .desk-nav__title-text strong,
html.desk-html[data-desk-theme="light"] .desk-nav__title--textonly:hover .desk-nav__title-text strong,
html.desk-html[data-desk-theme="light"] .desk-topbar__brand--textonly .desk-topbar__brand-text strong {
  background: linear-gradient(180deg, #0F172A 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

html.desk-html[data-desk-theme="light"] .desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-field__input--area,
html.desk-html[data-desk-theme="light"] select.desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-filter__date,
html.desk-html[data-desk-theme="light"] .desk-filter__select,
html.desk-html[data-desk-theme="light"] .desk-filter__country,
html.desk-html[data-desk-theme="light"] .desk-filter__q,
html.desk-html[data-desk-theme="light"] select.desk-filter__select,
html.desk-html[data-desk-theme="light"] .desk-wallet__addr {
  background: var(--field);
  border-color: var(--field-border);
  color: var(--text);
  box-shadow: var(--field-shadow);
}

/* Use background-color so ::after chevron is never wiped by shorthand */
html.desk-html[data-desk-theme="light"] .desk-dd__btn {
  --desk-dd-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-color: var(--field);
  background-image: none;
  border-color: var(--field-border);
  color: var(--text);
  box-shadow: var(--field-shadow);
}

html.desk-html[data-desk-theme="light"] .desk-field__input:hover,
html.desk-html[data-desk-theme="light"] .desk-field__input--area:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__date:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__select:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__country:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__q:hover {
  background: var(--field-hover);
  border-color: var(--field-border-hover);
}

html.desk-html[data-desk-theme="light"] .desk-dd__btn:hover {
  background-color: var(--field-hover);
  background-image: none;
  border-color: var(--field-border-hover);
}

html.desk-html[data-desk-theme="light"] .desk-dd__menu,
html.desk-html[data-desk-theme="light"] .desk-acct-settings__jump .desk-dd__menu {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
}

html.desk-html[data-desk-theme="light"] .desk-dd__opt {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-dd__opt:hover {
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-dd__opt.is-selected {
  background: rgba(60, 155, 244, 0.12);
  color: #0b4f86;
}

html.desk-html[data-desk-theme="light"] .desk-panel,
html.desk-html[data-desk-theme="light"] .desk-filter,
html.desk-html[data-desk-theme="light"] .desk-settings-card,
html.desk-html[data-desk-theme="light"] .desk-section,
html.desk-html[data-desk-theme="light"] .desk-acct-settings__panel,
html.desk-html[data-desk-theme="light"] .desk-table-scroll,
html.desk-html[data-desk-theme="light"] .staff-table,
html.desk-html[data-desk-theme="light"] .desk-donut__tip {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-panel,
html.desk-html[data-desk-theme="light"] .desk-filter,
html.desk-html[data-desk-theme="light"] .desk-settings-card,
html.desk-html[data-desk-theme="light"] .desk-acct-settings__nav-btn,
html.desk-html[data-desk-theme="light"] .desk-section[data-desk-settings-hub] .desk-settings-card,
html.desk-html[data-desk-theme="light"] .desk-work-top,
html.desk-html[data-desk-theme="light"] .desk-domain-meta,
html.desk-html[data-desk-theme="light"] .desk-filter__rail,
html.desk-html[data-desk-theme="light"] .desk-support__pane,
html.desk-html[data-desk-theme="light"] .desk-support__thread,
html.desk-html[data-desk-theme="light"] .desk-support--desk .desk-support--thread {
  background: var(--panel);
  border-color: var(--desk-card-border);
}

html.desk-html[data-desk-theme="light"] .desk-acct-settings__nav-btn.is-active {
  background: rgba(60, 155, 244, 0.12);
  color: #0b4f86;
}

html.desk-html[data-desk-theme="light"] .staff-table th,
html.desk-html[data-desk-theme="light"] .staff-table td {
  border-color: var(--line);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .staff-table thead th {
  background: var(--bg-soft);
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .staff-table tbody tr:hover td {
  background: rgba(15, 23, 42, 0.035);
}

/* Light list panels: white surface (tables + activity logs) */
html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-table-scroll),
html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-section__toolbar + .desk-table-scroll),
html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-section__label + .desk-table-scroll),
html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-section__title-row + .desk-table-scroll),
html.desk-html[data-desk-theme="light"] .desk-section--logs,
html.desk-html[data-desk-theme="light"] .desk-logs,
html.desk-html[data-desk-theme="light"] .desk-logs--platform {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 14px 16px 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .desk-section--logs .desk-logs,
html.desk-html[data-desk-theme="light"] .desk-section--logs .desk-logs--platform {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-table-scroll) > .desk-table-scroll,
html.desk-html[data-desk-theme="light"] .desk-table-scroll:has(.staff-table),
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table tbody {
  background: transparent;
  box-shadow: none;
}

/* Desktop rows: no per-cell white slabs */
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr:hover,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody td,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr:hover td,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr.desk-row-link:hover td {
  background: transparent;
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr:hover td,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr.desk-row-link:hover td {
  background: rgba(15, 23, 42, 0.035);
}

/* Phone cards: no outer slab, white per-row cards */
@media (max-width: 960px) {
  html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-table-scroll),
  html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-section__toolbar + .desk-table-scroll),
  html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-section__label + .desk-table-scroll),
  html.desk-html[data-desk-theme="light"] .desk-section:has(> .desk-section__title-row + .desk-table-scroll),
  html.desk-html[data-desk-theme="light"] .desk-section:has(.staff-table.is-cardable),
  html.desk-html[data-desk-theme="light"] .desk-section:has(.staff-table.is-cardable) > .desk-table-scroll {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr:hover {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody td,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr:hover td,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr.desk-row-link:hover td {
    background: transparent !important;
  }
}

html.desk-html[data-desk-theme="light"] .desk-muted,
html.desk-html[data-desk-theme="light"] .desk-faint,
html.desk-html[data-desk-theme="light"] .staff-lede {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-pill--soft {
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-presence {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: #64748b;
}

html.desk-html[data-desk-theme="light"] .desk-presence.is-online {
  color: #1f7a48;
  border-color: rgba(21, 154, 76, 0.28);
  background: rgba(21, 154, 76, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-presence.is-offline {
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.045);
}

html.desk-html[data-desk-theme="light"] .desk-field__btn,
html.desk-html[data-desk-theme="light"] .staff-btn {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-field__btn--ghost,
html.desk-html[data-desk-theme="light"] .desk-mini-btn,
html.desk-html[data-desk-theme="light"] .desk-filter__more {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-color: rgba(15, 23, 42, 0.16);
  color: #0F172A;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .desk-field__btn--ghost:hover,
html.desk-html[data-desk-theme="light"] .desk-mini-btn:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__more:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__more[aria-expanded='true'] {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.24);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-filter__reset {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #64748B;
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-filter__reset:hover {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.22);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-wd-rules__mode,
html.desk-html[data-desk-theme="light"] .desk-wd-rules__mode--wrap {
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--line);
}

html.desk-html[data-desk-theme="light"] .desk-wd-rules__mode button {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-wd-rules__mode button.is-on {
  background: #3c9bf4;
  color: #fff;
}

html.desk-html[data-desk-theme="light"] .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel,
html.desk-html[data-desk-theme="light"] .desk-donut__tip,
html.desk-html[data-desk-theme="light"] .staff-broadcast__emoji-panel {
  background: #FFFFFF;
  border-color: var(--desk-card-border);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-promo-modal__scrim,
html.desk-html[data-desk-theme="light"] .desk-scrim {
  background: rgba(15, 23, 42, 0.35);
}

html.desk-html[data-desk-theme="light"] .desk-dl dt,
html.desk-html[data-desk-theme="light"] .desk-field__label {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-dl dd {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-nav__mark-plate {
  fill: #E8EEF5;
  stroke: rgba(15, 23, 42, 0.12);
}

html.desk-html[data-desk-theme="light"] .desk-tx {
  background: #F1F5F9;
  border-color: var(--line-strong);
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] a.desk-tx:hover {
  background: #E8EEF5;
  border-color: rgba(15, 23, 42, 0.2);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-wallet.is-locked .desk-wallet__addr[readonly] {
  background: #F1F5F9;
  color: var(--muted);
  border-color: var(--line);
}

html.desk-html[data-desk-theme="light"] .desk-wallet.is-editing .desk-wallet__addr,
html.desk-html[data-desk-theme="light"] .desk-wallet:not(.is-locked) .desk-wallet__addr:hover,
html.desk-html[data-desk-theme="light"] .desk-wallet.is-editing .desk-wallet__addr:hover,
html.desk-html[data-desk-theme="light"] .desk-wallet:not(.is-locked) .desk-wallet__addr:focus,
html.desk-html[data-desk-theme="light"] .desk-wallet.is-editing .desk-wallet__addr:focus {
  background: #FFFFFF;
  border-color: rgba(60, 155, 244, 0.45);
}

html.desk-html[data-desk-theme="light"] .desk-trade__sides {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-trade__side {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-support__chat-head {
  background: rgba(15, 23, 42, 0.02);
  border-bottom-color: var(--line);
}

html.desk-html[data-desk-theme="light"] .desk-support__avatar,
html.desk-html[data-desk-theme="light"] img.desk-support__avatar,
html.desk-html[data-desk-theme="light"] .desk-support-settings__preview-wrap {
  background: #E8EEF5;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-support__img {
  background: #EEF1F5;
  border-color: var(--line-strong);
}

html.desk-html[data-desk-theme="light"] .staff-broadcast__preview {
  background: var(--bg-soft);
}

html.desk-html[data-desk-theme="light"] .staff-broadcast__preview img {
  background: #E8EEF5;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result {
  background: rgba(15, 23, 42, 0.45);
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__card {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__title {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__msg {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__list {
  border-top-color: rgba(15, 23, 42, 0.1);
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__row dt {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__row dd {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__row--accent dd {
  color: #dc2626;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__btn {
  background: #3c9bf4;
  color: #FFFFFF;
}

html.desk-html[data-desk-theme="light"] .bw-wd-result__btn:hover {
  background: #2d8ae0;
  color: #FFFFFF;
}

html.desk-html[data-desk-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
}

html.desk-html[data-desk-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.34);
}

html.desk-html[data-desk-theme="light"] .desk-dd__menu,
html.desk-html[data-desk-theme="light"] .desk-dd__menu--scroll,
html.desk-html[data-desk-theme="light"] .desk-plist__list,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] .desk-support-settings__domains,
html.desk-html[data-desk-theme="light"] .desk-support__list,
html.desk-html[data-desk-theme="light"] .desk-support__stream {
  --desk-scroll-thumb: rgba(15, 23, 42, 0.32);
  --desk-scroll-thumb-hover: rgba(15, 23, 42, 0.46);
  --desk-scroll-track: rgba(15, 23, 42, 0.06);
  scrollbar-color: rgba(15, 23, 42, 0.32) rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-dd__menu::-webkit-scrollbar-thumb,
html.desk-html[data-desk-theme="light"] .desk-dd__menu--scroll::-webkit-scrollbar-thumb,
html.desk-html[data-desk-theme="light"] .desk-plist__list::-webkit-scrollbar-thumb,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__panel::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.32);
  border: 2px solid transparent;
  background-clip: padding-box;
}

html.desk-html[data-desk-theme="light"] .desk-dd__menu::-webkit-scrollbar-thumb:hover,
html.desk-html[data-desk-theme="light"] .desk-dd__menu--scroll::-webkit-scrollbar-thumb:hover,
html.desk-html[data-desk-theme="light"] .desk-plist__list::-webkit-scrollbar-thumb:hover,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__panel::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.46);
  border: 2px solid transparent;
  background-clip: padding-box;
}

html.desk-html[data-desk-theme="light"] .desk-dd__menu::-webkit-scrollbar-track,
html.desk-html[data-desk-theme="light"] .desk-dd__menu--scroll::-webkit-scrollbar-track,
html.desk-html[data-desk-theme="light"] .desk-plist__list::-webkit-scrollbar-track,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__panel::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-nav,
html.desk-html[data-desk-theme="light"] .desk-main,
html.desk-html[data-desk-theme="light"] .desk-support__list {
  scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

html.desk-html[data-desk-theme="light"] .desk-work-top {
  background: transparent;
  border-color: transparent;
}

html.desk-html[data-desk-theme="light"] .desk-balance__label,
html.desk-html[data-desk-theme="light"] .desk-metric__label {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-balance__value,
html.desk-html[data-desk-theme="light"] .desk-metric__value {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-support__msg--user .desk-support__bubble {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.08);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-support__who,
html.desk-html[data-desk-theme="light"] .desk-support__msg-time,
html.desk-html[data-desk-theme="light"] .desk-support__edit {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-support__composer,
html.desk-html[data-desk-theme="light"] .desk-support__compose,
html.desk-html[data-desk-theme="light"] .desk-support__input {
  background: #FFFFFF;
  border-color: var(--field-border);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

html.desk-html[data-desk-theme="light"] input:-webkit-autofill,
html.desk-html[data-desk-theme="light"] textarea:-webkit-autofill,
html.desk-html[data-desk-theme="light"] select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A;
}

/* === Light polish: tables / logs === */
html.desk-html[data-desk-theme="light"] .staff-table {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .staff-table th,
html.desk-html[data-desk-theme="light"] .staff-table td,
html.desk-html[data-desk-theme="light"] .desk-section .desk-table-scroll .staff-table thead th,
html.desk-html[data-desk-theme="light"] .desk-section .desk-table-scroll .staff-table tbody td {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .staff-table th,
html.desk-html[data-desk-theme="light"] .desk-section .desk-table-scroll .staff-table thead th {
  color: var(--muted);
  background: transparent;
}

html.desk-html[data-desk-theme="light"] .staff-table .desk-muted,
html.desk-html[data-desk-theme="light"] .staff-table .desk-faint,
html.desk-html[data-desk-theme="light"] .staff-table tbody tr.desk-row-link:hover .desk-muted {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .staff-table tbody tr:hover td,
html.desk-html[data-desk-theme="light"] .staff-table tbody tr.desk-row-link:hover td {
  background: rgba(15, 23, 42, 0.035);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr:hover td,
html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody tr.desk-row-link:hover td {
  background: transparent !important;
}

html.desk-html[data-desk-theme="light"] .staff-form label {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-copy {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-copy:hover {
  color: #0b4f86;
}

/* === Light polish: support inbox === */
html.desk-html[data-desk-theme="light"] .desk-support__item {
  border-bottom-color: var(--line);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-support__item:hover {
  background: rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .desk-support__item.is-active {
  background: rgba(60, 155, 244, 0.08);
  box-shadow: inset 2px 0 0 #3c9bf4;
}

html.desk-html[data-desk-theme="light"] .desk-support__item-email {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-support__item.is-unread .desk-support__item-email,
html.desk-html[data-desk-theme="light"] .desk-support__item.is-unread .desk-support__item-time {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-support__item-time,
html.desk-html[data-desk-theme="light"] .desk-support__item-preview {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-support__search-input {
  background: #FFFFFF;
  border-color: var(--field-border);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-support__search-input:hover,
html.desk-html[data-desk-theme="light"] .desk-support__search-input:focus {
  background: #FFFFFF;
  border-color: var(--field-border-hover);
}

html.desk-html[data-desk-theme="light"] .desk-support__search-input::placeholder {
  color: var(--faint);
}

html.desk-html[data-desk-theme="light"] .desk-support__icon-btn {
  background: #FFFFFF;
  border-color: var(--field-border);
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-support__icon-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--field-border-hover);
}

html.desk-html[data-desk-theme="light"] .desk-support__empty-title {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-support__empty-ico {
  color: var(--muted);
  opacity: 0.7;
}

html.desk-html[data-desk-theme="light"] .desk-support__filter {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-support__filter:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-support__filter.is-active,
html.desk-html[data-desk-theme="light"] .desk-support__filter.is-active:hover {
  color: #0b4f86;
  background: rgba(60, 155, 244, 0.12);
}

html.desk-html[data-desk-theme="light"] .desk-support__head,
html.desk-html[data-desk-theme="light"] .desk-support__rail-head {
  border-bottom-color: var(--line);
}

/* === Light polish: domain DNS meta === */
html.desk-html[data-desk-theme="light"] .desk-domain-meta__tile {
  border-color: var(--line);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .desk-domain-meta__k {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-domain-meta__v .desk-copy,
html.desk-html[data-desk-theme="light"] .desk-domain-meta__v .desk-muted {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-domain-meta__foot {
  border-top-color: var(--line);
}

/* === Light polish: logo / pixels / site tabs / mode pills === */
html.desk-html[data-desk-theme="light"] .desk-logo-icon__preview-wrap {
  background: #FFFFFF;
  border-color: var(--field-border);
}

html.desk-html[data-desk-theme="light"] .desk-logo-icon__preview-wrap--empty {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.16);
  border-style: dashed;
}

html.desk-html[data-desk-theme="light"] .desk-logo-icon__preview-wrap:hover,
html.desk-html[data-desk-theme="light"] .desk-logo-icon__preview-wrap:focus-visible {
  border-color: #3c9bf4;
  background: #E8F2FC;
}

html.desk-html[data-desk-theme="light"] .desk-logo-icon__plus {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-logo-icon__preview-wrap:hover .desk-logo-icon__plus,
html.desk-html[data-desk-theme="light"] .desk-logo-icon__preview-wrap:focus-visible .desk-logo-icon__plus {
  color: #0b4f86;
}

html.desk-html[data-desk-theme="light"] .desk-pixel-tile {
  border-color: rgba(15, 23, 42, 0.12);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .desk-pixel-tile.is-set {
  border-color: rgba(21, 154, 76, 0.35);
  background: rgba(21, 154, 76, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-pixel-tile__name {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-pixel-tile__plus {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.14);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-pixel-tile__plus:hover {
  background: #3c9bf4;
  border-color: #3c9bf4;
  color: #FFFFFF;
}

html.desk-html[data-desk-theme="light"] .desk-pixel-tile.is-set .desk-pixel-tile__plus {
  background: rgba(21, 154, 76, 0.12);
  border-color: rgba(21, 154, 76, 0.35);
  color: #159a4c;
}

html.desk-html[data-desk-theme="light"] .desk-settings-site__tabs {
  border-color: var(--line);
  background: var(--bg-soft);
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-settings-site__tab {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-settings-site__tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-settings-site__tab.is-active,
html.desk-html[data-desk-theme="light"] .desk-settings-site__tab.is-active:hover {
  color: #0a0b0c;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-acct-settings .desk-settings-site__tabs {
  border-bottom-color: var(--line);
  background: transparent;
}

html.desk-html[data-desk-theme="light"] .desk-acct-settings .desk-settings-site__tab {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-acct-settings .desk-settings-site__tab:hover {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-acct-settings .desk-settings-site__tab.is-active,
html.desk-html[data-desk-theme="light"] .desk-acct-settings .desk-settings-site__tab.is-active:hover {
  color: var(--text);
  border-bottom-color: #3c9bf4;
}

html.desk-html[data-desk-theme="light"] .desk-promo-type,
html.desk-html[data-desk-theme="light"] .desk-legal__modes,
html.desk-html[data-desk-theme="light"] .desk-footer-form__modes,
html.desk-html[data-desk-theme="light"] .desk-wd__modes {
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--line);
}

html.desk-html[data-desk-theme="light"] .desk-promo-type__opt span,
html.desk-html[data-desk-theme="light"] .desk-wd__mode {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-promo-type__opt:hover span,
html.desk-html[data-desk-theme="light"] .desk-wd__mode:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-promo-type__opt input:checked + span,
html.desk-html[data-desk-theme="light"] .desk-promo-type__opt:has(input:checked):hover span,
html.desk-html[data-desk-theme="light"] .desk-promo-type__opt input:checked + span:hover,
html.desk-html[data-desk-theme="light"] .desk-wd__mode.is-on,
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input:checked) {
  color: #FFFFFF;
  background: #3c9bf4;
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-wd__mode.is-on:has(input[value='default']),
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='default']:checked),
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='default']:checked):hover {
  color: #0F172A;
  background: #CBD5E1;
}

html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='force_error']) {
  color: #dc2626;
}

html.desk-html[data-desk-theme="light"] .desk-wd__mode.is-on:has(input[value='force_error']),
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='force_error']:checked),
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='force_error']:checked):hover {
  color: #FFFFFF;
  background: #ef4444;
}

html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='force_success']) {
  color: #15803d;
}

html.desk-html[data-desk-theme="light"] .desk-wd__mode.is-on:has(input[value='force_success']),
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='force_success']:checked),
html.desk-html[data-desk-theme="light"] .desk-wd__mode:has(input[value='force_success']:checked):hover {
  color: #FFFFFF;
  background: #16a34a;
}

html.desk-html[data-desk-theme="light"] .desk-wd__hint,
html.desk-html[data-desk-theme="light"] .desk-muted.desk-wd__hint,
html.desk-html[data-desk-theme="light"] p.desk-wd__hint {
  color: #c88400;
  -webkit-text-fill-color: #c88400;
}

html.desk-html[data-desk-theme="light"] .desk-wd__hint::before {
  background-color: #c88400;
}

html.desk-html[data-desk-theme="light"] .desk-status {
  border: 0;
  background: rgba(15, 23, 42, 0.05);
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-status--ok {
  color: #15803d;
  background: rgba(21, 128, 61, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-status--bad {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-status--wait {
  color: #a16207;
  background: rgba(161, 98, 7, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-dns-ssl {
  border: 0;
  color: #15803d;
  background: rgba(21, 128, 61, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-dns-ssl--wait {
  border: 0;
  color: #64748B;
  background: rgba(15, 23, 42, 0.05);
}

html.desk-html[data-desk-theme="light"] .desk-log__ok,
html.desk-html[data-desk-theme="light"] .desk-log__ok.desk-status,
html.desk-html[data-desk-theme="light"] .desk-log__ok.desk-status--ok {
  border: 0;
  padding: 0;
  background: transparent;
  color: #15803d;
}

/* === Light polish: buttons === */
html.desk-html[data-desk-theme="light"] .staff-btn,
html.desk-html[data-desk-theme="light"] a.staff-btn,
html.desk-html[data-desk-theme="light"] .desk-field__btn,
html.desk-html[data-desk-theme="light"] a.desk-field__btn,
html.desk-html[data-desk-theme="light"] .desk-mini-btn,
html.desk-html[data-desk-theme="light"] a.desk-mini-btn {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.14);
  color: #0F172A;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .staff-btn:hover,
html.desk-html[data-desk-theme="light"] a.staff-btn:hover,
html.desk-html[data-desk-theme="light"] .desk-field__btn:hover,
html.desk-html[data-desk-theme="light"] a.desk-field__btn:hover,
html.desk-html[data-desk-theme="light"] .desk-mini-btn:hover,
html.desk-html[data-desk-theme="light"] a.desk-mini-btn:hover {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.22);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .staff-btn--ghost,
html.desk-html[data-desk-theme="light"] .desk-field__btn--ghost {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.14);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .staff-btn--ghost:hover,
html.desk-html[data-desk-theme="light"] .desk-field__btn--ghost:hover {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.22);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-wd-eswitch--off .desk-wd-eswitch__track,
html.desk-html[data-desk-theme="light"] .desk-wd-eswitch--off.is-off .desk-wd-eswitch__track {
  background: #94A3B8;
}

html.desk-html[data-desk-theme="light"] .desk-wd-eswitch--off .desk-wd-eswitch__label,
html.desk-html[data-desk-theme="light"] .desk-wd-eswitch--off.is-off .desk-wd-eswitch__label {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-wd-eswitch--off.is-on .desk-wd-eswitch__track {
  background: #16a34a;
}

html.desk-html[data-desk-theme="light"] .desk-wd-eswitch--off.is-on .desk-wd-eswitch__label {
  color: #15803d;
}

html.desk-html[data-desk-theme="light"] .desk-field__btn--danger,
html.desk-html[data-desk-theme="light"] .desk-mini-btn--danger {
  background: rgba(220, 59, 59, 0.08);
  border-color: rgba(220, 59, 59, 0.35);
  color: #b91c1c;
}

html.desk-html[data-desk-theme="light"] .desk-field__btn--danger:hover,
html.desk-html[data-desk-theme="light"] .desk-mini-btn--danger:hover {
  background: rgba(220, 59, 59, 0.14);
  border-color: rgba(220, 59, 59, 0.5);
  color: #991b1b;
}

html.desk-html[data-desk-theme="light"] .desk-filter__go,
html.desk-html[data-desk-theme="light"] .staff-btn--primary {
  background: #3c9bf4;
  border-color: #3c9bf4;
  color: #FFFFFF;
}

html.desk-html[data-desk-theme="light"] .desk-filter__go:hover,
html.desk-html[data-desk-theme="light"] .staff-btn--primary:hover {
  background: #2d8ae0;
  border-color: #2d8ae0;
  color: #FFFFFF;
}

/* === Light polish: modals (beat body.desk !important) === */
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal--wide .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-ns-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-support-settings-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal[data-desk-promo-modal] .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk [class*='desk-'][class*='-modal'] .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18) !important;
  color: var(--text) !important;
}

html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-promo-modal__head,
html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal .desk-promo-modal__head,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__head,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__head {
  background: transparent !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

html.desk-html[data-desk-theme="light"] .desk-promo-modal__head h2,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-promo-modal__head h2,
html.desk-html[data-desk-theme="light"] .desk-ns-modal .desk-promo-modal__head h2,
html.desk-html[data-desk-theme="light"] .desk-support-settings-modal .desk-promo-modal__head h2,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__head h2 {
  color: var(--text) !important;
}

html.desk-html[data-desk-theme="light"] .desk-promo-modal__x,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-promo-modal__x,
html.desk-html[data-desk-theme="light"] .desk-support-settings-modal .desk-promo-modal__x {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-promo-modal__x:hover,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-promo-modal__x:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal__scrim,
html.desk-html[data-desk-theme="light"] .desk-promo-modal__scrim,
html.desk-html[data-desk-theme="light"] .desk-scrim {
  background: rgba(15, 23, 42, 0.35) !important;
}

html.desk-html[data-desk-theme="light"] .desk-ns-modal__host,
html.desk-html[data-desk-theme="light"] .desk-ns-modal__row,
html.desk-html[data-desk-theme="light"] .desk-ns-modal__guide,
html.desk-html[data-desk-theme="light"] .desk-ns-modal__note {
  color: var(--text);
  border-color: var(--line);
}

html.desk-html[data-desk-theme="light"] .desk-ns-modal__host-label,
html.desk-html[data-desk-theme="light"] .desk-ns-modal__label,
html.desk-html[data-desk-theme="light"] .desk-ns-modal__guide-title,
html.desk-html[data-desk-theme="light"] .desk-settings-modal__hint,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-field__label {
  color: var(--muted);
}

html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-field__input--area,
html.desk-html[data-desk-theme="light"] .desk-ns-modal .desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-field__input {
  background: #FFFFFF;
  border-color: var(--field-border);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-wallets,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-wd--card,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-lk-tools--modal .desk-lk-card {
  background: #FFFFFF;
  border-color: var(--desk-card-border);
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-lk-tools--modal .desk-lk-card__title,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-lk-tools--modal .desk-trade__market-name,
html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-lk-tools--modal .desk-trade__avail {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-lk-tools--modal .desk-trade__sides {
  background: #EEF1F5;
  border-color: rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-settings-modal .desk-lk-tools--modal .desk-trade__side {
  color: var(--text);
}

html.desk-html[data-desk-theme="light"] .desk-section__label,
html.desk-html[data-desk-theme="light"] .desk-section__toolbar .desk-section__label,
html.desk-html[data-desk-theme="light"] .desk-section__title-row .desk-section__label,
html.desk-html[data-desk-theme="light"] .desk-settings-hub__bar .desk-section__label,
html.desk-html[data-desk-theme="light"] .desk-wd__notify .desk-section__label {
  color: #334155;
  border-bottom-color: var(--line);
}

/* === Light polish: activity logs (not staff-table) === */
html.desk-html[data-desk-theme="light"] .desk-logs__head {
  color: #475569;
  border-bottom-color: var(--line-strong);
}

html.desk-html[data-desk-theme="light"] .desk-log__time {
  color: #475569;
}

html.desk-html[data-desk-theme="light"] .desk-log__summary,
html.desk-html[data-desk-theme="light"] .desk-log__summary-text,
html.desk-html[data-desk-theme="light"] .desk-log__worker {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-log__domain,
html.desk-html[data-desk-theme="light"] .desk-log__email,
html.desk-html[data-desk-theme="light"] a.desk-log__domain,
html.desk-html[data-desk-theme="light"] a.desk-log__email,
html.desk-html[data-desk-theme="light"] .desk-log .staff-mono,
html.desk-html[data-desk-theme="light"] .desk-logs .staff-mono {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] a.desk-log__domain:hover,
html.desk-html[data-desk-theme="light"] a.desk-log__email:hover {
  color: #0b4f86;
}

html.desk-html[data-desk-theme="light"] .desk-logs .desk-muted,
html.desk-html[data-desk-theme="light"] .desk-log .desk-muted {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-logs__empty {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .staff-mono {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-muted:not(.desk-wd__hint),
html.desk-html[data-desk-theme="light"] .desk-faint {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .crm-cc__code {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-pager__nav,
html.desk-html[data-desk-theme="light"] .desk-pager__num {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-pager__nav.is-disabled {
  color: #94A3B8;
}

html.desk-html[data-desk-theme="light"] .desk-pager__num.is-current {
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.22);
  background: #FFFFFF;
}

/* === Light contrast pass: modals + support === */

/* Modal fields must not be white-on-white */
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-field__label,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-promo-form__lab,
html.desk-html[data-desk-theme="light"] .desk-promo-modal[data-desk-promo-modal] .desk-promo-form__lab,
html.desk-html[data-desk-theme="light"] .desk-promo-modal[data-desk-promo-modal] .desk-promo-form .desk-field__label,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-field__label,
html.desk-html[data-desk-theme="light"] .desk-field__label,
html.desk-html[data-desk-theme="light"] .desk-field__hint {
  color: #64748B !important;
}

html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-field__input,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-field__input--area,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal textarea.desk-field__input,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal select.desk-field__input,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-promo-form__text-input,
html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal .desk-field__input,
html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal .desk-field__input--area,
html.desk-html[data-desk-theme="light"] body.desk .desk-ns-modal .desk-field__input,
html.desk-html[data-desk-theme="light"] body.desk .desk-wd-rule-modal__panel .desk-field__input,
html.desk-html[data-desk-theme="light"] body.desk .desk-wd-rule-modal__panel textarea.desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-field__input--area,
html.desk-html[data-desk-theme="light"] .desk-promo-modal textarea.desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-promo-modal select.desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-field__input,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel textarea.desk-field__input {
  background: #F1F5F9 !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  color: #0F172A !important;
  box-shadow: none !important;
}

html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-field__input:hover,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-field__input:focus,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal textarea.desk-field__input:hover,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal textarea.desk-field__input:focus,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-field__input:hover,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-field__input:focus,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-field__input:hover,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-field__input:focus {
  background: #FFFFFF !important;
  border-color: rgba(60, 155, 244, 0.55) !important;
}

html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-field__input::placeholder,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-field__input::placeholder {
  color: #94A3B8 !important;
}

html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-wd__modes,
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-promo-type,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-wd__modes,
html.desk-html[data-desk-theme="light"] .desk-promo-modal .desk-promo-type,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-wd-rules__mode,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel .desk-wd-rules__mode--wrap,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__cta .desk-wd-rules__mode {
  background: #E8EEF5 !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: none !important;
}

html.desk-html[data-desk-theme="light"] .desk-wd-rule-tier {
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-wd-rule-tier__title {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-wd-rule-tier__title em {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__err {
  color: #b91c1c;
  background: rgba(220, 59, 59, 0.08);
  border-color: rgba(220, 59, 59, 0.25);
}

/* Stronger modal chrome on phone / all sizes */
html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-ns-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk .desk-support-settings-modal .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] body.desk [class*='desk-'][class*='-modal'] .desk-promo-modal__panel,
html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22) !important;
}

@media (max-width: 960px) {
  html.desk-html[data-desk-theme="light"] body.desk .desk-promo-modal .desk-promo-modal__panel,
  html.desk-html[data-desk-theme="light"] body.desk .desk-settings-modal .desk-promo-modal__panel,
  html.desk-html[data-desk-theme="light"] body.desk [class*='desk-'][class*='-modal'] .desk-promo-modal__panel,
  html.desk-html[data-desk-theme="light"] .desk-wd-rule-modal__panel {
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28) !important;
  }
}

/* Support rail: separate surface from page */
html.desk-html[data-desk-theme="light"] .desk-support__rail {
  background: #FFFFFF;
  border-right: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
}

html.desk-html[data-desk-theme="light"] .desk-support__rail-head {
  background: #F8FAFC;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-support__filters,
html.desk-html[data-desk-theme="light"] .desk-support__filters--rail {
  background: #E8EEF5;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

html.desk-html[data-desk-theme="light"] .desk-support__filter {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-support__filter:hover {
  color: #0F172A;
  background: rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-support__filter.is-active,
html.desk-html[data-desk-theme="light"] .desk-support__filter.is-active:hover {
  color: #FFFFFF;
  background: #3c9bf4;
}

html.desk-html[data-desk-theme="light"] .desk-support__item {
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: #FFFFFF;
}

html.desk-html[data-desk-theme="light"] .desk-support__item:hover {
  background: #F1F5F9;
}

html.desk-html[data-desk-theme="light"] .desk-support__item.is-active {
  background: #E8F2FC;
  box-shadow: inset 3px 0 0 #3c9bf4;
}

html.desk-html[data-desk-theme="light"] .desk-support__item-email {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-support__item.is-unread .desk-support__item-email,
html.desk-html[data-desk-theme="light"] .desk-support__item.is-unread .desk-support__item-time {
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-support__item-time,
html.desk-html[data-desk-theme="light"] .desk-support__item-preview {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-support__search-input {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  color: #0F172A !important;
}

/* Chat thread: soft canvas so bubbles pop */
html.desk-html[data-desk-theme="light"] .desk-support__pane,
html.desk-html[data-desk-theme="light"] .desk-support__thread,
html.desk-html[data-desk-theme="light"] .desk-support--desk .desk-support--thread,
html.desk-html[data-desk-theme="light"] .desk-support--desk .desk-support__stream {
  background: #EEF2F6 !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__chat-head {
  background: #FFFFFF !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__msg--user .desk-support__bubble {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  color: #0F172A !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

html.desk-html[data-desk-theme="light"] .desk-support__msg--user .desk-support__body,
html.desk-html[data-desk-theme="light"] .desk-support__msg--user .desk-support__body * {
  color: #0F172A !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__msg--user .desk-support__body .desk-support__link {
  color: #0b4f86 !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__msg--agent .desk-support__bubble {
  background: #2dbe6c !important;
  color: #062010 !important;
  border: 0 !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__msg--agent .desk-support__body,
html.desk-html[data-desk-theme="light"] .desk-support__msg--agent .desk-support__body * {
  color: #062010 !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__compose,
html.desk-html[data-desk-theme="light"] .desk-support__compose--bar,
html.desk-html[data-desk-theme="light"] .desk-support--desk .desk-support__compose {
  background: #FFFFFF !important;
  border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
}

html.desk-html[data-desk-theme="light"] .desk-support__input,
html.desk-html[data-desk-theme="light"] .desk-support__composer textarea,
html.desk-html[data-desk-theme="light"] .desk-support__compose textarea {
  background: #F1F5F9 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #0F172A !important;
}

/* === Light: dashboard filter period + dropdown chips === */
html.desk-html[data-desk-theme="light"] .desk-filter.desk-panel,
html.desk-html[data-desk-theme="light"] .desk-dash .desk-filter.desk-panel {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.desk-html[data-desk-theme="light"] .desk-period,
html.desk-html[data-desk-theme="light"] .desk-dash .desk-period {
  background: #E8EEF5;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-period a {
  color: #64748B;
}

html.desk-html[data-desk-theme="light"] .desk-period a:hover {
  color: #0F172A;
  background: rgba(15, 23, 42, 0.06);
}

html.desk-html[data-desk-theme="light"] .desk-period a.is-active,
html.desk-html[data-desk-theme="light"] .desk-period a.is-active:hover {
  color: #FFFFFF;
  background: #3c9bf4;
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-filter__rail .desk-dd__btn,
html.desk-html[data-desk-theme="light"] .desk-filter .desk-dd__btn,
html.desk-html[data-desk-theme="light"] .desk-dash .desk-dd__btn {
  --desk-dd-chevron-right: 8px;
  height: 32px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background-color: #F8FAFC;
  background-image: none;
  color: #0F172A;
  box-shadow: none;
}

html.desk-html[data-desk-theme="light"] .desk-filter__rail .desk-dd__btn:hover,
html.desk-html[data-desk-theme="light"] .desk-filter .desk-dd__btn:hover,
html.desk-html[data-desk-theme="light"] .desk-dash .desk-dd__btn:hover,
html.desk-html[data-desk-theme="light"] .desk-filter__rail .desk-dd.is-open .desk-dd__btn,
html.desk-html[data-desk-theme="light"] .desk-filter .desk-dd.is-open .desk-dd__btn,
html.desk-html[data-desk-theme="light"] .desk-dash .desk-dd.is-open .desk-dd__btn {
  background-color: #FFFFFF;
  border-color: rgba(60, 155, 244, 0.55);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-filter__date {
  color-scheme: light;
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #0F172A;
}

html.desk-html[data-desk-theme="light"] .desk-filter__sep,
html.desk-html[data-desk-theme="light"] .desk-filter__dash {
  color: #94A3B8;
}

/* Domain settings: stats panel = full-width dash */
.desk-acct-settings--domain .desk-acct-settings__panel[data-desk-acct-panel='stats'] .desk-acct-settings__panel-body--wide {
  max-width: none;
  width: 100%;
  padding-right: 0;
}

.desk-acct-settings--domain .desk-dash--domain {
  display: grid;
  gap: 16px;
  margin: 0;
  width: 100%;
  max-width: none;
}

.desk-acct-settings--domain .desk-dash--domain .desk-filter.desk-panel {
  margin-bottom: 0;
}

.desk-dash--domain .desk-metrics--6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.desk-dash--domain .desk-row--domain-trend {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
}

.desk-dash--domain .desk-row--domain-donuts,
.desk-dash--domain .desk-row--domain-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  align-items: stretch;
}

.desk-dash--domain .desk-row--domain-trend > .desk-section,
.desk-dash--domain .desk-row--domain-donuts > .desk-section,
.desk-dash--domain .desk-row--domain-bars > .desk-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.desk-dash--domain .desk-row--domain-trend .desk-chart {
  flex: 1 1 auto;
  min-height: 240px;
  height: 260px;
}

.desk-dash--domain .desk-row--domain-donuts .desk-donut {
  flex: 1 1 auto;
  min-height: 200px;
}

.desk-dash--domain .desk-row--domain-bars .desk-chart--sm {
  flex: 1 1 auto;
  min-height: 180px;
  height: 200px;
}

@media (min-width: 1280px) {
  .desk-dash--domain .desk-metrics--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .desk-dash--domain .desk-row--domain-donuts,
  .desk-dash--domain .desk-row--domain-bars {
    grid-template-columns: 1fr;
  }

  .desk-dash--domain .desk-metrics--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* === Mobile + light: force readable text (no white-on-white / ghost labels) === */
@media (max-width: 960px) {
  html.desk-html[data-desk-theme="light"] .desk-topbar__menu,
  html.desk-html[data-desk-theme="light"] .desk-work-top__title,
  html.desk-html[data-desk-theme="light"] .desk-head__title,
  html.desk-html[data-desk-theme="light"] .desk-metric__value,
  html.desk-html[data-desk-theme="light"] .desk-balance__value,
  html.desk-html[data-desk-theme="light"] .desk-field__input,
  html.desk-html[data-desk-theme="light"] .desk-field__input--area,
  html.desk-html[data-desk-theme="light"] textarea.desk-field__input,
  html.desk-html[data-desk-theme="light"] select.desk-field__input,
  html.desk-html[data-desk-theme="light"] .desk-dd__btn,
  html.desk-html[data-desk-theme="light"] .desk-dd__btn--field,
  html.desk-html[data-desk-theme="light"] .desk-dd__value,
  html.desk-html[data-desk-theme="light"] .desk-dd__opt,
  html.desk-html[data-desk-theme="light"] .desk-acct-settings__jump .desk-dd__btn--field,
  html.desk-html[data-desk-theme="light"] .desk-acct-settings__jump .desk-dd__opt,
  html.desk-html[data-desk-theme="light"] .desk-acct-settings__panel,
  html.desk-html[data-desk-theme="light"] .desk-acct-settings__panel-title,
  html.desk-html[data-desk-theme="light"] .desk-acct-settings__panel-body,
  html.desk-html[data-desk-theme="light"] .desk-settings-card,
  html.desk-html[data-desk-theme="light"] .desk-wd-rules__name,
  html.desk-html[data-desk-theme="light"] .desk-geo-tier__meta strong,
  html.desk-html[data-desk-theme="light"] .desk-wd-rule-tier__title,
  html.desk-html[data-desk-theme="light"] .desk-support__item-email,
  html.desk-html[data-desk-theme="light"] .desk-support__search-input,
  html.desk-html[data-desk-theme="light"] .desk-log__worker,
  html.desk-html[data-desk-theme="light"] .desk-log__summary,
  html.desk-html[data-desk-theme="light"] a.desk-log__domain,
  html.desk-html[data-desk-theme="light"] a.desk-log__email,
  html.desk-html[data-desk-theme="light"] .staff-mono,
  html.desk-html[data-desk-theme="light"] .desk-copy {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text);
  }

  html.desk-html[data-desk-theme="light"] .desk-metric__label,
  html.desk-html[data-desk-theme="light"] .desk-metric__hint,
  html.desk-html[data-desk-theme="light"] .desk-balance__label,
  html.desk-html[data-desk-theme="light"] .desk-section__label,
  html.desk-html[data-desk-theme="light"] .desk-field__label,
  html.desk-html[data-desk-theme="light"] .desk-field__hint,
  html.desk-html[data-desk-theme="light"] .desk-muted:not(.desk-wd__hint),
  html.desk-html[data-desk-theme="light"] .desk-faint,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody td::before {
    color: var(--muted) !important;
    -webkit-text-fill-color: var(--muted);
  }

  html.desk-html[data-desk-theme="light"] .desk-wd__hint,
  html.desk-html[data-desk-theme="light"] .desk-muted.desk-wd__hint,
  html.desk-html[data-desk-theme="light"] p.desk-wd__hint {
    color: #c88400 !important;
    -webkit-text-fill-color: #c88400;
  }

  html.desk-html[data-desk-theme="light"] .desk-wd__hint::before {
    background-color: #c88400;
  }

  html.desk-html[data-desk-theme="light"] .desk-section .desk-table-scroll .staff-table.is-cardable tbody td,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable tbody td,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable .staff-mono,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable .desk-copy,
  html.desk-html[data-desk-theme="light"] .desk-table-scroll .staff-table.is-cardable a:not(.desk-tx):not(.desk-mini-btn):not(.desk-ban-btn) {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text);
  }

  html.desk-html[data-desk-theme="light"] .desk-topbar__menu-line {
    stroke: currentColor;
  }

  html.desk-html[data-desk-theme="dark"] body.desk,
  html.desk-html:not([data-desk-theme="light"]) body.desk {
    color: var(--text);
  }
}

/* ── Partner home (Главная) — same language as desk-dash ── */
.desk-home {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.desk-home .desk-metric {
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: 10px;
}

/* Beat flat-desk transparent metrics so home KPIs keep card surfaces (incl. light theme). */
.desk-home .desk-section:not(.desk-lk-tools):not([data-desk-settings-hub]):not(.desk-section--cards) .desk-metric {
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: 10px;
}

.desk-home > .desk-section {
  margin-bottom: 22px;
}

.desk-home-leaders-label {
  margin: 0 0 12px;
}

.desk-row--home-boards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.desk-row--home-boards > .desk-section {
  background: var(--desk-card-bg);
  border: 1px solid var(--desk-card-border);
  border-radius: 10px;
  padding: 14px 16px 10px;
  margin: 0;
  min-width: 0;
}

.desk-row--home-boards .desk-section__label {
  margin-bottom: 10px;
}

.desk-row--home-boards .desk-table-scroll {
  margin: 0 -4px;
}

.desk-home-row--self td {
  background: color-mix(in srgb, #3c9bf4 10%, transparent);
}

@media (max-width: 960px) {
  .desk-row--home-boards {
    grid-template-columns: 1fr;
  }
}

html.desk-html[data-desk-theme="light"] .desk-home-row--self td {
  background: color-mix(in srgb, #3c9bf4 8%, #fff);
}

.desk-settings-env__lede {
  margin: 0 0 14px;
  max-width: 72ch;
  font-size: 13px;
  line-height: 1.45;
}

.desk-settings-env__group {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.desk-settings-env__row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.desk-settings-env__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-family: var(--mono);
  color: var(--text);
}

.desk-settings-env__src {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.desk-settings-env__hint {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
}

.desk-settings-env__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.desk-settings-env__form input[type='text'],
.desk-settings-env__form input[type='password'],
.desk-settings-env__form select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .desk-settings-env__row {
    grid-template-columns: 1fr;
  }
}
