﻿/* =================================
   COMMON
================================= */

html {
    font-size: 100%;
}

body {
    background-color: #f4f6f9;
    overflow-x: hidden;
}

/* =================================
   main
================================= */

.main {
    display: block;
    width: 100%;
}

.main.sidebar-pinned .maincontent {
    margin-left: 280px;
    width: calc(100vw - 280px);
}

.main .maincontent {
    margin-left: 72px;
    box-sizing: border-box;
    width: calc(100vw - 72px);
    transition: margin-left .25s ease, width .25s ease;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 72px;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1000;
    background: var(--bs-tertiary-bg);
    border-right: 1px solid var(--bs-border-color);
    transition: width .25s ease;
}

.sidebar:hover {
    width: 280px;
}

.sidebar.pinned {
    width: 280px;
}

.sidebar:hover .title,
.sidebar.pinned .title {
    opacity: 1;
}


/* HEADER */
.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    white-space: nowrap;
}

.sidebar .logo {
    width: 2rem;
    height: 2rem;
    font-weight: 700;
    object-fit: contain;
    vertical-align: middle;
}

.sidebar .title {
    margin-left: .75rem;
    opacity: 0;
    transition: opacity .2s ease;
    font-size: 1rem;
    font-weight: 700;
}

/* PIN */

.sidebar .pin-btn {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease;
}

.sidebar:hover .pin-btn,
.sidebar.pinned .pin-btn {
    opacity: 1;
}

.pin-btn:hover {
    color: var(--bs-primary);
}

/* MENU */
.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    margin: .15rem .5rem;
    border-radius: .5rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.menu-item:hover {
    background: var(--bs-secondary-bg);
}

.menu-item.active {
    background: var(--bs-primary);
    color: #fff;
}

/* ICONES */
.icon {
    min-width: 24px;
    text-align: center;
}

/* LABELS */

.label {
    opacity: 0;
    transition: opacity .2s ease;
    white-space: nowrap;
}

.sidebar:hover .label,
.sidebar.pinned .label {
    opacity: 1;
}

/* SUBMENUS */
.submenu {
    margin-left: 1rem;
    padding-left: .75rem;
    border-left: 2px solid var(--bs-border-color);
}

.submenu-item {
    display: block;
    padding: .45rem 1rem .45rem 2rem;
    border-radius: .35rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.submenu-item:hover {
    background: var(--bs-secondary-bg);
}

.sidebar:not(:hover):not(.pinned) .submenu {
    display: none;
}

/* =================================
   TOPBAR
================================= */
.topbar {
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
}

/* =================================
BREADCRUMB
================================= */
.breadcrumb-bar {
    background-color: #1e1e1e;
}

.breadcrumb-bar {
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--bs-secondary-color);
}

    .breadcrumb-item.active {
        color: var(--bs-body-color);
    }


/* =================================
   NAV TABS
================================= */
.nav-tabs .nav-link.active {
    font-weight: 600;
}

/* =================================
   MOBILE
================================= */

@media (max-width: 992px) {

    .main.sidebar-pinned .maincontent {
        margin-left: 72px;
    }

    .sidebar {
        width: 72px;
    }

        .sidebar:hover,
        .sidebar.pinned {
            width: 280px;
        }
}