body {
    font-family: Roboto, sans-serif;
    font-size: 14px;
    color: #555;
    background-color: #444;
    -webkit-font-smoothing: antialiased;
}

.app, .panel, .panel .content, .panel .header, .panel .search, .contact-list .item .name, .pic, .send, .header h1, .overlay, a.add, a.rename, .send .failed {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.app {
    margin-left: 0;
    margin-right: 0;
    background-color: white;
    overflow: hidden;
}

.padding20 {
    padding: 20px;
}

.form {
    width: 100%;
    margin-bottom: 10px;
}

.login .form td {
    padding: 5px 0;
}

.login .form input {
    border: 1px solid #ddd;
    width: 100%;
    padding: 5px;
}

.login .form .field-error input {
    border: 3px solid red;
    padding: 3px;
}

.login .form .label {
    padding-top: 12px;
    width: 140px;
}

.btn {
    background-color: lightcoral;
    color: white;
    width: 100%;
    padding: 10px 0;
    cursor: pointer;
}

.login .flash.error {
    position: absolute;
    width: 100%;
    text-align: center;
    background-color: lightsalmon;
    color: white;
    font-size: 12px;
    padding: 5px 0;
}

.pic {
    overflow: hidden;
    background-image: url(../images/nopic.jpg);
    background-position: center center;
}

.panel#side {
    width: 350px;
    border-right: 1px solid #ddd;
}

.panel#main {
    left: 350px;
    background-color: #f7f9fa;
    background-image: url(../images/empty.jpg);
    background-repeat: no-repeat;
    background-position: center 50px;
}

.panel .header {
    background-color: #eee;
    bottom: auto;
    height: 60px;

    border-bottom: 1px solid #ddd;
}

.panel#side .header,
.login .header {
    background-image: url(../images/logo.png);
    background-repeat: no-repeat;
    background-position: 10px 10px;
}

.panel .search {
    background-color: #fbfbfb;
    border-bottom: 1px solid #eee;
    bottom: auto;
    top: 0;
    height: 50px;
    padding: 10px;
}

.panel .search input {
    width: 100%;
    height: 30px;
    line-height: 30px;
    border: 1px solid #f6f6f6;
    padding: 0 10px 0 36px;
    background-image: url(../images/magnifier.png);
    background-position: 10px center;
    background-repeat: no-repeat;
}

.panel .content {
    overflow-y: auto;
    overflow-x: hidden;
}

.send {
    top: auto;
    height: 60px;
    background-color: #e2e1e0;
}

.content {
    top: 0;
}

.header + .search {
    top: 60px;
}

.header + .content {
    top: 60px;
}

.header + .search + .content {
    top: 110px;
}

.header a.rename,
.header a.add {
    width: 32px;
    height: 32px;
    top: 13px;
    bottom: auto;
    right: 15px;
    left: auto;
}

.header a.add {
    background-image: url(../images/add.png);
}

.header a.rename {
    background-image: url(../images/rename.png);
}

.panel#main .content {
    bottom: 60px;
}

.contact-list li {
    position: relative;
    height: 70px;
    cursor: pointer;
}

.contact-list li:hover {
    background-color: #f4f4f5;
}

.contact-list .item .pic {
    top: 10px;
    bottom: 10px;
    left: 10px;
    right: auto;
    background-size: 50px 50px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.contact-list .item .name {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.contact-list .item .name {
    left: 65px;
    padding: 0 10px;
    line-height: 70px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.contact-list .item.selected {
    background-color: #eee;
}

.contact-list .item.multi .name {
    line-height: 20px;
    padding-top: 15px;
}

.contact-list .item.multi .name span {
    display: block;
    font-size: 12px;
    color: #aaa;
}

.contact-list .item.last .name {
    border-bottom: none;
}

.loading {
    background-image: url(../images/loading_big.gif);
    background-position: center center;
    background-repeat: no-repeat;
}

.scrollable .scrollbar {
    background-color: transparent;
}

.scrollable .scrollbar .handle {
    border-radius: 0;
    background-color: #ccc;
}

.scrollable .scrollbar.scrollbar-y .handle-container {
    top: 0;
    bottom: 0;
}

.scrollable .scrollbar.scrollbar-y {
    width: 6px;
}

.scrollable .scrollbar.scrollbar-y .handle-container .handle {
    width: 6px;
    margin: 0;
}

.panel#main .content {
    background-image: url(../images/background.jpg);
    background-position: bottom right;
    background-size: cover;
}

.header .pic {
    top: 10px;
    bottom: 10px;
    left: 20px;
    right: auto;
    background-size: 40px 40px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.header h1 {
    top: 10px;
    bottom: 10px;
    left: 80px;
    line-height: 40px;
    font-size: 16px;
}

.messages {
    padding-bottom: 20px;
}

.messages li {
    display: block;
    text-align: right;
    padding: 20px 60px 0 60px;
}

.messages li .msg-container * {
    display: block;
    line-height: 20px;
}

.messages li .msg-container {
    position: relative;
    display: inline-block;
    width: 75%;
    padding: 10px;
    background-color: #daf6c4;
    border-radius: 5px;
    box-shadow: 0 1px 1px rgba(0,0,0,.13);
}

.messages li .msg-content {
    text-align: left;
}

.messages li .msg-date {
    font-size: 12px;
    color: rgba(0,0,0,.45);
}

.messages li .msg-container:before {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 12px;
    height: 19px;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(../images/tick.png);
    right: -11px;
}

.send form {
    margin: 10px;
}

.send input {
    border-radius: 5px;
    padding: 0 20px;
    width: 100%;
    height: 40px;
    font-size: 16px;
}

.send .failed {
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    top: -40px;
}

.empty {
    padding: 30px 15px;
    text-align: center;
    color: rgba(0,0,0,.4);
}

.modal {
    position: absolute;
    width: 400px;
    background-color: #eeeeee;
    top: 59px;
    left: 50%;
    margin-left: -200px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 5px rgba(0,0,0,.3);
    padding: 20px;
    display: none;
}

.modal .form select,
.modal .form input {
    padding: 0 10px;
    height: 40px;
}

.modal .form input {
    width: 100%;
}

.modal .form input {
    border-radius: 5px;
}

.modal .form select {
    border-right: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
}

.modal .form .table-layout {
    display: table;
    width: 100%;
}

.modal .form .table-layout .row {
    display: table-row;
    white-space: nowrap;
}

.modal .form .table-layout .cell {
    display: table-cell;
    vertical-align: middle;
}

.modal .form .table-layout .cell.input {
    width: 100%;
}

.modal .form .table-layout .cell input {
    border-radius: 0 5px 5px 0;
}

.modal .form .field-error input {
    border: 3px solid red;
    padding: 7px;
}

.title {
    text-align: center;
    margin-top: 450px;
    padding: 0 60px 20px 60px;
}

.title h1 {
    font-size: 28px;
    line-height: 36px;
    margin-bottom: 20px;
}

.title h2 {
    font-size: 22px;
    line-height: 28px;
}

@media screen and (min-width: 1024px)
{
    .app {
        top: 20px;
        bottom: 20px;
        left: 50%;
        right: 50%;
        margin-left: -480px;
        margin-right: -480px;
        border-radius: 5px;
    }
}

.app.login {
    top: 20px;
    bottom: auto;
    height: 220px;
    left: 50%;
    right: 50%;
    margin-left: -200px;
    margin-right: -200px;
    border-radius: 5px;
}

.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

*::-webkit-scrollbar-track {
    background: rgba(255,255,255,.08);
}

*::-webkit-scrollbar {
    width: 6px!important;
}

*::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,.2);
}