
:root {
    --primary: #155e75;
    --primary-dark: #164e63;
    --primary-soft: #eef8fc;
    --text: #172b4d;
    --muted: #64748b;
    --border: #d7e2eb;
    --border-strong: #c4d2de;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --page: #eef3f8;
    --success: #15803d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}



.hidden {
    display: none !important;
}

/* CONTENEDOR Y ENCABEZADO */

.app-container {
    width: min(1100px, calc(100% - 28px));
    margin: 18px auto 30px;
}

/* TARJETA PRINCIPAL */

.calculator-card {
    width: 100%;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

/* INDICADOR DE PASOS - SIEMPRE EN UNA SOLA FILA */

.wizard-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin: 0 0 28px;
}

.wizard-progress-item {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.wizard-progress-item span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
}

.wizard-progress-item.active,
.wizard-progress-item.completed {
    color: rgb(0,105,55);
}

.wizard-progress-item.active span,
.wizard-progress-item.completed span {
    border-color: green;
    background: green;
    color: #fff;
}

.wizard-progress-line {
    flex: 1 1 90px;
    min-width: 28px;
    height: 1px;
    margin: 0 14px;
    background: var(--border);
}

/* PASOS */

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: wizardFade .2s ease;
}

@keyframes wizardFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-step-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 18px;
}

.section-number {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.wizard-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .07em;
}

.wizard-step-heading h2 {
    margin: 0;
    color: #1e3149;
    font-size: 21px;
    line-height: 1.25;
}

.wizard-step-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.selection-counter {
    margin-left: auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e8f3f8;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

/* PASO 1 - VALOR */

.wizard-step-card.value-step-card {
    width: min(680px, 100%);
    margin: 0 auto;
}

.cuantia-box {
    padding: 20px;
    border: 1px solid #d5e3ec;
    border-radius: 14px;
    background: #fff;
}

.cuantia-box label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.input-money {
    display: flex;
    align-items: center;
    min-height: 62px;
    overflow: hidden;
    border: 2px solid #b8c7d5;
    border-radius: 10px;
    background: #fff;
}

.input-money:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .10);
}

.currency-symbol {
    padding: 0 13px;
    color: #71849a;
    font-size: 22px;
    font-weight: 900;
}

.currency-name {
    padding: 0 13px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.input-money input {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #334155;
    font-size: 27px;
    font-weight: 900;
}

.cuantia-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 8px;
    background: #edf7fb;
}

.cuantia-info p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}


/* PROCESOS - DOS COLUMNAS INDEPENDIENTES */

.procesos-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-auto-flow: row;
    align-items: start;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.service-group-item {
    display: block !important;
    width: 100% !important;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .035);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.service-group-item:hover {
    border-color: #b7c8d5;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}

.service-card-header {
    width: 100%;
}

.service-label {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
    min-width: 0;
    padding: 14px 15px;
    cursor: pointer;
}

.service-group-item .grupo-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-check {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    position: relative;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.service-group-item .service-label:has(.grupo-checkbox:checked) {
    background: var(--primary-soft);
}

.service-group-item:has(.grupo-checkbox:checked) {
    border-color: #7dd3fc;
}

.service-group-item .service-label:has(.grupo-checkbox:checked) .service-check {
    border-color: var(--primary);
    background: var(--primary);
}

.service-group-item .service-label:has(.grupo-checkbox:checked) .service-check::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.service-main-copy {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.service-name {
    display: block;
    margin-bottom: 3px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.service-note {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* SELECTORES DE PROCESOS */

.service-select-wrap {
    width: 100%;
    padding: 9px 15px 13px 48px;
    border-top: 1px solid #edf2f7;
    background: #fbfdff;
}

.service-select-label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
}

.service-select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 8px 35px 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}

.service-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .09);
}




/* BENEFICIOS */

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(760px, 100%);
    margin: 0 auto;
}

.beneficio-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: .18s ease;
}

.beneficio-item:hover {
    border-color: #a9bbc9;
    background: #f8fafc;
}

.beneficio-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.beneficio-box {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    position: relative;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.beneficio-item input:checked + .beneficio-box {
    border-color: var(--primary);
    background: var(--primary);
}

.beneficio-item input:checked + .beneficio-box::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.beneficio-text {
    color: #334155;
    font-size: 13px;
}

/* OPCIONES DE DISCAPACIDAD */

.discapacidad-panel {
    width: min(760px, 100%);
    margin: 12px auto 0;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    background: #f8fbff;
}

.discapacidad-options-title {
    margin-bottom: 9px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
}

.discapacidad-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.discapacidad-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.discapacidad-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.discapacidad-check {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    position: relative;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
}

.discapacidad-option input:checked + .discapacidad-check {
    border-color: var(--primary);
    background: var(--primary);
}

.discapacidad-option input:checked + .discapacidad-check::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.discapacidad-option > span:last-child {
    min-width: 0;
}

.discapacidad-option strong,
.discapacidad-option small {
    display: block;
}

.discapacidad-option strong {
    color: var(--primary-dark);
    font-size: 13px;
}

.discapacidad-option small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

/* BOTONES*/

.wizard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.wizard-actions-right {
    justify-content: flex-end;
}

.wizard-actions-between {
    justify-content: space-between;
}

.wizard-actions-center {
    justify-content: center;
}


.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #01396b;
    color: #f4f5f7;
}

.btn-secondary:hover {
    background: #dce5ec;
}



/* RESULTADO*/

.resultado-resumen-wizard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    width: min(820px, 100%);
    margin: 0 auto 22px;
}

.resultado-resumen-item-wizard {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #d7e2eb;
    border-radius: 11px;
    background: #f8fafc;
}

.resultado-resumen-item-wizard span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.resultado-resumen-item-wizard strong {
    display: block;
    min-width: 0;
    color: #16324f;
    font-size: 16px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.resultado-descuento {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.resultado-descuento strong {
    color: #166534;
}

.valores-individuales {
    width: min(820px, 100%);
    margin: 0 auto;
}

.valores-individuales-header {
    margin-bottom: 10px;
}

.valores-individuales-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .07em;
}

.valores-individuales h3 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
}

.lista-valores-individuales {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.valor-individual-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-width: 0;
    min-height: 50px;
    padding: 11px 14px;
    border: 1px solid #dce5ec;
    border-radius: 9px;
    background: #fff;
}

.valor-individual-item span {
    min-width: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.valor-individual-item strong {
    flex: 0 0 auto;
    color: var(--primary-dark);
    font-size: 14px;
    white-space: nowrap;
}

.wizard-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: min(820px, 100%);
    margin: 17px auto 0;
    padding: 18px 20px;
    border: 1px solid #bfd9e3;
    border-radius: 12px;
    background: #edf7fa;
}

.wizard-total > span {
    color: #164e63;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .06em;
}

.wizard-total strong {
    color: #075985;
    font-size: 28px;
    font-weight: 900;
    white-space: nowrap;
}

/* PIE */

.app-footer {
    padding: 18px 5px 0;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
}

/* TABLET */

@media (max-width: 850px) {
    .calculator-card {
        padding: 22px;
    }

    .discapacidad-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MÓVIL*/

@media (max-width: 680px) {
    .app-container {
        width: calc(100% - 16px);
        margin-top: 10px;
    }

    .calculator-card {
        padding: 15px;
        border-radius: 13px;
    }

    .wizard-progress {
        margin-bottom: 22px;
    }

    .wizard-progress-item {
        gap: 4px;
        font-size: 10px;
    }

    .wizard-progress-item span {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .wizard-progress-line {
        min-width: 10px;
        margin: 0 5px;
    }

    .wizard-step-heading {
        gap: 10px;
    }

    .section-number {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .wizard-step-heading h2 {
        font-size: 18px;
    }

    .selection-counter {
        padding: 6px 9px;
        font-size: 10px;
    }

    .service-select-wrap {
        padding: 9px 13px 13px;
    }

    .category-notes {
        margin-left: 13px;
        margin-right: 13px;
    }

    .beneficios-grid,
    .resultado-resumen-wizard,
    .beneficio-resumen-live {
        grid-template-columns: 1fr;
    }

    .discapacidad-options {
        grid-template-columns: 1fr;
    }

    .wizard-actions,
    .wizard-actions-between,
    .wizard-actions-center {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .valor-individual-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .valor-individual-item strong {
        align-self: flex-end;
    }

    .wizard-total {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .wizard-total strong {
        align-self: flex-end;
        font-size: 25px;
    }

    .input-money input {
        font-size: 23px;
    }
}

/* MÓVIL PEQUEÑO */

@media (max-width: 430px) {
    .app-header {
        gap: 10px;
    }

    .header-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        font-size: 21px;
    }

    .app-header h1 {
        font-size: 20px;
    }

    .app-header p {
        font-size: 12px;
    }

    .wizard-progress-item strong {
        display: none;
    }

    .wizard-progress-item span {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .wizard-progress-line {
        min-width: 8px;
    }

    .service-label {
        padding: 12px;
    }

    .service-name {
        font-size: 13px;
    }

    .service-note {
        font-size: 10px;
    }
}


/* 
   INFORMACIÓN SBU — BLOQUE INFORMATIVO AL FINAL DE LOS PROCESOS
    */
.sbu-info-section {
    width: 100%;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dbe5ea;
}

.sbu-info-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding: 0 2px;
}

.sbu-info-section-title span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sbu-info-section-title strong {
    color: #0f6174;
    font-size: 12px;
}

.sbu-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Estas tarjetas son solo de consulta; no tienen controles ni estados de selección. */
.sbu-info-card {
    margin: 0;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 760px) {
    .sbu-info-list {
        grid-template-columns: 1fr;
    }

    .sbu-info-section-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}


/* 
   NUEVO FLUJO V16 — TRÁMITE → CUANTÍA → BENEFICIOS → RESULTADO
    */

.tramite-selector-card,
.tramite-actual-card,
.tramites-agregados {
    width: min(820px, 100%);
    margin: 0 auto;
}

.tramite-selector-card {
    padding: 20px;
    border: 1px solid #d7e2eb;
    border-radius: 13px;
    background: #f8fafc;
}

.tramite-selector-card label,
.cuantia-box label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tramite-select {
    width: 100%;
    min-height: 48px;
    padding: 11px 42px 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    outline: 0;
    cursor: pointer;
}

.tramite-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 98, 122, .10);
}

.field-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.tramites-agregados {
    margin-top: 22px;
}

.tramites-agregados-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tramites-agregados-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 17px;
}

.lista-tramites {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tramite-resumen-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 14px;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    background: #fff;
}

.tramite-resumen-copy {
    min-width: 0;
}

.tramite-resumen-copy span,
.tramite-resumen-copy strong,
.tramite-resumen-copy small {
    display: block;
}

.tramite-resumen-copy span {
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.tramite-resumen-copy strong {
    color: #1e293b;
    font-size: 13px;
    line-height: 1.35;
}

.tramite-resumen-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.tramites-empty {
    padding: 15px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: var(--muted);
    background: #f8fafc;
    text-align: center;
    font-size: 12px;
}

.btn-remove-tramite {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.btn-remove-tramite:hover {
    background: #fef2f2;
}

.tramite-actual-card {
    margin-bottom: 15px;
    padding: 16px 18px;
    border: 1px solid #bfd9e3;
    border-radius: 12px;
    background: #edf7fa;
}

.tramite-actual-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .07em;
}

.tramite-actual-card h3 {
    margin: 0;
    color: #16324f;
    font-size: 18px;
    line-height: 1.35;
}

.tramite-actual-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.wizard-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-outline-primary {
    border: 1px solid var(--primary) !important;
    background: rgb(0,71,186) !important;
    color: white !important;
}

.btn-outline-primary:hover {
    background: #e0dff1 !important;
     color: rgb(0,71,186) !important;
}

.valor-individual-item > div {
    min-width: 0;
}

.valor-individual-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

@media (max-width: 680px) {
    .tramites-agregados-header,
    .tramite-resumen-item,
    .wizard-actions-group {
        align-items: stretch;
        flex-direction: column;
    }

    .wizard-actions-group {
        width: 100%;
    }

    .wizard-actions-group .btn {
        width: 100%;
    }

    .btn-remove-tramite {
        align-self: flex-end;
    }
}

/* 
   V18 — PANTALLA PRINCIPAL DE TRÁMITES Y CUANTÍA
   Selección y cuantía a la izquierda; trámites agregados a la derecha.
    */

.tramites-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
    align-items: start;
    gap: 22px;
    width: 100%;
}

.tramites-workspace-main {
    min-width: 0;
}

.tramites-workspace .tramite-selector-card,
.tramites-workspace .tramite-actual-card,
.tramites-workspace .tramites-agregados {
    width: 100%;
    margin: 0;
}

.tramite-selector-card {
    box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
}

.cuantia-panel {
    margin-top: 14px;
    animation: wizardFade .2s ease;
}

.cuantia-panel .tramite-actual-card {
    margin-bottom: 12px;
}

.cuantia-panel .cuantia-box {
    padding: 20px;
}

.tramite-current-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.tramite-current-actions .btn {
    min-width: 190px;
}

.seleccion-vacia-ayuda {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 17px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.seleccion-vacia-ayuda > span {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f3f8;
    color: var(--primary-dark);
    font-weight: 900;
}

.seleccion-vacia-ayuda strong {
    display: block;
    color: #334155;
    font-size: 13px;
}

.seleccion-vacia-ayuda p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.tramites-resumen-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid #d7e2eb;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
    position: sticky;
    top: 18px;
}

.tramites-resumen-panel .tramites-agregados-header {
    margin-bottom: 12px;
}

.tramites-resumen-panel .lista-tramites {
    max-height: 390px;
    overflow-y: auto;
    padding-right: 2px;
}

.tramites-resumen-panel .tramite-resumen-item {
    background: #fff;
}

.tramites-finalizar {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dbe5ec;
}

.tramites-finalizar p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.btn-finalizar {
    width: 100%;
    min-height: 46px;
}

.btn-finalizar:disabled {
    opacity: .48;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 860px) {
    .tramites-workspace {
        grid-template-columns: 1fr;
    }

    .tramites-resumen-panel {
        position: static;
    }

    .tramites-resumen-panel .lista-tramites {
        max-height: none;
    }
}

@media (max-width: 520px) {
    .tramites-resumen-panel {
        padding: 14px;
    }

    .tramite-current-actions {
        justify-content: stretch;
    }

    .tramite-current-actions .btn {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .beneficio-resumen-live,
    .resultado-final-resumen {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .beneficio-resumen-live,
    .resultado-final-resumen {
        grid-template-columns: 1fr;
    }
}

/* Resultado final: trámites primero y, al final, beneficio y operación de descuento. */
.resultado-contabilidad-final {
    margin-top: 1.5rem;
    border: 1px solid rgba(15, 76, 92, 0.16);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.resultado-contabilidad-linea,
.resultado-contabilidad-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid rgba(15, 76, 92, 0.10);
}

.resultado-contabilidad-linea span,
.resultado-contabilidad-total span {
    color: #52636a;
    font-size: 0.92rem;
}

.resultado-contabilidad-linea strong {
    color: #17333c;
    text-align: right;
}

.resultado-contabilidad-descuento strong {
    color: #444040;
}

.resultado-contabilidad-total {
    border-bottom: 0;
    background: rgba(15, 76, 92, 0.055);
    padding: 1.1rem 1.15rem;
}

.resultado-contabilidad-total span {
    font-weight: 800;
    color: #17333c;
}

.resultado-contabilidad-total strong {
    font-size: 1.45rem;
    color: #0f4c5c;
}

@media (max-width: 600px) {
    .resultado-contabilidad-linea,
    .resultado-contabilidad-total {
        align-items: flex-start;
        flex-direction: column;
    }

    .resultado-contabilidad-linea strong,
    .resultado-contabilidad-total strong {
        text-align: left;
    }
}


/* Refinamiento visual: interfaz minimalista y elegante */
.calculator-card.wizard-card {
    border: 1px solid #e4eaf0;
    border-radius: 22px;
    padding: clamp(18px, 3vw, 34px);
    box-shadow: 0 18px 48px rgba(20, 40, 60, .07);
    background: #fff;
}
.wizard-progress-item { font-size: 12px; letter-spacing: .02em; }
.wizard-progress-item span { width: 32px; height: 32px; flex-basis: 32px; }
.wizard-progress-item.active span,
.wizard-progress-item.completed span { background: var(--primary); border-color: var(--primary); }
.wizard-progress-line { background: #e6edf2; }
.wizard-step-heading h2 { font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -.025em; }
.tramites-workspace { gap: 24px; }
.tramite-selector-card, .tramites-resumen-panel, .cuantia-box {
    border-color: #e5ebf0;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(15, 35, 55, .035);
}
.tramite-select, #tramiteSelect {
    min-height: 48px;
    border-radius: 10px;
    border-color: #d8e1e8;
}
.btn-primary, .btn-finalizar {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover, .btn-finalizar:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.tramite-beneficios-card {
    display: block;
    padding: 17px;
    margin-bottom: 12px;
    border: 1px solid #e5ebf0;
    border-radius: 15px;
    background: #fff;
}
.tramite-card-label, .beneficios-por-tramite-title {
    display: block;
    color: #6b7c8d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: 7px;
}
.tramite-resumen-copy strong { display: block; color: #1e3149; line-height: 1.4; font-size: 14px; }
.tramite-resumen-copy small { display: block; margin-top: 6px; color: #68798b; font-size: 12px; }
.beneficios-por-tramite {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    margin-top: 15px;
    padding: 13px 0;
    border-top: 1px solid #edf1f4;
    border-bottom: 1px solid #edf1f4;
}
.beneficios-por-tramite-title { width: 100%; margin: 0; }
.beneficio-inline { display: inline-flex; align-items: center; gap: 7px; color: #405367; font-size: 12px; font-weight: 600; cursor: pointer; }
.beneficio-inline input { accent-color: var(--primary); width: 15px; height: 15px; }
.discapacidad-inline { width: 100%; max-width: 440px; }
.discapacidad-inline label { display:block; margin-bottom:5px; color:#657789; font-size:11px; font-weight:700; }
.discapacidad-inline select { width:100%; padding:9px 10px; border:1px solid #dce4eb; border-radius:9px; background:#fff; color:#334155; font-size:12px; }
.tramite-card-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-top:11px; }
.beneficio-resumen { color: var(--primary); font-size:11px; font-weight:700; }
.btn-remove-tramite { border:0; background:transparent; color:#a34d4d; font-size:12px; font-weight:700; padding:5px 0; }
.btn-remove-tramite:hover { color:#7f1d1d; text-decoration:underline; }
.valor-individual-item { padding:15px 0; border-bottom:1px solid #edf1f4; }
.valor-individual-item small { display:block; margin-top:5px; color:#697b8c; line-height:1.5; }
.resultado-contabilidad-total { border-radius:12px; }
@media (max-width: 700px) {
    .tramite-card-footer { align-items:flex-start; }
    .beneficios-por-tramite { gap: 11px; }
    .wizard-progress-item { gap:6px; }
    .wizard-progress-line { margin:0 8px; min-width:12px; }
}

/* Ajustes finales: jerarquía visual y resultado legible */
.app-header h1 { letter-spacing: -.035em; }
.app-header p { color: #718096; }
.tramites-agregados-header h3, .valores-individuales-header h3 { letter-spacing: -.02em; }
.tramite-beneficios-card { transition: border-color .18s ease, box-shadow .18s ease; }
.tramite-beneficios-card:hover { border-color: #cbd8e1; box-shadow: 0 8px 24px rgba(15, 35, 55, .06); }
.valor-individual-item > div { min-width: 0; }
.valor-individual-item > div > span { display: block; color: #24364b; font-weight: 700; line-height: 1.45; }
.valor-individual-item > strong { white-space: nowrap; color: #1e3149; font-size: 15px; }
.valor-individual-item small + small { margin-top: 3px; }
#btnVolverTramites { border: 1px solid #d9e2e9; background: #fff; color: #405367; }
#btnVolverTramites:hover { background: #f5f8fa; }
#btnLimpiar { border: 1px solid #d9e2e9; }
@media (max-width: 600px) {
    .valor-individual-item { gap: 12px; }
    .valor-individual-item > strong { font-size: 13px; }
}


/* Ajustes V25: acción explícita para agregar y resultado simplificado */
.btn-nuevo-tramite {
    width: 100%;
    margin-top: .75rem;
    border-style: dashed;
    border-radius: 12px;
    padding: .75rem 1rem;
    font-weight: 700;
}
.resultado-total-unico {
    border: 0;
    background: transparent;
    box-shadow: none;
}
.resultado-total-unico .resultado-contabilidad-total {
    border: 1px solid rgba(15, 76, 92, .14);
    border-radius: 16px;
    background: linear-gradient(135deg, #f3f8fa, #ffffff);
    padding: 1.4rem 1.5rem;
}
.resultado-total-unico .resultado-contabilidad-total strong {
    font-size: clamp(1.7rem, 4vw, 2.25rem);
    letter-spacing: -.035em;
}


/* V26: detalle transparente por trámite, conservando el total general */
.valor-individual-item { align-items: flex-start; }
.valor-individual-detalle { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.valor-individual-detalle > span { margin-bottom: 3px; }
.valor-individual-item .valor-individual-detalle small { display: block; margin-top: 0; color: #526579; font-size: 12px; line-height: 1.5; }
.valor-individual-item .valor-individual-detalle .detalle-etiqueta { display: inline; color: #718096; font-weight: 600; font-size: inherit; }
.valor-individual-item .valor-individual-detalle .detalle-total-tramite { margin-top: 3px; color: #1e3149; font-weight: 800; }
@media (max-width: 600px) {
    .valor-individual-item { align-items: flex-start; }
    .valor-individual-item > strong { padding-top: 2px; }
}
