/* ==========================================================================
   Deal view page — info, stepper, chats
   ========================================================================== */

/* ---------- back link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.25s var(--ease-out), gap 0.25s var(--ease-out);
}
.back-link:hover { color: var(--ink); gap: 12px; }
.back-link svg { width: 16px; height: 16px; }

@keyframes dvRise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.dv-header { animation: dvRise 0.6s var(--ease-out) both; margin-top: 14px; }
.dv-body { animation: dvRise 0.6s 0.1s var(--ease-out) both; }

/* ---------- deal header card ---------- */
.dv-header {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3.5vw, 36px);
  position: relative;
  overflow: hidden;
  z-index: 2; /* sticky side column must never paint over the header */
}
.dv-header::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 38px solid var(--lime);
  opacity: 0.12;
  pointer-events: none;
}
.dv-header__top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dv-header__id {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dv-header__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-strong);
  animation: dvPulse 2.2s infinite;
}
@keyframes dvPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(195, 242, 21, 0.5); }
  60% { box-shadow: 0 0 0 7px rgba(195, 242, 21, 0); }
}
.dv-header__status {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
}
.dv-header__title {
  position: relative;
  margin-top: 12px;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.dv-header__meta {
  position: relative;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 800px) {
  .dv-header__meta { grid-template-columns: repeat(4, 1fr); }
}
.dv-meta__item { display: grid; gap: 3px; }
.dv-meta__item span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.dv-meta__item b {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.dv-meta__item b em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 4px;
}
.dv-meta__item--amount b { color: var(--lime); }
.dv-header__actions {
  position: relative;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- stepper ---------- */
.dv-stepper {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.5vw, 26px) clamp(16px, 2.5vw, 28px);
  overflow-x: auto;
  scrollbar-width: none;
}
.dv-stepper::-webkit-scrollbar { display: none; }
.dv-stepper__track {
  display: flex;
  gap: 0;
  min-width: 640px;
}
.dv-step {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 9px;
  position: relative;
  text-align: center;
}
.dv-step::before {
  content: "";
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.dv-step:first-child::before { display: none; }
.dv-step.is-done::before,
.dv-step.is-active::before { background: var(--lime-strong); }
.dv-step__dot {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--white);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.dv-step.is-done .dv-step__dot {
  border-color: var(--lime-strong);
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/11px;
  color: transparent;
}
@keyframes stepPulse {
  0% { box-shadow: 0 0 0 0 rgba(195, 242, 21, 0.85), 0 0 0 0 rgba(195, 242, 21, 0.45); }
  70% { box-shadow: 0 0 0 16px rgba(195, 242, 21, 0), 0 0 0 26px rgba(195, 242, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(195, 242, 21, 0), 0 0 0 0 rgba(195, 242, 21, 0); }
}
.dv-step.is-active .dv-step__dot {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
  animation: stepPulse 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.dv-step__name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.dv-step.is-active .dv-step__name { color: var(--ink); }
.dv-step:not(.is-active):not(.is-done) .dv-step__name { color: var(--muted); }

/* ---------- layout ---------- */
.dv-body {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  align-items: start;
}
.dv-body > * { min-width: 0; }
@media (min-width: 1100px) {
  .dv-body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* ---------- tabs ---------- */
.dv-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
}
.dv-tabs.is-scrolled {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.dv-tabs::-webkit-scrollbar { display: none; }
.dv-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out);
}
.dv-tab:hover { border-color: var(--ink); }
.dv-tab svg { width: 17px; height: 17px; }
.dv-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.dv-tab.is-active svg { color: var(--lime); }

.dv-panel {
  margin-top: 14px;
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  overflow: hidden;
}
.dv-panel[hidden] { display: none; }

/* ---------- info panel ---------- */
.dv-info { padding: clamp(18px, 3vw, 32px); display: grid; gap: 22px; animation: dvRise 0.45s var(--ease-out); }
.dv-info__group { display: grid; gap: 14px; }
.dv-info__label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.dv-info__row {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dv-info__row:last-child { border-bottom: 0; }
.dv-info__row span { font-size: 13px; color: var(--muted); }
.dv-info__row p { font-size: 15px; line-height: 1.55; font-weight: 500; }
.dv-info__row p.mono { font-family: var(--mono); }

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 8px 4px 0;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.25s;
}
.file-link:hover { background: var(--surface-2); }
.file-link svg { width: 17px; height: 17px; color: var(--olive-deep); }
.file-link em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- chat ---------- */
.dv-chat { display: flex; flex-direction: column; height: clamp(480px, 60vh, 640px); animation: dvRise 0.45s var(--ease-out); }
.dv-chat__head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.chat-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}
.chat-avatar--olive { background: var(--olive); color: var(--white); }
.chat-avatar--lime { background: var(--lime); color: var(--ink); }
.chat-avatar--ink { background: var(--ink); color: var(--lime); }
.chat-avatar--ink svg { width: 20px; height: 20px; }
.chat-avatars {
  flex: none;
  display: flex;
}
.chat-avatars .chat-avatar {
  width: 38px;
  height: 38px;
  font-size: 12.5px;
  border: 2px solid var(--white);
  margin-left: -8px;
}
.chat-avatars .chat-avatar:first-child { margin-left: 0; }
.dv-chat__who { display: grid; gap: 1px; min-width: 0; }
.dv-chat__who b { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dv-chat__who > span { font-size: 12.5px; color: var(--muted); }
.dv-chat__badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
}

.dv-chat__list {
  flex: 1;
  overflow-y: auto;
  padding: clamp(16px, 2.5vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.chat-day {
  align-self: center;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
}
.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 78%;
  animation: msgIn 0.35s var(--ease-out);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.chat-msg--them { align-self: flex-start; }
.chat-msg--me { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg__avatar { width: 32px; height: 32px; font-size: 12px; flex: none; margin-top: auto; }
.chat-msg__bubble {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.5;
}
.chat-msg--them .chat-msg__bubble {
  background: var(--surface);
  border-bottom-left-radius: 6px;
}
.chat-msg--me .chat-msg__bubble {
  background: var(--ink);
  color: var(--white);
  border-bottom-right-radius: 6px;
}
.chat-msg__time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}
.chat-msg--me .chat-msg__time { color: rgba(255, 255, 255, 0.45); }

.chat-msg--typing .chat-msg__bubble { display: flex; gap: 5px; align-items: center; padding: 15px 18px; }
.chat-msg--typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingDots 1.1s infinite;
}
.chat-msg--typing i:nth-child(2) { animation-delay: 0.18s; }
.chat-msg--typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingDots {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* chat input */
.dv-chat__form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px clamp(16px, 2.5vw, 24px);
  border-top: 1px solid var(--line);
  background: var(--white);
}
.dv-chat__input {
  flex: 1;
  min-height: 48px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 13px 20px;
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.dv-chat__input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(130, 170, 60, 0.12);
}
.dv-chat__send {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.dv-chat__send:hover { background: var(--lime-strong); transform: scale(1.08); }
.dv-chat__send:active { transform: scale(0.94); }
.dv-chat__send svg { width: 19px; height: 19px; }

/* ---------- side cards ---------- */
.dv-side { display: grid; gap: 14px; }
@media (min-width: 1100px) { .dv-side { position: sticky; top: 86px; } }

.dv-escrow {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 4px;
}
.dv-escrow__label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: 8px;
}
.dv-escrow__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.dv-escrow__row span { font-size: 14px; color: var(--muted); }
.dv-escrow__row b { font-family: var(--mono); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.dv-escrow__row--total { border-bottom: 0; }
.dv-escrow__row--total b { color: var(--ink); font-size: 16.5px; }
.dv-escrow__shield {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--olive-deep);
}
.dv-escrow__shield svg { width: 17px; height: 17px; flex: none; }

.dv-parties {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 14px;
}
.dv-party {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 0;
}
.dv-party + .dv-party { border-top: 1px solid var(--line); }
.dv-party__who { display: grid; gap: 1px; min-width: 0; }
.dv-party__who b { font-size: 14.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.dv-party__who span { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.dv-party__id {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  opacity: 0.75;
}
.dv-party__role {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
}

.dv-invite {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 12px;
}
.dv-invite__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.dv-invite__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1.5px dashed rgba(210, 250, 50, 0.45);
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lime);
  word-break: break-all;
}
.dv-invite__copy {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: rgba(210, 250, 50, 0.14);
  border: 1.5px solid rgba(210, 250, 50, 0.45);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.dv-invite__copy:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); transform: translateY(-2px); }
.dv-invite__copy svg { width: 16px; height: 16px; }

/* guarantor mode */
.dv-header__gagent {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(210, 250, 50, 0.18);
  border: 1px solid rgba(210, 250, 50, 0.5);
  color: var(--lime);
}

/* dispute banner */
.dv-dispute {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  background: rgba(229, 83, 60, 0.08);
  border: 1.5px solid rgba(229, 83, 60, 0.35);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.8vw, 26px);
  display: grid;
  gap: 12px;
  animation: dvRise 0.5s var(--ease-out);
}
.dv-dispute__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.dv-dispute__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 720px;
}

/* escrow timer — prominent lime block */
.dv-escrow__timer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--lime);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.dv-escrow__timer svg { width: 19px; height: 19px; flex: none; color: var(--ink); }
.dv-escrow__timer b {
  font-family: var(--mono);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dv-escrow__timer.is-over { background: rgba(229, 83, 60, 0.15); }
.dv-escrow__timer.is-over b { color: var(--danger); }

/* chat system notifications */
.chat-system {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 88%;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  animation: msgIn 0.35s var(--ease-out);
}
.chat-system svg { width: 15px; height: 15px; flex: none; color: var(--olive-deep); }

/* admin support mode */
.support-admin .support-topics { display: none; }
.support-admin .chat-msg--me .chat-msg__bubble {
  background: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .dv-header, .dv-body, .dv-info, .dv-chat, .chat-msg, .chat-system, .dv-dispute { animation: none; }
  .dv-step.is-active .dv-step__dot { animation: none; box-shadow: 0 0 0 5px rgba(210, 250, 50, 0.3); }
}

/* ==========================================================================
   Deal lifecycle states (waiting / accept / deposit / review / payout / done)
   ========================================================================== */

/* status notice bar (like dispute) */
.dv-notice {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.8vw, 26px);
  display: grid;
  gap: 12px;
  animation: dvRise 0.5s var(--ease-out);
}
.dv-notice__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dv-notice__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.dv-notice__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}
.dv-notice__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.dv-notice--waiting { background: rgba(130, 170, 60, 0.12); border: 1.5px solid rgba(130, 170, 60, 0.4); }
.dv-notice--accept { background: rgba(210, 250, 50, 0.22); border: 1.5px solid rgba(130, 170, 60, 0.5); }
.dv-notice--deposit { background: var(--surface); border: 1.5px dashed rgba(12, 12, 13, 0.3); }
.dv-notice--review { background: rgba(12, 12, 13, 0.05); border: 1.5px solid var(--line); }
.dv-notice--payout { background: rgba(210, 250, 50, 0.3); border: 1.5px solid var(--ink); }

.dv-accept-count {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1.5px solid var(--line);
}
.dv-accept-count.is-full { background: var(--lime); border-color: var(--ink); }

/* participants: awaiting counterparty placeholder */
.dv-party--placeholder .chat-avatar {
  background: transparent;
  border: 1.5px dashed rgba(12, 12, 13, 0.35);
  color: var(--muted);
}
.dv-party--placeholder b { color: var(--muted); }

/* small inline input inside notice actions */
.dv-tx-input {
  min-height: 46px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  min-width: 220px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.dv-tx-input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(130, 170, 60, 0.14);
}
.dv-tx-input::placeholder { color: #b4b4bb; font-family: var(--font); }

/* chat locked hint */
.dv-chat__lock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px clamp(16px, 2.5vw, 24px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.dv-chat__lock svg { width: 16px; height: 16px; }

/* requisites system message emphasis */
.chat-system--req {
  background: var(--lime);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}
.chat-system--req > svg { color: var(--ink); }
.chat-system--req .req-copy svg { color: currentColor; }

/* demo state switcher */
.dv-demo-switch {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-card);
  font-size: 12.5px;
}
.dv-demo-switch span { font-family: var(--mono); letter-spacing: 0.06em; color: var(--lime); font-weight: 600; }
.dv-demo-switch select {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--lime);
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  appearance: none;
}

@media (prefers-reduced-motion: reduce) {
  .dv-notice { animation: none; }
}

/* requisites: copy from chat message */
.req-address {
  font-family: var(--mono);
  word-break: break-all;
}
.req-copy {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(12, 12, 13, 0.08);
  transition: background-color 0.25s, color 0.25s;
}
.req-copy:hover { background: var(--ink); color: var(--lime); }
.req-copy svg { width: 14px; height: 14px; }
.chat-system--req { cursor: default; }

/* requisites block in the deposit notice */
.dv-requisites {
  border: 1.5px dashed rgba(12, 12, 13, 0.4);
  border-radius: var(--r-md);
  background: var(--white);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}
.dv-requisites__label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.dv-requisites__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dv-requisites__row .req-address {
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.dv-requisites__copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.dv-requisites__copy:hover { background: #1d1d20; transform: translateY(-2px); }
.dv-requisites__copy svg { width: 15px; height: 15px; }
.dv-requisites__hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* pending note inside the light escrow card */
.dv-escrow__pending {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ==========================================================================
   Верифицированный гарант — бейдж с галочкой на аватарке
   ========================================================================== */
.chat-avatar--ink {
  position: relative;
}

.chat-avatar--ink::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  border: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px;
  z-index: 2;
}

/* в шапке чата аватар чуть больше — бейдж тоже */
.dv-chat__head .chat-avatar--ink::after {
  width: 16px;
  height: 16px;
  border: none;
  background-size: 9px;
}

/* на чёрном фоне шапки — рамка бейджа тёмная */
.support-chat .dv-chat__head .chat-avatar--ink::after,
.dv-chat__head .chat-avatar--ink::after {
  /* без рамки — чисто салатовый */
}

/* в поддержке тоже */
.support-chat .chat-avatar--ink::after {
  /* без рамки */
}

/* счётчик непрочитанных на вкладке чата */
.dv-tab .tab-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--ink);
  color: var(--lime);
  vertical-align: middle;
  margin-left: 6px;
}
.dv-tab.is-active .tab-badge {
  background: var(--lime);
  color: var(--ink);
}
.dv-tab .tab-badge.is-visible { display: inline-flex; }


/* requisites: copy from chat message */
.req-address {
  font-family: var(--mono);
  word-break: break-all;
}
.req-copy {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(12, 12, 13, 0.08);
  transition: background-color 0.25s, color 0.25s;
}
.req-copy:hover { background: var(--ink); color: var(--lime); }
.req-copy svg { width: 14px; height: 14px; }
.chat-system--req { cursor: default; }

/* requisites block in the deposit notice */
.dv-requisites {
  border: 1.5px dashed rgba(12, 12, 13, 0.4);
  border-radius: var(--r-md);
  background: var(--white);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}
.dv-requisites__label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.dv-requisites__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dv-requisites__row .req-address {
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.dv-requisites__copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.dv-requisites__copy:hover { background: #1d1d20; transform: translateY(-2px); }
.dv-requisites__copy svg { width: 15px; height: 15px; }
.dv-requisites__hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* pending note inside the light escrow card */
.dv-escrow__pending {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink-soft);
}

/* счётчик непрочитанных на вкладке чата */
.dv-tab .tab-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--ink);
  color: var(--lime);
  vertical-align: middle;
  margin-left: 6px;
}
.dv-tab.is-active .tab-badge {
  background: var(--lime);
  color: var(--ink);
}
.dv-tab .tab-badge.is-visible { display: inline-flex; }

/* requisites: copy from chat message */
.req-address {
  font-family: var(--mono);
  word-break: break-all;
}
.req-copy {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(12, 12, 13, 0.08);
  transition: background-color 0.25s, color 0.25s;
}
.req-copy:hover { background: var(--ink); color: var(--lime); }
.req-copy svg { width: 14px; height: 14px; }
.chat-system--req { cursor: default; }

/* requisites block in the deposit notice */
.dv-requisites {
  border: 1.5px dashed rgba(12, 12, 13, 0.4);
  border-radius: var(--r-md);
  background: var(--white);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}
.dv-requisites__label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.dv-requisites__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dv-requisites__row .req-address {
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.dv-requisites__copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.dv-requisites__copy:hover { background: #1d1d20; transform: translateY(-2px); }
.dv-requisites__copy svg { width: 15px; height: 15px; }
.dv-requisites__hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* pending note inside the light escrow card */
.dv-escrow__pending {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink-soft);
}

/* счётчик непрочитанных на вкладке чата */
.dv-tab .tab-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--ink);
  color: var(--lime);
  vertical-align: middle;
  margin-left: 6px;
}
.dv-tab.is-active .tab-badge {
  background: var(--lime);
  color: var(--ink);
}
.dv-tab .tab-badge.is-visible { display: inline-flex; }

/* шапка поддержки — без бейджа верификации (только в сообщениях) */
.support-chat .dv-chat__head .chat-avatar--ink::after {
  display: none !important;
}

/* аватар неизвестного участника — серый + силуэт */
.chat-avatar--empty {
  background: var(--surface-2, #e8e8ec);
  color: var(--muted, #74747c);
}
.chat-avatar--empty svg {
  width: 18px;
  height: 18px;
}
