/* Layout */
.main-layout {
    display: flex;
    position: relative;
    flex-flow: column nowrap;
    min-width: 280px;
    height: 100%;
    margin: 0 auto;
    padding-top: 50px;
}

.main-header {
    flex: 0 0 auto;
    height: 50px;
}

.main-area {
    display: flex;
    position: relative;
    flex: 1 1 auto;
    flex-flow: row nowrap;
    align-items: stretch;
    min-height: 0;
}

.main-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: scroll;
}

.h-scrollable {
    overflow: inherit;

    &.w1600 {
        min-width: 1600px;
        overflow-x: auto;
    }
}

/* Guest: header */
.guest-header {
    z-index: 9;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.10);
}

.guest-header > .inner {
    display: flex;
    flex-flow: row nowrap;
    width: 1000px;
    min-height: 50px;
    margin: 0 auto;
}

.guest-header > .inner > .logo {
    display: block;
    position: relative;
    flex: 0 0 auto;
    width: 230px;
}

.guest-header > .inner > .logo > a {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    color: #222;
    font-size: 20px;
}

.guest-header > .inner > .side {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: center;
    margin-left: auto;
}

.guest-header > .inner > .side > .preferences {
    position: relative;
    flex: 0 0 auto;
}

.guest-header > .inner > .side > .preferences > .selected {
    padding: 8px 26px 8px 10px;
    border-radius: 3px;
    color: #444;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease-out;
}

.guest-header > .inner > .side > .preferences > .selected > .arrow {
    display: block;
    position: absolute;
    top: 50%;
    right: 10px;
    width: 8px;
    height: 8px;
    transform: translateY(-50%);
    opacity: 0.7;
}

.guest-header > .inner > .side > .preferences:hover > .selected {
    background: rgba(0, 0, 0, 0.07);
    color: #222;
}

.guest-header > .inner > .side > .preferences:active > .selected {
    background: rgba(0, 0, 0, 0.05);
}

/* Guest settings */
.guest-preferences-content {
    width: 230px;
    padding-top: 3px;
}

.guest-preferences-content > .language > .title {
    margin-bottom: 12px;
    padding: 0 7px;
    color: #000;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    cursor: default;
}

.guest-preferences-content > .language > .options > li {
    display: block;
    padding: 12px 10px;
    color: #222;
    font-size: 14px;
    line-height: 16px;
    cursor: pointer;
    transition: all 0.2s ease-out;
}

.guest-preferences-content > .language > .options > li:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: #000;
}

.guest-preferences-content > .language > .options > li.selected {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
    font-weight: 600;
}

/* Main header */
.main-header {
    display: flex;
    z-index: 9;
    position: fixed;
    top: 0;
    left: 0;
    flex-flow: row nowrap;
    width: 100%;
    min-height: 50px;
    margin: 0 auto;
    background: #1651bb;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.10), inset 0 -1px 0 #0747a6;
}

.main-header > .logo {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: center;
    width: 250px;
    padding: 0 11px;
    box-shadow: inset -1px 0 0 0 rgba(0, 0, 0, 0.08);
    font-weight: 300;
    font-size: 20px;
    line-height: 20px;
    transition: width 0.25s ease-out;
}

.main-header > .logo > a {
    display: block;
    flex: 1 1 auto;
    padding: 3px 5px;
    color: #fff;
}

.main-header > .logo > a > .short {
    display: none;
}

.main-layout.sidebar-collapsed .main-header > .logo {
    position: relative;
    width: 54px;
    padding-right: 0;
    padding-left: 0;
    text-align: left;
}

.main-layout.sidebar-collapsed .main-header > .logo > a {
    padding: 0 0;
    text-align: left;
}

.main-layout.sidebar-collapsed .main-header > .logo > a > .full {
    display: none;
}

.main-layout.sidebar-collapsed .main-header > .logo > a > .short {
    display: block;
    padding-right: 2px;
    text-align: center;
}

.main-header > .search-box {
    position: relative;
    flex: 1 1 auto;
    margin: 0 7px;
    font-size: 0;
}

.main-header > .search-box > input {
    display: block;
    width: 100%;
    height: 37px;
    margin-top: 5px;
    padding: 0 8px 0 37px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    line-height: 37px;
    text-overflow: ellipsis;
    transition: all 0.25s ease-out;
}

.main-header > .search-box > input::placeholder {
    color: #a7bfe9;
}

.main-header > .search-box > .icon {
    display: block;
    position: absolute;
    top: 50%;
    left: 8px;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    background: url('../images/icons/search-white.svg') center center no-repeat;
    background-size: cover;
    opacity: 0.7;
}

.main-header > .search-box > input:hover,
.main-header > .search-box > input:focus,
.main-header > .search-box.hs-opened > input {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 1px #1b4d98, inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.main-header > .search-box > input:hover::placeholder,
.main-header > .search-box > input:focus::placeholder,
.main-header > .search-box.hs-opened > input {
    color: #eee;
}

.cst-list-item {
    display: flex;
    position: relative;
    flex-flow: row nowrap;
    align-items: center;
    overflow: hidden;
}

.cst-list-item > .item-name {
    flex: 0 0 auto;
    overflow: hidden;
    color: #000;
    font-size: 13px;
    line-height: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cst-list-item > .item-additional {
    flex: 1 1 auto;
    margin-left: 7px;
    overflow: hidden;
    color: #777;
    font-size: 13px;
    line-height: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-header > .side {
    display: flex;
    flex: 0 1 auto;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.main-header > .side > .cell {
    display: block;
    position: relative;
    flex: 0 1 auto;
    align-items: stretch;
    box-shadow: inset 1px 0 0 0 #114bb3;
    cursor: pointer;
    transition: all 0.15s ease-out;
}

.main-header > .side > .cell.iconic {
    width: 50px;
}

.main-header > .side > .cell.iconic > .icon {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.9;
}

.main-header > .side > .cell:hover {
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.07);
    box-shadow: inset 1px 0 0 0 #0d46ac, inset -1px 0 0 0 #0d46ac;
}

.main-header > .side > .cell:hover > .label {
    color: #fff;
}

.main-header > .side > .cell.initials {
    display: block;
    width: 50px;
    padding: 0 5px;
}

.main-header > .side > .cell.initials > .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 15px;
    line-height: 30px;
    text-align: center;
}

.main-header > .side > .cell.help > .icon {
    width: 21px;
    height: 21px;
    background-image: url('../images/icons/help-white.svg');
}

.main-header > .side > .cell.layout > .icon {
    width: 21px;
    height: 21px;
    background-image: url('../images/icons/layout-white.svg');
}

.main-header > .side > .cell.logout > .icon {
    width: 19px;
    height: 19px;
    background-image: url('../images/icons/logout-white.svg');
}

.main-header > .side > .switch-back-to-admin {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: center;
    margin-right: 12px;
    padding: 10px 10px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background-color ease-out 0.2s;
}

.main-header > .side > .switch-back-to-admin > .icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    background: url('../images/icons/arrow-left-white.svg') center center no-repeat;
    background-size: contain;
}

.main-header > .side > .switch-back-to-admin > .text {
    flex: 0 0 auto;
    color: #fff;
    font-size: 13px;
    line-height: 13px;
}

.main-header > .side > .switch-back-to-admin:hover {
    background-color: rgba(0, 0, 0, 0.17);
}

/* Main area: module */
.module-container > .head {
    display: flex;
    z-index: 2;
    position: relative;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px;
    overflow: hidden;
}

.module-container > .head > h1 {
    display: block;
    flex: 1 1 auto;
    padding: 5px 0;
    color: #333;
    font-size: 26px;
    line-height: 30px;
    cursor: default;
}

.module-container > .head > .side {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2px;
}

.module-container > .head > .side > .cell {
    display: block;
    flex: 0 0 auto;
    padding: 0 2px;
}

.module-container > .head > .side > .cell.default-search {
    width: 320px;
}

.module-container > .head > .side > .cell:last-child {
    padding-right: 0;
}

.module-container > .head > .side > .cell > .im-button {
    margin: 0 0;
}

.module-container > .head > .side .search-box {
    position: relative;
}

.module-container > .head > .side .search-box > input {
    padding-right: 28px;
}

.module-container > .head > .side .search-box > .icon {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    background-position: center center;
    background-repeat: no-repeat;
    cursor: default;
    opacity: 0.3;
    transition: opacity 0.15s ease-out;
}

.module-container > .head > .side .search-box > .icon {
    background-image: url('../images/icons/search-black.svg');
    background-size: 17px 17px;
}

.module-container > .head > .side .search-box.has-value > .icon {
    background-image: url('../images/icons/close-black.svg');
    background-size: 16px 16px;
}

.module-container > .head > .side .search-box.focused > .icon,
.module-container > .head > .side .search-box > .icon:hover {
    opacity: 0.45;
}

/* Module layout */
.md-layout {
    padding: 17px 22px 25px 22px;
}

.md-layout {

    .md-sub-nav {
        display: flex;
        flex-flow: row nowrap;
        align-items: center;
        margin-bottom: 25px;
        border-bottom: 2px solid #eee;
        transition: box-shadow 0.15s ease-out;
        user-select: none;

        .item {
            display: flex;
            position: relative;
            flex: 0 0 auto;
            flex-flow: row nowrap;
            align-items: center;
            justify-content: center;
            min-width: 100px;
            padding: 8px 12px;
            color: #444;
            font-weight: 600;
            font-size: 13px;
            line-height: 15px;
            text-align: center;
            cursor: pointer;
            transition: color 0.15s ease-out;

            .icon {
                display: block;
                flex: 0 0 auto;
                margin-right: 7px;
                color: #777;

                svg {
                    width: 18px;
                    height: 18px;
                    fill: currentColor;
                }
            }

            .title {
                flex: 0 0 auto;
                font-weight: 600;
            }

            &:hover {
                box-shadow: 0 2px 0 #aaa;
                color: #333;

                .icon {
                    color: #555;
                }
            }

            &.selected {
                box-shadow: 0 2px 0 0 #1b4dc9;
                color: #1b4dc9;

                .icon {
                    color: #1b4dc9;
                }
            }
        }
    }

    .md-head {
        display: flex;
        z-index: 2;
        position: relative;
        flex-flow: row nowrap;
        align-items: center;
        justify-content: space-between;
        margin: 0 0 5px 0;
        padding-bottom: 17px;
        overflow: hidden;

        h1 {
            display: block;
            flex: 0 0 auto;
            min-width: 160px;
            padding: 5px 0;
            color: #333;
            font-size: 26px;
            line-height: 30px;
            cursor: default;
        }

        .tabs {
            display: flex;
            flex: 0 0 auto;
            flex-flow: row nowrap;
            align-items: flex-start;
            justify-content: flex-start;
            margin-left: 25px;
            overflow: hidden;
            font-size: 0;

            .tab {
                position: relative;
                flex: 0 0 auto;
                min-width: 70px;
                height: 37px;
                padding: 0 15px;
                box-shadow: inset 0 -1px 0 0 #d3dae6;
                color: #555;
                font-weight: 600;
                font-size: 13px;
                line-height: 37px;
                text-align: center;
                cursor: pointer;
                transition: all 0.12s ease-out;

                &:hover {
                    box-shadow: inset 0 -1px 0 0 #888;
                    color: #333;
                }

                &.selected {
                    box-shadow: inset 0 -1px 0 0 #1b4dc9;
                    color: #1b4dc9;
                }
            }
        }

        &.with-nav-tabs {
            padding-bottom: 12px;
        }
    }

    .md-bottom {
        margin-top: 25px;
    }

}

.md-head > .title {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: center;
}

.md-head > .title > h1 {
    display: block;
    flex: 0 0 auto;
    min-width: 160px;
    padding: 5px 0;
    color: #333;
    font-size: 26px;
    line-height: 30px;
    cursor: default;
}

.md-head > .title > .cells {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    margin-left: 35px;
    padding: 0 2px;
}

.md-head > .title > .cells > .cell {
    display: block;
    flex: 0 0 auto;
    padding: 0 2px;
}

.md-head > .title > .cells > .cell:last-child {
    padding-right: 0;
}

.md-head > .title.no-min-width > h1 {
    min-width: auto;
}

.md-head > .side {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2px;
}

.md-head > .side > .cell {
    display: block;
    flex: 0 0 auto;
    padding: 0 2px;
}

.md-head > .side > .cell.default-search {
    width: 320px;
}

.md-head > .side > .cell:last-child {
    padding-right: 0;
}

.md-head > .side > .cell > .im-button {
    margin: 0 0;
}

.md-head > .side .search-box {
    position: relative;
}

.md-head > .side .search-box > input {
    padding-right: 28px;
}

.md-head > .side .search-box > .icon {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    background-position: center center;
    background-repeat: no-repeat;
    cursor: default;
    opacity: 0.3;
    transition: opacity 0.15s ease-out;
}

.md-head > .side .search-box > .icon {
    background-image: url('../images/icons/search-black.svg');
    background-size: 17px 17px;
}

.md-head > .side .search-box.has-value > .icon {
    background-image: url('../images/icons/close-black.svg');
    background-size: 16px 16px;
}

.md-head > .side .search-box.focused > .icon,
.md-head > .side .search-box > .icon:hover {
    opacity: 0.45;
}

.md-content .md-row {
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-start;
    max-width: 1800px;
    margin: 0 auto 35px auto;
}

.md-content .md-row.no-margin {
    margin-bottom: 0;
}

.md-content .md-row:last-child {
    margin-bottom: 0;
}

.md-content .md-row .md-column {
    flex: 1 1 auto;
}

.md-content .md-filters {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px 12px;
    border-bottom: 1px solid #eaeaea;
    background: #f7f7f7;
}

.md-content .md-filters > .cell {
    flex: 1 1 auto;
}

.md-content .md-subtitle {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin: 20px 0 12px 0;
}

.md-content .md-subtitle > .title {
    display: block;
    flex: 1 1 auto;
    padding: 0 1px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    line-height: 16px;
    cursor: default;
}

.md-content .md-subtitle > .side {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2px;
}

.md-content .md-subtitle > .side > .cell {
    display: block;
    flex: 0 0 auto;
    padding: 0 2px;
}

.md-content .md-subtitle > .side > .cell:last-child {
    padding-right: 0;
}

.md-content .md-subtitle > .side > .cell > .im-button {
    margin: 0 0;
}

.md-content .md-section {
    flex: 1 1;
    margin-bottom: 30px;
}

.md-content .md-section:last-child {
    margin-bottom: 0;
}

.md-content .md-section > .head {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin-bottom: 20px;
}

.md-content .md-section > .head > .title {
    display: block;
    flex: 1 1 auto;
    padding: 0 3px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    line-height: 14px;
}

.md-content .md-section > .head > .side {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
}

.md-content .md-section > .head > .side > .cell {
    display: block;
    flex: 0 0 auto;
    padding: 0 2px;
}

.md-content .md-section > .head > .side > .cell:last-child {
    padding-right: 0;
}

.md-content .md-section > .head > .side > .cell > .im-button {
    margin: 0 0;
}

.md-content .md-section > .head.align-left > .title {
    flex: 0 0 auto;
}

.md-content .md-section > .head.align-left > .side {
    justify-content: flex-start;
    margin-left: 25px;
}

.md-layout.no-side-padding > .md-head,
.md-layout.no-side-padding > .md-content,
.md-layout.no-side-padding > .md-bottom {
    padding-right: 0;
    padding-left: 0;
}

.md-shadow {
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(60, 60, 60, 0.2);
}

.md-as-panel {
    padding: 13px 13px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(60, 60, 60, 0.2);
}

.md-row-no-results {
    padding: 8px 7px;
    background: #fbfbfb;
    color: #111;
    font-size: 13px;
    line-height: 17px;
    text-shadow: 1px 1px #fff;
    cursor: default;
    user-select: none;
}

.md-row-no-results.center {
    text-align: center;
}

.md-row-no-results.left {
    text-align: left;
}

.md-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

@media all and (max-width: 1100px) {
    .guest-header {
        padding-right: 17px;
        padding-left: 17px;
    }

    .guest-header > .inner {
        width: 100%;
    }
}

@media all and (max-width: 600px) {
    .guest-header > .inner > .logo {
        width: 140px;
    }

    .main-header > .logo {
        position: relative;
        width: 54px;
        padding-right: 0;
        padding-left: 0;
        text-align: left;
    }

    .main-header > .logo > a {
        padding: 0 0;
        text-align: left;
    }

    .main-header > .logo > a > .full {
        display: none;
    }

    .main-header > .logo > a > .short {
        display: block;
        padding-right: 2px;
        text-align: center;
    }

    .main-header > .side > .cell.iconic {
        width: 47px;
    }

    .main-header > .side > .cell.initials > .circle {
        width: 30px;
        height: 30px;
        line-height: 30px;
    }
}

@media all and (max-width: 400px) {
    .imjs-popup.guest-preferences-popup {
        width: 85%;
    }

    .guest-preferences-content {
        width: 100%;
    }
}
