:root {
    --erp-primary: #0d6efd;
    --erp-sidebar-active: #e7f1ff;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* La barra de navegacion se mantiene disponible al recorrer formularios y listados extensos. */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-sidebar {
    background: #fff !important;
}

.sidebar-brand {
    border-bottom-color: var(--bs-border-color) !important;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #1f2937;
}

.brand-mark {
    display: grid;
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    line-height: 0;
    overflow: visible;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.brand-text {
    color: #102a56;
    font-weight: 700;
    letter-spacing: .025em;
}

.brand-text small {
    display: block;
    margin-top: -.2rem;
    color: #60708a;
    font-size: .67rem;
    font-weight: 400;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.user-avatar {
    width: 1.85rem;
    height: 1.85rem;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.user-avatar-large {
    width: 4.5rem;
    height: 4.5rem;
}

.user-photo-preview {
    width: 5rem;
    height: 5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    object-fit: cover;
}

.app-sidebar .nav-link.active {
    background: var(--erp-sidebar-active);
    color: #0a58ca;
    box-shadow: none;
}

.app-sidebar .nav-link:hover {
    background: #f3f6fa;
    color: #0a58ca;
}

.app-sidebar .nav-link {
    color: #374151;
}

.app-sidebar .nav-header {
    color: #6b7280;
}

.app-content-header {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.small-box {
    overflow: hidden;
    border-radius: .65rem;
}

.small-box .small-box-icon {
    right: 1rem;
    top: 1rem;
    font-size: 4.75rem;
    opacity: .23;
}

.small-box-dashboard-values h3 {
    font-size: 2.2rem;
}

.small-box-dashboard-values p {
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .small-box-dashboard-values h3 {
        font-size: 1.45rem;
    }
}

.card {
    border: 0;
    border-radius: .65rem;
}

.card-outline {
    border-top: 3px solid var(--bs-primary);
}

.card-header {
    padding: 1rem 1.25rem;
}

.card-title {
    font-weight: 600;
}

.callout {
    border-radius: .4rem;
}

.about-icon {
    display: grid;
    width: 3.75rem;
    height: 3.75rem;
    place-items: center;
    border-radius: .75rem;
    font-size: 1.75rem;
}

.about-logo {
    display: grid;
    width: 3.75rem;
    height: 3.75rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: #fff;
}

.about-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.about-contact {
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef4ff 0%, #dce9ff 100%);
}

.login-container {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: min(100%, 26rem);
    padding: 2.25rem;
    border-radius: 1rem;
    background-color: #fff;
}

.login-logo {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
}

.login-footer-brand {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
    text-align: center;
}

.login-footer-brand img {
    display: block;
    width: min(100%, 13.5rem);
    height: auto;
    margin: 0 auto;
}

.roles-list {
    width: 100%;
}

.roles-list td {
    padding: .35rem .75rem .35rem 0;
    vertical-align: middle;
}

.roles-list input[type="checkbox"] {
    margin: 0 .45rem 0 0;
    vertical-align: middle;
}

.roles-list label {
    display: inline;
    font-size: .9rem;
    vertical-align: middle;
}

.estado-radios input[type="radio"] {
    margin: 0 .35rem 0 0;
    vertical-align: middle;
}

.estado-radios label {
    margin: 0 1rem 0 0;
    vertical-align: middle;
}

.cabys-tree-container {
    height: clamp(20rem, calc(100vh - 20rem), 48rem);
}

/* Alterna las filas de datos de todos los GridView con estilo Bootstrap. */
.table > tbody > tr:nth-child(even) > th,
.table > tbody > tr:nth-child(even) > td {
    background-color: azure !important;
}

.table > tbody > tr.tabla-paginada-par > td {
    background-color: azure !important;
}

.table > tbody > tr.tabla-paginada-impar > td {
    background-color: transparent !important;
}

.selector-cliente-fila {
    cursor: pointer;
}

.selector-cliente-fila:focus > td {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

.paginador-adaptativo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 3.75rem;
    padding: .65rem 1rem;
    border-top: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
}

.paginador-adaptativo-resumen {
    flex: 1;
    color: var(--bs-secondary-color);
    font-size: .875rem;
    text-align: center;
}

@media (max-width: 575.98px) {
    .app-content-header .breadcrumb {
        float: none !important;
        margin-top: .5rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .roles-list,
    .roles-list tbody,
    .roles-list tr,
    .roles-list td {
        display: block;
    }

    .cabys-tree-container {
        height: clamp(18rem, calc(100vh - 17rem), 36rem);
    }
}
