:root {
    --fixed-header-height: 40px;
    --fixed-toolbar-height: 40px;
    --fixed-header-height-600: 40px;
    --fixed-toolbar-height-600: 80px;
    /**/
    --header-bg: #041b27;
    --header-fg: #ffffff;
    --tile-header-fg: #002585;
    --tile-hover-bg: #dee4f6;
    --block-hover-bg: #ebf0ff;
    --button-bg: #2965ff;
    --money: #2965ff;
    --button-hover-bg: #0a4360;
    --button-fg: #ffffff;
    --RNW: #e60086;
    --SAN: #0083f5;
    --green: #00945e;
    --amber: #ca8e01;
    --red: #d90035;
}

.koadebug {
    display: none;
    position: absolute;
    opacity: 0
}

body {
    background: #FFF;
}

body, p, div, span td, th, input, textarea, select {
    font-family: 'Host Grotesk';
}

h1, h2, h3 {
    /*font-family: 'Freeman';
    font-weight: 100;*/
    font-family: 'Sofia Sans Semi Condensed';
    font-weight: 600;
}

h1 {
    margin-bottom: 0.5rem;
}

input[type=text],
input[type=password],
input[type=date],
input[type=number],
select,
textarea,
.cb,
.cbs,
.cfaf-content-editable,
.readonly {
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    padding: 8px;
    background: #FFFFFF;
    outline: none;
    transition: 0.5s;
    width: 100%;
    color: #000000;
    min-height: 33px;
    display: inline-flex;
    align-items: center;
}

input[type=checkbox] {
    border-radius: unset;
    border: unset;
}

.form-fields input,
.form-fields select,
.form-fields textarea,
.form-fields .readonly,
.form-fields .cb,
.form-fields .cbs,
.form-fields .cfaf-content-editable {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.toolbar {
    z-index: 1;
}

.toolbar input[type=text],
.toolbar input[type=password],
.toolbar input[type=date],
.toolbar input[type=number],
.toolbar select {
    min-height: 27px;
    padding: 2px 8px;
}

.toolbar button {
    white-space: nowrap;
}

header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    height: var(--fixed-header-height);
    width: 100%;
    background: var(--header-bg);
    color: var(--header-fg);
    z-index: 1;
}

header a,
header a:visited {
    color: var(--header-fg);
}

header a.logo {
    font-family: 'Doto';
    font-weight: 600;
    font-size: 28px;
    display: flex;
    width: auto;
    margin-right: 1em;
}

header a.logo:before {
    background: url(/images/logo.svg) no-repeat;
    content: ' ';
    width: 36px;
    display: block;
    background-size: 36px 36px;
    height: 36px;
    flex-shrink: 0;
    margin-right: 0.5em;
}

nav > span {
    opacity: 0.5;
}

nav.sys {
    margin-left: auto;
}

a.link-action:hover {
    opacity: 0.5;
}

a.link-action.jump {
    color: #3b67ff;
}

main {
    display: flex;
    width: 100%;
    position: relative;
    top: calc(var(--fixed-header-height) + var(--fixed-toolbar-height));
}

.toolbar {
    height: var(--fixed-toolbar-height);
    top: var(--fixed-header-height);
}

main > section {
    padding: 1em;
    width: 100%;
}

.tiles {
    margin: -0.5em;
}

.tiles > li {
    gap: 0.5em;
    border: 1px solid #cccccc;
    border-radius: 3px;
    padding: 1em;
    margin: 0.5em;
    cursor: pointer;
}

.tiles > li:hover,
.tiles > li.selected {
    background: var(--tile-hover-bg);
}

.tiles > li.table-view-header {
    display: none;
}

.tiles .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5em;
}

.tiles .header h3 {
    color: var(--tile-header-fg);
    margin-right: 1em;
    margin-bottom: 0;
}

.tiles .header .activity {
    font-size: 0.75rem;
    white-space: nowrap;
}

button,
a.button,
a.button:visited {
    background: var(--button-bg);
    color: var(--button-fg);
    cursor: pointer;
    outline: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3em 0.75em;
    border-radius: 3px;
    font-family: "Host Grotesk";
}

button.recycle {
    margin-left: auto;
    background: #ff255e;
    font-weight: 100;
}

.toolbar button,
.toolbar a.button {
    font-weight: 600;
    font-size: 14px;
}

button:hover,
a.button:hover {
    background: var(--button-hover-bg)
}

.toolbar button.active {
    background: var(--button-hover-bg);
    color: var(--button-fg);
    box-shadow: -1px -1px 0px #ffffff60 inset;
}

.form-fields .section > div > label,
.form-fields .section > div.group > div > label {
    width: 10em;
    border: 1px solid #dddddd;
    border-right: none;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    padding: 0.25em 0.5em;
    color: #041b27;
    background: #f5f5f5;
    font-size: 0.9rem;
    font-weight: 900;
}

.mini-form {
    display: flex;
    flex-direction: column;
    width: unset;
}

.mini-form .controls {
    margin-top: 0.5rem;
}

.mini-form .controls button {
    font-size: 1.25rem;
}

.mini-form .fields {
    display: flex;
    flex-direction: column;
}

.mini-form .fields > *:not(:last-child) {
    margin-bottom: 0.25rem;
}

.popup > div > .controls {
    box-shadow: 0 -5px 5px -5px rgba(0, 0, 0, 0.25);
    border-radius: 0;
}

.popup .controls button {
    font-size: 1.2rem;
}

textarea.description {
    min-height: 250px;
}

.spreadsheet li {
    display: flex;
}

.popup .section:not(.fixed) {
    min-width: calc(33% - 1.5em);
}

.invoiced-flag i {
    color: #dddddd;
}

.invoiced-flag.invoiced i {
    color: #009a66;
}

.timesheet .total.total-time {
    margin-top: 1em;
}

.timesheet .readonly {
    background: #ffffffaa;
}

.spreadsheet .cb,
.spreadsheet .invoiced-flag {
    padding: 0 0.5em !important;
    width: 2.5em !important;
}

.user.initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2965ff;
}

.initials-R {
    background: var(--RNW) !important;
    color: #ffffff;
}

.initials-S {
    background: var(--SAN) !important;
    color: #ffffff;
}

.selector .areas .items li {
    padding: 0.5em;
    background: #dee4f6;
    cursor: pointer;
}

.selector .areas .items li:hover {
    background: #c9d4f5;
}

.selector .areas .items h3 {
    font-family: 'Host Grotesk';
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 400 !important;
}

.selector .areas {
    display: flex;
}

.selector .areas > div:not(:last-of-type) {
    margin-right: 1em;
}

.selector .areas > div > ul {
    max-height: 40vh;
    overflow: hidden;
    overflow-y: auto;
}

.selector .areas .items li {
    padding: 0.5em;
    background: #dee4f6;
    border-radius: 3px;
    margin-bottom: 0.25em;
    margin-right: 0.25em;
}

.selector .areas .items .instance-name {
    font-size: 0.7em;
    color: #2965ff;
}

.selector .areas .items .detail {
    font-size: 0.7em;
}

.selector .areas .items .footer {
    font-size: 0.65em;
    margin-top: 0.25em;
}

.by-you {
    padding: 0.25em;
    border: 1px solid var(--green);
    border-radius: 3px;
    color: var(--green);
    display: inline-block;
}

.selector .areas .search {
    margin-bottom: 0.25em;
}

.add-work issue-select {
    margin-left: 1em;
}

.add-work .selector .areas > div > ul {
    max-height: 65vh;
}

tr.inline-header td {
    white-space: nowrap;
    padding-top: 0.25em;
    padding-bottom: 0.25em;
    font-size: 0.8em;
    font-weight: 600;
}

td.col-group-start {
    border-left-width: 3px !important;
    border-left-style: solid !important;
}

button.toggle.checked {
    background: var(--button-bg);
    color: var(--button-fg);
}

textarea.export-raw {
    width: 100vw;
    height: calc(100vh - 120px);
}

.login-option {
    width: 320px;
    margin-bottom: 2em;
    padding: 1em;
    border: 1px solid #dddddd;
    border-radius: 5px;
}

.tiles li .detail > div:not(:last-child) {
    margin-bottom: 0.5em;
}

.tiles .money {
    color: var(--money);
}

.tiles .footer {
    margin-top: 0.5em;
}

.tiles .footer > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.tiles .footer > div:not(:last-child) {
    margin-bottom: 0.25em;
}

.tiles .footer .flag {
    padding: 0.15em 0.25em;
    border: 1px solid #909090;
    border-radius: 5px;
}

.blocks > li {
    border: 1px solid #cccccc;
    border-radius: 3px;
    padding: 1em;
    background: #ffffff;
    margin-bottom: 0.5em;
}

.blocks li:hover {
    background: var(--block-hover-bg);
}

.blocks .drop-over .header {
    pointer-events: none;
}

.blocks .header h3 {
    color: var(--tile-header-fg);
    margin-right: 1em;
}

.blocks .drop-over .block-issues {
    pointer-events: none;
}

.block-issues > li {
    pointer-events: auto;
    font-size: 0.85rem;
    display: flex;
}

.block-issues > li.closed a {
    text-decoration: line-through;
    opacity: 0.25;
}

.block-issues > li a.title {
    text-overflow: ellipsis;
    width: 200px;
}

.block-issues > li .remove {
    opacity: 0;
}

.block-issues > li:hover .remove {
    opacity: 1;
}

.block-issues > li a:hover {
    opacity: 0.5;
}

.block-issues > li:not(:last-child) {
    border-bottom: 1px dotted #dddddd;
    padding-bottom: 0.25em;
    margin-bottom: 0.25em;
}

.block-comments:after {
    position: absolute;
    right: 0;
    bottom: 0;
    display: block;
    width: 1rem;
    height: 1rem;
    z-index: 1;
    background: #000000;
    content: ' ';
    opacity: 0.25;
    border-bottom-right-radius: 1em;
}

.block-comments {
    font-size: 0.85rem;
    margin-top: 0.5em;
    padding: 1em;
    background: #fffdd6;
    border: 1px solid #e4e2c2;
    box-shadow: 3px 3px 10px -8px #000000aa;
    transform: rotate(-2deg);
    border-bottom-right-radius: 1rem;
}

.section.block-container {
    background: #dee4f6;
    min-height: calc(100vh - 60px);
    margin-right: 1em;
    padding: 1em;
}

.drop-target.drop-over {
    border: 2px solid #4b5d6b;
    box-shadow: 5px 5px 5px -3px rgba(0, 0, 0, 0.25) inset;
}

li.eol {
    opacity: 0;
    border-style: dashed;
    align-items: center;
    color: #aaaaaa;
    display: flex;
}

li.eol.complete.waiting,
li.eol.complete {
    opacity: 1;
}

.tiles.waiting:before {
    content: 'Loading...';
    position: absolute;
    right: 30px;
    top: 44px;
    padding: 5px 1em;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
    border: 1px solid #dddddd;
    border-radius: 5px;
    box-shadow: 0 0 20px -10px rgba(0, 0, 0, 1);
}

button.toggle.closed {
    background: var(--green);
    color: #ffffff;
}

button.toggle.closed.checked {
    background: var(--red);
}

button.toggle.closed:before {
    content: 'Open';
    font-weight: 600;
    padding-right: 0.5em;
}

button.toggle.closed.checked:before {
    font-weight: 100;
    opacity: 0.5;
}

button.toggle.closed:after {
    content: 'Closed';
    font-weight: 100;
    opacity: 0.5;
    padding-left: 0.5em;
}

button.toggle.closed.checked:after {
    font-weight: 600;
    opacity: 1;
}

.list-control .page-num {
    position: fixed;
    right: 30px;
    top: 90px;
    padding: 5px 1em;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
    border: 1px solid #dddddd;
    border-radius: 5px;
    box-shadow: 0 0 20px -10px rgba(0, 0, 0, 1);
    width: auto !important;
    display: inline-flex !important;
    font-size: 0.65rem;
}

.blocks li.closed {
    opacity: 0.5;
    filter: saturate(0);
}

.billing .uninvoiced,
.billing .uninvoiced * {
    font-weight: 900;
    color: #009a66;
}

.billing .invoiced,
.billing .invoiced * {
    font-weight: 100;
}

.instances .billing-type {
    font-size: 0.75rem;
}

.todo-editor .done span.cb, .todo-editor .done input[type=text] {
    border: none;
    background: none;
    border-top: 1px dotted #cccccc;
}

.todo-editor.readonly li {
    margin-left: 2em;
    list-style-type: decimal;
    display: list-item;
}

.todo-editor.readonly .readonly {
    border: none;
}

.todo-editor.readonly .cb {
    display: none;
}

.todo-editor.readonly li.done {
    opacity: 0.2;
}

.todo-editor.readonly li.done span {
    text-decoration: line-through;
}

.todo-editor.readonly li.empty {
    display: none;
}

.mobile-menu-items {
    position: fixed;
    top: var(--fixed-header-height-600);
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 2;
    background: #485d6a;
}

.mobile-menu-items a {
    color: #ffffff;
    width: 100%;
    display: block;
    padding: 1em;
    font-size: 1.25em;
    border-bottom: 1px solid #ffffff60;
}

.mobile-menu {
    margin-left: auto;
}

.mobile-menu i {
    font-size: 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff00ba;
    color: #ffffff;
    font-weight: 900;
    padding: 0.1em 0.5em;
    border-radius: 50%;
}

span.badge.num-active-blocks:before {
    content: '\f1b2';
    font-family: 'Font Awesome 5 Pro';
    font-weight: 100;
    position: absolute;
    font-size: 1.6em;
    top: -1px;
    z-index: -1;
}

.tiles .badge {
    position: absolute;
    right: 1em;
    bottom: 1em;
    background: none;
    color: #ff00ba;
    text-shadow: 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff;
}

.time-clock.running button {
    background: var(--button-hover-bg)
}

.issue-list .num-active-blocks {
    font-size: 0.75rem;
}

.cfaf-documentstore {
    width: calc(100% - 4em);
}

.worksheet-view {
    position: absolute;
    z-index: 1;
    background: #ffffffee;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.worksheet-view .row {
    background: #ffffff;
    padding: 2em;
}

.proposal {
    font-size: 0.85rem;
    background: #4b5d6b0f;
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5em;
}

.proposal > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proposal > div > label {
    white-space: nowrap;
}

#worksheetDescription:focus, #worksheetDescription:focus-visible {
    outline: 1px dotted #2965ff;
}

#worksheetDescription {
    width: calc(100% - 1em);
    min-height: calc(100vh - 300px);
    padding: 0.5em;
    margin: 0 0.5em 0 -0.5em;
}

.icon {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--button-bg);
    color: var(--button-fg);
    border-radius: 50%;
}

.icon.proposal-item:before {
    content: 'P';
    font-size: 0.75em;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1em;
}

.client-task-list .summary {
    display: flex;
    gap: 0.3em;
    font-size: 1.25rem;
}

.client-task-list .summary:hover {
    opacity: 0.5;
}

.client-task-list .task-details {
    position: absolute;
    background: #ffffff;
    z-index: 1;
    padding: 1em;
    border: 1px solid #eeeeee;
    box-shadow: 10px 10px 10px -5px #00000050;
    top: calc(100% + 10px);
}

.client-task-list .task-details a {
    white-space: nowrap;
}

.client-task-list .task-details .header {
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    border-bottom: 1px dotted #dddddd;
}

.client-task-list .task-details li {
    padding: 0.5em 0 0.5em 0;
    border-bottom: 1px dotted #dddddd;
    display: flex;
    justify-content: space-between;
    gap: 1em;
}

.client-task-list .task-details .priority {
    margin-left: auto;
}

.client-task-list .task-details .priority-High,
.client-task-list .task-details .priority-high {
    color: #ff0046;
    font-weight: 600;
}

.client-task-list .task-details .priority-Medium,
.client-task-list .task-details .priority-medium {
    color: #ff8931;
}

label.cb {
    display: flex;
    gap: 0.5em;
}

.instances .controls button {
    background: transparent;
    color: #606060;
}

.instances li:hover .controls button {
    background: var(--button-bg);
    color: var(--button-fg);
}

.instances li:hover .controls button:hover {
    background: var(--button-hover-bg);
}

.client-task-list.summary .summary {
    font-size: 1rem;
    background: #0048ff;
    color: #ffffff;
    border-radius: 1em;
    width: fit-content;
    padding: 0 0.5em;
}

.client-task-list.summary .summary i {
    font-size: 0.75em;
    position: relative;
    top: 0.35em;
}

.client-task-list .summary .new-flag {
    color: #ffea00;
    text-shadow: 0 0 1px #202020;
}

.client-task-list.summary .summary .new-flag {
    text-shadow: none;
}

@media screen and (max-width:1024px) {
    invoicing-summary {
        display: none;
    }
}

@media screen and (max-width:600px) {

    header {
        height: var(--fixed-header-height-600);
    }

    main {
        top: calc(var(--fixed-header-height-600) + var(--fixed-toolbar-height-600));
    }

    .toolbar {
        height: var(--fixed-toolbar-height-600);
    }

    .toolbar li {
        flex-direction: column;
        gap: 8px;
    }

    .section > div:not(.group), .section > div.group > div {
        flex-direction: column;
    }

    .form-fields .section > div > label, .form-fields .section > div.group > div > label {
        border: 1px solid #dddddd;
        border-top-right-radius: 5px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        margin-bottom: -1px !important;
    }
}
