/* VictorIA R21.2 - Curaciones paciente: solicitud asistida */
.vc-r21-curaciones-center-section {
    margin-top: 4px;
}

.vc-r21-curaciones-center-grid {
    grid-template-columns: 1fr !important;
}

.vc-r21-curaciones-center-card {
    width: 100%;
}

.vc-r21-panel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--victoria-border, #d8e4f4);
    border-radius: 22px;
    background: var(--victoria-surface, #fff);
    box-shadow: 0 18px 46px rgba(22, 72, 133, .09);
    color: var(--victoria-text, #17375e);
}

.vc-r21-header {
    display: grid;
    grid-template-columns: 38px 50px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid var(--victoria-border, #d8e4f4);
    background: linear-gradient(180deg, #fbfdff, #f7fbff);
}

.vc-r21-header-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--victoria-primary, #1268e8);
    background: #eaf3ff;
}

.vc-r21-header-icon svg,
.vc-r21-curaciones-center-card svg,
.vc-r21-info svg,
.vc-r21-order-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vc-r21-back {
    width: 36px;
    height: 36px;
    border: 1px solid var(--victoria-border, #d8e4f4);
    border-radius: 11px;
    background: #fff;
    color: #58708f;
    font-size: 18px;
    cursor: pointer;
}

.vc-r21-header > div:last-child > span,
.vc-r21-section-title > span {
    display: block;
    margin-bottom: 3px;
    color: var(--victoria-primary, #1268e8);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.vc-r21-header h2 {
    margin: 0;
    color: #0c315e;
    font-size: 21px;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.vc-r21-header p {
    margin: 5px 0 0;
    color: #6c83a1;
    font-size: 12px;
    line-height: 1.5;
}

.vc-r21-loading {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 30px;
    text-align: center;
}

.vc-r21-loading > span,
.vc-r21-inline-spinner,
.vc-r21-busy-overlay > span {
    width: 28px;
    height: 28px;
    border: 3px solid #d8e8fb;
    border-top-color: var(--victoria-primary, #1268e8);
    border-radius: 50%;
    animation: vc-r21-spin .8s linear infinite;
}

.vc-r21-inline-spinner {
    width: 15px;
    height: 15px;
    border-width: 2px;
}

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

.vc-r21-loading strong {
    margin-top: 4px;
    color: #17375e;
    font-size: 13px;
}

.vc-r21-loading small {
    color: #7a8faa;
    font-size: 10px;
}

.vc-r21-block,
.vc-r21-active-box {
    margin: 16px 20px 0;
    padding: 16px;
    border: 1px solid #dce7f5;
    border-radius: 16px;
    background: #fff;
}

.vc-r21-active-box {
    border-color: #c6dcf7;
    background: #f6faff;
}

.vc-r21-section-title {
    position: relative;
}

.vc-r21-section-title > strong {
    display: block;
    color: #12375f;
    font-size: 14px;
}

.vc-r21-section-title > small {
    display: block;
    margin-top: 3px;
    color: #758ba7;
    font-size: 10px;
    line-height: 1.45;
}

.vc-r21-active-list {
    display: grid;
    gap: 8px;
    margin-top: 11px;
}

.vc-r21-active-list article {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d5e4f6;
    border-radius: 11px;
    background: #fff;
}

.vc-r21-active-list article div strong,
.vc-r21-active-list article div span,
.vc-r21-active-list article small {
    display: block;
}

.vc-r21-active-list article strong { color: #0f5fc5; font-size: 11px; }
.vc-r21-active-list article div span { margin-top: 2px; color: #476989; font-size: 10px; }
.vc-r21-active-list article small { color: #7a8da6; font-size: 9px; text-align: right; }

.vc-r21-prm-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: end;
    margin-top: 12px;
}

.vc-r21-prm-row label,
.vc-r21-observation {
    display: grid;
    gap: 6px;
}

.vc-r21-prm-row label > span,
.vc-r21-observation > span {
    color: #587391;
    font-size: 10px;
    font-weight: 750;
}

.vc-r21-prm-row input,
.vc-r21-observation textarea {
    width: 100%;
    border: 1px solid #d5e2f2;
    border-radius: 11px;
    background: #fff;
    color: #15385e;
    outline: none;
    font: inherit;
}

.vc-r21-prm-row input {
    min-height: 43px;
    padding: 9px 11px;
    text-transform: uppercase;
}

.vc-r21-prm-row input:focus,
.vc-r21-observation textarea:focus {
    border-color: #8ab8ef;
    box-shadow: 0 0 0 3px rgba(18, 104, 232, .08);
}

.vc-r21-help {
    margin: 7px 0 0;
    color: #8192aa;
    font-size: 9px;
    line-height: 1.45;
}

.vc-r21-button {
    min-height: 43px;
    padding: 9px 14px;
    border: 1px solid #cadbf0;
    border-radius: 11px;
    background: #fff;
    color: #244f7f;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.vc-r21-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #99bfe9;
    box-shadow: 0 7px 18px rgba(20, 72, 133, .08);
}

.vc-r21-button:disabled { opacity: .55; cursor: not-allowed; }
.vc-r21-button.is-primary { color: #fff; border-color: #1268e8; background: linear-gradient(135deg, #1268e8, #2b82f6); }
.vc-r21-button.is-secondary { background: #fff; }
.vc-r21-button.is-ghost { color: #7187a2; background: transparent; }

.vc-r21-orders {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.vc-r21-order {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d8e4f3;
    border-radius: 13px;
    background: #fff;
    color: #17375e;
    text-align: left;
    cursor: pointer;
}

.vc-r21-order:hover { border-color: #9fc4ed; }
.vc-r21-order.is-selected { border-color: #1268e8; box-shadow: inset 0 0 0 1px #1268e8; background: #f7fbff; }

.vc-r21-order-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #1268e8;
    background: #eaf3ff;
}

.vc-r21-order-copy > span,
.vc-r21-order-copy > small,
.vc-r21-order-copy > p { display: block; }

.vc-r21-order-top {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vc-r21-order-top strong { color: #12375f; font-size: 12px; }
.vc-r21-order-top em { color: #1268e8; font-style: normal; font-size: 9px; font-weight: 800; }
.vc-r21-order-copy > span:not(.vc-r21-order-top) { margin-top: 3px; color: #587390; font-size: 10px; }
.vc-r21-order-copy > small { margin-top: 2px; color: #8293a9; font-size: 9px; }
.vc-r21-order-copy > small.is-warning { color: #a06b11; }
.vc-r21-order-copy > p { margin: 6px 0 0; color: #617995; font-size: 9px; line-height: 1.45; }

.vc-r21-order-check {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: transparent;
    background: #edf2f8;
    font-size: 11px;
    font-weight: 900;
}

.vc-r21-order.is-selected .vc-r21-order-check { color: #fff; background: #1268e8; }

.vc-r21-unsure {
    width: 100%;
    margin-top: 9px;
    padding: 11px 12px;
    border: 1px dashed #b9cee8;
    border-radius: 12px;
    background: #fbfdff;
    color: #385b82;
    text-align: left;
    cursor: pointer;
}

.vc-r21-unsure strong,
.vc-r21-unsure span { display: block; }
.vc-r21-unsure strong { font-size: 10px; }
.vc-r21-unsure span { margin-top: 2px; color: #778ca5; font-size: 9px; }
.vc-r21-unsure.is-selected { border-style: solid; border-color: #1268e8; background: #f3f8ff; }

.vc-r21-preferences {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.vc-r21-preferences button {
    min-height: 72px;
    padding: 11px;
    border: 1px solid #d7e3f1;
    border-radius: 12px;
    background: #fff;
    color: #244c78;
    text-align: left;
    cursor: pointer;
}
.vc-r21-preferences button strong,
.vc-r21-preferences button span { display: block; }
.vc-r21-preferences button strong { font-size: 11px; }
.vc-r21-preferences button span { margin-top: 3px; color: #8192a8; font-size: 9px; }
.vc-r21-preferences button.is-selected { border-color: #1268e8; box-shadow: inset 0 0 0 1px #1268e8; background: #f6faff; }

.vc-r21-observation { position: relative; margin-top: 12px; }
.vc-r21-observation > span em { color: #8b9aae; font-style: normal; font-weight: 500; }
.vc-r21-observation textarea { padding: 10px 12px 25px; resize: vertical; min-height: 84px; }
.vc-r21-observation > small { position: absolute; right: 10px; bottom: 7px; color: #8d9cb0; font-size: 9px; }

.vc-r21-info {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 16px 20px 0;
    padding: 13px 14px;
    border-radius: 13px;
    background: #edf6ff;
    color: #315b88;
}
.vc-r21-info > svg { width: 25px; height: 25px; color: #1268e8; }
.vc-r21-info strong,
.vc-r21-info span { display: block; }
.vc-r21-info strong { font-size: 10px; }
.vc-r21-info span { margin-top: 3px; font-size: 9px; line-height: 1.5; }

.vc-r21-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px 20px;
}

.vc-r21-no-order {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 6px;
    min-height: 150px;
    margin-top: 12px;
    padding: 18px;
    border: 1px dashed #cad9ea;
    border-radius: 13px;
    background: #fbfdff;
}
.vc-r21-no-order strong { color: #1e426c; font-size: 12px; }
.vc-r21-no-order span { max-width: 620px; color: #7b8fa8; font-size: 10px; line-height: 1.5; }
.vc-r21-no-order .vc-r21-button { margin-top: 5px; }

.vc-r21-inline-message {
    margin: 12px 20px 0;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.45;
}
.vc-r21-inline-message.is-error { color: #982d40; background: #fff0f2; border: 1px solid #efc3cb; }
.vc-r21-inline-message.is-success { color: #126844; background: #edf9f3; border: 1px solid #bee3d1; }

.vc-r21-busy-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(2px);
}
.vc-r21-busy-overlay strong { color: #254e7c; font-size: 11px; }

.vc-r21-success {
    padding: 28px 22px 16px;
    text-align: center;
}
.vc-r21-success-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 10px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: #e8f8f0;
    color: #169b62;
    font-size: 24px;
    font-weight: 900;
}
.vc-r21-success > span { color: #1268e8; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.vc-r21-success h3 { margin: 4px 0; color: #12375f; font-size: 22px; }
.vc-r21-success > strong { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eef5ff; color: #2768b5; font-size: 9px; }
.vc-r21-success p { max-width: 650px; margin: 10px auto 0; color: #7187a2; font-size: 10px; line-height: 1.55; }

.vc-r21-success-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 20px;
}
.vc-r21-success-steps > div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 11px;
    border: 1px solid #dbe7f4;
    border-radius: 12px;
    background: #fbfdff;
    text-align: left;
}
.vc-r21-success-steps > div > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #eaf3ff; color: #1268e8; font-size: 10px; font-weight: 850; }
.vc-r21-success-steps p { margin: 0; }
.vc-r21-success-steps p strong,
.vc-r21-success-steps p small { display: block; }
.vc-r21-success-steps p strong { color: #315778; font-size: 9px; }
.vc-r21-success-steps p small { margin-top: 2px; color: #8192a8; font-size: 8px; line-height: 1.4; }

.vc-r21-warning,
.vc-r21-error-card {
    margin: 14px 20px 0;
    padding: 12px 14px;
    border-radius: 12px;
}
.vc-r21-warning { color: #795513; background: #fff8e9; border: 1px solid #efdba9; }
.vc-r21-error-card { color: #962e42; background: #fff0f2; border: 1px solid #efc3cb; }
.vc-r21-warning strong,
.vc-r21-warning span,
.vc-r21-error-card strong,
.vc-r21-error-card span { display: block; }
.vc-r21-warning strong,
.vc-r21-error-card strong { font-size: 10px; }
.vc-r21-warning span,
.vc-r21-error-card span { margin-top: 3px; font-size: 9px; line-height: 1.5; }

@media (max-width: 760px) {
    .vc-r21-header { grid-template-columns: 36px 42px minmax(0, 1fr); padding: 16px; gap: 9px; }
    .vc-r21-header-icon { width: 40px; height: 40px; }
    .vc-r21-block,
    .vc-r21-active-box,
    .vc-r21-info,
    .vc-r21-success-steps,
    .vc-r21-warning,
    .vc-r21-error-card { margin-left: 14px; margin-right: 14px; }
    .vc-r21-prm-row { grid-template-columns: 1fr; }
    .vc-r21-preferences,
    .vc-r21-success-steps { grid-template-columns: 1fr; }
    .vc-r21-order { grid-template-columns: 34px minmax(0, 1fr); }
    .vc-r21-order-check { grid-column: 2; justify-self: start; }
    .vc-r21-order-top { align-items: flex-start; flex-direction: column; gap: 3px; }
    .vc-r21-actions { padding: 14px; flex-direction: column-reverse; }
    .vc-r21-actions .vc-r21-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .vc-r21-loading > span,
    .vc-r21-inline-spinner,
    .vc-r21-busy-overlay > span { animation: none; }
    .vc-r21-button { transition: none; }
}


/* R21.2.1 - Vigencia inteligente */
.vc-r21-order-copy > small.vc-r21-validity {
    width: fit-content;
    margin-top: 6px;
    padding: 4px 7px;
    border-radius: 999px;
    color: #1b6b4b;
    background: #eaf8f1;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .015em;
}
.vc-r21-order-copy > small.vc-r21-validity.is-warning {
    color: #8a5b0a;
    background: #fff4d8;
}
.vc-r21-help strong { color: #315d8d; }
.vc-r21-no-order-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
@media (max-width: 760px) {
    .vc-r21-no-order-actions { width: 100%; flex-direction: column; }
    .vc-r21-no-order-actions .vc-r21-button { width: 100%; }
}
