/* =========================================================
   COTIZADOR CLINI — CSS LIMPIO
   Tipografía heredada desde site.css: Montserrat 400/600/700
   ========================================================= */

/* ---------- Base ---------- */

.quote-page,
.quote-page * {
    box-sizing: border-box;
}

.quote-page {
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: calc(50% - 50vw);
    padding: 14px clamp(10px, 1.6vw, 20px) 20px;
    position: relative;
    background: radial-gradient(circle at 12% 20%, rgba(170, 142, 194, .34), transparent 28%), radial-gradient(circle at 88% 22%, rgba(239, 133, 180, .32), transparent 27%), radial-gradient(circle at 24% 86%, rgba(133, 199, 169, .20), transparent 24%), linear-gradient(135deg, #F8F4FC 0%, #F6F1FA 42%, #FFF5FA 100%);
}

.quote-page__header {
    width: min(1120px, 100%);
    margin: 0 auto 12px;
    text-align: center;
}

.quote-page__logo {
    width: clamp(115px, 8vw, 150px);
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 6px;
    object-fit: contain;
}

.quote-page__header--minimal h1 {
    width: fit-content;
    margin: 0 auto;
    padding: 0;
    color: transparent;
    background: linear-gradient(98deg, #6547A4 8%, #C33D8B 92%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(38px, 4.8vw, 54px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

    .quote-page__header--minimal h1::after {
        display: none;
    }

.quote-page__subtitle {
    margin: 5px 0 0;
    color: #D53A91;
    font-weight: 600;
}

    .quote-page__subtitle strong {
        color: inherit;
        font-weight: 700;
    }

/* ---------- Layout principal ---------- */

.quote-card {
    width: min(1320px, calc(100% - 24px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.quote-card__search,
.quote-card__data {
    min-width: 0;
    padding: 0;
    position: relative;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

    .quote-card__search::before,
    .quote-card__data::before {
        display: none;
    }

.section-heading--simple {
    margin-bottom: 10px;
}

    .section-heading--simple h2,
    #uploadTitle {
        margin: 0;
        color: transparent;
        background: linear-gradient(98deg, #6547A4 8%, #C33D8B 92%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .section-heading--simple h2 {
        font-size: clamp(24px, 2vw, 30px);
        line-height: 1.08;
        letter-spacing: -.025em;
    }

    .section-heading--simple p {
        margin: 4px 0 0;
        color: #756C79;
        font-size: 11.5px;
        font-weight: 400;
        line-height: 1.5;
    }

.data-heading {
    margin-top: 12px;
    margin-bottom: 10px;
}

/* ---------- Selector de modo ---------- */

.mode-switch {
    margin-top: 10px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    background: rgba(255, 255, 255, .64);
    border: 1px solid rgba(89, 68, 155, .10);
    border-radius: 17px;
}

.mode-card {
    min-height: 54px;
    padding: 11px 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #675D6B;
    background: transparent;
    border: 0;
    border-radius: 13px;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

    .mode-card:hover {
        color: #59449B;
        background: rgba(89, 68, 155, .055);
    }

    .mode-card.active {
        color: #FFFFFF;
        background: linear-gradient(105deg, #6346A1, #7A58B4);
        box-shadow: 0 8px 20px rgba(89, 68, 155, .14);
    }

.mode-card--manual.active {
    background: linear-gradient(105deg, #B9347B, #D9559A);
}

.mode-card.active,
.mode-card.active strong {
    color: #FFFFFF;
    -webkit-text-fill-color: #FFFFFF;
}

.mode-card__indicator {
    width: 12px;
    height: 12px;
    position: absolute;
    top: 13px;
    right: 13px;
    border: 1.5px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    opacity: .92;
}

.mode-card.active .mode-card__indicator {
    background: #FFFFFF;
    box-shadow: inset 0 0 0 3px #6346A1;
}

.mode-card strong {
    margin: 0;
    font-size: 13px;
}

.mode-card:disabled,
.mode-card.is-disabled {
    cursor: not-allowed;
    opacity: .46;
    filter: grayscale(.28) saturate(.65);
    box-shadow: 0 7px 16px rgba(56, 41, 70, .07);
}

.order-info-row {
    margin: 0 0 14px;
    display: flex;
    justify-content: flex-start;
}

.order-info-link {
    min-height: 30px;
    padding: 4px 8px 4px 4px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #59449B;
    background: transparent;
    border: 0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.order-info-link__icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    color: #59449B;
    background: rgba(89, 68, 155, .08);
    border: 1px solid rgba(89, 68, 155, .15);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
}

.order-info-link:hover,
.order-info-link:focus-visible {
    color: #D53A91;
    background: rgba(239, 133, 180, .08);
    outline: none;
}

    .order-info-link:hover .order-info-link__icon,
    .order-info-link:focus-visible .order-info-link__icon {
        color: #D53A91;
        border-color: rgba(221, 63, 147, .20);
        background: rgba(239, 133, 180, .12);
    }

.mode-card:disabled:hover,
.mode-card.is-disabled:hover {
    color: #675D6B;
    background: transparent;
}

.mode-card:disabled .mode-card__indicator,
.mode-card.is-disabled .mode-card__indicator {
    background: transparent;
    box-shadow: none;
    opacity: .7;
}

/* ---------- Carga de orden médica ---------- */

.upload-panel {
    margin-top: 8px;
}

.manual-panel {
    margin-top: 8px;
}

.dropzone {
    min-height: 0;
    padding: 0;
    display: block;
    overflow: hidden;
    text-align: left;
    cursor: default;
    background: radial-gradient(circle at 10% 0%, rgba(170, 142, 194, .12), transparent 34%), linear-gradient(145deg, rgba(252, 249, 253, .98), rgba(255, 246, 251, .96));
    border: 1.5px dashed rgba(89, 68, 155, .48);
    border-radius: 22px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

    .dropzone input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

.dropzone__picker {
    min-height: 220px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease;
}

    .dropzone__picker:hover,
    .dropzone__picker:focus-within {
        background: rgba(255, 255, 255, .42);
    }

.upload-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #59449B, #DD3F93);
    border-radius: 16px;
    box-shadow: 0 11px 24px rgba(89, 68, 155, .16);
}

    .upload-icon svg,
    .cart-icon svg,
    .upload-guidance__spark svg {
        width: 24px;
        height: 24px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.dropzone__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .dropzone__copy strong {
        margin-top: 18px;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.25;
    }

/* ---------- Información sobre uso de la orden ---------- */

.order-info-popover {
    width: min(430px, calc(100vw - 28px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: #675D6B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .14);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(47, 30, 62, .22);
}

    .order-info-popover::backdrop {
        background: rgba(48, 36, 58, .18);
        backdrop-filter: blur(2px);
    }

.order-info-popover__header {
    padding: 16px 16px 14px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 11px;
    background: linear-gradient(135deg, rgba(170, 142, 194, .12), rgba(239, 133, 180, .10));
    border-bottom: 1px solid rgba(89, 68, 155, .09);
}

.order-info-popover__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #59449B, #D53A91);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
}

.order-info-popover__header strong,
.order-info-popover__header small {
    display: block;
}

.order-info-popover__header strong {
    color: #59449B;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.order-info-popover__header small {
    margin-top: 3px;
    color: #837987;
    font-size: 9px;
    line-height: 1.35;
}

.order-info-popover__close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #736778;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(89, 68, 155, .10);
    border-radius: 50%;
    cursor: pointer;
}

    .order-info-popover__close svg {
        width: 14px;
        height: 14px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }


    .order-info-popover__close:hover,
    .order-info-popover__close:focus-visible {
        color: #D53A91;
        border-color: rgba(221, 63, 147, .20);
        outline: none;
    }

.order-info-popover__body {
    padding: 16px 18px 18px;
    display: grid;
    gap: 11px;
}

    .order-info-popover__body p {
        margin: 0;
        color: #675D6B;
        font-size: 10.5px;
        font-weight: 400;
        line-height: 1.55;
    }

    .order-info-popover__body strong {
        color: #59449B;
        font-weight: 700;
    }

.dropzone__copy > span {
    margin-top: 9px;
    color: #DD3F93;
    font-size: 13px;
    font-weight: 700;
}

.dropzone__copy small {
    margin-top: 7px;
    color: #99919C;
    font-size: 10px;
}

.dropzone__action {
    min-height: 38px;
    margin-top: 17px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #59449B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .18);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(89, 68, 155, .09);
    font-size: .76rem;
    font-weight: 700;
}

    .dropzone__action svg,
    .order-file-add-button svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

.dropzone.is-dragging {
    border-color: #DD3F93;
    box-shadow: 0 0 0 5px rgba(221, 63, 147, .10);
}

.dropzone[data-state="ready"],
.dropzone[data-state="error"] {
    border-color: rgba(89, 68, 155, .55);
    background: linear-gradient(145deg, rgba(250, 245, 252, .98), rgba(255, 239, 247, .92));
}

.dropzone[data-state="reading"] {
    background: linear-gradient(145deg, rgba(170, 142, 194, .12), rgba(255, 255, 255, .78));
    border-color: rgba(89, 68, 155, .58);
}

.dropzone[data-state="review"] {
    background: linear-gradient(145deg, rgba(239, 133, 180, .12), rgba(255, 255, 255, .82));
    border-color: rgba(221, 63, 147, .46);
    box-shadow: 0 0 0 4px rgba(221, 63, 147, .055);
}

.dropzone[data-state="complete"] {
    background: linear-gradient(145deg, rgba(133, 199, 169, .17), rgba(255, 255, 255, .90));
    border-style: solid;
    border-color: rgba(66, 157, 116, .38);
    box-shadow: 0 14px 30px rgba(63, 135, 103, .08);
}

    .dropzone[data-state="complete"] .upload-icon {
        background: linear-gradient(135deg, #58A984, #85C7A9);
        box-shadow: 0 12px 24px rgba(69, 151, 111, .20);
    }

        .dropzone[data-state="complete"] .upload-icon svg {
            display: none;
        }

        .dropzone[data-state="complete"] .upload-icon::after {
            content: "✓";
            font-size: 28px;
            font-weight: 700;
        }

    .dropzone[data-state="complete"] .dropzone__copy > span {
        color: #2F8665;
    }

.dropzone[data-state="error"] {
    border-color: rgba(190, 55, 104, .45);
}

    .dropzone[data-state="ready"] .dropzone__picker,
    .dropzone[data-state="error"] .dropzone__picker,
    .dropzone[data-state="reading"] .dropzone__picker,
    .dropzone[data-state="review"] .dropzone__picker,
    .dropzone[data-state="complete"] .dropzone__picker {
        min-height: 190px;
        padding-block: 24px;
        border-bottom: 1px solid rgba(89, 68, 155, .09);
    }

    .dropzone[data-state="ready"] .dropzone__action::after,
    .dropzone[data-state="error"] .dropzone__action::after,
    .dropzone[data-state="review"] .dropzone__action::after,
    .dropzone[data-state="complete"] .dropzone__action::after {
        content: " otra orden";
    }

/* ---------- Archivos adjuntos ---------- */

.dropzone .order-file-list--inside {
    margin: 18px 18px 10px;
    padding: 16px;
    min-height: 0;
    background: transparent;
    border: 0;
    border-radius: 19px;
    box-shadow: none;
}

    .dropzone .order-file-list--inside[hidden] {
        display: none !important;
    }

    .dropzone .order-file-list--inside:not([hidden]) ~ .dropzone__picker {
        display: none !important;
    }

.order-file-list__summary {
    min-width: 0;
    padding: 0 2px 12px;
}

.order-file-list__summary-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.order-file-list__summary strong {
    margin: 0;
    color: #38283F;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;
}

.order-file-list__summary-badge {
    min-height: 22px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #59449B;
    background: rgba(89, 68, 155, .07);
    border: 1px solid rgba(89, 68, 155, .12);
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.order-file-list__summary small {
    max-width: 650px;
    margin-top: 5px;
    display: block;
    color: #837987;
    font-size: .70rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
}

    .order-file-list__summary small b {
        color: #59449B;
        font-weight: 700;
    }

.order-file-list__items {
    display: grid;
    gap: 10px;
}

.order-file-item {
    min-width: 0;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 14px;
    color: #FFFFFF;
    background: linear-gradient(100deg, #DD3F93 0%, #B83D9D 48%, #664AA7 100%);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(89, 68, 155, .17);
}

    .order-file-item .order-file-item__type {
        width: 46px;
        height: 34px;
        display: grid;
        place-items: center;
        color: #FFFFFF;
        background: rgba(255, 255, 255, .18);
        border-radius: 11px;
        font-size: .68rem;
        font-weight: 700;
        letter-spacing: .04em;
    }

    .order-file-item > div {
        min-width: 0;
    }

    .order-file-item strong,
    .order-file-item small {
        display: block;
        color: #FFFFFF;
    }

    .order-file-item strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .9rem;
    }

    .order-file-item small {
        margin-top: 3px;
        opacity: .82;
        font-size: .72rem;
    }

    .order-file-item button {
        width: 36px;
        height: 36px;
        padding: 0;
        display: grid;
        place-items: center;
        color: #FFFFFF;
        background: rgba(38, 19, 48, .26);
        border: 1px solid rgba(255, 255, 255, .34);
        border-radius: 12px;
        cursor: pointer;
        transition: background .18s ease, transform .18s ease;
    }

        .order-file-item button:hover,
        .order-file-item button:focus-visible {
            background: rgba(46, 20, 56, .5);
            transform: translateY(-1px);
            outline: none;
        }

        .order-file-item button svg {
            width: 19px;
            height: 19px;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

.order-file-compact-actions {
    display: none;
    margin: 0 18px 18px;
    justify-content: flex-end;
}

.dropzone .order-file-list--inside:not([hidden]) ~ .order-file-compact-actions {
    display: flex;
}

.dropzone[data-state="reading"] .order-file-compact-actions {
    display: none !important;
}

.order-file-add-button {
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #59449B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .20);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(89, 68, 155, .08);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

    .order-file-add-button:hover,
    .order-file-add-button:focus-visible {
        transform: translateY(-1px);
        border-color: rgba(221, 63, 147, .45);
        box-shadow: 0 10px 22px rgba(89, 68, 155, .13);
        outline: none;
    }

/* ---------- Acción de lectura ---------- */

.order-reading-actions {
    margin-top: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #FFFFFF;
    border: 1px solid rgba(221, 63, 147, .18);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(63, 43, 75, .07);
}

.dropzone .order-reading-actions--inside {
    margin: 0 18px 18px;
    background: rgba(255, 255, 255, .90);
}

.order-reading-actions[hidden] {
    display: none !important;
}

.order-reading-actions > div {
    min-width: 0;
}

.order-reading-actions strong,
.order-reading-actions small {
    display: block;
}

.order-reading-actions strong {
    color: #38283F;
    font-size: .9rem;
}

.order-reading-actions small {
    margin-top: 3px;
    color: #837987;
    font-size: .76rem;
}

.start-reading-button {
    min-height: 44px;
    padding: 0 20px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 9px;
    color: #FFFFFF;
    background: linear-gradient(100deg, #59449B, #DD3F93);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(221, 63, 147, .10), 0 14px 30px rgba(89, 68, 155, .22);
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    animation: cart-review-pulse 2.2s ease-in-out infinite;
}

    .start-reading-button:not(:disabled)::after {
        content: "";
        position: absolute;
        z-index: -1;
        top: -80%;
        left: -38%;
        width: 28%;
        height: 260%;
        background: rgba(255, 255, 255, .55);
        transform: rotate(20deg);
        filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        animation: cart-review-shine 2.4s ease-in-out infinite;
    }

    .start-reading-button svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .start-reading-button:hover,
    .start-reading-button:focus-visible {
        transform: translateY(-2px);
        box-shadow: 0 0 0 5px rgba(221, 63, 147, .13), 0 17px 34px rgba(89, 68, 155, .25);
    }

    .start-reading-button:disabled {
        opacity: .58;
        cursor: wait;
        transform: none;
        animation: none;
    }

/* ---------- Estado de lectura ---------- */

.ocr-status {
    margin-top: 12px;
    padding: 14px;
    background: #F8F5FA;
    border: 1px solid rgba(89, 68, 155, .13);
    border-radius: 16px;
}

.dropzone .ocr-status--inside {
    margin: 0 18px 18px;
}

.ocr-status[data-state="success"] {
    background: #EDF8F3;
    border-color: rgba(60, 154, 114, .25);
}

.ocr-status[data-state="warning"] {
    background: #FFF8E8;
    border-color: rgba(210, 151, 30, .24);
}

.ocr-status[data-state="error"] {
    background: #FFF0F3;
    border-color: rgba(180, 35, 69, .22);
}

.ocr-status__header {
    display: flex;
    align-items: center;
    gap: 11px;
}

    .ocr-status__header strong,
    .ocr-status__header small {
        display: block;
    }

    .ocr-status__header strong {
        color: var(--ink);
        font-size: 12px;
    }

    .ocr-status__header small {
        margin-top: 3px;
        color: var(--muted);
        font-size: 10px;
        line-height: 1.45;
    }

.ocr-spinner {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 3px solid rgba(89, 68, 155, .14);
    border-top-color: #59449B;
    border-radius: 50%;
    animation: ocr-spin .8s linear infinite;
}

.ocr-progress {
    height: 6px;
    margin-top: 11px;
    overflow: hidden;
    background: rgba(89, 68, 155, .09);
    border-radius: 999px;
}

    .ocr-progress i {
        width: 8%;
        height: 100%;
        display: block;
        background: linear-gradient(90deg, #59449B, #DD3F93);
        border-radius: inherit;
        transition: width .25s ease;
    }

/* ---------- Consejos ---------- */

.upload-guidance {
    margin-top: 16px;
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(89, 68, 155, .09);
    border-radius: 18px;
}

.upload-guidance__intro {
    min-height: 62px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

    .upload-guidance__intro::-webkit-details-marker {
        display: none;
    }

.upload-guidance__spark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #59449B, #DD3F93);
    border-radius: 11px;
}

    .upload-guidance__spark svg,
    .upload-guidance__chevron svg {
        width: 22px;
        height: 22px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.upload-guidance__title {
    min-width: 0;
}

    .upload-guidance__title strong,
    .upload-guidance__title small {
        display: block;
    }

    .upload-guidance__title strong {
        color: #6547A4;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.3;
    }

    .upload-guidance__title small {
        margin-top: 3px;
        color: #8A7F8D;
        font-size: 8.5px;
        font-weight: 600;
        line-height: 1.35;
    }

.upload-guidance__chevron {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #59449B;
    background: rgba(89, 68, 155, .06);
    border-radius: 50%;
    transition: transform .18s ease, background .18s ease;
}

.upload-guidance[open] .upload-guidance__chevron {
    transform: rotate(180deg);
    background: rgba(221, 63, 147, .09);
}

.upload-guidance[open] .upload-guidance__intro {
    border-bottom: 1px solid rgba(89, 68, 155, .08);
}

.upload-steps {
    padding: 12px 14px 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.upload-step {
    min-width: 0;
    padding: 12px 13px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(89, 68, 155, .10);
    border-radius: 14px;
}

.upload-step__warning {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    color: #D53A91;
    background: rgba(239, 133, 180, .12);
    border: 1px solid rgba(221, 63, 147, .15);
    border-radius: 10px;
    font-size: 16px;
    line-height: 1;
}

.upload-step__title {
    display: block;
    margin: 0 0 5px;
    color: #59449B;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.35;
}

.upload-step p {
    margin: 0;
    color: #675D6B;
    font-size: 10px;
    line-height: 1.5;
}

    .upload-step p strong {
        color: #59449B;
        font-weight: 700;
    }

/* ---------- Buscadores ---------- */

.manual-panel,
.manual-panel .search-results,
#cartModal .search-results {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.search-box {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .76);
    border: 1px solid var(--line);
    border-radius: 11px;
}

    .search-box input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
    }

.search-results {
    max-height: 300px;
    margin-top: 10px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
}

.search-result {
    min-width: 0;
    padding: 8px 10px;
    display: grid;
    align-items: center;
    gap: 14px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.search-result__field {
    min-width: 0;
}

    .search-result__field small,
    .search-result__field strong {
        display: block;
    }

    .search-result__field small {
        margin-bottom: 3px;
        color: #8A7E90;
        font-size: 8.5px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .search-result__field strong {
        color: #3F3543;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.38;
        letter-spacing: 0;
        overflow-wrap: break-word;
        word-break: normal;
    }

.search-result__field--code strong {
    color: #59449B;
    font-weight: 600;
}

.search-result__field--category strong,
.search-result__field--exam strong {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.38;
}

.search-result > button {
    min-height: 38px;
    padding: 9px 12px;
    color: #FFFFFF;
    background: #59449B;
    border: 0;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

    .search-result > button.is-added {
        color: #1E644A;
        background: #DFF5EA;
        border: 1px solid rgba(60, 154, 114, .30);
    }

        .search-result > button.is-added:hover {
            color: #9B2946;
            background: #FFF0F3;
            border-color: rgba(180, 35, 69, .24);
        }

        .search-result > button.is-added:focus-visible {
            outline: 3px solid rgba(60, 154, 114, .18);
            outline-offset: 2px;
        }

@media (min-width: 701px) {
    .manual-panel .search-result,
    #cartModal .search-result {
        width: 100%;
        grid-template-columns: 110px 150px minmax(0, 1fr) 110px;
        column-gap: 14px;
    }

    .manual-panel .search-result__field--code,
    #cartModal .search-result__field--code {
        grid-column: 1;
        text-align: center;
    }

    .manual-panel .search-result__field--category,
    #cartModal .search-result__field--category {
        grid-column: 2;
    }

    .manual-panel .search-result__field--exam,
    #cartModal .search-result__field--exam {
        grid-column: 3;
    }

    .manual-panel .search-result > button,
    #cartModal .search-result > button {
        grid-column: 4;
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        justify-self: end;
    }

    .manual-panel .search-result__field--code small,
    .manual-panel .search-result__field--code strong,
    #cartModal .search-result__field--code small,
    #cartModal .search-result__field--code strong {
        width: 100%;
        text-align: center;
    }
}

/* ---------- Finalizar selección manual ---------- */

.manual-selection-finish {
    margin-top: 8px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .95fr);
    gap: 16px;
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(221, 63, 147, .16);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(89, 68, 155, .07);
}

    .manual-selection-finish[hidden] {
        display: none !important;
    }

.manual-selection-finish__copy {
    min-width: 0;
}

    .manual-selection-finish__copy strong,
    .manual-selection-finish__copy small {
        display: block;
    }

    .manual-selection-finish__copy strong {
        color: #403648;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.3;
    }

    .manual-selection-finish__copy small {
        margin-top: 3px;
        color: #817783;
        font-size: 9px;
        line-height: 1.4;
    }

.manual-selection-finish__button {
    width: 100%;
    min-height: 48px;
    padding: 10px 18px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #FFFFFF;
    background: linear-gradient(100deg, #6547A4, #D53A91);
    border: 0;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(221, 63, 147, .10), 0 14px 30px rgba(89, 68, 155, .22);
    animation: cart-review-pulse 2.2s ease-in-out infinite;
}

    .manual-selection-finish__button:disabled {
        cursor: not-allowed;
        opacity: .48;
        animation: none;
        box-shadow: none;
    }

/* ---------- Resumen de selección ---------- */

.cart-summary {
    min-height: 52px;
    padding: 4px 0 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(89, 68, 155, .12);
}

.cart-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #59449B, #DD3F93);
    border-radius: 12px;
}

.cart-copy strong {
    display: block;
    color: #6547A4;
    font-size: 14px;
    font-weight: 600;
}

.cart-count {
    padding: 6px 12px;
    color: #6F6674;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(89, 68, 155, .12);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cart-summary .cart-summary__button {
    min-width: 164px;
    min-height: 40px;
    padding: 5px 14px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #59449B, #DD3F93);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(122, 86, 176, .20);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

    .cart-summary .cart-summary__button svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .cart-summary .cart-summary__button.needs-review {
        box-shadow: 0 0 0 4px rgba(221, 63, 147, .10), 0 10px 24px rgba(89, 68, 155, .20);
        animation: cart-review-pulse 2.2s ease-in-out infinite;
    }

        .cart-summary .cart-summary__button.needs-review::after {
            content: "";
            position: absolute;
            z-index: -1;
            top: -80%;
            left: -38%;
            width: 28%;
            height: 260%;
            background: rgba(255, 255, 255, .55);
            transform: rotate(20deg);
            filter: blur(2px);
            animation: cart-review-shine 2.4s ease-in-out infinite;
        }

    .cart-summary .cart-summary__button.is-reviewed {
        color: #14704F;
        background: #E5F6EE;
        border-color: rgba(42, 159, 116, .28);
        box-shadow: none;
    }

    .cart-summary .cart-summary__button:disabled {
        opacity: .5;
        cursor: not-allowed;
        box-shadow: none;
    }

/* ---------- Formulario ---------- */

.form-grid {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: start;
}

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.field--full {
    grid-column: 1 / -1;
}

.field > span {
    min-height: 16px;
    display: flex;
    align-items: center;
    color: #504752;
    font-size: 10.5px;
    font-weight: 600;
}

    .field > span b,
    .radio-section legend b,
    .document-type-selector legend b {
        color: #DD3F93;
    }

.field input,
.phone-input {
    width: 100%;
    height: 42px;
    min-height: 42px;
    background: rgba(255, 255, 255, .90);
    border: 1px solid rgba(89, 68, 155, .14);
    border-radius: 12px;
    outline: 0;
}

.field input {
    padding: 0 13px;
}

.field input {
    color: #3F3543;
    font-size: 12px;
    font-weight: 400;
}

    .field input:focus,
    .phone-input:focus-within {
        border-color: #59449B;
        box-shadow: 0 0 0 4px rgba(89, 68, 155, .10);
    }

.phone-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
}

.phone-input__prefix {
    height: 40px;
    min-height: 40px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #59449B;
    background: rgba(89, 68, 155, .06);
    border-right: 1px solid rgba(89, 68, 155, .10);
    border-radius: 11px 0 0 11px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.phone-input input {
    width: 100%;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

    .phone-input input:focus {
        border: 0;
        box-shadow: none;
    }

.field-help {
    min-height: 14px;
    margin: 0;
    color: #7B7280;
    font-size: 9px;
    line-height: 1.35;
}

.document-type-selector {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

    .document-type-selector legend {
        margin: 0 0 7px;
        color: #6547A4;
        font-size: 11px;
        font-weight: 700;
    }

.document-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

    .document-type-options label {
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #514852;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
    }

    .document-type-options input {
        width: 17px;
        height: 17px;
        margin: 0;
        accent-color: #59449B;
        cursor: pointer;
    }

.radio-section {
    margin: 10px 0 0;
    padding: 0;
    border: 0;
}

    .radio-section legend {
        margin-bottom: 7px;
        color: #6547A4;
        font-size: 14px;
        font-weight: 700;
    }

.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

    .radio-options label {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #514852;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
    }

    .radio-options input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #59449B;
    }

.radio-options--boxes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
}

    .radio-options--boxes label {
        width: 100%;
    }

        .radio-options--boxes label:last-child {
            grid-column: 1 / -1;
        }


/* ---------- Consentimientos ---------- */

.consent-list {
    margin-top: 5px;
    display: grid;
    gap: 1px;
}

.consent-list--after-submit {
    padding: 0;
}

.consent-row {
    min-width: 0;
    padding: 1px 0;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    column-gap: 7px;
    color: #7B7280;
    font-size: 9.25px;
    line-height: 1.42;
}

.consent-row__checkbox {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    padding: 0;
    accent-color: #59449B;
    cursor: pointer;
}

.consent-row__content {
    min-width: 0;
    display: block;
}

.consent-row__text {
    margin: 0;
    padding: 0;
    color: #7B7280;
    font: inherit;
    cursor: pointer;
}

    .consent-row__text strong {
        color: #59449B;
        font-weight: 700;
    }

.consent-document-link {
    margin: 0 0 0 3px;
    padding: 0;
    display: inline;
    appearance: none;
    color: #59449B;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    cursor: pointer;
}

.consent-document-link--secondary {
    margin-left: 5px;
}

.consent-document-link:hover,
.consent-document-link:focus-visible {
    color: #D53A91;
    outline: none;
}

.consent-row__punctuation {
    margin-left: -2px;
}

.consent-optional {
    margin-left: 5px;
    padding: 1px 6px;
    display: inline-block;
    color: #8C8190;
    background: rgba(89, 68, 155, .06);
    border-radius: 999px;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.consent-list__validation {
    margin: -2px 0 0 25px;
}

@media (max-width: 560px) {
    .consent-list {
        gap: 5px;
    }

    .consent-row {
        grid-template-columns: 18px minmax(0, 1fr);
        column-gap: 7px;
        font-size: 9.1px;
    }

    .consent-list__validation {
        margin-left: 25px;
    }
}

/* ---------- Términos legales ---------- */

.legal-popover,
.legal-popover * {
    box-sizing: border-box;
}

.legal-popover {
    width: min(780px, calc(100vw - 28px));
    max-height: min(82dvh, 860px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: #675D6B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .14);
    border-radius: 20px;
    box-shadow: 0 26px 80px rgba(47, 30, 62, .24);
}

    .legal-popover::backdrop {
        background: rgba(48, 36, 58, .20);
        backdrop-filter: blur(2px);
    }

.legal-popover__header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 72px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #F7F2FC, #FFF3F8);
    border-bottom: 1px solid rgba(89, 68, 155, .10);
}

    .legal-popover__header strong,
    .legal-popover__header small {
        display: block;
    }

    .legal-popover__header strong {
        color: #59449B;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.35;
    }

    .legal-popover__header small {
        margin-top: 4px;
        color: #8A7F8D;
        font-size: 9px;
        font-weight: 600;
    }

.legal-popover__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.legal-popover__download {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #59449B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .14);
    border-radius: 999px;
    box-shadow: 0 6px 15px rgba(89, 68, 155, .07);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

    .legal-popover__download svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .legal-popover__download:hover,
    .legal-popover__download:focus-visible {
        color: #D53A91;
        background: #FFF8FB;
        border-color: rgba(213, 58, 145, .22);
        transform: translateY(-1px);
        outline: none;
    }

.legal-popover__close {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #59449B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .12);
    border-radius: 50%;
    cursor: pointer;
}

    .legal-popover__close svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }


    .legal-popover__close:hover,
    .legal-popover__close:focus-visible {
        color: #D53A91;
        border-color: rgba(213, 58, 145, .25);
        outline: none;
    }

.legal-popover__body {
    max-height: calc(min(82dvh, 860px) - 72px);
    padding: 18px 20px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

    .legal-popover__body section + section {
        margin-top: 15px;
        padding-top: 14px;
        border-top: 1px solid rgba(89, 68, 155, .08);
    }

    .legal-popover__body h3 {
        margin: 0 0 9px;
        color: #59449B;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.4;
        text-transform: none;
    }

    .legal-popover__body p,
    .legal-popover__body li {
        color: #675D6B;
        font-size: 9.5px;
        font-weight: 600;
        line-height: 1.58;
    }

    .legal-popover__body p {
        margin: 0 0 9px;
    }

        .legal-popover__body p:last-child {
            margin-bottom: 0;
        }

    .legal-popover__body ul {
        margin: 7px 0 10px;
        padding-left: 20px;
    }

    .legal-popover__body li + li {
        margin-top: 5px;
    }

    .legal-popover__body strong {
        color: #59449B;
        font-weight: 700;
    }

.legal-contact-list {
    margin-bottom: 0 !important;
}

    .legal-contact-list li {
        margin-top: 3px;
    }

@media (max-width: 560px) {
    .legal-popover {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 16px;
    }

    .legal-popover__header {
        min-height: 66px;
        padding: 14px;
    }

        .legal-popover__header strong {
            font-size: 12px;
        }

    .legal-popover__download {
        width: 34px;
        min-width: 34px;
        padding: 0;
        border-radius: 50%;
    }

        .legal-popover__download span {
            display: none;
        }

    .legal-popover__body {
        max-height: calc(100dvh - 82px);
        padding: 16px;
    }

        .legal-popover__body h3 {
            font-size: 11px;
        }

        .legal-popover__body p,
        .legal-popover__body li {
            font-size: 9.5px;
        }
}


/* ---------- Previsión y beneficios ---------- */

.field-help {
    min-height: 14px;
    margin: 0;
    color: #7B7280;
    font-size: 9px;
    line-height: 1.35;
}

.radio-section {
    margin: 10px 0 0;
    padding: 0;
    border: 0;
}

    .radio-section legend {
        margin-bottom: 7px;
        color: #6547A4;
        font-size: 14px;
        font-weight: 700;
    }

.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

    .radio-options label {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #514852;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
    }

    .radio-options input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #59449B;
    }

.radio-options--boxes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
}

    .radio-options--boxes label {
        width: 100%;
    }

        .radio-options--boxes label:last-child {
            grid-column: 1 / -1;
        }

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

.quote-final-cta {
    margin-top: 10px;
    text-align: center;
}

    .quote-final-cta > p {
        margin: 0 0 10px;
        color: #675D6B;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.4;
    }

.primary-button {
    width: 100%;
    min-height: 52px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #FFFFFF;
    background: linear-gradient(100deg, #59449B, #DD3F93);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 12px 26px rgba(89, 68, 155, .16);
    font-weight: 700;
    cursor: pointer;
}

#submitQuote {
    min-height: 56px;
    margin-top: 0;
    position: relative;
}

    #submitQuote > span:first-child {
        font-size: 16px;
        font-weight: 700;
    }

    #submitQuote .submit-quote-arrow {
        position: absolute;
        right: 22px;
        font-size: 20px;
        font-weight: 700;
    }

.quote-card__data:not(.is-step-locked) #submitQuote:not(:disabled) {
    isolation: isolate;
    overflow: hidden;
    box-shadow: 0 0 0 4px rgba(221, 63, 147, .10), 0 14px 30px rgba(89, 68, 155, .22);
    animation: cart-review-pulse 2.2s ease-in-out infinite;
}

    .quote-card__data:not(.is-step-locked) #submitQuote:not(:disabled)::after {
        content: "";
        position: absolute;
        z-index: -1;
        top: -80%;
        left: -38%;
        width: 28%;
        height: 260%;
        background: rgba(255, 255, 255, .55);
        transform: rotate(20deg);
        filter: blur(2px);
        pointer-events: none;
        animation: cart-review-shine 2.4s ease-in-out infinite;
    }

.primary-button:disabled {
    cursor: wait;
    opacity: .65;
}

/* ---------- Modal carrito ---------- */

.modal-card {
    position: relative;
    z-index: 1;
    background: #FFFFFF;
    box-shadow: 0 30px 90px rgba(25, 14, 35, .30);
}

#cartModal {
    padding: clamp(10px, 2vw, 24px);
    overflow: hidden;
}

    #cartModal .cart-modal-card {
        width: min(1120px, calc(100vw - 28px));
        max-width: none;
        height: min(760px, calc(100dvh - 24px));
        max-height: calc(100dvh - 24px);
        padding: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        overflow: hidden;
        background: #FCFAFD;
        border: 1px solid rgba(89, 68, 155, .12);
        border-radius: 26px;
    }

        #cartModal .cart-modal-card::before {
            content: "";
            position: absolute;
            inset: 0 0 auto;
            height: 5px;
            background: linear-gradient(90deg, #59449B, #DD3F93, #EF85B4);
        }

.cart-modal-close {
    position: absolute;
    z-index: 4;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    margin: 0;
    display: grid;
    place-items: center;
    color: #59449B;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(89, 68, 155, .13);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(89, 68, 155, .10);
    font-size: 24px;
    line-height: 1;
}

.cart-modal-hero {
    padding: 28px 72px 24px 28px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(170, 142, 194, .13), rgba(239, 133, 180, .08));
    border-bottom: 1px solid rgba(89, 68, 155, .10);
}

.cart-modal-hero__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #59449B;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .12);
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(89, 68, 155, .10);
}

    .cart-modal-hero__icon svg {
        width: 27px;
        height: 27px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.65;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.cart-modal-hero__copy {
    min-width: 0;
}

    .cart-modal-hero__copy h2 {
        margin: 0;
        color: #6547A4;
        font-size: clamp(22px, 3vw, 30px);
        line-height: 1.08;
        letter-spacing: -.035em;
    }

    .cart-modal-hero__copy p {
        margin: 4px 0 0;
        color: #786F7B;
        font-size: 11px;
        line-height: 1.45;
    }

.cart-modal-count {
    padding: 8px 13px;
    color: #59449B;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(89, 68, 155, .13);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}


/* ---------- Workspace carrito de orden médica ---------- */

#cartModal .cart-modal-workspace {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
}

#cartModal .cart-modal-selection {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

#cartModal .cart-modal-search-column {
    display: none;
    min-width: 0;
    min-height: 0;
}

/* Se activa exclusivamente cuando el carrito proviene de orden médica. */
#cartModal .cart-modal-card--reader-layout .cart-modal-workspace {
    /* Más espacio para el buscador sin quitar protagonismo a la selección */
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
    gap: 18px;
    padding: 14px 18px 12px;
    align-items: stretch;
}

#cartModal .cart-modal-card--reader-layout .cart-modal-selection {
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(89, 68, 155, .08);
    border-radius: 18px;
}

#cartModal .cart-modal-card--reader-layout .cart-modal-search-column {
    display: block;
    min-height: 0;
    overflow: hidden;
}

#cartModal .cart-modal-card--reader-layout .reader-missing-exams--modal {
    height: 100%;
    margin: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(circle at 100% 0%, rgba(239, 133, 180, .12), transparent 35%), linear-gradient(145deg, rgba(255, 250, 253, .98), rgba(247, 243, 251, .96));
    border: 1px solid rgba(89, 68, 155, .13);
    border-radius: 18px;
}

#cartModal .cart-modal-card--reader-layout .reader-missing-exams__heading {
    margin-bottom: 14px;
    align-items: flex-start;
}

    #cartModal .cart-modal-card--reader-layout .reader-missing-exams__heading small {
        max-width: 320px;
        line-height: 1.45;
    }

#cartModal .cart-modal-card--reader-layout .search-box--reader {
    flex: 0 0 auto;
    min-height: 48px;
    border-color: rgba(89, 68, 155, .14);
    box-shadow: 0 8px 20px rgba(89, 68, 155, .045);
}

#cartModal .cart-modal-card--reader-layout .search-results--reader {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    margin-top: 12px;
    padding-right: 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

    /* Resultados verticales dentro de la columna derecha. */
    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 12px;
        align-items: stretch;
    }

        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code,
        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--category,
        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--exam,
        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result > button {
            grid-column: 1;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            text-align: left;
        }

    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code small {
            margin: 0;
            flex: 0 0 auto;
        }

        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code strong {
            width: auto;
            text-align: left;
        }

    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result > button {
        min-height: 38px;
        margin-top: 2px;
        justify-self: stretch;
        text-align: center;
    }

    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result {
        gap: 8px;
        padding: 13px 14px;
    }

    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field small {
        margin-bottom: 2px;
        color: #948A98;
        font-size: 8px;
        font-weight: 700;
        letter-spacing: .045em;
        line-height: 1.25;
        text-transform: none;
    }

    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field strong {
        font-size: 11px;
        line-height: 1.35;
    }

    #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code {
        min-height: 22px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 7px;
        overflow: visible;
    }

        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code small,
        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code strong {
            width: auto;
            max-width: none;
            text-align: left;
        }

        #cartModal .cart-modal-card--reader-layout .search-results--reader .search-result__field--code strong {
            min-width: 0;
            flex: 0 0 auto;
            color: #59449B;
            white-space: nowrap;
            overflow: visible;
            text-overflow: clip;
        }

#cartModal .cart-modal-card--reader-layout .cart-item__code small {
    display: none;
}

#cartModal .cart-modal-card--reader-layout .cart-item__code {
    min-height: 44px;
    gap: 0;
}

    #cartModal .cart-modal-card--reader-layout .cart-item__code b {
        font-size: 11.5px;
        font-weight: 700;
    }

#cartModal .cart-modal-card--reader-layout .cart-item__category {
    padding: 5px 9px;
    border-radius: 10px;
    font-size: 10.5px;
    line-height: 1.28;
}

#cartModal .cart-modal-notices {
    min-width: 0;
    padding: 0 12px 12px;
    display: grid;
    gap: 8px;
}

    #cartModal .cart-modal-notices .cart-reading-note,
    #cartModal .cart-modal-notices .cart-scanner-note {
        margin: 0;
    }



/* ---------- Acordeón inteligente de avisos ---------- */

#cartModal .cart-rule-notices-heading {
    min-width: 0;
    padding: 2px 2px 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    #cartModal .cart-rule-notices-heading[hidden] {
        display: none !important;
    }

    #cartModal .cart-rule-notices-heading strong {
        color: #756C79;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .035em;
        text-transform: uppercase;
    }

    #cartModal .cart-rule-notices-heading span {
        padding: 3px 8px;
        color: #59449B;
        background: rgba(89, 68, 155, .06);
        border-radius: 999px;
        font-size: 8.5px;
        font-weight: 700;
        white-space: nowrap;
    }

#cartModal .cart-rule-note {
    padding: 0;
    display: block;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

    #cartModal .cart-rule-note.is-expanded {
        border-color: rgba(89, 68, 155, .20);
        box-shadow: 0 8px 18px rgba(89, 68, 155, .055);
    }

    #cartModal .cart-rule-note.is-newly-activated {
        animation: cart-rule-note-highlight .52s ease-out 1;
    }

#cartModal .cart-rule-note__toggle {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 10px;
    color: #59449B;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

    #cartModal .cart-rule-note__toggle:hover,
    #cartModal .cart-rule-note__toggle:focus-visible {
        background: rgba(255, 255, 255, .38);
        outline: none;
    }

    #cartModal .cart-rule-note__toggle strong {
        min-width: 0;
        margin: 0;
        display: block;
        color: #59449B;
        font-size: 10.5px;
        font-weight: 600;
        line-height: 1.35;
        overflow-wrap: break-word;
    }

#cartModal .cart-rule-note__chevron {
    width: 26px;
    height: 26px;
    padding: 0;
    display: grid;
    place-items: center;
    justify-self: end;
    align-self: center;
    color: #7765AD;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(89, 68, 155, .11);
    border-radius: 50%;
    line-height: 0;
    flex: 0 0 26px;
    transition: background .16s ease, border-color .16s ease;
}

    #cartModal .cart-rule-note__chevron svg {
        width: 13px;
        height: 13px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        transform-origin: 50% 50%;
        transition: transform .16s ease;
    }

#cartModal .cart-rule-note.is-expanded .cart-rule-note__chevron {
    background: #FFFFFF;
    border-color: rgba(89, 68, 155, .16);
}

    #cartModal .cart-rule-note.is-expanded .cart-rule-note__chevron svg {
        transform: rotate(180deg);
    }

#cartModal .cart-rule-note__content {
    padding: 0 13px 11px 47px;
}

    #cartModal .cart-rule-note__content[hidden] {
        display: none !important;
    }

    #cartModal .cart-rule-note__content > p,
    #cartModal .cart-rule-note__content .cart-rule-message {
        margin-top: 0;
    }

@keyframes cart-rule-note-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(221, 63, 147, .22);
    }

    55% {
        box-shadow: 0 0 0 4px rgba(221, 63, 147, .10);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(221, 63, 147, 0);
    }
}

@media (max-width: 700px) {
    #cartModal .cart-rule-note__toggle {
        grid-template-columns: 26px minmax(0, 1fr) 26px;
        padding: 8px 9px;
        gap: 8px;
    }

    #cartModal .cart-rule-note__content {
        padding: 0 10px 10px 43px;
    }
}

/* ---------- Tabla carrito ---------- */

#cartModal .cart-table-head,
#cartModal .cart-item--enhanced {
    min-width: 0;
    display: grid;
    grid-template-columns: 112px minmax(120px, 155px) minmax(0, 1fr) 88px;
    column-gap: 12px;
    align-items: center;
}

#cartModal .cart-table-head {
    margin: 12px 28px 0;
    padding: 0 12px 8px;
    color: #8B828D;
    border-bottom: 1px solid rgba(89, 68, 155, .10);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

    #cartModal .cart-table-head span:last-child {
        text-align: center;
    }

#cartModal .cart-items--enhanced {
    min-width: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 10px 16px 14px;
    display: grid;
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

#cartModal .cart-item--enhanced {
    min-height: 62px;
    padding: 10px 12px;
    background: #FFFFFF;
    border: 1px solid rgba(89, 68, 155, .11);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(52, 34, 65, .045);
}

    #cartModal .cart-item__code,
    #cartModal .cart-item__category,
    #cartModal .cart-item__content,
    #cartModal .cart-item--enhanced .cart-item__remove {
        min-width: 0;
        max-width: 100%;
    }

#cartModal .cart-item__code {
    grid-column: 1;
    min-height: 42px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #8A3568;
    background: rgba(239, 133, 180, .13);
    border-radius: 11px;
    text-align: center;
}

    #cartModal .cart-item__code small,
    #cartModal .cart-item__code b {
        width: 100%;
        display: block;
        text-align: center;
    }

    #cartModal .cart-item__code small {
        color: #9D6A87;
        font-size: 8px;
        font-weight: 700;
    }

    #cartModal .cart-item__code b {
        color: #7A2D5B;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: 0;
        overflow-wrap: normal;
    }

#cartModal .cart-item__category {
    grid-column: 2;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 9px;
    color: #59449B;
    background: rgba(170, 142, 194, .15);
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#cartModal .cart-item__content {
    grid-column: 3;
    min-width: 0;
}

    #cartModal .cart-item__content strong {
        margin: 0;
        display: block;
        font-size: 11px;
        font-style: normal;
        font-weight: 600;
        line-height: 1.38;
        letter-spacing: 0;
        color: #3F3543;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

#cartModal .cart-item--enhanced .cart-item__remove {
    grid-column: 4;
    width: 86px;
    height: 38px;
    padding: 0 10px;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #D94A68, #C93D61);
    border: 1px solid rgba(169, 40, 76, .35);
    border-radius: 11px;
    box-shadow: 0 7px 16px rgba(201, 61, 97, .20);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

    #cartModal .cart-item--enhanced .cart-item__remove:hover,
    #cartModal .cart-item--enhanced .cart-item__remove:focus-visible {
        background: linear-gradient(135deg, #C93D61, #B92F52);
        border-color: rgba(153, 34, 68, .45);
        box-shadow: 0 9px 20px rgba(185, 47, 82, .27);
        outline: none;
    }

.cart-item__remove svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-empty {
    min-height: 150px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #786F7B;
    background: rgba(255, 255, 255, .72);
    border: 1px dashed rgba(89, 68, 155, .22);
    border-radius: 16px;
}

    .cart-empty > span {
        width: 38px;
        height: 38px;
        margin-bottom: 10px;
        display: grid;
        place-items: center;
        color: #FFFFFF;
        background: linear-gradient(135deg, #59449B, #DD3F93);
        border-radius: 50%;
        font-size: 22px;
    }

    .cart-empty strong,
    .cart-empty small {
        display: block;
    }

    .cart-empty strong {
        color: #4C424F;
        font-size: 13px;
    }

    .cart-empty small {
        max-width: 360px;
        margin-top: 5px;
        font-size: 10px;
        line-height: 1.45;
    }


#cartModal .cart-modal-card--reader-layout .cart-table-head {
    margin: 10px 12px 0;
}

#cartModal .cart-modal-card--reader-layout .cart-items--enhanced {
    padding: 10px 10px 12px;
}

#cartModal .cart-modal-card--reader-layout .cart-item--enhanced {
    grid-template-columns: 92px minmax(104px, 128px) minmax(0, 1fr) 76px;
    column-gap: 8px;
}

    #cartModal .cart-modal-card--reader-layout .cart-item--enhanced .cart-item__remove {
        width: 72px;
    }

/* ---------- Orden difícil / sin coincidencias ---------- */

#cartModal .cart-reading-note[hidden] {
    display: none !important;
}

#cartModal .cart-reading-note {
    margin: 0 22px 10px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #59449B;
    background: linear-gradient(135deg, rgba(250, 246, 255, .98), rgba(255, 247, 251, .98));
    border: 1px solid rgba(89, 68, 155, .13);
    border-radius: 14px;
}

#cartModal .cart-reading-note__icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: #59449B;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

#cartModal .cart-reading-note strong {
    display: block;
    color: #59449B;
    font-size: 11px;
    font-weight: 700;
}

#cartModal .cart-reading-note p {
    margin: 3px 0 0;
    color: #756C79;
    font-size: 9px;
    line-height: 1.45;
}


@media (max-width: 900px) {
    #cartModal .cart-modal-card--reader-layout .cart-modal-workspace {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px;
        overflow-y: auto;
    }

    #cartModal .cart-modal-card--reader-layout .cart-modal-selection {
        min-height: 320px;
        overflow: visible;
    }

    #cartModal .cart-modal-card--reader-layout .cart-modal-search-column {
        display: block;
        overflow: visible;
    }

    #cartModal .cart-modal-card--reader-layout .reader-missing-exams--modal {
        height: auto;
        min-height: 0;
    }

    #cartModal .cart-modal-card--reader-layout .search-results--reader {
        max-height: 260px;
        flex: none;
    }
}

@media (max-width: 700px) {
    #cartModal .cart-reading-note {
        margin: 0 10px 8px;
        padding: 11px;
    }
}

/* ---------- Nota Scanner ---------- */

#cartModal .cart-scanner-note[hidden] {
    display: none !important;
}

#cartModal .cart-scanner-note {
    margin: 0 28px 16px;
    padding: 13px 15px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: #59449B;
    background: linear-gradient(135deg, rgba(239, 235, 251, .94), rgba(255, 243, 249, .88));
    border: 1px solid rgba(89, 68, 155, .14);
    border-radius: 14px;
}

#cartModal .cart-scanner-note__icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: #59449B;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

#cartModal .cart-scanner-note strong {
    display: block;
    margin: 0;
    color: #59449B;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.35;
}

#cartModal .cart-scanner-note p {
    margin: 3px 0 0;
    color: #706675;
    font-size: 9.5px;
    font-weight: 400;
    line-height: 1.5;
}

#cartModal .cart-scanner-note b {
    color: #D53A91;
}


/* RN-PRE-03 · Medio de contraste */
#cartScannerNote .cart-rule-message {
    margin: 3px 0 0;
    color: #706675;
    font-size: 9.5px;
    font-weight: 400;
    line-height: 1.5;
}

    #cartScannerNote .cart-rule-message p {
        margin: 0;
        color: #706675;
        font-size: 9.5px;
        font-weight: 400;
        line-height: 1.5;
    }

#cartScannerNote .cart-rule-bullet-list {
    margin: 4px 0 0;
    padding-left: 15px;
    color: #59449B;
    font-size: 9.5px;
    font-weight: 400;
    line-height: 1.5;
}

    #cartScannerNote .cart-rule-bullet-list li {
        margin: 0;
        padding: 0;
        color: #59449B;
        font-size: 9.5px;
        font-weight: 400;
        line-height: 1.5;
    }

        #cartScannerNote .cart-rule-bullet-list li + li {
            margin-top: 2px;
        }

        #cartScannerNote .cart-rule-bullet-list li::marker {
            font-size: 6px;
        }

#cartScannerNote .cart-rule-final-note {
    margin: 6px 0 0;
    padding-top: 6px;
    color: #59449B;
    border-top: 1px solid rgba(89, 68, 155, .10);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.45;
}

/* ---------- Exámenes faltantes ---------- */

.reader-missing-exams--modal {
    margin: 0 22px 12px;
    padding: 17px;
    border: 1px solid rgba(221, 63, 147, .17);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(239, 133, 180, .09), rgba(170, 142, 194, .08));
    overflow: hidden;
}

.reader-missing-exams__heading {
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    gap: 14px;
}

    .reader-missing-exams__heading > span,
    .reader-missing-exams__icon {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #FFFFFF;
        background: linear-gradient(135deg, #59449B, #DD3F93);
        border-radius: 50%;
        font-size: 19px;
    }

    .reader-missing-exams__heading strong,
    .reader-missing-exams__heading small {
        display: block;
    }

    .reader-missing-exams__heading strong {
        color: #6547A4;
        font-size: 13px;
        font-weight: 700;
    }

    .reader-missing-exams__heading small {
        margin-top: 3px;
        color: #817983;
        font-size: 10px;
    }

.search-box--reader {
    margin-top: 0;
    background: #FFFFFF;
}

.search-results--reader {
    max-height: 150px;
    overflow-y: auto;
}

/* ---------- Acciones modal ---------- */

#cartModal .cart-modal-actions {
    padding: 10px 22px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #FCFAFD;
}

#cartModal .cart-modal-continue {
    width: min(100%, 320px);
    min-height: 46px;
    margin: 0;
    padding: 12px 24px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #FFFFFF;
    -webkit-text-fill-color: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(221, 63, 147, .10), 0 14px 30px rgba(89, 68, 155, .22);
    animation: cart-review-pulse 2.2s ease-in-out infinite;
}

/* ---------- Animaciones ---------- */

@keyframes ocr-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cart-review-pulse {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@keyframes cart-review-shine {
    0%, 18% {
        left: -38%;
        opacity: 0;
    }

    35% {
        opacity: .85;
    }

    58%, 100% {
        left: 118%;
        opacity: 0;
    }
}

/* =========================================================
   RESPONSIVE FINAL — COTIZADOR
   Jerarquía tipográfica + adaptación por ancho real
   ========================================================= */

@media (max-width: 1180px) and (min-width: 981px) {
    .quote-card {
        width: min(1120px, calc(100% - 20px));
        gap: 14px;
    }

    .manual-panel .search-result,
    #cartModal .search-result {
        grid-template-columns: 96px 120px minmax(0, 1fr) 94px;
        column-gap: 10px;
    }

        .manual-panel .search-result > button,
        #cartModal .search-result > button {
            width: 94px;
            min-width: 94px;
            max-width: 94px;
        }

    #cartModal .cart-table-head,
    #cartModal .cart-item--enhanced {
        grid-template-columns: 100px 130px minmax(0, 1fr) 82px;
        column-gap: 10px;
    }

        #cartModal .cart-item--enhanced .cart-item__remove {
            width: 78px;
        }
}

@media (max-width: 980px) {
    .quote-card {
        width: min(760px, calc(100% - 20px));
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .quote-card__search,
    .quote-card__data {
        align-self: start;
    }

    .upload-steps {
        grid-template-columns: 1fr;
    }

    .order-reading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .start-reading-button {
        width: 100%;
    }
}

@media (max-width: 820px) and (min-width: 701px) {
    .manual-panel .search-result,
    #cartModal .search-result {
        grid-template-columns: 90px 116px minmax(0, 1fr) 90px;
        column-gap: 9px;
    }

        .manual-panel .search-result > button,
        #cartModal .search-result > button {
            width: 90px;
            min-width: 90px;
            max-width: 90px;
        }

    #cartModal .cart-table-head,
    #cartModal .cart-item--enhanced {
        grid-template-columns: 96px 116px minmax(0, 1fr) 78px;
        column-gap: 8px;
    }

    #cartModal .cart-modal-hero {
        padding: 22px 62px 18px 20px;
    }
}

@media (max-width: 700px) {
    .quote-page {
        width: 100%;
        margin-left: 0;
        padding: 14px 12px 24px;
        overflow-x: hidden;
    }

    .quote-page__header {
        margin-bottom: 10px;
    }

    .quote-page__header--minimal h1 {
        font-size: clamp(30px, 9vw, 40px);
        line-height: 1.05;
    }

    .quote-page__subtitle {
        font-size: 11px;
    }

    .quote-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-heading--simple {
        margin-bottom: 8px;
    }

        .section-heading--simple h2 {
            font-size: clamp(22px, 6.5vw, 27px);
        }

        .section-heading--simple p {
            font-size: 11px;
            line-height: 1.45;
        }

    .mode-switch,
    .radio-options--boxes {
        grid-template-columns: 1fr;
    }

    .mode-card {
        min-height: 54px;
    }

    .radio-options--boxes label:last-child {
        grid-column: auto;
    }

    .dropzone__picker {
        min-height: 190px;
        padding: 20px 14px;
    }

    .dropzone__copy strong {
        font-size: 17px;
    }

    .cart-summary {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 8px;
    }

    .cart-count {
        grid-column: 2;
        justify-self: start;
    }

    .cart-summary .cart-summary__button {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }

    .manual-panel .search-result,
    #cartModal .search-result {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
        align-items: stretch;
        overflow: hidden;
    }

        .manual-panel .search-result__field--code,
        .manual-panel .search-result__field--category,
        .manual-panel .search-result__field--exam,
        .manual-panel .search-result > button,
        #cartModal .search-result__field--code,
        #cartModal .search-result__field--category,
        #cartModal .search-result__field--exam,
        #cartModal .search-result > button {
            grid-column: 1;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            text-align: left;
        }

            .manual-panel .search-result__field--code small,
            .manual-panel .search-result__field--code strong,
            #cartModal .search-result__field--code small,
            #cartModal .search-result__field--code strong {
                text-align: left;
            }

        .manual-panel .search-result > button,
        #cartModal .search-result > button {
            min-height: 40px;
            margin-top: 2px;
            font-size: 11px;
            font-weight: 600;
        }

    .manual-selection-finish {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    #cartModal {
        padding: 6px;
    }

        #cartModal .cart-modal-card {
            width: calc(100vw - 12px);
            height: auto;
            max-height: calc(100dvh - 12px);
            grid-template-rows: auto minmax(0, 1fr) auto;
            border-radius: 18px;
        }


        #cartModal .cart-modal-workspace {
            min-height: 0;
            overflow-y: auto;
        }

        #cartModal .cart-modal-selection {
            overflow: visible;
        }

        #cartModal .cart-table-head {
            display: none;
        }

        #cartModal .cart-modal-hero {
            padding: 18px 54px 16px 14px;
            grid-template-columns: auto minmax(0, 1fr);
            gap: 10px;
        }

        #cartModal .cart-modal-hero__icon {
            width: 44px;
            height: 44px;
            border-radius: 13px;
        }

        #cartModal .cart-modal-hero__copy h2 {
            font-size: 21px;
        }

        #cartModal .cart-modal-hero__copy p {
            font-size: 10px;
        }

        #cartModal .cart-modal-count {
            grid-column: 2;
            justify-self: start;
        }

        #cartModal .cart-items--enhanced {
            min-height: 0;
            height: auto;
            max-height: 42dvh;
            padding: 10px;
            grid-auto-rows: max-content;
            gap: 8px;
        }

        #cartModal .cart-item--enhanced {
            width: 100%;
            min-height: 0;
            padding: 12px;
            grid-template-columns: minmax(0, 1fr) 42px;
            grid-template-rows: auto auto auto;
            gap: 7px 10px;
        }

        #cartModal .cart-item__code {
            grid-column: 1;
            grid-row: 1;
            width: fit-content;
            min-width: 84px;
        }

        #cartModal .cart-item__category {
            grid-column: 1;
            grid-row: 2;
            width: fit-content;
            justify-self: center;
        }

        #cartModal .cart-item__content {
            grid-column: 1 / -1;
            grid-row: 3;
            margin-top: 1px;
        }

        #cartModal .cart-item--enhanced .cart-item__remove {
            grid-column: 2;
            grid-row: 1 / span 2;
            width: 40px;
            min-width: 40px;
            height: 40px;
            padding: 0;
            justify-self: end;
            align-self: center;
        }

            #cartModal .cart-item--enhanced .cart-item__remove span {
                display: none;
            }

        #cartModal .cart-reading-note,
        #cartModal .cart-scanner-note,
        #cartModal .reader-missing-exams--modal {
            margin-inline: 10px;
        }

        #cartModal .cart-modal-actions {
            padding: 8px 10px 10px;
            justify-content: stretch;
        }

        #cartModal .cart-modal-continue {
            width: 100%;
            min-height: 44px;
            padding: 11px 18px;
        }
}

@media (max-width: 560px) {
    .quote-page__logo {
        width: 112px;
        max-width: 112px;
        margin-bottom: 8px;
    }

    .order-info-popover {
        width: calc(100vw - 20px);
        border-radius: 15px;
    }

    .dropzone .order-file-list--inside {
        margin: 10px 10px 8px;
        padding: 10px;
    }

    .order-file-list__summary {
        padding-inline: 0;
    }

    .order-file-list__summary-title-row {
        gap: 6px;
    }

    .order-file-list__summary strong {
        font-size: .82rem;
    }

    .order-file-list__summary small {
        font-size: .66rem;
    }

    .order-file-item {
        grid-template-columns: 42px minmax(0, 1fr) 34px;
        gap: 9px;
        padding: 10px;
    }

        .order-file-item .order-file-item__type {
            width: 38px;
            height: 30px;
        }

    .order-file-compact-actions {
        margin: 0 10px 10px;
    }

    .order-file-add-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ocr-spinner,
    .start-reading-button,
    .start-reading-button::after,
    .manual-selection-finish__button,
    .cart-summary .cart-summary__button.needs-review,
    .cart-summary .cart-summary__button.needs-review::after,
    .quote-card__data:not(.is-step-locked) #submitQuote:not(:disabled),
    .quote-card__data:not(.is-step-locked) #submitQuote:not(:disabled)::after,
    #cartModal .cart-modal-continue {
        animation: none;
    }
}


/* Acordeón: neutraliza el layout flex original de las notas. */
#cartModal .cart-modal-notices .cart-rule-note {
    display: block;
    align-items: initial;
    gap: 0;
}

#cartModal .cart-rule-note > .cart-scanner-note__icon {
    display: none;
}


/* =========================================================
   WEB PACIENTE — RESPONSIVE DE DATOS PERSONALES / CONSENTIMIENTOS
   ========================================================= */

@media (max-width: 700px) {
    .form-grid,
    .document-type-options,
    .radio-options--boxes {
        grid-template-columns: 1fr;
    }

    .field input,
    .phone-input {
        min-height: 46px;
        height: 46px;
    }

        .phone-input__prefix,
        .phone-input input {
            min-height: 44px;
            height: 44px;
        }

    .consent-row {
        align-items: flex-start;
    }

    .legal-popover {
        width: min(96vw, 760px);
        max-height: 92vh;
    }

    .legal-popover__header {
        padding: 14px 14px 12px;
    }

    .legal-popover__body {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .document-type-options {
        gap: 8px;
    }

        .document-type-options label {
            min-height: 44px;
        }

    .consent-row__text,
    .consent-document-link {
        font-size: 10px;
        line-height: 1.45;
    }

    .legal-popover__download span {
        display: none;
    }
}
