/* ==========================================================================
   LEOVIC • Estilos de módulos: CxC/CxP (cartera), Tasas del Día y Tutoriales
   ========================================================================== */

/* ---------- CxC / CxP ---------- */
.cxcp-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cxcp-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 0.74rem/1 'Inter', sans-serif;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e8e8ed);
  background: var(--bg-secondary, #fff);
  color: var(--text-secondary, #6e6e73);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cxcp-status-chip:hover { border-color: #2d572c; color: #2d572c; }
.cxcp-status-chip.active { background: #2d572c; border-color: #2d572c; color: #fff; }
.cxcp-chip-count {
  font-size: 0.66rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}
.cxcp-status-chip.active .cxcp-chip-count { background: rgba(255, 255, 255, 0.22); }

.cxcp-aging-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border-color, #e8e8ed);
  gap: 2px;
}
.cxcp-aging-seg { min-width: 4px; transition: flex 0.4s ease; }

.cxcp-progress {
  height: 7px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.cxcp-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.cxcp-pay-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e8e8ed);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.cxcp-pay-summary span {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-secondary, #6e6e73);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cxcp-pay-summary strong { font-size: 0.86rem; letter-spacing: -0.015em; }

.cxcp-pay-preview {
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
}
.cxcp-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  padding: 3px 0;
}
.cxcp-preview-row span { color: var(--text-secondary, #6e6e73); }
.cxcp-preview-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color, #e8e8ed);
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
}
.cxcp-preview-flow span:not(.arrow) {
  background: #eef2ff;
  border-radius: 6px;
  padding: 3px 7px;
}
.cxcp-preview-flow .arrow { color: #94a3b8; animation: cxcpArrow 1.4s ease-in-out infinite; }
@keyframes cxcpArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

@media (max-width: 1500px) {
  .cxcp-workspace { grid-template-columns: 1fr !important; }
}

/* ---------- Dashboard: foto de activos ---------- */
.as-wrap { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.as-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 95% 10%, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(120deg, #1b3d21 0%, #2d572c 55%, #3f7a3d 100%);
  box-shadow: 0 10px 26px rgba(27, 61, 33, 0.22);
}
.as-hero-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-kicker { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.as-total { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.as-sub { font-size: 0.74rem; opacity: 0.85; line-height: 1.45; max-width: 620px; }
.as-sub strong { opacity: 1; }
.as-hero-side { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.as-hero-pill {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.as-hero-pill span { font-size: 0.7rem; font-weight: 600; opacity: 0.9; }
.as-hero-pill strong { font-size: 0.95rem; font-weight: 800; white-space: nowrap; }
.as-hero-pill-strong { background: #fff; color: #1b3d21; border-color: #fff; }
.as-hero-pill-strong span { opacity: 0.75; }

.as-bar {
  display: flex;
  gap: 3px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border-color, #e8e8ed);
}
.as-bar-seg { min-width: 6px; transition: flex 0.5s ease; }
.as-c-usdt { background: #2d572c; }
.as-c-bank { background: #2563eb; }
.as-c-cxc { background: #f59e0b; }

.as-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.as-c-cxp { background: #e11d48; }
.as-card-debt { background: linear-gradient(180deg, #fff 0%, #fff7f8 100%); }
.as-card-debt > strong { color: #be123c; }
.as-card-debt .as-card-head em { background: #fff1f2; color: #be123c; }
.as-ref {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #6e6e73);
  letter-spacing: 0;
}
.as-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-color, #e8e8ed);
  background: var(--bg-secondary, #fff);
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.as-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07); border-color: #cbd5e1; }
.as-card-head { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 700; color: var(--text-secondary, #6e6e73); text-transform: uppercase; letter-spacing: 0.03em; }
.as-card-head em { margin-left: auto; font-style: normal; font-size: 0.72rem; color: var(--text-primary, #1d1d1f); background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }
.as-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.as-card > strong { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-card-sub { font-size: 0.74rem; color: var(--text-secondary, #6e6e73); }
.as-banks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-color, #e8e8ed); }
.as-bank-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px auto; gap: 8px; align-items: center; font-size: 0.74rem; }
.as-bank-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.as-bank-row > strong { font-size: 0.76rem; white-space: nowrap; }
.as-bank-bar { height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.as-bank-bar div { height: 100%; border-radius: 999px; background: #2563eb; }
.as-alert, .as-ok { align-self: flex-start; margin-top: 6px; font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.as-alert { color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; }
.as-ok { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.as-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary, #1d1d1f);
}
.as-section-title svg { width: 16px; height: 16px; color: #2d572c; }

@media (max-width: 1250px) {
  .as-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .as-hero { grid-template-columns: 1fr; }
  .as-hero-side { min-width: 0; }
  .as-cards { grid-template-columns: 1fr; }
  .as-total { font-size: 1.7rem; }
}

/* ---------- Animación de proceso (a dónde se movió el dinero) ---------- */
.pa-modal { padding: 0 !important; overflow: hidden; }
.pa-stage {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 28px 22px 22px;
  background:
    radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.06) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color, #e8e8ed);
}
.pa-node {
  flex: 1 1 0;
  min-width: 0;
  max-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 8px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--pa-color, #cbd5e1);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
  text-align: center;
  opacity: 0;
  animation: paNodeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.pa-stage { justify-content: center; }
.pa-node-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: color-mix(in srgb, var(--pa-color, #64748b) 12%, #fff);
}
.pa-node-label { font-size: 0.7rem; font-weight: 700; color: #0f172a; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pa-node-value { font-size: 0.78rem; font-weight: 800; color: var(--pa-color, #0f172a); line-height: 1.25; overflow-wrap: anywhere; opacity: 0; animation: paFade 0.4s ease forwards; }
.pa-node-foot { font-size: 0.6rem; color: var(--text-secondary, #6e6e73); opacity: 0; animation: paFade 0.4s ease forwards; }
.pa-usdt { --pa-color: #c2410c; }
.pa-bank { --pa-color: #1d4ed8; }
.pa-fx { --pa-color: #0071e3; }
.pa-bcv { --pa-color: #0369a1; }
.pa-cxc { --pa-color: #059669; }
.pa-cxp { --pa-color: #e11d48; }
.pa-out { --pa-color: #475569; }

.pa-path {
  position: relative;
  flex: 0 1 60px;
  min-width: 26px;
  height: 30px;
  border-bottom: 2px dashed #cbd5e1;
  margin-bottom: 14px;
}
.pa-coin {
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  opacity: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  animation: paCoin 0.8s ease-in-out forwards;
}
.pa-coin-usdt { background: #fde68a; color: #92400e; }
.pa-coin-bank, .pa-coin-cxc, .pa-coin-cxp, .pa-coin-out { background: #dbeafe; color: #1d4ed8; }
.pa-coin-fx { background: #e5f0fd; color: #0062c4; }

.pa-body {
  padding: 18px 24px 22px;
  text-align: center;
  opacity: 0;
  animation: paFade 0.45s ease forwards;
}
.pa-body h3 { margin: 4px 0 6px; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.015em; }
.pa-body p { margin: 0 0 12px; font-size: 0.82rem; line-height: 1.5; color: var(--text-secondary, #6e6e73); }
.pa-check {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.15);
  animation: paNodeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.pa-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.pa-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--border-color, #e8e8ed);
  color: #334155;
}
@keyframes paNodeIn { from { opacity: 0; transform: translateY(8px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes paFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes paCoin {
  0% { left: 0; opacity: 0; transform: translateY(0) scale(0.6); }
  15% { opacity: 1; }
  50% { transform: translateY(-10px) scale(1); }
  85% { opacity: 1; }
  100% { left: calc(100% - 22px); opacity: 0; transform: translateY(0) scale(0.7); }
}
@media (max-width: 560px) {
  .pa-stage { flex-direction: column; padding: 20px 16px; }
  .pa-node { flex: 0 0 auto; width: 100%; max-width: 240px; }
  .pa-path { width: 2px; min-width: 0; height: 30px; flex: 0 0 auto; border-bottom: none; border-left: 2px dashed #cbd5e1; margin: 0; }
  .pa-coin { left: -11px !important; animation-name: paCoinV; }
  @keyframes paCoinV { 0% { top: 0; opacity: 0; } 20% { opacity: 1; } 100% { top: calc(100% - 22px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .pa-node, .pa-node-value, .pa-node-foot, .pa-body, .pa-check { animation: none !important; opacity: 1 !important; }
  .pa-coin { display: none; }
}

/* ---------- Retiro de Binance a Bolívares (USDT → Bs.) ---------- */
.wd-banner {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(120deg, #2d572c 0%, #3f7a3d 45%, #c2410c 100%);
  box-shadow: 0 10px 28px rgba(45, 87, 44, 0.22);
}
.wd-banner-main, .wd-banner-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wd-banner-kicker { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.wd-banner-main strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.wd-banner-sub { font-size: 0.74rem; opacity: 0.85; line-height: 1.4; }
.wd-banner-stat {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.wd-banner-stat span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.9; }
.wd-banner-stat strong { font-size: 1.05rem; font-weight: 800; }
.wd-banner-stat small { font-size: 0.7rem; opacity: 0.85; }
.wd-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #9a3412;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.wd-banner-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2); }
.wd-banner-btn svg { width: 17px; height: 17px; }

.wd-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  color: #92400e;
  background: linear-gradient(90deg, #fde68a, #bfdbfe);
  border: 1px solid #f59e0b;
  white-space: nowrap;
}
.wd-row td { background: linear-gradient(90deg, rgba(254, 243, 199, 0.55), rgba(239, 246, 255, 0.45)); }
.wd-row td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }

.wd-modal { padding: 0 !important; overflow: hidden; }
.wd-hero {
  position: relative;
  padding: 20px 22px 18px;
  color: #fff;
  background: linear-gradient(120deg, #c2410c 0%, #ea580c 40%, #1d4ed8 100%);
}
.wd-close { position: absolute; top: 12px; right: 14px; color: #fff !important; opacity: 0.85; }
.wd-hero-kicker { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.9; }
.wd-hero-title h3 { margin: 2px 0 14px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.wd-flow {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 8px;
}
.wd-flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-align: center;
  min-width: 0;
}
.wd-flow-node strong { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.wd-flow-node span:last-child { font-size: 0.72rem; font-weight: 700; }
.wd-flow-icon { font-size: 1.3rem; }
.wd-flow-track {
  position: relative;
  height: 34px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.55);
  overflow: hidden;
}
.wd-coin {
  position: absolute;
  bottom: 4px;
  left: -14%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #92400e;
  background: #fde68a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  opacity: 0.35;
}
.wd-coin.c3 { color: #1d4ed8; background: #dbeafe; }
.wd-flow.active .wd-coin { opacity: 1; animation: wdTravel 2.4s linear infinite; }
.wd-flow.active .wd-coin.c2 { animation-delay: 0.8s; }
.wd-flow.active .wd-coin.c3 { animation-delay: 1.6s; }
@keyframes wdTravel {
  0% { left: -14%; transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { left: 104%; transform: translateY(0); }
}

.wd-warning {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.wd-calc {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: start;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e8e8ed);
}
.wd-calc-op { font-size: 1.2rem; font-weight: 800; color: #94a3b8; padding-top: 30px; }
.wd-big { font-size: 1rem !important; font-weight: 800 !important; letter-spacing: -0.015em; }
.wd-max {
  margin-top: 4px;
  border: none;
  background: none;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c2410c;
  cursor: pointer;
  text-decoration: underline;
}
.wd-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wd-preview-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid;
}
.wd-preview-col span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.wd-preview-col strong { font-size: 1rem; letter-spacing: -0.015em; }
.wd-preview-col small { font-size: 0.72rem; color: var(--text-secondary, #6e6e73); }
.wd-preview-out { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.wd-preview-in { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.wd-preview-result {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.74rem;
  border: 1px solid;
}
.wd-preview-result strong.soft-numbers { font-size: 0.86rem; }
.wd-preview-result.pos { background: #f0fdf4; border-color: #86efac; color: #166534; }
.wd-preview-result.neg { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.usdt-det { display: flex; flex-direction: column; border: 1px solid var(--border-color, #e8e8ed); border-radius: 10px; overflow: hidden; }
.usdt-det-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 0.8rem; border-bottom: 1px solid var(--border-color, #e8e8ed); }
.usdt-det-row:last-child { border-bottom: none; }
.usdt-det-row span { color: var(--text-secondary, #6e6e73); }
.usdt-det-row strong { text-align: right; }
.wd-preview-error { grid-column: 1 / -1; font-size: 0.74rem; font-weight: 700; color: #e11d48; }
.wd-submit {
  color: #fff;
  border: none;
  background: linear-gradient(90deg, #ea580c, #1d4ed8);
  font-weight: 700;
}
.wd-submit:hover { filter: brightness(1.05); }

.wd-success-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 26px 26px 18px;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}
.wd-success-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 2rem;
  animation: wdNodePop 0.6s ease both;
}
.wd-success-node:last-child { animation-delay: 1.4s; }
.wd-success-node small { font-size: 0.68rem; font-weight: 700; color: var(--text-secondary, #6e6e73); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-success-path { position: relative; height: 40px; border-bottom: 2px dashed #fdba74; }
.wd-fly {
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #92400e;
  background: #fde68a;
  opacity: 0;
  animation: wdFly 1.3s ease-in-out forwards;
}
.wd-fly.f2 { animation-delay: 0.2s; }
.wd-fly.f3 { animation-delay: 0.4s; }
.wd-fly.f4 { animation-delay: 0.6s; color: #1d4ed8; background: #dbeafe; }
@keyframes wdFly {
  0% { left: 0; opacity: 0; transform: translateY(0) scale(0.6); }
  15% { opacity: 1; }
  50% { transform: translateY(-14px) scale(1); }
  90% { opacity: 1; }
  100% { left: calc(100% - 26px); opacity: 0; transform: translateY(0) scale(0.7); }
}
@keyframes wdNodePop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.wd-success-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.wd-success-grid div { padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border-color, #e8e8ed); }
.wd-success-grid span { display: block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary, #6e6e73); }
.wd-success-grid strong { font-size: 0.92rem; }

@media (max-width: 900px) {
  .wd-banner { grid-template-columns: 1fr; }
  .wd-banner-btn { justify-content: center; }
}
@media (max-width: 560px) {
  .wd-calc { grid-template-columns: 1fr; }
  .wd-calc-op { display: none; }
  .wd-preview, .wd-success-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .wd-coin, .wd-fly, .wd-success-node { animation: none !important; opacity: 1; }
}

/* ---------- Tutoriales animados (v2: pantalla → movimiento → resultado) ---------- */
.tut-wrap { display: flex; flex-direction: column; gap: 16px; }
.tut-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tut-lesson-card {
  display: flex; gap: 10px; align-items: flex-start; text-align: left; cursor: pointer;
  background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e8e8ed); border-radius: 14px;
  padding: 12px; font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tut-lesson-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); }
.tut-lesson-card.active { border-color: var(--accent-color, #0071e3); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12); }
.tut-lesson-icon {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(0, 113, 227, 0.08); color: var(--accent-color, #0071e3);
}
.tut-lesson-icon svg { width: 18px; height: 18px; }
.tut-lesson-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tut-lesson-text strong { font-size: 0.86rem; letter-spacing: -0.015em; }
.tut-lesson-level { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-color, #0071e3); }
.tut-lesson-desc { font-size: 0.72rem; color: var(--text-secondary, #6e6e73); line-height: 1.4; }

.tut-player { padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.tut-player-head { padding: 14px 18px 12px; border-bottom: 1px solid var(--border-color, #e8e8ed); display: flex; flex-direction: column; gap: 10px; }
.tut-route { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tut-route-sep { width: 12px; height: 12px; color: #c7c7cc; }
.tut-route-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; color: var(--text-secondary, #6e6e73); background: #f5f5f7;
  border: 1px solid transparent; transition: all .3s;
}
.tut-route-pill svg, .tut-route-pill .brand-logo { width: 13px; height: 13px; }
.tut-route-pill.is-from { color: #1d1d1f; border-color: #d2d2d7; background: #fff; }
.tut-route-pill.is-at { color: #fff; background: var(--accent-color, #0071e3); }
.tut-progress { display: flex; gap: 4px; }
.tut-seg { flex: 1; height: 5px; border: 0; padding: 0; border-radius: 999px; background: #e8e8ed; cursor: pointer; overflow: hidden; position: relative; }
.tut-seg::after { content: ""; position: absolute; inset: -8px 0; } /* área de toque más grande */
.tut-seg-fill { display: block; height: 100%; width: 0; background: var(--accent-color, #0071e3); border-radius: inherit; }
.tut-seg.done .tut-seg-fill { width: 100%; background: #8ab8ee; }

.tut-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.tut-stage {
  background: #f5f5f7; border-right: 1px solid var(--border-color, #e8e8ed);
  padding: 22px; min-height: 380px; display: flex; align-items: center; justify-content: center;
}
.tut-scene { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 18px; }

/* Ventana del sistema */
.tut-window {
  background: #fff; border-radius: 12px; border: 1px solid #e5e5ea;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07); overflow: hidden;
}
.tut-scene.is-anim .tut-window { animation: tutWinIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes tutWinIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.tut-win-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fafafa; border-bottom: 1px solid #ececf0; }
.tut-win-dots { display: inline-flex; gap: 5px; }
.tut-win-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e5e5ea; display: block; }
.tut-win-title { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary, #6e6e73); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tut-win-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.tut-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.tut-field label { display: block; font-size: 0.62rem; font-weight: 600; color: var(--text-secondary, #6e6e73); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em; }
.tut-input {
  height: 30px; border: 1px solid #d2d2d7; border-radius: 8px; padding: 0 9px; display: flex; align-items: center;
  font-size: 0.78rem; font-weight: 600; color: #1d1d1f; overflow: hidden; white-space: nowrap; background: #fff;
}
.tut-typed { display: inline-block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.tut-scene.is-anim .tut-input { animation: tutFocus var(--field) ease both; animation-delay: calc(300ms + var(--i) * var(--field)); }
.tut-scene.is-anim .tut-typed { animation: tutType calc(var(--field) * .8) steps(14, end) both; animation-delay: calc(300ms + var(--i) * var(--field)); }
@keyframes tutType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes tutFocus {
  0% { border-color: #d2d2d7; box-shadow: none; }
  15%, 80% { border-color: var(--accent-color, #0071e3); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); }
  100% { border-color: #d2d2d7; box-shadow: none; }
}

.tut-win-actions { display: flex; justify-content: flex-end; }
.tut-fake-btn {
  position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 8px;
  background: var(--accent-color, #0071e3); color: #fff; font-size: 0.78rem; font-weight: 600;
}
.tut-fake-btn.press { animation: tutPress .35s ease; }
@keyframes tutPress { 40% { transform: scale(.94); filter: brightness(.9); } 100% { transform: none; } }
.tut-cursor { position: absolute; left: 55%; top: 55%; pointer-events: none; opacity: 0; }
.tut-scene.is-anim .tut-cursor { animation: tutCursor calc(var(--screen) - 200ms) ease-in-out both; }
@keyframes tutCursor {
  0% { opacity: 0; transform: translate(70px, 50px); }
  55% { opacity: 1; transform: translate(70px, 50px); }
  85% { opacity: 1; transform: translate(0, 0); }
  92% { transform: translate(0, 0) scale(.85); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
.tut-scene.is-static .tut-cursor { display: none; }

.tut-table { border: 1px solid #ececf0; border-radius: 8px; overflow: hidden; font-size: 0.74rem; }
.tut-tr { display: grid; gap: 8px; padding: 8px 10px; border-top: 1px solid #f0f0f3; }
.tut-tr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tut-th { border-top: 0; background: #fafafa; color: var(--text-secondary, #6e6e73); font-weight: 600; font-size: 0.66rem; text-transform: uppercase; letter-spacing: .03em; }
.tut-tr-new { font-weight: 600; background: rgba(0, 113, 227, 0.06); }
.tut-scene.is-anim .tut-tr-new { animation: tutRowIn 1s cubic-bezier(.2, .8, .2, 1) .35s both; }
@keyframes tutRowIn {
  0% { opacity: 0; transform: translateY(-8px); background: rgba(0, 113, 227, 0.18); }
  60% { opacity: 1; transform: none; }
  100% { background: rgba(0, 113, 227, 0.06); }
}
.tut-note { display: flex; align-items: center; gap: 12px; padding: 6px 2px; font-size: 0.86rem; font-weight: 600; line-height: 1.45; color: #1d1d1f; }
.tut-note-ico { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 113, 227, 0.08); color: var(--accent-color, #0071e3); }
.tut-note-ico svg { width: 18px; height: 18px; }
.tut-scene.is-anim .tut-note { animation: tutWinIn .5s ease .25s both; }

/* Movimiento entre módulos */
.tut-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 1.2fr) minmax(0, 1fr); align-items: center; gap: 8px; }
.tut-flow-single { grid-template-columns: minmax(0, 260px); justify-content: center; }
.tut-box {
  display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 12px; background: #fff;
  border: 1px solid #e5e5ea; min-width: 0;
}
.tut-box-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: #f5f5f7; color: #1d1d1f; }
.tut-box-ico svg { width: 18px; height: 18px; }
.tut-box-txt { display: flex; flex-direction: column; min-width: 0; }
.tut-box-txt strong { font-size: 0.76rem; letter-spacing: -0.01em; line-height: 1.2; }
.tut-box-txt small { font-size: 0.62rem; color: var(--text-secondary, #6e6e73); }
.tut-box.to { border-color: rgba(0, 113, 227, 0.35); }
.tut-box.to .tut-box-ico { background: rgba(0, 113, 227, 0.1); color: var(--accent-color, #0071e3); }
.tut-box.arrive { animation: tutArrive .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes tutArrive { 40% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.12); } 100% { transform: none; box-shadow: none; } }

.tut-track { position: relative; height: 44px; }
.tut-track-line { position: absolute; left: 0; right: 6px; top: 50%; border-top: 2px dashed #c7c7cc; }
.tut-track-line::after { /* punta de flecha: indica la dirección real del dinero */
  content: ""; position: absolute; right: -7px; top: -6px; border: 5px solid transparent; border-left: 7px solid #c7c7cc;
}
.tut-flow.go .tut-track-line { border-top-color: var(--accent-color, #0071e3); transition: border-color .3s; }
.tut-flow.go .tut-track-line::after { border-left-color: var(--accent-color, #0071e3); }
.tut-chip {
  position: absolute; top: 50%; left: 0; transform: translate(-30%, -50%); z-index: 2;
  display: inline-grid; align-items: center; opacity: 0;
}
.tut-scene.is-static .tut-chip { left: 100%; transform: translate(-70%, -50%); opacity: 1; }
.tut-flow.go .tut-chip { animation: tutTravel var(--travel) cubic-bezier(.45, 0, .25, 1) both; }
@keyframes tutTravel {
  0% { left: 0; transform: translate(-30%, -50%) scale(.7); opacity: 0; }
  12% { opacity: 1; transform: translate(-30%, -50%) scale(1); }
  88% { opacity: 1; transform: translate(-70%, -50%) scale(1); }
  100% { left: 100%; transform: translate(-70%, -50%) scale(.95); opacity: 1; }
}
.tut-chip-face {
  grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 10px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid #e5e5ea;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); font-size: 0.72rem; font-weight: 700; color: #1d1d1f;
}
.tut-chip-face.f2 { opacity: 0; }
.tut-scene.is-static .tut-chip-face.f1:has(+ .f2) { opacity: 0; }
.tut-scene.is-static .tut-chip-face.f2 { opacity: 1; }
.tut-flow.go .tut-chip-face.f1:has(+ .f2) { animation: tutFaceOut var(--travel) linear both; }
.tut-flow.go .tut-chip-face.f2 { animation: tutFaceIn var(--travel) linear both; }
@keyframes tutFaceOut { 0%, 42% { opacity: 1; transform: none; } 58%, 100% { opacity: 0; transform: rotateY(90deg); } }
@keyframes tutFaceIn { 0%, 42% { opacity: 0; transform: rotateY(-90deg); } 58%, 100% { opacity: 1; transform: none; } }
.tut-chip-ex {
  position: absolute; left: 50%; top: -18px; transform: translateX(-50%); opacity: 0;
  background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); line-height: 0;
}
.tut-flow.go .tut-chip-ex { animation: tutEx var(--travel) linear both; }
@keyframes tutEx { 0%, 30% { opacity: 0; } 42%, 62% { opacity: 1; } 75%, 100% { opacity: 0; } }
.tut-chip-coin {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.6rem; font-weight: 800; color: #fff; background: #8e8e93;
}
.tut-chip-coin svg { width: 12px; height: 12px; }
.tut-k-bs { background: #0071e3; }
.tut-k-usd { background: #34c759; font-size: 0.72rem; }
.tut-k-usdt { background: #26a17b; font-size: 0.72rem; }
.tut-k-doc, .tut-k-user, .tut-k-info { background: #8e8e93; }

/* Panel derecho */
.tut-side { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tut-step-count { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-color, #0071e3); margin-bottom: 4px; }
.tut-caption { min-height: 120px; }
.tut-caption h3 { margin: 0 0 6px; font-size: 1.08rem; letter-spacing: -0.02em; line-height: 1.25; color: #1d1d1f; }
.tut-caption p { font-size: 0.86rem; line-height: 1.55; margin: 0; color: #3a3a3c; }
.tut-fade { animation: tutFade 0.45s ease; }
@keyframes tutFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tut-ledger-title { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #6e6e73); margin-top: auto; }
.tut-ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tut-ledger-item { position: relative; padding: 9px 10px; border-radius: 10px; border: 1px solid #ececf0; background: #fff; min-width: 0; }
.tut-ledger-item span { display: block; font-size: 0.62rem; font-weight: 600; color: var(--text-secondary, #6e6e73); margin-bottom: 2px; }
.tut-ledger-item strong { font-size: 0.88rem; letter-spacing: -0.015em; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.tut-delta { display: block; font-style: normal; font-size: 0.66rem; font-weight: 700; height: 0; opacity: 0; overflow: hidden; transition: opacity .3s, height .3s; }
.tut-delta.show { height: 14px; opacity: 1; margin-top: 2px; }
.tut-delta.up, .tut-delta.down { color: var(--accent-color, #0071e3); }
.tut-ledger-item.pulse.up { animation: tutPulseUp 1.4s ease; }
.tut-ledger-item.pulse.down { animation: tutPulseDown 1.4s ease; }
@keyframes tutPulseUp { 0% { background: rgba(0, 113, 227, 0.1); border-color: #0071e3; } 100% { background: #fff; } }
@keyframes tutPulseDown { 0% { background: rgba(0, 113, 227, 0.1); border-color: #0071e3; } 100% { background: #fff; } }

.tut-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border-color, #e8e8ed); }
.tut-controls .btn { display: inline-flex; align-items: center; gap: 4px; }
.tut-controls .btn svg { width: 14px; height: 14px; }
.tut-controls-spacer { flex: 1; }
.tut-play { min-width: 128px; justify-content: center; }
.tut-speed { width: auto; height: 32px; font-size: 0.76rem; padding: 4px 8px; }

.tut-videos { padding: 16px 18px; }
.tut-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tut-video { margin: 0; }
.tut-video video { width: 100%; border-radius: 10px; background: #1d1d1f; display: block; }
.tut-video figcaption { font-size: 0.76rem; font-weight: 600; margin-top: 6px; }

@media (max-width: 1100px) {
  .tut-body { grid-template-columns: 1fr; }
  .tut-stage { border-right: none; border-bottom: 1px solid var(--border-color, #e8e8ed); min-height: 0; padding: 16px; }
  .tut-caption { min-height: 0; }
}
@media (max-width: 640px) {
  .tut-lessons { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .tut-lesson-card { flex: 0 0 78%; scroll-snap-align: start; }
  .tut-player-head { padding: 12px; }
  .tut-route-pill span { display: none; }
  .tut-route-pill.is-at span, .tut-route-pill.is-from span { display: inline; }
  .tut-stage { padding: 12px; }
  .tut-form { gap: 7px 8px; }
  .tut-flow { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 4px; }
  .tut-box { padding: 7px; gap: 6px; flex-direction: column; text-align: center; }
  .tut-box-txt small { display: none; }
  .tut-box-txt strong { font-size: 0.68rem; }
  .tut-chip-face { font-size: 0.64rem; padding: 3px 7px 3px 3px; }
  .tut-chip-coin { width: 18px; height: 18px; }
  .tut-side { padding: 14px 12px; }
  .tut-controls { padding: 10px 12px; }
  .tut-controls .btn span { display: none; }
  .tut-play span { display: inline !important; }
  .tut-play { flex: 1 1 100%; order: -1; min-width: 0; height: 40px; }
  .tut-controls .btn-secondary, .tut-speed { flex: 1 1 0; justify-content: center; }
  .tut-controls-spacer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cxcp-progress-fill { transition: none !important; }
  .tut-fade, .tut-ledger-item.pulse.up, .tut-ledger-item.pulse.down, .tut-box.arrive, .cxcp-preview-flow .arrow { animation: none !important; }
}
/* =====================================================================
   Banco: modo enfoque (ocultar lo demás en la misma pantalla)
   ===================================================================== */
.bank-max-btn {
  font-size: 0.72rem !important; padding: 0 10px !important; height: 32px; border-radius: 8px !important;
  display: inline-flex; align-items: center; gap: 5px; font-weight: 700 !important;
}
.bank-max-btn svg { width: 12px; height: 12px; }
.bank-max-restore { background: #0071e3 !important; color: #fff !important; border-color: #005bb5 !important; }

/* Lo que se oculta */
#content-container.bank-focus-on > .portal-section-header,
#content-container.bank-focus-on > .bank-accounts-grid,
#content-container.bank-focus-on > .bank-actions-toolbar {
  display: none !important;
}
/* El libro aprovecha todo el alto de la pantalla */
.bank-ledger-card.bank-ledger-focus { margin-top: 0 !important; border-color: #bfdbfe; box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08); }
.bank-ledger-card.bank-ledger-focus > .table-container {
  max-height: none !important;
  height: max(360px, calc(100vh - 300px));
}
.bank-focus-anim { animation: bankFocusIn 0.32s ease-out; }
@keyframes bankFocusIn {
  from { opacity: 0.4; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* =====================================================================
   CxC / CxP: moneda del acuerdo (Bs. o $) y tasa acordada al cobrar/pagar
   ===================================================================== */
.cxcp-money { background: rgba(37, 99, 235, 0.04); border: 1px solid rgba(37, 99, 235, 0.2); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.cxcp-money-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cxcp-money-head > span { font-size: 0.75rem; font-weight: 700; color: #1e3a8a; display: inline-flex; align-items: center; gap: 5px; }
.cxcp-money-head > span svg { width: 13px; height: 13px; color: #2563eb; }
.cxcp-seg { display: inline-flex; background: #e2e8f0; border-radius: 9px; padding: 3px; gap: 2px; }
.cxcp-seg-btn { border: none; background: transparent; border-radius: 7px; padding: 5px 12px; font-size: 0.74rem; font-weight: 700; color: #475569; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.cxcp-seg-btn.is-on { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15); }
.cxcp-seg-btn[data-mode="USD"].is-on { color: #166534; }
.cxcp-usd-hint { font-size: 0.7rem; color: #475569; line-height: 1.45; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 7px 9px; margin: 0; }
.cxcp-usd-hint strong { color: #166534; }

.cxcp-agreed-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.cxcp-agreed-head { font-size: 0.76rem; font-weight: 800; color: #166534; margin-bottom: 8px; }
.cxcp-rate-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cxcp-rate-type { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.cxcp-rate-type input { position: absolute; opacity: 0; pointer-events: none; }
.cxcp-rate-type span { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 0.74rem; font-weight: 700; color: #334155; transition: all .15s; }
.cxcp-rate-type input:checked + span { background: #16a34a; border-color: #16a34a; color: #fff; }
.cxcp-rate-type input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }
.cxcp-agreed-box .cxcp-usd-hint { background: #fff; }

/* =====================================================================
   Filtro tipo Excel: lista de valores únicos
   ===================================================================== */
#bank-col-filter-popover.has-xl-vals { width: 300px; max-width: calc(100vw - 16px); }
.xl-vals .excel-menu-section-title { display: flex; align-items: center; }
.xl-val-count { font-size: 0.66rem; font-weight: 700; color: #2563eb; background: #eff6ff; border-radius: 6px; padding: 1px 6px; }
.xl-val-search { position: relative; margin: 6px 0; }
.xl-val-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; color: #94a3b8; pointer-events: none; }
.xl-val-search input {
  width: 100%; height: 30px; padding: 0 8px 0 28px; font-size: 0.76rem;
  border: 1px solid #cbd5e1; border-radius: 7px; background: #f8fafc; outline: none;
}
.xl-val-search input:focus { border-color: #2563eb; background: #fff; }
.xl-val-list {
  max-height: 230px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 4px 0; background: #fff;
}
.xl-val-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px; cursor: pointer;
  font-size: 0.76rem; color: #1e293b; margin: 0;
}
.xl-val-row:hover { background: #f1f5f9; }
.xl-val-row input { width: 14px; height: 14px; accent-color: #2563eb; flex-shrink: 0; cursor: pointer; }
.xl-val-allrow { font-weight: 700; border-bottom: 1px solid #f1f5f9; padding-bottom: 6px; margin-bottom: 2px; }
.xl-val-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-val-lbl.is-empty { color: #94a3b8; font-style: italic; }
.xl-val-n { font-size: 0.66rem; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 10px; padding: 0 6px; }
.xl-val-empty { padding: 10px; font-size: 0.74rem; color: #94a3b8; text-align: center; }

/* =====================================================================
   Rastreo de Dinero
   ===================================================================== */
.rt-wrap { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; align-items: start; }
.rt-side { padding: 0 !important; overflow: hidden; position: sticky; top: 12px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.rt-side-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--border-color, #e8e8ed); }
.rt-side-head h3 { font-size: 0.95rem; font-weight: 800; margin: 0 0 2px; display: flex; align-items: center; gap: 6px; }
.rt-side-head h3 svg { width: 16px; height: 16px; color: #0071e3; }
.rt-side-head p { font-size: 0.74rem; color: var(--text-secondary, #64748b); margin: 0 0 10px; }
.rt-search { position: relative; }
.rt-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; color: #94a3b8; }
.rt-search input { width: 100%; height: 34px; border-radius: 8px; border: 1px solid #cbd5e1; background: #f8fafc; padding: 0 10px 0 30px; font-size: 0.78rem; outline: none; }
.rt-search input:focus { border-color: #0071e3; background: #fff; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.rt-chip { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 0.7rem; font-weight: 600; color: #334155; cursor: pointer; }
.rt-chip b { font-weight: 800; color: #94a3b8; margin-left: 2px; }
.rt-chip.is-on { background: #0071e3; border-color: #0071e3; color: #fff; }
.rt-chip.is-on b { color: #cfe3fb; }
.rt-list { overflow-y: auto; padding: 6px; flex: 1; min-height: 120px; }
.rt-item { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 8px; cursor: pointer; transition: background .15s, border-color .15s; }
.rt-item:hover { background: #f8fafc; }
.rt-item.is-sel { background: #f2f7fe; border-color: #9cc6f5; }
.rt-item-ic, .rt-flow-ic, .rt-head-ic { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0; }
.rt-item-ic { width: 32px; height: 32px; }
.rt-item-ic svg { width: 15px; height: 15px; }
.rt-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rt-item-t { font-size: 0.78rem; font-weight: 700; color: var(--text-primary, #1d1d1f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-item-s { font-size: 0.68rem; color: var(--text-secondary, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-item-amt { font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.rt-item-amt.is-in { color: #15803d; }
.rt-item-amt.is-out { color: #be123c; }
.rt-more { width: 100%; margin-top: 4px; border: 1px dashed #cbd5e1; background: none; border-radius: 8px; padding: 7px; font-size: 0.74rem; font-weight: 700; color: #0071e3; cursor: pointer; }
.rt-empty-list { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 10px; color: #94a3b8; font-size: 0.78rem; }

/* Tonos */
.rt-tone-green { background: #dcfce7; color: #15803d; }
.rt-tone-amber { background: #fef3c7; color: #b45309; }
.rt-tone-blue  { background: #dbeafe; color: #1d4ed8; }
.rt-tone-red   { background: #ffe4e6; color: #be123c; }
.rt-tone-slate { background: #f1f5f9; color: #475569; }
.rt-tone-warn  { background: #fff7ed; color: #c2410c; }

.rt-main { padding: 18px 20px !important; min-height: 420px; }
.rt-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color, #e8e8ed); }
.rt-head-ic { width: 44px; height: 44px; border-radius: 12px; }
.rt-head-ic svg { width: 20px; height: 20px; }
.rt-head-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rt-head-k { font-size: 0.7rem; font-weight: 700; color: var(--text-secondary, #64748b); text-transform: uppercase; letter-spacing: .3px; }
.rt-head h3 { font-size: 1.05rem; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.rt-head-amt { font-size: 0.9rem; font-weight: 800; color: #0071e3; }
.rt-replay { display: inline-flex !important; align-items: center; gap: 5px; font-size: 0.74rem !important; font-weight: 700 !important; }
.rt-replay svg { width: 12px; height: 12px; }
.rt-story { margin: 12px 0 4px; padding: 10px 12px; background: #f2f7fe; border: 1px solid #e5f0fd; border-radius: 10px; font-size: 0.84rem; font-weight: 600; color: #4c1d95; line-height: 1.45; }
.rt-sec { margin-top: 16px; }
.rt-sec-t { font-size: 0.8rem; font-weight: 800; color: var(--text-primary, #1d1d1f); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .3px; }
.rt-sec-t svg { width: 14px; height: 14px; color: #0071e3; }
.rt-none { font-size: 0.8rem; color: #94a3b8; padding: 10px; border: 1px dashed #e2e8f0; border-radius: 10px; }
.rt-foot { margin: 18px 0 0; font-size: 0.72rem; color: var(--text-secondary, #64748b); display: flex; gap: 6px; line-height: 1.45; }
.rt-foot svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; }

/* Cadena del recorrido */
.rt-chain { display: flex; align-items: stretch; gap: 0; padding: 14px 10px; background: linear-gradient(180deg, #fbfcfe, #f8fafc); border: 1px solid #e5f0fd; border-radius: 14px; overflow-x: auto; --c0: 0.25s; }
.rt-node {
  flex: 1 1 0; min-width: 110px; max-width: 190px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
  padding: 10px 8px; border-radius: 12px; background: #fff !important; border: 1.5px solid #e2e8f0;
  color: var(--text-primary, #1d1d1f) !important;
}
.rt-node-ic { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.rt-node-ic svg { width: 18px; height: 18px; }
.rt-node.rt-tone-green .rt-node-ic { background: #dcfce7; color: #15803d; }
.rt-node.rt-tone-amber .rt-node-ic { background: #fef3c7; color: #b45309; }
.rt-node.rt-tone-blue  .rt-node-ic { background: #dbeafe; color: #1d4ed8; }
.rt-node.rt-tone-red   .rt-node-ic { background: #ffe4e6; color: #be123c; }
.rt-node.rt-tone-slate .rt-node-ic { background: #f1f5f9; color: #475569; }
.rt-node.rt-tone-green { border-color: #bbf7d0; }
.rt-node.rt-tone-amber { border-color: #fde68a; }
.rt-node.rt-tone-blue  { border-color: #bfdbfe; }
.rt-node.rt-tone-red   { border-color: #fecdd3; }
.rt-node-t { font-size: 0.74rem; font-weight: 800; overflow-wrap: anywhere; line-height: 1.2; }
.rt-node-v { font-size: 0.8rem; font-weight: 800; color: #0f172a; overflow-wrap: anywhere; }
.rt-node-s { font-size: 0.64rem; color: #64748b; line-height: 1.25; overflow-wrap: anywhere; }
.rt-link-line { flex: 0 1 56px; min-width: 26px; position: relative; align-self: center; height: 3px; background: #e2e8f0; border-radius: 2px; margin: 0 2px; overflow: visible; }
.rt-link-line::after { content: ""; position: absolute; inset: 0; width: 100%; background: #0071e3; border-radius: 2px; transform-origin: left; transform: scaleX(1); }
.rt-coin {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  width: 24px; height: 24px; border-radius: 50%; background: #facc15; color: #713f12;
  font-size: 0.6rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.2); z-index: 2; opacity: 0;
}

/* Animación (solo cuando se reproduce) */
.rt-play .rt-node { animation: rtNodeIn .45s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--c0, .25s) + var(--i) * .55s); }
.rt-play .rt-link-line::after { animation: rtLineGrow .45s ease-out both; animation-delay: calc(var(--c0, .25s) + var(--i) * .55s - .45s); }
.rt-play .rt-coin { animation: rtCoin .5s ease-in-out both; animation-delay: calc(var(--c0, .25s) + var(--i) * .55s - .45s); }
.rt-play .rt-anim { animation: rtFadeUp .4s ease-out both; animation-delay: var(--d, 0s); }
.rt-play .rt-bar > span { animation: rtBar .7s ease-out both; animation-delay: calc(var(--d, 0s) + .15s); }
@keyframes rtNodeIn { from { opacity: 0; transform: translateY(8px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes rtLineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rtCoin { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes rtFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rtBar { from { width: 0; } }

/* Tarjetas de origen / destino */
.rt-flow { display: flex; gap: 10px; padding: 10px; border: 1px solid #eef2f7; border-radius: 12px; background: #fff; margin-bottom: 8px; }
.rt-flow-ic { width: 32px; height: 32px; }
.rt-flow-ic svg { width: 15px; height: 15px; }
.rt-flow-body { flex: 1; min-width: 0; }
.rt-flow-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rt-flow-t { font-size: 0.8rem; font-weight: 700; overflow-wrap: anywhere; }
.rt-flow-amt { font-size: 0.8rem; font-weight: 800; white-space: nowrap; }
.rt-flow-amt.is-out { color: #be123c; }
.rt-flow-amt.is-in { color: #15803d; }
.rt-flow-amt.is-keep { color: #0071e3; }
.rt-flow-s { font-size: 0.68rem; color: var(--text-secondary, #64748b); margin-top: 1px; }
.rt-bar { height: 6px; background: #f1f5f9; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.rt-bar > span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, #fb7185, #e11d48); border-radius: 4px; }
.rt-bar-in > span { background: linear-gradient(90deg, #4ade80, #16a34a); }
.rt-bar-keep > span { background: linear-gradient(90deg, #47a0ff, #0071e3); }
.rt-flow-keep { background: #f5f9ff; border-color: #e5f0fd; }
.rt-link { border: none; background: none; padding: 0; margin-top: 5px; font-size: 0.7rem; font-weight: 700; color: #0071e3; cursor: pointer; }
.rt-link:hover { text-decoration: underline; }
.rt-nested { margin-top: 8px; padding: 8px 0 0 10px; border-left: 2px dashed #cfe3fb; }
.rt-nested-head { font-size: 0.72rem; color: #475569; margin-bottom: 6px; display: flex; gap: 4px; align-items: flex-start; }
.rt-nested-head svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 2px; color: #0071e3; }
.rt-nested .rt-flow { padding: 8px; margin-bottom: 6px; background: #fcfcfd; }
.rt-empty { text-align: center; padding: 60px 20px; color: var(--text-secondary, #64748b); }
.rt-empty svg { width: 36px; height: 36px; color: #9cc6f5; }
.rt-empty h3 { font-size: 1rem; margin: 10px 0 4px; color: var(--text-primary, #1d1d1f); }

@keyframes rtLineGrowV { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rtCoinV { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

@media (max-width: 900px) {
  .rt-wrap { grid-template-columns: 1fr; }
  .rt-side { position: static; max-height: 420px; }
  .rt-main { padding: 14px !important; }
}
@media (max-width: 600px) {
  .rt-chain { flex-direction: column; align-items: stretch; padding: 10px; }
  .rt-node { max-width: none; min-width: 0; }
  .rt-link-line { flex: 0 0 26px; width: 3px; height: 26px; min-width: 0; align-self: center; margin: 2px 0; }
  .rt-link-line::after { transform-origin: top; }
  .rt-play .rt-link-line::after { animation-name: rtLineGrowV; }
  .rt-coin { left: 50%; top: 0; }
  .rt-play .rt-coin { animation-name: rtCoinV; }
  .rt-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .rt-play .rt-node, .rt-play .rt-anim, .rt-play .rt-bar > span, .rt-play .rt-link-line::after, .bank-focus-anim { animation: none !important; }
  .rt-play .rt-coin { animation: none !important; opacity: 0 !important; }
}

/* =====================================================================
   Logos de marca (Binance / BCV) y ficha USDT
   ===================================================================== */
.brand-logo { display: inline-block; vertical-align: -2px; object-fit: contain; flex-shrink: 0; }
.brand-logo-bcv { border-radius: 50%; }
.usdt-chip {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4fd1a5, #26a17b 60%, #1a7f60);
  color: #fff; font-weight: 900; line-height: 1; vertical-align: -2px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.pa-node-icon img, .pa-node-icon .usdt-chip { display: block; }
.wd-flow-icon { display: inline-flex; align-items: center; justify-content: center; }
.rt-node-ic.is-brand { background: #fff !important; box-shadow: 0 0 0 1.5px #fde68a inset; }

/* =====================================================================
   Banco: selector de vista ampliada (ocultar lo demás / pantalla completa)
   ===================================================================== */
.bank-view-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; background: #f1f5f9; border: 1px solid var(--border-color, #e2e8f0); }
.bank-view-seg-k { font-size: 0.66rem; font-weight: 700; color: #64748b; padding: 0 6px 0 5px; text-transform: uppercase; letter-spacing: 0.03em; }
.bank-view-opt {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border: none; border-radius: 7px; background: transparent; color: #334155;
  font-size: 0.72rem; font-weight: 700; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.bank-view-opt svg { width: 12px; height: 12px; }
.bank-view-opt:hover { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.bank-view-opt:focus-visible { outline: 2px solid #0071e3; outline-offset: 1px; }

.bank-ledger-card.bank-ledger-max {
  position: fixed; inset: 10px; z-index: 990; margin: 0 !important;
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: var(--card-bg, #fff);
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45), 0 24px 60px rgba(15, 23, 42, 0.35);
  animation: bankMaxIn 0.24s cubic-bezier(.2, .8, .3, 1);
}
.bank-ledger-card.bank-ledger-max > .table-container { flex: 1 1 auto; max-height: none !important; min-height: 0; }
body.bank-ledger-max-open { overflow: hidden; }
@keyframes bankMaxIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 760px) {
  .bank-ledger-card.bank-ledger-max { inset: 0; border-radius: 0; }
  .bank-view-seg-k { display: none; }
}

/* =====================================================================
   Animación de proceso v2: el dinero viaja de izquierda a derecha,
   cada moneda muestra lo que realmente viaja (Bs azul / ₮ verde) y
   cambia de moneda cuando pasa por un cambio (Bs → ₮ o ₮ → Bs).
   ===================================================================== */
.pa-path { height: 34px; border-bottom: none !important; margin-bottom: 14px; }
.pa-path::before, .pa-path::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 13px; height: 2px; border-radius: 2px;
}
.pa-path::before { background: repeating-linear-gradient(90deg, #cbd5e1 0 6px, transparent 6px 11px); }
.pa-path::after {
  background: linear-gradient(90deg, #47a0ff, #0071e3);
  transform-origin: left center; transform: scaleX(0);
  animation: paTrail 0.95s cubic-bezier(.45, .05, .35, 1) forwards; animation-delay: var(--pd, 0s);
}
.pa-coin {
  bottom: 3px; width: 22px; height: 22px; font-size: 0.58rem; letter-spacing: -0.02em;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  animation: paCoin2 0.95s cubic-bezier(.45, .05, .35, 1) forwards;
  will-change: left, transform, opacity;
}
.pa-coin-bs { background: radial-gradient(circle at 35% 30%, #93c5fd, #2563eb 70%); color: #fff; }
.pa-coin-usdt { background: radial-gradient(circle at 35% 30%, #4fd1a5, #26a17b 70%); color: #fff; }
.pa-coin-morph { background: transparent; border: none; box-shadow: none; overflow: visible; }
.pa-coin-morph > b {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.85); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  animation: 0.95s linear forwards;
}
.pa-coin-morph > b:first-child { animation-name: paFaceOut; }
.pa-coin-morph > b:last-child { opacity: 0; animation-name: paFaceIn; }
.pa-node { animation: paNodeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, paLand 0.9s ease-out forwards; }

@keyframes paTrail { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes paCoin2 {
  0%   { left: 0; opacity: 0; transform: translateY(0) scale(0.55); }
  12%  { opacity: 1; transform: translateY(-4px) scale(1); }
  50%  { transform: translateY(-11px) scale(1.06); }
  88%  { opacity: 1; transform: translateY(-3px) scale(0.95); }
  100% { left: calc(100% - 22px); opacity: 0; transform: translateY(0) scale(0.6); }
}
@keyframes paFaceOut { 0%, 42% { opacity: 1; transform: rotateY(0); } 58%, 100% { opacity: 0; transform: rotateY(90deg); } }
@keyframes paFaceIn  { 0%, 42% { opacity: 0; transform: rotateY(-90deg); } 58%, 100% { opacity: 1; transform: rotateY(0); } }
@keyframes paLand {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pa-color, #64748b) 45%, transparent), 0 6px 16px rgba(15, 23, 42, 0.07); }
  100% { box-shadow: 0 0 0 12px transparent, 0 6px 16px rgba(15, 23, 42, 0.07); }
}
@media (max-width: 560px) {
  .pa-path { height: 34px; width: 22px; margin: 0; border-left: none !important; }
  .pa-path::before, .pa-path::after { left: 10px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .pa-path::before { background: repeating-linear-gradient(180deg, #cbd5e1 0 6px, transparent 6px 11px); }
  .pa-path::after { transform-origin: center top; transform: scaleY(0); animation-name: paTrailV; }
  .pa-coin { left: 0 !important; bottom: auto; animation-name: paCoinV2; }
  @keyframes paTrailV { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes paCoinV2 {
    0% { top: -4px; opacity: 0; transform: scale(0.55); }
    15% { opacity: 1; transform: scale(1); }
    85% { opacity: 1; transform: scale(0.95); }
    100% { top: calc(100% - 18px); opacity: 0; transform: scale(0.6); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .pa-path::after { animation: none !important; transform: none !important; }
  .pa-node { animation: none !important; opacity: 1 !important; }
}

/* ---------- Retiro (modal): ₮ sale de la billetera, pasa por Binance y llega como Bs ---------- */
.wd-flow-track { overflow: visible; }
.wd-ex {
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); z-index: 3;
  width: 30px; height: 30px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 3px 10px rgba(0, 0, 0, 0.25);
}
.wd-flow.active .wd-ex { animation: wdExPulse 0.8s ease-in-out infinite; }
.wd-coin { background: transparent !important; box-shadow: none; z-index: 2; left: 0; }
.wd-coin > b {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.9); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}
.wd-coin > .f-in { background: radial-gradient(circle at 35% 30%, #4fd1a5, #26a17b 70%); color: #fff; }
.wd-coin > .f-out { background: radial-gradient(circle at 35% 30%, #93c5fd, #2563eb 70%); color: #fff; opacity: 0; }
.wd-coin.c3 { color: inherit; background: transparent; }
.wd-flow.active .wd-coin { animation: wdTravel2 2.4s cubic-bezier(.45, .05, .55, .95) infinite; }
.wd-flow.active .wd-coin > .f-in { animation: wdFaceOut 2.4s linear infinite; }
.wd-flow.active .wd-coin > .f-out { animation: wdFaceIn 2.4s linear infinite; }
.wd-flow.active .wd-coin.c2, .wd-flow.active .wd-coin.c2 > b { animation-delay: 0.8s; }
.wd-flow.active .wd-coin.c3, .wd-flow.active .wd-coin.c3 > b { animation-delay: 1.6s; }
@keyframes wdTravel2 {
  0%   { left: -6%; opacity: 0; transform: translateY(0); }
  8%   { opacity: 1; }
  25%  { transform: translateY(-8px); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(-8px); }
  92%  { opacity: 1; }
  100% { left: 100%; opacity: 0; transform: translateY(0); }
}
@keyframes wdFaceOut { 0%, 46% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes wdFaceIn  { 0%, 46% { opacity: 0; } 52%, 100% { opacity: 1; } }
@keyframes wdExPulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .wd-flow.active .wd-coin, .wd-flow.active .wd-coin > b, .wd-flow.active .wd-ex { animation: none !important; }
}

/* ---------- Rastreo: moneda según lo que viaja ---------- */
.rt-coin.is-bs { background: radial-gradient(circle at 35% 30%, #93c5fd, #2563eb 70%); color: #fff; }
.rt-coin.is-usdt { background: radial-gradient(circle at 35% 30%, #4fd1a5, #26a17b 70%); color: #fff; }
.rt-coin { border: 1.5px solid rgba(255, 255, 255, 0.9); }
.rt-play .rt-coin { animation-duration: .55s; animation-timing-function: cubic-bezier(.45, .05, .35, 1); }
.wd-flow:not(.active) .wd-coin { opacity: 0; }

/* =====================================================================
   Armonía de paleta (estilo Apple): fondos claros, acentos sutiles
   Azul #0071e3 • Verde #34c759 • Naranja #ff9500 • Rojo #ff3b30 • USDT #26a17b
   ===================================================================== */

/* --- Menú lateral por secciones --- */
.sidebar-menu .menu-section {
  list-style: none;
  padding: 14px 12px 4px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #86868b);
  user-select: none;
}
.sidebar-menu .menu-section:first-child { padding-top: 2px; }
.menu-item .menu-brand-icon { width: 18px; height: 18px; flex-shrink: 0; object-fit: contain; }
.sidebar.collapsed .sidebar-menu .menu-section {
  font-size: 0; padding: 8px 10px 4px; height: 1px; margin: 6px 8px 2px;
  border-top: 1px solid var(--border-color, #e8e8ed); overflow: hidden;
}
.sidebar.collapsed .sidebar-menu .menu-section:first-child { display: none; }

/* --- Cambios USDT: banner claro --- */
.wd-banner {
  color: var(--text-primary, #1d1d1f);
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border-color, #e8e8ed);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.04);
}
.wd-banner-kicker { color: var(--text-secondary, #6e6e73); opacity: 1; display: inline-flex; align-items: center; gap: 6px; }
.wd-banner-main strong { color: var(--text-primary, #1d1d1f); }
.wd-banner-stat { background: var(--bg-primary, #f5f5f7); border: 1px solid var(--border-color, #e8e8ed); }
.wd-banner-stat span, .wd-banner-stat small { color: var(--text-secondary, #6e6e73); opacity: 1; }
.wd-banner-btn { color: #fff; background: var(--accent-color, #0071e3); box-shadow: 0 1px 2px rgba(0, 113, 227, 0.25); }
.wd-banner-btn:hover { transform: none; background: #0077ed; box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25); }

.wd-badge { color: #8a5a00; background: #fff8eb; border: 1px solid #f5d9a3; font-weight: 700; }
.wd-row td { background: rgba(255, 149, 0, 0.045); }
.wd-row td:first-child { box-shadow: inset 3px 0 0 rgba(255, 149, 0, 0.6); }

/* --- Ventana de retiro: encabezado claro --- */
.wd-hero { color: var(--text-primary, #1d1d1f); background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%); border-bottom: 1px solid var(--border-color, #e8e8ed); }
.wd-close { color: var(--text-secondary, #6e6e73) !important; }
.wd-hero-kicker { color: var(--text-secondary, #6e6e73); }
.wd-flow-node { background: #fff; border: 1px solid var(--border-color, #e8e8ed); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.wd-flow-track { border-bottom-color: #d2d2d7; }
.wd-ex { box-shadow: 0 0 0 1px var(--border-color, #e8e8ed), 0 2px 6px rgba(0, 0, 0, 0.08); }
.wd-submit { background: var(--accent-color, #0071e3); }
.wd-submit:hover { filter: none; background: #0077ed; }
.wd-success-stage { background: linear-gradient(180deg, #f5f5f7, #ffffff); }

/* --- Monedas: colores planos y sobrios --- */
.pa-coin-bs, .rt-coin.is-bs, .wd-coin > .f-out { background: #0071e3 !important; color: #fff; }
.pa-coin-usdt, .rt-coin.is-usdt, .wd-coin > .f-in { background: #26a17b !important; color: #fff; }
.usdt-chip { background: #26a17b; box-shadow: none; }
.pa-coin, .pa-coin-morph > b, .wd-coin > b, .rt-coin { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); border-color: #fff; }

/* --- Animación de proceso: tonos de la app --- */
.pa-stage { background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%); }
.pa-usdt { --pa-color: #26a17b; }
.pa-bank { --pa-color: #0071e3; }
.pa-fx   { --pa-color: #ff9500; }
.pa-bcv  { --pa-color: #0071e3; }
.pa-cxc  { --pa-color: #248a3d; }
.pa-cxp  { --pa-color: #d70015; }
.pa-out  { --pa-color: #6e6e73; }
.pa-node {
  border: 1px solid color-mix(in srgb, var(--pa-color, #d2d2d7) 35%, #e8e8ed);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.05);
}
.pa-node-icon { background: color-mix(in srgb, var(--pa-color, #86868b) 9%, #fff); }
.pa-path::after { background: color-mix(in srgb, #0071e3 55%, transparent); }
.pa-check { background: #34c759; box-shadow: 0 0 0 6px rgba(52, 199, 89, 0.14); }
.pa-chip { background: var(--bg-primary, #f5f5f7); color: var(--text-secondary, #6e6e73); }

/* --- CxC/CxP: tasa acordada --- */
.cxcp-rate-type input:checked + span { background: #0071e3; border-color: #0071e3; }
.cxcp-agreed-box { background: #f5f9ff; border-color: #d6e6fb; }
.cxcp-agreed-head { color: #1d1d1f; }
.cxcp-usd-hint { background: #f5f5f7; border-color: var(--border-color, #e8e8ed); }
.cxcp-usd-hint strong { color: #1d1d1f; }
.cxcp-money { background: #fbfbfd; border-color: var(--border-color, #e8e8ed); }
.cxcp-money-head > span { color: #1d1d1f; }
.cxcp-money-head > span svg { color: #0071e3; }
.cxcp-seg-btn[data-mode="USD"].is-on { color: #248a3d; }

/* --- Banco: modo enfoque --- */
.bank-ledger-card.bank-ledger-focus { border-color: var(--border-color, #e8e8ed); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.06); }
.usdt-link-bank { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 0.78rem; font-weight: 600; color: var(--text-primary, #1d1d1f); cursor: pointer; }
.usdt-link-bank input { margin-top: 2px; accent-color: #0071e3; }
.usdt-link-hint { margin: 4px 0 0 24px; font-size: 0.7rem; color: var(--text-secondary, #6e6e73); }

/* =====================================================================
   EXPERIENCIA MÓVIL Y TABLET
   ≤ 900px: tablet / menú lateral como cajón
   ≤ 640px: celular (tarjetas, hojas inferiores, controles táctiles)
   ===================================================================== */

/* ---------- Tablet y celular: encabezado fijo y compacto ---------- */
@media (max-width: 900px) {
  .top-header {
    position: sticky; top: 0; z-index: 60;
    margin: -14px -16px 12px !important;
    padding: 10px 16px !important;
    flex-direction: row !important; align-items: center !important; flex-wrap: wrap;
    gap: 8px 10px !important;
    background: rgba(245, 245, 247, 0.86);
    backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .top-header .header-left { flex: 1 1 auto; min-width: 0; width: auto !important; }
  .top-header .header-left > div, .top-header .header-left > div > div { min-width: 0; }
  #page-title {
    font-size: 1.12rem !important; line-height: 1.25; letter-spacing: -0.015em;
    max-width: calc(100vw - 120px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  }
  #page-subtitle { font-size: 0.72rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100vw - 80px); }
  .top-header .header-right { width: auto !important; flex: 0 0 auto; }
  .btn-mobile-menu { width: 38px; height: 38px; border-radius: 11px; }

  /* Tablas en tablet: deslizamiento suave y encabezado fijo */
  .table-container { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

  /* Rastreo: lista arriba más baja */
  .rt-side { max-height: 360px !important; }
}

/* ---------- Pantallas táctiles: objetivos de toque cómodos ---------- */
@media (pointer: coarse) {
  .btn-icon-small, .btn-action-delete, .bac-icon-btn { min-width: 36px !important; min-height: 36px !important; }
  .btn-small, .bank-tb-btn, .bank-view-opt { min-height: 36px; }
  .rt-link, .xl-val-row { min-height: 32px; display: inline-flex; align-items: center; }
  .xl-val-row { display: flex; }
  .menu-item { padding-top: 11px !important; padding-bottom: 11px !important; }
}

/* ---------- Celular ---------- */
@media (max-width: 640px) {
  .main-content { padding: 14px 14px 90px !important; }
  .top-header { margin: -14px -14px 12px !important; padding: 9px 14px !important; }
  #page-subtitle, #header-permission-badge { display: none !important; }

  /* Evita el zoom automático de iOS al tocar un campo (requiere 16px) */
  .form-control, .form-select, .modal-content input, .modal-content select, .modal-content textarea,
  #content-container input[type="text"], #content-container input[type="search"], #content-container input[type="date"], #content-container select {
    font-size: 16px !important;
  }

  /* Tarjetas de resumen en 2 columnas */
  .quick-stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .quick-stats-bar .stat-widget { padding: 10px 12px !important; gap: 8px; }
  .quick-stats-bar .stat-widget-icon { width: 30px !important; height: 30px !important; }
  .quick-stats-bar .stat-widget-details h4 { font-size: 0.95rem !important; }
  .quick-stats-bar .stat-widget-label { font-size: 0.64rem !important; }
  .quick-stats-bar .text-muted { font-size: 0.62rem !important; }

  /* Tarjetas genéricas con menos relleno */
  .card { padding: 14px !important; border-radius: 14px !important; }
  .card-header { gap: 10px !important; }
  .card-header > div { min-width: 0; }
  .card-header input.form-control { width: 100% !important; }

  /* ---------- Banco: cuentas en carrusel horizontal ---------- */
  .bank-accounts-grid {
    display: grid !important;
    grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    gap: 10px !important; padding: 2px 2px 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px;
    scrollbar-width: none;
  }
  .bank-accounts-grid::-webkit-scrollbar { display: none; }
  .bank-accounts-grid > * { scroll-snap-align: start; }

  /* ---------- Banco: barra de acciones ---------- */
  .bank-actions-toolbar { flex-direction: column; align-items: stretch !important; gap: 8px !important; padding: 0 !important; background: none !important; border: none !important; box-shadow: none !important; }
  .bank-actions-toolbar .bank-actions-group {
    display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 8px !important;
    margin: 0 -14px; padding: 2px 14px 6px; scrollbar-width: none; width: auto !important;
  }
  .bank-actions-toolbar .bank-actions-group::-webkit-scrollbar { display: none; }
  .bank-actions-toolbar .bank-tb-btn { flex: 0 0 auto; white-space: nowrap; }
  .bank-actions-toolbar .bank-tb-icon-only span { display: inline; }
  /* Botón principal flotante (siempre a mano con el pulgar) */
  .bank-actions-toolbar .btn-primary.bank-tb-btn {
    position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70;
    height: 52px; padding: 0 20px !important; border-radius: 26px !important;
    font-size: 0.92rem !important; font-weight: 700 !important;
    box-shadow: 0 8px 22px rgba(0, 113, 227, 0.35), 0 2px 6px rgba(0, 0, 0, 0.12) !important;
  }
  .bank-actions-toolbar .btn-primary.bank-tb-btn svg { width: 20px; height: 20px; }
  body.bank-ledger-max-open .bank-actions-toolbar .btn-primary.bank-tb-btn,
  .bank-focus-on .bank-actions-toolbar .btn-primary.bank-tb-btn { display: none; }

  /* ---------- Banco: encabezado del libro y filtros ---------- */
  #bank-ledger-card .card-header { flex-direction: column; align-items: stretch !important; }
  #bank-ledger-card .card-header > div { flex-wrap: wrap; }
  .bank-view-seg { width: 100%; }
  .bank-view-opt { flex: 1 1 0; justify-content: center; }

}

/* Banco: tarjetas en celular y tablet */
@media (max-width: 900px) {
  /* ---------- Banco: cada movimiento es una tarjeta ---------- */
  #bank-ledger-card .table-container { overflow-x: hidden !important; max-height: none !important; height: auto !important; border: none !important; background: none !important; }
  #bank-ledger-card.bank-ledger-max .table-container { overflow-y: auto !important; }
  #bank-ledger-card table { width: 100% !important; min-width: 0 !important; table-layout: auto !important; border: none !important; }
  #bank-ledger-card table colgroup, #bank-ledger-card thead, #bank-ledger-card tfoot, .col-resizer { display: none !important; }
  #bank-ledger-card tbody { display: flex !important; flex-direction: column; gap: 8px; }
  #bank-ledger-card tbody tr {
    display: grid !important;
    grid-template-columns: 28px auto 1fr auto;
    column-gap: 8px; row-gap: 2px; align-items: center;
    padding: 11px 12px !important; border-radius: 14px;
    background: var(--bg-secondary, #fff);
    border: 1px solid var(--border-color, #e8e8ed);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }
  #bank-ledger-card tbody tr.row-selected { box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.35); }
  #bank-ledger-card tbody tr.row-audited {
    background: #e6f7ee !important;
    border-color: rgba(5, 150, 105, 0.48) !important;
    border-left: 4px solid #059669 !important;
  }
  #bank-ledger-card tbody tr.row-audited td {
    background: transparent !important;
    box-shadow: none !important;
  }
  #bank-ledger-card tbody tr.row-audited.row-selected {
    background: #d8eff4 !important;
    border-color: rgba(0, 113, 227, 0.45) !important;
    border-left: 4px solid #0071e3 !important;
  }
  #bank-ledger-card tbody td {
    display: block; padding: 0 !important; border: none !important; background: none !important;
    width: auto !important; min-width: 0 !important; max-width: none !important; height: auto !important;
    text-align: left; font-size: 0.78rem;
  }
  #bank-ledger-card td.col-select { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 2px !important; }
  #bank-ledger-card td.col-revisado {
    grid-column: 1; grid-row: 4; margin-top: 8px; padding-top: 8px !important;
    border-top: 1px solid var(--border-color, #e8e8ed) !important;
    display: flex !important; align-items: center; justify-content: center;
  }
  #bank-ledger-card td.col-revisado .tx-audit-toggle { width: 28px; height: 28px; }
  #bank-ledger-card td.col-descripcion {
    grid-column: 2 / 4; grid-row: 1; font-weight: 700; font-size: 0.86rem; color: var(--text-primary, #1d1d1f);
    white-space: normal !important; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  #bank-ledger-card td.col-entrada, #bank-ledger-card td.col-salida { grid-column: 4; grid-row: 1; text-align: right; font-size: 0.9rem; font-weight: 800 !important; white-space: nowrap; }
  #bank-ledger-card td.is-empty { display: none !important; }
  #bank-ledger-card td.col-cliente { grid-column: 2 / 4; grid-row: 2; color: var(--text-secondary, #6e6e73); font-size: 0.74rem; font-weight: 600 !important; }
  #bank-ledger-card td.col-conversion { grid-column: 4; grid-row: 2; text-align: right; font-size: 0.7rem; }
  #bank-ledger-card td.col-conversion div { display: inline; margin: 0 0 0 4px !important; }
  #bank-ledger-card td.col-fecha { grid-column: 2; grid-row: 3; color: var(--text-muted, #86868b); font-size: 0.72rem; white-space: nowrap; }
  #bank-ledger-card td.col-banco { grid-column: 3; grid-row: 3; color: var(--text-secondary, #6e6e73) !important; font-size: 0.72rem; font-weight: 600 !important; }
  #bank-ledger-card td.col-banco::before { content: "• "; color: var(--text-muted, #86868b); }
  #bank-ledger-card td.col-tasa { grid-column: 4; grid-row: 3; text-align: right; font-size: 0.7rem; }
  #bank-ledger-card td.col-tasa div { display: inline; margin: 0 0 0 4px !important; font-size: 0.7rem !important; }
  #bank-ledger-card td.col-acciones { grid-column: 2 / 5; grid-row: 4; margin-top: 8px; padding-top: 8px !important; border-top: 1px solid var(--border-color, #e8e8ed) !important; }
  #bank-ledger-card td.col-acciones > div { justify-content: flex-start !important; gap: 8px !important; }
  #bank-ledger-card td.col-acciones .btn-icon-small, #bank-ledger-card td.col-acciones .btn-action-delete { width: 38px !important; height: 34px !important; border-radius: 10px !important; }
  #bank-ledger-card td.col-acciones .btn-action-delete { margin-left: auto; }
  #bank-ledger-card td.col-referencia, #bank-ledger-card td.col-analista, #bank-ledger-card td.col-beneficiario,
  #bank-ledger-card td.col-actividad, #bank-ledger-card td.col-centro, #bank-ledger-card td.col-cuenta, #bank-ledger-card td.col-saldo { display: none !important; }
  #bank-ledger-card td .m-sign { font-weight: 700; font-size: 0.78rem; }
  #bank-ledger-card tbody tr > td[colspan] { grid-column: 1 / -1; grid-row: auto; text-align: center; }
  #bank-ledger-card tbody tr:has(> td[colspan]) { display: block !important; background: none; border: none; box-shadow: none; }

}

@media (max-width: 640px) {
  /* Menú de filtro de columna como hoja inferior */
  #bank-col-filter-popover {
    position: fixed !important; left: 8px !important; right: 8px !important; top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; width: auto !important; max-width: none !important;
    max-height: 75vh; overflow-y: auto; border-radius: 16px !important; z-index: 1200 !important;
  }

  /* ---------- Tablas generales: filas como tarjetas ---------- */
  table.m-cards { width: 100% !important; min-width: 0 !important; border: none !important; }
  table.m-cards thead, table.m-cards tfoot { display: none !important; }
  table.m-cards, table.m-cards tbody { display: block !important; }
  table.m-cards tbody { display: flex !important; flex-direction: column; gap: 8px; }
  table.m-cards tbody tr {
    display: block !important; padding: 10px 12px; border-radius: 12px;
    background: var(--bg-secondary, #fff); border: 1px solid var(--border-color, #e8e8ed);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }
  table.m-cards tbody td {
    display: flex !important; justify-content: space-between; align-items: center; gap: 12px;
    width: auto !important; max-width: none !important; min-width: 0 !important;
    padding: 4px 0 !important; border: none !important; background: none !important;
    text-align: right !important; white-space: normal !important; overflow: visible !important; font-size: 0.8rem;
  }
  table.m-cards tbody td::before {
    content: attr(data-label); flex: 0 0 auto; max-width: 48%;
    text-align: left; font-size: 0.68rem; font-weight: 600; color: var(--text-muted, #86868b);
    text-transform: uppercase; letter-spacing: 0.03em;
  }
  table.m-cards tbody td[data-label=""]::before { display: none; }
  table.m-cards tbody td[data-label=""] { justify-content: flex-end; }
  table.m-cards tbody td:first-child { font-weight: 700; }
  table.m-cards tbody td.m-empty { display: none !important; }
  table.m-cards tbody td > br { display: none; }
  table.m-cards tbody td .btn-icon-small, table.m-cards tbody td .btn-small { min-height: 34px; }
  table.m-cards tbody tr.m-full-row { padding: 0; border: none; box-shadow: none; background: none; }
  table.m-cards tbody tr.m-full-row td { display: block !important; text-align: center !important; }
  table.m-cards tbody tr.m-full-row td::before { display: none; }
  .table-container:has(> table.m-cards) { overflow: visible !important; max-height: none !important; border: none !important; background: none !important; }

  /* ---------- Ventanas como hoja inferior (bottom sheet) ---------- */
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal-overlay > .modal-content {
    width: 100% !important; max-width: 100% !important;
    max-height: 92vh !important; margin: 0 !important;
    border-radius: 20px 20px 0 0 !important; border-bottom: none !important;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    animation: mSheetUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .modal-overlay > .modal-content::before {
    content: ""; display: block; width: 38px; height: 5px; border-radius: 3px;
    background: #d2d2d7; margin: -8px auto 10px;
  }
  .modal-overlay > .modal-content.pa-modal::before, .modal-overlay > .modal-content.wd-modal::before { position: absolute; left: 50%; transform: translateX(-50%); top: 6px; margin: 0; z-index: 5; }
  .modal-footer { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom, 0px)); background: var(--bg-secondary, #fff); margin: 0 -16px -16px !important; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important; z-index: 2; }
  .modal-footer .btn { flex: 1 1 0; justify-content: center; min-height: 44px; }

  /* Rastreo y otras vistas */
  .rt-head { flex-wrap: wrap; }
  .rt-replay { margin-left: auto; }
  .wd-banner { grid-template-columns: 1fr !important; }
  .wd-banner-btn { justify-content: center; }
}
@keyframes mSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .modal-overlay > .modal-content { animation: none !important; }
}
@media (max-width: 900px) {
  .top-header .header-left > div > div { display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; }
  .top-header #page-title { flex: 0 1 auto; min-width: 0; max-width: calc(100vw - 130px); }
  .top-header .btn-view-info { margin-left: 0 !important; flex: 0 0 auto; }
  .top-header #page-subtitle { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .portal-section-header h2, .portal-section-header h3, .portal-section-header h4, .portal-section-title { font-size: 0.92rem !important; }
}
@media (max-width: 640px) {
  table.m-cards tbody td { flex-wrap: wrap; }
  table.m-cards tbody td > * { max-width: 100%; min-width: 0; white-space: normal !important; overflow-wrap: anywhere; }
  table.m-cards tbody td > div { text-align: right; margin-left: auto; }
}
@media (max-width: 640px) {
  .m-amount-row { grid-template-columns: 1fr 1fr !important; }
  .m-amount-row > :first-child { grid-column: 1 / -1; }
  .modal-content .grid-2 { grid-template-columns: 1fr !important; }
  .wd-calc { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .table-responsive:has(> table.m-cards) { overflow: visible !important; max-height: none !important; border: none !important; }
  .dashboard-grid .table-responsive { -webkit-overflow-scrolling: touch; }
  .dashboard-grid .table-responsive table th:first-child, .dashboard-grid .table-responsive table td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--bg-secondary, #fff); box-shadow: 1px 0 0 var(--border-color, #e8e8ed);
  }
}

/* Tablet: tarjetas del libro bancario en dos columnas */
@media (min-width: 641px) and (max-width: 900px) {
  #bank-ledger-card tbody { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #bank-ledger-card tbody tr:has(> td[colspan]) { grid-column: 1 / -1; }
  #bank-ledger-card td.col-descripcion { font-size: 0.84rem; }
  .bank-accounts-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; }
}
.m-sign { display: none; }
@media (max-width: 900px) { #bank-ledger-card td .m-sign { display: inline; } }

/* Logo del banco en su tarjeta */
.bac-logo {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: #fff;
  border: 1px solid var(--border-color, #e8e8ed); display: grid; place-items: center; overflow: hidden;
  align-self: center;
}
.bac-logo img { width: 24px; height: 24px; object-fit: contain; display: block; }
.bac-logo-icon { background: #f5f5f7; color: var(--text-secondary, #6e6e73); }
.bac-logo-icon svg { width: 17px; height: 17px; }
.bac-logo-text { background: rgba(0, 113, 227, 0.08); border-color: transparent; color: var(--accent-color, #0071e3); font-size: 0.72rem; font-weight: 700; letter-spacing: -0.01em; }
.bank-account-card.active-bank .bac-logo { box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.18); }
