body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.navbar {
    width: 100%;
    background: #009a00 !important;
    color: white;
}

.content {
    /* margin-left: 260px; */
    padding: 0 !important;
    flex-grow: 1;
    display: flex;
}

.content-page {
    padding: 20px;
    width: 100%;
}

.navbar .navbar-brand {
    display: flex;
    align-items: center;
}

.navbar .navbar-brand img {
    margin-right: 10px;
}

/* Sidebar debajo del navbar */
.sidebar {
    width: 250px;
    /* background: white; */
    color: #343a40;
    min-height: calc(100vh - 56px); /* Restamos la altura del navbar */
    padding: 20px;
    /* margin-right: 20px; */
    /* position: fixed; */
    top: initial; /* La altura del navbar */
    left: 0;
    /* overflow-y: auto; */
    /* z-index: ; */
    background-color: #fff;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar a {
    color: #343a40;
    text-decoration: none;
    display: block;
    padding: 6px;
    border-radius: 5px;
    font-size: 14px;
}

.sidebar a:hover {
    background: #ffc500;
    color: #009a00 !important;
}

footer {
    /* position: fixed; */
    bottom: 0;
    background-color: #094682;
    color: white;
    width: 100%;
    padding: 12px 0;
    font-size: 13px;
    text-align: center;
    z-index: 999;
}

footer a,
footer p {
    color: white !important;
    /* text-decoration: underline; */
}

/* ---------- MOBILE XS (<=576) ---------- */
@media (max-width: 576px) {
    .navbar .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    .content-page {
        /* padding: 0 12px;  un pequeño padding lateral para compensar la row */
    }

    .content-page .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .navbar-brand span {
        font-size: 14px;
    }

    aside {
        display: none;
    }

    .container-fluid {
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .botones-home {
        width: 80%;
        display: flex;
        justify-content: center;
    }
}

/* ---------- MOBILE / TABLET PEQUEÑO (<=768) ---------- */
@media (max-width: 767.98px) {
    .sidebar {
        display: none !important;
    }

    .content {
        margin-left: 0;
    }

    /* Ocultar botón volver en móvil */
    #back-arrow {
        display: none !important;
    }
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
    display: none;
}

.navbar-toggler.collapsed .navbar-close-icon {
    display: none;
}

/* ---------- FOOTER DESKTOP ---------- */
.site-footer-desktop {
    bottom: 0;
    background-color: #094682;
    color: white;
    width: 100%;
    padding: 12px 0;
    font-size: 13px;
    text-align: center;
    z-index: 999;
}

.site-footer-desktop a,
.site-footer-desktop p {
    color: white !important;
}

/* ---------- NAV INFERIOR MÓVIL / TABLET ---------- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: #ffffff;
    border-top: 1px solid #e4e4e4;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    color: #666666;
}

.mobile-nav-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
}

.mobile-nav-item span {
    display: block;
    line-height: 1;
}

.mobile-nav-item.active,
.mobile-nav-item:focus,
.mobile-nav-item:hover {
    color: #009a00;
}

/* Botón flotante central (tipo app bancaria) */
.mobile-nav-item-center {
    position: relative;
    flex: 0 0 auto;
}

.mobile-nav-floating-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #009a00;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -32px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.mobile-nav-floating-btn i {
    color: #ffffff;
    font-size: 22px;
}

/* Para que el contenido no quede tapado por el nav inferior en móvil/tablet */
@media (max-width: 991.98px) {
    .content-page {
        padding-bottom: 90px;
    }
}
/* Tarjetas móviles de préstamos */
.pagos-card {
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.pagos-card + .pagos-card {
    margin-top: 0.5rem;
}

/* Tarjetas móviles de cuotas */
.cuota-card {
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.cuota-card + .cuota-card {
    margin-top: 0.5rem;
}

.cuota-card .label {
    font-size: 0.75rem;
    color: #6c757d;
}

/* ---------- Tarjeta de Solicitar Préstamo ---------- */
.card-solicitud {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
    border: 0;
    padding: 24px; /* Desktop / tablet */
    background-color: #fff;
}

/* Formulario interno */
.form-solicitud {
    padding: 20px;
}

/* Flecha de volver: ya está bien así en desktop, solo afinamos en móvil abajo */
#back-arrow {
    margin-bottom: 8px;
}

/* ---------- Versión móvil ---------- */
@media (max-width: 576px) {
    /* Un poco menos de aire lateral en toda la página */
    .content-page {
        padding: 12px 10px 80px; /* bottom 80px por la barra inferior */
    }

    .card-solicitud {
        padding: 12px 10px; /* reduce padding de la card */
        box-shadow: none; /* se ve más “plano” en móvil */
        border-radius: 0;
    }

    .form-solicitud {
        padding: 10px 4px; /* casi sin doble caja */
        box-shadow: none; /* quitamos sombra interna */
        border-radius: 8px;
        background-color: #ffffff;
    }

    /* Ocultar la flecha de volver si quieres que no duplique navegación */
    #back-arrow {
        display: none;
    }

    /* Título y descripción más compactos */
    .content-page > .container-fluid > h4 {
        margin-top: 6px;
        margin-bottom: 2px;
        font-size: 1.05rem;
    }
    .content-page > .container-fluid > p.text-muted {
        margin-bottom: 8px;
        font-size: 0.9rem;
    }
}
