@font-face {
    font-family: 'roboto_mono';
    src: url('../fonts/Roboto_Mono/RobotoMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'roboto_mono';
    src: url('../fonts/Roboto_Mono/RobotoMono-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'roboto';
    src: url('../fonts/Roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'roboto';
    src: url('../fonts/Roboto/Roboto-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'roboto';
    src: url('../fonts/Roboto/Roboto-Light.ttf') format('truetype');
    font-weight: lighter;
    font-style: normal;
}

@font-face {
    font-family: 'roboto';
    src: url('../fonts/Roboto/Roboto-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

html,
body {
    margin: 0px;
    padding: 0px;
    height: 100%;
    font-size: 13px;
    font-family: roboto_mono, Menlo, monospace;
    background: #eee;
    background-image: url('../img/texture-dark.png');
    background-size: 256px;
}

#login-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 99;

    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ccc;
    background-image: url('../img/texture-dark.png');
    background-size: 256px;

    text-align: center;
    font-size: 15px;
}

#login-form {
    padding: 20px 40px 40px;
    max-width: 200px;
    margin: 0px auto;
    text-align: center;
    border-radius: 5px;
}

#login-img {
    margin: 20px auto;
    height: 100px;
}

#login-form input,
#login-form input:-webkit-autofill::first-line,
#login-form input:-webkit-autofill,
#login-form input:-webkit-autofill:hover,
#login-form input:-webkit-autofill:focus,
#login-form input:-webkit-autofill:active {
    margin: .5em 0;
    /*border: 2px solid #06f;*/
    border: none;
    color: #06F;
    font-size: 16px;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: roboto_mono, Menlo, monospace;
    box-sizing: border-box;
}

#login-form input {
    background: #fff;
}

#login-username,
#login-password {
    width: 100%;
}

input#login-button {
    padding: 4px 16px;
    text-transform: uppercase;
    color: #fff;
    background: #999;
    cursor: pointer;
    border-radius: 20px;
    font-family: roboto, Helvetica, sans-serif;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .1em;
}

input#login-button:hover {
    background: #888;
}

#login-button:active {
    color: #fff;
    background: #06f !important;
}


/***** MAIN TOOLBAR ******/
#main-toolbar {
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 40px;
    box-sizing: border-box;

    color: #06f;
    background: #eee;
    font-family: roboto, Helvetica, sans-serif;
    text-transform: uppercase;
    font-size: 15px;

    border-bottom: 1px solid #ccc;
    z-index: 10;

    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently supported by Chrome and Opera */
}

#main-toolbar-menu {
    height: 100%;
}

#toolbar-icon {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 40px;
    height: 100%;
    box-sizing: border-box;
    background-image: url('../img/dollarbag.svg');
    background-size: 40px;
    background-position: center center;
    background-repeat: no-repeat;
    cursor: pointer;
}

#toolbar-icon:active {
    background-color: #ddd;
}

#main-menu,
#menu-reveal-button {
    position: absolute;
    top: 0px;
    left: 39px;
    width: 160px;
    min-height: 100%;
    box-sizing: border-box;
    letter-spacing: .05em;
}

#menu-reveal-button {
    z-index: 5;
    height: 100%;
    border-right: 1px solid #ccc;
    border-left: 1px solid #ccc;
    background-image: url('../img/arrow-reveal.svg');
    background-position: 12px center;
    background-repeat: no-repeat;
    background-size: 14px;
}

#main-menu {
    display: none;
    z-index: 6;
    background: #eee;
    color: #333;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    color: #999;
}

#main-menu.opened {
    display: block;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.2);
}

#main-menu .menu-button {
    background-position: 2.5px center;
    background-size: 35px;
    background-repeat: no-repeat;
}

#invoices-button {
    background-image: url('../img/dollarbag.svg');
}

#offers-button {
    background-image: url('../img/offer.svg');
}

#clients-button {
    background-image: url('../img/client.svg');
}

#users-button {
    background-image: url('../img/face.svg');
}

#company-button {
    background-image: url('../img/bricks.svg');
}

#logbook-button {
    background-image: url('../img/logbook.svg');
}

#users-button.hidden,
#company-button.hidden,
#logbook-button.hidden {
    display: none !important;
}



.menu-button,
#menu-reveal-button {
    padding: 12px;
    cursor: pointer;
    text-align: center;
}

.menu-button {
    border-bottom: 1px solid #ccc;
    height: 40px;
    box-sizing: border-box;
}

.menu-button:hover {
    background: #fff;
    color: #666;
}

.menu-button.selected {
    display: none;
}

.menu-button.selected::before {
    content: "• ";
}

#menu-back-button {
    background-color: #fafafa;
    background-image: url('../img/arrow-hide.svg');
    background-position: 12px center !important;
    background-repeat: no-repeat;
    background-size: 14px !important;
    margin-top: 0px !important;
    height: 40px;
}

#submenu-container {
    padding-left: 199px;
    padding-right: 80px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.submenu {
    float: left;
    clear: none;
    text-align: left;
    font-size: 12px;
    height: 100%;
    padding: 0px;
}

.submenu-button {
    float: left;
    clear: none;
    padding: 14px 0px;
    color: #999;
    margin: 0px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #ccc;
    box-sizing: border-box;
    height: 100%;
    letter-spacing: .05em;
}

.submenu-button {
    width: 120px;
}

.submenu-button:hover {
    color: #666;
}

.submenu-button:active,
.menu-button:active,
#menu-reveal-button:active,
#new-invoice-button:active,
#new-offer-button:active,
#new-client-button:active,
#new-user-button:active,
#new-logbook-button:active,
#logout:active {
    background-color: #ddd;
}


.submenu-button.selected {
    background-color: #fff;
}

#invoices-submenu .submenu-button.selected,
.invoices-submenu .submenu-button.selected {
    color: #06f;
}

#offers-submenu .submenu-button.selected,
.offers-submenu .submenu-button.selected {
    color: #00aa66;
}

#year-select,
.quarter-button {
    margin: 10px 5px;
    border-right: none;
    padding: 4px 10px;
    height: 20px;
    border-radius: 20px;
    width: auto;
}

#quarter-back,
#quarter-forward {
    float: left;
    clear: none;
    box-sizing: border-box;
    cursor: pointer;

    margin: 6px 0px;
    border-right: none;
    padding: 4px 10px;
    height: 28px;
    width: 28px;
    border-radius: 20px;

    background-position: center center;
    background-size: 14px;
    background-repeat: no-repeat;
}

#quarter-forward {
    background-image: url('../img/arrow-forward.svg');
}

#quarter-back {
    margin-left: 20px;
    background-image: url('../img/arrow-back.svg');
}

#quarter-back:active,
#quarter-forward:active {
    background-color: #ddd;
}

#year-select-menu {
    display: none;
    position: absolute;
    left: 0px;
    top: 41px;
    min-height: 40px;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: .05em;

    z-index: 6;
    background: #eee;
    color: #333;
    border-bottom: 1px solid #ccc;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;

}

#year-select-menu.opened {
    display: block;
}

.year-menu-button {
    display: inline-block;

    color: #666;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    letter-spacing: .05em;

    margin: 8px 5px;
    border-right: none;
    padding: 4px 14px;
    height: auto;
    border-radius: 20px;
}

.year-menu-button:hover {
    color: #000;
}

.year-menu-button.selected {
    color: #000;
    background: #fff;
}

.year-menu-button:active {
    background: #ddd;
}

#invoices-submenu {
    grid-template-columns: 50px auto 100px;
}

#offers-submenu {
    grid-template-columns: 50px 100px;
}

#new-invoice-button,
#new-offer-button,
#new-client-button,
#new-user-button,
#new-logbook-button {
    position: absolute;
    right: 40px;
    top: 0px;
    height: 100%;
    width: 42px;
    background-color: #eee;
    background-size: 22px;
    background-repeat: no-repeat;
    background-position: center center;
    cursor: pointer;
}

#new-invoice-button {
    background-image: url('../img/add-blue.svg');
}

#new-offer-button {
    background-image: url('../img/add-green.svg');
}

#new-user-button {
    background-image: url('../img/add-purple.svg');
}

#new-logbook-button {
    background-image: url('../img/add-darkblue.svg');
}

#new-client-button {
    background-image: url('../img/add.svg');
}

#new-invoice-button:hover,
#new-offer-button:hover,
#new-client-button:hover,
#new-user-button:hover,
#new-logbook-button:hover {
    border-left: 1px solid #ccc;
}

/********* SEARCH *********/

#search-submenu {
    padding: 0px 10px;
    background: #eee;
    position: absolute;
    right: 80px;
    top: 0px;
    height: 100%;
    z-index: 10;
    border-right: 1px solid #ccc;
    border-left: 1px solid #ccc;
}

#document-search {
    text-transform: none;
    color: #999;
    padding: 7px 8px 5px 30px;
    margin: 7px 2px;
    box-sizing: border-box;
    text-align: left;
    width: 20px;
    border: none;
    border-radius: 26px;
    background: #fff;
    background-image: url('../img/search.svg');
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: 10px center;
    -webkit-user-modify: read-write;
    -moz-user-modify: read-write;
    -webkit-touch-callout: auto;
    -webkit-user-select: auto;
    -khtml-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
    line-height: 1em;
    font-size: 13px;
    overflow: hidden;
    height: 25px;
}

#document-search:focus {
    background: #fff;
    padding-left: 8px;
    outline-color: none;
    outline-style: none;
    outline-width: none;
    width: 200px;
}

#loading {
    display: none;
    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(238, 238, 238, 0.5);
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    z-index: 11;
    padding: 40px 40px 0px;
    color: #999;
    text-transform: uppercase;
    text-align: center;
}


/******** USER MENU ***********/
#user-menu-button {
    position: absolute;
    top: 0px;
    right: 0px;
    height: 100%;
    width: 40px;
    box-sizing: border-box;
    cursor: pointer;
    background-image: url('../img/user.svg');
    background-size: 30px;
    background-position: center center;
    background-repeat: no-repeat;
    border-left: 1px solid #ccc;
    background-color: #eee;
}

#user-menu-button:hover {
    background-color: #fff;
}




#user-menu {

    padding: 40px 0 0px;
    margin: 0px;
    height: 100%;
    width: 100%;
    overflow: auto;
    box-sizing: border-box;

    background: #eee;
    box-sizing: border-box;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
    z-index: 99;
}


#user-menu-close {
    position: absolute;
    top: 40px;
    right: 0px;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    background-image: url('../img/close-grey.svg');
    background-position: center center;
    background-size: 20px;
    background-repeat: no-repeat;
    cursor: pointer;
    opacity: .5;
}

#user-menu-close:hover {
    opacity: 1;
}

#user-menu-close:active {
    background-color: #ddd;
}

#user-menu-top {
    color: #666;
    font-size: 13px;
    padding: 14px;
    text-transform: uppercase;
    text-align: center;
    box-sizing: border-box;
    height: 160px;
    border-bottom: 1px solid #ccc;
}

#password-edit {
    color: #666;
    font-size: 13px;
    padding: 14px;
    text-align: left;
    display: none;
    box-sizing: border-box;
    height: 240px;
    border-bottom: 1px solid #ccc;
}

.password-edit-buttons {
    box-sizing: border-box;
    padding: 14px 0px 0px;
    width: 100%;
}

#user-name {
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: .05em;
}

#user-menu .button {
    height: 40px;
    box-sizing: border-box;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    color: #666;
    font-size: 13px;
    text-transform: none;
    cursor: pointer;
}

#user-menu #user-logout,
#user-menu #user-password-change {
    text-transform: uppercase;
    text-align: center;
}

#user-menu .button:hover {
    background-color: #fff;
    color: #666;
}

#user-logout {
    background-image: url('../img/lock.svg');
    background-position: 10px center;
    background-size: 20px;
    background-repeat: no-repeat;
}

#cr-version {
    box-sizing: border-box;
    padding: 10px;
    font-size: 13px;
    text-transform: none;
    color: #999;
}




#document-close:hover,
#new-invoice-button:hover,
#new-offer-button:hover,
#new-client-button:hover,
#new-user-button:hover,
#new-logbook-button:hover,
#logout:hover,
#toolbar-icon:hover {
    background-color: #fafafa;
}

/*** hack for single line editable content ***/

.field.singleline {
    overflow: auto;
}

.field.singleline br {
    display: none;
}

.field.singleline * {
    display: inline;
    white-space: nowrap;
}

.field.inline {
    display: inline-block;
    overflow: none;
    width: 50px !important;
}

.field.inline br {
    display: none;
}

.field.inline * {
    display: inline;
    white-space: nowrap;
}




/***** BUTTONS ******/

.round-button {
    /*display: inline;*/
    border-radius: 20px;
    letter-spacing: .02em;
    padding: 4px 20px;
    color: #333;
    background: #fff;
    margin: 0px;
    margin-left: 20px;
    text-align: center;
    cursor: pointer;
    text-transform: uppercase;
    float: right;
    font-size: 12px;
}

.round-button:hover {
    color: #000;
    background: #ddd;
    opacity: 1;
}

.round-button:active {
    background: #999;
}

/** LABELS **/

.active-toggle {
    display: none;
    border-radius: 20px;
    letter-spacing: .05em;
    font-family: roboto_mono, Menlo, monospace;
    padding: 4px 20px;
    color: #333;
    margin: 0px;
    margin-left: 20px;
    text-align: center;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.active-toggle:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.9) !important;
    opacity: 1;
}

.active-toggle.selected {
    display: inline-block;
}