﻿html, body {
    height: 100vh;
    max-width:100vw;
    margin: 0;
    font-family: Inter;
    scroll-behavior: smooth;
}

#app {
    min-height: 100vh;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins-Bold';
    src: url('fonts/Inter_18pt-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes boot-move {
    0% {
        transform: translateX(-120%);
    }

    50% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(220%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

.no-text-cursor {
    cursor: default;
}

#inicio {
    scroll-margin-top: 0;
}

:root {
    --sf-primary: #0395e6;
    --sf-primary-2: #0395e6;
    --sf-background: #dfe8f2;
    --sf-secondary: #00C2CC;
    --sf-bg: #f4f7fb;
    --sf-surface: rgba(255,255,255,0.82);
    --sf-text: #334052;
    --sf-muted: #5f6b85;
    --sf-border: rgba(23, 41, 91, 0.12);
    --sf-shadow: 0 18px 50px rgba(18, 34, 74, 0.10);
    --sf-radius-xl: 28px;
    --sf-radius-lg: 20px;
    --sf-radius-md: 14px;
    /* Tamaño A4 a 96dpi (793 x 1122 px aprox.) */
    --a4-width: 793px;
    --a4-height: 1122px;
    --fe-topbar-h: 62px;
    --fe-panel-w: 320px;
    --fe-gap: 20px;
}

/* =====================
   BOOT LOADING
   ===================== */
.boot-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-family: Inter, Arial, sans-serif;
    z-index: 999999;
}

.boot-logo2 {
    height: 8vh;
    width: auto;
    object-fit: contain;
}

.boot-logo {
    height: 11vh;
    width: auto;
    object-fit: contain;
}

.boot-bar {
    width: min(360px, 78vw);
    height: 10px;
    border-radius: 999px;
    background: rgba(23, 41, 91, 0.12);
    overflow: hidden;
    border: 1px solid rgba(23, 41, 91, 0.18);
}

.boot-bar-fill {
    height: 100%;
    width: 42%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6ec1e4, #04acfc);
    animation: boot-move 1.2s ease-in-out infinite;
}

.boot-text {
    font-size: 14px;
    color: var(--sf-primary);
    opacity: 0.85;
    letter-spacing: 0.2px;
}

/* =====================
   LANDING
   ===================== */
.landing-page {
    height: auto;
    background-color: var(--sf-background);
    color: var(--sf-text);
    overflow: hidden;
    padding-left: 10vh;
    padding-right: 10vh;
}

.container {
    width: auto;
    margin: 0 auto;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 340px;
    height: 340px;
    top: -60px;
    left: -80px;
    background: rgba(0, 194, 204, 0.13);
}

.orb-2 {
    width: 360px;
    height: 360px;
    top: 120px;
    right: -100px;
    background: rgba(23, 41, 91, 0.10);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(23, 41, 91, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 41, 91, 0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.indece-landing {
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    margin-right: 20px;
    padding: 10px;
    transition: color 0.5s ease;
    animation: fadeIn 1s ease-in-out;
}

.landing-header {
    position: sticky;
    top: 0;
    align-content: center;
    text-align:center;
    z-index: 9999;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.65);
    border-bottom: 1px solid rgba(23, 41, 91, 0.08);
}

.landing-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    gap: 0px;
    position: relative;
    z-index: 2;
}

.brand {
    margin: 2vh;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-2) 100%);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(23, 41, 91, 0.20);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--sf-primary);
}

.brand-subtitle {
    font-size: .78rem;
    color: var(--sf-muted);
}

.landing-nav {
    display: flex;
    align-items: end;
    gap: 24px;
}

    .landing-nav a {
        text-decoration: none;
        color: var(--sf-muted);
        font-weight: 600;
        transition: .2s ease;
    }

        .landing-nav a:hover {
            color: var(--sf-primary);
        }

.landing-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 40px;
}

.hero-section {
    position: relative;
    z-index: 1;
    padding: 50px 0 0;
}

.hero-content {
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(23, 41, 91, 0.08);
    color: var(--sf-primary);
    border: 1px solid rgba(23, 41, 91, 0.08);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 26px;
}

.hero-title {
    margin: 0;
    font-size: clamp(2rem, 3.5vw, 4.5rem);
    line-height: .98;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--sf-text);
}

    .hero-title span {
        display: block;
        color: var(--sf-primary-2);
    }

.home {
    max-width: 100vw ;
    height: auto;
}

.hero-subtitle {
    max-width: 720px;
    margin: 24px auto 0;
    font-size: 1.18rem;
    line-height: 1.7;
    color: var(--sf-muted);
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-card {
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
}

    .upload-card.dragover,
    .upload-card.drag-active {
        border-color: #00C2CC;
        background: rgba(0, 194, 204, 0.08);
        transform: scale(1.01);
        box-shadow: 0 18px 40px rgba(0, 194, 204, 0.12);
    }

    .upload-card.upload-disabled {
        opacity: 0.72;
        pointer-events: none;
    }

.upload-hidden-input {
    display: none;
}

.upload-file-name {
    margin-top: 18px;
    font-size: 0.98rem;
    color: var(--sf-primary);
    word-break: break-word;
}

.upload-status {
    margin-top: 14px;
    color: var(--sf-primary);
    font-weight: 600;
}

.upload-error {
    margin-top: 14px;
    color: #c62828;
    font-weight: 600;
}

.upload-card-action {
    margin-top: 22px;
}

.upload-card-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.upload-card {
    width: min(100%, 760px);
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(8px);
    border: 2px dashed rgba(23, 41, 91, 0.18);
    border-radius: 28px;
    padding: 48px 24px;
    box-shadow: var(--sf-shadow);
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
}

    .upload-card:hover {
        border: 2px dashed var(--sf-primary);
    }

    .upload-card::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
    }

.upload-icon-box {
    width: 74px;
    height: 74px;
    margin: 0 auto 22px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-2) 100%);
    color: white;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 34px;
    height: 34px;
}

.upload-card h3 {
    font-size: 2rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.upload-card-subtitle {
    margin-top: 10px;
    color: var(--sf-muted);
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.upload-mini-meta {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #6b7894;
    font-size: .96rem;
    position: relative;
    z-index: 1;
}

.upload-card-action {
    margin-top: 26px;
    position: relative;
    z-index: 1;
}

.hero-trust-points {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
    color: var(--sf-muted);
    font-weight: 500;
}

.trust-item {
    background: rgba(255,255,255,0.56);
    border: 1px solid rgba(23, 41, 91, 0.08);
    padding: 12px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(23, 41, 91, 0.05);
}

.steps-section {
    padding: 48px 0 64px;
    position: relative;
    z-index: 1;
}

.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 34px;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--sf-primary);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .82rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--sf-text);
}

.section-heading p {
    margin-top: 14px;
    color: var(--sf-muted);
    font-size: 1.06rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.step-card {
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(23, 41, 91, 0.08);
    border-radius: 24px;
    padding: 30px 22px;
    text-align: center;
    box-shadow: none;
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}

    .step-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 36px rgba(23, 41, 91, 0.10);
    }

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-2) 100%);
    color: white;
    font-size: 1.7rem;
    font-weight: 800;
    box-shadow: none;
}

.step-card h3 {
    margin: 0 0 10px;
    font-size: 1.55rem;
}

.step-card p {
    margin: 0;
    color: var(--sf-muted);
    line-height: 1.6;
}

.cta-section {
    padding: 0 0 72px;
    position: relative;
    z-index: 1;
}

.cta-card {
    background: linear-gradient(135deg, rgba(23,41,91,.95) 0%, rgba(36,61,131,.95) 100%);
    border-radius: 30px;
    padding: 34px 32px;
    color: white;
    box-shadow: 0 24px 50px rgba(23, 41, 91, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

    .cta-card h2 {
        margin: 8px 0 8px;
        font-size: clamp(1.8rem, 3vw, 2.5rem);
    }

    .cta-card p {
        margin: 0;
        color: rgba(255,255,255,.78);
    }

.landing-footer {
    border-top: 1px solid rgba(23, 41, 91, 0.08);
    padding: 22px 0;
    text-align: center;
    color: var(--sf-muted);
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.35);
}

/* =====================
   BOTONES GLOBALES
   ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
    font-weight: 700;
}

.btn-lg {
    min-height: 52px;
    padding: 0 22px;
    font-size: 1rem;
}

.btn-dark-primary {
    background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-2) 100%);
    color: white;
    min-height: 46px;
    padding: 0 18px;
}

    .btn-dark-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 28px rgba(23, 41, 91, 0.24);
        color: white;
    }

.btn-soft {
    background: rgba(255,255,255,0.72);
    color: var(--sf-primary);
    border: 1px solid rgba(23, 41, 91, 0.10);
    min-height: 46px;
    padding: 0 18px;
}

    .btn-soft:hover {
        background: white;
        color: var(--sf-primary);
    }

/* =====================
   LANDING RESPONSIVE
   ===================== */
@media (max-width: 991.98px) {
    .landing-header-inner {
        min-height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
    }

    .landing-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .cta-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {


    .brand {
        margin: 0.5vh;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .landing-header {
        display: none;
    }

    .landing-page {
        height: auto;
        background-color: var(--sf-background);
        color: var(--sf-text);
        overflow: hidden;
        padding-left: 2vh !important;
        padding-right: 2vh !important;
    }

    .home {
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .indece-landing {
        display: none;
    }

    .hero-section {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .upload-card {
        padding: 36px 18px;
        border-radius: 22px;
    }

        .upload-card h3 {
            font-size: 1.55rem;
        }

    .upload-mini-meta {
        font-size: .88rem;
        gap: 8px;
    }

    .hero-trust-points {
        gap: 12px;
    }

    .trust-item {
        width: 100%;
        text-align: center;
    }

    .brand-subtitle {
        display: none;
    }
}

/* =====================
   FIRMADOR EDITOR — PAGE
   ===================== */
.fe-page {
    min-height: 100vh;
    background-color: var(--sf-background);
    color: #0f172a;
}

.fe-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(23, 41, 91, 0.08);
    min-height: var(--fe-topbar-h);
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(23, 41, 91, 0.05);
}

.fe-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fe-topbar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-width: 0;
}

.fe-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

/* Bloque opcional para branding/título */
.fe-brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fe-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--sf-primary);
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: none;
    flex: 0 0 auto;
}

    .fe-brand-mark i {
        font-size: 1rem;
    }

.fe-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.05;
    min-width: 0;
}

.fe-brand-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--sf-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-brand-subtitle {
    font-size: 0.76rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nombre del archivo en topbar */
.fe-doc-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--sf-primary);
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compatibilidad con clases antiguas usadas en el Razor */
.fe-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fe-center {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    min-width: 0;
}

.fe-right {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
    margin-left: auto;
}

.fe-doc-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.fe-title {
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--sf-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-sub {
    font-size: 0.78rem;
    color: var(--sf-text);
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================
   BOTONES TOPBAR
   ===================== */
.fe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

    .fe-btn:hover {
        transform: translateY(-1px);
    }

    .fe-btn i {
        font-size: 0.95rem;
    }

.fe-btn-light {
    background: rgba(23, 41, 91, 0.07);
    color: var(--sf-primary);
    border: 1px solid rgba(23, 41, 91, 0.10);
}

    .fe-btn-light:hover {
        background: rgba(23, 41, 91, 0.12);
    }

.fe-btn-primary {
    background: var(--sf-primary);
    color: white;
    box-shadow: none;
}

    .fe-btn-primary:hover {
        box-shadow: none;
    }

.fe-btn-icon {
    width: 38px;
    min-width: 38px;
    padding: 0;
}

/* Pills de página/zoom */
.fe-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(23, 41, 91, 0.10);
    border-radius: 999px;
    color: var(--sf-text);
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: 0 4px 12px rgba(23, 41, 91, 0.06);
}

.fe-icon {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(23, 41, 91, 0.08);
    color: var(--sf-text);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .fe-icon:hover {
        background: rgba(23, 41, 91, 0.14);
    }

    .fe-icon:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

/* BODY */
.fe-body {
    display: block;
    min-height: auto;
    --fe-panel-space: calc(var(--fe-panel-w) + var(--fe-gap));
}

    .fe-body.collapsed {
        --fe-panel-space: 0px;
    }

/* VIEWER */
.fe-viewer {
    padding: calc(var(--fe-topbar-h) + 20px) calc(var(--fe-panel-space) + var(--fe-gap)) 20px 20px;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    display: block;
}

/* MARCO VISUAL */
.fe-canvas {
    width: 100%;
    min-height: 87vh;
    height: auto;
    background: linear-gradient(rgba(23, 41, 91, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 41, 91, 0.022) 1px, transparent 1px);
    background-size: 28px 28px;
    background-color: rgba(255, 255, 255, 0.50);
    border: 1px solid rgba(23, 41, 91, 0.08);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(23, 41, 91, 0.07);
    padding: 24px;
    box-sizing: border-box;
    overflow: visible;
}

/* SCROLL REAL DEL PDF */
.fe-pdf-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}


/* STAGE */
.fe-pdf-stage {
    min-width: 100%;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* PAGE */
.fe-page-mock {
    position: relative;
    flex: 0 0 auto;
    width: auto;
}

.fe-panel {
    position: fixed;
    top: var(--fe-topbar-h);
    right: 0;
    bottom: 0;
    width: var(--fe-panel-w);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(14px);
    border-left: 1px solid rgba(23, 41, 91, 0.08);
    padding: 16px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 35;
}

.fe-body.collapsed .fe-panel {
    display: none;
}

.fe-page-label {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(230, 240, 250, 1);
    color: var(--sf-primary);
    font-weight: 700;
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 2;
}

.fe-pdf-canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(23, 41, 91, 0.14);
}

.fe-pdf-overlay {
    position: absolute;
    inset: 0;
    touch-action: none;
    cursor: crosshair;
}

/* =====================
   ESTAMPADO BASE
   ===================== */
.fe-stamp {
    position: absolute;
    overflow: hidden;
    user-select: none;
    background: transparent !important;
    box-sizing: border-box;
    container-type: size;
}

    .fe-stamp.placed {
        cursor: grab;
    }

        .fe-stamp.placed.dragging {
            cursor: grabbing;
        }

    .fe-stamp.hover-preview {
        opacity: 0.5;
        pointer-events: none;
        border: 2px dashed #94a3b8;
        border-radius: 0px;
        display: grid;
        place-items: center;
        color: #64748b;
        background: rgba(255,255,255,0.35);
        font-size: 10%;
    }

    /* =====================
   ESTILO: firmaec_like
   ===================== */
    .fe-stamp.firmaec_like {
        border: 1px solid rgba(0,0,0,0.2) !important;
        border-radius: 0;
        background: none !important;
        padding: 0.5%;
        color: #000;
    }

.fe-stamp-firmaec {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 40% 1fr;
    column-gap: 1%;
    align-items: stretch;
    box-sizing: border-box;
}


    .fe-stamp-firmaec .fe-stamp-qr {
        width: 100%;
        height: 100%;
        object-fit: contain;
        align-self: center;
        justify-self: stretch;
        border-radius: 0;
    }

    .fe-stamp-firmaec .fe-stamp-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1%;
        min-width: 0;
        line-height: 1.02;
    }

        .fe-stamp-firmaec .fe-stamp-info span {
            font-size: 18cqh !important;
            color: #000;
            font-weight: 900;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .fe-stamp-firmaec .fe-stamp-info .fe-stamp-info-fec {
            font-size: 10cqh !important;
            font-weight: 400;
            color: #000;
            line-height: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
/* =====================
   ESTILO: premium
   ===================== */
.fe-stamp.premium,
.fe-stamp.placed.premium {
    overflow: hidden;
    background: #fff !important;
    border-radius: 0;
    box-sizing: border-box;
    color: var(--stamp-color, #17295B);
}

.fe-stamp-premium {
    width: 100%;
    height: 100%;
    border: 1px solid var(--c1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 1%;
    background: #fff;
    color: inherit;
    font-family: Arial, Helvetica, sans-serif;
}

.fe-stamp-premium-main {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 30% 40% 2% 24%;
    align-items: stretch;
    column-gap: 1%;
    min-height: 0;
}

.fe-stamp-premium.no-logo .fe-stamp-premium-main {
    grid-template-columns: 30% 70%;
}

.fe-stamp-premium .fe-stamp-qr {
    width: 100%;
    height: 85%;
    object-fit: contain;
    align-self: stretch;
    justify-self: stretch;
    border-radius: 0;
    margin: 0;
}

.fe-stamp-premium-text {
    display: flex;
    flex-direction: column;
    justify-content: start;
    min-width: 0;
    padding-left: 0%;
    padding-top: 3%;
    line-height: 1;
}

.fe-stamp-label {
    font-size: 14cqh !important;
    line-height: 1.02;
    color: var(--c2);
    font-weight: 500;
    margin-bottom: 1.5%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-stamp-name {
    font-size: 18cqh !important;
    line-height: 1;
    font-weight: 700;
    color: var(--c1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-stamp-divider {
    width: 100%;
    height: 100%;
    align-self: stretch;
    justify-self: center;
    background: var(--c2, black);
    opacity: 0.9;
    border-radius: 2px;
}

.fe-stamp-logo-wrap {
    width: 90%;
    height: 90%;
    min-width: 0;
    display: flex;
    align-self: center;
    justify-self: center;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fe-stamp-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.fe-stamp-footer {
    flex: 0 0 auto;
    color: var(--c2);
    font-size: 12cqh !important;
    line-height: 1.02;
    font-weight: 500;
    padding-left: 3%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-stamp-divider {
    width: 1px;
    background: var(--c2,black) !important;
    margin: 2px 0px;
    border-radius: 2px;
    align-self: stretch;
}

.fe-stamp-premium-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 1px;
    gap: 1px;
    flex: 1;
}

.fe-stamp-firmado {
    color: var(--c2) !important;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.fe-stamp-nombre,
.fe-stamp-apellido {
    font-weight: 600;
    color: var(--c1, #17295B);
    line-height: 1;
    white-space: nowrap;
}

@media (hover: none) and (pointer: coarse) {
    .fe-stamp.hover-preview {
        display: none !important;
    }
}

/* =====================
   PANEL LATERAL
   ===================== */
.fe-panel {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(14px);
    border-left: 1px solid rgba(23, 41, 91, 0.08);
    padding: 16px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    box-sizing: border-box;
    border-radius: 20px;
    margin: 20px;
}

.fe-body.collapsed .fe-panel {
    display: none;
}

.fe-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 2px 14px;
    border-bottom: 1px solid rgba(23, 41, 91, 0.08);
}

    .fe-panel-header h3 {
        margin: 0 0 4px;
        color: var(--sf-primary);
        font-size: 1rem;
        font-weight: 800;
    }

    .fe-panel-header p {
        margin: 0;
        color: #64748b;
        font-size: 0.8rem;
        line-height: 1.45;
    }

/* Grupos del panel */
.fe-group {
    margin-bottom: 16px;
}

    .fe-group > p,
    .fe-group > label {
        display: block;
        margin: 0 0 6px;
        color: var(--sf-text);
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

.fe-range-value {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--sf-muted);
    font-weight: 700;
}

/* Select e inputs */
.fe-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(23, 41, 91, 0.14);
    border-radius: 12px;
    padding: 4px;
    background: white;
    color: #0f172a;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .fe-input:focus {
        border-color: rgba(23, 41, 91, 0.30);
        box-shadow: 0 0 0 3px rgba(23, 41, 91, 0.07);
    }

.fe-group input[type="range"] {
    width: 100%;
    accent-color: #17295B;
    margin-top: 1px;
}

/* Colores: fila de 2 circulares */
.fe-color-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fe-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    color: var(--sf-muted);
    font-weight: 600;
}

.fe-color-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(23, 41, 91, 0.14);
    background: white;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

    .fe-color-circle::-webkit-color-swatch-wrapper {
        padding: 0;
        border-radius: 50%;
    }

    .fe-color-circle::-webkit-color-swatch {
        border: none;
        border-radius: 50%;
    }

    .fe-color-circle::-moz-color-swatch {
        border: none;
        border-radius: 50%;
    }

    .fe-color-circle:hover {
        transform: scale(1.12);
        box-shadow: 0 4px 14px rgba(23, 41, 91, 0.18);
    }

/* Botón subir logo */
.fe-upload {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    text-align: center;
    background: var(--sf-primary);
    color: white  !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: 0.18s ease;
    box-sizing: border-box;
}

    .fe-upload:hover {
        transform: translateY(-1px);
    }

    .fe-upload i {
        font-size: 1rem;
    }

.fe-file {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(23, 41, 91, 0.06);
    color: var(--sf-primary);
    font-weight: 600;
    font-size: 0.84rem;
    word-break: break-word;
}

    .fe-file button {
        width: 26px;
        height: 26px;
        border: none;
        border-radius: 999px;
        background: rgba(23, 41, 91, 0.10);
        color: var(--sf-primary);
        cursor: pointer;
        flex: 0 0 auto;
        font-size: 0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
    }
    .fe-file span {
        text-align: left !important;
        font-weight: 400 !important;
    }

        .fe-file button:hover {
            background: rgba(23, 41, 91, 0.18);
        }

/* Opciones deshabilitadas cuando estilo es firmaec_like */
.fe-options-disabled {
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
}

/* =====================
   UTILS
   ===================== */
.hidden {
    display: none;
}

.fe-mobile-bar,
.fe-sheet,
.fe-sheet-back {
    display: none;
}

.fe-desktop-only {
    display: inline-flex;
}



/* =====================
   MODAL FIRMA
   ===================== */
.fe-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.40);
    z-index: 90;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.18s ease;
}

.fe-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(480px, calc(100vw - 24px));
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: 1px solid rgba(23, 41, 91, 0.10);
    border-radius: 20px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
    z-index: 91;
    overflow: hidden;
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.fe-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(23, 41, 91, 0.07);
    background: linear-gradient(135deg, rgba(23,41,91,0.03) 0%, rgba(0,194,204,0.03) 100%);
}

    .fe-modal-header h3 {
        margin: 0 0 3px;
        color: var(--sf-primary);
        font-size: 1.05rem;
        font-weight: 800;
    }

    .fe-modal-header p {
        margin: 0;
        color: #64748b;
        font-size: 0.84rem;
    }

.fe-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(23, 41, 91, 0.07);
    color: var(--sf-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    transition: background 0.15s;
}

    .fe-modal-close:hover {
        background: rgba(23, 41, 91, 0.13);
    }

.fe-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-x: hidden;
}

    .fe-modal-body .fe-group {
        margin-bottom: 0;
    }

/* Input de contraseña con ojo */
.fe-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .fe-password-wrap .fe-input {
        padding: 14px !important;
    }

.fe-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: color 0.15s;
    padding: 0;
}

    .fe-password-toggle:hover {
        color: var(--sf-muted);
    }

.fe-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(23, 41, 91, 0.07);
}

.fe-modal-error {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.07);
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.87rem;
    border-left: 3px solid #dc2626;
}

.fe-modal-status {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(23, 41, 91, 0.07);
    color: var(--sf-primary);
    font-weight: 600;
    font-size: 0.87rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================
   RESPONSIVE — TABLET / MÓVIL
   ===================== */
@media (max-width: 1100px) {



    .fe-body {
        display: grid;
        grid-template-columns: 1fr;
        min-height: auto;
        --fe-panel-space: 0px;
    }

    .fe-panel {
        display: none;
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        width: auto;
        height: auto;
    }

    .fe-viewer {
        padding: 10px;
        height: calc(100vh - 120px);
        display: flex;
        align-items: stretch;
    }

    .fe-canvas {
        flex: 1;
        display: flex;
        padding: 10px;
        border-radius: 18px;
        overflow: hidden;
    }

    .fe-pdf-scroll {
        width: 100%;
        height: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .fe-pdf-stage {
        min-width: max-content;
        min-height: 100%;
        display: flex;
        justify-content: flex-start !important;
        align-items: flex-start;
    }

    /* En móvil/tablet el topbar no muestra pills */
    .fe-topbar-center {
        display: none;
    }

    .fe-pill {
        display: inline-flex;
    }

    /* Barra inferior móvil */
    .fe-mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        background: rgba(15, 23, 42, 0.94);
        backdrop-filter: blur(14px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

        .fe-mobile-bar button {
            min-height: 40px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.09);
            color: white;
            font-size: 0.76rem;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.15s, transform 0.15s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

            .fe-mobile-bar button:hover {
                background: rgba(255,255,255,0.15);
            }

            .fe-mobile-bar button.active {
                background: var(--sf-primary);
                box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
            }

    .fe-sheet-back {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 900; /* ← debajo de la barra */
    }

    .fe-sheet {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(56px + env(safe-area-inset-bottom));
        z-index: 70;
        background: rgba(255, 255, 255, 0.99);
        box-shadow: 0 -16px 36px rgba(15, 23, 42, 0.16);
        padding: 10px 14px 14px;
        max-height: 58vh;
        overflow: auto;
        border-radius: 20px 20px 0 0;
    }

    .fe-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(23, 41, 91, 0.08);
    }

        .fe-sheet-head b {
            color: var(--sf-primary);
            text-transform: capitalize;
            font-size: 0.96rem;
        }

        .fe-sheet-head button {
            min-height: 32px;
            padding: 0 12px;
            border: none;
            border-radius: 8px;
            background: rgba(23, 41, 91, 0.08);
            color: var(--sf-primary);
            font-weight: 700;
            cursor: pointer;
        }

    .fe-sheet .fe-group {
        margin-bottom: 12px;
    }

    .fe-sheet .row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .fe-sheet .row button {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            background: rgba(23, 41, 91, 0.08);
            color: var(--sf-primary);
            font-size: 1rem;
            font-weight: 800;
            cursor: pointer;
        }

        .fe-sheet .row span {
            min-width: 60px;
            text-align: center;
            font-weight: 800;
            color: var(--sf-primary);
        }

    .fe-desktop-only {
        display: none;
    }

    .fe-pdf-stage {
        min-width: max-content;
        min-height: 100%;
        display: flex;
        justify-content: flex-start !important;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .fe-page {
        margin-top:60px;
        padding-bottom: 88px;
    }

    .hero-section {
        padding-top: 50px;
    }

    .fe-topbar {
        grid-template-columns: 1fr auto;
        padding: 8px 12px;
        min-height: 54px;
        gap: 10px;
    }

    .fe-topbar-center {
        display: none !important;
    }

    .fe-topbar-left {
        min-width: 0;
        overflow: hidden;
    }

    .fe-topbar-right {
        margin-left: auto;
    }

    .fe-doc-name {
        max-width: 140px;
        font-size: 0.84rem;
    }

    .fe-title,
    .fe-brand-title {
        font-size: 0.88rem;
    }

    .fe-sub,
    .fe-brand-subtitle {
        font-size: 0.72rem;
        max-width: 130px;
    }

    .fe-viewer {
        height: calc(100vh - 108px);
        padding: 8px;
    }

    /* Más bajo el container cuadriculado en móvil */
    .fe-canvas {
        min-height: calc(100vh - 180px);
        max-height: calc(100vh - 180px);
        padding: 8px;
        border-radius: 16px;
    }

    .fe-modal {
        width: 90%;
        border-radius: 16px;
    }

    .fe-modal-footer {
        flex-direction: column;
    }

        .fe-modal-footer .fe-btn {
            width: 100%;
            justify-content: center;
        }
}
/* =====================
   MODAL FIRMA - PASO ELECCIÓN
   ===================== */

.fe-choice-card {
    width: 100%;
    border: 1px solid rgba(23, 41, 91, 0.10);
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

    .fe-choice-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(23, 41, 91, 0.10);
        border-color: rgba(23, 41, 91, 0.18);
    }

.fe-choice-card-buy {
    background: linear-gradient(135deg, rgba(0,194,204,0.08) 0%, rgba(255,255,255,1) 100%);
}

.fe-choice-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--sf-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.fe-choice-card-buy .fe-choice-card-icon {
    background: rgba(0, 194, 204, 0.8);
    color: white;
}

.fe-choice-card-content {
    flex: 1;
    min-width: 0;
}

    .fe-choice-card-content h4 {
        margin: 0 0 6px;
        font-size: 1.02rem;
        font-weight: 600;
        color: var(--sf-primary);
    }

    .fe-choice-card-content p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.45;
        color: #243d83;
    }

.fe-choice-card-arrow {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .fe-choice-card {
        padding: 15px 14px;
        border-radius: 16px;
        gap: 12px;
    }

    .fe-choice-card-icon {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        font-size: 1.05rem;
    }

    .fe-choice-card-content h4 {
        font-size: 0.95rem;
    }

    .fe-choice-card-content p {
        font-size: 0.84rem;
    }
}

/* =====================
   CARD COMPRA (MEJORADA)
   ===================== */

.fe-choice-card-buy {
    background: linear-gradient(135deg, rgba(0,194,204,0.20) 0%, rgba(0,194,204,0.10) 100%);
    border: 1px solid rgba(0, 194, 204, 0.25);
    position: relative;
    overflow: hidden;
}

    /* Glow suave de fondo */
    .fe-choice-card-buy::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(-45, rgba(0,194,204,0.15), transparent 40%);
        pointer-events: none;
    }

    /* Hover más llamativo */
    .fe-choice-card-buy:hover {
        border-color: rgba(0, 194, 204, 0.45);
        transform: translateY(-2px);
    }

/* Ícono más destacado */
.fe-choice-card-icon-buy {
    background: linear-gradient(135deg, #00C2CC 0%, #0fa3b1 100%);
    color: white;
    box-shadow: 0 8px 18px rgba(0, 194, 204, 0.25);
}

/* Precio tipo CTA */
.fe-choice-price {
    margin-top: 10px;
    display: inline-block;
    background: linear-gradient(135deg, #00C2CC 0%, #0fa3b1 100%);
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(0, 194, 204, 0.25);
    letter-spacing: -0.01em;
}

/* Texto más fuerte */
.fe-choice-card-buy h4 {
    font-size: 1.05rem;
}

/* Arrow más visible */
.fe-choice-card-buy .fe-choice-card-arrow {
    color: #00A8B2;
    font-size: 1.1rem;
}
.fe-page-input {
    width: 58px;
    height: 32px;
    border: 1px solid rgba(23, 41, 91, 0.12);
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    color: var(--sf-primary);
    background: #fff;
    outline: none;
    padding: 0 6px;
    box-sizing: border-box;
}

    .fe-page-input:focus {
        border-color: rgba(23, 41, 91, 0.28);
        box-shadow: 0 0 0 3px rgba(23, 41, 91, 0.07);
    }

.buy-page {
    min-height: 100vh;
    background-color: var(--sf-background);
    padding: 42px 16px 56px;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
    font-weight: 200;
    color: #243b63;
}

.buy-shell {
    max-width: 760px;
    margin: 0 auto;
}

.buy-header {
    text-align: center;
    margin-bottom: 26px;
}

    .buy-header h2 {
        margin: 0 0 8px;
        font-size: clamp(1.25rem, 2vw, 3rem);
        line-height: 1.05;
        font-weight: 800;
        letter-spacing: -0.03em;
        color: #243b63;
    }

    .buy-header p {
        margin: 0 auto;
        max-width: 620px;
        font-size: 1rem;
        line-height: 1.55;
        color: #5f7393;
    }

.buy-card {
    width: min(100%, 630px);
    margin: 0 auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 28px 22px 26px;
    box-sizing: border-box;
    box-shadow: 0 6px 20px rgba(36, 59, 99, 0.06);
}

.buy-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
}

.buy-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    min-width: 0;
}

.buy-field-half {
    grid-column: span 1;
}

.buy-field-full {
    grid-column: 1 / -1;
}

    .buy-field label {
        font-size: 0.9rem;
        font-weight: 700;
        color: #243b63;
    }

.buy-input {
    width: 100%;
    min-height: 40px;
    border-radius: 9px;
    border: 1px solid #b8c6da;
    background: #ffffff;
    padding: 0 14px;
    box-sizing: border-box;
    outline: none;
    font-size: 0.98rem;
    color: #354a6d;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: Inter, Arial, sans-serif;
}

    .buy-input::placeholder {
        color: #6a7f9f;
    }

    .buy-input:focus {
        border-color: #8fa7c8;
        box-shadow: 0 0 0 3px rgba(143, 167, 200, 0.14);
    }

.buy-help {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #6b7d98;
}

.buy-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d7e0ec;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(36, 59, 99, 0.10);
    padding: 6px;
    z-index: 30;
    max-height: 220px;
    overflow: auto;
}

.buy-suggestion {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 12px;
    text-align: left;
    border-radius: 8px;
    font-size: 0.94rem;
    font-weight: 500;
    color: #314867;
    cursor: pointer;
    font-family: Inter, Arial, sans-serif;
}

    .buy-suggestion:hover {
        background: #eef4fb;
    }

.buy-summary {
    margin-top: 4px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e0e7f0;
    overflow: hidden;
}

.buy-summary-row {
    display: grid;
    grid-template-columns: 165px 1fr;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid #e6edf5;
    align-items: start;
}

    .buy-summary-row:last-child {
        border-bottom: none;
    }

.buy-summary-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #667a99;
    text-transform: uppercase;
}

.buy-summary-value {
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.5;
    color: #243b63;
    word-break: break-word;
}

.buy-alert {
    width: min(100%, 630px);
    margin: 0 auto 16px;
    border-radius: 14px;
    padding: 12px 14px;
    box-sizing: border-box;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.buy-alert-error {
    background: #fff3f3;
    color: #b42318;
    border: 1px solid #f4c7c7;
}

.buy-actions {
    width: min(100%, 630px);
    margin: 22px auto 0;
}

.buy-btn-primary {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 8px;
    background: #0395e6;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease;
    font-family: Inter, Arial, sans-serif;
}

    .buy-btn-primary:hover:not(:disabled) {
        filter: brightness(0.98);
        transform: translateY(-1px);
    }

    .buy-btn-primary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

@media (max-width: 768px) {

    .buy-icon {
        display: none !important;
    }

    .buy-input {
        min-height: 35px;
        border-radius: 9px;
        border: 1px solid #b8c6da;
        background: #ffffff;
        padding: 0 12px;
        box-sizing: border-box;
        outline: none;
        font-size: 0.8rem;
        color: #354a6d;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
        font-family: Inter, Arial, sans-serif;
    }

    .buy-page {
        padding: 28px 12px 36px;
    }

    .buy-btn-primary {
        min-height: 38px;
    }

    .buy-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .buy-field-half,
    .buy-field-full {
        grid-column: 1 / -1;
    }

    .buy-field label {
        font-size: 0.8rem;
    }

    .buy-header {
        margin-bottom: 20px;
    }

        .buy-header h1 {
            font-size: 2rem;
        }

        .buy-header p {
            font-size: 0.94rem;
        }

    .buy-card {
        width: min(100%, 630px);
        margin: 0 auto;
        background: #ffffff;
        border-radius: 18px;
        padding: 20px 14px 18px;
        box-sizing: border-box;
        box-shadow: 0 6px 20px rgba(36, 59, 99, 0.06);
    }

    .buy-summary-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 14px;
    }

    .buy-summary-label {
        font-size: 0.76rem;
    }

    .buy-summary-value {
        font-size: 0.92rem;
    }
}

.buy-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #0395e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .buy-icon i {
        font-size: 30px;
        color: white;
    }
.fe-modal-sign-compact {
    width: min(720px, calc(100vw - 24px));
    border-radius: 24px;
    overflow: hidden;
}

.fe-modal-header-sign-compact {
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.fe-sign-hero-compact {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-right: 40px;
}

.fe-sign-hero-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

.fe-sign-hero-text p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.45;
    color: #64748b;
}

.fe-modal-body-sign-compact {
    padding: 16px 20px 14px;
}

.fe-sign-layout {
    gap: 14px;
    align-items: stretch;
}

    .fe-sign-layout.single {
        grid-template-columns: 1fr;
        
    }
        .fe-sign-layout.single .fe-sign-card-main {
            max-width: 100%;
        }

.fe-sign-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.fe-sign-card-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.fe-sign-hero-icon {
    height: 65px;
    width: 65px;
    background: rgba(23, 41, 91, 0.08);
    border-radius: 18px;
    align-content: center;
    text-align: center;
    font-size: 1.7rem;
    color: var(--sf-text);
}

.fe-sign-card-buy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(3,149,230,0.15);
    margin-bottom: 20px;
}

.fe-sign-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .fe-sign-card-head h4 {
        margin: 0 0 4px 0;
        font-size: 0.98rem;
        font-weight: 700;
        color: var(--sf-primary);
    }

    .fe-sign-card-head p {
        margin: 0;
        font-size: 0.87rem;
        line-height: 1.4;
        color: #64748b;
    }

.fe-sign-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(23, 41, 91, 0.08);
    color: #17295B;
    flex: 0 0 42px;
    font-size: 1.1rem;
}

.fe-sign-card-icon-buy {
    background: var(--sf-primary);
    color: white;
}

.fe-group-tight {
    margin: 0;
}

    .fe-group-tight label {
        display: block;
        margin-bottom: 6px;
        font-size: 0.84rem;
        font-weight: 600;
        color: #334155;
    }

.fe-upload-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 14px;
    border: none;
    background: var(--sf-primary);
    color: white !important;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.fe-file-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.fe-file-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

    .fe-file-main span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.fe-file-modern button {
    border: 0;
    background: transparent;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
}

.fe-sign-buy-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.fe-sign-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.fe-sign-price-label {
    font-size: 0.82rem;
    color: var(--sf-primary);
}

.fe-sign-price strong {
    font-size: 1.7rem;
    line-height: 1;
    color: var(--sf-primary);
    font-weight: 800;
}

.fe-sign-price-tax {
    font-size: 0.82rem;
    color: var(--sf-primary);
}

.fe-btn-buy-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    padding: 0 14px;
    background: var(--sf-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 10px 22px rgba(23, 41, 91, 0.16);
}

    .fe-btn-buy-inline:hover {
        transform: translateY(-1px);
    }

.fe-modal-error-compact,
.fe-modal-status-compact {
    margin-top: 12px;
}

.fe-modal-footer-sign-compact {
    padding: 12px 20px 18px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: center;
    gap: 10px;
}

@media (max-width: 760px) {
    .fe-modal-sign-compact {
        width: min(90vw, 560px);
        max-height: 90vh;
        overflow-x: auto;
        border-radius: 22px;
    }

    .fe-sign-hero-icon {
        display: none;
    }

    .fe-modal-header-sign-compact {
        padding: 16px 16px 10px;
    }

    .fe-modal-body-sign-compact {
        padding: 14px 16px 12px;
    }

    .fe-modal-footer-sign-compact {
        padding: 12px 16px 16px;
    }

    .fe-sign-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fe-sign-hero-compact {
        gap: 20px;
        padding-right: 14px;
    }

    .fe-sign-hero-text h3 {
        font-size: 1.05rem;
    }

    .fe-sign-hero-text p {
        font-size: 0.88rem;
    }

    .fe-sign-card {
        padding: 13px;
        border-radius: 18px;
    }

    .fe-sign-price strong {
        font-size: 1.45rem;
    }
}

.step-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .step-card-link:hover {
        transform: translateY(-4px);
        text-decoration: none;
        color: inherit;
    }

.cta-buy-section {
    padding: 40px 0 80px;
}

.cta-buy-card {
    display: grid;
    grid-template-columns: 1.5fr .8fr;
    gap: 24px;
    align-items: stretch;
    padding: 32px;
    border-radius: 28px;
    background: rgba(3,143,230,0.2);
    border: 1px solid rgba(23, 41, 91, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.cta-buy-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #17295B;
}

.cta-buy-content h2 {
    margin: 0 0 12px 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.1;
    color: #0f172a;
}

.cta-buy-content p {
    margin: 0;
    max-width: 620px;
    color: #475569;
    line-height: 1.65;
}

.cta-buy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.btn-light-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(23, 41, 91, 0.16);
    background: #fff;
    color: #17295B;
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
}

    .btn-light-outline:hover {
        background: #f8fafc;
        color: #17295B;
        text-decoration: none;
    }

.cta-buy-side {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-buy-price-box {
    width: 100%;
    max-width: 240px;
    padding: 24px 22px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(23, 41, 91, 0.08);
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.cta-price-label {
    display: block;
    font-size: .85rem;
    color: #64748b;
    margin-bottom: 6px;
}

.cta-buy-price-box strong {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
    color: #17295B;
    margin-bottom: 6px;
}

.cta-price-tax {
    display: block;
    font-size: .85rem;
    color: #64748b;
    margin-bottom: 10px;
}

.cta-buy-price-box p {
    margin: 0;
    font-size: .95rem;
    color: #0f172a;
    font-weight: 600;
}

@media (max-width: 900px) {
    .cta-buy-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .cta-buy-side {
        justify-content: flex-start;
    }

    .cta-buy-price-box {
        max-width: 100%;
    }
}

/* =====================
   LOADING SCREENS
   ===================== */
.fe-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fe-loading-screen-soft {
    background: rgba(244, 247, 251, 0.72);
}

.fe-loading-screen-strong {
    background: rgba(15, 23, 42, 0.32);
}

.fe-loading-card {
    width: min(420px, calc(100vw - 32px));
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(23, 41, 91, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    padding: 28px 24px;
    text-align: center;
}

    .fe-loading-card h3 {
        margin: 0 0 8px 0;
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--sf-primary);
    }

    .fe-loading-card p {
        margin: 0;
        color: #64748b;
        line-height: 1.55;
        font-size: 0.95rem;
    }

.fe-loading-spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 4px solid rgba(3, 149, 230, 0.15);
    border-top-color: var(--sf-primary);
    animation: spin 0.9s linear infinite;
}

@media (max-width: 768px) {
    .fe-loading-card {
        border-radius: 20px;
        padding: 24px 18px;
    }

        .fe-loading-card h3 {
            font-size: 1.05rem;
        }

        .fe-loading-card p {
            font-size: 0.88rem;
        }

    .fe-loading-spinner {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }
}

/*DEUNA*/

.pagar-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sf-background);
}

.pagar-card {
    width: 100%;
    max-width: 1000px;
    background: white !important;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 28px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(23, 41, 91, 0.12);
    backdrop-filter: blur(10px);
}

.pagar-header {
    text-align: center;
    margin-bottom: 24px;
}

    .pagar-header h2 {
        margin: 0 0 10px 0;
        font-size: 2rem;
        font-weight: 800;
        color: #17295B;
    }

    .pagar-header p {
        margin: 0 auto;
        max-width: 760px;
        color: #5b6883;
        line-height: 1.6;
    }

.pagar-layout {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.top-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel {
    background: #fff;
    border: 1px solid #e9eef7;
    border-radius: 24px;
    padding: 20px;
}

.panel-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--sf-primary);
    margin-bottom: 10px;
}

.panel-label2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sf-primary);
    margin-bottom: 20px;
}

.qr-panel {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-image {
    width: min(100%, 300px);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    border-radius: 18px;
    background: #fff;
}

.codigo-panel {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.codigo-value {
    font-size: 2rem;
    font-weight: 900;
    color: #17295B;
    letter-spacing: 8px;
    line-height: 1.1;
}

.mini-panel {
    height: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.amount-value {
    font-size: 2.1rem;
    font-weight: 900;
    color: #17295B;
}

.time-value {
    font-size: 2rem;
    font-weight: 900;
    color: #17295B;
    line-height: 1.1;
}

    .time-value.expired {
        color: #d64545;
    }

.tiempo-mensaje {
    border-radius: 14px;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.45;
    background: none;
    color: #4d5a74;
}

    .tiempo-mensaje.error {
        color: #d64545;
    }

    .tiempo-mensaje.success {
        color: #149c5a;
    }

.pasos-panel {
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.paso-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #42506a;
    line-height: 1.5;
}

.paso-numero {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--sf-primary);
    color: white;
    font-size: 1.7rem;
    font-weight: 800;
    box-shadow: none;
}

.bottom-actions {
    margin-top: auto;
    padding-top: 14px;
}

.btn-reintentar {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 16px 20px;
    background: var(--sf-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 12px 30px rgba(23, 41, 91, 0.18);
}

    .btn-reintentar:hover:enabled {
        transform: translateY(-1px);
    }

    .btn-reintentar:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        box-shadow: none;
    }

@media (max-width: 992px) {
    .pagar-card {
        padding: 18px;
        border-radius: 0px;
    }
    .pagar-layout {
        display: flex;
        flex-direction: column;
    }

    .left-column,
    .right-column {
        display: contents;
    }

    .order-mobile-1 {
        order: 1;
    }

    .order-mobile-2 {
        order: 2;
    }

    .order-mobile-3 {
        order: 3;
    }

    .order-mobile-4 {
        order: 4;
    }

    .order-mobile-5 {
        order: 5;
    }

    .top-info-row {
        display: contents;
    }

    .qr-panel {
        min-height: auto;
    }

    .qr-image {
        width: min(100%, 320px);
    }

    .codigo-value {
        font-size: 2.3rem;
        letter-spacing: 5px;
    }

    .pasos-panel {
        min-height: auto;
    }

    .mini-panel {
        min-height: auto;
    }
}

@media (max-width: 640px) {

    .pagar-header h1 {
        font-size: 1.7rem;
    }

    .amount-value {
        font-size: 1.8rem;
    }

    .time-value {
        font-size: 1.65rem;
    }

    .codigo-value {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .panel {
        padding: 18px;
        border-radius: 20px;
    }

    .qr-image {
        width: min(100%, 280px);
    }
}

/*Estilo del error del PDF*/

.fe-error-card {
    text-align: center;
    max-width: 420px;
}

.fe-error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.fe-error-card h3 {
    margin: 0 0 .5rem;
    color: #1e293b;
}

.fe-error-card p {
    margin: 0 0 1.5rem;
    color: #64748b;
}

.fe-error-card .fe-btn {
    width: 100%;
    justify-content: center;
}
/*Botón Deshabilitado*/
.fe-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto; /* para que el tooltip siga funcionando */
}

.fe-btn-primary:disabled:hover {
    /* evita el efecto hover normal cuando está deshabilitado */
    transform: none;
    box-shadow: none;
}

/*Ayuda para Desktop*/
.fe-help-card {
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(23, 41, 91, 0.04), rgba(3, 149, 230, 0.06));
    border: 1px solid rgba(23, 41, 91, 0.12);
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fe-help-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(3, 149, 230, 0.12);
    color: #0395e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.fe-help-card-content {
    flex: 1;
    min-width: 0;
}

    .fe-help-card-content strong {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: #1e293b;
        margin-bottom: 4px;
    }

    .fe-help-card-content p {
        margin: 0;
        font-size: 0.8rem;
        line-height: 1.4;
        color: #64748b;
    }
/*header de Pasos*/

.buy-steps-header {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: none;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.buy-steps-icons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}

.buy-steps-icon-wrap {
    display: flex;
    justify-content: center;
    flex: 1;
}

.buy-steps-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .buy-steps-icon svg {
        width: 20px;
        height: 20px;
    }

.buy-steps-icon-wrap.active .buy-steps-icon {
    background: #0395e6;
    color: white;
    box-shadow: 0 0 0 4px rgba(3, 149, 230, 0.15);
}

.buy-steps-icon-wrap.done .buy-steps-icon {
    background: #0395e6;
    color: white;
}

.buy-steps-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.buy-steps-fill {
    height: 100%;
    background: #0395e6;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.buy-steps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.buy-steps-label {
    color: #94a3b8;
    font-weight: 500;
    flex: 1;
    text-align: center;
    transition: color 0.2s ease;
}

    .buy-steps-label.active {
        color: #0395e6;
        font-weight: 600;
    }

.buy-steps-current {
    font-size: 0.72rem;
    color: #0395e6;
    font-weight: 600;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 480px) {
    .buy-steps-header {
        padding: 18px 18px;
        border-radius: 12px;
    }

    .buy-steps-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

        .buy-steps-icon svg {
            width: 18px;
            height: 18px;
        }

    .buy-steps-labels {
        font-size: 0.74rem;
    }

    .buy-steps-current {
        font-size: 0.68rem;
    }
}

/*Modal Antes del pago*/
.buy-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.buy-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 460px;
    z-index: 1001;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.buy-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.buy-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(3, 149, 230, 0.12);
    color: #0395e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.buy-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
}

.buy-modal-body {
    margin-bottom: 24px;
}

    .buy-modal-body p {
        margin: 0 0 14px;
        color: #64748b;
        font-size: 0.9rem;
        line-height: 1.5;
    }

.buy-modal-highlight {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(3, 149, 230, 0.08);
    border: 1px solid rgba(3, 149, 230, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 0.9rem;
}

    .buy-modal-highlight i {
        color: #0395e6;
        font-size: 1.1rem;
    }

.buy-modal-hint {
    font-size: 0.82rem !important;
    color: #94a3b8 !important;
    margin: 0 !important;
}

.buy-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.buy-btn-secondary {
    padding: 10px 20px;
    border-radius: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .buy-btn-secondary:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }
/*Lista de Sugerencias*/
.buy-suggestion-active {
    background: rgba(3, 149, 230, 0.12) !important;
    color: #0395e6 !important;
}

/*Ciudad Selector*/

.buy-input-wrap {
    position: relative;
}

.buy-input-valid {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.03);
}

.buy-input-check {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 1.1rem;
    pointer-events: none;
}

/*Loading Comprar*/
.buy-card-wrap {
    position: relative;
}

.buy-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
}
/*Ayuda código dactilar*/
.buy-label-with-help {
    display: flex;
    align-items: center;
    gap: 6px;
}

.buy-help-trigger {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0395e6;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
}

    .buy-help-trigger:hover {
        color: #17295B;
        transform: scale(1.1);
    }

.buy-popover-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.buy-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 520px;
    z-index: 1001;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.2s ease;
}

.buy-popover-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0395e6;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

    .buy-popover-close:hover {
        background: #17295B;
    }

.buy-popover-content {
    padding-top: 8px;
}

.buy-popover-title {
    text-align: center;
    font-size: 0.95rem;
    color: #334052;
    line-height: 1.5;
    margin: 0 0 18px;
    padding: 0 20px;
}

.buy-popover-image {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

@media (max-width: 520px) {
    .buy-popover {
        padding: 20px 18px;
    }

    .buy-popover-title {
        font-size: 0.88rem;
        padding: 0;
    }
}