

.diesel-layout-main {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.diesel-page {
    --diesel-navy: #113457;
    --diesel-navy-dark: #0c2844;
    --diesel-blue: #185e96;
    --diesel-blue-soft: #e8f4fc;
    --diesel-ink: #153149;
    --diesel-muted: #61778e;
    --diesel-border: #d5e4ef;
    --diesel-background: #f4f8fb;
    --diesel-white: #fff;
    --diesel-shadow: 0 9px 24px rgba(15, 49, 76, .065);
    width: 100%;
    max-width: none;
    margin: 0 0 24px;
    padding: 0;
    position: static;
    left: auto;
    transform: none;
    color: var(--diesel-ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

    .diesel-page *,
    .diesel-page *::before,
    .diesel-page *::after {
        box-sizing: border-box;
    }

    /* El fondo ocupa el ancho COMPLETO de la pantalla, sin márgenes ni esquinas. */
    .diesel-page .diesel-banner-bleed {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        border-radius: 0;
        background: linear-gradient(105deg, #0b2947 0%, #153e64 53%, #2978ab 100%);
    }

    /* Solo el contenido del banner tiene ancho máximo, como la referencia. */
    .diesel-page .diesel-banner-inner {
        width: min(1500px, calc(100% - 36px));
        margin: 0 auto;
    }

    .diesel-page .diesel-page-heading {
        display: flex;
        align-items: center;
        gap: 16px;
        min-height: 86px;
        padding: 10px 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #fff;
    }

    .diesel-page .diesel-heading-logo-box {
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 0 0 95px;
        width: 95px;
        height: 66px;
        padding: 8px;
        border-radius: 13px;
        background: #fff;
    }

    .diesel-page .diesel-heading-logo {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: 52px;
        object-fit: contain;
    }

    .diesel-page .diesel-heading-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .diesel-page .diesel-kicker {
        display: block;
        margin-bottom: 3px;
        color: #eff7ff;
        font-size: 10px;
        font-weight: 800;
        line-height: 1.35;
        letter-spacing: .12em;
    }

    .diesel-page .diesel-page-heading h1 {
        margin: 0;
        color: #fff;
        font-size: clamp(20px, 2.2vw, 26px);
        font-weight: 800;
        line-height: 1.16;
    }

    .diesel-page .diesel-page-heading p {
        margin: 5px 0 0;
        color: #e1eff9;
        font-size: 11px;
        line-height: 1.35;
    }

    .diesel-page .diesel-heading-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        gap: 8px;
        padding: 9px 12px;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, .22);
        border-radius: 12px;
        background: rgba(255, 255, 255, .09);
        color: #fff;
        font-size: 11px;
        font-weight: 750;
        line-height: 1.2;
        white-space: nowrap;
    }

    .diesel-page .diesel-heading-dot {
        display: inline-block;
        flex: 0 0 9px;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #83e3bd;
        box-shadow: 0 0 0 3px rgba(131, 227, 189, .13);
    }

    /* SOLO el formulario, resultados y nota conservan un ancho de lectura cómodo. */
    .diesel-page .diesel-page-content {
        width: min(1280px, calc(100% - 36px));
        margin: 24px auto 0;
    }

.diesel-main-grid {
    display: grid;
    grid-template-columns: minmax(335px, 0.94fr) minmax(0, 1.56fr);
    gap: 16px;
    align-items: start;
}

.diesel-card {
    border: 1px solid var(--diesel-border);
    border-radius: 16px;
    background: var(--diesel-white);
    box-shadow: var(--diesel-shadow);
}

.diesel-form-card {
    padding: 20px;
}

.diesel-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.diesel-step {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border-radius: 12px;
    color: #13609a;
    background: #e7f4fc;
    font-size: 13px;
    font-weight: 800;
}

.diesel-section-kicker {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 800;
    color: var(--diesel-blue);
    letter-spacing: .095em;
}

.diesel-page h2, .diesel-page h3 {
    margin: 0;
    font-weight: 750;
    color: var(--diesel-navy-dark);
}

.diesel-card-heading h2, .diesel-results-heading h2 {
    font-size: 19px;
}

.diesel-field label {
    display: block;
    margin-bottom: 6px;
    color: #254766;
    font-size: 12px;
    font-weight: 750;
}

.diesel-value-field {
    margin-bottom: 18px;
    padding: 13px;
    border: 1px solid #d6e7f3;
    border-radius: 12px;
    background: #f1f8fd;
}

.diesel-money-field {
    position: relative;
}

.diesel-currency {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-weight: 800;
    color: var(--diesel-navy-dark);
    z-index: 1;
}

.diesel-page .form-control, .diesel-page .form-select {
    width: 100%;
    min-width: 0;
    height: 41px;
    border: 1px solid #cbddea;
    border-radius: 9px;
    background-color: #fff;
    color: #1a3c5a;
    font-size: 12px;
    box-shadow: none;
}

    .diesel-page .form-control:focus, .diesel-page .form-select:focus {
        border-color: #347db8;
        box-shadow: 0 0 0 3px rgba(24, 94, 150, .14);
    }

.diesel-page #valor_a_ajustar {
    padding-left: 32px;
    font-size: 14px;
}

.diesel-periods {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.diesel-period-card {
    margin: 0;
    padding: 12px 11px 13px;
    min-width: 0;
    border: 1px solid var(--diesel-border);
    border-radius: 12px;
    background: #fff;
}

    .diesel-period-card legend {
        float: none;
        width: auto;
        margin: 0 0 9px;
        padding: 0;
        color: #234d70;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

.diesel-period-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 5px 1px 0;
    border-radius: 100%;
    background: #2a84bb;
}

.diesel-period-final .diesel-period-dot {
    background: #0c9478;
}

.diesel-select-row {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
    gap: 5px;
}

    .diesel-select-row .diesel-field label {
        margin-bottom: 4px;
        color: #547089;
        font-size: 11px;
    }

.diesel-page .diesel-select-row .form-select {
    height: 39px;
    font-size: 11px;
    padding: 7px 25px 7px 7px;
    background-position: right 6px center;
    background-size: 11px 9px;
}

.diesel-period-arrow {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #d4e1ea;
    border-radius: 50%;
    color: #6b859b;
    background: #edf4f9;
    font-size: 10px;
}

.diesel-calculate-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 10px;
    padding: 5px 5px 5px 16px;
    background: linear-gradient(100deg, #123b63, #216c9c);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: filter .16s ease, transform .16s ease;
}

    .diesel-calculate-btn:hover {
        filter: brightness(1.08);
    }

    .diesel-calculate-btn:active {
        transform: translateY(1px);
    }

    .diesel-calculate-btn:focus-visible {
        outline: 3px solid #7bc1ef;
        outline-offset: 3px;
    }

.diesel-calculate-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .15);
}

.diesel-right-column {
    display: flex;
    flex-direction: column;
    gap: 17px;
    min-width: 0;
}

.diesel-method-card {
    overflow: hidden;
}

.diesel-method-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

    .diesel-method-topline h2 {
        font-size: 14px;
    }

.diesel-formula-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #d0e2ee;
    border-radius: 9px;
    background: #fff;
    color: #1b537e;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
}

    .diesel-formula-toggle:hover {
        background: #eef7fd;
    }

    .diesel-formula-toggle:focus-visible {
        outline: 3px solid #7bc1ef;
        outline-offset: 2px;
    }

    .diesel-formula-toggle[aria-expanded="true"] .diesel-chevron {
        transform: rotate(180deg);
    }

.diesel-formula-content {
    padding: 15px;
    border-top: 1px solid var(--diesel-border);
    background: #fcfeff;
}

.diesel-formula-intro {
    margin: 0 0 15px;
    color: #425d74;
    font-size: 12px;
}

.diesel-formulas-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.diesel-formula-panel {
    min-width: 0;
    padding: 15px 10px;
    border: 1px solid #d8e8f1;
    border-radius: 11px;
    background: #f3f9fd;
}

    .diesel-formula-panel h3 {
        margin-bottom: 12px;
        font-size: 13px;
        text-align: center;
    }

.diesel-equation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 76px;
    margin-bottom: 12px;
    color: #1d608d;
    font-family: Cambria, Georgia, serif;
    font-size: clamp(12px, 1.05vw, 16px);
    font-style: italic;
    text-align: center;
}

.diesel-fraction {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    line-height: 1.45;
    white-space: nowrap;
}

    .diesel-fraction > span:first-child {
        width: 100%;
        padding: 0 3px 3px;
        border-bottom: 1.5px solid currentColor;
    }

    .diesel-fraction > span:last-child {
        padding-top: 3px;
    }

.diesel-fraction-wide {
    font-size: .84em;
}

.diesel-equation sub {
    font-size: .7em;
}

.diesel-formula-panel p {
    margin: 5px 0 0;
    color: #59758d;
    font-size: 11px;
}

.diesel-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 10px;
}

.diesel-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #d9e9f0;
    border-radius: 100px;
    color: #3a647d;
    background: #fff;
    font-size: 10px;
    white-space: nowrap;
}

.diesel-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1aa77b;
}

.diesel-result-card {
    padding: 23px 24px;
    min-height: 230px;
}

.diesel-result-period {
    margin-bottom: 9px;
    color: #6a8093;
    font-size: 12px;
}

    .diesel-result-period:empty {
        display: none;
    }

.diesel-result-variation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 0 17px;
}

.diesel-result-label {
    color: #58758c;
    font-size: 12px;
    font-weight: 650;
}

.diesel-result-variation #Variacion {
    color: #1b6098;
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.2;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.diesel-result-values.invisible {
    display: none !important;
}

.diesel-adjusted-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 10px 15px;
    margin-bottom: 13px;
    border-top: 1px solid #e7eef3;
    border-bottom: 1px solid #e7eef3;
}

.diesel-adjusted-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    color: #0d395c;
    font-size: clamp(23px, 2.7vw, 34px);
    line-height: 1.3;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.diesel-indices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

    .diesel-indices > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 11px 7px;
        border-radius: 9px;
        background: #f0f7fb;
    }

    .diesel-indices span {
        color: #607b92;
        font-size: 11px;
    }

    .diesel-indices strong {
        color: #184e79;
        font-size: 16px;
        font-weight: 800;
    }

.diesel-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 15px 18px;
    border: 1px solid #d7e5ee;
    border-radius: 13px;
    background: #f9fcfe;
}

.diesel-note-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 29px;
    height: 29px;
    border-radius: 9px;
    background: #e7f3fb;
    color: #1b6399;
}

.diesel-note h2 {
    margin: 0 0 3px;
    color: #174b74;
    font-size: 12px;
    font-weight: 800;
}

.diesel-note p {
    margin: 0;
    color: #58738a;
    font-size: 12px;
}

/* Pantallas medianas */
@media (max-width: 1100px) {
    .diesel-main-grid {
        grid-template-columns: minmax(300px, .95fr) minmax(0, 1.2fr);
    }

    /* Impide que los combos de año/mes queden cortados
       cuando el panel izquierdo se estrecha. */
    .diesel-periods {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .diesel-period-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .diesel-select-row {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
        gap: 8px;
    }

    .diesel-formulas-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet / pantallas angostas */
@media (max-width: 880px) {
    .diesel-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

/* Teléfonos */
@media (max-width: 580px) {
    .diesel-form-card {
        padding: 16px;
    }

    .diesel-periods {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .diesel-period-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .diesel-select-row {
        grid-template-columns: .85fr 1.15fr;
        gap: 10px;
    }

    .diesel-formulas-grid {
        grid-template-columns: 1fr;
    }

    .diesel-equation {
        font-size: 16px;
    }

    .diesel-results-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .diesel-result-card {
        padding: 21px 16px;
    }

    .diesel-note {
        padding: 13px;
    }
}

/* ---------------------------------------------------------------------------
   ÍCONOS SVG AUTÓNOMOS: no dependen de Font Awesome ni de internet.
   --------------------------------------------------------------------------- */
.diesel-page .diesel-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: inherit;
    overflow: visible;
}

.diesel-page .diesel-period-arrow .diesel-icon {
    width: 13px;
    height: 13px;
}

.diesel-page .diesel-calculate-icon .diesel-icon {
    width: 18px;
    height: 18px;
}

.diesel-page .diesel-formula-toggle .diesel-icon {
    width: 15px;
    height: 15px;
}

.diesel-page .diesel-formula-toggle .diesel-chevron {
    transition: transform .18s ease;
}

.diesel-page .diesel-note-icon .diesel-icon {
    width: 17px;
    height: 17px;
}


/* Banner responsive, sin recuperar los márgenes o esquinas antiguos. */
@media (max-width: 880px) {
    .diesel-page .diesel-banner-inner {
        width: calc(100% - 28px);
    }

    .diesel-page .diesel-page-content {
        width: calc(100% - 28px);
        margin-top: 18px;
    }
}

@media (max-width: 580px) {
    .diesel-page .diesel-banner-inner {
        width: calc(100% - 20px);
    }

    .diesel-page .diesel-page-heading {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 0;
    }

    .diesel-page .diesel-heading-logo-box {
        flex: 0 0 66px;
        width: 66px;
        height: 62px;
        padding: 6px;
        border-radius: 12px;
    }

    .diesel-page .diesel-heading-logo {
        height: 49px;
    }

    .diesel-page .diesel-heading-main {
        flex: 1 1 calc(100% - 80px);
    }

    .diesel-page .diesel-kicker {
        font-size: 9px;
        letter-spacing: .06em;
    }

    .diesel-page .diesel-page-heading h1 {
        font-size: 19px;
    }

    .diesel-page .diesel-page-heading p {
        font-size: 10px;
    }

    .diesel-page .diesel-heading-chip {
        margin-left: auto;
        padding: 7px 10px;
        font-size: 10px;
    }

    .diesel-page .diesel-page-content {
        width: calc(100% - 20px);
        margin-top: 14px;
    }
}

/* FOOTER INSTITUCIONAL: barra completa, contenido en cuatro columnas. */
.diesel-site-footer {
    width: 100%;
    color: #fff;
    background: #1d5ea1;
    font-size: 12px;
    line-height: 1.5;
}

.diesel-site-footer__grid {
    display: grid;
    grid-template-columns: .85fr 1.12fr 1.12fr 1.35fr;
    align-items: start;
    gap: 28px;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 26px 0 24px;
}

.diesel-site-footer__column {
    min-width: 0;
}

.diesel-site-footer__logo {
    display: block;
    width: 110px;
    height: auto;
    max-width: 100%;
    margin-bottom: 12px;
}

.diesel-site-footer h2 {
    margin: 0 0 7px;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
}

.diesel-site-footer p,
.diesel-site-footer ul {
    margin: 0;
}

.diesel-site-footer a {
    color: #fff;
    text-underline-offset: 2px;
}

    .diesel-site-footer a:hover {
        color: #d7ecff;
    }

.diesel-site-footer__links {
    margin: 0;
    padding: 0;
    list-style: none;
}

    .diesel-site-footer__links li {
        margin: 0 0 4px;
    }

        .diesel-site-footer__links li:last-child {
            margin-bottom: 0;
        }

.diesel-site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 6px;
}

    .diesel-site-footer__social a {
        font-size: 11px;
    }

.diesel-site-footer__bottom {
    background: #103a5e;
    padding: 15px 16px;
    color: #fff;
    text-align: center;
}

    .diesel-site-footer__bottom a {
        text-decoration: none;
    }

@media (max-width: 991.98px) {
    .diesel-site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 34px;
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

@media (max-width: 575.98px) {
    .diesel-site-footer__grid {
        width: calc(100% - 36px);
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
        padding: 22px 0 20px;
    }

    .diesel-site-footer__logo {
        width: 104px;
    }

    .diesel-site-footer h2 {
        margin-bottom: 5px;
    }

    .diesel-site-footer__bottom {
        padding: 12px 10px;
    }
}


/* ===========================================================================
   ACTUALIZACIÓN: FONDO UNIFORME Y RESUMEN COMPACTO
   20/10/2026
   El cuerpo solo adopta esta apariencia en la vista Diesel, identificada por
   la clase diesel-theme agregada en _Layout.cshtml.
   =========================================================================== */

html:has(body.diesel-theme),
body.diesel-theme {
    background: #f4f7fa !important;
    background-image: none !important;
    background-attachment: initial !important;
}

    /* Quita figuras y capas decorativas heredadas del CSS anterior. */
    body.diesel-theme::before,
    body.diesel-theme::after,
    body.diesel-theme .diesel-layout-main::before,
    body.diesel-theme .diesel-layout-main::after {
        content: none !important;
        display: none !important;
        background: none !important;
    }

    body.diesel-theme .diesel-layout-main,
    body.diesel-theme .diesel-page,
    body.diesel-theme .diesel-page-content,
    body.diesel-theme .diesel-main-grid,
    body.diesel-theme .diesel-results-section {
        background: transparent !important;
        background-image: none !important;
    }

        /* El banner mantiene su degradado, de lado a lado. El footer conserva azul. */
        body.diesel-theme .diesel-page .diesel-banner-bleed {
            background: linear-gradient(105deg, #0b2947 0%, #153e64 53%, #2978ab 100%) !important;
        }

        /* El resumen ocupa solo el alto que requieren sus datos.
   Se sobreescriben alturas heredadas de style-calculadora.css. */
        body.diesel-theme .diesel-page .diesel-result-card {
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;
            padding: 18px 22px !important;
            align-self: start;
            flex: 0 0 auto;
        }

    body.diesel-theme .diesel-result-period {
        margin-bottom: 5px;
        line-height: 1.45;
    }

    body.diesel-theme .diesel-result-variation {
        gap: 2px;
        padding: 6px 0 11px;
    }

        body.diesel-theme .diesel-result-variation #Variacion {
            font-size: clamp(26px, 2.6vw, 34px);
        }

    body.diesel-theme .diesel-adjusted-value {
        gap: 2px;
        padding: 10px 8px 12px;
        margin-bottom: 10px;
    }

    body.diesel-theme .diesel-adjusted-number {
        font-size: clamp(23px, 2.5vw, 30px);
        gap: 0;
    }

    body.diesel-theme .diesel-indices > div {
        padding: 9px 7px;
    }

@media (max-width: 580px) {
    body.diesel-theme .diesel-page .diesel-result-card {
        padding: 16px !important;
    }
}


/* ===========================================================================
   ALINEACIÓN DE PANELES: RESUMEN / FORMULARIO
   El borde inferior del resultado coincide con el del panel de la izquierda.
   Solo escritorio: no fuerza alturas en tablet o teléfono.
   =========================================================================== */
@media (min-width: 1101px) {
    /* La columna derecha puede ocupar el mismo alto que el formulario. */
    body.diesel-theme .diesel-main-grid {
        align-items: stretch;
    }

    body.diesel-theme .diesel-right-column {
        height: 100%;
        min-height: 0;
    }

    body.diesel-theme .diesel-results-section {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    /* El resultado se adapta al espacio disponible, sin una altura fija. */
    body.diesel-theme .diesel-page .diesel-result-card {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        justify-content: space-between;
        align-self: stretch;
        height: auto !important;
        min-height: 0 !important;
        padding: 12px 18px !important;
    }

    /* Se recortan los espacios sobrantes manteniendo legibles los datos. */
    body.diesel-theme .diesel-result-variation {
        padding: 3px 0 5px;
    }

    body.diesel-theme .diesel-adjusted-value {
        padding: 6px 8px 7px;
        margin-bottom: 6px;
    }

    body.diesel-theme .diesel-indices > div {
        padding: 7px;
    }

    /* Al abrir las fórmulas, permitir que crezca la derecha sin
       estirar innecesariamente el formulario izquierdo. */
    body.diesel-theme .diesel-main-grid:has(#collapseOne.show, #collapseOne.collapsing) {
        align-items: start;
    }

        body.diesel-theme .diesel-main-grid:has(#collapseOne.show, #collapseOne.collapsing) .diesel-right-column {
            height: auto;
        }

        body.diesel-theme .diesel-main-grid:has(#collapseOne.show, #collapseOne.collapsing) .diesel-results-section {
            flex: 0 1 auto;
        }

        body.diesel-theme .diesel-main-grid:has(#collapseOne.show, #collapseOne.collapsing) .diesel-result-card {
            flex: 0 0 auto;
        }
}

/* ============================================================================
   ESTADO INICIAL: CENTRAR "SIN VARIACIÓN"
   Detecta la clase invisible que ya controla Calculadora.js.
   Cuando el cálculo aparece, estas reglas se desactivan automáticamente.
   ============================================================================ */
body.diesel-theme .diesel-page .diesel-result-card:has(#calculaict.invisible) {
    justify-content: center !important;
    align-items: center;
}

    /* No reservar espacio para el período todavía vacío ni para el separador. */
    body.diesel-theme .diesel-page .diesel-result-card:has(#calculaict.invisible) #p_uno,
    body.diesel-theme .diesel-page .diesel-result-card:has(#calculaict.invisible) #p_dos {
        display: none !important;
    }

    body.diesel-theme .diesel-page .diesel-result-card:has(#calculaict.invisible) #p_tres {
        width: 100%;
        flex: 0 0 auto;
        align-self: center;
        justify-content: center;
        align-items: center;
        padding: 0 !important;
        margin: 0;
        text-align: center;
    }


/* ===========================================================================
   FOOTER: LOGO COMPACTO + ICONOS DE REDES SOCIALES
   Referencia: iconos blancos, alineados, sin enlaces de texto.
   =========================================================================== */
.diesel-site-footer .diesel-site-footer__logo {
    display: block;
    width: 110px;
    max-width: 100%;
    height: auto;
    margin: 0 0 10px;
    object-fit: contain;
}

.diesel-site-footer .diesel-site-footer__column:first-child h2 {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
}

.diesel-site-footer .diesel-site-footer__social {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin: 0;
    padding: 0;
}

    .diesel-site-footer .diesel-site-footer__social a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 24px;
        flex: 0 0 22px;
        padding: 0;
        text-decoration: none;
        color: #fff;
        line-height: 1;
        transition: opacity 150ms ease, transform 150ms ease;
    }

        .diesel-site-footer .diesel-site-footer__social a svg {
            display: block;
            width: 21px;
            height: 21px;
            flex: 0 0 21px;
        }

        .diesel-site-footer .diesel-site-footer__social a:hover {
            color: #fff;
            opacity: .78;
            transform: translateY(-2px);
        }

        .diesel-site-footer .diesel-site-footer__social a:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 4px;
            border-radius: 3px;
        }

@media (max-width: 575.98px) {
    .diesel-site-footer .diesel-site-footer__logo {
        width: 108px;
    }
}

/* ============================================================================
   FOOTER PEGADO AL BORDE INFERIOR — 21/10/2026
   Soluciona la franja del color de fondo bajo el pie en páginas con poco alto.
   Se aplica solo al body.diesel-theme (calculadora IAPD).
   ============================================================================ */
html:has(> body.diesel-theme) {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body.diesel-theme {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 !important;
    padding: 0 !important;
}

    /* El contenido ocupa el espacio disponible y empuja el footer hacia abajo.
   No modifica el alto real de las tarjetas ni los cálculos. */
    body.diesel-theme > main.diesel-layout-main {
        flex: 1 0 auto;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    body.diesel-theme > footer.diesel-site-footer {
        flex: 0 0 auto;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.diesel-theme .diesel-site-footer__bottom {
        margin-bottom: 0;
    }
