/* ============================================================
   Cable Vision La Oroya — Portal de pago
   Tema dark neón. Mobile-first. Sin dependencias externas.
   ============================================================ */

:root {
    --bg-0:        #070a14;
    --bg-1:        #0a0e1a;
    --bg-2:        #0f1524;
    --bg-3:        #141b30;
    --border:      rgba(0, 245, 255, 0.12);
    --border-str:  rgba(0, 245, 255, 0.28);
    --text:        #e6edf8;
    --text-dim:    #9aa5bd;
    --text-muted:  #6a7590;

    --cyan:        #00f5ff;
    --green:       #00ff88;
    --purple:      #bf00ff;
    --yellow:      #ffd000;
    --pink:        #ff0080;

    --radius:      14px;
    --radius-sm:   10px;
    --shadow-neon: 0 0 0 1px rgba(0, 245, 255, 0.15),
                   0 10px 40px -12px rgba(0, 245, 255, 0.25),
                   0 0 60px -20px rgba(191, 0, 255, 0.2);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 245, 255, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 90%, rgba(191, 0, 255, 0.06), transparent 60%),
        linear-gradient(180deg, #070a14 0%, #0a0e1a 100%);
    background-attachment: fixed;
}

/* Grid sutil de fondo */
.cv-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

.cv-bg-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(0, 245, 255, 0.12), transparent 60%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Shell ---------- */

.cv-shell {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

@media (min-width: 720px) {
    .cv-shell {
        padding: 40px 24px 60px;
    }
}

/* ---------- Header ---------- */

.cv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cv-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.cv-brand-plaque {
    background: linear-gradient(135deg, #ffffff 0%, #f2f6ff 100%);
    padding: 14px 20px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 24px -6px rgba(0, 245, 255, 0.4),
        0 0 0 1px rgba(0, 245, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: box-shadow 0.25s ease;
}

.cv-brand-plaque:hover {
    box-shadow:
        0 6px 28px -6px rgba(0, 245, 255, 0.55),
        0 0 0 1px rgba(0, 245, 255, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.cv-brand-logo {
    max-height: 112px;
    width: auto;
    display: block;
}

@media (min-width: 720px) {
    .cv-brand-logo { max-height: 144px; }
}

.cv-brand-city {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
    padding: 5px 10px;
    border: 1px solid rgba(0, 245, 255, 0.25);
    border-radius: 999px;
    background: rgba(0, 245, 255, 0.05);
}

.cv-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 0, 128, 0.08);
    border: 1px solid rgba(255, 0, 128, 0.3);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pink);
    letter-spacing: 0.04em;
}

.cv-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--pink);
    box-shadow: 0 0 8px var(--pink);
    animation: cv-pulse 2s ease-in-out infinite;
}

@keyframes cv-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ---------- Hero ---------- */

.cv-hero {
    margin-bottom: 24px;
    text-align: left;
}

.cv-title {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

@media (min-width: 720px) {
    .cv-title { font-size: 34px; }
}

.cv-title-accent {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(0, 245, 255, 0.3);
}

.cv-subtitle {
    font-size: 15px;
    color: var(--text-dim);
    margin: 0;
    max-width: 52ch;
}

/* ---------- Card base ---------- */

.cv-card {
    position: relative;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-neon);
}

.cv-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.4), transparent 40%, rgba(191, 0, 255, 0.35));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

.cv-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cv-card-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- Cliente ---------- */

.cv-cliente-nombre {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    word-wrap: break-word;
}

.cv-cliente-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
}

.cv-cliente-meta > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cv-cliente-meta dt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.cv-cliente-meta dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Deuda ---------- */

.cv-card--deuda {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 208, 0, 0.08), transparent 70%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

.cv-monto {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0 18px;
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
}

.cv-monto-moneda {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-muted);
}

.cv-monto-valor {
    font-size: 48px;
    font-weight: 800;
    color: var(--yellow);
    text-shadow: 0 0 30px rgba(255, 208, 0, 0.35);
    letter-spacing: -0.02em;
    line-height: 1;
}

@media (min-width: 720px) {
    .cv-monto-valor { font-size: 56px; }
}

.cv-cuotas {
    list-style: none;
    margin: 16px 0 0;
    padding: 14px 0 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.cv-cuota {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.cv-cuota:last-child { border-bottom: 0; }

.cv-cuota-periodo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.cv-cuota-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--pink);
    box-shadow: 0 0 8px var(--pink);
    flex-shrink: 0;
}

.cv-cuota-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-align: right;
}

.cv-cuota-vence {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cv-cuota-monto {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
}

/* ---------- Medios de pago ---------- */

.cv-pagos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.cv-pago {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 16px 14px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.cv-pago:active { transform: scale(0.98); }

.cv-pago:hover,
.cv-pago:focus-visible {
    border-color: var(--border-str);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.08);
    outline: none;
}

/* CCI ocupa una fila completa (los 20 dígitos necesitan espacio). */
.cv-pago--cci {
    grid-column: 1 / -1;
}

.cv-pago-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.cv-pago-logo {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cv-pago-sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cv-pago-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
    line-height: 1.3;
}

/* El chip "Tocar para copiar" — prominente, con glow pulsante. */
.cv-pago-hint {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 6px 13px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    background: rgba(0, 245, 255, 0.06);
    border: 1px solid rgba(0, 245, 255, 0.32);
    border-radius: 999px;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.55);
    animation: cv-hint-pulse 2.8s ease-in-out infinite;
}

@keyframes cv-hint-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 245, 255, 0);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(0, 245, 255, 0.07),
            0 0 16px 2px rgba(0, 245, 255, 0.22);
    }
}

/* Colores del logo por marca */
.cv-pago--yape .cv-pago-logo { color: var(--purple); text-shadow: 0 0 12px rgba(191, 0, 255, 0.5); }
.cv-pago--plin .cv-pago-logo { color: var(--cyan);   text-shadow: 0 0 12px rgba(0, 245, 255, 0.5); }
.cv-pago--bcp  .cv-pago-logo { color: var(--yellow); text-shadow: 0 0 12px rgba(255, 208, 0, 0.5); }
.cv-pago--bbva .cv-pago-logo { color: var(--green);  text-shadow: 0 0 12px rgba(0, 255, 136, 0.5); }

/* Estado "copiado" — chip verde sin pulso */
.cv-pago--copied {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.12);
}
.cv-pago--copied .cv-pago-hint {
    color: var(--green);
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.5);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    animation: none;
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.3);
}

.cv-pagos-vacio {
    margin: 10px 0 0;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-dim);
    text-align: center;
}

.cv-titular {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    word-wrap: break-word;
}

.cv-titular strong {
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* ---------- Contacto / Oficinas ---------- */

.cv-contacto {
    margin: 20px 0;
    padding: 18px 16px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-neon);
    position: relative;
}

.cv-contacto::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(191, 0, 255, 0.35), transparent 50%, rgba(0, 245, 255, 0.3));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

.cv-contacto-header {
    margin-bottom: 8px;
    padding: 0 4px;
}

.cv-contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.cv-contacto-item:last-of-type {
    border-bottom: 0;
}

.cv-contacto-item--tel {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cv-contacto-item--tel:hover,
.cv-contacto-item--tel:focus-visible {
    background: rgba(0, 245, 255, 0.04);
    outline: none;
}

.cv-contacto-item--tel:active {
    background: rgba(0, 245, 255, 0.08);
}

.cv-contacto-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 245, 255, 0.08);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--cyan);
    box-shadow: 0 0 14px -4px rgba(0, 245, 255, 0.35);
}

.cv-contacto-item--oficina .cv-contacto-icon {
    background: rgba(191, 0, 255, 0.08);
    border-color: rgba(191, 0, 255, 0.3);
    color: var(--purple);
    box-shadow: 0 0 14px -4px rgba(191, 0, 255, 0.35);
}

.cv-contacto-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.cv-contacto-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cv-contacto-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    word-wrap: break-word;
}

.cv-contacto-detail {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    line-height: 1.45;
    word-wrap: break-word;
    margin-top: 2px;
}

.cv-contacto-item--tel .cv-contacto-value {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
    letter-spacing: 0.04em;
    font-size: 18px;
}

.cv-contacto-hint {
    margin: 14px 4px 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* ---------- CTA ---------- */

.cv-cta {
    margin: 24px 0 20px;
    text-align: center;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.cv-btn--wa {
    background: linear-gradient(135deg, #00ff88, #00c96b);
    color: #04120a;
    box-shadow:
        0 0 0 1px rgba(0, 255, 136, 0.4),
        0 10px 30px -8px rgba(0, 255, 136, 0.45),
        0 0 50px -10px rgba(0, 255, 136, 0.3);
}

.cv-btn--wa:hover,
.cv-btn--wa:focus-visible {
    filter: brightness(1.08);
    outline: none;
}

.cv-cta-nota {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Info / FAQ ---------- */

.cv-info {
    margin-top: 10px;
}

.cv-info details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
}

.cv-info details[open] {
    border-color: var(--border-str);
}

.cv-info summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cv-info summary::-webkit-details-marker { display: none; }

.cv-info summary::after {
    content: "+";
    font-size: 20px;
    color: var(--cyan);
    font-weight: 400;
    line-height: 1;
}

.cv-info details[open] summary::after { content: "−"; }

.cv-info details p {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ---------- Error view ---------- */

.cv-error {
    margin-top: 40px;
    text-align: center;
}

.cv-error .cv-title { text-align: center; }
.cv-error .cv-subtitle { margin: 0 auto 24px; text-align: center; }

/* ---------- Footer ---------- */

.cv-footer {
    position: relative;
    z-index: 1;
    padding: 24px 16px 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* ---------- Utilities ---------- */

.cv-mono {
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
    letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
