#header {
    background: #352159;
    box-sizing: border-box;
    padding: 1em 1ex;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
}

#header.open {
    border-radius: 0 1em 1em 0;
    width: 250px;
    padding: 1em;
}

#header,
#header .submenu ul {
    background: #352159;
}

#header hr {
    color: #A08EC2;
}

#header .bar {
    font-size: 16px;
    font-weight: 500;
    box-sizing: border-box;
    height: 100%;
    position: relative;
}

#header .bar a {
    border-radius: 1ex;
    color: #A08EC2;
    display: block;
    height: 3em;
    line-height: 3;
    margin: 0 0 1ex 0;
    text-decoration: none;
}

#header .bar .submenu a {
    border-radius: 0;
}

#header .bar a span {
    display: none;
}

#header.open .bar a span {
    display: inline;
    padding-right: 1em;
}

#header .bar .options > a {
    padding-left: 1ex;
}

#header .bar a.menu-icon {
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px;
    padding-left: 60px;
}

#header .bar a:hover {
    color: white;
}

#header .bar .menu-icon[href^="dashboard"] { background-image: url("../img/dashboard.svg"); }
#header .bar .menu-icon[href^="dashboard"]:hover { background-image: url("../img/dashboard-active.svg"); }
#header .bar .menu-icon.selected[href^="dashboard"] { background-image: url("../img/dashboard-selected.svg"); }

#header .bar .menu-icon[href^="clients"] { background-image: url("../img/clients.svg"); }
#header .bar .menu-icon[href^="clients"]:hover { background-image: url("../img/clients-active.svg"); }
#header .bar .menu-icon.selected[href^="clients"] { background-image: url("../img/clients-selected.svg"); }

#header .bar .menu-icon[href^="invoices"] { background-image: url("../img/invoices.svg"); }
#header .bar .menu-icon[href^="invoices"]:hover { background-image: url("../img/invoices-active.svg"); }
#header .bar .menu-icon.selected[href^="invoices"] { background-image: url("../img/invoices-selected.svg"); }

#header .bar .menu-icon[href^="reports"] { background-image: url("../img/reports.svg"); }
#header .bar .menu-icon[href^="reports"]:hover { background-image: url("../img/reports-active.svg"); }
#header .bar .menu-icon.selected[href^="reports"] { background-image: url("../img/reports-selected.svg"); }

#header .bar .menu-icon[href^="settings"] { background-image: url("../img/settings.svg"); }
#header .bar .menu-icon[href^="settings"]:hover { background-image: url("../img/settings-active.svg"); }
#header .bar .menu-icon.selected[href^="settings"] { background-image: url("../img/settings-selected.svg"); }

#header .bar .menu-icon[href^="logout"] { background-image: url("../img/logout.svg"); background-color: #A08EC2; color: white; }
#header .bar .menu-icon[href^="logout"]:hover { background-image: url("../img/logout-active.svg"); color: #352159; }

#header .bar .menu-icon[href^="javascript"] { background-image: url("../img/help.svg"); }
#header .bar .menu-icon[href^="javascript"]:hover { background-image: url("../img/help-active.svg"); }

#header .bar a.selected,
#header .bar a.selected:hover {
    color: #502E8A;
}

#header .bar a.selected {
    background-color: #E0D8EF;
}

#header .bar a img {
    margin: 0 1em;
    vertical-align: middle;
}

#header .profile .circle {
    width: 40px;
    height: 40px;
}

#header.open .profile .circle {
    display: inline-block;
}

#header .profile .circle,
#header .submenu .company {
    vertical-align: middle;
}

#header .submenu {
    background: url('../img/dots-v.svg') no-repeat right center / contain;
    cursor: pointer;
    padding-right: 0;
    position: relative;
}

#header.open .submenu {
    background-image: url('../img/dots-h.svg');
    padding-right: 64px;
}

#header .submenu .company {
    color: white;
    display: none;
    font-size: 11px;
    margin-left: 1ex;
    max-width: 100px;
    max-height: 40px;
    overflow: hidden;
    text-transform: uppercase;
}

#header.open .submenu .company {
    display: inline-block;
}

#header .submenu ul {
    border: thin solid #A08EC2;
    display: none;
    line-height: normal;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 100%;
    top: 0;
    text-align: left;
    white-space: nowrap;
    z-index: 1;
}

#header .submenu ul a {
    display: block;
    padding: 0 1em;
    margin: 0;
}

#header.open .bar a.menu-icon,
#header .submenu ul a.menu-icon {
    background-position: 1em center;
}

#header .submenu.open ul {
    display: block;
}

#header .bottom {
    position: absolute;
    left: 0;
    bottom: 1em;
    width: 100%;
    white-space: nowrap;
}

#header #logo {
    display: inline-block;
    overflow: hidden;
    width: 36px;
    height: 56px;
    vertical-align: middle;
}

#header.open #logo {
    width: auto;
    height: auto;
}

#header #logo img {
    width: 200px;
}

#header #toggle {
    display: inline;
    padding: 0 0 0 1ex;
    vertical-align: middle;
}

#header #toggle::before {
    content: '\276f';
}

#header.open #toggle::before {
    content: '\276e';
}
