/* Sidebar responsiva para navegação unificada modularizada */
.cps-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #3a5461;
    color: var(--cps-branco);
    box-shadow: var(--shadow-medium);
    z-index: 120;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.cps-sidebar.active {
    transform: translateX(0);
}
.cps-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cps-sidebar-logo img {
    height: 36px;
    width: auto;
}
.cps-sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -22px;
    transform: translateY(-50%);
    background: #3a5461;
    border: none;
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 140;
    width: 44px;
    height: 64px;
    border-radius: 0 22px 22px 0;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
}
.cps-sidebar:not(.active) .cps-sidebar-toggle {
    right: -22px;
    background: #3a5461;
    color: #fff;
}
.cps-sidebar.active .cps-sidebar-toggle {
    right: -22px;
    background: #3a5461;
    color: #fff;
}
.cps-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}
.cps-sidebar-menu li {
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #fff;
}
.cps-sidebar-menu li a {
    color: #fff !important;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: background 0.2s;
}
.cps-sidebar-menu li a:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #fff !important;
}
.cps-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff !important;
}

.cps-sidebar-user span {
    color: #fff !important;
}
.cps-sidebar .divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.5rem 0;
    border: none;
}
.cps-sidebar-open {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: var(--cps-vermelho);
    color: var(--cps-branco);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 130;
    box-shadow: var(--shadow-light);
    cursor: pointer;
}
@media (min-width: 992px) {
    .cps-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 120;
        transform: translateX(-100%);
    }
    .cps-sidebar.active {
        transform: translateX(0);
    }
    .cps-sidebar-open {
        display: flex;
        left: 250px;
        top: 1rem;
        z-index: 130;
    }
    .cps-sidebar-toggle {
        display: flex !important;
    }
    .main-content {
        padding-left: 240px !important;
        transition: padding-left 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .main-content.sidebar-open {
        padding-left: 0 !important;
    }
    .cps-header {
        left: 0;
        width: 100%;
        transition: left 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .cps-header.sidebar-open {
        left: 240px;
        width: calc(100% - 240px);
    }
}
@media (max-width: 991px) {
    .cps-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        height: 100vh;
        z-index: 120;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .cps-sidebar.active {
        transform: translateX(0);
    }
    .cps-sidebar-toggle {
        display: none !important;
    }
    .cps-sidebar-open {
        display: flex;
        position: fixed;
        top: 1rem;
        right: 1rem;
        left: auto;
        z-index: 130;
    }
    .main-content {
        padding-right: 0 !important;
    }
    .cps-header {
        left: 0;
        width: 100%;
    }
    /* Esconde as orelhas (> e <) no mobile */
    .cps-sidebar .cps-sidebar-toggle,
    .cps-sidebar .sidebar-ear {
        display: none !important;
    }
}
