body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body > .d-flex {
    flex: 1 0 auto;
}

html.sidebar-hidden-init #sidebar {
    transform: translateX(-250px);
    transition: none !important;
}
html.sidebar-hidden-init #content,
html.sidebar-hidden-init header,
html.sidebar-hidden-init footer {
    margin-left: 0 !important;
    width: 100% !important;
    transition: none !important;
}

#sidebar {
    width: 250px;
    transition: all 0.3s;
}

#sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

#content {
    transition: margin-left 0.3s;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

#content.collapsed {
    margin-left: 0;
}

.nav-link {
    color: #555;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #000;
}

.nav-link.active {
    background-color: #007bff;
    color: #fff;
}

.nav-link.active {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

#toggleSidebar {
    margin-right: 10px;
}

#toggleSidebar:hover {
    background-color: #5a6268;
}

header {
    transition: margin-left 0.3s ease-in-out;
    z-index: 1050;
    position: relative;
}

header:not(.full-width) {
    margin-left: 250px;
}

header.full-width {
    margin-left: 0;
}

#sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    transition: transform 0.3s ease-in-out;
    z-index: 1040;
    overflow-y: auto;
}


#sidebar.hidden {
    transform: translateX(-250px);
}

#content, header, footer {
    margin-left: 250px;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

#content.shifted {
    margin-left: 250px;
}

#content.full-width, header.full-width, footer.full-width {
    margin-left: 0;
    width: 100%;
}

#sidebar .nav-link {
    padding-left: 15px;
}

#sidebar .nav-link + ul .nav-link {
    padding-left: 30px;
}

#sidebar {
    background: linear-gradient(180deg, #1a3352 0%, #14283f 100%);
    border-right: 0;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .2);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar.bg-light {
    background-color: #1a3352 !important;
}

#sidebar.border-end {
    border-right-color: transparent !important;
}

#sidebar .sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: .4rem;
}

#sidebar .sidebar-header .card {
    background: linear-gradient(120deg, #2f6690, #3a7ca5);
    border: 0;
    border-radius: .6rem;
    box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .25);
}

#sidebar .sidebar-header .card {
    padding: .35rem 0 .3rem;
}

#sidebar .sidebar-header .card p {
    color: #fff;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    letter-spacing: .03em;
}

#sidebar .sidebar-header .version {
    color: rgba(255, 255, 255, .6);
    font-size: .72rem;
    line-height: 1.1;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, .88);
    font-size: .95rem;
    padding: .32rem .8rem;
    margin-bottom: 1px;
    border-radius: .5rem;
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 600;
    letter-spacing: .01em;
}

#sidebar .nav-link.dropdown-toggle::after {
    margin-left: auto;
    opacity: .6;
}

#sidebar .nav-item > .nav-link > .bi:first-child {
    width: 1.8rem;
    height: 1.8rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background-color: rgba(255, 255, 255, .1);
    font-size: .95rem;
}

#sidebar .nav-link + ul .nav-link > .bi:first-child {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .4rem;
    background-color: rgba(255, 255, 255, .07);
    font-size: .8rem;
}

#sidebar .nav-link:hover,
#sidebar .nav-link:focus {
    background-color: rgba(255, 255, 255, .08);
    color: #fff;
}

#sidebar .nav-item > .nav-link[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, .1);
    color: #fff;
}

#sidebar .nav-item:nth-child(7n+1) > .nav-link .bi { color: #74c0fc; }
#sidebar .nav-item:nth-child(7n+2) > .nav-link .bi { color: #b197fc; }
#sidebar .nav-item:nth-child(7n+3) > .nav-link .bi { color: #66d9e8; }
#sidebar .nav-item:nth-child(7n+4) > .nav-link .bi { color: #ffa94d; }
#sidebar .nav-item:nth-child(7n+5) > .nav-link .bi { color: #69db7c; }
#sidebar .nav-item:nth-child(7n+6) > .nav-link .bi { color: #ffd43b; }
#sidebar .nav-item:nth-child(7n+7) > .nav-link .bi { color: #f783ac; }

#sidebar .nav-link + ul {
    background-color: rgba(0, 0, 0, .18);
    border-radius: .5rem;
    margin: 2px 0 6px;
    padding: .25rem 0;
}

#sidebar .nav-link + ul .nav-link {
    color: rgba(255, 255, 255, .72);
    font-weight: 400;
    font-size: .88rem;
    padding: .35rem .8rem .35rem 1.6rem;
    margin: 0 .25rem;
}

#sidebar .nav-link + ul .nav-link .bi {
    color: rgba(255, 255, 255, .5);
}

#sidebar .nav-link + ul .nav-link:hover {
    color: #fff;
}

#sidebar .nav-link.active,
#sidebar .nav-link + ul .nav-link.active {
    background: linear-gradient(90deg, #2f6690, #3a7ca5);
    color: #fff;
    font-weight: 600;
}

#sidebar .nav-link.active .bi {
    color: #fff;
}

#sidebar .dropdown-divider {
    border-color: rgba(255, 255, 255, .12);
}

#datos_tabla tbody tr:hover {
    background-color: #d1f0ff !important;
}

#datos_tabla.dataTable {
    width: 100% !important;
}

.dt-scroll-movil {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dt-scroll-movil > table.dataTable th,
.dt-scroll-movil > table.dataTable td {
    white-space: nowrap;
}

:root {
    --color-marco: #1a3352;
    --color-marco-hover: #12253d;
    --degradado-marco: linear-gradient(110deg, #152a44 0%, #1f3d63 55%, #2c5785 100%);
}

#header .navbar.bg-dark,
#footer.bg-dark {
    background-color: var(--color-marco) !important;
    background-image: var(--degradado-marco);
}

#header .navbar .btn-outline-light {
    border-color: transparent;
    background-color: rgba(255, 255, 255, .09);
    border-radius: .55rem;
    font-weight: 600;
    letter-spacing: .01em;
    transition: background-color .15s, color .15s;
}

#header .navbar .btn-outline-light:hover,
#header .navbar .btn-outline-light:focus-visible {
    background-color: rgba(255, 255, 255, .2);
    border-color: transparent;
    color: #fff;
}

#header .navbar .btn-outline-light.active,
#header .navbar .btn-outline-light.show,
#header .navbar .btn-outline-light.activo {
    background: linear-gradient(90deg, #2f6690, #3a7ca5) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .25);
}

#header .navbar .btn-outline-light > .bi:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: .4rem;
    background-color: rgba(255, 255, 255, .12);
    vertical-align: middle;
    margin-top: -.15rem;
}

#header .navbar .navbar-nav > li:nth-child(7n+1) > .btn > .bi:first-child { color: #74c0fc; }
#header .navbar .navbar-nav > li:nth-child(7n+2) > .btn > .bi:first-child { color: #b197fc; }
#header .navbar .navbar-nav > li:nth-child(7n+3) > .btn > .bi:first-child { color: #ffa94d; }
#header .navbar .navbar-nav > li:nth-child(7n+4) > .btn > .bi:first-child { color: #69db7c; }
#header .navbar .navbar-nav > li:nth-child(7n+5) > .btn > .bi:first-child { color: #66d9e8; }
#header .navbar .navbar-nav > li:nth-child(7n+6) > .btn > .bi:first-child { color: #ffd43b; }
#header .navbar .navbar-nav > li:nth-child(7n+7) > .btn > .bi:first-child { color: #f783ac; }

#header .navbar .btn-outline-light.active > .bi:first-child,
#header .navbar .btn-outline-light.show > .bi:first-child,
#header .navbar .btn-outline-light.activo > .bi:first-child {
    background-color: rgba(255, 255, 255, .18);
}

#header #toggleSidebar {
    background-color: rgba(255, 255, 255, .12);
    border-color: transparent;
    border-radius: .55rem;
}

#header #toggleSidebar:hover {
    background-color: rgba(255, 255, 255, .25);
}

#header .navbar-brand {
    font-weight: 700;
    letter-spacing: .03em;
}

#footer p,
#footer a > span {
    font-weight: 600;
    letter-spacing: .02em;
}

#footer a.small {
    display: inline-block;
    margin-top: .3rem;
    padding: .1rem .8rem;
    border-radius: 2rem;
    background-color: rgba(255, 255, 255, .09);
    transition: background-color .15s, color .15s;
}

#footer a.small:hover {
    background-color: rgba(255, 255, 255, .2);
    color: #fff !important;
}

#header .dropdown-menu-dark {
    --bs-dropdown-bg: var(--color-marco);
    --bs-dropdown-border-color: rgba(255, 255, 255, .12);
    --bs-dropdown-divider-bg: rgba(255, 255, 255, .12);
    --bs-dropdown-link-hover-bg: rgba(255, 255, 255, .1);
    --bs-dropdown-link-active-bg: #2f6690;
    --bs-dropdown-header-color: #ffc864;
    background-image: linear-gradient(160deg, #2c5785 0%, #1f3d63 50%, #152a44 100%);
    border-radius: .75rem;
    padding: .4rem;
    box-shadow: 0 .8rem 1.8rem rgba(0, 0, 0, .3);
}

#header .dropdown-menu-dark .dropdown-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .7rem .32rem .4rem;
    border-radius: .5rem;
    color: rgba(255, 255, 255, .92);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .01em;
    transition: background-color .15s, transform .15s;
}

#header .dropdown-menu-dark .dropdown-item > .bi:first-child {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .45rem;
    background-color: rgba(255, 255, 255, .1);
    font-size: .95rem;
    transition: background-color .15s;
}

#header .dropdown-menu-dark li:nth-child(7n+1) > .dropdown-item > .bi:first-child { color: #74c0fc; }
#header .dropdown-menu-dark li:nth-child(7n+2) > .dropdown-item > .bi:first-child { color: #69db7c; }
#header .dropdown-menu-dark li:nth-child(7n+3) > .dropdown-item > .bi:first-child { color: #ffa94d; }
#header .dropdown-menu-dark li:nth-child(7n+4) > .dropdown-item > .bi:first-child { color: #b197fc; }
#header .dropdown-menu-dark li:nth-child(7n+5) > .dropdown-item > .bi:first-child { color: #66d9e8; }
#header .dropdown-menu-dark li:nth-child(7n+6) > .dropdown-item > .bi:first-child { color: #ffd43b; }
#header .dropdown-menu-dark li:nth-child(7n+7) > .dropdown-item > .bi:first-child { color: #f783ac; }

#header .dropdown-menu-dark .dropdown-item:hover,
#header .dropdown-menu-dark .dropdown-item:focus {
    background-color: rgba(255, 255, 255, .12);
    color: #fff;
    transform: translateX(3px);
}

#header .dropdown-menu-dark .dropdown-item:hover > .bi:first-child {
    background-color: rgba(255, 255, 255, .2);
}

#header .dropdown-menu-dark .dropdown-item.active {
    background: rgba(255, 255, 255, .22);
    box-shadow: inset 3px 0 0 #ffc864;
    color: #fff;
}

#header .dropdown-menu-dark .dropdown-item.active > .bi:first-child {
    background-color: rgba(255, 255, 255, .25);
}

#header .dropdown-menu-dark .dropdown-header {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .55rem .7rem .25rem;
}

#header .dropdown-menu-dark .dropdown-divider {
    margin: .35rem .3rem;
}

.navbar .btn-outline-light {
    font-size: 0.82rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    background-color: var(--color-marco-hover);
    color: #ffc107 !important;
    border-radius: 0.4rem;
    transition: background-color 0.2s, color 0.2s;
}

.navbar-dark .navbar-nav .nav-link:hover .bi,
.navbar-dark .navbar-nav .nav-link:focus .bi {
    color: #ffc107 !important;
    text-shadow: 0 0 8px #ffc10788;
    transform: scale(1.2);
    transition: color 0.2s, text-shadow 0.2s, transform 0.2s;
}

.btn.activo {
    background-color: #0d6efd !important;
    color: #fff !important;
    font-weight: bold;
    border: 1px solid #0d6efd !important;
}

.btn.activo:hover {
    background-color: #0b5ed7 !important;
    color: #fff !important;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin: 0;
}

.dropdown-submenu.dropdown-submenu-arriba > .dropdown-menu {
    top: auto;
    bottom: 0;
}

.dropdown-submenu > .dropdown-menu.show {
    display: block;
}

.dropdown-submenu > .dropdown-toggle::after {
    transform: rotate(-90deg);
}
