html, body {
    font-family: Poppins;
    background-image: url('Ejemplos/Fondo2.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

@keyframes pulso {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins-Bold';
    src: url('fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ==== Dropzone ==== */
.hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dropzone {
    width: 90%;
    height: 31rem;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    display: grid;
    place-content: center;
    background: #ffffff;
    color: #17295B;
    text-align: center;
}

    .dropzone.dragover {
        border-color: #00C2CC;
        background: #f6feff;
    }

.drop-title {
    font-weight: 800;
    font-size: 20px;
    color: var(--text);
}

.busy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.busy-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.20);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.busy-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(0,194,204,0.25);
    border-top-color: rgba(0,194,204,1);
    animation: busySpin 0.85s linear infinite;
}

.busy-text {
    font-family: Poppins, Arial, sans-serif;
    font-size: 14px;
    color: #17295b;
}

@keyframes busySpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.drop-sub {
    font-size: 14px;
    color: #64748b;
}

.drop-foot {
    font-size: 12px;
    color: #94a3b8;
}

.preview-surface {
    align-items: center;
    justify-items: center;
    align-content: center;
    justify-content: center;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.pdf-canvas {
    display: block;
    width: 100%;
}

<style >
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

/* Fondo + centrado */
.boot-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-family: Poppins, Arial, sans-serif;
    z-index: 999999;
}

.boot-logo {
    height: 11vh;
    max-height: 92px;
    width: auto;
    object-fit: contain;
    animation: pulseLogo 1s ease-in-out infinite;
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.02);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.85;
    }
}

/* Barra */
.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, #00c2cc,#44e0e0);
    animation: boot-move 1.2s ease-in-out infinite;
}

.boot-text {
    font-size: 14px;
    color: #17295b;
    opacity: 0.85;
    letter-spacing: 0.2px;
}

@keyframes boot-move {
    0% {
        transform: translateX(-120%);
    }

    50% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(220%);
    }
}

</style >


.overlay-canvas {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    cursor: crosshair;
}


.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===== Firmador PDF UI (Fondo blanco) ===== */
.signapp.light {
    --bg: rgba(23,41,91,1);
    --card: #ffffff;
    --card2: #17295b;
    --stroke: rgba(23,41,91,.12);
    --stroke2: rgba(0,194,204,.22);
    --text: #17295b;
    --muted: rgba(15,23,42,.65);
    --subtitle: #00c2cc;
    --muted2: rgba(15,23,42,.45);
    --primary: #17295b;
    --primary2: #00c2cc;
    --good: #12b76a;
    --bad: #ef4444;
    color: var(--text);
    max-width: 1180px;
    margin: 20px auto;
    padding: 16px;
}

.signapp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 16px 18px;
    border-radius: 18px;
    background-color: white;
    border: 1px solid var(--stroke);
    box-shadow: 0 12px 30px rgba(2,6,23,.08);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand-icon {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    text-align: center;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    padding-top: 10px;
    font-weight: 900;
    color: var(--primary2);
}

.brand-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .2px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pill {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    border: 1px solid var(--stroke);
    font-size: 13px;
    color: var(--muted);
}

.signapp-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 14px;
}

@media (max-width: 980px) {
    .signapp-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(2,6,23,.06);
}

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

    .card-head h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 900;
        letter-spacing: .2px;
    }

.muted {
    color: var(--muted);
    font-size: 12.5px;
}

.divider {
    height: 1px;
    background: var(--stroke);
    margin: 14px 0;
}

/* chips */
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 2px 0 12px;
}

.chip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: #fff;
    font-size: 12px;
    color: var(--muted);
}

    .chip .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: rgba(15,23,42,.25);
    }

    .chip.ok {
        border-color: rgba(18,183,106,.28);
        background: rgba(18,183,106,.08);
        color: rgba(15,23,42,.75);
    }

        .chip.ok .dot {
            background: var(--good);
        }

    .chip.idle {
        background: rgba(15,23,42,.03);
    }

/* forms */
.form-grid {
    display: grid;
    gap: 12px;
}

.field {
    display: grid;
    overflow: hidden;
    gap: 6px;
}

.label {
    margin-top:5px;
    font-size: 12px;
    color: var(--subtitle);
    font-weight: 800;
    letter-spacing: .2px;
}

.text {
    max-width: 100%;
    padding: 11px 12px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: #fff;
    color: var(--text);
    outline: none;
}

    .text:focus {
        border-color: rgba(0,194,204,.55);
        box-shadow: 0 0 0 4px rgba(0,194,204,.12);
    }

    .text.small {
        padding: 10px 10px;
    }

.helper {
    font-size: 12px;
    color: var(--muted2);
}

.filebox {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(23,41,91,.20);
    background: rgba(23,41,91,.03);
    width: auto;
}

.fileinput {
    width: 170px;

}

/* filebox custom */
.filebox.custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(23,41,91,.12);
    background: rgba(23,41,91,.03);
}

.fileactions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filebtn {
    cursor: pointer;
    text-decoration: none;
}

.fileinput-hidden {
    display: none !important;
}

/* input nativo oculto (pero funcional con label for=...) */
.native-file {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}


.filehint {
    min-width: 0;
}

.filetitle {
    font-weight: 900;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.filesub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.control {
    display: grid;
    gap: 6px;
}

/* buttons */
.btn {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 11px 12px;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: .2px;
    transition: transform .06s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--text);
}

    .btn:active {
        transform: scale(.99);
    }

    .btn[disabled] {
        opacity: .55;
        cursor: not-allowed;
    }

    .btn.primary {
        background-color: var(--text);
        color: white;
        border-color: none;
    }

        .btn.primary:hover {
            background-color: var(--subtitle);
            color: white;
            transform: scale(1.025);
        }

    .btn.secondary {
        background: rgba(23,41,91,.04);
    }

        .btn.secondary:hover {
            background: rgba(23,41,91,.06);
        }

.background-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999999;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 1.5s;
}


    .btn.ghost {
        background: transparent;
        border-color: rgba(23,41,91,.16);
        padding: 9px 10px;
    }

        .btn.ghost:hover {
            background: rgba(23,41,91,.04);
        }

/* selection card */
.selection-card {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(0,194,204,.06);
    padding: 12px;
}

.selection-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.selection-title {
    font-weight: 900;
    font-size: 13px;
}

.selection-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.selection-empty {
    font-size: 12.5px;
    color: var(--muted);
    padding: 10px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(23,41,91,.10);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 520px) {
    .selection-grid {
        grid-template-columns: 1fr;
    }
}

.kpi {
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(23,41,91,.10);
    border-radius: 14px;
    padding: 10px;
}

.kpi-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
}

.kpi-value {
    font-size: 14px;
    font-weight: 1000;
    margin-top: 4px;
    color: var(--primary2);
}

/* help */
.help {
    margin-top: 5px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(23,41,91,.12);
    background: rgba(23,41,91,.03);
    padding: 12px;
}

.help-title {
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 6px;
}

.help-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12.8px;
}

    .help-list li {
        margin: 6px 0;
    }

    .help-list b {
        color: var(--text);
    }

/* actions */
.actions {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.fineprint {
    font-size: 12px;
    color: var(--muted2);
}

/* preview */
.preview-card {
    padding: 12px 12px 14px;
}

.preview-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-size: 12px;
    color: var(--muted);
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(23,41,91,.03);
    border: 1px solid rgba(23,41,91,.10);
}

.preview-wrap {
    margin-top: 8px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: #fff;
    overflow: hidden;
}

.preview-surface {
    position: relative;
    width: 100%;
    min-height: 560px;
    background: repeating-linear-gradient( 45deg, rgba(15,23,42,.02), rgba(15,23,42,.02) 10px, rgba(15,23,42,.03) 10px, rgba(15,23,42,.03) 20px );
}

.pdf-canvas {
    display: block;
    width: 100%;
}

.overlay-canvas {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    cursor: crosshair;
}

.preview-footer {
    padding: 12px;
    display: grid;
    gap: 10px;
    border-top: 1px solid rgba(23,41,91,.10);
    background: rgba(23,41,91,.02);
}

/* alerts */
.alert {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(23,41,91,.12);
    background: #fff;
    color: var(--text);
    font-size: 12.8px;
    white-space: pre-wrap;
}

    .alert.info {
        border-color: rgba(0,194,204,.35);
        background: rgba(0,194,204,.08);
    }

    .alert.error {
        border-color: rgba(239,68,68,.35);
        background: rgba(239,68,68,.08);
    }

/* switch */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,.8);
}

    .switch input {
        display: none;
    }

.slider {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(23,41,91,.18);
    background: rgba(15,23,42,.06);
    position: relative;
}

    .slider::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid rgba(23,41,91,.18);
        transition: transform .15s ease, background .15s ease;
        box-shadow: 0 6px 14px rgba(2,6,23,.10);
    }

.switch input:checked + .slider {
    background: rgba(0,194,204,.18);
    border-color: rgba(0,194,204,.35);
}

    .switch input:checked + .slider::after {
        transform: translateX(16px);
        border-color: rgba(0,194,204,.45);
    }

.switch-text {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 800;
}

