/* Small additions used by the client patch */
.addr-cell {
  display: flex; align-items: center; gap: 0.4rem;
  max-width: 320px;
}
.addr-full {
  flex: 1; min-width: 0;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all; line-height: 1.3;
  padding: 0.3rem 0.45rem;
  background: rgba(8,10,25,.55);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  user-select: all;
  cursor: text;
}
.addr-cell .btn { flex: 0 0 auto; padding: 0.3rem 0.55rem; font-size: 0.75rem; }
.pw-value { padding: 0.2rem 0.4rem; border-radius: 6px; background: rgba(43,225,255,.1); }

/* Active contract enhancements (client spec: show accruing yield vs payout-on-maturity) */
.active-contract-row .ac-earned {
  color: var(--primary-2);
  background: rgba(43,225,255,.08);
  border: 1px solid rgba(43,225,255,.35);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.active-contract-row .ac-payout-hint {
  color: #2ee5a5;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: rgba(46,229,165,.08);
  border: 1px solid rgba(46,229,165,.35);
  border-radius: 999px;
}

/* ===== Green Paper / PDF reader ===== */
.pdf-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem;
  margin: 0.9rem 0;
  border-radius: 12px;
  position: sticky; top: 0; z-index: 10;
}
.pdf-toolbar-group { display: inline-flex; align-items: center; gap: 0.5rem; }
.pdf-page-label, .pdf-zoom-label { font-size: 0.9rem; color: var(--text-dim); }
.pdf-page-label input { padding: 0.3rem 0.4rem; font-size: .9rem; }

.pdf-viewport {
  position: relative;
  min-height: 400px;
  padding: 1rem;
  background: rgba(8,10,25,.35);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: auto;
  display: flex; justify-content: center;
}
#pdf-canvas {
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  border-radius: 6px;
  max-width: 100%;
}
.pdf-loading { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin: 3rem 0; }
.pdf-spinner {
  width: 42px; height: 42px;
  border: 3px solid rgba(123,92,255,.2);
  border-top-color: var(--primary-2);
  border-radius: 50%;
  animation: mcio-pdf-spin 0.9s linear infinite;
}
@keyframes mcio-pdf-spin { to { transform: rotate(360deg); } }

.pdf-bottom-pager {
  display: flex; gap: 0.7rem; align-items: center; justify-content: center;
  padding: 0.9rem;
  margin-top: 0.8rem;
  border-top: 1px solid var(--stroke);
}

/* ===== Admin: Users table action buttons ===== */
.user-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-actions .btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .01em;
  min-width: 82px;
  white-space: nowrap;
  border-radius: 8px;
}
.user-actions .btn svg { opacity: .85; flex: 0 0 auto; }

/* subtle accents so the two buttons feel distinct without being loud */
.user-actions .js-pw-set {
  color: #c9d5ff;
  border-color: rgba(123,92,255,.4);
  background: rgba(123,92,255,.06);
}
.user-actions .js-pw-set:hover {
  background: rgba(123,92,255,.14);
  border-color: rgba(123,92,255,.65);
  color: #fff;
}
.user-actions .js-bal-adjust {
  color: #c9ffe7;
  border-color: rgba(46,229,165,.45);
  background: rgba(46,229,165,.06);
}
.user-actions .js-bal-adjust:hover {
  background: rgba(46,229,165,.14);
  border-color: rgba(46,229,165,.7);
  color: #eafff4;
}

/* ===== Balance-adjust modal ===== */
.mcio-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(4, 6, 20, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 9500;
  animation: mcio-modal-fade .16s ease;
  padding: 1rem;
}
.mcio-modal-backdrop.is-closing { animation: mcio-modal-fade-out .14s ease forwards; }
@keyframes mcio-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mcio-modal-fade-out { from { opacity: 1; } to { opacity: 0; } }

.mcio-modal {
  width: min(460px, 100%);
  padding: 1.5rem 1.5rem 1.2rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20,25,55,.95), rgba(12,15,32,.95));
  border: 1px solid var(--stroke);
  box-shadow: 0 26px 60px rgba(0,0,0,.55);
  position: relative;
  animation: mcio-modal-in .22s cubic-bezier(.16,1,.3,1);
}
@keyframes mcio-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.mcio-modal h2 { margin: 0 0 .1rem; font-size: 1.2rem; }
.mcio-modal-sub { margin: 0 0 .5rem; color: var(--text-dim); font-size: .88rem; word-break: break-all; }
.mcio-modal-close {
  position: absolute; right: .8rem; top: .8rem;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.25rem; line-height: 1;
}
.mcio-modal-close:hover { color: #fff; background: rgba(255,255,255,.10); }

.mcio-modal-current {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1rem;
  margin: .8rem 0;
  background: rgba(8,10,25,.6);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}
.mcio-modal-current span { color: var(--text-dim); font-size: .82rem; }
.mcio-modal-current strong { color: #2be1ff; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.mcio-modal-quick {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: .3rem 0 .5rem;
}
.mcio-modal-quick button {
  padding: .4rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(20,25,55,.5);
  color: var(--text-dim);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.mcio-modal-quick button:hover {
  background: rgba(123,92,255,.16);
  color: #fff;
  border-color: rgba(123,92,255,.6);
}

.mcio-modal label {
  display: block;
  color: var(--text-dim);
  font-size: .8rem;
  margin: .7rem 0 .2rem;
}
.mcio-modal input, .mcio-modal textarea { margin-top: .25rem; }
.mcio-modal textarea { resize: vertical; min-height: 2.4rem; }

.mcio-modal-preview {
  min-height: 1.6rem;
  margin-top: .9rem;
  padding: .55rem .9rem;
  text-align: center;
  border-radius: 10px;
  background: rgba(8,10,25,.45);
  border: 1px solid var(--stroke);
  font-variant-numeric: tabular-nums;
}
.mcio-modal-preview.is-credit strong { color: #2ee5a5; }
.mcio-modal-preview.is-debit  strong { color: #ff8aa3; }
.mcio-modal-preview.is-warn   { border-color: rgba(255,138,163,.5); }
.mcio-modal-warn { color: #ff8aa3; margin-left: .4rem; font-size: .8rem; }

.mcio-modal-actions {
  display: flex; gap: .55rem; justify-content: flex-end;
  margin-top: 1rem;
}

/* ===== P2P transfer preview ===== */
.p2p-fee-notice {
  padding: .7rem .9rem;
  margin: .3rem 0;
  border-radius: 10px;
  border: 1px solid rgba(255,200,87,.35);
  background: rgba(255,200,87,.06);
  color: #ffe7b3;
  font-size: .85rem;
}
.p2p-preview {
  padding: .55rem .9rem;
  margin: .3rem 0;
  border-radius: 10px;
  background: rgba(8,10,25,.55);
  border: 1px solid var(--stroke);
  font-size: .88rem;
  min-height: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.p2p-preview span { display: inline-block; margin-right: .8rem; color: var(--text-dim); }
.p2p-preview strong { color: var(--text); font-variant-numeric: tabular-nums; }
