/**
 * VPM Design System — Reference-aligned dashboard shell & components
 * Matches vantagepromarket.com mobile app UX (header, drawer, bottom nav, pages)
 */

/* ─── Shell tokens ─── */
.vpm-shell,
.vpm-mobile-app {
  --vpm-ds-primary: #f97316;
  --vpm-ds-primary-hover: #ea580c;
  --vpm-ds-teal: #034854;
  --vpm-ds-teal-hover: #045f6d;
  --vpm-ds-bg: hsl(0 0% 4%);
  --vpm-ds-surface: hsl(0 0% 9%);
  --vpm-ds-surface-2: hsl(0 0% 12%);
  --vpm-ds-border: hsl(0 0% 20%);
  --vpm-ds-text: #fafafa;
  --vpm-ds-text-muted: hsl(0 0% 63%);
  --vpm-ds-destructive: #ef4444;
  --vpm-ds-accent: hsl(0 0% 15%);
  --vpm-ds-accent-fg: #fafafa;
  --vpm-ds-ring: hsl(0 0% 45%);
  --vpm-ds-header-h: 56px;
  --vpm-ds-nav-h: calc(56px + env(safe-area-inset-bottom, 0px));
  --vpm-ds-drawer-w: 300px;
  --vpm-ds-radius: 6px;
  --vpm-ds-radius-lg: 10px;
  --vpm-ds-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --vpm-ds-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.25);
}

[data-theme='light'] .vpm-shell,
[data-theme='light'] .vpm-mobile-app {
  --vpm-ds-bg: #ffffff;
  --vpm-ds-surface: #f4f4f5;
  --vpm-ds-surface-2: #e4e4e7;
  --vpm-ds-border: #e4e4e7;
  --vpm-ds-text: #09090b;
  --vpm-ds-text-muted: #52525b;
  --vpm-ds-accent: #f4f4f5;
  --vpm-ds-accent-fg: #09090b;
}

/* ─── App shell layout ─── */
.vpm-shell {
  display: flex;
  min-height: 100vh;
  max-width: 100vw;
  flex-direction: column;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  background: var(--vpm-ds-bg);
  color: var(--vpm-ds-text);
  font-family: var(--vpm-font-sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--vpm-ds-nav-h);
}

.vpm-shell--no-nav,
body.vpm-shell--no-nav .vpm-shell {
  padding-bottom: 0;
}

body.vpm-menu-drawer--open {
  overflow: hidden;
}

.vpm-shell__main {
  flex: 1;
  padding: 32px 24px;
}

@media (min-width: 768px) {
  .vpm-shell__main {
    padding: 32px 80px;
  }
}

.vpm-shell__main--terminal {
  margin-bottom: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--vpm-ds-header-h));
}

.vpm-shell__main.vpm-shell__main--cards {
  padding: 0;
  max-width: none;
  width: 100%;
  overflow-x: hidden;
  background: var(--vpm-cards-page-bg, var(--vpm-bg));
}

.vpm-shell--no-nav .vpm-shell__main {
  margin-bottom: 0;
}

.vpm-shell__main--trading-room {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--vpm-ds-header-h) - var(--vpm-ds-nav-h));
}

/* ─── Page layout primitives ─── */
.vpm-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-page-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.vpm-page-intro__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vpm-ds-text);
}

.vpm-page-intro__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted);
}

.vpm-page-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.vpm-btn--create-expert {
  width: 100%;
  max-width: 36rem;
  align-self: center;
}

.vpm-admin-expert-traders-page .vpm-page-intro {
  max-width: 36rem;
  align-self: center;
}

/* ─── Admin expert traders list ─── */
.vpm-admin-expert-traders {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-admin-expert-traders__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-admin-expert-traders__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: background-color 0.15s ease;
}

.vpm-admin-expert-traders__row:hover {
  background: var(--vpm-ds-accent);
}

.vpm-admin-expert-traders__lead {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vpm-admin-expert-traders__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}

.vpm-admin-expert-traders__date-month {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.vpm-admin-expert-traders__date-day {
  font-size: 24px;
  line-height: 1.1;
}

.vpm-admin-expert-traders__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  object-fit: cover;
}

.vpm-admin-expert-traders__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--vpm-ds-text-muted);
  background: var(--vpm-ds-accent);
}

.vpm-admin-expert-traders__meta {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 0;
}

.vpm-admin-expert-traders__stats {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}

.vpm-admin-expert-traders__stats p {
  margin: 0;
}

.vpm-admin-expert-traders__pending {
  margin: 0;
  align-self: flex-start;
}

/* ─── Admin deposits list ─── */
.vpm-admin-deposits {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-admin-deposits__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-admin-deposits__row {
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.vpm-admin-deposits__reference {
  font-size: 14px;
}

.vpm-admin-deposits__summary {
  margin-left: auto;
  text-align: right;
}

.vpm-admin-deposits__amount {
  margin: 0;
}

.vpm-admin-deposits__status {
  margin: 0;
}

.vpm-admin-deposits__status--pending {
  color: #eab308;
}

.vpm-admin-deposits__status--approved {
  color: #16a34a;
}

.vpm-admin-deposits__status--rejected {
  color: #dc2626;
}

.vpm-admin-deposits__status--in-progress {
  color: #2563eb;
}

.vpm-admin-deposits__status--failed {
  color: #dc2626;
}

.vpm-admin-deposits__status--reversed {
  color: #9333ea;
}

/* ─── Admin deposit / withdrawal confirm dialogs ─── */
.vpm-dialog--deposit-confirm,
.vpm-dialog--withdrawal-confirm {
  padding: 24px;
}

.vpm-dialog--deposit-confirm .vpm-dialog__panel,
.vpm-dialog--withdrawal-confirm .vpm-dialog__panel {
  gap: 16px;
}

.vpm-dialog--deposit-confirm .vpm-dialog__scroll,
.vpm-dialog--withdrawal-confirm .vpm-dialog__scroll {
  flex: 0 1 auto;
}

.vpm-dialog--deposit-confirm .vpm-dialog__content,
.vpm-dialog--withdrawal-confirm .vpm-dialog__content {
  gap: 16px;
  padding: 0;
}

.vpm-dialog--deposit-confirm .vpm-dialog__header--alert,
.vpm-dialog--withdrawal-confirm .vpm-dialog__header--alert {
  display: grid;
  gap: 8px;
  text-align: left;
}

.vpm-dialog--deposit-confirm .vpm-dialog__header--form,
.vpm-dialog--withdrawal-confirm .vpm-dialog__header--form {
  padding: 0 32px 0 0;
}

.vpm-dialog--deposit-confirm .vpm-dialog__header--alert .vpm-dialog__title,
.vpm-dialog--withdrawal-confirm .vpm-dialog__header--alert .vpm-dialog__title {
  text-align: left;
}

.vpm-dialog--deposit-confirm .vpm-dialog__description,
.vpm-dialog--withdrawal-confirm .vpm-dialog__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--vpm-ds-text-muted);
}

.vpm-admin-deposit-dialog__meta,
.vpm-admin-withdrawal-dialog__meta {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.vpm-admin-deposit-dialog__meta p,
.vpm-admin-withdrawal-dialog__meta p {
  margin: 0;
}

.vpm-admin-deposit-dialog__label,
.vpm-admin-withdrawal-dialog__label {
  font-weight: 500;
}

.vpm-admin-deposit-dialog__proof {
  color: var(--vpm-ds-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vpm-admin-deposit-dialog__status-field,
.vpm-admin-withdrawal-dialog__status-field {
  margin-top: 8px;
}

.vpm-admin-deposit-dialog__status-field .vpm-dialog__status-select,
.vpm-admin-withdrawal-dialog__status-field .vpm-dialog__status-select {
  width: 100%;
  height: 48px;
}

.vpm-admin-deposit-dialog__reject-field {
  margin-top: 4px;
}

.vpm-admin-deposit-dialog__reject-field .vpm-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

.vpm-dialog--deposit-confirm .vpm-dialog__footer--form,
.vpm-dialog--withdrawal-confirm .vpm-dialog__footer--form {
  padding: 0;
  margin-top: 0;
  gap: 8px;
}

@media (min-width: 640px) {
  .vpm-dialog--deposit-confirm .vpm-dialog__footer--form,
  .vpm-dialog--withdrawal-confirm .vpm-dialog__footer--form {
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* ─── Admin trader detail ─── */
.vpm-trader-info-page {
  align-items: center;
}

.vpm-trader-info-page .vpm-page-intro {
  max-width: 36rem;
}

.vpm-admin-account-page {
  align-items: center;
  gap: 32px;
}

.vpm-admin-account-page .vpm-page-intro {
  max-width: 36rem;
}

.vpm-admin-account-page__update {
  width: 100%;
  max-width: 36rem;
  align-self: center;
}

.vpm-admin-payment-methods-page {
  align-items: center;
  gap: 32px;
}

.vpm-admin-payment-methods-page .vpm-page-intro {
  max-width: 36rem;
}

.vpm-admin-payment-methods-page__add {
  width: 100%;
  max-width: 36rem;
  align-self: center;
}

.vpm-admin-payment-methods__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .vpm-admin-payment-methods__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .vpm-admin-payment-methods__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.vpm-admin-payment-method-card {
  min-width: 0;
}

.vpm-admin-payment-method-card__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.vpm-admin-payment-method-card__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vpm-admin-payment-method-card__qr {
  display: block;
  width: auto;
  max-width: 100%;
  aspect-ratio: 1;
  height: auto;
}

.vpm-admin-payment-method-card__fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.vpm-admin-payment-method-card__field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.vpm-admin-payment-method-card__label {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--vpm-ds-text-muted);
}

.vpm-admin-payment-method-card__value {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
  font-weight: 500;
  color: var(--vpm-ds-text);
  word-break: break-all;
}

.vpm-admin-payment-method-card__action {
  width: 100%;
}

.vpm-admin-notifications-page {
  align-items: center;
  gap: 32px;
}

.vpm-admin-notifications-page .vpm-page-intro {
  max-width: 36rem;
}

.vpm-admin-notifications-page__send {
  width: 100%;
  max-width: 36rem;
  align-self: center;
}

.vpm-admin-notifications-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 24px;
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
  font-weight: 500;
  text-align: center;
}

.vpm-admin-notifications__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-admin-notification-item {
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.vpm-admin-notification-item__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.vpm-admin-notification-item__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--vpm-ds-text);
}

.vpm-admin-notification-item__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text);
  white-space: pre-wrap;
}

.vpm-admin-notification-item__meta {
  margin: 0;
  font-size: 13px;
  color: var(--vpm-ds-text-muted);
}

.vpm-dialog--notification-send {
  width: min(calc(100vw - 2rem), 32rem);
  max-height: calc(100vh - 150px);
  padding: 0;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-bg);
  box-shadow: var(--vpm-ds-shadow-lg);
}

.vpm-dialog--notification-send .vpm-dialog__panel {
  max-height: calc(100vh - 150px);
}

.vpm-dialog--notification-send .vpm-dialog__scroll {
  padding: 24px 24px 0;
}

.vpm-admin-notification-send {
  gap: 32px;
}

.vpm-admin-notification-send .vpm-dialog__fields {
  gap: 16px;
}

.vpm-admin-notification-receiver__wrap {
  position: relative;
}

.vpm-admin-notification-receiver__select {
  width: 100%;
  height: 48px;
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
}

.vpm-admin-notification-receiver__icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.5;
}

.vpm-auth-float__input--textarea {
  min-height: 16rem;
  resize: vertical;
  padding-top: 18px;
}

.vpm-admin-notification-send__footer {
  padding: 0 24px 24px;
  justify-content: flex-end;
}

.vpm-trading-room {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vpm-trading-room__layout {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

@media (min-width: 1024px) {
  .vpm-trading-room__layout {
    flex-direction: row;
    gap: 64px;
  }
}

.vpm-trading-room__modes-wrap {
  display: flex;
  height: 100%;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 1024px) {
  .vpm-trading-room__modes-wrap {
    flex-direction: column;
    justify-content: flex-start;
    gap: 32px;
    align-self: center;
  }
}

.vpm-trading-room__modes {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1024px) {
  .vpm-trading-room__modes {
    flex-direction: column;
    justify-content: flex-start;
    gap: 32px;
  }
}

.vpm-trading-room__content {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

@media (min-width: 1024px) {
  .vpm-trading-room__content--trades {
    flex-direction: row;
  }
}

.vpm-trading-room__chart-column {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.vpm-trading-room__mode {
  display: inline-flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: max-content;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius);
  background: var(--vpm-ds-surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  color: var(--vpm-ds-text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

@media (min-width: 1024px) {
  .vpm-trading-room__mode {
    flex: 0 0 auto;
    font-size: 16px;
  }
}

.vpm-trading-room__mode .material-icons {
  font-size: 24px !important;
}

.vpm-trading-room__mode--active {
  color: var(--vpm-ds-primary);
}

.vpm-trading-room__mode:hover {
  color: var(--vpm-ds-text);
  background: var(--vpm-ds-accent);
}

.vpm-trading-room__mode--active:hover {
  color: var(--vpm-ds-primary);
}

.vpm-trading-room__trades {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  padding: 36px 24px;
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
}

.vpm-trading-room__trades--empty {
  align-items: center;
  justify-content: center;
}

@media (min-width: 1024px) {
  .vpm-trading-room__trades {
    width: 33.333%;
    flex: 0 0 33.333%;
    min-height: 24rem;
    align-self: stretch;
  }
}

.vpm-trading-room__trades-empty {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
}

.vpm-trading-room__trades-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-trading-room-trade {
  padding: 0;
  background: transparent;
}

.vpm-trading-room-trade__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--vpm-ds-radius);
  background: rgb(255 255 255 / 0.08);
  text-decoration: none;
  color: inherit;
  transition: background 150ms ease;
}

.vpm-trading-room-trade__link:hover,
.vpm-trading-room-trade__link:focus-visible {
  background: rgb(255 255 255 / 0.14);
  outline: none;
}

.vpm-trading-room-trade__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vpm-trading-room-trade__pair {
  font-size: 14px;
  font-weight: 700;
  color: var(--vpm-ds-accent-fg);
  letter-spacing: 0.02em;
}

.vpm-trading-room-trade__side {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.vpm-trading-room-trade__side--buy {
  color: #22c55e;
}

.vpm-trading-room-trade__side--sell {
  color: #ef4444;
}

.vpm-trading-room-trade__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  opacity: 0.9;
}

.vpm-trading-room-trade__actions {
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.vpm-trading-room-trade__actions a,
.vpm-trading-room-trade__actions button {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.vpm-trading-room-trade__pnl {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.vpm-trading-room__filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vpm-trading-room__filter {
  flex: 1;
  min-width: 0;
}

.vpm-trading-room__filter-wrap {
  position: relative;
  display: block;
}

.vpm-trading-room__filter-select {
  width: 100%;
  height: 36px;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius);
  background-color: var(--vpm-ds-surface);
  color: var(--vpm-ds-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  appearance: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.vpm-trading-room__filter-select option {
  color: var(--vpm-ds-text);
  background-color: var(--vpm-ds-surface);
}

.vpm-trading-room__filter-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--vpm-ds-ring);
}

.vpm-trading-room__filter-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.5;
}

.vpm-trading-room__chart-wrap {
  min-width: 0;
}

.vpm-trading-room__chart-wrap--simple,
.vpm-trading-room__chart-wrap--technical {
  height: 34rem;
  min-height: 20rem;
}

.vpm-trading-room__chart-wrap--info {
  height: auto;
  flex: 0 0 auto;
}

.vpm-trading-room-chart--overview {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vpm-trading-room-chart--overview .vpm-trading-room-chart__body {
  flex: 1;
  min-height: 0;
  height: calc(100% - 32px);
}

.vpm-trading-room-chart--info {
  height: 205px;
  min-height: 183px;
}

.vpm-trading-room-chart--info .vpm-trading-room-chart__iframe {
  display: block;
  height: 205px;
  min-height: 183px;
}

.tradingview-widget-copyright {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 32px;
  text-align: center;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  color: #b2b5be;
}

.tradingview-widget-copyright a {
  text-decoration: none;
  color: #b2b5be;
}

.tradingview-widget-copyright a:visited {
  color: #b2b5be;
}

.tradingview-widget-copyright .blue-text {
  color: #2962ff;
}

.tradingview-widget-copyright a:hover .blue-text {
  color: #1e53e5;
}

.tradingview-widget-copyright a:active .blue-text {
  color: #1848cc;
}

.tradingview-widget-copyright a:visited .blue-text {
  color: #2962ff;
}

.tradingview-widget-copyright--hidden {
  display: none !important;
}

.vpm-trading-room-chart,
.vpm-trading-room-chart__iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.vpm-trading-room-chart {
  overflow: hidden;
  border-radius: var(--vpm-ds-radius-lg);
  background: #131722;
}

[data-theme='light'] .vpm-trading-room-chart {
  background: #ffffff;
}

.vpm-admin-account-card__body {
  gap: 0;
  padding: 16px;
}

.vpm-trader-info-card {
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.vpm-trader-info-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.vpm-trader-info-card__avatar-wrap {
  align-self: center;
}

.vpm-trader-info-card__avatar {
  width: 160px;
  height: 160px;
  border-radius: 9999px;
  object-fit: cover;
}

.vpm-trader-info-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: var(--vpm-ds-text-muted);
  background: var(--vpm-ds-accent);
}

.vpm-trader-info-card__name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

/* ——— Trader photo field (admin update dialog) ——— */
.vpm-trader-photo-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpm-trader-photo-field__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vpm-trader-photo-field__preview {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  object-fit: cover;
}

.vpm-trader-photo-field__preview--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--vpm-ds-text-muted);
  background: var(--vpm-ds-accent);
}

.vpm-trader-photo-field__controls {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.vpm-trader-photo-field__remove {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--vpm-text-sm, 14px);
}

.vpm-trader-info-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.vpm-trader-info-stats__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 16px;
  color: var(--vpm-ds-accent-fg);
}

.vpm-trader-info-stats__row--accent {
  background: var(--vpm-ds-accent);
}

.vpm-trader-info-stats__label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.vpm-trader-info-stats__value {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.vpm-trader-info-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 36rem;
}

.vpm-trader-info-actions__btn {
  width: 100%;
}

@media (min-width: 1024px) {
  .vpm-trader-info-actions {
    flex-direction: row;
  }
}

/* ─── User trade info page ─── */
.vpm-trade-info-page__intro {
  text-align: center;
}

.vpm-trade-info-card__body {
  gap: 0;
  padding: 0;
}

.vpm-trade-info-card .vpm-trader-info-stats {
  margin: 0;
}

.vpm-trade-info-card__symbol {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vpm-trade-info-card__symbol-logo {
  border-radius: 8px;
  object-fit: contain;
}

.vpm-trade-info-card__close {
  padding: 16px;
  margin: 0;
}

.vpm-trade-info-card__close-btn {
  width: 100%;
}

.vpm-trader-info-stats__value.vpm-admin-trade-card__pnl--positive {
  color: #22c55e;
}

.vpm-trader-info-stats__value.vpm-admin-trade-card__pnl--negative {
  color: #ef4444;
}

/* ─── Admin trading ─── */
.vpm-admin-trading-page {
  align-items: center;
  gap: 32px;
}

.vpm-admin-trading-page .vpm-page-intro {
  max-width: 36rem;
}

.vpm-admin-trading-page__open-btn {
  width: 100%;
  max-width: 36rem;
  align-self: center;
}

.vpm-admin-trading-page__empty {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
  text-align: center;
}

.vpm-admin-trading-list {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 36rem;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.vpm-admin-trading-list__item {
  margin: 0;
}

.vpm-admin-trade-card {
  overflow: hidden;
  color: var(--vpm-ds-text);
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: var(--vpm-ds-shadow-sm);
}

.vpm-admin-trade-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.vpm-admin-trade-card__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
}

.vpm-admin-trade-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  color: var(--vpm-ds-text);
}

.vpm-admin-trade-card__date-month {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.vpm-admin-trade-card__date-day {
  font-size: 24px;
  line-height: 1.1;
}

.vpm-admin-trade-card__logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
}

.vpm-admin-trade-card__details {
  display: flex;
  flex: 1 1 12rem;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.vpm-admin-trade-card__meta {
  flex: 1 1 8rem;
  min-width: 0;
}

.vpm-admin-trade-card__line,
.vpm-admin-trade-card__party {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vpm-admin-trade-card__party {
  color: var(--vpm-ds-text-muted);
}

.vpm-admin-trade-card__pnl {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.vpm-admin-trade-card__pnl--positive {
  color: #22c55e;
}

.vpm-admin-trade-card__pnl--negative {
  color: #ef4444;
}

.vpm-admin-trade-card__pnl--neutral {
  color: var(--vpm-ds-text);
}

.vpm-admin-trade-card__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.vpm-admin-trade-card__action {
  width: 100%;
}

@media (min-width: 1024px) {
  .vpm-admin-trade-card__actions {
    flex-direction: row;
  }
}

.vpm-combobox {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpm-combobox__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.vpm-combobox__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
  text-align: left;
  cursor: pointer;
  background: var(--vpm-ds-bg);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-md);
  box-shadow: var(--vpm-ds-shadow-sm);
}

.vpm-combobox--selected .vpm-combobox__trigger {
  color: var(--vpm-ds-text);
}

.vpm-combobox__value {
  display: inline-flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vpm-combobox__chevron {
  flex-shrink: 0;
  opacity: 0.5;
}

.vpm-combobox__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 240px;
  overflow: auto;
  background: var(--vpm-ds-bg);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-md);
  box-shadow: var(--vpm-ds-shadow-lg);
}

.vpm-combobox--inline .vpm-combobox__panel {
  position: static;
  top: auto;
  z-index: auto;
  max-height: 11rem;
  margin-top: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: none;
  scrollbar-width: thin;
}

.vpm-combobox--inline .vpm-combobox__panel--assets {
  max-height: 14rem;
}

.vpm-combobox--inline.is-open .vpm-combobox__trigger {
  border-color: var(--vpm-ds-primary);
  box-shadow: 0 0 0 1px var(--vpm-ds-primary);
}

.vpm-combobox--invalid .vpm-combobox__trigger {
  border-color: #ef4444;
}

.vpm-combobox__error {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #ef4444;
}

.vpm-combobox__search {
  display: block;
  padding: 8px 8px 4px;
  border-bottom: 1px solid var(--vpm-ds-border);
}

.vpm-combobox__search-input {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
}

.vpm-combobox__panel--assets {
  max-height: 280px;
}

.vpm-combobox__list {
  margin: 0;
  padding: 4px;
  list-style: none;
}

.vpm-combobox__option {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text);
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--vpm-ds-radius-sm);
}

.vpm-combobox__option:hover,
.vpm-combobox__option.is-selected {
  background: var(--vpm-ds-accent);
}

.vpm-combobox__option--asset {
  justify-content: flex-start;
}

.vpm-combobox__asset-logo {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
}

.vpm-combobox__asset-name {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--vpm-ds-text-muted);
}

.vpm-combobox__check-option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--vpm-ds-radius-sm);
}

.vpm-combobox__check-option:hover {
  background: var(--vpm-ds-accent);
}

.vpm-combobox__check-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--vpm-ds-primary);
}

.vpm-open-trade-form {
  gap: 16px;
}

.vpm-dialog__footer--trade-actions {
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.vpm-open-trade-form__sides {
  display: flex;
  flex: 1 1 100%;
  gap: 8px;
  justify-content: flex-end;
}

@media (min-width: 640px) {
  .vpm-open-trade-form__sides {
    flex: 0 0 auto;
  }
}

.vpm-btn--buy {
  min-width: 5rem;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: #22c55e;
  border: 0;
  border-radius: var(--vpm-ds-radius-md);
  box-shadow: var(--vpm-ds-shadow-sm);
}

.vpm-btn--buy:hover {
  background: #16a34a;
}

.vpm-btn--sell {
  min-width: 5rem;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: #ef4444;
  border: 0;
  border-radius: var(--vpm-ds-radius-md);
  box-shadow: var(--vpm-ds-shadow-sm);
}

.vpm-btn--sell:hover {
  background: #dc2626;
}

.vpm-client-manage {
  position: relative;
  width: 100%;
}

.vpm-client-manage__trigger {
  width: 100%;
}

.vpm-client-manage__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 18rem;
  max-width: 100%;
  padding: 4px;
  overflow: hidden;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius);
  box-shadow: var(--vpm-ds-shadow-lg);
}

.vpm-client-manage__heading {
  margin: 0;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 600;
}

.vpm-client-manage__separator {
  height: 1px;
  margin: 4px -4px;
  border: 0;
  background: var(--vpm-ds-border);
}

.vpm-client-manage__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  font: inherit;
  font-size: 14px;
  color: inherit;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: calc(var(--vpm-ds-radius) - 2px);
  cursor: pointer;
}

.vpm-client-manage__item:hover,
.vpm-client-manage__item:focus-visible {
  background: var(--vpm-ds-accent);
  outline: none;
}

.vpm-client-otp-dialog__hint {
  margin: 0 0 12px;
  color: var(--vpm-ds-text-muted);
}

.vpm-client-otp-dialog__code {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vpm-dialog__checkbox {
  padding-top: 4px;
}

.vpm-dialog__description {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--vpm-ds-text-muted);
}

.vpm-dialog--open-trade .vpm-dialog__scroll--open-trade {
  max-height: calc(100vh - 150px);
  padding: 8px 16px 32px 8px;
  overflow-y: auto;
  scrollbar-color: rgb(0 0 0 / 0.35) transparent;
}

.vpm-dialog--open-trade .vpm-dialog__scroll--open-trade::-webkit-scrollbar {
  width: 10px;
}

.vpm-dialog--open-trade .vpm-dialog__scroll--open-trade::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 0.35);
  border-radius: 999px;
}

.vpm-dialog--open-trade {
  width: min(100vw - 24px, 32rem);
  max-height: calc(100vh - 24px);
  padding: 32px 32px 24px;
}

.vpm-dialog--open-trade .vpm-dialog__content--open-trade {
  gap: 32px;
  padding: 4px 4px 12px;
}

.vpm-dialog--open-trade .vpm-open-trade-form {
  display: grid;
  gap: 24px;
}

.vpm-open-trade-field {
  display: grid;
  gap: 8px;
}

.vpm-open-trade-field__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.vpm-open-trade-combobox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
  text-align: left;
  cursor: pointer;
  background: var(--vpm-ds-bg);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-md);
  box-shadow: var(--vpm-ds-shadow-sm);
}

.vpm-open-trade-combobox--selected {
  color: var(--vpm-ds-text);
}

.vpm-open-trade-combobox--error {
  border-color: #ef4444;
}

.vpm-open-trade-combobox__value {
  display: inline-flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vpm-open-trade-combobox__chevron {
  flex-shrink: 0;
  opacity: 0.5;
}

.vpm-open-trade-combobox__logo {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
}

.vpm-open-trade-field__error {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #ef4444;
}

.vpm-dialog--picker {
  width: min(100vw - 32px, 24rem);
  max-height: min(24rem, calc(100vh - 80px));
  padding: 20px;
}

.vpm-dialog--picker-wide {
  width: min(100vw - 32px, 28rem);
}

.vpm-dialog--picker::backdrop {
  background: rgb(0 0 0 / 0.55);
}

.vpm-dialog__scroll--picker {
  max-height: min(16rem, calc(100vh - 220px));
  padding-right: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.vpm-picker-search-wrap {
  padding: 0 0 12px;
}

.vpm-picker-search {
  width: 100%;
  min-height: 44px;
}

.vpm-picker-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-picker-list__option {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text);
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--vpm-ds-radius-sm);
}

.vpm-picker-list__option:hover,
.vpm-picker-list__option.is-selected {
  background: var(--vpm-ds-accent);
}

.vpm-picker-list__option--asset {
  justify-content: flex-start;
}

.vpm-picker-list__meta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--vpm-ds-text-muted);
}

.vpm-picker-list__check {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--vpm-ds-radius-sm);
}

.vpm-picker-list__check:hover {
  background: var(--vpm-ds-accent);
}

.vpm-picker-list__check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--vpm-ds-primary);
}

.vpm-open-trade-field__error--footer {
  flex: 1 1 100%;
  text-align: center;
}

.vpm-dialog--open-trade .vpm-dialog__footer--trade-actions {
  flex-shrink: 0;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--vpm-ds-border);
}

.vpm-dialog__scroll--pending-requests {
  max-height: calc(100vh - 150px);
}

.vpm-dialog__checkbox-fieldset {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.vpm-dialog__checkbox-fieldset .vpm-field__label,
.vpm-dialog__checkbox-legend {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
}

.vpm-dialog__checkbox-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-dialog__checkbox-row {
  margin: 0;
}

.vpm-dialog__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.vpm-dialog__checkbox-label input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--vpm-ds-primary);
  cursor: pointer;
}

.vpm-dialog__empty-hint {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-dialog:not([open]) {
  display: none;
}

.vpm-dialog[open] {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: min(100vw - 32px, 32rem);
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--vpm-ds-text);
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.24);
}

.vpm-dialog::backdrop {
  background: rgb(0 0 0 / 0.45);
}

.vpm-dialog__panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

.vpm-dialog__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.vpm-dialog__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.vpm-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--vpm-ds-radius);
}

.vpm-dialog__close:hover {
  background: var(--vpm-ds-accent);
}

.vpm-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.vpm-dialog__body::-webkit-scrollbar {
  width: 6px;
}

.vpm-dialog__body::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 0.18);
  border-radius: 999px;
}

.vpm-dialog__footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.vpm-dialog--trader-form {
  --vpm-auth-primary: var(--vpm-ds-primary);
  --vpm-auth-primary-hover: var(--vpm-ds-primary-hover);
  --vpm-auth-card: var(--vpm-ds-bg);
  --vpm-auth-border: var(--vpm-ds-border);
  --vpm-auth-text: var(--vpm-ds-text);
  --vpm-auth-muted: var(--vpm-ds-text-muted);
  --vpm-auth-input-bg: transparent;
  width: min(100vw - 32px, 32rem);
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 24px;
  overflow: hidden;
  color: var(--vpm-ds-text);
  background: var(--vpm-ds-bg);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: var(--vpm-ds-shadow-lg);
}

.vpm-dialog--trader-form::backdrop {
  background: rgb(0 0 0 / 0.8);
}

.vpm-dialog--trader-form .vpm-dialog__panel {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

.vpm-dialog__close--corner {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 24px;
  height: 24px;
  opacity: 0.7;
}

.vpm-dialog__close--corner:hover {
  opacity: 1;
  background: var(--vpm-ds-accent);
}

.vpm-dialog__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.vpm-dialog--trader-form .vpm-dialog__scroll {
  max-height: none;
}

.vpm-dialog--long-form .vpm-dialog__scroll {
  max-height: none;
}

.vpm-dialog__scroll::-webkit-scrollbar {
  width: 6px;
}

.vpm-dialog__scroll::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 0.18);
  border-radius: 999px;
}

.vpm-dialog__content {
  display: grid;
  gap: 32px;
  padding: 2px 0 0;
}

.vpm-dialog__header--form {
  padding: 0;
  padding-right: 32px;
}

.vpm-dialog__header--form .vpm-dialog__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  text-align: center;
}

.vpm-dialog__fields {
  display: grid;
  gap: 16px;
}

.vpm-dialog--trader-form .vpm-auth-float__input {
  height: 48px;
  padding: 8px;
  font-size: 14px;
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: var(--vpm-ds-shadow);
}

.vpm-dialog--trader-form .vpm-auth-float__input:focus {
  border-color: var(--vpm-ds-ring);
  box-shadow: 0 0 0 1px var(--vpm-ds-ring);
}

.vpm-dialog--trader-form .vpm-auth-float__label {
  left: 8px;
  font-weight: 500;
}

.vpm-dialog--trader-form .vpm-auth-float__input:focus + .vpm-auth-float__label,
.vpm-dialog--trader-form .vpm-auth-float__input:not(:placeholder-shown) + .vpm-auth-float__label {
  color: var(--vpm-ds-text-muted);
}

.vpm-dialog--trader-form .vpm-auth-float__input--file {
  padding-top: 18px;
  cursor: pointer;
}

.vpm-dialog--trader-form .vpm-auth-float__label--file {
  top: 2px;
  transform: translateY(-4px) scale(0.75);
  transform-origin: left top;
  padding: 0 8px;
  background: var(--vpm-ds-bg);
}

.vpm-fund-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vpm-fund-fields__section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--vpm-border);
}

.vpm-fund-fields__section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.vpm-fund-fields__heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.vpm-fund-fields__current {
  font-weight: 500;
  color: var(--vpm-text-muted);
  font-size: 13px;
}

.vpm-fund-fields__row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 520px) {
  .vpm-fund-fields__row {
    grid-template-columns: 1fr;
  }
}

.vpm-dialog__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--vpm-text-muted);
  font-weight: 400;
}

.vpm-dialog--account-status .vpm-dialog__fields--status {
  gap: 16px;
}

.vpm-dialog--account-status .vpm-dialog__status-field {
  gap: 8px;
}

.vpm-dialog--account-status .vpm-field__label {
  padding-left: 8px;
}

.vpm-dialog--account-status .vpm-dialog__status-select {
  height: 48px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: var(--vpm-ds-radius);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.vpm-dialog--account-status .vpm-dialog__status-select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.vpm-dialog--account-status .vpm-dialog__status-select--placeholder {
  color: var(--vpm-ds-text-muted);
}

.vpm-dialog--account-status .vpm-dialog__message {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-dialog__footer--form {
  flex-shrink: 0;
  flex-direction: column-reverse;
  gap: 8px;
  padding: 16px 0 0;
  margin-top: auto;
}

.vpm-dialog__footer--form .vpm-btn {
  width: 100%;
  min-height: 36px;
}

@media (max-width: 639px) {
  .vpm-dialog__footer--form .vpm-btn--secondary {
    margin-top: 8px;
  }
}

@media (min-width: 640px) {
  .vpm-dialog__header--form .vpm-dialog__title {
    text-align: left;
  }

  .vpm-dialog__footer--form {
    flex-direction: row;
    justify-content: flex-end;
  }

  .vpm-dialog__footer--form .vpm-btn {
    width: auto;
  }

  .vpm-dialog__footer--form .vpm-btn--secondary {
    margin-top: 0;
  }
}

body[data-scroll-locked] {
  overflow: hidden;
}

/* ─── Surfaces ─── */
.vpm-surface {
  width: 100%;
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
  border-radius: var(--vpm-ds-radius-lg);
  border: 1px solid var(--vpm-ds-border);
}

.vpm-surface--flat {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.vpm-panel {
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  overflow: hidden;
}

.vpm-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--vpm-ds-border);
}

.vpm-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.vpm-panel__body {
  padding: 20px;
}

.vpm-panel__body--flush {
  padding: 0;
}

.vpm-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.vpm-referral-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.vpm-referral-link-row code {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--vpm-ds-bg);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius);
  word-break: break-all;
}

.vpm-metric-card__hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--vpm-ds-text-muted);
}

/* ─── Metric cards ─── */
.vpm-metric-card {
  padding: 20px;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
}

.vpm-metric-card__label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vpm-ds-text-muted);
}

.vpm-metric-card__value {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.vpm-dash-grid {
  display: grid;
  gap: 16px;
}

.vpm-dash-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.vpm-dash-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.vpm-dash-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
  .vpm-dash-grid--3,
  .vpm-dash-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .vpm-dash-grid--2,
  .vpm-dash-grid--3,
  .vpm-dash-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ─── State blocks (error, empty, loading) ─── */
.vpm-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  width: 100%;
}

.vpm-state__icon {
  font-size: 40px;
  width: 40px;
  height: 40px;
  line-height: 40px;
}

.vpm-state__icon--error {
  color: var(--vpm-ds-destructive);
}

.vpm-state__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.vpm-state__desc {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

/* ─── Buttons (reference shadcn-like) ─── */
.vpm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: var(--vpm-ds-radius);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.vpm-btn:focus-visible {
  outline: 2px solid var(--vpm-ds-primary);
  outline-offset: 2px;
  box-shadow: none;
}

.vpm-btn--sm {
  padding: 7px 12px;
  font-size: 13px;
}

.vpm-btn--primary {
  background: var(--vpm-ds-primary);
  color: #fff;
  border-color: var(--vpm-ds-primary);
}

.vpm-btn--primary:hover {
  background: var(--vpm-ds-primary-hover);
  border-color: var(--vpm-ds-primary-hover);
}

.vpm-btn--secondary {
  background: var(--vpm-ds-bg);
  color: var(--vpm-ds-text);
  border-color: var(--vpm-ds-border);
  box-shadow: var(--vpm-ds-shadow);
}

.vpm-btn--secondary:hover {
  background: var(--vpm-ds-accent);
}

.vpm-btn--ghost {
  background: transparent;
  color: var(--vpm-ds-text);
  border-color: transparent;
}

.vpm-btn--ghost:hover {
  background: var(--vpm-ds-accent);
}

.vpm-btn--destructive {
  background: var(--vpm-ds-destructive);
  color: #fff;
}

/* ─── Form fields ─── */
.vpm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vpm-field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
}

.vpm-input,
.vpm-select,
.vpm-textarea {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--vpm-ds-text);
  background: var(--vpm-ds-bg);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius);
  box-shadow: var(--vpm-ds-shadow);
}

.vpm-input:focus,
.vpm-select:focus,
.vpm-textarea:focus,
.vpm-input:focus-visible,
.vpm-select:focus-visible,
.vpm-textarea:focus-visible {
  outline: none;
  border-color: var(--vpm-ds-primary);
  box-shadow: 0 0 0 2px var(--vpm-ds-primary);
}

@media (max-width: 767px) {
  .vpm-input,
  .vpm-select,
  .vpm-textarea {
    font-size: 16px;
  }

  .vpm-btn--sm {
    min-height: 44px;
    padding-inline: 14px;
  }

  .vpm-menu-drawer__link {
    min-height: 44px;
  }
}

/* ─── Badges ─── */
.vpm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vpm-badge--up {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.vpm-badge--down {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.vpm-badge--pending {
  background: rgba(249, 115, 22, 0.15);
  color: var(--vpm-ds-primary);
}

/* ─── Tables in shell context ─── */
.vpm-shell .vpm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vpm-shell .vpm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vpm-shell .vpm-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
  border-bottom: 1px solid var(--vpm-ds-border);
  background: var(--vpm-ds-surface-2);
}

.vpm-shell .vpm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--vpm-ds-border);
}

.vpm-shell .vpm-table tbody tr:hover td {
  background: var(--vpm-ds-accent);
}

/* ─── List pages bridge (legacy class names) ─── */
.vpm-shell .vpm-list-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.vpm-shell .vpm-action-hero {
  text-align: center;
}

.vpm-shell .vpm-action-hero__title {
  font-size: 24px;
  font-weight: 600;
}

.vpm-shell .vpm-action-hero__text {
  color: var(--vpm-ds-text-muted);
  font-size: 14px;
}

.vpm-shell .vpm-empty-hint {
  padding: 24px;
  text-align: center;
  color: var(--vpm-ds-text-muted);
  font-size: 14px;
}

.vpm-shell .vpm-empty-hint a {
  color: var(--vpm-ds-primary);
}

/* ─── Admin drawer section ─── */
.vpm-menu-drawer__section-label {
  padding: 12px 32px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vpm-ds-text-muted);
}

.vpm-menu-drawer__link--admin-active {
  color: var(--vpm-ds-primary);
  background: var(--vpm-ds-accent);
}

/* ─── Back link (account sub-pages) ─── */
.vpm-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
  text-decoration: none;
}

.vpm-back-link:hover {
  color: var(--vpm-ds-primary);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .vpm-menu-drawer,
  .vpm-menu-drawer__backdrop,
  .vpm-btn,
  .vpm-mobile-nav__link,
  .vpm-app-bottom-nav__link,
  .vpm-mobile-header__brand,
  .vpm-theme-icon {
    transition: none;
  }
}

/* ─── Shell accessibility (focus + touch) ─── */
.vpm-mobile-header__menu:focus-visible,
.vpm-mobile-header__theme:focus-visible,
.vpm-mobile-header__icon-btn:focus-visible,
.vpm-menu-drawer__link:focus-visible,
.vpm-mobile-nav__link:focus-visible,
.vpm-app-bottom-nav__link:focus-visible,
.vpm-mobile-header__brand:focus-visible {
  outline: 2px solid var(--vpm-ds-primary);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .vpm-mobile-header__menu,
  .vpm-mobile-header__theme,
  .vpm-mobile-header__icon-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ─── Expert Traders (copy trading list) ─── */
.vpm-expert-traders {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-expert-traders__search-wrap {
  display: block;
  width: 100%;
}

.vpm-expert-traders__search {
  width: 100%;
  min-height: 48px;
  padding: 16px;
  border-radius: var(--vpm-ds-radius-lg);
  font-size: 16px;
}

.vpm-expert-traders__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-expert-trader-card {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  overflow: hidden;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: background-color 0.15s ease;
}

.vpm-expert-trader-card:hover {
  background: var(--vpm-ds-accent);
}

.vpm-expert-trader-card__profile {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px;
}

.vpm-expert-trader-card__avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 9999px;
  object-fit: cover;
}

.vpm-expert-trader-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--vpm-ds-text-muted);
  background: var(--vpm-ds-accent);
}

.vpm-expert-trader-card__identity {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.vpm-expert-trader-card__name {
  margin: 0;
  font-family: var(--vpm-font-sans);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.vpm-expert-trader-card__form {
  width: 100%;
  margin: 0;
}

.vpm-expert-trader-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--vpm-ds-radius-md);
  font-family: var(--vpm-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.vpm-expert-trader-card__btn--copy {
  color: #fff;
  background: var(--vpm-ds-primary);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.vpm-expert-trader-card__btn--copy:hover:not(:disabled) {
  background: var(--vpm-ds-primary-hover);
}

.vpm-expert-trader-card__btn--pending {
  color: var(--vpm-ds-text);
  background: #eab308;
  cursor: not-allowed;
  opacity: 0.95;
}

.vpm-expert-trader-card__btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.vpm-expert-trader-card__btn:focus-visible {
  outline: 2px solid var(--vpm-ds-primary);
  outline-offset: 2px;
}

.vpm-expert-trader-card__stats {
  display: flex;
  height: 100%;
  border-top: 1px solid var(--vpm-ds-border);
}

.vpm-expert-trader-card__stat {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  text-align: center;
}

.vpm-expert-trader-card__stat:not(:last-child) {
  border-right: 1px solid var(--vpm-ds-border);
}

.vpm-expert-trader-card__stat-value {
  margin: 0;
  font-family: var(--vpm-font-sans);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.vpm-expert-trader-card__stat-label {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--vpm-ds-text-muted);
}

.vpm-expert-traders__agreement {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-primary);
  text-align: center;
  text-decoration: none;
}

.vpm-expert-traders__agreement:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vpm-expert-traders__empty-search {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
  text-align: center;
}

.vpm-expert-traders__agreement-body {
  max-width: 720px;
  margin-inline: auto;
}

.vpm-expert-traders__prose h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.vpm-expert-traders__prose h3:first-child {
  margin-top: 0;
}

.vpm-expert-traders__prose p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted);
}

.vpm-expert-traders__agreement-link {
  font-weight: 500;
  color: var(--vpm-ds-primary);
  text-decoration: none;
}

.vpm-expert-traders__agreement-link:hover {
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .vpm-expert-trader-card {
    grid-template-columns: 1fr 1fr;
  }

  .vpm-expert-trader-card__stats {
    border-top: none;
    border-left: 1px solid var(--vpm-ds-border);
  }

  .vpm-expert-trader-card__stat-value {
    font-size: 24px;
  }
}

@media (max-width: 1023px) {
  .vpm-expert-trader-card__profile {
    gap: 24px;
  }

  .vpm-expert-trader-card__name {
    font-size: 20px;
  }
}

/* ─── Deposits (reference list + wizard) ─── */
.vpm-deposits {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-deposits__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
  max-width: 36rem;
  min-height: 36px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--vpm-ds-radius-md);
  font-family: var(--vpm-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: var(--vpm-ds-primary);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  transition: background-color 0.15s ease;
}

.vpm-deposits__cta:hover {
  background: var(--vpm-ds-primary-hover);
  color: #fff;
}

.vpm-deposits__cta:focus-visible {
  outline: 2px solid var(--vpm-ds-primary);
  outline-offset: 2px;
}

.vpm-deposits__paused {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
  text-align: center;
}

.vpm-deposits__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-deposit-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  color: inherit;
  text-decoration: none;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: background-color 0.15s ease;
}

.vpm-deposit-card:hover {
  background: var(--vpm-ds-accent);
}

.vpm-deposit-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 48px;
}

.vpm-deposit-card__month {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.vpm-deposit-card__day {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.vpm-deposit-card__body {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.vpm-deposit-card__info {
  flex: 1;
  min-width: 0;
}

.vpm-deposit-card__fund {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
}

.vpm-deposit-card__subtitle {
  margin: 4px 0 0;
  font-size: 16px;
  color: var(--vpm-ds-text-muted);
}

.vpm-deposit-card__status {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}

.vpm-deposit-card__status--pending {
  color: #eab308;
}

.vpm-deposit-card__status--completed {
  color: #22c55e;
}

.vpm-deposit-card__status--rejected {
  color: var(--vpm-ds-destructive);
}

.vpm-deposits__back {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-primary);
  text-align: center;
  text-decoration: none;
}

.vpm-deposits__back:hover {
  text-decoration: underline;
}

.vpm-deposit-detail {
  padding: 16px;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
}

.vpm-deposit-detail__header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--vpm-ds-border);
}

.vpm-deposit-detail__summary {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.vpm-deposit-detail__meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.vpm-deposit-detail__meta div {
  display: grid;
  gap: 4px;
}

.vpm-deposit-detail__meta dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vpm-deposit-detail__meta dd {
  margin: 0;
  font-size: 14px;
}

.vpm-deposits--wizard .vpm-deposit-steps {
  align-self: center;
  justify-content: center;
  max-width: 100%;
}

.vpm-deposits__wizard-panel {
  max-width: 36rem;
  margin-inline: auto;
  width: 100%;
}

.vpm-deposits--wizard .vpm-payment-method {
  border-color: var(--vpm-ds-border);
  background: var(--vpm-ds-surface);
}

.vpm-deposits--wizard .vpm-payment-method:hover {
  background: var(--vpm-ds-accent);
}

.vpm-deposits--wizard .vpm-payment-method:has(input:checked) {
  border-color: var(--vpm-ds-primary);
  box-shadow: inset 0 0 0 1px var(--vpm-ds-primary);
}

.vpm-deposits--wizard .vpm-deposit-details dd {
  font-family: var(--vpm-font-sans);
  font-variant-numeric: tabular-nums;
}

.vpm-deposit-details__wallet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ─── Pricing (in-app catalog) ─── */
.vpm-pricing {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-signals__title {
  margin: 0;
  font-family: var(--vpm-font-sans);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--vpm-ds-text);
}

.vpm-pricing__sections {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.vpm-pricing__section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.vpm-pricing__section-title {
  margin: 0;
  font-family: var(--vpm-font-sans);
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.vpm-pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-pricing-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 16px 32px;
  background: var(--vpm-ds-surface);
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.vpm-pricing-card__badge {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.vpm-pricing-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.vpm-pricing-card__name {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.vpm-pricing-card__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-pricing-card__divider {
  width: 100%;
  height: 1px;
  margin: 4px 0;
  border: 0;
  background: var(--vpm-ds-border);
}

.vpm-pricing-card__price {
  margin: 0;
  font-family: var(--vpm-font-sans);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--vpm-ds-text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vpm-pricing-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 24px;
  padding: 8px 16px;
  border-radius: var(--vpm-ds-radius-md);
  font-family: var(--vpm-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: var(--vpm-ds-primary);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  transition: background-color 0.15s ease;
}

.vpm-pricing-card__cta:hover {
  background: var(--vpm-ds-primary-hover);
  color: #fff;
}

.vpm-pricing-card__cta:focus-visible {
  outline: 2px solid var(--vpm-ds-primary);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .vpm-pricing__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .vpm-pricing__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Fund account */
.vpm-fund-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
}

.vpm-fund-account__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.vpm-fund-account__title {
  margin: 0;
  font-family: var(--vpm-font-sans);
  font-size: 24px;
  font-weight: 600;
  color: var(--vpm-ds-text);
}

.vpm-fund-account__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

.vpm-fund-account__link {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--vpm-ds-primary);
  text-decoration: none;
}

.vpm-fund-account__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vpm-fund-account__card {
  width: 100%;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-surface);
  box-shadow: var(--vpm-ds-shadow);
}

.vpm-fund-account__card-body,
.vpm-fund-account__form {
  padding: 48px 24px;
}

.vpm-fund-account__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.vpm-fund-account__copy {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted);
  text-align: center;
}

.vpm-fund-account__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpm-fund-account__field-label {
  padding-inline: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
}

.vpm-fund-account__select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--vpm-ds-text);
  background: transparent;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius);
  box-shadow: var(--vpm-ds-shadow);
  opacity: 0.7;
  cursor: not-allowed;
}

.vpm-fund-account__select .material-icons {
  font-size: 20px;
  color: var(--vpm-ds-text-muted);
}

.vpm-fund-account__hint {
  padding-inline: 8px;
  font-size: 12px;
  color: var(--vpm-ds-text-muted);
}

.vpm-fund-account__submit {
  min-height: 44px;
  margin-top: 8px;
}

.vpm-fund-account__paused {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
  text-align: center;
}

/* Referrals */
.vpm-referrals {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-referrals__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.vpm-referrals__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vpm-ds-text);
}

.vpm-referrals__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted);
}

.vpm-referrals__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .vpm-referrals__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
  }
}

.vpm-referrals__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vpm-referrals__card {
  background: var(--vpm-ds-surface);
  color: var(--vpm-ds-text);
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  box-shadow: var(--vpm-ds-shadow-sm);
}

.vpm-referrals__card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  text-align: center;
}

.vpm-referrals__balance {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--vpm-ds-text);
}

.vpm-referrals__withdraw {
  min-height: 36px;
}

.vpm-referrals__card-label {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-referrals__link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
}

.vpm-referrals__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  background: var(--vpm-ds-surface);
  color: var(--vpm-ds-text);
  cursor: pointer;
  box-shadow: var(--vpm-ds-shadow-sm);
  transition: background 150ms ease, color 150ms ease;
}

.vpm-referrals__copy:hover {
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-primary);
}

.vpm-referrals__copy .material-icons {
  font-size: 18px;
}

.vpm-referrals__url {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}

.vpm-referrals__list-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vpm-referrals__list-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--vpm-ds-text);
}

.vpm-referrals__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpm-referrals__list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  background: var(--vpm-ds-surface);
}

.vpm-referrals__list-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text);
}

.vpm-referrals__list-date {
  font-size: 12px;
  color: var(--vpm-ds-text-muted);
}

.vpm-referrals__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* User notifications */
.vpm-notifications-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.vpm-notifications-page__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.vpm-notifications-page__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vpm-ds-text);
}

.vpm-notifications-page__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted);
}

.vpm-notifications-page__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vpm-notifications-page__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: 8px;
  background: var(--vpm-ds-surface);
  box-shadow: var(--vpm-ds-shadow-sm);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.vpm-notifications-page__item:hover {
  background: var(--vpm-ds-accent);
}

.vpm-notifications-page__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px;
  border-radius: 9999px;
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
}

.vpm-notifications-page__icon .material-icons {
  font-size: 24px;
}

.vpm-notifications-page__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.vpm-notifications-page__item-title {
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vpm-notifications-page__item-body {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vpm-notifications-page__item-time {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-notifications-page__item-time-ampm {
  text-transform: uppercase;
}

.vpm-notifications-page__unread {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--vpm-ds-destructive);
  animation: vpm-notification-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.vpm-notifications-page__empty {
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-text-muted);
  font-size: 14px;
  text-align: center;
}

@keyframes vpm-notification-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Withdrawals */
.vpm-withdrawals {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.vpm-withdrawals__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--vpm-ds-text);
}

.vpm-withdrawals__desc {
  margin: 0;
  max-width: 42rem;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--vpm-ds-text-muted);
}

.vpm-withdrawals__cta {
  width: 100%;
  max-width: 36rem;
  min-height: 36px;
  align-self: center;
  justify-content: center;
}

.vpm-withdrawals__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.vpm-withdrawals__list {
  list-style: none;
  width: 100%;
  max-width: 36rem;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vpm-withdrawals__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  background: var(--vpm-ds-surface);
}

.vpm-withdrawals__item-main,
.vpm-withdrawals__item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vpm-withdrawals__item-ref {
  font-size: 14px;
  font-weight: 600;
  color: var(--vpm-ds-text);
}

.vpm-withdrawals__item-amount {
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text);
}

.vpm-withdrawals__item-status {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vpm-withdrawals__item-status--pending {
  color: var(--vpm-ds-warning, #d97706);
}

.vpm-withdrawals__item-status--in_progress {
  color: #2563eb;
}

.vpm-withdrawals__item-status--completed {
  color: var(--vpm-ds-success, #059669);
}

.vpm-withdrawals__item-status--failed,
.vpm-withdrawals__item-status--rejected {
  color: var(--vpm-ds-danger, #dc2626);
}

.vpm-withdrawals__item-status--reversed {
  color: #9333ea;
}

.vpm-withdrawals__item-date {
  font-size: 12px;
  color: var(--vpm-ds-text-muted);
}

/* Toast notifications (Sonner-style) */
.vpm-toast-host {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 100;
  width: min(356px, calc(100vw - 32px));
  pointer-events: none;
}

.vpm-toast-host__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vpm-toast {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: 12px;
  background: var(--vpm-ds-surface);
  color: var(--vpm-ds-text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
  animation: vpm-toast-in 220ms ease;
}

.vpm-toast--leaving {
  animation: vpm-toast-out 200ms ease forwards;
}

.vpm-toast__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--vpm-ds-text-muted);
  cursor: pointer;
}

.vpm-toast__close:hover {
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-text);
}

.vpm-toast__icon {
  flex-shrink: 0;
  color: #2563eb;
}

.vpm-toast--error .vpm-toast__icon {
  color: #dc2626;
}

.vpm-toast__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 24px;
}

.vpm-toast__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--vpm-ds-text);
}

.vpm-toast__description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--vpm-ds-text-muted);
}

.vpm-toast__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--vpm-ds-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 150ms ease;
}

.vpm-toast__action:hover {
  background: color-mix(in srgb, var(--vpm-ds-primary) 90%, #000);
  color: #fff;
}

@keyframes vpm-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vpm-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 639px) {
  .vpm-toast-host {
    top: 72px;
    right: 16px;
    width: calc(100vw - 32px);
  }
}

/* ─── Admin mail compose ─── */
.vpm-shell__main--mail {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
}

.vpm-shell--no-nav .vpm-shell__main--mail {
  min-height: calc(100vh - 56px);
}

.vpm-mail-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-height: 0;
}

.vpm-mail-page__intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vpm-mail-page__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vpm-ds-text);
}

.vpm-mail-page__desc {
  margin: 0;
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-mail-compose {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 420px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-surface);
  color: var(--vpm-ds-text);
  box-shadow: var(--vpm-ds-shadow-sm);
  overflow: hidden;
}

.vpm-mail-compose__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
}

.vpm-mail-compose__toolbar-group,
.vpm-mail-compose__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpm-mail-compose__toolbar-actions {
  margin-left: auto;
}

.vpm-mail-compose__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--vpm-ds-radius);
  background: transparent;
  color: var(--vpm-ds-text);
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.vpm-mail-compose__icon-btn:hover:not(:disabled) {
  background: var(--vpm-ds-accent);
  color: var(--vpm-ds-accent-fg);
}

.vpm-mail-compose__icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vpm-mail-compose__divider {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--vpm-ds-border);
}

.vpm-mail-compose__divider-line {
  height: 1px;
  background: var(--vpm-ds-border);
}

.vpm-mail-compose__form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding-left: 16px;
}

.vpm-mail-compose__row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--vpm-ds-border);
}

.vpm-mail-compose__label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--vpm-ds-text-muted);
}

.vpm-mail-compose__input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  color: var(--vpm-ds-text);
  outline: none;
  box-shadow: none;
}

.vpm-mail-compose__input:focus {
  outline: none;
}

.vpm-mail-compose__input[aria-invalid="true"] {
  color: var(--vpm-ds-danger, #ef4444);
}

.vpm-mail-compose__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.vpm-mail-compose__textarea {
  flex: 1;
  width: 100%;
  min-height: 240px;
  border: none;
  background: transparent;
  padding: 8px 16px 16px 0;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--vpm-ds-text);
  outline: none;
  box-shadow: none;
}

.vpm-mail-compose__textarea::placeholder {
  font-size: 14px;
  color: var(--vpm-ds-text-muted);
}

.vpm-mail-compose__textarea:focus {
  outline: none;
}

.vpm-mail-templates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.vpm-mail-templates__tab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--vpm-ds-border);
  border-radius: var(--vpm-ds-radius-lg);
  background: var(--vpm-ds-surface);
  color: var(--vpm-ds-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vpm-mail-templates__tab:hover,
.vpm-mail-templates__tab.is-active {
  border-color: var(--vpm-primary, #2962ff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--vpm-primary, #2962ff) 35%, transparent);
}

.vpm-mail-templates__tab-label {
  font-size: 14px;
  font-weight: 600;
}

.vpm-mail-templates__tab-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--vpm-ds-text-muted);
}

.vpm-mail-compose__select {
  padding-right: 8px;
  cursor: pointer;
}

.vpm-mail-compose__panel {
  padding: 16px 16px 16px 0;
}

.vpm-mail-compose__panel.is-hidden,
.vpm-mail-compose__body.is-hidden {
  display: none;
}

.vpm-mail-compose__panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vpm-mail-compose__panel-grid .vpm-field--full {
  grid-column: 1 / -1;
}

.vpm-mail-compose__panel-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--vpm-ds-text-muted);
}

@media (max-width: 640px) {
  .vpm-mail-compose__panel-grid {
    grid-template-columns: 1fr;
  }
}
