html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/*
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
*/










html, body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--app-bg);
    color: var(--app-text);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1 0 auto;
}

/* =========================
   Header / navbar layout
   ========================= */

.app-header {
    background-color: var(--brand-dark);
}

.app-navbar {
    min-height: 72px;
}

.app-navbar-brand {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    padding-right: 1.5rem;
    flex-shrink: 0;
    text-decoration: none;
}

.app-navbar-logo {
    display: block;
    height: 52px;
    width: auto;
    max-width: 280px;
}

.app-navbar-menu-wrap {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.app-main-menu {
    align-items: center;
    gap: 0.15rem;
}

    .app-main-menu .nav-link {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        font-weight: 500;
    }


    /*
    .app-main-menu .dropdown-menu {
        border-radius: 0.75rem;
        border: 1px solid var(--app-border);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
    }

    .app-main-menu .dropdown-item {
        font-weight: 500;
    }

        .app-main-menu .dropdown-item:hover,
        .app-main-menu .dropdown-item:active {
            background-color: var(--brand-primary-soft);
            color: var(--app-text);
        }
*/

    .app-main-menu .dropdown-menu {
        background-color: var(--brand-dark-elevated);
        border-radius: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.10);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
        padding: 0.4rem;
    }

    .app-main-menu .dropdown-item {
        font-weight: 500;
        color: #fff;
        border-radius: 0.5rem;
    }

        .app-main-menu .dropdown-item:hover,
        .app-main-menu .dropdown-item:focus,
        .app-main-menu .dropdown-item:active {
            background-color: rgba(255, 255, 255, 0.10);
            color: var(--brand-primary);
        }


.app-navbar-login-wrap {
    display: flex;
    align-items: center;
}

.app-login-nav {
    align-items: center;
}



/*
.app-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem !important;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff !important;
    text-decoration: none;
    line-height: 1.1;
}

    .app-user-pill:hover {
        background-color: rgba(255, 255, 255, 0.16);
        color: #fff !important;
    }

.app-user-pill-icon {
    font-size: 0.85rem;
    opacity: 0.95;
}
*/

/* =========================================================
   Header - user pill
   ========================================================= */

.app-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background-color: rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}

    .app-user-pill:hover,
    .app-user-pill:focus {
        border-color: rgba(255, 255, 255, 0.28);
        border-color: rgba(255, 255, 255, 0.34);
        background-color: rgba(255, 255, 255, 0.14);
        background-color: rgba(255, 255, 255, 0.18);
        color: #fff !important;
        text-decoration: none;
        box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.08);
    }

    .app-user-pill:active {
        transform: translateY(1px);
    }

.app-user-pill-icon {
    font-size: 0.95rem;
}

.app-user-pill:hover .app-user-pill-icon,
.app-user-pill:focus .app-user-pill-icon {
    opacity: 1;
}

.app-user-pill > span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}





.app-logout-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Footer */
.app-footer {
    background-color: var(--brand-dark);
    color: #fff;
}

    .app-footer a {
        color: var(--brand-primary);
        text-decoration: none;
    }

        .app-footer a:hover {
            color: #fff;
        }

/* Separador logo / menú: solo desktop */
@media (min-width: 992px) {
    .app-navbar-brand::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 1px;
        height: 34px;
        background-color: rgba(255, 255, 255, 0.18);
    }
}

/* Móvil / tablet */
@media (max-width: 991.98px) {
    .app-navbar-brand {
        margin-right: 0.5rem;
        padding-right: 0;
    }

    .app-navbar-logo {
        height: 44px;
        max-width: 220px;
    }

    .app-main-menu {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
        gap: 0;
    }

    .app-navbar-login-wrap {
        margin-top: 0.5rem;
    }

    .app-user-pill {
        justify-content: center;
    }
}





.app-main-menu .dropdown-toggle::after {
    margin-left: 0.45rem;
}

.app-main-menu .dropdown-menu[data-bs-popper] {
    /*margin-top: 0.5rem;*/
    margin-top: 1rem;
}


.dropdown-item i {
    width: 1.1rem;
    text-align: center;
}












.app-main-menu .nav-link {
    color: rgba(255,255,255,0.85);
}

    .app-main-menu .nav-link:hover {
        color: #fff;
    }












/* bloque aceptar cookies */
#cookieConsent {
    z-index: 2000; /* cuanto mas alto, mas primer plano (meto 2000 pq el footer tiene 1030) */
    background-color: #eee;
    position: absolute;
    bottom: 0px;
    left: 0px;
    margin: 0px;
    padding: 60px;
    border: none;
    border-top: 1px solid #ddd;
    border-radius: 0px;
    width: 100%;
    min-width: 100%;
    text-align: center;
    box-shadow: 0px -3px 5px #ddd;
}

    #cookieConsent a {
        margin: 0 30px;
    }

    #cookieConsent button {
        margin-left: 30px;
    }







/* añado tamaño xs (mas pequeño q small), bootstrap 5 ya no lo incluye... */
/*pero coño, aqui meti input-XX, pero esa nomenclatura no se si existe en mi version de bootstrap... lo q si existe es .form-control-XX... */
.form-control-xs,
.input-xs, .btn-xs {
    height: 22px;
    /*padding: 2px 5px;*/
    padding: 0px 5px;
    font-size: 12px;
    line-height: 1.5; /* If Placeholder of the input is moved up, rem/modify this. */
    border-radius: 3px;
}

.input-group-xs > .form-control,
.input-group-xs > .input-group-addon,
.input-group-xs > .input-group-btn > .btn {
    height: 22px;
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
}

.translate-middle {
    transform: translate(-100%, -50%) !important;
}


/* listados paginas index */
.colBotones {
    background-color: #f1f1f1 !important;
}







.boxFiltro .accordion-body {
    border: 1px solid #ccc;
    background-color: #eef2f5;
}

.boxFiltro .accordion-button {
    padding: 0.2rem 0.75rem;
    padding-top: 0.5rem;
    background-color: #657178;
    color: white;
}

.accordion-button {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

    .accordion-button::after {
        margin-left: 0;
        margin-right: 0.75rem;
        margin-bottom: 0.3rem;
    }

    .accordion-button::after {
        /* Color icono acordeón: brand-primary (#84CC16).
           Nota: Bootstrap usa un SVG como background-image; por eso se recolorea con filter. */
        filter: brightness(0) saturate(100%) invert(63%) sepia(89%) saturate(628%) hue-rotate(42deg) brightness(92%) contrast(93%);
    }


.boxFiltro .form-label {
    margin-bottom: 0rem;
}


.filter-layout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.filter-actions-column {
    flex: 0 0 10.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-actions-column .btn {
    min-width: 10.5rem;
    justify-content: center;
}

.filter-actions-column .btn i {
    margin-right: 0.35rem;
}

.filter-fields-column {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .filter-layout {
        gap: 0.75rem;
    }

    .filter-actions-column {
        flex-basis: 9rem;
    }

    .filter-actions-column .btn {
        min-width: 9rem;
    }
}






.boxPaginacionInfo {
    margin-top: 15px;
}


/* Focus de botones/acordeones con color principal de producto */


.btn:focus,
.btn:active:focus,
.btn-check:focus + .btn,
.btn-check:active + .btn,
.btn.show:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.accordion-button:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}


/* para ojo en campos password */
.password-toggle-wrap {
    position: relative;
}

    .password-toggle-wrap .password-toggle-icon {
        position: absolute;
        right: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        cursor: pointer;
        color: #6c757d;
        line-height: 1;
    }

    .password-toggle-wrap .form-control {
        padding-right: 2.8rem;
    }












/* Formularios de edición/alta.
   Permite usar varios .row seguidos sin que queden pegados y acerca el label al campo. */
.app-form .row + .row {
    margin-top: .75rem;
}

.app-form .form-label {
    margin-bottom: .2rem;
}

.app-form-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: .75rem;
}

.app-form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
}

/* Marca visual para labels de campos obligatorios.
   RequiredTagHelper añade el span .required-field-icon cuando detecta [Required]. */
.required-field-icon {
    width: .85rem;
    height: .85rem;
    line-height: .85rem;
    font-size: .35rem;
    margin-left: .35rem;
    vertical-align: .15em;
    color: var(--brand-primary);
}

.required-field-icon .fa-stack-2x {
    font-size: 2em;
}

.required-field-icon .fa-stack-1x {
    font-size: 1.5em;
    line-height: 1.1em;
    transform: translateY(.01em);
}

.required-fields-note {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #6c757d;
    font-size: .875rem;
}

.required-fields-note .required-field-icon {
    margin-left: 0;
}







/* Headers ordenables en listados */
.sortable-header-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.sortable-header-link:hover {
    color: inherit;
    text-decoration: none;
}

.sortable-header-icons {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    margin-left: .35rem;
    line-height: 1;
    /*transform: translateY(.02rem);*/
    transform: translateY(-4px);
}

.sortable-header-icon {
    color: #adb5bd;
    font-size: .85rem;
    height: .42rem;
    line-height: .42rem;
}

.sortable-header-icon.is-active {
    color: var(--brand-primary);
}

.sortable-header-link:hover .sortable-header-icon:not(.is-active) {
    color: #6c757d;
}

