body {
    background: rgb(250, 250, 250);
    font-family: 'Lato';
    font-weight: 300;
    font-size: 13px;
}

@media screen and (orientation: portrait) {
    body.vertically-required {
        overflow: hidden;
    }
    
    body.vertically-required .wrapper::after {
        font-family: 'Font Awesome 6 Free';
        content: '\f2f9';
        font-size: 5rem;
        display: flex;
        position: fixed;
        background-color: rgba(255,255,255,0.95);
        width: 100%;
        height: 100vh;
        top: 0;
        left: 0;
        z-index: 2000;
        justify-content: center;
        align-items: center;
        padding-bottom: 12rem;
        box-sizing: border-box;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    body.vertically-required::after {
        content: 'Bitte das Gerät drehen';
        font-size: 1rem;
        display: flex;
        position: fixed;
        width: 100%;
        height: 100vh;
        top: 0;
        left: 0;
        z-index: 2001;
        box-sizing: border-box;
        justify-content: center;
        align-items: center;
    }

}

a {
    color: rgb(0,0,0);
}

a:hover {
    text-decoration: none;
    color: inherit;
}

pre#debugarea {
    display: none;
}

/* Wrapper */

.wrapper {
    position: relative;
    top: 0;
    height: 100vh;
    
}

/* Sidebar */

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 260px;
    background: rgb(255, 255, 255);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.4), 0 4px 25px 0px rgba(0, 0, 0, 0.1), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
}

.sidebar .sidebar-wrapper {
    position: relative;
    height: calc(100vh - 1px);
    overflow: auto;
    width: 260px;
    padding-bottom: 30px;
}

.sidebar .user {
    padding-bottom: 17px;
    margin: 17px auto 0;
    position: relative;
}

.sidebar .user:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 15px;
    height: 1px;
    width: calc(100% - 30px);
    background-color: rgba(180, 180, 180, 0.3);
}

.sidebar .user .info {
    justify-content: center;
    display: flex;
    flex-direction: column;
}

.sidebar .user .info .icon-holder {
    justify-content: center;
    display: flex;
}

.user .usericon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(128,2,19);
    /* background: linear-gradient(135deg, rgba(128,2,19,1) 0%, rgba(5,106,185,1) 100%); */
    color: #fff;
    justify-content: center;
    display: flex;
    align-items: center;
    font-weight: bold;
    animation: userIconColor 20s infinite linear;
    transition: all 100ms ease-in-out;
}

.user #userarea {
    padding: 0 10%;
}

@keyframes userIconColor {
    0% { background-color: rgba(128,2,19,1) }
    25% { background-color: linear-gradient(135deg, rgba(128,2,19,1) 0%, rgba(5,106,185,1) 100%); }
    50% { background-color: rgba(5,106,185,1); }
    75% { background-color: linear-gradient(135deg, rgba(128,2,19,1) 0%, rgba(5,106,185,1) 100%); }
    100% { background-color: rgba(128,2,19,1); }
}

.user .usericon.pulse {
    width: 40px;
    height: 40px;
    margin: -3px auto;
    transition: all 100ms ease-in-out;
}

.sidebar .nav { margin-top: 0.5em; }
.sidebar .nav .nav { margin-top: 0px; }

.sidebar .nav li {
    float: none;
    clear: both;
    width: 100%;
    margin: 0.5em 10% 0;
    border-radius: 3px;
    position: relative;
}

.sidebar .nav li.solved a p {
    text-decoration: line-through;
}

.sidebar .nav li.noshow {
    opacity: 0.25;
}

.sidebar .nav .nav li {
    margin: 0px;
    padding-left: 10px;
    border-radius: 0px;
}

.sidebar .nav li.active { background-color: rgba(180, 180, 180, 0.3); }
.sidebar .nav li[data-color="cyan"].active { background-color: rgba(26, 172, 226, 0.3); }
.sidebar .nav li[data-color="magenta"].active { background-color: rgba(225, 26, 141, 0.3); }
.sidebar .nav li[data-color="yellow"].active { background-color: rgba(242, 215, 5, 0.3); }
.sidebar .nav li[data-color="red"].active { background-color: rgba(150, 0, 0, 0.3); }

.sidebar .nav li:hover { background-color: rgba(180, 180, 180, 0.15); }
.sidebar .nav li[data-color="cyan"]:hover { background-color: rgba(26, 172, 226, 0.15); }
.sidebar .nav li[data-color="magenta"]:hover { background-color: rgba(225, 26, 141, 0.15); }
.sidebar .nav li[data-color="yellow"]:hover { background-color: rgba(242, 215, 5, 0.15); }
.sidebar .nav li[data-color="red"].active { background-color: rgba(150, 0, 0, 0.3); }

.sidebar .nav .nav>li:hover { background-color: rgba(255, 255, 255, 0.3); }

.sidebar .nav a {
    color: rgb(0,0,0);
    display: block;
}

.sidebar .nav .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    position: absolute;
    right: 15px;
    top: 22px;
    -webkit-transition: all 150ms ease-in;
    -moz-transition: all 150ms ease-in;
    -o-transition: all 150ms ease-in;
    -ms-transition: all 150ms ease-in;
    transition: all 150ms ease-in;
}

.sidebar .nav a[data-toggle="collapse"][aria-expanded="true"] .caret {
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.sidebar .nav li[data-color="cyan"] a { color: rgb(26, 172, 226); }
.sidebar .nav li[data-color="magenta"] a { color: rgb(225, 26, 141); }
.sidebar .nav li[data-color="yellow"] a { color: rgb(222, 197, 0); }
.sidebar .nav li[data-color="red"] a { color: rgb(150, 0, 0); }

.sidebar .nav p {
    margin: 0;
    line-height: 50px;
    position: relative;
    display: inline-block;
    height: auto;
    white-space: nowrap;
    text-transform: uppercase;
}

.sidebar .nav .nav p {
    margin: 0;
    line-height: 40px;
    position: relative;
    display: inline-block;
    height: auto;
    white-space: nowrap;
    text-transform: none;
}

.sidebar .nav i {
    font-size: 18px;
    float: left;
    margin: 10px;
    line-height: 30px;
    width: 30px;
    text-align: center;
    color: #ffffff;
    background: #000000;
    border-radius: 3px;
}

.sidebar .nav li[data-color="cyan"] i { background: rgb(26, 172, 226); }
.sidebar .nav li[data-color="magenta"] i { background: rgb(225, 26, 141); }
.sidebar .nav li[data-color="yellow"] i { background: rgb(242, 215, 5); }
.sidebar .nav li[data-color="red"] i { background: rgb(150, 0, 0); }

.sidebar .nav .nav i {
    font-size: 12px;
    margin: 10px;
    line-height: 20px;
    width: 20px;
    text-align: center;
    color: #ffffff;
    background: #000000;
    border-radius: 3px;
}


@media (max-width:768px) {
    .sidebar {
        width: 64px;
    }

    .sidebar .sidebar-wrapper {
        width: 64px;
    }

    .sidebar .nav > li .collapse,
    .sidebar .nav > li .collapse.show {
        display: none;
    }

    .sidebar .nav > li:hover .collapse {
        position: fixed;
        display: block;
        left: 55px;
        background: white;
    }

    .sidebar .nav > li:hover .collapse ul {
        flex-direction: column;
        background-color: rgba(180, 180, 180, 0.15);
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
        border-bottom-left-radius: 3px;
    }

    .sidebar .nav > li:hover .collapse ul li {
        padding-right: 20px;
    }

    .sidebar .nav .caret { display: none; }
    
    .sidebar .nav p { display: none; }


}

/* Top-Bar */

.topbar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 100vw;
    height: 50px;
    background: rgb(255, 255, 255);
    box-shadow: 0 4px 25px 0px rgba(0, 0, 0, 0.1);
}

.topbar .topbar-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.topbar .topbar-wrapper .user {
    display: none;
}

.topbar .topbar-wrapper > .nav {
    justify-content: center;
}

.topbar .topbar-wrapper > .nav li {
    position: relative;
    background: #000000;
    color: #ffffff;
    margin: 10px;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 1.2em;
}

@media (max-width:480px) { 
    .topbar .topbar-wrapper > .nav li {
        margin: 10px 5px;
    }
}

.topbar .topbar-wrapper > .nav li a {
    color: inherit;
}

.topbar .topbar-wrapper > .nav li.active {
    background: #1555af;
}

.topbar .topbar-wrapper > .nav li a p,
.topbar .topbar-wrapper > .nav li a b { 
    display: none; 
}

.topbar .topbar-wrapper > .nav li .collapse { 
    display: none; 
    position: absolute;
    top: 40px;
    margin: 0;
    background: white;
    padding: 10px 0;
}

.topbar .topbar-wrapper > .nav li .collapsing {
    position: absolute !important;
    background: white;
    top: 40px;
    padding: 10px 0;
}

.topbar .topbar-wrapper > .nav li .collapse.show {
    display: block !important;
}

.topbar .topbar-wrapper > .nav li .collapsing .nav li,
.topbar .topbar-wrapper > .nav li .collapse .nav li { 
    position: relative;
    background: transparent;
    margin: 3px 10px;
    height: 20px;
    width: auto;
    display: block;
    justify-content: unset;
    align-items: unset;
    border-radius: 0;
    font-size: 0.75em;
    color: #000;
    white-space: nowrap;
}

.topbar .topbar-wrapper > .nav .nav li a p,
.topbar .topbar-wrapper > .nav .nav  li a b { 
    display: inherit; 
    margin: 0 5px;
}

/* Main Panel */

.main-panel {
    padding-left: 260px;
}

@media (max-width:768px) {
    .main-panel {
        padding-left: 64px;
    }
}

.main-panel.fullsize,
.main-panel.print {
    padding-left: 0px;
}

.main-panel.print {
    width: 100%;
}

@media screen {
    .main-panel.print {
        max-width: 100vw;
        margin: 0 auto;
    }
}

.main-panel .content {
    min-height: 95vh;
}

.main-panel.print .content.print {
    padding-top: 70px;
    padding-bottom: 1px;
}

.main-panel.print .content.print .toptext {
    display: none;
}

.main-panel.print .content.print .container-print-portrait .header-row .address-col {
    align-content: end;
    padding-bottom: 15mm;
}

.main-panel.print .content.print .container-print-portrait .header-row .address-col .bscletteraddress {
    font-size: 0.75em;
    padding-bottom: 5mm;
}

.main-panel.print .content.print .container-print-portrait .header-row .info-col {
    align-content: end;
    text-align: right;
}

.main-panel.print .content.print .container-print-portrait .bottomtext {
    align-items: flex-end;
    flex: 1;
}

.main-panel.print .content.print .container-print-portrait .bottomtext-center {
    text-align: center;
}

.main-panel.print .content.print .container-print-portrait .bottomtext-right {
    text-align: right;
    white-space: nowrap;
}

@media screen {
    .main-panel.print .content.print .container-print {
        background: #fff;
        padding: 1cm;
        box-sizing: border-box;
        box-shadow: 0px 0px 15px grey;
        margin: 0 auto 2em auto;
        max-width: 29.7cm;
        /* background-image: url('/media/images/a4horizontal.png'); */
        background-position-x: 0;
        background-repeat: repeat-y;
        background-size: contain;
    }

    .main-panel.print .content.print .container-print.container-print-portrait {
        /* background-image: url('/media/images/a4vertical.png'); */
        min-height: 25.7cm;
        max-width: 21cm;
        position: relative;
        display: flex;
        flex-direction: column;
    }
}

.main-panel .content h1 {
    text-transform: uppercase;
    font-size: 1.8em;
    font-weight: 300;
    margin: 0.8em 0px;
}

.main-panel .content h2 {
    text-transform: uppercase;
    font-size: 1.5em;
    font-weight: 300;
    margin: 0.4em 0px;
}

@media (max-width:768px) {
    .main-panel .content h1 {
        hyphens: auto;
        padding-right: 3em;
    }
    
    .main-panel .content h2 {
        hyphens: auto;
        padding-right: 3em;
    }
}

/* TABLE PRINT MANIPULATION */

div.show-table {
    height: 0;
    overflow: hidden;
}

div.show-table tr.part {
    background: grey;
}

p.page-number {
    text-align: center;
    font-size: 0.75em;
}

@media screen {
    p.page-number {
        margin-top: 1em;
    }

    p.page-number:first-child {
        margin-top: 0em;
    }
}

/* Messages */

#messages p,
#messages h1,
#messages h2 {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Cards */

.card {
    border: none;
    border-radius: 0px;
    background-color: #ffffff;
    margin-bottom: 0.8rem;
}

.card-header {
    padding: .75rem 1.25rem;
    margin-bottom: 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #dddddd;
}

.card-header:first-child {
    border-radius: 0px;
}

.card-subheader {
    padding: .5rem 1.25rem;
    margin-bottom: 0;
    background-color: #eeeeee;
    font-size: 0.75rem;
    border-bottom: 1px solid #dddddd;
}

.card.job-card.running .card-subheader {
    background: var(--success);
}

.card-subheader * {
    margin: 0;
    padding: 0;
}

.card.disabled .card-body,
.card.disabled .card-footer {
    display: none;
}

.card.disabled .card-header {
    box-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.card .card-header .toggler {
    position: relative;
    float: right;
    width: 2em;
    height: 2em;
    color: grey;
    text-align: end;
    cursor: pointer;
}

.card .card-header .toggler::after {
    font-family: 'Font Awesome 6 Free';
    content: '\f151';
    position: absolute;
    right: 0;
    top: 0.5em;
    font-size: 1em;
}

.card.disabled .card-header .toggler::after {
    font-family: 'Font Awesome 6 Free';
    content: '\f150';
}

.card-header + .card-body {
    margin-top: 0px;
    border-top: none;
}

.card-sub {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 1px;
    padding: 1.25rem;
    background: #eeeeee;
}

.card-sub .infocol em {
    display: inline-block;
    max-height: 6em;
    text-overflow: ellipsis;
    overflow: hidden;
}

.card:not(.disabled) .card-sub {
    padding-top: 0;
    margin-top: -1.25rem;
    background: inherit;
}

.card:not(.disabled) .card-sub .infocol em {
    max-height: 60em;
}

.card-footer {
    background-color: rgba(0,0,0,.05);
}

.card-footer :last-child {
    margin-bottom: 0;
}

.card.job-card:not(.running) .button-endjob {
    display: none;
}

.card.job-card.running .button-startjob {
    display: none;
}

/* Tables */

.table {
    width: 100%;
}

.table thead {
    background-color: rgb(233, 236, 239);
}

.table th + th {
    border-left: 1px solid #fff;
}

.table thead th { border-bottom: 0px; }

.table tbody tr:nth-child(2n) { background-color: rgba(233, 236, 239, 0.3); }

.table tbody tr:nth-child(2n)[data-color="cyan"] { background-color: rgba(26, 172, 226, 0.15); }
.table tbody tr:nth-child(2n)[data-color="magenta"] { background-color: rgba(226, 26, 141, 0.15); }
.table tbody tr:nth-child(2n)[data-color="yellow"] { background-color: rgba(242, 215, 5, 0.15); }

.table .dtr-details {
    width: 100%;
}

.table .dtr-details .dtr-data {
    display: inline-flex;
}

.table.lo-info li {
    float: left;
    margin-right: 1em;
}

/* Widget */

.widget {
    padding: 1.8rem 0.8rem;
    text-align: center;
}

.widget::after {
    content: ' ';
    display: block;
    position: absolute;
    right: 0px;
    top: 10%;
    height: 80%;
    border-left: 1px solid rgba(0, 0, 0, .125);
}

.row>div:last-child>.widget::after { display: none; }

@media (max-width:768px) {
    .widget::after {
        display: none;
        }

}

.widget-value {
    text-transform: uppercase;
    font-weight: 300;
    font-size: 2.5em;
    margin-bottom: 0px;
}

.widget-desc {
    text-transform: uppercase;
    font-size: 1.25em;
    margin-bottom: 0px;
}

/* Forms */

form.form-horizontal {}

form.form-horizontal .form-group { display: flex ; margin-bottom: 1em; }

form.form-horizontal .form-group label { line-height: 1.25; padding-top: 0.5rem; }

form.form-horizontal .form-group input.form-control, form.form-horizontal .form-group textarea.form-control { 
    padding: .5rem ;
    font-size: 1em;
    line-height: 1.25;
    border-radius: 3px;
}

form .form-group label {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-left: 0.25rem;
    margin-bottom: -0.5rem;
    background-color: white;
    padding: 0 0.5rem;
    font-size: 0.6rem;
}

form .form-group.disabled input {
    margin-top: 0.4rem;
}

form .form-group.disabled input::before {
    content: 'a';
}

form .form-group.disabled label {
    display: none;
    transition: all 500ms ease;
}

form .form-group.disabled:hover label {
    box-sizing: border-box;
    color: black;
    position: absolute;
    top: -0.5rem;
    opacity: 1!important;
    display: block;    
}

form .form-check label {
    position: inherit;
    z-index: initial;
    display: inherit;
    margin-left: inherit;
    margin-bottom: inherit;
    background-color: inherit;
    padding: inherit;
    font-size: inherit;
}

form .form-control-file {
    height: auto;
    padding: 0;
}

form input[type="file"].form-control-file::file-selector-button {
    width: 1px;
    padding-left: 0;
    padding-right: 0;
    border: none;
    background: none;
    color: transparent;
}

input[type="_hidden"] {
    opacity: 0.5 !important;
    background: rgb(161, 62, 62) !important;
    color: #fff;
}

.custom-select.required {
    border: 1px solid rgb(161,62,62) !important;
    background-color: rgba(161,62,62,0.1);
}

h2 label {
    display: flex;
    margin: 0;
}

h2 label input {
    margin-right: 0.5rem;
    align-self: center;
}

h2 label span {
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    overflow: hidden;
}

form .form-group .input-group input.form-control {
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}

.form-group ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
    color: rgba(73, 80, 87, 0.3);
}

.form-group i.form-action {
    line-height: 1.25;
    padding-top: 0.5rem;
}

.form-group p.desc {
    margin-top: 0.5rem;
    margin-bottom: 0rem;
    font-size: 0.9em;
}

textarea.form-control.small { min-height: 0em; }
textarea.form-control.medium { min-height: 10em; }
textarea.form-control.large { min-height: 20em; }

textarea.edit-textarea {
    background: transparent;
    border: none;
    outline: none;
    overflow: hidden;
    resize: none;
    width: 100%;
    height: auto;
    font-weight: inherit;
}

textarea.auto-resize {
    resize: none;
    min-height: 3em;
}

/* Footer */

.footer {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: -1;
}

/* Farben */

[data-color="cyan"], [data-color="cyan"] a { color: rgb(26, 172, 226); }
[data-color="magenta"], [data-color="magenta"] a { color: rgb(226, 26, 141); }
[data-color="yellow"], [data-color="yellow"] a { color: rgb(222, 197, 0); }
[data-color="red"], [data-color="red"] a { color: rgb(150, 0, 0); }

/* Datatable */

div.dt-container div.dt-paging {
    margin-bottom: 20px;
}

.col-lg-1 .card .card-body .dt-paging.paging_full_numbers .pagination .dt-paging-button.page-item,
.col-lg-2 .card .card-body .dt-paging.paging_full_numbers .pagination .dt-paging-button.page-item,
.col-lg-3 .card .card-body .dt-paging.paging_full_numbers .pagination .dt-paging-button.page-item,
.col-lg-4 .card .card-body .dt-paging.paging_full_numbers .pagination .dt-paging-button.page-item {
    flex-grow: 1;
    text-align: center;
}

/* Tags */

.tag {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #eeeeee;
    border: 1px solid #dddddd;
    padding: .15rem .25rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: .25rem;
    margin-right: 2px;
    margin-bottom: 2px;
}

.tag::before {
    content: '#';
}

.tag-warning {
    background-color: #ffc107;
    border-color: #e4ab02;
}

.select2.select-as-tag,
.select2.select-as-tag .select2-selection {
    border-color: #eeeeee;
}

.select2.select-as-tag .select2-selection--multiple .select2-selection__choice {
    background-color: #ffc107;
    border: 1px solid #e4ab02;
}


/* BUTTON XS */

.btn {
    margin-bottom: 2px;
}

.btn-xs {
    padding: .15rem .25rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* PRINT-(PRE-)VIEW */

.main-panel.print .content.print .container-print :not(i) {
    font-family: verdana, arial, sans-serif;
    font-family: 'Open Sans', sans-serif;
}

.main-panel.print .content.print .container-print h6 {
    font-size: 5mm;
}

.main-panel.print .content.print .container-print table {
    border-collapse: collapse;
}

.main-panel.print .content.print .container-print th,
.main-panel.print .content.print .container-print td {
    border: 0.5px solid black;
    padding: 1mm;
    text-align: left;
}

.main-panel.print .content.print .container-print th {
    text-align: left;
    padding: 1mm;
}

.main-panel.print .content.print .container-print th.noprint,
.main-panel.print .content.print .container-print td.noprint {
    border: none;
}

.main-panel.print .content.print .container-print .col-unit,
.main-panel.print .content.print .container-print .col-count,
.main-panel.print .content.print .container-print .col-value,
.main-panel.print .content.print .container-print .col-tax {
    text-align: right;
    white-space: nowrap;
}

/* ICONS */

.icon {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-lawnmower {
    background-image: url('/media/images/lawn_mower.svg');
}

.icon-motorscythe {
    background-image: url('/media/images/motor_scythe.svg');
}

.fa-clickable {
    cursor: pointer;
    font-size: 1.2em;
}

/* INLINE EDITING */

.edit-area {
    position: relative;
}

.edit-backdrop {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.8);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 200ms;
}

.edit-area:hover .edit-backdrop {
    opacity: 1;
}

.edit-show {
    position: absolute;
    right: 2px;
    top: 2px;
    font-size: 0.7em;
    color: grey;
}