body {
    background: white;
    color: black;
    font: 14pt 'Comfortaa', cursive;
    margin: 8px;
}

.ui-widget {
    font-family: inherit;
}

.ui-widget.ui-dialog {
    border: none;
    border-radius: 32px;
    padding: 16px;
}

.ui-widget-content.ui-dialog,
.ui-selectmenu-menu .ui-widget-content,
.ui-widget-content.ui-dialog-content,
.ui-dialog .ui-button,
.ui-dialog button {
    color: white;
}

.ui-widget-content.ui-dialog,
.ui-dialog option,
.ui-selectmenu-menu .ui-widget-content {
    background: #C27BA0;
}

.ui-widget-content.ui-dialog {
    font: 14pt "Montserrat", sans-serif;
    text-align: left;
}

.ui-widget-header.ui-dialog-titlebar {
    background: none;
    border: none;
    box-sizing: border-box;
    color: inherit;
    padding-top: 0;

    position: absolute;
    left: 0;
    width: 100%;
}

.ui-dialog .ui-dialog-titlebar-close {
    right: 1ex;
    z-index: 1;
}

.ui-dialog-buttonpane,
.ui-dialog .ui-button {
    background: none;
}

.ui-dialog .ui-button {
    border-color: inherit;
}

button,
input,
select,
textarea {
    background: none;
    border: thin solid;
    font: inherit;
}

input,
select,
textarea {
    border-radius: 8px;
}

.ui-dialog input,
.ui-dialog select,
.ui-dialog textarea {
    color: white;
}

label > input,
label > select,
label > .ui-selectmenu-button {
    margin-left: 1em;
}

label > input[type="checkbox"],
label > input[type="radio"] {
    margin-left: 0;
}

button,
.ui-widget button {
    border-radius: 4px;
    font-family: "Montserrat", sans-serif;
    padding: 1ex 1em;
    text-transform: uppercase;
    width: 10em;
}

.ui-widget button {
    border: thin solid;
    margin: 0 2em;
}

button[disabled],
.disabled {
    color: GrayText !important;
    cursor: not-allowed;
    pointer-events: none;
}

input,
select,
textarea {
    color: inherit;
    text-align: inherit;
}

textarea {
    resize: none;
}

a img {
    border: none;
}

input:invalid,
textarea:invalid,
select:invalid {
    outline: thin solid red;
}

.brick {
    display: inline-block;
    vertical-align: top;
}

.page {
    margin: auto;
}

button,
.button {
    border: thin solid;
    border-radius: 1ex;
    color: inherit;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    padding: 1em;
    text-transform: uppercase;
}

button:hover,
.button:hover,
button:focus,
.button:focus,
button.selected,
.button.selected {
    background: #D5A6BD;
    color: white;
}

input[type=number] {
    text-align: right;
    width: 100px;
}

.row {
    box-sizing: border-box;
    display: block;
    margin: 1em 0;
    overflow: auto;
    width: 100%;
}

.row .row {
    margin: 0;
}

.numeric {
    text-align: right;
    white-space: nowrap;
}

.centered {
    text-align: center;
}

#page {
    box-sizing: border-box;
}

#page > h1.title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

#header,
#footer {
    box-sizing: border-box;
    clear: both;
}

#header {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

#header img,
#role {
    width: 256px;
}

#header fieldset {
    border: medium solid;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-bottom: 0;
}

#header legend {
    font: 8pt "Montserrat", sans-serif;
    margin: auto;
    text-transform: uppercase;
}

#header legend::before {
    content: "CRM";
}

#footer {
    margin-top: 1em;
    text-align: right;
}

#user {
    position: absolute;
    top: 8px;
    right: 8px;
    border: thin solid;
    border-radius: 8px;
    box-sizing: border-box;
    color: inherit;
    font: 8pt "Montserrat", sans-serif;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    max-width: 200px;
}

#user img {
    margin-left: 1ex;
}

.user-pic {
    height: 32px;
    vertical-align: middle;
}

#role {
    font: 8pt "Montserrat", sans-serif;
    margin-top: 64px;
    text-transform: uppercase;
    text-align: center;
}

#role a {
    color: inherit;
    text-decoration: none;
}

.currency::before {
    content: attr(data-currency);
}

.currency:empty::before {
    content: none;
}

#alert {
    white-space: pre-line;
}

.radio label {
    margin-right: 1ex;
    white-space: nowrap;
}

.radio label span {
    vertical-align: middle;
}

input.date {
    text-align: center;
    width: 11em;
}

.toggle {
    color: inherit;
    font-family: "Noto Sans Symbols 2", sans-serif;
    text-decoration: none;
}

.toggle::before {
    content: "\25bc"; /* BLACK DOWN-POINTING TRIANGLE */
}

.toggle.open::before {
    content: "\25b2"; /* BLACK UP-POINTING TRIANGLE */
}

.delete::before {
    font-family: "Noto Sans Symbols 2", sans-serif;
    content: "\01f5d1"; /* WASTEBASKET */
    margin-right: 1ex;
}

.delete:empty::before {
    margin-right: 0;
}

button.new,
button.remove,
button.close,
.info {
    border: thin solid;
    border-color: inherit;
    border-radius: 50%;
    color: inherit;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-align: center;
    width: 1em;
    height: 1em;
    line-height: calc(1em - 2px);
}

.new::before {
    content: "+";
}

.call::before {
    content: "\1f4de"; /* Telephone Receiver */
}

.close::before,
.remove::before {
    content: "\2715"; /* MULTIPLICATION X */
}

.info::before {
    content: "i";
}

.info + .text {
    background: white;
    border: thin solid;
    border-color: inherit;
    border-radius: 1em;
    display: none;
    margin-left: -1em;
    margin-top: 1.5em;
    padding: 1em;
    position: absolute;
    text-align: center;
    white-space: pre-line;
    z-index: 1;
}

.info:hover + .text,
.info:focus + .text {
    display: inline-block;
}

.download {
    color: inherit;
    text-decoration: none;
    width: 1.5em;
    height: 1.5em;
    border-radius: 0.75em;
}

.download::before {
    content: '\25bc'; /* Black Down-Pointing Triangle */
}

.tag,
.edition {
    background: white;
    border: thin solid;
    border-radius: 1ex;
    color: black;
    display: inline-block;
    font-size: 7pt;
    margin: 1ex 1em;
    padding: 0 3em;
    text-align: center;
    text-transform: uppercase;
}

.tag-Distributor { border-color: #D9D2E9; color: #8E7CC3; }
.tag-Listing { border-color: #9FC5E8 !important; color: #6FA8DC; }

.edition-Algarve { border-color: #990000; color: #85200C; }
.edition-Dubai { color: #BF9000; }
.edition-Lisbon { color: #38761D; }

*[class*="status-"] {
    border: thin solid transparent;
    --borderColor: transparent;
}

.status + .ui-selectmenu-button {
    border: none;
    padding: 0;
    width: 35em;
}

.status + .ui-selectmenu-button div[class*="status-"] {
    border-color: var(--borderColor);
    border-radius: 1ex;
    line-height: 3;
    padding: 0 1em;
    text-align: center;
}

.status + .ui-selectmenu-button .ui-selectmenu-icon {
    display: none;
}

.ui-selectmenu-menu .ui-menu {
    max-height: 20em;
}

.status-0, /* 0.0 FRESH */
.status-5, /* 0.05 RESTING AFTER MACHINE */
.status-20, /* 0.2 READY FOR MACHINE */
.status-101, /* 1.01 RUNNING IN MACHINE */
.status-600, /* 6.0 FORWARD BOOKINGS ONGOING */
.status-700, /* 7.0 ARTWORK REQUESTED */
.status-710 /* 7.1 ARTWORK SENT TO EDITORIAL */
    { background: white; color: black; --borderColor: currentcolor; }

.status-1 /* 0.01 RESERVE AUTOMATED */
    { background: #bf9000; color: black; }

.status-3 /* 0.03 RESERVE PERSONAL */
    { background: #7f6000; color: white; }

.status-200 /* 2.0 EMAILED ONCE */
    { background: #ffd966; color: black; }

.status-201 /* 2.01 EMAILED TWICE */
    { background: #f1c232; color: black; }

.status-202 /* 2.02 READY FOR CALLS */
    { background: #fce5cd; color: black; }

.status-210 /* 2.10 CALLED ONCE */
    { background: #f9cb9c; color: black; }

.status-212 /* 2.12 CALLED TWICE */
    { background: #f6b26b; color: black; }

.status-214 /* 2.14 CALLED THREE TIMES */
    { background: #e69138; color: black; }

.status-216 /* 2.16 CALLED FOUR TIMES */
    { background: #ff9900; color: black; }

.status-260 /* 2.6 DISCOVERY APPOINTMENT INVITE DECLINED */
    { background: #C9DAF8; color: red; }

.status-221, /* 2.21 DISCO MEETING BEING ORGANISED */
.status-300 /* 3.0 DISCOVERY APPOINTMENT AGREED + CONFIRMED BY EMAIL */
    { background: #6fa8dc; color: black; }

.status-310 /* 3.1 DISCOVERY APPOINTMENT INVITE ACCEPTED */
    { background: #6fa8dc; color: lime; }

.status-350 /* 3.5 IN DISCUSSION */
    { background: #3d85c6; color: white; }

.status-400 /* 4.0 DISCOVERY MEETING DONE */
    { background: #0b5394; color: white; }

.status-410 /* 4.1 PROPOSAL EMAILED */
    { background: #6aa84f; color: white; }

.status-411, /* 4.11 PROPOSAL EMAILED - Chased Once */
.status-412, /* 4.12 PROPOSAL EMAILED - Chased Twice */
.status-413 /* 4.13 PROPOSAL EMAILED - Chased Three times */
    { background: #6aa84f; color: black; }

.status-420 /* 4.2 COMMITMENT MEETING INVITE DECLINED */
    { background: #6aa84f; color: red; }

.status-450 /* 4.5 COMMITMENT APPOINTMENT INVITE ACCEPTED */
    { background: #6aa84f; color: lime; }

.status-500 /* 5.0 PROPOSAL ACCEPTED - WAITING FOR INVOICE DETAILS */
    { background: #6aa84f; color: white; }

.status-505, /* 5.05 READY FOR INVOICE */
.status-530 /* 5.3 INVOICE SENT TO CLIENT */
    { background: #38761d; color: white; }

.status-520 /* 5.2 INVOICE PRODUCED AND READY */
    { background: #38761d; color: yellow; }

.status-540, /* 5.4 INVOICE CHASED ONCE */
.status-550 /* 5.5 INVOICE CHASED 2ND TIME */
    { background: #274e13; color: white; }

.status-9900 /* 99 DEAD */
    { background: #999; color: white; }

.stage-machine { background: white; color: black; }
.stage-fresh { background: #d9d9d9; color: black; }
.stage-reserve { background: #bf9000; color: black; }
.stage-wakeup { background: #ffd966; color: black; }
.stage-calling { background: #ff9900; color: black; }
.stage-discussion { background: #3d85c6; color: white; }
.stage-proposal { background: #b6d7a8; color: black; }
.stage-deals { background: #38761d; color: white; }
.stage-production { background: #c27ba0; color: white; }
.stage-dead { background: #999; color: white; }

@keyframes flashing {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.33;
    }
}

.flashing {
    animation: flashing 1s infinite alternate;
}

.pager {
    position: fixed;
    left: 0;
    bottom: 1ex;
    text-align: center;
    width: 100%;
}

.pager > span {
    background: Gainsboro;
    border: thin solid;
    border-radius: 1em;
    display: inline-block;
    padding: 1ex 1em;
}

.pager button {
    padding: 0 1ex;
    width: auto;
}
