/* IMPORT FONTS */

@import url('https://fonts.googleapis.com/css2?family=Stack+Sans+Text:wght@200..700&&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* VARIBLES */

:root {
    --font: 'Inter', sans-serif;
    --altFont: 'Stack Sans Text', serif;
    --iconFont: 'Font Awesome 7 Free';
    --fontSize: 16px;
    --font-size-mobile: 14px;
    --lightColor: #4d7581;
    --midColor: #05495f;
    --darkColor: #033241;
    --borderRadius: 10px;
    --blue: #1b47ef;
    --gray: #666;
    --green: #0c734b;
    --orange: #cd6000;
    --purple: #801bef;
    --red: #b94444;
    --buttonPress: inset 0 0 10px 0 rgb(0 0 0 / 40%);
}

/* TEMPLATE */ 

* {
    outline: 0;
}

html {
    background: #1a1f23 url(/images/body_bkg.png) top center repeat;
    background-attachment: fixed;
    height: 100%;
}

body {
	color: #000;
    font-family: var(--font);
    font-size: var(--fontSize);
    height: 100%;
    line-height: 1.5em;
    margin: 0;

    &:has(dialog[open]) {
        overflow: hidden
    }
}

#header {
    padding: 5px 0 25px 0;

    #logo {
        margin: 25px 0 50px 0;
        text-align: center;

        img {
            margin: 0 auto;
            max-width: 100%;
            width: 300px;
        }
    }
}

nav#menu {
    background: var(--darkColor);
    border-radius: 5px;
    display: flex;
    font-family: var(--altFont);
    font-size: 17px;
    line-height: 1.2em;
    margin: 0 auto;
    width: fit-content;

    a {
        border-radius: 5px;
        color: #fff;
        font-weight: 600;
        padding: 10px 20px;
        text-decoration: none;

        &::before {
            content: attr(data-icon);
            font-family: var(--iconFont);
            margin-right: 7px;
        }

        &:hover {
            background: var(--midColor);
        }

        &:active {
            box-shadow: var(--buttonPress);
        }
    }
}

header#title {
    color: var(--darkColor);
    font-family: var(--altFont);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0px 1px 0 #fff;

    a {
        color: var(--darkColor);
        font-weight: 800;
    }
}

#main {
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 10px;
}

h1,
h2 {
    color: var(--midColor);
    font-family: var(--altFont);
    font-weight: 700;
    line-height: 1.2em;
    margin: 0;
}

h1 {
    font-size: 21px;
    padding: 15px 0;
}

h2 {
    font-size: 16px;
    padding: 20px 0 10px 0;
}

img {
    border: 0;
}

footer {
    font-family: var(--altFont);
    font-size: 14px;
    font-weight: 600;
    padding: 30px 0;
    text-align: center;
    text-shadow: 0 1px 0 #fff;
}

#toTop {
    background: var(--midColor);
    border-radius: 10px 0 0 0;
    bottom: 0;
    box-shadow: 0 0 10px rgb(113 136 143 / 60%);
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    font-weight: 600;
    line-height: 60px;
    position: fixed;
    right: 0;
    text-align: center;
    width: 60px;

    &::before {
        content: "\f062";
        font-family: var(--iconFont);
    }

    &:hover {
        background: var(--darkColor);
    }

    &:active {
        box-shadow: var(--buttonPress);
    }
}

/* PAGE WIDTH OVERRIDES */

body#page-login #main,
body#page-mfa #main,
body#page-forgot #main,
body#page-account #main {
    max-width: 500px;
}

.page {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgb(119 119 119 / 25%); 
    margin: 20px 0;
    padding: 40px;
    text-align: left;
}

hr {
    background: transparent;
    border: 0;
    border-bottom: 3px solid #d6e2e5;
    clear: both;
    height: 0;
    margin: 20px 0;
    padding: 0;
}

p {
    margin: 0;
    padding: 6px 0;
}

::selection {
    background: rgb(185 205 210);
}

.error {
    background: #c70606;
    border-radius: var(--borderRadius);
    color: #fff;
    font-size: 15px;
    line-height: 1.5em;
    margin: 15px 0;
    padding: 15px 20px;
    text-align: left;
}

/* AUDIT LIST */

.audit {
    background: #d7e0e2;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    font-family: var(--altFont);
    line-height: 1em;
    margin: 15px 0;
    row-gap: 9px;
    padding: 20px 30px;

    .auditTitle {
        font-size: 18px;
        padding-bottom: 4px;
    }

    .auditPeriod,
    .auditQuestions,
    .auditDate,
    .auditDue,
    .auditCompleted {
        color: var(--midColor);
        font-size: 16px;

        b {
            color: #000;
            font-feature-settings: "tnum";
            font-weight: 500;
            margin-left: 5px;
        }

        progress {
            accent-color: var(--lightColor);
            height: 12px;
            margin-left: 10px;
            vertical-align: baseline;
        }

        &::before {
            display: inline-block;
            font-family: var(--iconFont);
            font-weight: 600;
            margin-right: 10px;
            text-align: center;
            width: 18px;
        }
    }

    .auditPeriod::before {
        content: "\f073";
    }

    .auditQuestions::before {
        content: "\f0cb";
    }

    .auditDate::before {
        content: "\f08d";
    }

    .auditDue::before {
        content: "\f34e";
    }

    .auditCompleted::before {
        content: "\f560";
    }
}

/* TEXT STYLES */

a {
    color: #000fe1;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;

    &:hover {
        text-decoration: none;
    }

    &:active {
        color: #cb0094;
    }
}

.bold {
    font-weight: 700;
}

.blue {
    color: var(--blue);
}

.gray {
    color: var(--gray);
}

.green {
    color: var(--green);
}

.orange {
    color: var(--orange);
}

.purple {
    color: var(--purple);
}

.red {
    color: var(--red);
}

/* AUDIT */

#auditDates {
    column-gap: 30px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 0px;

    b {
        font-weight: 600;
        margin-left: 3px;
    }

    #auditPeriod::before,
    #auditDue::before {
        font-family: var(--iconFont);
        font-weight: 500;
        margin-right: 8px;
    }

    #auditPeriod {
        color: var(--blue);

        &::before {
            content: "\f073";
        }
    }

    #auditDue {
        color: var(--red);

        &::before {
            content: "\f34e";
        }
    }
}

#auditInfo,
#auditCategories {
    border-radius: 10px;
    font-family: var(--altFont);
    margin: 15px 0;
    padding: 10px 20px;
}

#auditInfo {
    background: rgb(255 255 255 / 40%);
}

#auditCategories {
    background: rgb(223 235 237 / 70%);
    display: flex;
    flex-wrap: wrap;
    font-weight: 500;
    gap: 7px 20px;

    span {
        color: var(--darkColor);
        cursor: pointer;
        text-decoration: underline;
        font-weight: 700;

        &:hover {
            text-decoration: none;
        }

        &:active {
            color: black;
        }
    }
}

#auditActions {
    display: flex;
    gap: 10px;
    list-style: none;
    justify-content: flex-end;
    margin: 0 0 20px 0;
    padding: 0;

    li {
        background: var(--midColor);
        border-radius: 5px;

        &:hover {
            background: var(--lightColor);
        }

        &:active {
            box-shadow: var(--buttonPress);
        }
    }

    a {
        box-shadow: 0 0 10px rgb(113 136 143 / 60%);
        color: #fff;
        display: block;
        font-family: var(--altFont);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.2em;
        padding: 10px 15px;
        text-decoration: none;

        &[data-icon]::before {
            content: attr(data-icon);
            font-family: var(--iconFont);
            font-weight: 600;
            margin-right: 7px;
        }

        &.on {
            color: #ffe24b;
        }
    }
}

.auditCategory {
    .auditCategoryTitle {
        color: var(--midColor);
        cursor: pointer;
        font-family: var(--altFont);
        font-size: 23px;
        font-weight: 700;
        margin-left: 10px;
        text-align: left;
        width: max-content;

        &::before {
            content: "\f107";
            display: inline-block;
            font-family: var(--iconFont);
            margin-right: 15px;
            text-align: center;
            width: 17px;
        }

        &:hover {
            color: var(--darkColor);
        }
    }

    &.collapsed {
        .auditCategoryTitle {
            &::before {
                content: "\f105";
            }

            &::after {
                color: var(--lightColor);
                content: "\f141";
                font-family: var(--iconFont);
                font-weight: 700;
                margin-left: 15px;
            }
        }

        .auditCategoryQuestions {
            .auditCategoryQuestion {
                display: none;
            }
        }
    }

    .auditCategoryQuestions {
        margin-top: 10px;
        text-align: left;
    }
    
    &+.auditCategory {
        margin-top: 30px;
    }
}

.auditCategoryQuestion {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgb(0 0 0 / 25%);
    column-gap: 40px;
    display: flex;
    line-height: 1.4em;
    padding-right: 30px;

    &+.auditCategoryQuestion {
        margin-top: 10px;
    }

    .auditCategoryQuestionLeft {
        background: var(--midColor);
        border-radius: 10px 0 0 10px;
        color: #fff;
        display: flex;
        flex: 0 0 70px;
        flex-direction: column;
        font-family: var(--altFont);
        font-size: 20px;
        font-weight: 600;
        justify-content: space-between;
        line-height: 1em;
        padding: 15px 0;
        text-align: center;
        
        &>div:last-child a {
            color: #fff;
            font-size: 12px;
            font-weight: 400;

            &::before {
                content: "\f3e5";
                display: inline-block;
                font-family: var(--iconFont);
                font-size: 24px;
                font-weight: 600;
                margin-bottom: 4px;
                text-decoration: none;
                width: 100%;
            }
        }
    }

    .auditCategoryQuestionMain {
        flex: 1;
        padding: 40px 0;
        position: relative;

        .auditCategoryQuestionHeading {
            color: var(--midColor);
            font-family: var(--altFont);
            font-size: 18px;
            font-weight: 700;
            line-height: 18px;
            padding-bottom: 7px;

            &:not(:first-child) {
                padding-top: 30px;
            }

            time {
                font-size: 14px;
                font-weight: 500;
                margin-left: 10px;

                &::before {
                    content: attr(data-label) ":";
                    font-weight: 400;
                    margin-right: 5px;
                }
            }
        }

        .auditCategoryQuestionQuoteServicer,
        .auditCategoryQuestionQuoteAuditor {
            background: #eaeff1;
            border-radius: 10px;
            border: 0;
            padding: 12px 20px;

            strong {
                font-weight: 600;
            }

            hr {
                border-bottom-width: 2px;
                margin: 10px 0;
            }
        }

        .auditCategoryQuestionQuoteServicer {
            border-right: 7px solid #d6e2e5;
        }

        .auditCategoryQuestionQuoteAuditor {
            border-left: 7px solid #d6e2e5;

            &.resultBlue {
                background: #e5e8f3;
                border-left-color: var(--blue);
            }

            &.resultGreen {
                background: #e2f0eb;
                border-left-color: var(--green);
            }

            &.resultOrange {
                background: #f5eae0;
                border-left-color: var(--orange);
            }

            &.resultPurple {
                background: #f3e7ff;
                border-left-color: var(--purple);
            }

            &.resultRed {
                background: #ffeaea;
                border-left-color: var(--red);
            }
        }

        .auditCategoryQuestionResult {
            font-weight: 700;
        }

        .auditCategoryQuestionStatus {
            font-family: var(--altFont);
            font-weight: 500;
            line-height: 1.4em;
            margin: 35px 0 0 auto;
            text-align: right;

            &.auditCategoryQuestionStatus0,
            &.auditCategoryQuestionStatus1 {
                color: #c32c2c;

                &::before {
                    content: "\f057";
                }
            }

            &.auditCategoryQuestionStatus2 {
                color: #005f3a;

                &::before {
                    content: "\f058";
                }
            }

            &::before {
                font-family: var(--iconFont);
                font-weight: 500;
                margin-right: 5px;
                vertical-align: bottom;
            }
        }

        hr {
            margin: 40px 0;
        }

        ul,
        ol {
            margin: 5px 0;
        }

        p {
            margin: 0;
            padding: 0;
        }
    }
}

.question,
.auditCategoryQuestion {
    #responseOptions {
        margin-top: 15px;
    }

    #responseInput {
        margin-top: 15px;
    }

    #responseUpload {
        margin: 30px 0 10px 0;

        label {
            color: var(--midColor);
            cursor: pointer;
            font-family: var(--altFont);
            font-weight: 700;
            text-decoration: underline;

            &:hover {
                text-decoration: none;
            }
        }
    }

    #responseUploads {
        font-family: var(--altFont);
        font-feature-settings: "tnum";
        font-size: 16px;
        list-style: none;
        padding: 0 0 0 10px;

        li {
            margin: 6px 0;
            padding: 0;
            
            a {
                font-weight: 500;
            }

            .deleteUpload {
                color: var(--red);
                cursor: pointer;
                font-weight: 500;
                text-decoration: underline;
                margin-right: 10px;

                &:hover {
                    text-decoration: none;
                }

                &::before {
                    content: "\f2ed";
                    display: inline-block;
                    font-family: var(--iconFont);
                    margin-right: 2px;
                    text-decoration: none;
                }
            }
        }
    }

    #responseSelect {
        margin-top: 50px;
    }
}

/* FORM FIELDS */

select, 
input[type=text], 
input[type=password] {
    background: #f8f8f8;
    border-color: #aaa;
    border-radius: 3px;
    border-style: solid;
    border-width: 1px;
    box-shadow: 2px 2px 2px inset #eee;
    box-sizing: border-box;
    color: #000;
    font-family: var(--font);
    font-size: var(--fontSize);
    font-weight: 400;
    max-width: 100%;
    padding: 10px;
    width: 100%;

    &:focus {
        background: #fff;
        border-color: #3f95ab;
    }
}

select {
    cursor: pointer;
}

input[type=file] {
    display: none;
}

#loginKey {
    font-feature-settings: "tnum";
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

/* FORM LAYOUT */

.field {
    padding: 15px 0;

    div:first-child {
        color: var(--darkColor);
        font-weight: 700;
        line-height: 1;
        margin-bottom: 7px;
        text-align: left;
    }
}

/* BUTTONS */

.btn-area {
    margin: 50px 0;
    text-align: center;
}

.btn {
    background: var(--midColor);
    border: 0 solid rgb(45 67 73);
    border-radius: 3px;
    box-shadow: 0 0 10px rgb(113 136 143 / 6);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-family: var(--altFont);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: .5px;
    line-height: 1;
    padding: 15px 35px;
    text-decoration: none;
    text-shadow: 0 2px 1px rgb(24 45 51 / 40%);

    &:hover {
        background: var(--lightColor);
        color: #eee;
    }

    &:active {
        box-shadow: var(--buttonPress);
    }

    &+.btn {
        margin-left: 10px;
    }

    i { 
        margin-right: 7px;
    }
}

/* DIALOG */

#dialog {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 0 20px rgb(0 0 0 / 50%);
    outline: 0;
    padding: 30px;
    text-align: left;

    header {
        color: var(--darkColor);
        font-family: var(--altFont);
        font-size: 19px;
        font-weight: 700;
        margin-bottom: 20px;
    }

    ul {
        margin: 0;
        padding-left: 20px;
    }

    i {
        color: var(--midColor);
        margin-right: 15px;
    }

    .dialogBtns {
        margin-top: 40px;
        text-align: right;

        button {
            background: var(--midColor);
            border: 0;
            border-radius: 5px;
            color: #fff;
            cursor: pointer;
            display: inline-block;
            font-family: var(--altFont);
            font-size: 16px;
            font-weight: 600;
            line-height: 1em;
            outline: 0;
            padding: 10px 15px;

            &:hover {
                background: var(--lightColor);
            }

            &:active {
                box-shadow: var(--buttonPress);
            }

            &+button {
                margin-left: 15px;
            }
        }
    }

    &::backdrop {
        backdrop-filter: blur(5px);
        background:rgb(100 100 100 / 30%);
    }
}

/* STATUS MESSAGES */

#alertSaved, 
#alertError {
    border-radius: 15px;
    box-shadow: 0 0 40px rgb(0 0 0 / 50%);
    color: #fff;
    font-family: var(--altFont);
    font-size: 17px;
    font-weight: 400;
    left: 0;
    line-height: 1em;
    margin: 0 auto;
    padding: 25px 35px;
    position: fixed;
    right: 0;
    top: 5px;
    width: fit-content;
    z-index: 9;
}

#alertSaved {
    background: var(--green);
}

#alertError {
    background: var(--red);
}

/* ==========================================================================
   Moved out of the page markup
   ========================================================================== */

/* These two used to be inline style="" attributes in pages/audit-question.php and
   pages/audit-submit.php. Identical in light mode; moved here so the dark theme can reach
   them, which an inline colour does not allow without !important. */
.saveSubmitPrompt {
    color: #066c9c;
    font-size: 18px;
    font-weight: bold;
    padding: 0 0 20px 0;
}

.submitNote {
    border-top: 1px solid #d1d1d1;
    color: #b56200;
    font-weight: bold;
    margin: 20px 0 0 0;
    padding: 25px 0;
    text-align: center;

    span { text-decoration: underline; }
}


/* ==========================================================================
   Light / dark toggle — the button itself, used in both themes
   ========================================================================== */

/*
 * Sits in the menu between Dashboard and the account name, styled as one more item in
 * that bar: same padding, same hover, same white glyph. Icon only — a word here would
 * crowd the account name.
 *
 * The glyph is chosen here rather than in the markup so it always shows the mode you
 * would switch TO: a moon while the page is light, a sun once it is dark.
 */
nav#menu .themeToggle {
    background: none;
    border: 0;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    padding: 10px 16px;

    &::before {
        content: "\f186";                 /* moon */
        font-family: var(--iconFont);
        font-weight: 900;
    }

    &:hover {
        background: var(--midColor);
    }

    &:active {
        box-shadow: var(--buttonPress);
    }

    &:focus-visible {
        outline: 2px solid #fff;
        outline-offset: -4px;
    }
}

html[data-theme="dark"] nav#menu .themeToggle::before {
    content: "\f185";                     /* sun */
}


/* ============================== DARK MODE ==================================
 *
 * The servicer portal's dark theme. Same palette and same rules as the administrator
 * area (administrator/css/blg-main.css explains the scoping in full), repeated here
 * because this stylesheet is loaded on its own — nothing from the admin CSS reaches
 * these pages.
 *
 *   html[data-theme="dark"] .thing      component rules: outrank the light rule
 *   :where(html[data-theme="dark"]) a   element rules: exactly as weak as the light one,
 *                                       so .btn and friends keep their white labels
 *
 * Unchanged on purpose: the dark menu bar, the teal question sidebar, buttons, the
 * back-to-top tab, error and toast colours — coloured fills with white text, which read
 * correctly on a dark page and are what make the portal recognisable.
 *
 * --midColor and --darkColor are each used as both fill and text (--midColor is the
 * button colour AND every heading), so they are not redefined. Each text use is
 * overridden individually below instead.
 * ======================================================================== */

html[data-theme="dark"] {
    color-scheme: dark;

    --dmBg:       #1c2227;
    --dmSurface:  #252d33;
    --dmRaised:   #2f3940;
    --dmHover:    #34424b;
    --dmBorder:   #3d4a52;
    --dmField:    #4a5963;
    --dmText:     #dfe5e8;
    --dmMuted:    #9aa8b0;
    --dmLink:     #7cc4da;

    --dmRed:      #ef8080;
    --dmGreen:    #4fbf8a;
    --dmOrange:   #e0a050;
    --dmBlue:     #8fb0ff;
    --dmPurple:   #b98cff;

    /* Used only as a text colour in this file, so safe to redefine. */
    --gray: #9aa8b0;
}


/* ---------------------------------------------------------------- page frame */

/* body_bkg.png is a LIGHT texture; the #1a1f23 beside it is a fallback that never shows.
   A 95% slate wash keeps a trace of the grain. */
html[data-theme="dark"] {
    background: linear-gradient(rgb(28 34 39 / 95%), rgb(28 34 39 / 95%)), url(/images/body_bkg.png) top center repeat;
    background-attachment: fixed;

    body { color: var(--dmText); }

    header#title {
        color: var(--dmText);
        text-shadow: none;
    }

    header#title a { color: var(--dmText); }

    footer { text-shadow: none; }

    .page {
        background: var(--dmSurface);
        box-shadow: 0 0 10px rgb(0 0 0 / 40%);
    }

    hr { border-bottom: 3px solid var(--dmBorder); }

    ::selection { background: rgb(63 149 171 / 55%); }
}

:where(html[data-theme="dark"]) {
    h1, h2   { color: var(--dmLink); }
    a        { color: var(--dmBlue); }
    a:active { color: #f07ad8; }
}

html[data-theme="dark"] {
    .blue   { color: var(--dmBlue); }
    .green  { color: var(--dmGreen); }
    .orange { color: var(--dmOrange); }
    .purple { color: var(--dmPurple); }
    .red    { color: var(--dmRed); }

    .saveSubmitPrompt { color: var(--dmLink); }

    .submitNote {
        border-top: 1px solid var(--dmBorder);
        color: var(--dmOrange);
    }
}


/* ---------------------------------------------------------------- the dashboard */

html[data-theme="dark"] {
    .audit { background: #2c363d; }

    .audit .auditPeriod, .audit .auditQuestions, .audit .auditDate,
    .audit .auditDue, .audit .auditCompleted { color: var(--dmLink); }

    .audit .auditPeriod b, .audit .auditQuestions b, .audit .auditDate b,
    .audit .auditDue b, .audit .auditCompleted b { color: var(--dmText); }
}


/* ---------------------------------------------------------------- an audit */

html[data-theme="dark"] {
    #auditInfo { background: rgb(255 255 255 / 5%); }

    #auditDates #auditPeriod { color: var(--dmBlue); }
    #auditDates #auditDue    { color: var(--dmRed); }

    #auditCategories { background: rgb(44 55 62 / 85%); }
    #auditCategories span { color: var(--dmText); }
    #auditCategories span:active { color: #fff; }

    .auditCategory .auditCategoryTitle { color: var(--dmLink); }
    .auditCategory .auditCategoryTitle:hover { color: #fff; }
    .auditCategory.collapsed .auditCategoryTitle::after { color: #8fb3bf; }

    .auditCategoryQuestion { background: var(--dmSurface); }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionHeading { color: var(--dmLink); }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteServicer {
        background: #2f3a42;
        border-right: 7px solid #46545d;
    }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteAuditor {
        background: #2f3a42;
        border-left: 7px solid #46545d;
    }

    /* The auditor's verdict keeps its colour — it is the verdict — as a tinted dark card
       with a bright edge. */
    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteAuditor.resultBlue {
        background: #262f47;
        border-left-color: var(--dmBlue);
    }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteAuditor.resultGreen {
        background: #22382f;
        border-left-color: var(--dmGreen);
    }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteAuditor.resultOrange {
        background: #3a2e22;
        border-left-color: var(--dmOrange);
    }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteAuditor.resultPurple {
        background: #33284a;
        border-left-color: var(--dmPurple);
    }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionQuoteAuditor.resultRed {
        background: #3d2628;
        border-left-color: var(--dmRed);
    }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionStatus.auditCategoryQuestionStatus0,
    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionStatus.auditCategoryQuestionStatus1 { color: var(--dmRed); }

    .auditCategoryQuestion .auditCategoryQuestionMain .auditCategoryQuestionStatus.auditCategoryQuestionStatus2 { color: var(--dmGreen); }

    .question #responseUpload label,
    .auditCategoryQuestion #responseUpload label { color: var(--dmLink); }

    .question #responseUploads li .deleteUpload,
    .auditCategoryQuestion #responseUploads li .deleteUpload { color: var(--dmRed); }
}


/* ---------------------------------------------------------------- forms and dialogs */

html[data-theme="dark"] {
    select, input[type=text], input[type=password] {
        background: var(--dmRaised);
        border-color: var(--dmField);
        box-shadow: 2px 2px 2px inset rgb(0 0 0 / 35%);
        color: var(--dmText);
    }

    select:focus, input[type=text]:focus, input[type=password]:focus {
        background: var(--dmHover);
        border-color: #4aa3d9;
    }

    .field div:first-child { color: var(--dmText); }

    /* Otherwise the browser's own dark canvas, which is close to pure black. */
    #dialog {
        background: var(--dmSurface);
        color: var(--dmText);
    }

    #dialog header { color: var(--dmText); }
    #dialog i { color: var(--dmLink); }
    #dialog::backdrop { background: rgb(0 0 0 / 55%); }
}
