/* ============================================================
   DEMOS VIVAS de la home (patrón "la demo es el argumento"):
   1) #mlive-exp   — simulador de exposición al dólar (sección #exposicion)
   2) #mlive-recon — conciliación bancaria con IA (sección #automatizacion)
   Namespace .mlive-* para no chocar con styles.css. Solo transform/opacity.
   ============================================================ */

/* ---------- 1 · Simulador de exposición ---------- */
.mlive-exp { padding: 1.1rem 1.15rem 1.2rem; background: var(--white); font-family: var(--font); }
.mlive-exp-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.mlive-exp-head span:first-child { font-weight: 700; font-size: .82rem; color: var(--gray-800); }
.mlive-chip { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--green-subtle); color: var(--green-darker); border-radius: var(--radius-full); padding: .18rem .55rem; }
.mlive-rows { display: flex; flex-direction: column; }
.mlive-row { display: grid; grid-template-columns: 2.6rem 1fr auto auto; gap: .6rem; align-items: baseline; padding: .42rem 0; border-bottom: 1px solid var(--gray-100); font-size: .8rem; }
.mlive-cur { font-size: .6rem; font-weight: 800; letter-spacing: .05em; border-radius: .3rem; text-align: center; padding: .14rem 0; }
.mlive-cur.ars { background: var(--blue-subtle); color: var(--blue-dark); }
.mlive-cur.usd { background: var(--green-subtle); color: var(--green-darker); }
.mlive-cur.usdt { background: var(--gray-100); color: var(--gray-600); }
.mlive-name { color: var(--gray-500); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlive-amt { color: var(--gray-400); font-variant-numeric: tabular-nums; font-size: .74rem; }
.mlive-usd { font-weight: 700; color: var(--gray-800); font-variant-numeric: tabular-nums; }
.mlive-total { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0 .2rem; font-size: .8rem; color: var(--gray-500); }
.mlive-total strong { font-size: 1.15rem; font-weight: 800; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.mlive-slider { margin-top: .75rem; }
.mlive-slider label { display: flex; justify-content: space-between; align-items: baseline; font-size: .74rem; font-weight: 600; color: var(--gray-500); margin-bottom: .35rem; }
.mlive-slider label strong { font-size: .95rem; font-weight: 800; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.mlive-slider input[type="range"] { width: 100%; appearance: none; -webkit-appearance: none; height: 6px; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--green) 0%, var(--green) 45%, var(--gray-200) 45%); outline: none; cursor: pointer; }
.mlive-slider input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 3px solid var(--green); box-shadow: var(--shadow-md); cursor: grab; }
.mlive-slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.mlive-slider input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--green); box-shadow: var(--shadow-md); cursor: grab; }
.mlive-delta { margin-top: .7rem; font-size: .78rem; font-weight: 600; line-height: 1.45; color: var(--gray-600); background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: .55rem .7rem; font-variant-numeric: tabular-nums; }
.mlive-delta.is-loss { color: #B91C1C; background: #FEF2F2; border-color: #FECACA; }
.mlive-delta.is-gain { color: var(--green-darker); background: var(--green-subtle); border-color: #BBF7D0; }
.mlive-note { margin: .6rem 0 0; font-size: .68rem; color: var(--gray-400); }

/* ---------- 2 · Conciliación IA (sobre sección oscura) ---------- */
.mlive-recon-wrap { max-width: 56rem; margin: 2.6rem auto 0; }
.mlive-recon { position: relative; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-2xl); padding: 1.2rem 1.3rem 1.1rem; font-family: var(--font); overflow: hidden; }
.mlive-recon-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.mlive-recon-head strong { display: block; color: #fff; font-size: .95rem; }
.mlive-recon-head span { display: block; color: var(--gray-400); font-size: .72rem; margin-top: .1rem; }
.mlive-btn { font-family: var(--font); font-size: .8rem; font-weight: 700; color: var(--gray-900); background: var(--green); border: none; border-radius: var(--radius-full); padding: .55rem 1.1rem; cursor: pointer; transition: transform .15s, background .15s; }
.mlive-btn:hover { background: var(--green-light); transform: translateY(-1px); }
.mlive-btn:disabled { opacity: .55; cursor: default; transform: none; }
.mlive-recon-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.mlive-col-title { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-400); margin: 0 0 .45rem; }
.mlive-mrow { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .48rem .55rem; border-radius: var(--radius-md); border: 1px solid transparent; font-size: .74rem; color: var(--gray-300); transition: background .3s, border-color .3s; min-height: 2.35rem; }
.mlive-mrow + .mlive-mrow { margin-top: .3rem; }
.mlive-mrow .mono { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--gray-200); font-weight: 600; }
.mlive-mrow .desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlive-mrow.is-match { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .45); color: #E7FBEF; }
.mlive-mrow.is-review { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .5); color: #FDF3DF; }
.mlive-conf { font-size: .6rem; font-weight: 800; border-radius: var(--radius-full); padding: .14rem .5rem; white-space: nowrap; animation: mlive-pop .35s cubic-bezier(.2, .9, .3, 1.4) both; }
.mlive-conf.ok { background: var(--green); color: var(--gray-900); }
.mlive-conf.warn { background: #F59E0B; color: var(--gray-900); }
.mlive-scanline { position: absolute; left: -2%; right: -2%; top: 0; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--green-light), transparent); box-shadow: 0 0 14px rgba(74, 222, 128, .8); opacity: 0; pointer-events: none; }
.mlive-recon.is-scanning .mlive-scanline { opacity: 1; animation: mlive-scan 2.4s linear both; }
.mlive-recon-foot { margin-top: .85rem; font-size: .74rem; font-weight: 600; color: var(--gray-400); font-variant-numeric: tabular-nums; }
.mlive-recon-foot.is-done { color: var(--green-light); }

@keyframes mlive-scan { from { top: 12%; } to { top: 96%; } }
@keyframes mlive-pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 640px) {
  .mlive-mrow { font-size: .66rem; padding: .4rem .45rem; }
  .mlive-recon-grid { gap: .5rem; }
  .mlive-row { grid-template-columns: 2.3rem 1fr auto; }
  .mlive-amt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mlive-recon.is-scanning .mlive-scanline { animation: none; opacity: 0; }
  .mlive-conf { animation: none; }
}
