﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 14px;
    }
}

.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 #4b9d2e;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==== Loader global ==== */
.global-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

    .global-loader.show {
        display: flex;
    }

.global-loader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(1px);
}

.global-loader-spinner {
    position: relative;
    margin: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==== BOTONES GLOBALES ==== */
.btn:not(.btn-link) {
    background-color: #4b9d2e !important;
    border-color: #4b9d2e !important;
    color: #ffffff;
    border-radius: 24px;
}

    .btn:not(.btn-link):hover,
    .btn:not(.btn-link):focus,
    .btn:not(.btn-link):active {
        background-color: #3c7b24;
        border-color: #3c7b24;
        color: #ffffff;
    }

.btn-link {
    background-color: transparent !important;
    border-color: transparent !important;
    color: inherit;
}

/* Alerts auto-ocultables */
.js-auto-hide-alert {
    transition: opacity 0.5s ease;
}

    .js-auto-hide-alert.fade-out {
        opacity: 0;
    }

/* ===== TOPBAR (HEADER SUPERIOR) ===== */

.topbar {
    background: #ffffff;
    color: #4b5563;
    font-family: "Poppins";
    border-bottom: 1px solid #e5e7eb;
}

.topbar-row-main {
    padding: 0.45rem 0.75rem;
}

/* Logo / título / usuario */
.topbar-logo {
    height: 55px;
    width: auto;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.topbar-user-wrapper {
    gap: 0.75rem;
}

.topbar-user {
    font-size: 0.9rem;
}

/* ================= TOOLBAR PLANTILLAS ================= */

.toolbar-plantillas {
    width: 100%;
}

.toolbar-plantillas-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* Columnas del toolbar */
.toolbar-plantillas-search,
.toolbar-plantillas-filter,
.toolbar-plantillas-actions {
    display: flex;
    align-items: center;
}

/* Anchos relativos para desktop */
.toolbar-plantillas-search {
    flex: 2 1 260px;
}

.toolbar-plantillas-filter {
    flex: 2 1 260px;
    max-width: none;
}

.toolbar-plantillas-actions {
    flex: 0 1 220px;
    max-width: 260px;
    justify-content: center;
}
.toolbar-plantillas-filter .input-group {
    width: 100%;
}
/* Input-group header colores */
.topbar .input-group-text {
    border-color: transparent;
}

.topbar .form-control,
.topbar .form-select {
    border: 1px solid #d1d5db; /* borde gris clarito */
    border-radius: 4px;
    background-color: #ffffff;
    height: 40px;
}

    /* mejora visual al hacer foco */
    .topbar .form-control:focus,
    .topbar .form-select:focus {
        border-color: #4b9d2e;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #4b9d2e;
    }

/* Botón en toolbar */
.topbar .btn-primary {
    background-color: #4b9d2e;
    border-color: #4b9d2e;
    font-size: 0.85rem;
    padding-inline: 1.1rem;
}

    .topbar .btn-primary:hover {
        background-color: #3c7b24;
        border-color: #3c7b24;
    }

/* Documentos disponibles */
.toolbar-docs-label {
    font-size: 0.85rem;
}

/* Botón cerrar sesión en header */
.topbar .btn-outline-light.btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}
.toolbar-plantillas-inner {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-start;
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
}
/* ===== RESPONSIVE HEADER ===== */
/* Tablet y móvil: toolbar ocupa todo el ancho y en bloques verticales */

@media (max-width: 991.98px) {
    .topbar-row-main {
        row-gap: 0.6rem;
        align-items: stretch;
    }

    /* Logo / botón hamburguesa / título arriba */
    .topbar-logo {
        height: 64px;
    }

    /* Toolbar se vuelve un bloque tipo tarjeta a full width */
    .toolbar-plantillas {
        margin-top: 0.25rem;
    }

    .toolbar-plantillas-inner {
        flex-wrap: wrap;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background-color: #f9fafb;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
        border: 1px solid #e5e7eb;
    }

    .toolbar-plantillas-search,
    .toolbar-plantillas-filter,
    .toolbar-plantillas-actions {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }

        .toolbar-plantillas-search + .toolbar-plantillas-filter {
            margin-top: 0.35rem;
        }

        .toolbar-plantillas-filter + .toolbar-plantillas-actions {
            margin-top: 0.35rem;
        }

    .toolbar-plantillas-actions {
        justify-content: flex-start;
    }

    .toolbar-docs-label {
        font-size: 0.85rem;
    }

    .topbar-user-wrapper {
        justify-content: flex-start;
    }
}

/* Móvil pequeño: textos algo más chicos y todo full ancho */

@media (max-width: 575.98px) {
    .topbar-title {
        font-size: 0.95rem;
    }

    .topbar-user {
        font-size: 0.8rem;
    }

    .toolbar-plantillas-inner {
        padding: 0.45rem 0.6rem;
        border-radius: 6px;
    }

    .topbar .form-control,
    .topbar .form-select {
        font-size: 0.8rem;
        height: 38px;
    }

    .toolbar-docs-label {
        font-size: 0.8rem;
    }
}

main {
    background: rgb(250, 250, 250);
}

.img-user {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin-right: 10px;
}
.form-check-input:checked {
    background-color: #4b9d2e;
    border-color: #4b9d2e;
}
.swal2-actions {
gap:5px;
}