:root {
    color-scheme: light;

    /* General color definitions */
    --blue: #00549F;
    --blue-lightest: #E8F1FA;
    --blue-light: #DCEAFD;
    --gray-light: #F8F9FA;
    --red: #DC3545;
    --red-light: #E8B5B9;
    --yellow: #F6A800;
    --yellow-light: #FCF2DC;
    --white: #ffffff;
    --grey: #999999;
    --black: #000000;

    /* Usage based color definitions */
    --bg-button: var(--blue);
    --cancel: var(--red);
    --fg-button: var(--white);
    --bg-button-disabled: var(--grey);
    --fg-nav-element: var(--blue);
    --fg-input: var(--black);
    --bg-input: var(--white);
    --border-input: var(--blue);
    --bg-table-head: var(--blue);
    --fg-table-head: var(--white);
    --bg-table-body: var(--blue-lightest);
    --fg-table-body: var(--black);
    --bg-table-line-separator: var(--black);
    --bg-header: var(--gray-light);
    --fg-header: var(--black);
    --bg-message: var(--blue);
    --fg-message: var(--white);
    --bg-card-head: var(--blue);
    --fg-card-head: var(--white);
    --fg-card-body: var(--black);
    --bg-event-maintenance: var(--blue-light);
    --fg-event-maintenance: var(--black);
    --bg-event-repair: var(--red-light);
    --fg-event-repair: var(--black);
    --bg-event-mounting: var(--yellow-light);
    --fg-event-mounting: var(--black);

    --bg-icon: var(--blue);
    --bg-icon-word: #2A548F;
    --bg-icon-excel: #236D45;
    --bg-icon-pdf: #D24551;
    --bg-icon-document: #E68E00;
}

/* Use a more-intuitive box-sizing model. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin */
* {
    margin: 0;
}

/* Allow percentage-based heights in the application */
html,
body {
    height: 100%;
    font-family: -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    Roboto,
    Ubuntu,
    Helvetica Neue,
    sans-serif;
    font-size: 12pt;
}

/* Typographic tweaks: Add accessible line-height & Improve text rendering */
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
    font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Create a root stacking context */
#root {
    isolation: isolate;
}

/* Remove text decoration from links */
a {
    color: inherit !important;
}

.button,
button,
input[type="submit"] {
    border: 1px solid var(--bg-button);
    background-color: var(--bg-button) !important;
    color: var(--fg-button) !important;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-block;
}

.button-cancel {
    border: 1px solid var(--cancel);
    background-color: unset !important;
    color: var(--cancel) !important;
}

button:hover,
input[type="submit"]:hover {
    filter: brightness(90%);
}

button:disabled,
input[type="submit"]:disabled {
    border: 1px solid var(--bg-button-disabled);
    background-color: var(--bg-button-disabled) !important;
}

select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-input);
    background-color: var(--bg-input);
    color: var(--fg-input);
}

input[type="time"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="text"],
input[type="number"],
input[type="email"] {
    min-width: 30px;
    padding: 0.5rem 1rem;
    width: 100%;
    border: 1px solid var(--border-input);
    background-color: var(--bg-input);
    color: var(--fg-input);
}

.page-nav-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--fg-nav-element);
}

.page-nav > a {
    text-decoration: none;
}

.tile-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.tile {
    width: 30rem;
    align-items: stretch;
}

.tile > .card-header {
    background-color: var(--bg-table-head);
    color: var(--fg-table-head);
    text-align: center;
    padding: .3rem;
}

.tile > .card-body {
    background-color: var(--bg-table-body);
    color: var(--fg-table-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    min-height: 10rem;
}

.tile > .card-body > img {
    max-width: 20px;
    margin-top: .4rem;
}

.tile > .card-footer {
    margin: 0;
    background-color: var(--bg-table-head);
    color: var(--fg-table-head);
    text-align: center;
    padding: .3rem;
}

tr.row-link > td > a {
    display: block; /* extend a link in a row to fill the complete block*/
    text-decoration: none;
}

.table > thead {
    --bs-table-bg: var(--bg-table-head);
    --bs-table-color: var(--fg-table-head);
}

.table {
    --bs-body-bg: var(--bg-table-body);
}
.table > tfoot {
    --bs-table-bg: var(--bg-table-head);
    --bs-table-color: var(--fg-table-head);
}
