@font-face {
  font-family: "Amaranth";
  src: url("assets/amaranth.ttf"), url("../amaranth.ttf");
  font-display: swap;
}

:root {
  --puyuu-dark: #36454f;
  --puyuu-black: #000000;
  --puyuu-bg: #f4f6f9;
  --puyuu-card: #ffffff;
  --puyuu-text: #212529;
  --puyuu-muted: #6c757d;
  --puyuu-success: #1b9b36;
  --puyuu-info: #0dcaf0;
  --puyuu-warning: #ffc107;
  --puyuu-danger: #dc3545;
  --puyuu-orange: #ffa500;
  --puyuu-secondary: #5a5353;
  --line: #e5e8ec;
  --radius: 15px;
  --shadow: 0 8px 22px rgba(33, 37, 41, 0.12);
  --container: 680px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--puyuu-bg);
  color: var(--puyuu-text);
  font-family: Amaranth, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(12px, 4vw, 28px);
  background: var(--puyuu-dark);
  color: #ffffff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #ffffff;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #ffffff;
  object-fit: cover;
}

.brand b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.public-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.public-nav button,
.pill,
.link {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-weight: 900;
}

.public-nav button {
  border-radius: var(--radius);
  padding: 9px 12px;
}

.public-nav button:hover,
.public-nav button.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--puyuu-orange);
}



.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.modal-box{
    background:#fff;
    padding:24px;
    border-radius:12px;
    text-align:center;
    max-width:400px;
    width:90%;
}



.pill {
  min-height: 40px;
  border-radius: var(--radius);
  padding: 9px 15px;
  background: var(--puyuu-success);
  color: #ffffff;
}

.pill.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.app-shell {
  width: 100%;
  max-width: var(--container);
 
  margin: 0 auto;
  padding: 5px 5px 5px;
}

.app-shell.public-mode {
  max-width: none;
  padding: 0 0 0;
}

.screen {
  width: 100%;
}

.page-head {
  max-width: var(--container);
  margin: 0 auto 12px;
  padding: 14px 8px 0;
  text-align: center;
}

.page-head h1,
.content-page h1,
.auth-card h1,
.landing-hero h1 {
  margin: 0;
  color: var(--puyuu-text);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.12;
}

.page-head p,
.content-page > p,
.muted {
  color: var(--puyuu-muted);
}

.card,
.feature-card,
.faq,
.auth-card,
.phone-preview,
.quick,
.tx-card,
.user-card,
.form-card,
.toolbar,
.chat-box {
  background: var(--puyuu-card);
  color: var(--puyuu-text);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card,
.feature-card,
.faq,
.auth-card,
.toolbar,
.form-card,
.chat-box {
  padding: 16px;
}

.card,
.tx-card,
.quick,
.feature-card,
.faq {
  margin-bottom: 14px;
}

h2,
h3 {
  margin: 0 0 10px;
  color: var(--puyuu-text);
}

p {
  margin-top: 0;
}

/* Public app-like landing */
.landing-hero {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 6vw, 10px) clamp(14px, 5vw, 10px);
  background:
    linear-gradient(rgba(33, 37, 41, 0.88), rgba(33, 37, 41, 0.88)),
    url("assets/backy.jpg") center / cover no-repeat,
    var(--puyuu-dark);
}

.landing-hero h1,
.landing-hero p {
  color: #ffffff;
}

.landing-hero h1 {
  max-width: 720px;
  margin: 14px 0;
  font-size: clamp(36px, 6vw, 66px);
}

.landing-hero p {
  max-width: 650px;
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  padding: 9px 13px;
  background: var(--puyuu-warning);
  color: var(--puyuu-text);
  font-weight: 900;
}

.hero-actions {
  display: inline-block;
  gap: 10px;
  margin-top: 4px;
}

.phone-preview {
  max-width: 360px;
  min-height: 470px;
  padding: 16px;
  background: var(--puyuu-bg);
  border-radius: 28px;
}

.phone-top {
  width: 95px;
  height: 7px;
  margin: 0 auto 18px;
  background: var(--puyuu-dark);
  border-radius: 99px;
  opacity: 0.35;
}

.hero-card,
.balance-card {
  background: var(--puyuu-dark);
  color: #ffffff;
  text-align: center;
}

.hero-card h2,
.balance-card h2 {
  margin: 3px 0;
  color: var(--puyuu-orange);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
}

.hero-card p,
.hero-card span,
.balance-card p,
.balance-card span {
  color: #ffffff;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-grid span {
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 12px;
  background: #ffffff;
  color: var(--puyuu-text);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(33, 37, 41, 0.08);
  text-align: center;
  font-weight: 900;
}

.features-grid,
.split-grid,
.dashboard-grid,
.two-col,
.profile-grid,
.chat-layout,
.form-layout,
.market-grid,
.quick-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--container);
  margin: 0 auto;
}

.features-grid {
  padding: 20px 5px 32px;
}

.feature-card b,
.faq b {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
  color: var(--puyuu-text);
}

.feature-card p,
.faq p,
.card p {
  color: var(--puyuu-muted);
}

.content-page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 5px 96px;
}

.content-page h1 {
  text-align: center;
  margin-bottom: 12px;
}

.legal h3 {
  margin-top: 14px;
}

/* Forms */
.auth-wrap {
  min-height: calc(80vh - 64px);
  display: grid;
  place-items: center;
  padding: 20px 5px;
}

.auth-card {
  width: min(100%, 430px);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 4px;
}

.auth-card .muted {
  text-align: center;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

label {
  display: block;
  margin: 6px 0 4px;
  font-weight: 900;
  color: var(--puyuu-text);
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  margin: 7px 0 12px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--puyuu-text);
  border: 1px solid #cfd4da;
  border-radius: var(--radius);
  outline: none;
  font-size: 16px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--puyuu-success);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.18);
}

/* App-style buttons and links */
.btn,
.btn-primary,
.btn-success,
.btn-outline {
  display: unset;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--puyuu-secondary);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}






.btn:hover,
.quick:hover,
.pill:hover,
.link:hover {
  filter: brightness(0.96);
}

.btn.blue {
  background: #0d6efd;
}
.btn.success,
.btn-green,
button[type="submit"].btn {
  background: var(--puyuu-success);
  color: #ffffff;
}


.btn.warn {
  background: var(--puyuu-warning);
  color: var(--puyuu-text);
}

.btn.red {
  background: var(--puyuu-danger);
}

.btn.dark {
  background: var(--puyuu-dark);
}

.btn.outline,
.outline,
.btn-outline {
  background: #ffffff;
  color: var(--puyuu-success);
  border: 1px solid var(--puyuu-success);
}

.btn.mini {
  width: auto;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 14px;
}

.link {
  width: auto;
  padding: 8px 4px;
  color: var(--puyuu-success);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dashboard / cards */
.balance-card {
  padding: 16px;
  border-radius: var(--radius);
}

.balance-card p {
  margin-bottom: 4px;
}

.quick {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  text-align: left;
}

.quick b {
  display: block;
  margin: 4px 0;
  color: var(--puyuu-text);
  font-size: 18px;
}

.quick span {
  display: block;
  color: var(--puyuu-muted);
}

.toolbar {
  margin-bottom: 14px;
}

.user-card {
  padding: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--puyuu-dark);
  color: var(--puyuu-orange);
  font-size: 24px;
  font-weight: 900;
}

.table {
  display: grid;
  gap: 0;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 12px;
  background: #f8f9fa;
}

.table > div {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e9ecef;
}

.table > div:last-child {
  border-bottom: 0;
}

.table b {
  color: var(--puyuu-muted);
}

.tx-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.tx-card p,
.tx-card b {
  margin: 0 0 5px;
}

.tx-right {
  text-align: right;
  min-width: 125px;
}

.tabs {
  max-width: var(--container);
  margin: 0 auto 14px;
  display: flex;
  gap: 8px;
}

.tabs button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--puyuu-text);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.tabs button.active {
  background: var(--puyuu-dark);
  color: #ffffff;
}

.tx-list {
  max-width: var(--container);
  margin: 0 auto;
}

/* Messages, badges, alerts */
.notice {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
}

.success {
  background: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
}

.danger {
  background: #f8d7da;
  color: #842029;
  border-color: #f5c2c7;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--puyuu-secondary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.badge.green {
  background: var(--puyuu-success);
  color: #ffffff;
}

.badge.blue {
  background: #0d6efd;
}

.badge.red {
  background: var(--puyuu-danger);
}

/* Escrow chat */
.chat-box {
  max-height: 560px;
  overflow: auto;
  background: #ffffff;
}

.bubble {
  max-width: 82%;
  margin: 0 0 10px;
  padding: 12px 14px;
  align-self: flex-start;
  background: #f1f3f5;
  color: var(--puyuu-text);
  border-radius: 15px;
}

.bubble.me {
  margin-left: auto;
  background: var(--puyuu-success);
  color: #ffffff;
}

.bubble p {
  margin: 4px 0;
  color: inherit;
}

.bubble small {
  opacity: 0.78;
}

.bubble img {
  max-width: 100%;
  margin-top: 8px;
  border-radius: 12px;
}

.switches {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.switches label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px;
  background: #f8f9fa;
  border-radius: var(--radius);
}

.switches input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(33, 37, 41, 0.86);
  color: #ffffff;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 255, 255, 0.7);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 60;
  width: min(100%, 680px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 7px 6px 8px;
  background: transparent;
  box-shadow: none;
}

.bottom-nav button {
  border: 0;
  border-radius: 12px;
  background: rgba(208, 207, 206, 0.96);
  color: #2a2a2a;
  padding: 8px 4px;
  font-weight: 900;
}

.bottom-nav button.active {
  background: var(--puyuu-success);
}

.bottom-nav span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

@media (min-width: 900px) {
  body {
    background:
      linear-gradient(rgba(244, 246, 249, 0.94), rgba(244, 246, 249, 0.94)),
      url("assets/backy.jpg") center / cover fixed no-repeat;
  }

  .app-shell:not(.public-mode) {
    padding-top: 18px;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1180px;
    gap: 14px;
    padding: 28px 24px 56px;
  }

  .content-page {
    padding-top: 42px;
  }

  .split-grid {
    max-width: 860px;
  }
}

@media (max-width: 900px) {
  .public-nav {
    display: none;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .phone-preview {
    max-width: 100%;
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 8px;
    padding: 12px;
  }

  .brand b {
    font-size: 19px;
  }

  .brand small {
    display: none;
  }

  .pill {
    padding: 8px 11px;
  }

  .landing-hero {
    padding: 24px 10px;
  }

  .hero-actions {
    display: grid;
  }

  .phone-preview {
    display: none;
  }

  .table > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .tx-card {
    display: block;
  }

  .tx-right {
    min-width: 0;
    margin-top: 10px;
    text-align: left;
  }

  .bubble {
    max-width: 92%;
  }
}

/* App-like confirmation modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.confirm-card {
  position: relative;
  width: min(460px, 100%);
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  animation: modalPop 0.18s ease-out;
}

.confirm-head {
  background: #198754;
  color: #ffffff;
  text-align: center;
  font-weight: 900;
  font-size: 20px;
  padding: 10px 22px;
}

.confirm-body {
  padding: 18px;
  color: #212529;
}

.confirm-modal.success .confirm-head {
  background: var(--puyuu-success, #198754);
}

.confirm-modal.error .confirm-head {
  background: var(--puyuu-danger, #dc3545);
}

.confirm-modal.error .confirm-card {
  border: 2px solid var(--puyuu-danger, #dc3545);
}

.confirm-modal.success .confirm-card {
  border: 2px solid var(--puyuu-success, #198754);
}

.confirm-note.error-note {
  background: #f8d7da;
  border-color: #f5c2c7;
  color: #842029;
}

.confirm-note.success-note {
  background: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}

.btn.red {
  background: var(--puyuu-danger, #dc3545);
  color: #ffffff;
}

.confirm-table {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 16px;
  padding: 8px 12px;
}

.confirm-table > div {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #e9ecef;
}

.confirm-table > div:last-child {
  border-bottom: 0;
}

.confirm-table b {
  color: #495057;
}

.confirm-table span {
  color: #212529;
  overflow-wrap: anywhere;
}

.confirm-note {
  margin-top: 12px;
  background: #fff3cd;
  border: 1px solid #ffecb5;
  color: #664d03;
  border-radius: 15px;
  padding: 12px;
  text-align: center;
  font-weight: 800;
  line-height: 1.45;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 18px 18px;
}

.confirm-actions .btn {
  margin-top: 0;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .confirm-table > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* Transaction state and modal updates */
.btn.green {
  background: var(--puyuu-success);
  color: #ffffff;
}

.notice.blue {
  background: #cfe2ff;
  color: #084298;
  border-color: #b6d4fe;
}

.fee-note b {
  display: block;
  margin-bottom: 4px;
}

input[type="hidden"][data-security-code="1"] {
  display: none !important;
}

/* Patch v31: compact dashboard actions, transaction tables, withdrawal confirmations */
.quick-grid.quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 16px;
}

.quick-grid.quick-row .quick {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

.quick-grid.quick-row .quick-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff3cd;
  font-size: 22px;
}

.quick-grid.quick-row .quick b {
  margin: 0;
}

.quick-grid.quick-row .quick small {
  color: var(--puyuu-muted);
  line-height: 1.25;
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #ffffff;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e9ecef;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #495057;
  font-weight: 900;
  background: #f8f9fa;
}

.data-table tbody tr:hover {
  background: #fffdf5;
}

.amount-cell {
  font-weight: 900;
  color: #cc6b00;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #f8f9fa;
}

.pager span {
  color: var(--puyuu-muted);
  font-weight: 900;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 900px) {
  .quick-grid.quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .quick-grid.quick-row {
    grid-template-columns: 1fr;
  }
}

/* transaction direction arrows and compact marketplace details */
.party-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.dir-arrow {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  flex: 0 0 auto;
}

.dir-arrow.in {
  background: #198754;
}

.dir-arrow.out {
  background: #dc3545;
}

.market-grid .user-card .table > div {
  grid-template-columns: 170px 1fr;
}

.trust-score-card {
  text-align: center;
  border-color: #d7e9e3;
  background: #ffffff;
}

.trust-score-card p {
  margin: 0 0 5px;
  color: var(--muted);
  font-weight: 900;
}

.trust-score-card h2 {
  margin: 0 0 10px;
  color: var(--puyuu-success);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
}


/* Compact app-style trust score line */
.trust-score-card {
  display: none !important;
}

.trust-score-line {
  margin: -6px auto 14px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  width: 100%;
}

.trust-score-line .trust-icon {
  margin-right: 5px;
}

.trust-score-line small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 900;
}

.trust-score-line.green,
.trust-score-line.green small {
  color: #198754;
}

.trust-score-line.blue,
.trust-score-line.blue small {
  color: #0d6efd;
}

.trust-score-line.red,
.trust-score-line.red small {
  color: #dc3545;
}

/* Patch v33: compact one-line earnings and keep referral button */
.compact-earnings-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.compact-earning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--puyuu-dark, #222222);
  line-height: 1.25;
}

.compact-earning strong {
  color: var(--puyuu-orange, #f0a000);
  font-size: 18px;
}

.compact-earning small {
  color: var(--puyuu-muted, #6c757d);
  font-size: 13px;
}

.referral-dashboard-btn {
  display: block;
  max-width: 260px;
  margin: 0 auto 16px;
}

@media (max-width: 640px) {
  .compact-earnings-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .compact-earning {
    flex-wrap: wrap;
  }
}

/* Transaction / withdrawal detail app-style layout */
.detail-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--container);
  margin: 0 auto;
}

.detail-hero {
  background: #ffffff;
}

.detail-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.detail-topline small {
  display: block;
  color: var(--puyuu-muted);
  font-weight: 900;
  margin-bottom: 4px;
}

.detail-topline h2 {
  margin: 0;
  color: var(--puyuu-text);
  font-size: 26px;
  line-height: 1.1;
}

.detail-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.detail-summary-row span {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  color: var(--puyuu-text);
}

.detail-summary-row b {
  display: block;
  color: var(--puyuu-muted);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.detail-table th,
.detail-table td {
  text-align: left;
  vertical-align: top;
}

.detail-table th {
  width: 38%;
  color: var(--puyuu-muted);
  text-transform: capitalize;
  font-weight: 900;
}

@media (max-width: 680px) {
  .detail-summary-row {
    grid-template-columns: 1fr;
  }

  .detail-topline {
    display: block;
  }

  .detail-topline .badge {
    margin-top: 10px;
  }
}

/* Patch v44: keep all data/detail tables as real tables, never stacked responsive cards */
.table-scroll,
.table-wrapper,
.table-card {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table,
.tx-table,
.detail-table,
table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.data-table th,
.data-table td,
.tx-table th,
.tx-table td,
.detail-table th,
.detail-table td,
table th,
table td {
  white-space: nowrap;
}

/* Keep app-style key/value tables readable on mobile without converting to one-column cards */
.table > div,
.market-grid .user-card .table > div {
  grid-template-columns: 170px minmax(220px, 1fr) !important;
}

@media (max-width: 900px) {
  .table > div,
  .market-grid .user-card .table > div {
    grid-template-columns: 170px minmax(220px, 1fr) !important;
  }
}

@media (max-width: 520px) {
  .table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table > div,
  .market-grid .user-card .table > div {
    min-width: 440px;
    grid-template-columns: 170px minmax(220px, 1fr) !important;
  }
}

/* Patch v45: fixed compact tables, no horizontal scroll and no responsive stacking */
.table-scroll,
.table-wrapper,
.table-card {
  width: 100% !important;
  overflow-x: visible !important;
  -webkit-overflow-scrolling: auto !important;
}

.data-table,
.tx-table,
.detail-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.data-table th,
.data-table td,
.tx-table th,
.tx-table td,
.detail-table th,
.detail-table td {
  padding: 6px 4px !important;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.tx-table th:nth-child(1),
.tx-table td:nth-child(1),
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
  width: 28%;
}

.tx-table th:nth-child(2),
.tx-table td:nth-child(2),
.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  width: 20%;
}

.tx-table th:nth-child(3),
.tx-table td:nth-child(3),
.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  width: 15%;
}

.tx-table th:nth-child(4),
.tx-table td:nth-child(4),
.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 17%;
}

.tx-table th:nth-child(5),
.tx-table td:nth-child(5),
.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 20%;
}

.detail-table th {
  width: 38% !important;
}

.detail-table td {
  width: 62% !important;
}

.party-cell {
  gap: 4px !important;
  min-width: 0;
}

.party-cell span,
.party-cell b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-arrow {
  width: 18px !important;
  height: 18px !important;
  font-size: 13px !important;
  flex: 0 0 18px !important;
}

.data-table .btn,
.tx-table .btn,
.detail-table .btn {
  width: auto !important;
  min-width: 0 !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
  border-radius: 9px !important;
  margin-top: 0 !important;
}

@media (max-width: 520px) {
  .data-table,
  .tx-table,
  .detail-table {
    font-size: 10.5px !important;
  }

  .data-table th,
  .data-table td,
  .tx-table th,
  .tx-table td,
  .detail-table th,
  .detail-table td {
    padding: 5px 3px !important;
  }

  .dir-arrow {
    width: 16px !important;
    height: 16px !important;
    font-size: 12px !important;
    flex-basis: 16px !important;
  }
}


/* Patch v46: responsive transaction tables; status is the action button */
.table-scroll {
  width: 100% !important;
  overflow-x: visible !important;
}

.tx-responsive {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
  font-size: 13px !important;
}

.tx-responsive th,
.tx-responsive td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  padding: 9px 8px !important;
}

.tx-responsive tbody tr {
  cursor: pointer;
}

.tx-responsive tbody tr:hover {
  background: #f8fafc;
}

.status-action {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  width: auto !important;
  min-width: 84px;
  text-align: center;
}

.status-cell {
  text-align: right;
}

@media (max-width: 640px) {
  .tx-responsive,
  .tx-responsive thead,
  .tx-responsive tbody,
  .tx-responsive th,
  .tx-responsive td,
  .tx-responsive tr {
    display: block;
    width: 100% !important;
  }

  .tx-responsive thead {
    display: none;
  }

  .tx-responsive tbody tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: 0 0 10px;
    padding: 8px 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  }

  .tx-responsive td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding: 8px 0 !important;
    font-size: 14px !important;
  }

  .tx-responsive td:last-child {
    border-bottom: 0;
  }

  .tx-responsive td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
    flex: 0 0 auto;
  }

  .tx-responsive .party-cell {
    justify-content: flex-end;
  }

  .tx-responsive .party-cell::before {
    margin-right: auto;
  }

  .tx-responsive .amount-cell,
  .tx-responsive .status-cell {
    text-align: right;
  }

  .tx-responsive .status-action {
    min-width: 96px;
    padding: 7px 10px !important;
    margin: 0 !important;
  }
}


/* Patch v47: keep transaction rows as table rows, no stacking, no horizontal scroll, wrap long values */
.table-scroll {
  width: 100% !important;
  overflow-x: visible !important;
}

.tx-responsive,
.tx-responsive thead,
.tx-responsive tbody,
.tx-responsive tr,
.tx-responsive th,
.tx-responsive td {
  display: revert !important;
}

.tx-responsive {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  font-size: 12px !important;
}

.tx-responsive thead {
  display: table-header-group !important;
}

.tx-responsive tbody {
  display: table-row-group !important;
}

.tx-responsive tr {
  display: table-row !important;
  width: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tx-responsive th,
.tx-responsive td {
  display: table-cell !important;
  width: auto !important;
  padding: 7px 4px !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.tx-responsive td::before {
  content: none !important;
  display: none !important;
}

.tx-responsive th:nth-child(1),
.tx-responsive td:nth-child(1) {
  width: 34% !important;
}

.tx-responsive th:nth-child(2),
.tx-responsive td:nth-child(2) {
  width: 22% !important;
}

.tx-responsive th:nth-child(3),
.tx-responsive td:nth-child(3) {
  width: 20% !important;
}

.tx-responsive th:nth-child(4),
.tx-responsive td:nth-child(4) {
  width: 24% !important;
}

.tx-responsive .party-cell {
  display: table-cell !important;
  gap: 0 !important;
  text-align: left !important;
}

.tx-responsive .party-cell span,
.tx-responsive .party-cell b {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.tx-responsive .amount-cell,
.tx-responsive .status-cell {
  text-align: center !important;
}

.tx-responsive .status-action {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 6px 4px !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 640px) {
  .tx-responsive {
    font-size: 10.5px !important;
  }

  .tx-responsive th,
  .tx-responsive td {
    padding: 6px 3px !important;
  }

  .tx-responsive th:nth-child(1),
  .tx-responsive td:nth-child(1) {
    width: 32% !important;
  }

  .tx-responsive th:nth-child(2),
  .tx-responsive td:nth-child(2) {
    width: 21% !important;
  }

  .tx-responsive th:nth-child(3),
  .tx-responsive td:nth-child(3) {
    width: 20% !important;
  }

  .tx-responsive th:nth-child(4),
  .tx-responsive td:nth-child(4) {
    width: 27% !important;
  }
}

/* App-style escrow chat */
.escrow-chat-screen {
  align-items: normal;
}

.escrow-details .notice {
  margin: 10px 0 14px;
}

.escrow-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.app-chat-box {
  min-height: 360px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 14px;
  background: #f4f6f8;
}

.chat-row {
  display: flex;
  margin: 8px 0;
}

.chat-row.mine {
  justify-content: flex-start;
}

.chat-row.theirs {
  justify-content: flex-end;
}

.chat-bubble {
  width: fit-content;
  max-width: min(78%, 560px);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  overflow-wrap: anywhere;
}

.chat-row.mine .chat-bubble {
  background: #6c757d;
  color: #ffffff;
  border-bottom-left-radius: 5px;
}

.chat-row.theirs .chat-bubble {
  background: #ffffff;
  color: #1f2933;
  border: 1px solid #dde3ea;
  border-bottom-right-radius: 5px;
}

.chat-header {
  font-weight: 900;
  margin-bottom: 4px;
  font-size: 13px;
}

.chat-text {
  white-space: pre-wrap;
  line-height: 1.38;
}

.chat-time {
  opacity: 0.72;
  font-size: 11px;
  margin-top: 6px;
  text-align: right;
}

.chat-proof {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
  margin-top: 8px;
  object-fit: cover;
}

.chat-compose textarea {
  min-height: 92px;
}

.profile-payment-card label,
.profile-payment-card .switches {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .app-chat-box {
    max-height: 58vh;
  }

  .chat-bubble {
    max-width: 86%;
  }
}

/* App-matched profile screen */
.app-profile-screen {
  max-width: 720px;
}

.app-profile-card {
  padding: 5px;
  background: #ffffff;
}

.app-profile-info {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 12px rgba(33, 37, 41, 0.08);
  color: var(--puyuu-text);
}

.app-profile-info p {
  margin: 4px 0;
  color: var(--puyuu-text);
}

.app-puyuu-code-card,
.marketplace-application-card,
.app-switch-row {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px;
}

.app-puyuu-code-card {
  display: grid;
  gap: 8px;
  background: #f8f9fa;
  border: 1px solid rgba(33, 37, 41, 0.08);
}

.app-puyuu-code-card span {
  color: var(--puyuu-muted);
  font-weight: 800;
}

.app-puyuu-code-card strong {
  font-size: 20px;
  color: var(--puyuu-text);
}

.marketplace-application-card {
  background: #fff3cd;
  border: 1px solid #ffe69c;
}

.app-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #212529;
  color: #ffffff;
}

.app-switch-row b {
  color: #ffffff;
}

.app-switch-row input {
  width: auto;
  min-height: auto;
}

.app-limit-info {
  margin-top: 14px;
  background: #d1e7dd;
  color: var(--puyuu-text);
  border-radius: 14px;
  padding: 12px;
}

.app-limit-info p {
  margin: 8px 0;
  color: var(--puyuu-text);
}

.app-profile-card label {
  display: block;
  margin-top: 14px;
  font-weight: 900;
  color: var(--puyuu-text);
}

.app-profile-card small {
  display: block;
  margin-top: 8px;
}

.app-profile-card small.danger {
  color: var(--puyuu-danger);
}

.app-profile-card small.muted,
.app-profile-info .muted {
  color: var(--puyuu-muted);
}

.app-profile-card input,
.app-profile-card select {
  margin-top: 8px;
}

/* Marketplace footer button should stand out in maroon. */
.bottom-nav button[data-page="marketplace"] {
  background: maroon;
}
.bottom-nav button[data-page="marketplace"].active {
  background: maroon;
}

/* Compact escrow chat header table */
.compact-escrow-details {
  padding: 10px;
}
.escrow-header-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.25;
}
.escrow-header-table th,
.escrow-header-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  text-align: left;
  vertical-align: top;
}
.escrow-header-table th {
  width: 38%;
  white-space: nowrap;
  color: var(--puyuu-muted);
}
.compact-escrow-details .escrow-actions {
  margin-top: 8px;
}
.compact-escrow-details .escrow-actions .btn {
  padding: 7px 9px;
  font-size: 12px;
}
.quick:disabled,
.quick.disabled {
  opacity: .55;
  cursor: not-allowed;
}


.escrow-header-compact-table {
  table-layout: fixed;
  font-size: 11px;
}
.escrow-header-compact-table th,
.escrow-header-compact-table td {
  padding: 4px 5px;
  text-align: center;
  word-break: break-word;
}
.escrow-header-compact-table th {
  width: auto;
  white-space: normal;
}

/* Sticky escrow chat header with scrollable messages */
.escrow-chat-screen {
  height: calc(100vh - 132px);
  max-height: calc(100vh - 132px);
  overflow: hidden;
  gap: 8px;
}

.compact-escrow-details {
  position: sticky;
  top: 0;
  z-index: 30;
  flex: 0 0 auto;
  background: var(--puyuu-card);
}

.escrow-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.escrow-chat-panel .notice {
  flex: 0 0 auto;
  margin: 0 0 8px;
}

.escrow-chat-panel .app-chat-box {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.escrow-chat-panel .chat-compose {
  flex: 0 0 auto;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .escrow-chat-screen {
    height: calc(100vh - 118px - env(safe-area-inset-bottom));
    max-height: calc(100vh - 118px - env(safe-area-inset-bottom));
  }
}


/* WhatsApp-style website escrow chat */
.escrow-chat-screen {
  background: #efeae2;
  border-radius: 18px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.compact-escrow-details {
  background: #075e54;
  color: #ffffff;
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.16);
}

.compact-escrow-details .escrow-hint {
  border-radius: 12px;
  margin: 0 0 8px;
  background: rgba(255,255,255,.16) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.18);
}

.escrow-header-table,
.escrow-header-compact-table {
  background: transparent;
  color: #ffffff;
  border-collapse: collapse;
  overflow: hidden;
}

.escrow-header-table th,
.escrow-header-table td,
.escrow-header-compact-table th,
.escrow-header-compact-table td {
  border-bottom: 1px solid rgba(255,255,255,.18);
  color: #ffffff;
}

.escrow-header-compact-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .88;
}

.escrow-header-compact-table td {
  font-size: 11px;
  font-weight: 800;
}

.compact-escrow-details .escrow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-escrow-details .escrow-actions .btn {
  border-radius: 999px;
  padding: 7px 10px;
  box-shadow: none;
}

.escrow-chat-panel {
  background: #efeae2;
  position: relative;
}

.escrow-chat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(0,0,0,.05) 1.5px, transparent 2px),
    radial-gradient(circle at 58px 46px, rgba(0,0,0,.04) 1.5px, transparent 2px);
  background-size: 76px 76px;
}

.escrow-chat-panel > * {
  position: relative;
  z-index: 1;
}

.escrow-chat-panel .notice {
  margin: 8px;
  border-radius: 12px;
}

.escrow-chat-panel .app-chat-box {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 14px 12px 8px;
}

.chat-row {
  margin: 4px 0;
  align-items: flex-end;
}

.chat-row.mine {
  justify-content: flex-end;
}

.chat-row.theirs {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(76%, 520px);
  padding: 7px 10px 5px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,.14);
  position: relative;
}

.chat-row.mine .chat-bubble {
  background: #d9fdd3;
  color: #111b21;
  border: 0;
  border-top-right-radius: 2px;
}

.chat-row.theirs .chat-bubble {
  background: #ffffff;
  color: #111b21;
  border: 0;
  border-top-left-radius: 2px;
}

.chat-row.mine .chat-bubble::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 0;
  border-top: 8px solid #d9fdd3;
  border-right: 8px solid transparent;
}

.chat-row.theirs .chat-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  border-top: 8px solid #ffffff;
  border-left: 8px solid transparent;
}

.chat-header {
  display: none;
}

.chat-text {
  font-size: 14px;
  line-height: 1.38;
  color: inherit;
}

.chat-time {
  color: #667781;
  opacity: 1;
  font-size: 10px;
  line-height: 1;
  margin-top: 5px;
  padding-left: 28px;
}

.chat-proof {
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
}

.escrow-chat-panel .chat-compose {
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 0 0 18px 18px;
  background: #f0f2f5;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.chat-compose textarea {
  min-height: 42px;
  max-height: 96px;
  resize: vertical;
  border-radius: 22px;
  border: 0;
  background: #ffffff;
  padding: 11px 14px;
  margin: 0;
}

.chat-compose input[type="file"] {
  max-width: 150px;
  min-height: 42px;
  margin: 0;
  border-radius: 22px;
  background: #ffffff;
  font-size: 11px;
}

.chat-compose .btn,
#sendChat {
  margin: 0;
  min-height: 42px;
  border-radius: 50px;
  background: #128c7e;
  color: #ffffff;
  padding: 0 16px;
}

@media (max-width: 760px) {
  .escrow-chat-screen {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .compact-escrow-details {
    border-radius: 0;
  }

  .chat-bubble {
    max-width: 84%;
  }

  .escrow-chat-panel .chat-compose {
    grid-template-columns: 1fr auto;
    border-radius: 0;
  }

  .chat-compose input[type="file"] {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }
}

/* Latest website escrow chat tweaks: icon composer, sticky input, sender-left/receiver-right */
.escrow-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.escrow-chat-panel .app-chat-box {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 280px;
  padding-bottom: 12px;
}

.chat-row.sender-msg,
.chat-row.theirs {
  justify-content: flex-start;
}

.chat-row.receiver-msg,
.chat-row.mine {
  justify-content: flex-end;
}

.chat-row.sender-msg .chat-bubble,
.chat-row.theirs .chat-bubble {
  background: #ffffff;
  color: #111b21;
  border: 0;
  border-top-left-radius: 2px;
}

.chat-row.receiver-msg .chat-bubble,
.chat-row.mine .chat-bubble {
  background: #d9fdd3;
  color: #111b21;
  border: 0;
  border-top-right-radius: 2px;
}

.chat-row.sender-msg .chat-bubble::before,
.chat-row.theirs .chat-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  border-top: 8px solid #ffffff;
  border-left: 8px solid transparent;
}

.chat-row.receiver-msg .chat-bubble::after,
.chat-row.mine .chat-bubble::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 0;
  border-top: 8px solid #d9fdd3;
  border-right: 8px solid transparent;
}

.escrow-chat-panel .chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 5;
  grid-template-columns: auto 1fr auto;
  flex: 0 0 auto;
  border-top: 1px solid rgba(0,0,0,.08);
}

.chat-file-input,
.chat-compose input[type="file"].chat-file-input {
  display: none !important;
}

.chat-icon-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border: 0;
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.photo-icon-btn {
  background: #ffffff;
  color: #54656f;
}

.send-icon-btn,
#sendChat.send-icon-btn {
  background: #128c7e;
  color: #ffffff;
  font-size: 19px;
  padding-left: 3px;
}

.chat-compose #chatMsg {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 760px) {
  .escrow-chat-panel .chat-compose {
    grid-template-columns: auto 1fr auto;
  }

  .chat-compose textarea {
    min-width: 0;
  }
}

/* Latest patch: show app-style dashboard cards again when escrow is inactive */
.app-dashboard-grid .app-mini-card,
.app-dashboard-grid .app-action-card {
  min-height: 118px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.app-dashboard-grid .app-mini-card h3 {
  margin: 0;
  font-size: 22px;
  color: var(--puyuu-dark);
}
.app-dashboard-grid .app-mini-card p,
.app-dashboard-grid .app-action-card p {
  margin: 0;
  color: var(--puyuu-muted);
  font-size: 13px;
}
.app-dashboard-grid .app-action-card {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.app-dashboard-grid .app-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
}
.app-dashboard-grid .app-action-card span {
  font-size: 30px;
  line-height: 1;
}

/* Latest patch: make website escrow chat match the Android app layout */
.exact-app-chat,
.escrow-chat-screen.exact-app-chat {
  height: calc(100vh - 132px);
  max-height: calc(100vh - 132px);
  overflow: hidden;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--puyuu-light-bg, #f8f9fa);
}
.exact-app-chat .compact-escrow-details {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 2px;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--puyuu-dark, #212529);
  color: #fff;
  box-shadow: none;
}
.app-escrow-header-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}
.app-escrow-hint {
  margin-top: 6px;
  font-size: 13px;
  color: #fff;
}
.app-escrow-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.app-escrow-amount {
  flex: 1 1 auto;
  color: var(--puyuu-success, #198754);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}
.exact-app-chat .compact-escrow-details .escrow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  margin-top: 0;
}
.exact-app-chat .compact-escrow-details .escrow-actions .btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 18px;
  font-size: 11px;
  box-shadow: none;
}
.exact-app-chat .escrow-chat-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--puyuu-light-bg, #f8f9fa);
  position: relative;
}
.exact-app-chat .escrow-chat-panel::before {
  content: none;
}
.exact-app-chat .escrow-chat-panel .notice {
  margin: 8px 2px 0;
  border-radius: 15px;
  text-align: center;
  font-weight: 900;
  background: maroon;
  color: #fff;
}
.exact-app-chat .app-chat-box {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.exact-app-chat .chat-row {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 6px 0;
}
.exact-app-chat .chat-row.mine {
  align-items: flex-start;
}
.exact-app-chat .chat-row.theirs {
  align-items: flex-end;
}
.exact-app-chat .chat-bubble {
  width: min(78%, 560px);
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: none;
  overflow-wrap: anywhere;
}
.exact-app-chat .chat-row.mine .chat-bubble {
  background: #6c757d;
  color: #fff;
  border: 0;
}
.exact-app-chat .chat-row.theirs .chat-bubble {
  background: var(--puyuu-card, #fff);
  color: var(--puyuu-text, #212529);
  border: 1px solid var(--puyuu-muted, #adb5bd);
}
.exact-app-chat .chat-bubble::before,
.exact-app-chat .chat-bubble::after {
  content: none !important;
}
.exact-app-chat .chat-header {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
  color: inherit;
  opacity: .95;
}
.exact-app-chat .chat-text {
  font-size: 15px;
  line-height: 1.35;
  color: inherit;
  white-space: pre-wrap;
}
.exact-app-chat .chat-time { display: none; }
.exact-app-chat .chat-proof {
  margin-top: 8px;
  border-radius: 10px;
  max-height: 720px;
  width: 100%;
  object-fit: cover;
}
.exact-app-chat .chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex: 0 0 auto;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: #c5c5c5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  box-shadow: none;
}
.exact-app-chat .chat-compose textarea {
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  resize: none;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.25);
  background: #fff;
  padding: 10px;
}
.exact-app-chat .chat-icon-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 8px;
}
.exact-app-chat .photo-icon-btn { background: #6c757d; color: #fff; }
.exact-app-chat .send-icon-btn,
.exact-app-chat #sendChat.send-icon-btn { background: var(--puyuu-dark, #212529); color: #fff; }
@media (max-width: 760px) {
  .exact-app-chat,
  .escrow-chat-screen.exact-app-chat {
    height: calc(100vh - 118px - env(safe-area-inset-bottom));
    max-height: calc(100vh - 118px - env(safe-area-inset-bottom));
  }
  .app-escrow-summary { align-items: flex-start; }
  .exact-app-chat .chat-bubble { width: 78%; max-width: 78%; }
}

/* Latest patch: dashboard action cards in one line and active-escrow disabled states */
.dashboard-actions-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.dashboard-profit-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.dashboard-actions-row .app-action-card {
  min-height: 96px;
  padding: 10px 6px;
  margin: 0;
}
.dashboard-actions-row .app-action-card span {
  font-size: 24px;
}
.dashboard-actions-row .app-action-card b {
  font-size: 15px;
  line-height: 1.1;
}
.dashboard-actions-row .app-action-card p {
  font-size: 11px;
  line-height: 1.15;
}
.app-action-card.disabled,
.bottom-nav button.disabled,
.bottom-nav button:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.35);
}
.bottom-nav button[data-page="referrals"] {
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #ffffff;
    padding: 8px 4px;
    font-weight: 900;
}
.bottom-nav button[data-page="referrals"].active {
  background: #198754;
}
@media (max-width: 430px) {
  .dashboard-actions-row {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 6px;
  }
  .dashboard-actions-row .app-action-card {
    padding: 8px 4px;
  }
}

/* Request patch: keep dashboard actions as separate cards, hide them in app.js during active escrow */
.dashboard-actions-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.dashboard-actions-row .app-action-card {
  min-height: 118px;
  padding: 14px 10px;
}
.currency-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 0 10px;
  background: #fff;
}
.currency-input-wrap .currency-prefix {
  font-weight: 800;
  color: #800000;
  white-space: nowrap;
}
.currency-input-wrap input {
  border: 0 !important;
  outline: 0;
  flex: 1;
  min-width: 0;
}
.send-currency-preview {
  margin: 6px 0 12px;
  font-weight: 800;
  color: #800000;
}
@media (max-width: 430px) {
  .dashboard-actions-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Latest patch: dashboard money shown as plain stacked text, not cards */
.dashboard-plain-money {
    width: 100%;
    display: flex;
    gap: 18px;
    padding: 6px 2px 12px;
    justify-content: center;
}
.dashboard-money-line {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
}
.dashboard-money-line b {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.dashboard-money-line h3 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.15;
}
.dashboard-money-line p {
  margin: 0;
  font-size: 13px;
  opacity: .75;
}


/* Latest patch: fixed escrow chat frame; only message list scrolls */
.app-shell.chat-mode {
  height: calc(100vh - 64px - 76px);
  min-height: calc(100vh - 64px - 76px);
  max-height: calc(100vh - 64px - 76px);
  padding: 0 5px;
  overflow: hidden;
}
.app-shell.chat-mode .page-head {
  display: none;
}
.app-shell.chat-mode .exact-app-chat,
.app-shell.chat-mode .escrow-chat-screen.exact-app-chat {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-shell.chat-mode .exact-app-chat .compact-escrow-details {
  position: sticky;
  top: 0;
  z-index: 50;
  flex: 0 0 auto;
  margin: 0 0 4px;
}
.app-shell.chat-mode .exact-app-chat .escrow-chat-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-shell.chat-mode .exact-app-chat .escrow-chat-panel .notice {
  flex: 0 0 auto;
}
.app-shell.chat-mode .exact-app-chat .app-chat-box {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.app-shell.chat-mode .exact-app-chat .chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 50;
  flex: 0 0 auto;
  margin: 0;
}
@media (max-width: 760px) {
  .app-shell.chat-mode {
    height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom));
    min-height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom));
    max-height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom));
  }
}

/* Verified patch: escrow chat fixed frame; header and composer stay visible, only messages scroll */
#app.chat-mode {
  height: calc(100vh - 64px - 76px);
  min-height: calc(100vh - 64px - 76px);
  max-height: calc(100vh - 64px - 76px);
  overflow: hidden !important;
  padding: 0 5px !important;
}
#app.chat-mode .page-head {
  display: none !important;
}
#app.chat-mode .escrow-chat-screen.exact-app-chat,
#app.chat-mode .exact-app-chat {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#app.chat-mode .exact-app-chat .compact-escrow-details {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  flex: 0 0 auto !important;
  margin: 0 0 4px !important;
}
#app.chat-mode .exact-app-chat .escrow-chat-panel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#app.chat-mode .exact-app-chat .escrow-chat-panel > .notice {
  flex: 0 0 auto !important;
}
#app.chat-mode .exact-app-chat .app-chat-box {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#app.chat-mode .exact-app-chat .chat-compose {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 100 !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}
@media (max-width: 760px) {
  #app.chat-mode {
    height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom));
    min-height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom));
    max-height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom));
  }
}

/* Marketplace users table */
.marketplace-table-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  overflow-x: auto;
}
.marketplace-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}
.marketplace-users-table th,
.marketplace-users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.marketplace-users-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.marketplace-users-table td small {
  display: block;
  color: #64748b;
  margin-top: 2px;
}
.marketplace-users-table tr:last-child td { border-bottom: 0; }
.marketplace-users-table .badge { margin-top: 5px; display: inline-block; }

/* Grouped marketplace table columns */
.marketplace-grouped-table { min-width: 760px; }
.marketplace-grouped-table th,
.marketplace-grouped-table td { white-space: normal; }
.marketplace-group-cell b { display: block; margin-bottom: 3px; }
.marketplace-group-cell small { display: block; line-height: 1.35; }
.marketplace-group-cell .badge { margin-right: 5px; }




/* Global font size increase (+1 size) */
body {
    font-size: 17px !important;
}

input,
select,
textarea,
button,
.btn,
.btn-primary,
.btn-success,
.btn-outline {
    font-size: 17px !important;
}

label {
    font-size: 17px !important;
}

p,
span,
small,
.muted {
    font-size: 17px !important;
}

h1 {
    font-size: calc(clamp(20px, 4vw, 20px) + 2px) !important;
}

h2 {
    font-size: calc(1.5rem + 2px) !important;
}

h3 {
    font-size: calc(1.17rem + 2px) !important;
}

.brand b {
    font-size: 23px !important;
}

.brand small {
    font-size: 14px !important;
}

.badge {
    font-size: 14px !important;
}

.bottom-nav span {
    font-size: 15px !important;
}

.table,
.data-table,
.tx-table,
.detail-table {
    font-size: 15px !important;
}

.chat-text {
    font-size: 15px !important;
}

.chat-time {
    font-size: 11px !important;
}

.confirm-head {
    font-size: 17px !important;
}

.confirm-table {
    font-size: 17px !important;
}


/* Same-style Android/reference conversion pass */
.btn,
button,
input[type="submit"],
input[type="button"] {
  border: 0;
  border-radius: 15px;
  background: #e2e0d8;
  color: #373737;
  padding: 10px 14px;
  font-weight: 900;
  text-transform: none;
}

.btn-success,
button.success {
  background: #198754;
  color: #ffffff;
}

.alert,
.message,
.error,
.success {
  border-radius: 15px;
  padding: 12px;
  text-align: center;
  margin: 10px 0;
}

.error { background: #f8d7da; color: #842029; }
.success { background: #d1e7dd; color: #0f5132; }
.warning { background: #fff3cd; color: #664d03; }

table,
.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 15px;
  overflow: hidden;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e2e0d8;
  text-align: left;
}

th {
  background: #000000;
  color: #ffffff;
}


/* Same-style conversion pass: button/table/listener-friendly UI */
.btn,
button.btn {
  border-radius: 15px;
  border: 2px solid #354149;
  min-height: 42px;
  font-weight: 900;
  letter-spacing: .2px;
}

.btn.outline {
  background: #D0CFCE;
  color: #373737;
}

.table-card {
  border-radius: 15px;
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 2px solid #354149;
  border-radius: 15px;
  overflow: hidden;
}

.data-table th {
  background: #212529;
  color: #ffffff;
  font-weight: 900;
  padding: 12px;
  text-align: left;
}

.data-table td {
  border-top: 1px solid #e5e8ec;
  padding: 12px;
  vertical-align: middle;
}

.app-table-row,
.data-table tbody tr {
  cursor: pointer;
}

.app-table-row:hover,
.data-table tbody tr:hover {
  background: #f4f6f9;
}

.status-action {
  border: 0;
  border-radius: 12px;
  padding: 7px 10px;
  font-weight: 900;
}

@media (max-width: 680px) {
  .tx-responsive thead {
    display: none;
  }

  .tx-responsive tr {
    display: block;
    margin: 10px;
    border: 2px solid #354149;
    border-radius: 15px;
    overflow: hidden;
  }

  .tx-responsive td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .tx-responsive td::before {
    content: attr(data-label);
    font-weight: 900;
    color: #6c757d;
  }
}


/* Final same-style pass: transparent footer and fixed app-style buttons */
.bottom-nav {
  background: transparent !important;
  box-shadow: none !important;
}

.bottom-nav button {
  background: rgba(208, 207, 206, 0.96) !important;
  color: #2a2a2a !important;
  margin: 0 3px;
}

.bottom-nav button.active {
  background: var(--puyuu-success) !important;
  color: #ffffff !important;
}

.btn,
.btn-primary,
.btn-outline {
  background: var(--puyuu-secondary);
  color: #ffffff;
}

.btn-success,
.btn.green,
.btn.success,
button[type="submit"].btn {
  background: var(--puyuu-success);
  color: #ffffff;
}

.table,
.data-table,
.tx-table,
.detail-table,
table {
  border-radius: var(--radius);
}

/* Verified final style pass: table and button polish matched to Android reference */
.table-card,
.table-scroll,
.data-table,
.tx-table,
.detail-table {
  border-radius: 15px;
}

.table-scroll {
  background: transparent;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #d0cfce;
}

.data-table th {
  background: #36454f;
  color: #ffffff;
  font-weight: 800;
  padding: 10px;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid #eeeeee;
  color: #212529;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.btn,
.btn-primary,
.btn-success,
.btn-outline,
button.btn {
  border-radius: 40px !important;
  border: 2px solid #354149 !important;
  box-shadow: none !important;
  text-transform: none !important;
}

.btn.outline,
.btn-outline {
  background: #d0cfce !important;
  color: #2a2a2a !important;
}


/* Marketplace loading modal */
.marketplace-loading-modal{position:fixed;inset:0;z-index:260;display:grid;place-items:center;padding:18px}
.marketplace-loading-modal.hidden{display:none!important}
.marketplace-loading-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.58);backdrop-filter:blur(2px)}
.marketplace-loading-card{position:relative;width:min(340px,100%);background:#fff;border-radius:24px;padding:28px 22px;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,.28);display:grid;gap:10px;justify-items:center;animation:modalPop .18s ease-out}
.marketplace-loading-card strong{font-size:18px;color:var(--puyuu-text)}
.marketplace-loading-card span{font-size:13px;color:var(--puyuu-muted);font-weight:800}
.marketplace-spinner{width:46px;height:46px;border:5px solid #e9ecef;border-top-color:#198754;border-radius:50%;animation:marketSpin .85s linear infinite}
@keyframes marketSpin{to{transform:rotate(360deg)}}

/* Restyled profile page */
.app-profile-hero{display:flex;align-items:center;gap:14px;padding:18px;border-radius:22px;background:linear-gradient(135deg,#212529,#495057);color:#fff;margin-bottom:14px;box-shadow:0 14px 30px rgba(33,37,41,.18)}
.app-profile-avatar{width:58px;height:58px;border-radius:20px;background:#fff;color:#212529;display:grid;place-items:center;font-size:28px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.app-profile-hero span{font-size:12px;text-transform:uppercase;letter-spacing:.12em;opacity:.75;font-weight:900}
.app-profile-hero h2{margin:2px 0;font-size:22px;color:#fff}
.app-profile-hero p{margin:0;opacity:.85;color:#fff}
.app-profile-card{padding:14px;background:linear-gradient(180deg,#fff,#f8f9fa);border:1px solid rgba(33,37,41,.08);border-radius:24px}
.app-profile-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:transparent;box-shadow:none;padding:0}
.app-profile-info>div{background:#fff;border:1px solid rgba(33,37,41,.08);border-radius:16px;padding:12px;display:grid;gap:5px;box-shadow:0 8px 20px rgba(33,37,41,.05)}
.app-profile-info b{color:var(--puyuu-muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.app-profile-info span{color:var(--puyuu-text);font-weight:900;overflow-wrap:anywhere}
.app-puyuu-code-card{border-radius:18px;background:#212529;color:#fff;border:0;box-shadow:0 12px 24px rgba(33,37,41,.16)}
.app-puyuu-code-card span,.app-puyuu-code-card strong{color:#fff}
@media(max-width:560px){.app-profile-info{grid-template-columns:1fr}.app-profile-hero{align-items:flex-start}.app-profile-avatar{width:52px;height:52px}}

/* Released escrow dashboard notice */
.dashboard-release-layout {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.released-escrow-dashboard-card {
  max-width: 520px;
  text-align: center;
}
.released-escrow-dashboard-card h2 {
  margin: 14px 0 8px;
}
.released-escrow-dashboard-card p {
  line-height: 1.6;
  margin-bottom: 18px;
}

/* WhatsApp-style escrow chat photos */
.exact-app-chat .chat-proof,
.chat-proof {
  width: 180px;
  height: 180px;
  max-width: 72vw;
  max-height: 180px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 12px;
}
.selected-photo-strip {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: #495057;
}
.selected-photo-pill {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  padding: 4px 8px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.photo-viewer-backdrop img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.photo-viewer-close {
  position: fixed;
  top: 14px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}


/* WhatsApp-style escrow chat send status */
.chat-status {
  font-size: 12px;
  line-height: 1;
  margin-top: 6px;
  text-align: right;
  opacity: .82;
  letter-spacing: -1px;
}
.chat-status.pending { opacity: .55; }
.chat-status.sent { opacity: .9; }
.chat-status.failed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  float: right;
}
.local-pending .chat-bubble { opacity: .96; }

.chat-status.read { color: #21c063; font-weight: 800; opacity: 1; }


/* Web escrow chat inline errors */
.chat-compose #chatMsg {
  width: 100%;
  grid-column: 1 / -1;
}
.chat-error-message {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  font-weight: 800;
  text-align: center;
}


/* Patch: keep escrow bank action above chat typing controls */
.exact-app-chat .chat-compose {
  display: block;
}
.exact-app-chat .chat-bank-action {
  margin-bottom: 8px;
}
.exact-app-chat .chat-bank-action .btn {
  width: 100%;
}
.exact-app-chat .chat-compose-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.exact-app-chat .chat-compose-row textarea {
  width: 100%;
  min-width: 0;
}
.exact-app-chat .selected-photo-strip,
.exact-app-chat .chat-compose #chatMsg {
  margin-top: 8px;
}

/* Polished release/cancel and marketplace confirmation modals */
.confirm-backdrop {
  backdrop-filter: blur(7px);
  background: rgba(15, 23, 42, 0.62);
}

.confirm-card {
  border: 0 !important;
  border-radius: 26px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34);
}

.confirm-head {
  padding: 16px 22px;
  letter-spacing: -0.01em;
}

.confirm-body {
  padding: 18px 18px 14px;
}

.confirm-modal.error .confirm-head {
  background: linear-gradient(135deg, #dc3545, #a61e2d);
}

.confirm-modal.success .confirm-head {
  background: linear-gradient(135deg, #198754, #0f6848);
}

.confirm-table {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #e9ecef;
  border: 0;
}

.confirm-note.fee-note {
  background: #fff8e1;
}

#escrowActionPassword {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid #dee2e6;
  border-radius: 14px;
  padding: 13px 14px;
  font-weight: 800;
}

.confirm-actions {
  padding: 4px 18px 18px;
}

.confirm-actions .btn {
  min-height: 46px;
  border-radius: 15px;
}
