:root {
  --purple-900: #2b0044;
  --purple-800: #3d0060;
  --purple-700: #4b0070;
  --purple-500: #7a00b8;
  --purple-300: #b98cd6;
  --gold: #ffc700;
  --gold-dim: #cfa300;
  --lilac-neon: #d18cff;
  --graphite: #232228;
  --graphite-dark: #131216;
  --orange: #ff5a1f;
  --black: #111111;
  --bg: #150524;
  --surface: #1f0c34;
  --surface-2: #2a1244;
  --text: #f4eefb;
  --text-dim: #b6a3cc;
  --danger: #ff4d4f;
  --success: #34d399;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(122, 0, 184, 0.35), transparent 60%),
    var(--bg);
}

a {
  color: var(--gold);
}

button {
  font-family: inherit;
}

img,
svg {
  max-width: 100%;
  display: block;
}

/* ---- Header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(21, 5, 36, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand-name {
  font-weight: 900;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.5px;
}

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

.mode-toggle {
  display: flex;
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-toggle button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.mode-toggle button.active {
  background: var(--gold);
  color: var(--black);
}

.lang-toggle {
  display: flex;
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--lilac-neon);
  color: var(--black);
}

/* ---- Layout ---- */
#app {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.view {
  display: none;
  animation: fadeIn 0.25s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Typography ---- */
h1 {
  font-size: 26px;
  font-weight: 900;
  margin: 4px 0 4px;
}

h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 10px;
}

p.subtitle {
  color: var(--text-dim);
  margin: 0 0 20px;
  font-size: 14px;
}

.eyebrow {
  color: var(--orange);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

/* ---- Cards ---- */
.card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card.tight {
  padding: 14px;
}

.campaign-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.campaign-card:active {
  transform: scale(0.98);
}

.campaign-card:hover {
  border-color: var(--gold);
}

.campaign-card .reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 199, 0, 0.12);
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 999px;
  margin-top: 10px;
}

.campaign-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.campaign-card .meta {
  color: var(--text-dim);
  font-size: 13px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

/* insignia de USDT (verde tether real) sobre botones de fondeo */
.usdt-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #26a17b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(38, 161, 123, 0.4);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(255, 199, 0, 0.4);
}

/* boton de volver */
.btn-back {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(255, 199, 0, 0.4);
  border-radius: var(--radius-sm);
  width: auto;
  padding: 8px 14px;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn {
  flex: 1;
}

/* ---- Forms ---- */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.field input[type='file'] {
  padding: 20px 14px;
  border-style: dashed;
  border-width: 2px;
  text-align: center;
  color: var(--text-dim);
}

/* ---- Wallet ---- */
.wallet-hero {
  text-align: center;
  padding: 28px 18px;
}

.wallet-balance {
  font-size: 44px;
  font-weight: 900;
  color: var(--gold);
  margin: 6px 0;
}

.wallet-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* ---- Reward confirmation ---- */
.reward-splash {
  text-align: center;
  padding: 40px 18px;
}

.reward-splash .amount {
  font-size: 52px;
  font-weight: 900;
  color: var(--gold);
  margin: 8px 0;
  animation: pop 0.4s ease;
}

@keyframes pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.check-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 36px;
  animation: pop 0.5s ease;
}

/* ---- Ledger / history ---- */
.ledger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ledger-item:last-child {
  border-bottom: none;
}

.ledger-item .amount {
  font-weight: 800;
}

.ledger-item .amount.in {
  color: var(--success);
}

.ledger-item .amount.out {
  color: var(--text-dim);
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag.sent {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.tag.pending {
  background: rgba(255, 199, 0, 0.15);
  color: var(--gold);
}

.tag.danger {
  background: rgba(255, 77, 79, 0.15);
  color: var(--danger);
}

/* ---- Bottom nav ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  background: rgba(21, 5, 36, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  cursor: pointer;
}

.bottom-nav button .icon {
  font-size: 20px;
}

.bottom-nav button.active {
  color: var(--gold);
}

/* ---- Misc ---- */
.badge-wdk {
  display: block;
  width: 180px;
  margin: 24px auto 0;
  opacity: 0.9;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ---- Loader de validacion con IA (3 pasos) ---- */
.ai-loader {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(255, 199, 0, 0.06), transparent 60%), var(--surface);
}

/* fondo que representa red neuronal / blockchain -- nodos, links y bloques */
.ai-loader-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.ai-bg-links line {
  animation: ai-bg-flow 3.4s ease-in-out infinite;
}
.ai-bg-links line:nth-child(2) { animation-delay: 0.3s; }
.ai-bg-links line:nth-child(3) { animation-delay: 0.6s; }
.ai-bg-links line:nth-child(4) { animation-delay: 0.9s; }
.ai-bg-links line:nth-child(5) { animation-delay: 1.2s; }
.ai-bg-links line:nth-child(6) { animation-delay: 1.5s; }
.ai-bg-links line:nth-child(7) { animation-delay: 1.8s; }
.ai-bg-links line:nth-child(8) { animation-delay: 2.1s; }
.ai-bg-links line:nth-child(9) { animation-delay: 2.4s; }
.ai-bg-links line:nth-child(10) { animation-delay: 2.7s; }

@keyframes ai-bg-flow {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.6; }
}

.ai-bg-nodes circle {
  animation: ai-bg-node-pulse 2.6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.ai-bg-nodes circle:nth-child(2n) { animation-delay: 0.5s; }
.ai-bg-nodes circle:nth-child(3n) { animation-delay: 1s; }
.ai-bg-nodes circle:nth-child(4n) { animation-delay: 1.5s; }

@keyframes ai-bg-node-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(2); }
}

.ai-bg-blocks {
  animation: ai-bg-blocks-drift 6s ease-in-out infinite;
  transform-origin: center;
}
.ai-bg-blocks-2 {
  animation-duration: 7.5s;
  animation-delay: 0.6s;
}

@keyframes ai-bg-blocks-drift {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-6px); opacity: 0.65; }
}

.ai-loader-icon {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

/* anillo escaneando en degrade -- efecto "leyendo" detras del spark */
.ai-loader-scan {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 199, 0, 0.4) 60deg,
    transparent 140deg,
    rgba(209, 140, 255, 0.4) 220deg,
    transparent 300deg
  );
  animation: ai-scan-spin 3.2s linear infinite;
  filter: blur(3px);
}

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

/* orbitas punteadas tipo "verificando bloque" */
.ai-loader-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 199, 0, 0.35);
  animation: ai-orbit-spin 8s linear infinite;
}

.ai-loader-orbit-2 {
  inset: 14px;
  border-color: rgba(209, 140, 255, 0.35);
  animation-duration: 11s;
  animation-direction: reverse;
}

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

/* nodos que viajan por las orbitas */
.ai-loader-orbit-wrap {
  position: absolute;
  inset: 0;
  animation: ai-orbit-spin 4s linear infinite;
}

.ai-loader-orbit-wrap-2 {
  inset: 14px;
  animation-duration: 5.5s;
  animation-direction: reverse;
}

.ai-loader-orbit-dot {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 199, 0, 0.85);
}

.ai-loader-orbit-dot-2 {
  background: var(--lilac-neon);
  box-shadow: 0 0 8px rgba(209, 140, 255, 0.85);
}

.ai-spark {
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 2;
  animation: ai-spark-pulse 1.8s ease-in-out infinite, ai-spark-spin 6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 199, 0, 0.55));
}

@keyframes ai-spark-pulse {
  0%,
  100% {
    transform: scale(0.85);
  }
  50% {
    transform: scale(1.05);
  }
}

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

.ai-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  animation: ai-ring-ping 2.4s ease-out infinite;
}

.ai-loader-ring-2 {
  border-color: var(--lilac-neon);
  animation-delay: 1.2s;
}

@keyframes ai-ring-ping {
  0% {
    transform: scale(0.5);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.ai-loader-step-text {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
  min-height: 22px;
}

.ai-loader-dots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
}

.ai-loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.3s ease, transform 0.3s ease;
}

.ai-loader-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}

.toast-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.15s ease;
}

.toast {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--surface-2);
  border: 2px solid var(--gold);
  color: var(--text);
  padding: 32px 28px;
  border-radius: var(--radius);
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  line-height: 1.4;
  box-shadow: var(--shadow);
  animation: pop 0.2s ease;
}

.toast p {
  margin: 0;
}

.toast-title {
  font-size: 22px;
  margin-bottom: 8px !important;
}

.toast p:not(.toast-title) {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

.toast-error {
  border-color: var(--danger);
}

.toast-success {
  border-color: var(--success);
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* "ver mas" -- detalle tecnico del error, oculto por defecto (para debug) */
.toast-detail-toggle {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.toast-detail {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: rgba(255, 77, 79, 0.1);
  border: 1px solid rgba(255, 77, 79, 0.35);
  border-radius: var(--radius-sm);
  color: #ffb3b4;
  font-size: 11px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-weight: 400;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

.error-box {
  background: rgba(255, 77, 79, 0.12);
  border: 1px solid rgba(255, 77, 79, 0.4);
  color: #ffb3b4;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}

.kill-switch-banner {
  background: rgba(255, 77, 79, 0.15);
  border: 1px solid var(--danger);
  color: #ffb3b4;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 18px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-dim);
  word-break: break-all;
}

@media (min-width: 640px) {
  #app {
    padding-top: 24px;
  }
}

/* ---- Wallet card (Apple-Wallet-style, reused on Home/Wallet/Gift/Business) ---- */
.wallet-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px 22px 18px;
  min-height: 170px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-900) 120%);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wallet-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 199, 0, 0.18), transparent 55%);
  pointer-events: none;
}

.wallet-card.gold {
  background: linear-gradient(135deg, #b8860b, #3d2a00 120%);
}

.wallet-card.treasury {
  background: linear-gradient(150deg, var(--graphite), var(--graphite-dark) 130%);
  border: 1px solid rgba(209, 140, 255, 0.28);
  box-shadow: 0 0 36px rgba(209, 140, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.wallet-card.treasury::after {
  background: radial-gradient(circle at 100% 0%, rgba(209, 140, 255, 0.22), transparent 55%);
}

.wallet-card-usd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
}

.treasury-tokens {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.treasury-token {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.treasury-token-symbol {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--lilac-neon);
  text-transform: uppercase;
}

.treasury-token-amount {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  margin-top: 2px;
}

.wallet-card.small {
  min-height: 120px;
  padding: 16px 18px;
}

.wallet-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.refresh-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  padding: 0 0 0 4px;
  opacity: 0.7;
}

.refresh-btn:active {
  opacity: 1;
}

.wallet-card-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 4px;
}

.wallet-card-balance {
  font-size: 34px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
}

.wallet-card.small .wallet-card-balance {
  font-size: 24px;
}

.wallet-card-source {
  margin: 2px 0 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.currency-toggle {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.currency-toggle button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.currency-toggle button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.currency-toggle button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.wallet-card-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.wallet-card-brand img {
  width: 22px;
  height: 22px;
}

.wallet-card-coin-big {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.wallet-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.wallet-card-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wallet-card-network {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---- Action icon row (Send / Scan / Receive) ---- */
.action-icons-row {
  display: flex;
  justify-content: space-around;
  margin: 18px 0 22px;
}

.action-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.action-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.action-icon-btn.primary .action-icon-circle {
  background: var(--gold);
  color: var(--black);
}

/* ---- GiftToken cards ---- */
.gifttoken-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.gifttoken-flip {
  perspective: 1200px;
  height: 46vh;
  min-height: 220px;
  max-height: 340px;
}

.gifttoken-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.gifttoken-flip.flipped .gifttoken-flip-inner {
  transform: rotateY(180deg);
}

.gifttoken-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  padding: 12px;
  color: #fff;
  box-shadow: var(--shadow);
  cursor: default;
  backface-visibility: hidden;
}

.gifttoken-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 10%, rgba(0, 0, 0, 0.05) 60%);
}

.gifttoken-back {
  transform: rotateY(180deg);
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.gifttoken-top-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.gifttoken-logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gifttoken-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gifttoken-logo-fallback {
  font-size: 16px;
}

.gifttoken-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 999px;
}

.gifttoken-emoji-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  opacity: 0.3;
}

.gifttoken-card .gifttoken-content {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.gifttoken-brand {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  margin-bottom: 3px;
}

.gifttoken-title {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.gifttoken-divider {
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
  margin: 8px 0;
}

.gifttoken-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gifttoken-value {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  font-size: 14px;
}

.gifttoken-value img {
  width: 18px;
  height: 18px;
}

.gifttoken-redeem-btn {
  border: none;
  background: var(--gold);
  color: var(--black);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.gifttoken-redeem-btn:disabled {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
}

.gifttoken-hint {
  font-size: 10px;
  opacity: 0.75;
  margin: 6px 0 0;
}

.gifttoken-card .btn {
  padding: 8px 12px;
  font-size: 12px;
}

.gifttoken-qr {
  width: 72%;
  max-width: 190px;
  border-radius: 8px;
  overflow: hidden;
}

.gifttoken-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gifttoken-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
}

.gifttoken-qr-hint {
  font-size: 11.5px;
  opacity: 0.85;
  text-align: center;
  margin: 8px 0 0;
  max-width: 150px;
}

.gifttoken-redeemed-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.gifttoken-redeemed-check {
  font-size: 38px;
  line-height: 1;
}

.gifttoken-redeemed-label {
  font-weight: 800;
  font-size: 14px;
}

/* ---- POS: escaneo de QR y canje de GiftTokens ---- */
.pos-scanner-card {
  display: flex;
  justify-content: center;
}

.pos-camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-camera-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-scan-frame {
  position: absolute;
  inset: 14%;
  border: 2.5px solid var(--gold);
  border-radius: 16px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.pos-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
  text-align: center;
  background: rgba(11, 10, 16, 0.75);
  backdrop-filter: blur(2px);
}

.pos-scan-overlay.active {
  display: flex;
}

.pos-scan-overlay .pos-result-title {
  color: #fff;
  margin: 0;
}

.pos-camera-hint {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.pos-result {
  text-align: center;
}

.pos-result-title {
  font-weight: 800;
  font-size: 16px;
  margin: 0 0 6px;
}

.pos-result-check {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 4px;
}

.pos-result-success {
  border-color: rgba(46, 204, 113, 0.4);
}

.pos-result-error .pos-result-title {
  color: var(--danger);
}

.pos-scan-feedback-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 6px;
  animation: pos-scan-pulse 0.9s ease-in-out infinite;
}

@keyframes pos-scan-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

/* ---- Category tabs (missions / campaign creation) ---- */
.category-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 16px;
  overflow-x: auto;
}

.category-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.category-tab-icon {
  display: flex;
  color: inherit;
}

.category-tab-icon svg {
  width: 20px;
  height: 20px;
}

.category-tab.active {
  border-color: var(--gold);
  background: rgba(255, 199, 0, 0.12);
  color: var(--gold);
}

/* ---- Reward type cards (campaign creation) ---- */
.reward-type-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.reward-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  cursor: pointer;
}

.reward-type-card input {
  width: auto !important;
  flex-shrink: 0;
}

.reward-type-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.reward-type-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reward-type-text strong {
  font-size: 14px;
}

.reward-type-card.active {
  border-color: var(--gold);
  background: rgba(255, 199, 0, 0.08);
}

/* ---- Condicion visible para el cliente final ---- */
.condition-box {
  background: rgba(255, 199, 0, 0.08);
  border: 1px solid rgba(255, 199, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.condition-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.condition-text {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ---- History list icons ---- */
.history-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.history-icon-circle.received {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.history-icon-circle.sent {
  background: rgba(255, 77, 79, 0.15);
  color: var(--danger);
}

.ledger-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- WDK "behind the scenes" panel ---- */
.wdk-behind {
  margin-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

.wdk-behind summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.wdk-behind code {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #b6f0c2;
  word-break: break-all;
  white-space: pre-wrap;
}

/* ---- Customer list (business panel) ---- */
.customer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.customer-row:last-child {
  border-bottom: none;
}

.customer-row .contact {
  font-weight: 700;
  font-size: 14px;
}

.customer-row .addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-dim);
}
