* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #f7f7f7;
    font-family: sans-serif;
    color: #2b2b2b;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/******* TYPOGRAPHY *******/

h1,h2,h3,h4,h5,h6,p {
    margin: 0;
}
h1,h3,h4 {
    font-weight: normal;
}
h2 {
    font-size: 19pt;
    margin-bottom: 15px;
    color: #333333;
}
h3 {
    font-size: 14pt;
    margin-bottom: 10px;
}
h4 {
    font-size: 13pt;
    color: #424242;
    border-bottom: 1px solid #d1d1d1;
    margin: 11px 0;
}

/******* HEADER *******/

header {
    padding: 20px 25px 0;
}

header a {
    color: #656060;
    font-size: 12pt;
    text-decoration: none;
}

header i[class^="fa"] {
    color: #b1b1b1;
    font-size: 16pt;
    line-height: 0;
    margin-left: 2px;
    position: relative;
    top: 2px;
}

.logo {
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 75px;
}

.top-right-nav {
    float: right;
}
.top-right-nav > * {
    margin-left: 10px;
}

/* header nav */

nav {
    display: flex;
    margin-left: 20px;
}

nav > * {
    padding: 5px 15px;
    color: #656060;
    text-decoration: none;
    border-bottom: 2px solid #dcdcdc;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    outline: none;
}

nav > .selected, nav > *:hover {
    border-color: #194B6E;
    color: #4c4949;
}

nav > *:not(:hover) .sub-menu {
    display: none;
}

nav .sub-menu {
    position: absolute;
    min-width: 100%;
    top: 28px;
    left: 0;
    z-index: 5;
    background: white;
    border: 2px solid #194B6E;
    box-sizing: border-box;
}

nav .sub-menu a {
    display: block;
    padding: 5px 30px 5px 15px;
    color: #5a5959;
    text-decoration: none;
    white-space: nowrap;
}
nav .sub-menu a:hover {
    background: #f1f1f1;
}

.mobile-nav-btn {
    display: none;
}

/******* MAIN LAYOUT *******/

main {
    flex-grow: 2;
    display: flex;
    padding: 0 15px 15px;
    box-sizing: border-box;
}

main > div {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

main > *:not(.stacked-layout), main .stacked-layout > * {
    padding: 20px 30px;
    background: white;
    border: 2px solid gray;
    margin: 15px;
    flex-grow: 2;
}

.stacked-layout {
    flex-grow: 2;
    display: flex;
    flex-direction: column;
}

.sidebar {
    max-width: 350px;
    min-width: 350px;
}

.heading {
    margin: 0 0 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid;
    color: #404040;
    font-weight: normal;
}

.heading > .button {
    float: right;
}

/******* BUTTONS *******/

.button {
    cursor: pointer;
    outline: none;
    text-decoration: none;
    padding: 5px 8px;
    font: normal 12pt sans-serif;
    background: #eee;
    border: 2px solid #ADA9A9;
    color: #6f6f6f;
}
.button:hover {
    filter: brightness(0.95);
}

.button i[class^=fa] {
    margin: 0 7px 0 0;
    font-size: 14pt;
}

.green.button {
    background: #39c002;
    border-color: #39c002;
    color: white;
}
.blue.button {
    background: #194B6E;
    border-color: #194B6E;
    color: white;
}
.red.button {
    background: #C51010;
    border-color: #C51010;
    color: white;
}
.icon-btn {
    color: #6d6e6f;
    margin-left: 5px;
    cursor: pointer;
}
.green.icon-btn {
    color: #15ab15;
}
.red.icon-btn {
    color: #C51010;
}
.icon-btn:hover {
    filter: brightness(0.9);
}

/******* UTILITY CLASSES *******/

.flex {
    display: flex;
    justify-content: space-between
}

.half-columns {
    display: flex;
    gap: 40px;
}
.half-columns > * {
    flex-grow: 2;
    width: 50%;
}

.placeholder {
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}
.placeholder [class^=fa] {
    font-size: 20pt;
    color: #929292;
}

.columned {
    display: grid;
    grid-gap: 2rem;

    /* Responsive way to build a grid with identically-sized columns and wrapping rows */
    grid-template-columns: repeat(auto-fill, minmax(22rem, auto));
}

.sticky-header {
    padding: 10px 0;
    margin-top: -10px;
    position: sticky;
    z-index: 10;
    top: -20px;
    background: white;
}

/******* MISC STYLES *******/

hr {
    border: none;
    border-top: 1px solid #aaa;
}

th {
    text-align: left;
}

input[readonly] {
    border: 1px solid #a9a9a9;
    background-color: #f8f8f8;
    color: #545454;
}

.cell-limit {
    display: inline-block;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* */

.landscape {
    display: none;
}

@media (max-width: 600px) and (orientation: portrait) {
    .landscape {
        position: fixed;
        z-index: 1000;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: white;
        display: flex !important;
        justify-content: center;
        align-items: center;
        font-size: 14pt;
    }

    .landscape:before {content: "Please Rotate your Screen";}

}

@media (max-width: 600px) {
    .flex:not(.nowrap), .half-columns:not(.nowrap) {
        flex-wrap: wrap;
    }
    .half-columns:not(.nowrap) > * {
        width: 100%;
    }
}

@media (min-width: 901px) {
    .nav-wrapper {
        display: block !important;
    }
}
@media (max-width: 900px) {

    main > *:not(.stacked-layout), main .stacked-layout > * {
        margin: 15px 5px;
        padding: 20px 15px;
    }

    .nav-wrapper {
        display: none;
    }
    nav {
        flex-direction: column;
        position: absolute;
        top: 55px;
        right: 0;
        z-index: 1000;
        background: white;
        border: 1px solid #194B6E;
    }
    nav > * {
        padding: 15px 25px;
    }
    nav .sub-menu {
        position: static;
        border: none;
        margin-top: 14px;
    }
    nav .sub-menu a {
        padding: 10px;
        border-bottom: 1px solid gray;
    }
    .mobile-nav-btn {
        display: inline-block;
    }
}

@media (max-width: 1200px) {
    main {
        flex-direction: column;
        padding: 0;
    }

    .sidebar {
        max-width: none;
        order: 2;
    }

    main > div {
        max-height: none;
    }
}

.onprint {
    display: none;
}
@media print {
    .button, .icon-btn, .noprint, header{
        display: none;
    }
    .onprint {
        display: initial;
    }
    body {
         background: none !important;
    }
    main {
        padding: 0;
    }
    main > * {
        margin: 0 !important;
        border: none !important;
    }
}

