﻿:root {
    --ca-pending: #c98f00;
    --ca-pending-bg: #fff4d6;
    --ca-ok: #1e9e5a;
    --ca-ok-bg: #e8f6ee;
    --ca-ink: #1e1420;
}

body.ca-modal-open {
    overflow: hidden;
}

.ca-backdrop svg,
.ca-banner svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.invisible {
    visibility: hidden;
}

/* ---------- banner en la página ---------- */

.ca-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    animation: caFadeUp .35s ease both;
}

.ca-banner-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ca-banner-icon svg {
        width: 26px;
        height: 26px;
    }

.ca-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .ca-banner-text strong {
        font-size: 16px;
    }

    .ca-banner-text span {
        font-size: 14px;
        line-height: 1.45;
        opacity: .9;
    }

.ca-banner-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 14px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    background: var(--accent);
    color: #4a1d00;
    box-shadow: 0 10px 18px rgba(255, 185, 0, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .ca-banner-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 22px rgba(255, 185, 0, .34);
    }

    .ca-banner-btn:focus-visible {
        outline: 3px solid rgba(255, 185, 0, .55);
        outline-offset: 2px;
    }

.ca-banner-offer {
    color: #fff;
    background: radial-gradient(circle at 92% 0%, rgba(255, 185, 0, .35), transparent 40%), linear-gradient(135deg, var(--primary), #5d1d6a);
    box-shadow: 0 18px 34px rgba(135, 47, 152, .25);
}

    .ca-banner-offer .ca-banner-icon {
        background: rgba(255, 255, 255, .16);
        color: #fff;
    }

.ca-banner-pending {
    background: var(--ca-pending-bg);
    border: 1px solid #f6dc92;
    color: #5c4300;
}

    .ca-banner-pending .ca-banner-icon {
        background: #fff;
        color: var(--ca-pending);
    }

.ca-banner-btn-ghost {
    background: #fff;
    color: #5c4300;
    border: 1px solid #f0cf6c;
    box-shadow: none;
}

    .ca-banner-btn-ghost:hover {
        box-shadow: none;
    }

.ca-banner-active {
    background: var(--ca-ok-bg);
    border: 1px solid #bfe5cf;
    color: #145c37;
    padding: 14px 18px;
}

    .ca-banner-active .ca-banner-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: var(--ca-ok);
        color: #fff;
    }

        .ca-banner-active .ca-banner-icon svg {
            width: 20px;
            height: 20px;
            stroke-width: 2.6;
        }

    .ca-banner-active .ca-banner-text strong {
        font-size: 15px;
    }

/* ---------- capas ---------- */

.ca-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(31, 22, 48, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: caFade .2s ease both;
}

.ca-backdrop-top {
    z-index: 9100;
}

.ca-dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: min(880px, calc(100vh - 48px));
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 70px rgba(31, 22, 48, .35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: caPop .28s cubic-bezier(.2, .9, .3, 1.15) both;
}

.ca-dialog-sm {
    max-width: 440px;
    padding: 30px 26px 24px;
    text-align: center;
    overflow-y: auto;
}

    .ca-dialog-sm h2 {
        font-size: 22px;
        margin: 6px 0 8px;
    }

    .ca-dialog-sm p {
        color: var(--muted);
        line-height: 1.55;
        font-size: 15px;
    }

.ca-close-abs {
    position: absolute;
    top: 12px;
    right: 12px;
}

.ca-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 10px;
}

.ca-header-text {
    flex: 1;
    text-align: center;
}

    .ca-header-text h2 {
        font-size: 20px;
        margin: 2px 0 0;
    }

.ca-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--primary);
}

.ca-icon-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease;
}

    .ca-icon-btn:hover {
        background: var(--bg);
    }

    .ca-icon-btn svg {
        width: 20px;
        height: 20px;
    }

/* ---------- indicador de pasos ---------- */

.ca-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 6px 22px 12px;
    margin: 0;
}

    .ca-steps li {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

.ca-step-bar {
    height: 5px;
    border-radius: 99px;
    background: var(--border);
    overflow: hidden;
    position: relative;
}

    .ca-step-bar::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, var(--danger-brand), var(--primary));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .35s ease;
    }

.ca-steps li.done .ca-step-bar::after,
.ca-steps li.current .ca-step-bar::after {
    transform: scaleX(1);
}

.ca-step-label {
    font-size: 12px;
    color: var(--muted);
}

.ca-steps li.current .ca-step-label {
    color: var(--text);
    font-weight: 700;
}

/* ---------- cuerpo y paneles ---------- */

.ca-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 22px 22px;
}

.ca-panel {
    display: none;
}

    .ca-panel.active {
        display: block;
    }

    .ca-panel.ca-in-forward {
        animation: caInForward .3s ease both;
    }

    .ca-panel.ca-in-back {
        animation: caInBack .3s ease both;
    }

.ca-panel-title {
    font-size: 18px;
    margin: 6px 0 4px;
}

.ca-panel-text {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.ca-mt {
    margin-top: 22px;
}

.ca-subtitle {
    font-size: 15px;
    margin: 18px 0 10px;
}

.ca-intro-hero {
    text-align: center;
    padding: 10px 6px 4px;
}

    .ca-intro-hero h3 {
        font-size: 21px;
        margin: 14px 0 6px;
    }

    .ca-intro-hero p {
        color: var(--muted);
        font-size: 15px;
    }

.ca-intro-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--danger-brand), var(--primary));
    box-shadow: 0 14px 26px rgba(135, 47, 152, .28);
}

    .ca-intro-icon svg {
        width: 32px;
        height: 32px;
    }

.ca-checklist {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
}

    .ca-checklist li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: #fcfaff;
    }

        .ca-checklist li strong {
            display: block;
            font-size: 14px;
        }

        .ca-checklist li small {
            color: var(--muted);
            font-size: 12.5px;
        }

.ca-check-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(135, 47, 152, .1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ca-check-icon svg {
        width: 19px;
        height: 19px;
    }

.ca-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.5;
}

    .ca-note svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

.ca-note-warning {
    display: block;
    background: var(--ca-pending-bg);
    color: #5c4300;
    border: 1px solid #f6dc92;
}

    .ca-note-warning strong {
        display: block;
        margin-bottom: 2px;
    }

.ca-note-secure {
    background: var(--ca-ok-bg);
    color: #145c37;
}

.ca-note-info {
    background: #f3eef8;
    color: #4b2a58;
}

/* ---------- formularios ---------- */

.ca-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

    .ca-field small {
        font-size: 12.5px;
        color: var(--muted);
        padding-left: 4px;
    }

/* etiqueta flotante: adentro del campo mientras está vacío, arriba al enfocar o con valor */
.ca-float {
    position: relative;
}

    .ca-float input,
    .ca-float select {
        width: 100%;
        max-width: none; /* Site.css limita input y select a 280px */
        height: 58px;
        padding: 22px 44px 6px 15px;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-md);
        background: #fff;
        color: var(--text);
        font-size: 16px;
        font-weight: 600;
        transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    }

    .ca-float select {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 64px;
        cursor: pointer;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        background-size: 18px;
    }

    .ca-float input::placeholder {
        color: transparent;
        font-weight: 400;
        transition: color .2s ease;
    }

    .ca-float input:focus::placeholder {
        color: #b3a9bb;
    }

    .ca-float label {
        position: absolute;
        left: 16px;
        top: 19px;
        max-width: calc(100% - 60px);
        font-size: 15.5px;
        font-weight: 500;
        line-height: 1.2;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
        transform-origin: left top;
        transition: transform .18s ease, color .18s ease, font-weight .18s ease;
    }

    .ca-float input:focus + label,
    .ca-float input:not(:placeholder-shown) + label,
    .ca-float select:focus + label,
    .ca-float.has-value label {
        transform: translateY(-11px) scale(.78);
        font-weight: 700;
        color: var(--primary);
    }

    .ca-float input:focus,
    .ca-float select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(135, 47, 152, .12);
    }

.ca-field-ok {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border-radius: 50%;
    background: var(--ca-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
    pointer-events: none;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .2s ease, transform .25s cubic-bezier(.2, 1.6, .4, 1);
}

.ca-float-select .ca-field-ok {
    right: 40px;
}

.ca-field.valid .ca-float input,
.ca-field.valid .ca-float select {
    border-color: var(--ca-ok);
    background-color: #f6fcf8;
}

    .ca-field.valid .ca-float input:focus,
    .ca-field.valid .ca-float select:focus {
        box-shadow: 0 0 0 4px rgba(30, 158, 90, .14);
    }

.ca-field.valid .ca-float label {
    color: var(--ca-ok);
}

.ca-field.valid .ca-field-ok {
    opacity: 1;
    transform: scale(1);
}

.ca-field.invalid .ca-float input {
    border-color: var(--danger);
}

.ca-field.invalid .ca-float label {
    color: var(--danger);
}

#caNumero {
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
}

#caNombre {
    text-transform: uppercase;
}

.ca-row-2 {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 12px;
}

.ca-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
}

    .ca-switch input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.ca-switch-track {
    width: 44px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 99px;
    background: #d9d2df;
    position: relative;
    transition: background .2s ease;
}

.ca-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
    transition: transform .2s ease;
}

.ca-switch input:checked + .ca-switch-track {
    background: var(--primary);
}

    .ca-switch input:checked + .ca-switch-track .ca-switch-thumb {
        transform: translateX(18px);
    }

.ca-switch input:focus-visible + .ca-switch-track {
    outline: 3px solid rgba(135, 47, 152, .35);
    outline-offset: 2px;
}

.ca-switch-text strong {
    display: block;
    font-size: 14px;
}

.ca-switch-text small {
    color: var(--muted);
    font-size: 12.5px;
}

.ca-check-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

    .ca-check-row input {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        margin-top: 1px;
        accent-color: var(--primary);
    }

    .ca-check-row a {
        color: var(--primary);
        font-weight: 700;
    }

/* ---------- tarjeta ---------- */

.ca-card-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 20px;
}

.ca-card-wrap-sm .ca-card {
    max-width: 300px;
}

.ca-card {
    --ca-etiqueta: rgba(255, 255, 255, .75);
    --ca-valor: #fff;
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 840 / 491;
    container-type: inline-size;
    /* radio de w*.055 como en el app; cqw no aplica al propio contenedor */
    border-radius: 5.5% / 9.4%;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 34px rgba(31, 22, 48, .28);
    color: var(--ca-valor);
    transition: filter .3s ease;
}

.ca-card-generica {
    background: radial-gradient(circle at 85% 15%, rgba(255, 185, 0, .35), transparent 45%), linear-gradient(135deg, var(--danger-brand), var(--primary));
}

    .ca-card-generica::before {
        content: "T";
        position: absolute;
        right: -2cqw;
        bottom: -14cqw;
        font-size: 70cqw;
        font-weight: 900;
        line-height: 1;
        color: rgba(255, 255, 255, .08);
    }

.ca-card-chip {
    display: none;
}

.ca-card-generica .ca-card-chip {
    display: block;
    position: absolute;
    left: 7.1cqw;
    top: 12cqw;
    width: 11cqw;
    height: 8.4cqw;
    border-radius: 1.6cqw;
    background: linear-gradient(135deg, #f7d77a, #c99a2e);
}

.ca-card-marca {
    position: absolute;
    top: 5.7cqw;
    right: 7.1cqw;
    height: 9cqw;
    min-width: 12cqw;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ca-card-marca img {
        height: 100%;
        max-width: 18cqw;
        object-fit: contain;
        background: #fff;
        border-radius: 1.4cqw;
        padding: .8cqw 1.4cqw;
    }

.ca-card-numero {
    position: absolute;
    left: 7.1cqw;
    right: 7.1cqw;
    top: calc(192 / 840 * 100cqw);
    display: flex;
    gap: 4cqw;
    font-size: 5.4cqw;
    font-weight: 700;
    letter-spacing: .1em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.ca-card-pie {
    position: absolute;
    left: 7.1cqw;
    right: 7.1cqw;
    bottom: 9.3cqw;
    display: flex;
    justify-content: space-between;
    gap: 4cqw;
}

    .ca-card-pie div {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .ca-card-pie small {
        font-size: 2.9cqw;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--ca-etiqueta);
        font-weight: 700;
    }

    .ca-card-pie strong {
        font-size: 4.2cqw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    }

.ca-card-vence {
    text-align: right;
    flex-shrink: 0;
}

.ca-card.placeholder .ca-card-pie strong,
.ca-card.placeholder .ca-card-numero {
    opacity: .85;
}

/* ---------- documentos ---------- */

.ca-docs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ca-doc {
    position: relative;
    min-height: 140px;
    padding: 14px 10px;
    border: 1.5px dashed #d7c6e0;
    border-radius: var(--radius-lg);
    background: #fcfaff;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}

    .ca-doc:hover {
        border-color: var(--primary);
        background: #f8f2fb;
    }

    .ca-doc:active {
        transform: scale(.98);
    }

    .ca-doc:focus-visible {
        outline: 3px solid rgba(135, 47, 152, .35);
        outline-offset: 2px;
    }

.ca-doc-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(135, 47, 152, .1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ca-doc-icon svg {
        width: 24px;
        height: 24px;
    }

.ca-doc-title {
    font-weight: 700;
    font-size: 14px;
}

.ca-doc-help {
    font-size: 12px;
    color: var(--muted);
}

.ca-doc-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}

.ca-doc-state,
.ca-doc-retake {
    display: none;
}

.ca-doc.filled {
    border: 2px solid var(--ca-ok);
    padding: 0;
}

    .ca-doc.filled .ca-doc-icon,
    .ca-doc.filled .ca-doc-help {
        display: none;
    }

    .ca-doc.filled .ca-doc-title {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 22px 8px 8px;
        color: #fff;
        font-size: 13px;
        background: linear-gradient(transparent, rgba(0, 0, 0, .65));
    }

    .ca-doc.filled .ca-doc-state {
        display: flex;
        position: absolute;
        top: 8px;
        left: 8px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: var(--ca-ok);
        color: #fff;
        align-items: center;
        justify-content: center;
    }

        .ca-doc.filled .ca-doc-state svg {
            width: 16px;
            height: 16px;
            stroke-width: 3;
        }

    .ca-doc.filled .ca-doc-retake {
        display: block;
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        border-radius: 99px;
        background: var(--accent);
        color: #4a1d00;
        font-size: 12px;
        font-weight: 700;
    }

.ca-doc[data-campo^="firma"] .ca-doc-thumb {
    object-fit: contain;
    padding: 10px 10px 34px;
}

/* ---------- firma ---------- */

.ca-firma-box {
    position: relative;
    margin: 16px 0;
    border: 1.5px dashed #d7c6e0;
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

#caFirmaCanvas {
    display: block;
    width: 100%;
    height: 210px;
    touch-action: none;
    cursor: crosshair;
}

.ca-firma-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9adc2;
    font-size: 18px;
    pointer-events: none;
}

.ca-firma-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

    .ca-firma-actions .btn-secondary,
    .ca-firma-actions .cta {
        flex: 1;
        margin-top: 0;
        padding: 14px 12px;
    }

/* ---------- confirmación ---------- */

.ca-summary {
    margin: 0 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ca-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    font-size: 14px;
}

    .ca-summary-row + .ca-summary-row {
        border-top: 1px solid var(--border);
    }

    .ca-summary-row dt {
        color: var(--muted);
        font-weight: 400;
    }

    .ca-summary-row dd {
        margin: 0;
        font-weight: 700;
        text-align: right;
        word-break: break-word;
    }

/* ---------- pie y carga ---------- */

.ca-footer {
    padding: 12px 22px 20px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.ca-falta {
    min-height: 20px;
    margin: 0 0 8px;
    font-size: 13.5px;
    text-align: center;
    color: var(--muted);
}

    .ca-falta.error {
        color: var(--danger);
        font-weight: 600;
    }

.ca-cta {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .ca-cta svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .ca-cta:disabled {
        opacity: .5;
        cursor: not-allowed;
        box-shadow: none;
    }

.ca-cta-danger {
    background: var(--danger);
    box-shadow: none;
}

.ca-dialog-sm > .ca-cta {
    margin-top: 18px;
}

.ca-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    padding: 20px;
    animation: caFade .15s ease both;
}

    .ca-loading strong {
        font-size: 16px;
    }

    .ca-loading small {
        color: var(--muted);
    }

/* ---------- resultado y trámite ---------- */

.ca-result {
    text-align: center;
    padding: 22px 4px 6px;
}

    .ca-result h3 {
        font-size: 22px;
        margin: 20px 0 6px;
    }

    .ca-result p {
        color: var(--muted);
        font-size: 15px;
        line-height: 1.55;
        max-width: 420px;
        margin: 0 auto;
    }

.ca-badge {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: caBounce .6s cubic-bezier(.2, 1.6, .4, 1) both;
}

    .ca-badge svg {
        width: 42px;
        height: 42px;
        stroke-width: 2.8;
        display: none;
    }

    .ca-badge.ok {
        background: var(--ca-ok);
    }

        .ca-badge.ok .ca-badge-ok {
            display: block;
        }

    .ca-badge.error {
        background: var(--danger);
    }

        .ca-badge.error .ca-badge-error {
            display: block;
        }

.ca-badge-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid currentColor;
    animation: caRing .9s ease-out .15s both;
}

.ca-badge.ok .ca-badge-ring {
    color: var(--ca-ok);
}

.ca-badge.error .ca-badge-ring {
    color: var(--danger);
}

.ca-tramite-box {
    margin: 22px auto 0;
    max-width: 420px;
    padding: 16px 14px;
    border-radius: var(--radius-md);
    background: #fcfaff;
    border: 1px solid var(--border);
}

.ca-tramite {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
}

    .ca-tramite::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 16.66%;
        right: 16.66%;
        height: 3px;
        background: linear-gradient(90deg, var(--ca-ok) 0 50%, var(--border) 50% 100%);
        border-radius: 99px;
    }

    .ca-tramite li {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--muted);
    }

.ca-tramite-dot {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--border);
}

.ca-tramite li.done {
    color: var(--ca-ok);
    font-weight: 700;
}

    .ca-tramite li.done .ca-tramite-dot {
        background: var(--ca-ok);
        border-color: var(--ca-ok);
    }

.ca-tramite li.current {
    color: #8a6200;
    font-weight: 700;
}

    .ca-tramite li.current .ca-tramite-dot {
        border-color: var(--ca-pending);
        background: var(--ca-pending-bg);
        box-shadow: 0 0 0 5px rgba(201, 143, 0, .15);
    }

.ca-estado-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 20px;
    background: var(--ca-pending-bg);
    color: var(--ca-pending);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ca-estado-icon svg {
        width: 32px;
        height: 32px;
    }

/* ---------- animaciones ---------- */

@keyframes caFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes caFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes caPop {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes caInForward {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes caInBack {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes caBounce {
    from { transform: scale(.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes caRing {
    from { transform: scale(1); opacity: .7; }
    to { transform: scale(1.7); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ca-banner,
    .ca-backdrop,
    .ca-dialog,
    .ca-panel.ca-in-forward,
    .ca-panel.ca-in-back,
    .ca-badge,
    .ca-badge-ring {
        animation: none;
    }
}

/* ---------- móvil ---------- */

@media (max-width: 767px) {
    .ca-banner {
        flex-wrap: wrap;
        padding: 16px;
    }

    .ca-banner-offer .ca-banner-btn,
    .ca-banner-pending .ca-banner-btn {
        width: 100%;
    }

    #caModal.ca-backdrop {
        padding: 0;
        align-items: stretch;
    }

    #caModal .ca-dialog {
        max-width: none;
        max-height: none;
        height: 100%;
        height: 100dvh;
        border-radius: 0;
        animation-name: caSlideUp;
    }

    .ca-backdrop-center {
        padding: 16px;
    }

    .ca-header {
        padding: 14px 14px 8px;
    }

    .ca-body {
        padding: 6px 16px 18px;
    }

    .ca-footer {
        padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
    }

    .ca-steps {
        padding: 4px 16px 10px;
    }

    .ca-checklist {
        grid-template-columns: 1fr;
    }

    .ca-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ca-doc {
        min-height: 128px;
    }

    .ca-dialog-sm {
        padding: 26px 18px 20px;
    }
}

@keyframes caSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
