/* Partner marketplace (ویژه همکاران) + partner signup */
:root { --secure: #0e9f6e; --secure-dark: #057a55; --secure-tint: color-mix(in srgb, #0e9f6e 12%, transparent); }

/* ---------- form helpers ---------- */
.form-grid-2, .form-grid-3 { display: grid; gap: 0.85rem; }
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.form-row--check { align-content: end; }
.check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.form-more { border: 1px dashed var(--border); border-radius: 12px; padding: 0.6rem 0.9rem; }
.form-more summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.form-more[open] summary { margin-bottom: 0.75rem; }
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; min-height: 0; }
.btn--secure { background: var(--secure); color: #fff; border-color: var(--secure); display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; }
.btn--secure:hover { background: var(--secure-dark); color: #fff; }
.btn--secure svg { width: 1.2rem; height: 1.2rem; }
fieldset.role-section { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 0.85rem; }
fieldset.role-section[hidden] { display: none; }

/* ---------- role choice ---------- */
.role-pick { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .role-pick { grid-template-columns: 1fr 1fr; } }
.role-pick__opt { position: relative; cursor: pointer; }
.role-pick__opt input { position: absolute; opacity: 0; inset: 0; }
.role-pick__card {
  display: grid;
  gap: 0.25rem;
  justify-items: start;
  height: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.role-pick__card svg { width: 1.8rem; height: 1.8rem; color: var(--text-muted); }
.role-pick__card small { color: var(--text-muted); font-size: 0.8rem; }
.role-pick__opt:hover .role-pick__card { transform: translateY(-2px); }
.role-pick__opt input:checked + .role-pick__card { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.role-pick__opt input:checked + .role-pick__card svg { color: var(--brand); }
.role-pick__opt input:focus-visible + .role-pick__card { outline: 2px solid var(--brand); outline-offset: 2px; }
.partner-note {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--brand-tint);
  font-size: 0.86rem;
  line-height: 1.8;
}

/* ---------- searchable combobox ---------- */
.combo { position: relative; }
.combo__list {
  position: absolute;
  z-index: 30;
  inset-inline: 0;
  top: 100%;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0.25rem 0 0;
  padding: 0.3rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}
.combo__list li { padding: 0.5rem 0.7rem; border-radius: 8px; cursor: pointer; font-size: 0.9rem; }
.combo__list li:hover, .combo__list li.is-active { background: var(--brand-tint); color: var(--brand); }
.combo__list li.combo__empty { color: var(--text-muted); cursor: default; background: none; }
.combo input:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- pending / gate card ---------- */
.pending-card {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.pending-card h1 { margin: 0; font-size: 1.35rem; }
.pending-card p { margin: 0; line-height: 1.9; color: var(--text-muted); }
.pending-card__icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #7c2d12;
  animation: pending-pulse 2.4s ease-in-out infinite;
}
.pending-card__icon svg { width: 2.2rem; height: 2.2rem; }
.pending-card__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.pending-card--inline { grid-template-columns: auto 1fr; justify-items: start; text-align: start; padding: 1rem; margin-bottom: 1rem; border-color: #f59e0b; background: color-mix(in srgb, #fde68a 25%, var(--surface)); }
.pending-card--inline .pending-card__icon { width: 2.6rem; height: 2.6rem; }
.pending-card--inline .pending-card__icon svg { width: 1.5rem; height: 1.5rem; }
.pending-card--inline p { color: var(--text); font-weight: 600; }
@keyframes pending-pulse { 50% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.15); } }

/* ---------- partner panel ---------- */
.partner-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.partner-head__who { display: flex; align-items: center; gap: 0.85rem; }
.partner-head h1 { margin: 0; font-size: 1.3rem; }
.partner-head p { margin: 0.2rem 0 0; font-size: 0.85rem; }
.partner-head__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #f97316);
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
}
.verified { color: var(--secure); font-size: 0.8rem; font-weight: 700; }
.partner-tabs { display: flex; gap: 0.25rem; overflow-x: auto; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.partner-tabs a {
  padding: 0.65rem 1rem;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.partner-tabs a:hover { color: var(--text); }
.partner-tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.pill { display: inline-block; min-width: 1.3rem; padding: 0 0.35rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: 0.72rem; line-height: 1.3rem; text-align: center; }
.pill--red { background: #ef4444; color: #fff; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat { padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat b { display: block; font-size: 1.5rem; }
.stat span { font-size: 0.82rem; color: var(--text-muted); }
.notice { padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: var(--brand-tint); font-size: 0.9rem; }
.notice--warn { background: color-mix(in srgb, #fde68a 40%, var(--surface)); color: #78350f; }
.empty-box { display: grid; justify-items: center; gap: 0.75rem; padding: 2.5rem 1rem; border: 1px dashed var(--border); border-radius: 16px; text-align: center; color: var(--text-muted); }
.empty-box p { margin: 0; }

.my-listings { display: grid; gap: 0.75rem; }
.my-listing {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.my-listing__img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-accent); }
.my-listing__img img { width: 100%; height: 100%; object-fit: cover; }
.my-listing h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.my-listing h3 a { color: inherit; text-decoration: none; }
.my-listing p { margin: 0 0 0.35rem; font-size: 0.85rem; }
.my-listing__reason { color: #b91c1c; }
.my-listing__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: end; }
.my-listing__actions form { display: flex; gap: 0.4rem; margin: 0; }
@media (max-width: 640px) {
  .my-listing { grid-template-columns: 4.5rem 1fr; }
  .my-listing__actions { grid-column: 1 / -1; justify-content: start; }
}
.status { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--bg-accent); color: var(--text-muted); }
.status--pending, .status--deal-awaiting_payment { background: #fef3c7; color: #92400e; }
.status--approved, .status--deal-settled { background: #dcfce7; color: #166534; }
.status--rejected, .status--deal-disputed { background: #fee2e2; color: #991b1b; }
.status--sold, .status--deal-confirmed { background: #e0e7ff; color: #3730a3; }
.status--deal-paid, .status--deal-shipped { background: #dbeafe; color: #1e40af; }

/* ---------- listing form ---------- */
.listing-form h2 { margin: 0; }
.pay-pick { display: grid; gap: 0.6rem; border: 0; padding: 0; margin: 0; }
.pay-pick legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
@media (min-width: 720px) { .pay-pick { grid-template-columns: repeat(3, 1fr); } }
.pay-pick__opt {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pay-pick__opt input { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--brand); flex: 0 0 auto; }
.pay-pick__opt span { display: grid; gap: 0.2rem; }
.pay-pick__opt small { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }
.pay-pick__opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.pay-pick__opt--secure:has(input:checked) { border-color: var(--secure); background: var(--secure-tint); }
.pay-pick__opt--secure input { accent-color: var(--secure); }
.pay-pick__opt em { font-style: normal; font-size: 0.7rem; padding: 0 0.4rem; border-radius: 999px; background: var(--secure); color: #fff; margin-inline-start: 0.25rem; }
.pay-pick__opt.is-off { opacity: 0.55; cursor: not-allowed; }
.img-keep, .img-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.img-keep__item { display: grid; gap: 0.25rem; justify-items: center; font-size: 0.78rem; cursor: pointer; }
.img-keep__item img, .img-preview img { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.img-keep__item:has(input:checked) img { opacity: 0.35; outline: 2px solid #ef4444; }

/* ---------- market list ---------- */
.mk-hero {
  padding: 1.6rem 0;
  background:
    radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--secure) 18%, transparent), transparent 45%),
    radial-gradient(circle at 90% 80%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 45%),
    var(--bg-accent);
  border-bottom: 1px solid var(--border);
}
.mk-hero__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.mk-hero h1 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.mk-hero p { margin: 0; color: var(--text-muted); max-width: 40rem; line-height: 1.8; }
.mk-hero__cta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mk-wrap { padding-top: 1.25rem; }
.mk-layout { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 900px) { .mk-layout { grid-template-columns: 16rem 1fr; } }
.mk-filters { position: sticky; top: 5rem; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.mk-filters .form { display: grid; gap: 0.8rem; }
.mk-filters .form-grid-2 { grid-template-columns: 1fr; }
@media (max-width: 899px) { .mk-filters { position: static; } }
.mk-sortbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.9rem; font-size: 0.88rem; color: var(--text-muted); }
.mk-sortbar nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.mk-sortbar a { padding: 0.3rem 0.7rem; border-radius: 999px; text-decoration: none; color: var(--text-muted); }
.mk-sortbar a.is-active { background: var(--text); color: var(--surface); }
.mk-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
.mk-grid--4 { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.mk-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.mk-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.09); }
.mk-card__img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg-accent); }
.mk-card__img img { width: 100%; height: 100%; object-fit: cover; }
.mk-card__badge {
  position: absolute;
  top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.mk-card__badge svg { width: 0.9rem; height: 0.9rem; }
.mk-card__badge--secure { inset-inline-start: 0.5rem; background: var(--secure); color: #fff; }
.mk-card__badge--gold { inset-inline-end: 0.5rem; background: linear-gradient(135deg, #fde68a, #d97706); color: #451a03; }
.mk-card__badge.mk-inline { position: static; }
.mk-card__body { display: grid; gap: 0.3rem; padding: 0.75rem 0.85rem 0.85rem; }
.mk-card__title { font-weight: 700; font-size: 0.93rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.mk-card__meta { font-size: 0.76rem; color: var(--text-muted); }
.mk-card__price { font-weight: 800; color: var(--brand); }
.mk-card__price small { font-weight: 500; color: var(--text-muted); }
.mk-card__foot { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.74rem; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 0.45rem; }
.mk-card__foot > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mk-card__views { display: inline-flex; align-items: center; gap: 0.2rem; flex: 0 0 auto; }
.mk-card__views svg { width: 0.9rem; height: 0.9rem; }
.mk-pager { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin-top: 1.25rem; }
.mk-pager a { min-width: 2.2rem; padding: 0.35rem 0.6rem; text-align: center; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: inherit; }
.mk-pager a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- market detail ---------- */
.mk-crumbs { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.mk-crumbs a { color: inherit; }
.mk-detail__grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .mk-detail__grid { grid-template-columns: 1fr 1.05fr; } }
.mk-gallery__main { aspect-ratio: 1; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-accent); }
.mk-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.mk-gallery__thumbs { display: flex; gap: 0.5rem; margin-top: 0.6rem; overflow-x: auto; }
.mk-gallery__thumbs button { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.mk-gallery__thumbs button.is-active { border-color: var(--brand); }
.mk-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.mk-info h1 { margin: 0 0 0.35rem; font-size: 1.4rem; line-height: 1.6; }
.mk-info__meta { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.mk-price { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.9rem; }
.mk-price b { font-size: 1.6rem; color: var(--brand); }
.mk-price span { font-size: 0.8rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bg-accent); }
.mk-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; margin: 0 0 0.9rem; }
.mk-specs > div { padding: 0.55rem 0.7rem; border-radius: 12px; background: var(--bg-accent); }
.mk-specs dt { font-size: 0.75rem; color: var(--text-muted); }
.mk-specs dd { margin: 0.15rem 0 0; font-weight: 700; font-size: 0.9rem; }
.mk-specs--rows { grid-template-columns: 1fr; }
.mk-specs--rows > div { display: flex; justify-content: space-between; gap: 1rem; }
.mk-specs--rows dd { margin: 0; text-align: end; }
.mk-pays { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 1rem; font-size: 0.85rem; }
.mk-pays__title { color: var(--text-muted); }
.mk-pay { padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid var(--border); font-weight: 600; font-size: 0.8rem; }
.mk-pay--secure { border-color: var(--secure); background: var(--secure-tint); color: var(--secure-dark); }
.mk-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.mk-actions .btn { flex: 1 1 12rem; }
.mk-locked { display: grid; gap: 0.5rem; width: 100%; padding: 0.9rem; border-radius: 14px; border: 1px dashed var(--border); text-align: center; }
.mk-locked p { margin: 0; font-size: 0.88rem; }
.mk-contact[hidden] { display: none; }
.mk-contact { display: grid; gap: 0.4rem; padding: 0.8rem; margin-bottom: 0.9rem; border-radius: 14px; background: var(--bg-accent); }
.mk-contact__row { display: flex; justify-content: space-between; padding: 0.45rem 0.6rem; border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.9rem; }
.mk-contact__warn { margin: 0.2rem 0 0; font-size: 0.78rem; color: #92400e; }
.mk-chat-start { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.mk-chat-start label { font-weight: 600; font-size: 0.88rem; }
.mk-chat-start__row { display: flex; gap: 0.5rem; }
.mk-chat-start__row input { flex: 1; min-width: 0; font: inherit; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.mk-seller { display: flex; gap: 0.75rem; align-items: center; padding: 0.8rem; border: 1px solid var(--border); border-radius: 14px; }
.mk-seller strong { display: block; }
.mk-seller small { font-size: 0.78rem; }
.mk-desc, .mk-safety, .mk-related { margin-top: 1.75rem; }
.mk-desc h2, .mk-safety h2, .mk-related h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.mk-desc p { white-space: pre-line; line-height: 2; margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.mk-safety { display: grid; gap: 1rem; }
@media (min-width: 900px) { .mk-safety { grid-template-columns: 1.2fr 1fr; } }
.mk-safety > div { padding: 1rem 1.1rem; border-radius: 16px; }
.mk-safety__secure { background: var(--secure-tint); border: 1px solid color-mix(in srgb, var(--secure) 35%, transparent); }
.mk-safety__secure ol { margin: 0; padding-inline-start: 1.2rem; line-height: 2; font-size: 0.9rem; }
.mk-safety__disclaimer { background: color-mix(in srgb, #fde68a 22%, var(--surface)); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.mk-safety__disclaimer p { margin: 0 0 0.6rem; line-height: 2; font-size: 0.88rem; }
.mk-safety details summary { cursor: pointer; font-size: 0.82rem; color: #b91c1c; }
.mk-report { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.mk-report textarea { font: inherit; padding: 0.5rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }

/* ---------- buy / deal ---------- */
.buy-summary { display: flex; gap: 1rem; align-items: center; padding: 0.85rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.buy-summary img { width: 5rem; height: 5rem; object-fit: cover; border-radius: 10px; }
.buy-summary div { display: grid; gap: 0.2rem; }
.secure-terms { padding: 0.9rem 1rem; border-radius: 14px; background: var(--secure-tint); font-size: 0.88rem; }
.secure-terms ul { margin: 0.4rem 0 0.7rem; padding-inline-start: 1.2rem; line-height: 1.9; }
.deal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.deal-head h1 { margin: 0; font-size: 1.3rem; }
.deal-head p { margin: 0.2rem 0 0; font-size: 0.85rem; }
.deal-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin: 0 0 1.25rem; padding: 0; list-style: none; counter-reset: s; }
.deal-steps li { position: relative; display: grid; justify-items: center; gap: 0.25rem; text-align: center; font-size: 0.82rem; color: var(--text-muted); }
.deal-steps li::before { content: ""; position: absolute; top: 1rem; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.deal-steps li:last-child::before { display: none; }
.deal-steps b { position: relative; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg-accent); border: 2px solid var(--border); }
.deal-steps li.is-done { color: var(--text); font-weight: 600; }
.deal-steps li.is-done b { background: var(--secure); border-color: var(--secure); color: #fff; }
.deal-steps li.is-done::before { background: var(--secure); }
.deal-steps small { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }
.deal-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 820px) { .deal-grid { grid-template-columns: 1.2fr 1fr; } }
.deal-box { padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.deal-box h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.deal-box p { line-height: 1.9; font-size: 0.9rem; }
.deal-box .form { display: grid; gap: 0.6rem; }
.deal-box--action { border-color: color-mix(in srgb, var(--secure) 40%, var(--border)); }
.deal-dispute { margin-top: 0.75rem; }
.deal-dispute summary { cursor: pointer; color: #b91c1c; font-size: 0.85rem; }
.deal-dispute textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--border); border-radius: 10px; margin: 0.5rem 0; background: var(--surface); color: var(--text); }
.deal-list { display: grid; gap: 0.5rem; }
.deal-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.deal-row:hover { border-color: var(--brand); }
.deal-row.is-unread { border-inline-start: 4px solid var(--brand); }
.deal-row__title { display: grid; gap: 0.15rem; font-weight: 600; min-width: 0; }
.deal-row__title small { font-weight: 400; font-size: 0.78rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.deal-row__amount { font-weight: 700; }
.deal-row__role { padding: 0.15rem 0.55rem; border-radius: 8px; font-size: 0.75rem; font-weight: 700; }
.deal-row__role--buy { background: #dbeafe; color: #1e40af; }
.deal-row__role--sell { background: #dcfce7; color: #166534; }
@media (max-width: 640px) { .deal-row { grid-template-columns: auto 1fr; } }

/* ---------- messages ---------- */
.thread-listing { display: flex; gap: 0.75rem; align-items: center; padding: 0.6rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 14px; color: var(--text); text-decoration: none; background: var(--surface); }
.thread-listing img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 10px; }
.thread-listing span { display: grid; gap: 0.15rem; }
.thread { display: grid; gap: 0.6rem; padding: 1rem; min-height: 14rem; max-height: 60vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-accent); }
.bubble { max-width: 80%; padding: 0.6rem 0.85rem; border-radius: 16px 16px 16px 4px; background: var(--surface); justify-self: end; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); }
.bubble--me { justify-self: start; border-radius: 16px 16px 4px 16px; background: var(--brand); color: #fff; }
.bubble p { margin: 0; white-space: pre-line; line-height: 1.8; }
.bubble small { display: block; margin-top: 0.25rem; font-size: 0.7rem; opacity: 0.75; }
.thread-form { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.thread-form textarea { flex: 1; font: inherit; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 14px; resize: vertical; background: var(--surface); color: var(--text); }
.thread-tip { font-size: 0.8rem; margin-top: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  .pending-card__icon { animation: none; }
  .mk-card, .role-pick__card { transition: none; }
}
