/* ═══════════════════════════════════════════════
   P2P TRADING ADDON — STYLES
   ═══════════════════════════════════════════════ */

/* Layout */
.p2p-wrap {
  padding: 0 0 40px;
}

.p2p-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.p2p-btn-outline {
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  background: transparent;
  border-radius: 8px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
}

.p2p-btn-outline:hover {
  border-color: var(--site-color);
  color: var(--site-color);
  background: rgba(99, 102, 241, .08);
}

/* Inputs / Selects / Textareas */
.p2p-input,
.p2p-select,
.p2p-textarea {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color .2s;
}

.p2p-input:focus,
.p2p-select:focus,
.p2p-textarea:focus {
  border-color: var(--site-color);
  box-shadow: none;
}

.p2p-select {
  appearance: none;
  cursor: pointer;
}

.p2p-textarea {
  resize: vertical;
  min-height: 80px;
}

.p2p-error {
  color: #f87171;
  font-size: 0.78rem;
  margin-top: 4px;
}

.p2p-filter-label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}

.p2p-filter-hint {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 400;
  margin-left: 2px;
}

/* Tabs */
.p2p-type-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 20px;
}

.p2p-type-tab {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.p2p-type-tab.active {
  color: var(--site-color);
  border-bottom-color: var(--site-color);
}

.p2p-type-tab:hover:not(.active) {
  color: #94a3b8;
}

/* Filters bar */
.p2p-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
}

.p2p-filter-group {
  display: flex;
  flex-direction: column;
}

/* Ad list */
.p2p-ad-list {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.p2p-ad-header {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.6fr 1.5fr 120px;
  padding: 10px 16px;
  background: #1e293b;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.p2p-ad-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.6fr 1.5fr 120px;
  padding: 14px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  align-items: center;
  transition: background .15s;
}

.p2p-ad-row:hover {
  background: rgba(255, 255, 255, .02);
}

.p2p-ad-cell {
  font-size: 0.875rem;
}

/* Trader info */
.p2p-trader {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p2p-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--site-color, #6366f1), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.p2p-trader-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.3;
}

.p2p-verified {
  font-size: 0.72rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 2px;
}

.p2p-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #10b981;
  margin: 0;
}

.p2p-price--sell {
  color: #f87171;
}

.p2p-coin-label {
  font-size: 0.75rem;
  color: #64748b;
  margin: 2px 0 0;
}

.p2p-limit {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.p2p-avail {
  font-size: 0.8rem;
  color: #64748b;
  margin: 2px 0 0;
}

/* Order modal */
.p2p-modal-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(16, 185, 129, .08);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, .2);
}

.p2p-modal-label {
  font-size: 0.8rem;
  color: #94a3b8;
}

.p2p-modal-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #10b981;
}

.p2p-input-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.p2p-input-group .p2p-input {
  border-radius: 8px 0 0 8px;
  flex: 1;
}

.p2p-input-suffix {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 0;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  color: #64748b;
  font-size: 0.875rem;
  white-space: nowrap;
}

.p2p-method-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.15);
  margin: 1px;
}

/* Order/Place buttons */
.p2p-order-btn {
  padding: 8px 18px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}

.p2p-order-btn:hover {
  background: #059669;
}

.p2p-sell-btn {
  background: #ef4444;
}

.p2p-sell-btn:hover {
  background: #dc2626;
}

/* Empty state */
.p2p-empty {
  text-align: center;
  padding: 48px 20px;
  color: #475569;
  background-color: #101727;
}

.p2p-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.p2p-empty p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Type radio (buy/sell toggle) */
.p2p-type-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #94a3b8;
  transition: all .2s;
  user-select: none;
}

.p2p-type-radio input {
  display: none;
}

.p2p-type-radio.active {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, .08);
}

.p2p-type-radio.sell.active {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, .08);
}

/* Type badge */
.p2p-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .05em;
}

.p2p-type-badge.buy {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

.p2p-type-badge.sell {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
}

/* Status badges */
.p2p-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.p2p-status-badge.pending {
  background: rgba(234, 179, 8, .15);
  color: #eab308;
}

.p2p-status-badge.paid {
  background: rgba(59, 130, 246, .15);
  color: #3b82f6;
}

.p2p-status-badge.released {
  background: rgba(139, 92, 246, .15);
  color: #8b5cf6;
}

.p2p-status-badge.completed {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

.p2p-status-badge.cancelled {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
}

.p2p-status-badge.disputed {
  background: rgba(251, 146, 60, .15);
  color: #fb923c;
}

.p2p-status-badge.active {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

.p2p-status-badge.paused {
  background: rgba(148, 163, 184, .15);
  color: #94a3b8;
}

.p2p-status-badge.suspended {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
}

.p2p-status-badge.open {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
}

.p2p-status-badge.reviewing {
  background: rgba(234, 179, 8, .15);
  color: #eab308;
}

.p2p-status-badge.resolved {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

/* My Ads card */
.p2p-my-ad-card {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.p2p-my-ad-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 180px;
}

.p2p-my-ad-mid {
  flex: 1 1 130px;
}

.p2p-my-ad-right {
  flex: 0 0 auto;
  text-align: right;
}

.p2p-my-ad-pair {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.p2p-my-ad-price {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

/* Order cards */
.p2p-order-card-link {
  text-decoration: none;
}

.p2p-order-card {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color .2s;
}

.p2p-order-card:hover {
  border-color: rgba(99, 102, 241, .35);
}

.p2p-order-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 160px;
}

.p2p-order-mid {
  flex: 1 1 120px;
}

.p2p-order-right {
  flex: 0 0 auto;
  text-align: right;
}

.p2p-order-no {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}

.p2p-order-pair {
  font-size: 0.75rem;
  color: #64748b;
  margin: 2px 0 0;
}

.p2p-order-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* Order detail rows */
.p2p-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.875rem;
}

.p2p-detail-row span {
  color: #94a3b8;
}

.p2p-detail-row strong {
  color: #e2e8f0;
}

.p2p-detail-row:last-child {
  border-bottom: none;
}

/* Countdown */
.p2p-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(234, 179, 8, .1);
  border-radius: 8px;
  color: #eab308;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Chat */
.p2p-chat-card {
  display: flex;
  flex-direction: column;
  height: 520px;
}

.p2p-chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  background: #070e1a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p2p-chat-system {
  text-align: center;
  margin: 8px 0;
}

.p2p-chat-system span {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  font-size: 0.75rem;
}

.p2p-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.p2p-chat-msg.mine {
  align-self: flex-end;
  align-items: flex-end;
}

.p2p-chat-msg.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.p2p-chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  word-break: break-word;
  line-height: 1.5;
}

.p2p-chat-msg.mine .p2p-chat-bubble {
  background: var(--site-color, #6366f1);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}

.p2p-chat-msg.theirs .p2p-chat-bubble {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 12px 12px 12px 2px;
}

.p2p-chat-img {
  max-width: 200px;
  border-radius: 8px;
  cursor: pointer;
}

.p2p-chat-meta {
  font-size: 0.7rem;
  color: #475569;
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.p2p-chat-input {
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: #0f172a;
}

.p2p-upload-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.p2p-upload-btn:hover {
  background: #334155;
  color: var(--site-color, #6366f1);
}

/* Payment account display (order show) */
.p2p-pay-account {
  background: rgba(16, 185, 129, .05);
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: 12px;
  overflow: hidden;
}

.p2p-pay-method-name {
  background: rgba(16, 185, 129, .1);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  border-bottom: 1px solid rgba(16, 185, 129, .15);
}

.p2p-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .07);
  font-size: 0.875rem;
}

.p2p-pay-row span {
  color: #64748b;
}

.p2p-pay-row strong {
  color: #e2e8f0;
}

.p2p-pay-row:last-of-type {
  border-bottom: none;
}

.p2p-copy-btn {
  background: rgba(148, 163, 184, .1);
  border: none;
  color: #64748b;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  padding: 0;
}

.p2p-copy-btn:hover {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

.p2p-pay-amount-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(16, 185, 129, .08);
  border-top: 1px solid rgba(16, 185, 129, .15);
}

.p2p-pay-amount-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.p2p-pay-amount-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #10b981;
}

.p2p-pay-amount-val small {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 3px;
}

.p2p-pay-missing {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(239, 68, 68, .06);
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 10px;
  padding: 16px;
}

.p2p-pay-missing>i {
  font-size: 1.3rem;
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

.p2p-pay-missing p {
  color: #94a3b8;
}

/* Payment methods */
.p2p-pm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.p2p-pm-row:last-child {
  border-bottom: none;
}

.p2p-pm-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, .1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-color, #6366f1);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Method grid checkboxes */
.p2p-method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p2p-method-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.83rem;
  color: #94a3b8;
  transition: all .2s;
  user-select: none;
}

.p2p-method-check input {
  display: none;
}

.p2p-method-check.checked {
  border-color: var(--site-color, #6366f1);
  color: var(--site-color, #6366f1);
  background: rgba(99, 102, 241, .08);
}

/* Account card inside method-check (sell ad) */
.p2p-method-check div {
  line-height: 1.3;
}

.p2p-method-check.checked div {
  color: var(--site-color, #6366f1);
}

/* Modal */
.p2p-modal .modal-content {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
}

.p2p-modal .modal-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.p2p-modal .modal-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Evidence thumbs */
.p2p-evidence-thumb {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #94a3b8;
}

.p2p-evidence-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Dispute note */
.p2p-dispute-note {
  background: rgba(59, 130, 246, .08);
  border: 1px solid rgba(59, 130, 246, .2);
  border-radius: 8px;
  padding: 10px 14px;
}

/* ── Order Placement Page ── */
.p2p-place-wrap {
  padding: 0 0 48px;
  max-width: 960px;
}

.p2p-place-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color .2s;
  margin-bottom: 4px;
}

.p2p-place-back:hover {
  color: var(--site-color, #6366f1);
}

.p2p-place-ad-card {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 24px;
}

.p2p-place-advertiser {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.p2p-avatar--lg {
  width: 46px;
  height: 46px;
  font-size: 1rem;
}

.p2p-place-username {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}

.p2p-place-divider {
  border-color: rgba(148, 163, 184, 0.1);
  margin: 16px 0;
}

.p2p-place-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  font-size: 0.875rem;
}

.p2p-place-info-row:last-of-type {
  border-bottom: none;
}

.p2p-place-info-label {
  color: #64748b;
  display: flex;
  align-items: center;
}

.p2p-place-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #10b981;
}

.p2p-place-price small {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 4px;
}

.p2p-place-info-val {
  color: #e2e8f0;
  font-weight: 500;
  text-align: right;
}

.p2p-place-info-val small {
  color: #64748b;
  font-size: 0.75rem;
  margin-left: 3px;
}

.p2p-place-terms {
  background: rgba(148, 163, 184, 0.05);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 14px;
}

.p2p-place-terms-label {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 600;
}

.p2p-place-terms-text {
  font-size: 0.83rem;
  color: #94a3b8;
  margin: 0;
  white-space: pre-wrap;
}

.p2p-place-form-card {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 28px;
}

.p2p-place-form-header {
  margin-bottom: 24px;
}

.p2p-place-form-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.p2p-place-form-sub {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 400;
}

.p2p-place-action-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .06em;
}

.p2p-place-action-badge.buy {
  background: rgba(16, 185, 129, .2);
  color: #10b981;
}

.p2p-place-action-badge.sell {
  background: rgba(239, 68, 68, .2);
  color: #ef4444;
}

.p2p-place-field {
  margin-bottom: 20px;
}

.p2p-place-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 8px;
}

.p2p-place-field-hint {
  font-size: 0.75rem;
  color: #475569;
}

.p2p-place-input-wrap {
  display: flex;
  align-items: center;
}

.p2p-place-input {
  border-radius: 10px 0 0 10px !important;
  flex: 1;
  font-size: 1rem;
}

.p2p-place-input-unit {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 0;
  padding: 10px 16px;
  border-radius: 0 10px 10px 0;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.p2p-place-calc {
  font-size: 0.83rem;
  color: #64748b;
  padding: 8px 12px;
  background: rgba(148, 163, 184, 0.05);
  border-radius: 8px;
  margin-top: 8px;
}

.p2p-place-calc-val {
  color: #e2e8f0;
  font-weight: 700;
  margin: 0 4px;
}

.p2p-place-calc-sym {
  color: var(--site-color, #6366f1);
  font-weight: 600;
}

.p2p-place-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.p2p-place-method-opt {
  cursor: pointer;
}

.p2p-place-method-opt input {
  display: none;
}

.p2p-place-method-box {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  font-size: 0.85rem;
  color: #94a3b8;
  transition: all .2s;
  user-select: none;
}

.p2p-place-method-opt input:checked+.p2p-place-method-box {
  border-color: var(--site-color, #6366f1);
  color: var(--site-color, #6366f1);
  background: rgba(99, 102, 241, .08);
}

.p2p-place-method-box:hover {
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.p2p-place-submit-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.p2p-place-cancel-btn {
  flex: 0 0 auto;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #64748b;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
}

.p2p-place-cancel-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.p2p-place-confirm-btn {
  flex: 1;
  padding: 13px 24px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.p2p-place-confirm-btn:hover {
  background: #059669;
}

.p2p-place-confirm-btn.sell {
  background: #ef4444;
}

.p2p-place-confirm-btn.sell:hover {
  background: #dc2626;
}

.p2p-place-confirm-panel {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  animation: fadeSlideIn .2s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.p2p-place-confirm-summary {
  margin-bottom: 14px;
}

.p2p-place-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.875rem;
}

.p2p-place-confirm-row:last-child {
  border-bottom: none;
}

.p2p-place-confirm-row span {
  color: #64748b;
}

.p2p-place-confirm-row strong {
  color: #e2e8f0;
}

.p2p-place-confirm-note {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  padding: 8px 12px;
  background: rgba(234, 179, 8, .06);
  border: 1px solid rgba(234, 179, 8, .15);
  border-radius: 8px;
}

/* Admin stat cards */
.p2p-stat-card {
  background: #1e293b;
  border: none;
  border-radius: 12px;
}

.p2p-stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.p2p-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.p2p-stat-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
}

/* ── Toast Notifications ── */
.p2p-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.p2p-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, .35);
  border-left: 4px solid var(--site-color, #6366f1);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 280px;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  pointer-events: all;
  cursor: default;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .3s, transform .3s;
}

.p2p-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.p2p-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, .15);
  color: var(--site-color, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

.p2p-toast-body {
  flex: 1;
  min-width: 0;
}

.p2p-toast-title {
  font-size: .82rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 2px;
}

.p2p-toast-sub {
  font-size: .75rem;
  color: #94a3b8;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p2p-toast-close {
  background: none;
  border: none;
  color: #475569;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: color .15s;
}

.p2p-toast-close:hover {
  color: #e2e8f0;
}

/* ── Bank account highlight box ── */
.p2p-bank-highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, .1), rgba(99, 102, 241, .08));
  border: 1px solid rgba(16, 185, 129, .25);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: center;
}

.p2p-bank-highlight-label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.p2p-bank-highlight-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #10b981;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.p2p-bank-highlight-send {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 8px;
}

.p2p-bank-highlight-send strong {
  color: #e2e8f0;
}

/* ── Proof upload box ── */
.p2p-proof-upload-box {
  border: 2px dashed rgba(148, 163, 184, .25);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.p2p-proof-upload-box:hover {
  border-color: var(--site-color, #6366f1);
  background: rgba(99, 102, 241, .04);
}

.p2p-proof-preview-img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .2);
}

/* ── I've Paid button ── */
.p2p-paid-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 4px 20px rgba(16, 185, 129, .35);
}

.p2p-paid-btn:hover {
  opacity: .9;
}

.p2p-paid-btn:active {
  transform: scale(.98);
}

/* ── Release / Reject buttons ── */
.p2p-release-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity .2s;
  box-shadow: 0 4px 20px rgba(16, 185, 129, .3);
}

.p2p-release-btn:hover {
  opacity: .9;
  color: #fff;
}

.p2p-reject-btn {
  background: transparent;
  border: 2px solid rgba(239, 68, 68, .4);
  color: #ef4444;
  border-radius: 10px;
  padding: 12px;
  font-size: .9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .2s;
  width: 100%;
}

.p2p-reject-btn:hover {
  background: rgba(239, 68, 68, .1);
  border-color: #ef4444;
  color: #ef4444;
}

/* ── View proof button ── */
.p2p-proof-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(59, 130, 246, .08);
  border: 1px solid rgba(59, 130, 246, .25);
  color: #3b82f6;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}

.p2p-proof-link-btn:hover {
  background: rgba(59, 130, 246, .15);
  color: #3b82f6;
}

/* ── Waiting animation ── */
.p2p-waiting-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(234, 179, 8, .12);
  border: 1px solid rgba(234, 179, 8, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eab308;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── Full-height chat card ── */
.p2p-chat-card-full {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  min-height: 520px;
  position: sticky;
  top: 80px;
}

.p2p-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .1);
  flex-shrink: 0;
}

.p2p-chat-body-full {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  background: #070e1a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p2p-chat-input-full {
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, .1);
  background: #0f172a;
  flex-shrink: 0;
}

.p2p-chat-file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(148, 163, 184, .07);
  border-radius: 8px;
  margin-bottom: 8px;
}

.p2p-chat-file-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.p2p-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: var(--site-color, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
  transition: opacity .2s;
}

.p2p-chat-send-btn:hover {
  opacity: .85;
}

.p2p-chat-send-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ── Notification bell ── */
.p2p-notif-wrap {
  position: relative;
}

.p2p-notif-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  transition: all .2s;
}

.p2p-notif-btn:hover {
  background: rgba(99, 102, 241, .12);
  color: var(--site-color, #6366f1);
  border-color: rgba(99, 102, 241, .3);
}

.p2p-notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #0a111e;
}

.p2p-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  z-index: 999;
  overflow: hidden;
}

.p2p-notif-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.p2p-notif-read-all {
  background: none;
  border: none;
  color: var(--site-color, #6366f1);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  transition: opacity .2s;
}

.p2p-notif-read-all:hover {
  opacity: 0.75;
}

.p2p-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background .15s;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

.p2p-notif-item:last-child {
  border-bottom: none;
}

.p2p-notif-item:hover {
  background: rgba(255, 255, 255, .03);
}

.p2p-notif-item.unread {
  background: rgba(99, 102, 241, .06);
}

.p2p-notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(99, 102, 241, .15);
  color: var(--site-color, #6366f1);
}

.p2p-notif-icon--order_placed {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

.p2p-notif-icon--payment_confirmed {
  background: rgba(59, 130, 246, .15);
  color: #3b82f6;
}

.p2p-notif-icon--coins_released {
  background: rgba(139, 92, 246, .15);
  color: #8b5cf6;
}

.p2p-notif-icon--order_cancelled {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
}

.p2p-notif-icon--dispute_raised {
  background: rgba(251, 146, 60, .15);
  color: #fb923c;
}

.p2p-notif-icon--extension_requested {
  background: rgba(234, 179, 8, .15);
  color: #eab308;
}

.p2p-notif-icon--extension_approved {
  background: rgba(16, 185, 129, .15);
  color: #10b981;
}

.p2p-notif-body {
  flex: 1 1 0;
  min-width: 0;
}

.p2p-notif-title {
  font-size: 0.8rem;
  color: #e2e8f0;
  margin: 0 0 2px;
  line-height: 1.4;
}

.p2p-notif-time {
  font-size: 0.72rem;
  color: #475569;
  margin: 0;
}

.p2p-notif-empty {
  text-align: center;
  padding: 20px;
  color: #475569;
  font-size: 0.83rem;
  margin: 0;
}

#p2pNotifList {
  max-height: 340px;
  overflow-y: auto;
}

/* ── Online status dot ── */
.p2p-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.p2p-online-status {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #0a111e;
}

.p2p-online-status.online {
  background: #10b981;
}

.p2p-online-status.offline {
  background: #475569;
}

/* ── Favorite button ── */
.p2p-fav-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1;
  transition: color .2s, transform .15s;
}

.p2p-fav-btn:hover {
  color: #eab308;
  transform: scale(1.2);
}

.p2p-fav-btn.active {
  color: #eab308;
}

/* ── Merchant stats row ── */
.p2p-trader-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.p2p-trader-stats span {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 3px;
}

.p2p-trader-stats span i {
  font-size: 0.7rem;
}

/* ── Promoted tag ── */
.p2p-promoted-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(234, 179, 8, .15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, .25);
  margin-bottom: 4px;
  letter-spacing: .04em;
}

.p2p-ad-row--promoted {
  background: rgba(234, 179, 8, .025);
}

.p2p-ad-row--promoted:hover {
  background: rgba(234, 179, 8, .05);
}

/* ── Online-only toggle ── */
.p2p-online-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.83rem;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  transition: all .2s;
  user-select: none;
}

.p2p-online-toggle input[type=checkbox] {
  display: none;
}

.p2p-online-toggle input[type=hidden] {
  display: none;
}

.p2p-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
  transition: background .2s;
}

.p2p-online-toggle.active,
.p2p-online-toggle:has(input[type=checkbox]:checked) {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, .07);
}

.p2p-online-toggle.active .p2p-online-dot,
.p2p-online-toggle:has(input[type=checkbox]:checked) .p2p-online-dot {
  background: #10b981;
}

/* ── Extended ad header/row grid (with new stats) ── */
.p2p-ad-header--extended,
.p2p-ad-header--extended~.p2p-ad-row,
.p2p-ad-list .p2p-ad-header--extended,
.p2p-ad-list .p2p-ad-row {
  grid-template-columns: 2.4fr 1.3fr 1.6fr 1.4fr 130px;
}

/* Responsive */
@media (max-width: 991px) {
  .p2p-ad-header {
    display: none !important;
  }

  .p2p-ad-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .p2p-ad-cell:nth-child(5) {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .p2p-my-ad-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .p2p-my-ad-right {
    text-align: left;
  }

  .p2p-order-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .p2p-order-right {
    text-align: left;
  }

  .p2p-chat-card {
    height: 420px;
  }
}

@media (max-width: 575px) {
  .p2p-chat-msg {
    max-width: 90%;
  }

  .p2p-filters {
    flex-direction: column;
  }

  .p2p-filter-group {
    width: 100%;
  }

  .p2p-type-tabs {
    overflow-x: auto;
  }
}

.p2p-chat-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .25);
  color: #ef4444;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}

.p2p-chat-pdf-link:hover {
  background: rgba(239, 68, 68, .18);
  color: #ef4444;
}