/* App del dueño: enlazar el celular con QR (computadora). Prefijo ec-. */
.ec-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; color: var(--pos-text, #172033); }
.ec-lista { grid-column: 1 / -1; }

/* ---- tarjeta principal ---- */
.ec-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 460px; padding: 38px 34px 0; overflow: hidden; border-radius: 28px; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--brand-color, #0d6efd) 70%, #38bdf8) 0%, transparent 55%), linear-gradient(150deg, #0b1b3a 0%, #102a63 55%, #14367f 100%);
    box-shadow: 0 30px 60px rgba(11, 27, 58, .35); }
.ec-hero::before, .ec-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ec-hero::before { width: 320px; height: 320px; right: -90px; bottom: -120px; background: radial-gradient(circle, rgba(56, 189, 248, .35), transparent 65%); }
.ec-hero::after { width: 180px; height: 180px; left: -60px; top: -60px; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); }
.ec-hero-texto { position: relative; z-index: 1; align-self: start; display: grid; gap: 14px; padding-bottom: 38px; }
.ec-pildora { justify-self: start; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(6px); }
.ec-hero h2 { margin: 0; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; }
.ec-hero p { margin: 0; max-width: 430px; color: rgba(255, 255, 255, .82); font-size: 15px; font-weight: 500; line-height: 1.5; }
.ec-beneficios { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.ec-beneficios li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.ec-beneficios i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18); font-style: normal; font-size: 16px; }

/* telefono de muestra */
.ec-telefono { position: relative; z-index: 1; align-self: end; margin-right: 6px; transform: rotate(5deg) translateY(30px); transform-origin: bottom center; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .45)); animation: ecFlota 6s ease-in-out infinite; }
.ec-tel-marco { position: relative; width: 196px; height: 400px; padding: 9px; border-radius: 38px; background: linear-gradient(160deg, #1f2a44, #0a1224); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); }
.ec-tel-isla { position: absolute; top: 14px; left: 50%; width: 62px; height: 17px; margin-left: -31px; border-radius: 999px; background: #05080f; z-index: 2; }
.ec-tel-pantalla { height: 100%; padding: 42px 14px 14px; border-radius: 30px; background: linear-gradient(180deg, #f6f9ff, #e9f0ff); color: #0f172a; display: grid; align-content: start; gap: 4px; overflow: hidden; }
.ec-tel-pantalla small { color: #64748b; font-size: 10px; font-weight: 700; }
.ec-tel-pantalla b { font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.ec-tel-pantalla em { color: #15803d; font-style: normal; font-size: 10.5px; font-weight: 800; }
.ec-tel-barras { display: flex; align-items: flex-end; gap: 6px; height: 92px; margin: 12px 0 10px; }
.ec-tel-barras i { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand-color, #0d6efd), #60a5fa); transform-origin: bottom; animation: ecCrece 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.ec-tel-barras i:nth-child(2) { animation-delay: .08s; } .ec-tel-barras i:nth-child(3) { animation-delay: .16s; } .ec-tel-barras i:nth-child(4) { animation-delay: .24s; }
.ec-tel-barras i:nth-child(5) { animation-delay: .32s; } .ec-tel-barras i:nth-child(6) { animation-delay: .4s; } .ec-tel-barras i:nth-child(7) { animation-delay: .48s; }
.ec-tel-fila { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); margin-top: 4px; }
.ec-tel-fila span { width: 22px; height: 22px; border-radius: 7px; background: #dbeafe; }
.ec-tel-fila u { flex: 1; height: 8px; border-radius: 4px; background: #e2e8f0; text-decoration: none; }
.ec-tel-fila.corta u { flex: .6; }

/* ---- panel del QR ---- */
.ec-panel, .ec-lista { padding: 26px 28px; border: 1px solid var(--pos-line, #dbe3ef); border-radius: 28px; background: var(--pos-card, #fff); box-shadow: 0 14px 40px rgba(15, 23, 42, .07); }
.ec-panel { display: grid; gap: 18px; align-content: start; }
.ec-panel header h3, .ec-lista header h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ec-panel header p, .ec-lista header p { margin: 4px 0 0; color: var(--pos-muted, #687386); font-weight: 600; font-size: 13.5px; }

.ec-pasos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ec-pasos li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--pos-surface, #f3f6fb); opacity: .6; transition: opacity .3s, background .3s, transform .3s; }
.ec-pasos li.activo { opacity: 1; background: color-mix(in srgb, var(--brand-color, #0d6efd) 11%, #fff); }
.ec-pasos li.listo { opacity: 1; background: #dcfce7; }
.ec-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #cbd5e1; color: #fff; font-weight: 800; font-size: 13px; }
.ec-pasos li.activo .ec-num { background: var(--brand-color, #0d6efd); }
.ec-pasos li.listo .ec-num { background: #16a34a; }
.ec-pasos b { display: block; font-size: 13px; }
.ec-pasos small { display: block; color: var(--pos-muted, #687386); font-weight: 600; font-size: 11.5px; line-height: 1.3; }

.ec-centro { display: grid; justify-items: center; gap: 14px; }
.ec-qr-caja { position: relative; width: min(100%, 290px); aspect-ratio: 1; padding: 18px; border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 22px 44px color-mix(in srgb, var(--brand-color, #0d6efd) 22%, transparent); overflow: hidden; }
.ec-qr-caja.esperando { animation: ecLatido 3s ease-in-out infinite; }
.ec-qr { width: 100%; height: 100%; transition: filter .35s, opacity .35s; }
.ec-qr svg { display: block; width: 100%; height: 100%; }
.ec-qr-caja.vencido .ec-qr, .ec-qr-caja.enlazado .ec-qr { filter: blur(7px); opacity: .25; }
.ec-qr-carga { display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: #475569; }
.ec-qr-carga small { font-weight: 600; }
.ec-spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid #e2e8f0; border-top-color: var(--brand-color, #0d6efd); animation: ecGira .8s linear infinite; }

.ec-esq { position: absolute; width: 30px; height: 30px; border: 4px solid var(--brand-color, #0d6efd); pointer-events: none; z-index: 2; }
.ec-esq.a { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.ec-esq.b { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.ec-esq.c { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.ec-esq.d { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.ec-escaneo { position: absolute; left: 18px; right: 18px; top: 18px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--brand-color, #0d6efd), transparent); box-shadow: 0 0 16px 3px color-mix(in srgb, var(--brand-color, #0d6efd) 55%, transparent); animation: ecBarre 2.6s ease-in-out infinite; z-index: 1; }

.ec-velo { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: #0f172a; }
.ec-velo b { font-size: 18px; }
.ec-velo small { color: #475569; font-weight: 600; max-width: 200px; overflow-wrap: anywhere; }
.ec-check { width: 78px; height: 78px; }
.ec-check circle { fill: none; stroke: #16a34a; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: ecTrazo .6s ease forwards; }
.ec-check path { fill: none; stroke: #16a34a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: ecTrazo .4s .45s ease forwards; }
.ec-velo.ok { animation: ecEntra .4s ease; }

.ec-reloj { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 8px; border-radius: 999px; background: var(--pos-surface, #f3f6fb); }
.ec-reloj svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ec-reloj circle { fill: none; stroke-width: 5; }
.ec-reloj .fondo { stroke: rgba(100, 116, 139, .22); }
.ec-reloj .anillo { stroke: var(--brand-color, #0d6efd); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.ec-reloj small { display: block; color: var(--pos-muted, #687386); font-weight: 700; font-size: 11px; }
.ec-reloj b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ec-reloj.poco .anillo { stroke: #ef4444; }
.ec-reloj.poco b { color: #dc2626; }

.ec-codigo { display: grid; justify-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--pos-line, #cbd5e1); border-radius: 18px; }
.ec-codigo small { color: var(--pos-muted, #687386); font-weight: 700; font-size: 12.5px; text-align: center; }
.ec-letras { display: flex; align-items: center; gap: 6px; }
.ec-letras span { display: grid; place-items: center; width: 34px; height: 44px; border-radius: 10px; background: #0b1b3a; color: #fff; font: 800 20px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; box-shadow: 0 4px 10px rgba(11, 27, 58, .25); }
.ec-guion { width: 12px; height: 4px; border-radius: 2px; background: #94a3b8; }
.ec-letras.apagado { opacity: .35; }
.ec-enlace { padding: 0; border: 0; background: none; color: var(--brand-color, #0d6efd); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }

.ec-acciones { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ec-btn { min-height: 42px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--pos-surface, #eef2f8); color: var(--pos-text, #172033); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.ec-btn:hover { transform: translateY(-1px); }
.ec-btn.principal { background: var(--brand-color, #0d6efd); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-color, #0d6efd) 35%, transparent); }
.ec-btn.suave { background: transparent; border: 1px solid var(--pos-line, #cbd5e1); }
.ec-btn.peligro { background: rgba(214, 64, 47, .1); color: #c0392b; min-height: 36px; font-size: 13px; }

/* ---- lista ---- */
.ec-celulares { display: grid; gap: 10px; margin-top: 14px; }
.ec-celular { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--pos-surface, #f3f6fb); }
.ec-celular > div { flex: 1; min-width: 0; }
.ec-celular b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.ec-celular small { color: var(--pos-muted, #687386); font-weight: 600; font-size: 12.5px; }
.ec-celular-icono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: color-mix(in srgb, var(--brand-color, #0d6efd) 12%, #fff); font-size: 20px; }
.ec-vacio { display: grid; gap: 4px; padding: 22px; text-align: center; border: 1px dashed var(--pos-line, #cbd5e1); border-radius: 16px; }
.ec-vacio small { color: var(--pos-muted, #687386); font-weight: 600; }

@keyframes ecGira { to { transform: rotate(360deg); } }
@keyframes ecBarre { 0%, 100% { top: 18px; opacity: .2; } 10%, 90% { opacity: 1; } 50% { top: calc(100% - 21px); } }
@keyframes ecLatido { 0%, 100% { box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 22px 44px color-mix(in srgb, var(--brand-color, #0d6efd) 20%, transparent); } 50% { box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 26px 56px color-mix(in srgb, var(--brand-color, #0d6efd) 38%, transparent); } }
@keyframes ecTrazo { to { stroke-dashoffset: 0; } }
@keyframes ecEntra { from { opacity: 0; transform: scale(.92); } }
@keyframes ecFlota { 0%, 100% { transform: rotate(5deg) translateY(30px); } 50% { transform: rotate(5deg) translateY(18px); } }
@keyframes ecCrece { from { transform: scaleY(0); } }

@media (max-width: 1180px) { .ec-shell { grid-template-columns: 1fr; } .ec-hero { min-height: 400px; } }
@media (max-width: 640px) { .ec-hero { grid-template-columns: 1fr; padding: 28px 22px 0; } .ec-telefono { display: none; } .ec-pasos { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ec-telefono, .ec-qr-caja.esperando, .ec-escaneo, .ec-tel-barras i { animation: none; } }

/* modo oscuro */
body.oscuro .ec-panel, body.oscuro .ec-lista { background: #162032; border-color: rgba(148, 163, 184, .22); box-shadow: none; }
body.oscuro .ec-pasos li, body.oscuro .ec-reloj, body.oscuro .ec-celular { background: #1f2b40; }
body.oscuro .ec-pasos li.activo { background: color-mix(in srgb, var(--brand-color, #0d6efd) 26%, #0f172a); }
body.oscuro .ec-pasos li.listo { background: #064e3b; }
body.oscuro .ec-codigo, body.oscuro .ec-vacio, body.oscuro .ec-btn.suave { border-color: rgba(148, 163, 184, .3); }
body.oscuro .ec-btn { background: #1f2b40; color: #f1f5f9; }
body.oscuro .ec-btn.principal { background: var(--brand-color, #0d6efd); color: #fff; }
body.oscuro .ec-btn.peligro { background: rgba(248, 113, 113, .16); color: #fca5a5; }
body.oscuro .ec-celular-icono { background: rgba(96, 165, 250, .16); }
body.oscuro .ec-letras span { background: #f1f5f9; color: #0b1b3a; }

/* el texto de la tarjeta azul siempre es claro (los titulos globales lo pintaban oscuro en modo claro) */
.ec-shell .ec-hero h2, .ec-shell .ec-hero .ec-pildora, .ec-shell .ec-hero .ec-beneficios li { color: #fff !important; -webkit-text-fill-color: #fff; }
.ec-shell .ec-hero p { color: rgba(255, 255, 255, .84); }

.ec-instalando { margin: 0; max-width: 340px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--brand-color, #0d6efd) 10%, #fff); color: var(--pos-text, #172033); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; animation: ecEntra .3s ease; }
.ec-instalando b { display: block; margin-bottom: 2px; }
body.oscuro .ec-instalando { background: color-mix(in srgb, var(--brand-color, #0d6efd) 24%, #0f172a); color: #f1f5f9; }

.ec-web { margin: 0; text-align: center; color: var(--pos-muted, #687386); font-size: 12.5px; font-weight: 600; }
.ec-web .ec-enlace { font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ec-cuenta { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand-color, #0d6efd) 14%, transparent); color: var(--brand-color, #0d6efd); font-size: 13px; font-weight: 800; vertical-align: middle; }
.ec-activo { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 9px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 11.5px; font-weight: 800; }
.ec-activo i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: ecLatidoPunto 1.6s ease-in-out infinite; }
@keyframes ecLatidoPunto { 50% { opacity: .35; } }
body.oscuro .ec-activo { background: #064e3b; color: #a7f3d0; }
