/* FRAMA · VendeMax por dentro: interfaz ilustrada y animada con la paleta de FRAMA (se carga después de site.css). */

.vm-name { line-height: 0; }
.vm-logo { display: block; width: clamp(240px, 30vw, 440px); height: auto; }

.vmx { max-width: 1320px; margin: clamp(80px, 10vw, 140px) auto 0; padding: 0 var(--pad); }
.vmx-head { display: grid; gap: 18px; margin-bottom: 26px; }
.vmx-tabs { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.vmx-tab { position: relative; display: inline-flex; align-items: baseline; gap: 10px; padding: 6px 0 10px; border: 0; background: none; cursor: pointer; font: 700 clamp(18px, 1.9vw, 26px) / 1.1 var(--display); letter-spacing: -.03em; color: var(--muted); transition: color 300ms var(--ease-out); }
.vmx-tab span { font: 600 11px var(--text); letter-spacing: .1em; color: var(--muted); }
.vmx-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.vmx-tab:hover { color: var(--ink); }
.vmx-tab.is-on { color: var(--ink); }
.vmx-tab.is-on span { color: var(--coral); }
.vmx-tab.is-on::after { transform: scaleX(1); transition: transform 600ms var(--ease-io); }
.vmx.is-auto .vmx-tab.is-on::after { transform: scaleX(0); animation: vmx-time var(--dur, 7s) linear forwards; }
@keyframes vmx-time { to { transform: scaleX(1); } }
.vmx-cap { margin-top: 20px; max-width: 46em; font-size: 15px; color: var(--body); }

/* Ventana */
.vmx-win { overflow: hidden; border-radius: 12px; background: #FFFDF8; box-shadow: 0 1px 0 var(--line), 0 30px 80px -30px rgba(58, 0, 62, .35); border: 1px solid var(--line); font-family: var(--text); color: var(--ink); }
.vmx-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; background: var(--ink); }
.vmx-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(247, 243, 234, .22); }
.vmx-bar i:first-child { background: var(--coral); }
.vmx-bar span { margin-left: 12px; font-size: 11px; letter-spacing: .06em; color: var(--on-dark-muted); }
.vmx-body { display: grid; grid-template-columns: 1fr; height: clamp(440px, 46vw, 560px); }
.vmx-side { display: none; padding: 22px 16px; background: var(--ink); color: var(--on-dark-muted); }
.vmx-side img { display: block; width: 132px; height: auto; margin: 2px 8px 22px; }
.vmx-acc { display: grid; padding: 10px 12px; margin-bottom: 16px; border-radius: 8px; background: rgba(247, 243, 234, .06); font-size: 11px; }
.vmx-acc b { font-size: 13px; font-weight: 600; color: var(--on-dark); }
.vmx-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.vmx-side li { position: relative; padding: 9px 12px; border-radius: 8px; font-size: 13px; transition: background-color 400ms var(--ease-out), color 400ms var(--ease-out); }
.vmx-side li.is-on { background: rgba(214, 255, 69, .1); color: var(--lima); }
.vmx-side li.is-on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--lima); }

.vmx-main { position: relative; overflow: hidden; background: #FFFDF8; }
.vmx-view { position: absolute; inset: 0; padding: 22px clamp(16px, 2vw, 28px); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out), visibility 0s 500ms; }
.vmx-view.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 500ms var(--ease-out) 120ms, transform 600ms var(--ease-out) 120ms, visibility 0s; }
.vmx-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.vmx-top b { font: 700 18px var(--display); letter-spacing: -.03em; }
.vmx-top span { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
.vmx-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 16px; }
.vmx-card > p { font-size: 12px; font-weight: 600; color: var(--body); }

/* Tablero */
.vmx-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { position: relative; display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.kpi::before { content: ""; position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: 50%; }
.k1::before { background: var(--purpura); } .k2::before { background: var(--coral); } .k3::before { background: var(--lima); box-shadow: inset 0 0 0 1px rgba(23, 0, 27, .15); } .k4::before { background: var(--amarillo); }
.kpi span { font-size: 11px; color: var(--muted); }
.kpi b { font: 700 clamp(28px, 3vw, 40px) / 1.05 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 11px; font-weight: 600; color: #4C7A00; }
.vmx-charts { display: grid; gap: 10px; margin-top: 10px; }
.bars { display: flex; align-items: flex-end; gap: 6%; height: 120px; margin-top: 14px; padding: 0 2px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(0deg, transparent 0 29px, rgba(23, 0, 27, .06) 29px 30px); }
.bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: var(--lila); transform-origin: bottom; }
.bars i:last-child { background: var(--purpura); }
.bars i:nth-child(1) { --h: 34%; } .bars i:nth-child(2) { --h: 48%; } .bars i:nth-child(3) { --h: 40%; } .bars i:nth-child(4) { --h: 56%; } .bars i:nth-child(5) { --h: 50%; } .bars i:nth-child(6) { --h: 62%; } .bars i:nth-child(7) { --h: 58%; }
.bars i:nth-child(8) { --h: 70%; } .bars i:nth-child(9) { --h: 64%; } .bars i:nth-child(10) { --h: 76%; } .bars i:nth-child(11) { --h: 72%; } .bars i:nth-child(12) { --h: 84%; } .bars i:nth-child(13) { --h: 80%; } .bars i:nth-child(14) { --h: 94%; }
.vmx-ring { display: none; }
.vmx-ring svg { display: block; width: 120px; margin: 12px auto 10px; transform: rotate(-90deg); }
.vmx-ring circle { fill: none; stroke-width: 12; }
.vmx-ring .r0 { stroke: var(--marfil-2); }
.vmx-ring .r1, .vmx-ring .r2, .vmx-ring .r3 { stroke-linecap: butt; stroke-dasharray: var(--d) 289; stroke-dashoffset: var(--o); }
.vmx-ring .r1 { stroke: var(--purpura); --d: 176; --o: 0; }
.vmx-ring .r2 { stroke: var(--coral); --d: 66; --o: -178; }
.vmx-ring .r3 { stroke: var(--lima); --d: 41; --o: -246; }
.vmx-ring text { font: 700 26px var(--display); fill: var(--ink); text-anchor: middle; transform: rotate(90deg); transform-origin: 60px 60px; }
.vmx-ring ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 11px; color: var(--body); }
.vmx-ring li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; }
.vmx-ring .c1::before { background: var(--purpura); } .vmx-ring .c2::before { background: var(--coral); } .vmx-ring .c3::before { background: var(--lima); }

/* Conversaciones */
.vmx-chat { display: grid; grid-template-columns: 1fr; padding: 0; }
.vmx-inbox { display: none; padding: 22px 0 0; border-right: 1px solid var(--line); }
.vmx-inbox .vmx-top { padding: 0 18px; }
.vmx-inbox ul { list-style: none; margin: 0; padding: 0; }
.vmx-inbox li { position: relative; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.vmx-inbox li.is-on { background: rgba(122, 50, 255, .07); }
.vmx-inbox li.is-on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--purpura); }
.vmx-inbox .av { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: normal 600 11px var(--text); background: var(--marfil-2); color: var(--ink); }
.vmx-inbox b { font-size: 13px; font-weight: 600; }
.vmx-inbox span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
.vmx-inbox .vmx-ch { position: absolute; left: 42px; top: 34px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #FFFDF8; }
.vmx-ch.wa { background: #25D366; } .vmx-ch.ig { background: var(--coral); } .vmx-ch.fb { background: var(--purpura); }
.vmx-thread { display: flex; flex-direction: column; min-width: 0; padding: 22px clamp(16px, 2vw, 26px) 18px; }
.msgs { display: flex; flex-direction: column; gap: 10px; flex: 1; overflow: hidden; }
.m { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.m.in { align-self: flex-start; background: var(--marfil-2); color: var(--ink); border-bottom-left-radius: 4px; }
.m.out { align-self: flex-end; background: var(--ink); color: var(--on-dark); border-bottom-right-radius: 4px; }
.m small { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lima); }
.m.typing { display: none; align-self: flex-end; gap: 4px; padding: 12px 14px; background: var(--ink); border-bottom-right-radius: 4px; }
.m.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--on-dark-muted); animation: vmx-dot 1s infinite; }
.m.typing i:nth-child(2) { animation-delay: .15s; } .m.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes vmx-dot { 40% { transform: translateY(-3px); background: var(--lima); } }
.m.sys { align-self: center; max-width: none; padding: 6px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--ink); background: rgba(214, 255, 69, .55); }
.vmx-input { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 10px 10px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--muted); }
.vmx-input i { width: 28px; height: 28px; border-radius: 7px; background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317001B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Embudo */
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; height: calc(100% - 50px); }
.col { display: flex; flex-direction: column; min-width: 0; padding: 10px 8px; border-radius: 10px; background: var(--marfil-2); }
.col > p { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 10px; padding: 0 2px; font-size: 11px; }
.col > p b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.col > p span { color: var(--muted); }
.col:nth-child(1) > p b::before, .col:nth-child(2) > p b::before, .col:nth-child(3) > p b::before, .col:nth-child(4) > p b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.col:nth-child(1) > p b::before { background: var(--lila); } .col:nth-child(2) > p b::before { background: var(--purpura); } .col:nth-child(3) > p b::before { background: var(--coral); } .col:nth-child(4) > p b::before { background: var(--lima); box-shadow: inset 0 0 0 1px rgba(23, 0, 27, .2); }
.cards { display: flex; flex-direction: column; gap: 8px; }
.pc { display: grid; gap: 2px; padding: 10px; border-radius: 8px; background: #fff; box-shadow: 0 1px 0 var(--line); font-size: 10px; color: var(--muted); }
.pc b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: var(--ink); }
.pc-go { position: relative; z-index: 2; box-shadow: 0 0 0 2px var(--purpura), 0 14px 30px -12px rgba(58, 0, 62, .45); }
.pc-go.is-won { box-shadow: 0 0 0 2px var(--lima), 0 14px 30px -12px rgba(58, 0, 62, .45); }

@media (min-width: 700px) {
  .vmx-kpis { grid-template-columns: repeat(4, 1fr); }
  .vmx-charts { grid-template-columns: 1.7fr 1fr; }
  .vmx-ring { display: block; }
  .bars { height: clamp(150px, 16vw, 210px); }
  .vmx-chat { grid-template-columns: 260px 1fr; }
  .vmx-inbox { display: block; }
  .cols { gap: 12px; }
  .col { padding: 12px 10px; }
  .pc { padding: 12px; font-size: 11px; }
  .pc b { font-size: 13px; }
}
@media (min-width: 1000px) {
  .vmx-head { grid-template-columns: auto 1fr; align-items: end; gap: 40px; }
  .vmx-tabs { justify-content: flex-end; }
  .vmx-body { grid-template-columns: 210px 1fr; }
  .vmx-side { display: block; }
}
@media (max-width: 699px) {
  .vmx-body { height: 470px; }
  .col > p { flex-direction: column; font-size: 10px; }
  .col:nth-child(n) > p b::before { display: none; }
  .pc { padding: 8px 7px; }
  .pc span { display: none; }
  .pc b, .col > p b { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .pc b { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .m.typing i { animation: none; }
  .vmx.is-auto .vmx-tab.is-on::after { animation: none; transform: scaleX(1); }
}

/* Middleware: gráfico animado (anuncios -> middleware -> canales, y la venta de regreso) */
.mw-viz { overflow: hidden; border-radius: 16px; background: radial-gradient(120% 90% at 50% 45%, #2A0B30 0%, #17001B 62%); padding: clamp(10px, 1.6vw, 20px); }
.mv { display: block; width: 100%; height: auto; }
.mv-m { display: none; }
@media (max-width: 640px) { .mv-d { display: none; } .mv-m { display: block; } }
.mv-k { font: 600 9.5px var(--text); letter-spacing: .16em; fill: #FF6B57; }
.mv-h { font: 700 19px var(--display); fill: #F7F3EA; }
.mv-r { font: 500 12px var(--text); fill: #F7F3EA; }
.mv-rl { font: 500 12px var(--text); fill: #D6FF45; }
.mv-ln { fill: none; stroke: rgba(247, 243, 234, .14); stroke-width: 1.4; }
.mv-ln-r { stroke: rgba(214, 255, 69, .38); stroke-dasharray: 3 6; }
.mv-halo { fill: rgba(247, 243, 234, .03); stroke: rgba(247, 243, 234, .05); }
.mv-ripple { fill: none; stroke: #FF6B57; stroke-width: 1.4; opacity: 0; }
.mv-logo { opacity: .94; }
.mv-row { opacity: .3; animation: mv-row 4.8s ease-in-out infinite; }
.mv-row2 { animation-delay: .8s; } .mv-row3 { animation-delay: 1.6s; }
@keyframes mv-row { 0%, 12% { opacity: .3; } 22%, 78% { opacity: 1; } 92%, 100% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .mv-row { animation: none; opacity: 1; } .mv-pk, .mv-ripple { display: none; } }
@media (min-width: 900px) { .mw { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 56px; } }
