/*
 * FM Sentona -- own styles layered on top of Sneat (frontend.mdc FE.1).
 * Sneat's own CSS/JS stays under assets/vendor/ and assets/; this is the one
 * file for everything specific to this application.
 */

/*
 * Public Sans, self-hosted (K2.3). Not just a CSP requirement: loading it from
 * fonts.googleapis.com sends every visitor's IP to Google without consent,
 * contested under GDPR in Germany (LG Muenchen I, 20.01.2022, 3 O 17493/20).
 * License: app/static/assets/fonts/public-sans/OFL.txt.
 *
 * One variable-font file covers all five weights below -- this mirrors
 * exactly what Google's own CSS API serves for this family (it deduplicates
 * discrete-weight requests on a variable font to a single file), just
 * self-hosted instead of fetched from fonts.gstatic.com. "latin" is the only
 * subset vendored: it covers Basic Latin + Latin-1 Supplement, which already
 * includes ae/oe/ue/ss (U+00E4, U+00F6, U+00FC, U+00DF) for the German UI.
 */
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../assets/fonts/public-sans/public-sans-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/public-sans/public-sans-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../assets/fonts/public-sans/public-sans-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../assets/fonts/public-sans/public-sans-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../assets/fonts/public-sans/public-sans-latin.woff2") format("woff2");
}

/*
 * Layout offsets Sneat normally computes at runtime and applies through a
 * script-created <style> element (Helpers._updateInlineStyle, assets/vendor/
 * js/helpers.js). Under a CSP with style-src 'self' 'nonce-...' and no
 * 'unsafe-inline', the browser silently drops that element's rules, so
 * .layout-page has no padding-top: the navbar sits fixed on top of the
 * page while the content underneath does not move down to clear it, which
 * is why the breadcrumb was invisible on every detail screen and the
 * dashboard heading was invisible on the dashboard (K4.4) -- both were
 * always present in the DOM, just rendered behind the navbar.
 *
 * Fixed, measured values replace Sneat's dynamic ones (navbar 64px, footer
 * 54px). This layout does not resize the navbar or footer, so a static rule
 * is correct here; a future layout change that does would need to update
 * these two numbers by hand.
 */
/* The vertical layout of Sneat's demo.css puts 74 px here (a navbar that floats 10 px under the
 * top); ours is flush with the top and 64 px high, so the same selector, later in the cascade,
 * keeps the content where it stood under the old layout (SB.1). */
.layout-page,
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
    padding-top: 64px !important;
}

.content-wrapper {
    padding-bottom: 54px !important;
}

/*
 * Zooming stays allowed (frontend.mdc FE.8), and then iOS Safari zooms the whole page
 * in when a field whose text is smaller than 16 px is tapped — and leaves it zoomed.
 * Sneat writes fields at 15 px and 13 px, so on a touch screen every field writes at
 * 16 px. A mouse screen keeps Sneat's sizes.
 */
@media (pointer: coarse) {
    .form-control,
    .form-select {
        font-size: 1rem;
    }
}

/*
 * The line under a date field that falls on a weekend or a holiday (L11.1, D-343): the day, why,
 * and a button that moves the date. The button is a touch target of 44 px on a touch screen.
 */
.sentona-date-warning:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sentona-date-warning .btn {
    white-space: normal;
    text-align: left;
}

@media (pointer: coarse) {
    .sentona-date-warning .btn {
        min-height: 44px;
    }
}

/*
 * Anlagenaufnahme (PROJECT 5.5, frontend.mdc FE.8).
 *
 * 44px is the minimum touch target, and on this screen it is not a guideline: the
 * wizard is used one-handed, on a tablet, in a boiler room, by someone wearing work
 * gloves. Sneat's default button and list-group paddings come out below that on a
 * touch device, so every element the capture flow expects to be tapped carries
 * .capture-touch-target.
 */
.capture-touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* A label is tapped as often as its radio; the check itself stays 1em. */
label.capture-touch-target {
    display: inline-flex;
    align-items: center;
}

/* Contract scope tree (KV.5): checkbox rows inside <details> summaries. */
.scope-tree-summary {
    list-style: none;
    cursor: pointer;
}

.scope-tree-summary::-webkit-details-marker {
    display: none;
}

.scope-tree-caret {
    flex: 0 0 auto;
    width: 0.75rem;
    color: var(--bs-secondary-color);
    transition: transform 0.15s ease;
    cursor: pointer;
    pointer-events: auto;
}

details[open] > summary .scope-tree-caret {
    transform: rotate(90deg);
}

summary .scope-tree-site-label {
    pointer-events: none;
}

summary .scope-tree-site-label .scope-site-cb {
    pointer-events: auto;
}

/* The tree of buildings of a contract has a scroll box of its own: about 640 px, however many
   buildings are open inside it (L9.21, D-321). */
.scope-tree-scroll {
    max-height: 40rem;
    overflow-y: auto;
}

.scope-search-input {
    max-width: 16rem;
}

/* Tree of choice (L6.7): one fold that says what is chosen; the tree scrolls inside it. */
.tree-picker-summary {
    list-style: none;
    cursor: pointer;
}

.tree-picker-summary::-webkit-details-marker {
    display: none;
}

.tree-picker-body {
    max-height: 28rem;
    overflow-y: auto;
}

/* The picker of the wizard of a Vorlage (L11.6): the tree on the left, the chosen ones beside it,
   each tree and list scrolling on its own so that 200 buildings stay usable. */
.tree-picker-split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1rem;
    overflow: hidden;
}

.tree-picker-split .tree-picker-tree,
.tree-picker-split .tree-picker-chosen {
    max-height: 26rem;
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    .tree-picker-split {
        grid-template-columns: minmax(0, 1fr);
    }
}

.scope-tree-item[data-scope-depth="2"] {
    padding-left: 1.5rem;
}

.scope-tree-item[data-scope-depth="3"] {
    padding-left: 3rem;
}

.scope-tree-item[data-scope-depth="4"] {
    padding-left: 4.5rem;
}

.scope-tree-item[data-scope-depth="5"] {
    padding-left: 6rem;
}

/* Two-list people picker (KV.6b). */
.two-list-picker {
    position: relative;
}

.two-list-picker-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: stretch;
}

.two-list-picker-list {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    min-height: 8rem;
    max-height: 10rem;
    overflow-y: auto;
    background: var(--bs-body-bg);
}

.two-list-picker-option {
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.two-list-picker-option:last-child {
    border-bottom: 0;
}

.two-list-picker-option:hover,
.two-list-picker-option.is-active {
    background: var(--bs-primary-bg-subtle);
}

.two-list-picker-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}

.contract-picker-native-select {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 2px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

/* Chips picker (L9.10): the typing field with its badges and the list of suggestions. */
.chips-picker-input {
    min-width: 8rem;
    background: transparent;
    outline: none;
}

.chips-picker-list {
    z-index: 1050;
    max-height: 16rem;
    overflow-y: auto;
}

/* Reminder rows share one grid so columns line up (KV.6b, KV.8). */
.contract-reminder-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.contract-reminder-scroll > .contract-reminder-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.contractors-table-wrapper {
    position: relative;
}

.contract-reminder-grid {
    --reminder-grid-fixed-col: minmax(7rem, 1fr);
    --reminder-grid-firm-col: minmax(7rem, 0.6fr);
    display: grid;
    grid-template-columns:
        minmax(7rem, 1fr)
        minmax(7rem, 1fr)
        4.5rem
        minmax(6rem, 1fr)
        minmax(7rem, 1fr)
        var(--reminder-grid-fixed-col)
        minmax(12rem, 1.4fr)
        minmax(280px, 2fr)
        var(--reminder-grid-firm-col)
        2.5rem;
    gap: 0.5rem;
    align-items: end;
}

.contract-reminder-grid--no-fixed-date {
    --reminder-grid-fixed-col: 0fr;
}

/* The box "also remind the firm" belongs to a certificate only (L9.21, D-321). */
.contract-reminder-grid--no-firm {
    --reminder-grid-firm-col: 0fr;
}

.contract-reminder-grid-header,
.contract-reminder-grid-row {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: end;
}

#reminder-rows {
    display: contents;
}

.contract-reminder-grid--no-fixed-date .reminder-header-fixed-date,
.contract-reminder-grid--no-fixed-date .reminder-col-fixed-date,
.contract-reminder-grid--no-firm .reminder-col-firm,
.reminder-col-fixed-date--hidden {
    overflow: hidden;
    visibility: hidden;
    padding: 0 !important;
    margin: 0;
    min-height: 0;
    max-height: 0;
}

.contract-reminder-cell .form-control,
.contract-reminder-cell .form-select {
    width: 100%;
}

/*
 * Admin matrices (document rights, communication rules; L3.10, TD-140). Bootstrap's
 * .form-select is width 100% and .table is 100% of its frame, so the selects shrank with
 * their columns and showed a cut-off value. Here a select takes the width of its longest
 * option, the cells stay on one line, and a matrix wider than its .table-responsive frame
 * scrolls inside it (the page does not). The first column is pinned to the frame's left
 * edge; --bs-paper-bg is the card colour and follows the theme, so nothing shows through.
 */
.sentona-matrix th,
.sentona-matrix td {
    white-space: nowrap;
}

.sentona-matrix .form-select {
    width: auto;
}

.sentona-matrix tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--bs-paper-bg);
}

.contract-reminder-message-cell .contract-reminder-message {
    min-width: 280px;
}

.contract-reminder-remove-cell {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.contract-reminder-recipients-cell {
    position: relative;
}

.contract-reminder-recipients-cell .reminder-recipients-summary {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#recipient-picker-dialog {
    max-width: min(40rem, 95vw);
}

#recipient-picker-dialog .two-list-picker-body {
    grid-template-columns: minmax(12rem, 1fr) auto minmax(12rem, 1fr);
}

#recipient-picker-dialog [data-picker-search] {
    min-width: 16rem;
}

#recipient-picker-dialog .two-list-picker-list {
    min-height: 8rem;
    max-height: 12rem;
}

/*
 * The FM_5 scale (Mihael 01.10.2026.; _macros/condition_scale.html): coloured track
 * 10 to 1 from left to right, the value large in its tone, numbers under the track.
 * --scale-r is the thumb's radius: the track and the numbers are inset by it, which is
 * where the browser puts the centre of the thumb at 10 and at 1. The thumb is 28 px — dragged
 * with a gloved thumb on a tablet.
 */
.sentona-scale {
    --scale-r: 14px;
    --scale-tone: #94a3b8;
    /* the five bands: read by the tone classes and by the gradient of the track (TD-75) */
    --scale-success: #16a34a;
    --scale-warning: #ca8a04;
    --scale-orange: #ea580c;
    --scale-danger: #dc2626;
    --scale-dark: #7f1d1d;
    /* the number 1 is read on the page, the band is painted on it: the dark mode gives them two
       colours (L9.22), the light mode one */
    --scale-dark-text: var(--scale-dark);
}

.sentona-scale-tone-success { --scale-tone: var(--scale-success); }
.sentona-scale-tone-warning { --scale-tone: var(--scale-warning); }
.sentona-scale-tone-orange { --scale-tone: var(--scale-orange); }
.sentona-scale-tone-danger { --scale-tone: var(--scale-danger); }
.sentona-scale-tone-dark { --scale-tone: var(--scale-dark-text); }

.sentona-scale-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.sentona-scale-caption {
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.sentona-scale-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    color: var(--scale-tone);
    text-align: right;
}

.sentona-scale-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.sentona-scale-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.sentona-scale-unrated .sentona-scale-value {
    color: var(--bs-secondary-color);
}

.sentona-scale-rail {
    position: relative;
    height: 2.75rem;
}

.sentona-scale-track {
    position: absolute;
    top: 50%;
    left: var(--scale-r);
    right: var(--scale-r);
    height: 0.625rem;
    border-radius: 999px;
    transform: translateY(-50%);
    /* value v sits at (10-v)/9 from the left; the colour changes halfway between two values:
       10-8 green, 7-6 yellow, 5-4 orange, 3-2 red, 1 dark red (PROJECT 5.5b, D-340) */
    background: linear-gradient(
        to right,
        var(--scale-success) 0%, var(--scale-success) 27.78%,
        var(--scale-warning) 27.78%, var(--scale-warning) 50%,
        var(--scale-orange) 50%, var(--scale-orange) 72.22%,
        var(--scale-danger) 72.22%, var(--scale-danger) 94.44%,
        var(--scale-dark) 94.44%, var(--scale-dark) 100%
    );
}

.sentona-scale-unrated .sentona-scale-track {
    opacity: 0.55;
}

/* The range is the same 1-10 as ever, drawn from right to left: 10 on the left (D-340). */
.sentona-scale-input {
    direction: rtl;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.sentona-scale-input:focus {
    outline: none;
}

.sentona-scale-input::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
}

.sentona-scale-input::-moz-range-track {
    height: 100%;
    background: transparent;
}

.sentona-scale-input::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: calc((2.75rem - 28px) / 2);
    border: 4px solid var(--scale-tone);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    -webkit-appearance: none;
    appearance: none;
}

.sentona-scale-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 4px solid var(--scale-tone);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.sentona-scale-input:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.35);
}

.sentona-scale-unrated .sentona-scale-input::-webkit-slider-thumb {
    border-color: #94a3b8;
    opacity: 0.8;
}

.sentona-scale-marker {
    position: absolute;
    top: 50%;
    left: calc(var(--scale-r) + (100% - 2 * var(--scale-r)) * var(--scale-at));
    width: 1.375rem;
    height: 1.375rem;
    border: 4px solid var(--scale-tone);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -50%);
}

.sentona-scale-ticks {
    position: relative;
    height: 1.75rem;
    margin: 0 var(--scale-r);
}

.sentona-scale-tick {
    position: absolute;
    top: 0;
    left: calc(var(--scale-at) * 100%);
    min-width: 1.75rem;
    padding: 0.125rem 0;
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    line-height: 1.2;
    text-align: center;
    transform: translateX(-50%);
}

button.sentona-scale-tick {
    cursor: pointer;
}

/* Where a value v sits: (10 - v) / 9 of the inset track, for the number under the track
   and for the marker on it. Ten whole values, so ten classes (FE.9: no style attribute). */
.sentona-scale-at-10 { --scale-at: 0; }
.sentona-scale-at-9 { --scale-at: calc(1 / 9); }
.sentona-scale-at-8 { --scale-at: calc(2 / 9); }
.sentona-scale-at-7 { --scale-at: calc(3 / 9); }
.sentona-scale-at-6 { --scale-at: calc(4 / 9); }
.sentona-scale-at-5 { --scale-at: calc(5 / 9); }
.sentona-scale-at-4 { --scale-at: calc(6 / 9); }
.sentona-scale-at-3 { --scale-at: calc(7 / 9); }
.sentona-scale-at-2 { --scale-at: calc(8 / 9); }
.sentona-scale-at-1 { --scale-at: 1; }

button.sentona-scale-tick:hover {
    color: var(--bs-body-color);
    font-weight: 600;
}

.sentona-scale-ends {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.sentona-scale-end-good {
    color: #16a34a;
}

.sentona-scale-end-bad {
    color: #dc2626;
}

/* Drop area for photos on the desktop; on a tablet the camera buttons are used. */
.border-dashed {
    border-style: dashed !important;
}

.capture-dropzone {
    min-height: 72px;
}

/*
 * Tree row card shape (PROJECT 5.2, 5.3, 5.3a; K5.4 visual pass). The object tree
 * (app/templates/locations/_tree.html) and the per-building asset tree
 * (app/templates/assets/_tree.html) render every node, building and asset through
 * the same _macros/tree_row.html, so this is the one place their look lives.
 *
 * The row is a lightweight bordered line, not Bootstrap's `.card` component --
 * nesting five levels of `.card` inside each other would be unreadable, so the card
 * shape applies per ROW, per PROJECT 5.2. Padding matches Bootstrap's own
 * `.list-group-item` (0.5rem 1rem), reused rather than invented, because a tree row
 * and a list-group row are the same shape of thing.
 */
.sentona-tree-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
    color: inherit;
    text-decoration: none;
}

a.sentona-tree-row-link:hover,
summary:hover > .sentona-tree-row {
    background-color: var(--bs-tertiary-bg);
}

.sentona-tree-row-icon {
    flex: 0 0 auto;
    width: 1.25rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.sentona-tree-row-name {
    flex: 1 1 auto;
    min-width: 0;
}

.sentona-tree-row-trailing {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

/*
 * `<summary>` keeps the browser's native expand/collapse behaviour either way
 * (no JS, K4.4); this only replaces its default triangle marker with a chevron
 * rendered as part of the row so an expandable row and a leaf row both read as one
 * card, not a card with a stray triangle glued to it.
 */
summary {
    list-style: none;
    cursor: pointer;
}

summary::-webkit-details-marker {
    display: none;
}

.sentona-tree-row-chevron {
    flex: 0 0 auto;
    width: 0.75rem;
    color: var(--bs-secondary-color);
    transition: transform 0.15s ease;
}

details[open] > summary .sentona-tree-row-chevron {
    transform: rotate(90deg);
}

/*
 * Shared empty-state shape (_macros/empty_state.html, frontend.mdc FE.5): one
 * centered block instead of five hand-rolled alert boxes across the block's
 * screens.
 */
.sentona-empty-state {
    color: var(--bs-secondary-color);
}

/*
 * Photo grid + lightbox (_macros/photo_gallery.html, PROJECT 5.5a, 5.6, 5.3a).
 * Square tiles regardless of the source image's own aspect ratio, so a row of
 * portrait and landscape photos from a phone camera still lines up.
 */
.photo-gallery-tile {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.photo-gallery-thumb {
    height: 100%;
    object-fit: cover;
}

#photoLightboxModal img[data-photo-lightbox-image] {
    max-height: 85vh;
}

/*
 * Dashboard drill-down cards (PROJECT 5.2a / FM_1; Word 16.09.2026., point 1.2).
 *
 * The photo is the card's head, large enough to recognise the object at a glance,
 * with the name written on it as in FM_1. A dark gradient under the name keeps it
 * readable on any photo; without a photo the same head shows an icon on slate.
 */
.sentona-dashboard-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sentona-dashboard-card:hover,
.sentona-dashboard-card:focus-visible {
    box-shadow: var(--bs-box-shadow);
    transform: translateY(-2px);
}

.sentona-object-card {
    overflow: hidden;
    color: var(--bs-body-color);
}

.sentona-object-card:hover,
.sentona-object-card:focus-visible {
    color: var(--bs-body-color);
}

.sentona-object-card-media {
    position: relative;
    height: 11rem;
    background: linear-gradient(135deg, #475569, #64748b);
}

.sentona-object-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 35%, rgba(15, 23, 42, 0.8) 100%);
}

.sentona-object-card-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sentona-object-card-placeholder {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.35);
}

.sentona-object-card-type {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-weight: 600;
}

.sentona-object-card-caption {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    left: 1rem;
    z-index: 1;
    color: #fff;
}

.sentona-object-card-name {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sentona-object-card-subtitle {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.sentona-object-card-stats {
    display: grid;
    gap: 0.5rem;
}

.sentona-object-card-stats-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sentona-object-card-stats-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sentona-object-card-stats > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sentona-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bs-heading-color);
}

.sentona-stat-label {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

/*
 * Level totals above the cards (Word 16.09.2026., points 1.2 and 1.3: the three
 * coloured cards of FM_1). One colour per figure, always the same one; a tile is a
 * link when the user may open the list it counts, and then it says so with an arrow.
 * White text sits on the darker end of each gradient (WCAG AA for the value).
 */
.sentona-kpi {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    height: 100%;
    padding: 1rem 1.125rem;
    border-radius: 0.75rem;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 0.25rem 0.75rem rgba(38, 43, 67, 0.12);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.sentona-kpi:hover,
a.sentona-kpi:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(38, 43, 67, 0.2);
}

.sentona-kpi-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.25rem;
}

.sentona-kpi-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sentona-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.sentona-kpi-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.sentona-kpi-hint {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    line-height: 1.3;
    opacity: 0.88;
}

.sentona-kpi-go {
    position: absolute;
    top: 0.75rem;
    right: 0.875rem;
    font-size: 0.75rem;
    opacity: 0.75;
}

.sentona-kpi-buildings { background: linear-gradient(135deg, #3730a3, #6366f1); }
.sentona-kpi-assets { background: linear-gradient(135deg, #155e75, #0891b2); }
.sentona-kpi-critical { background: linear-gradient(135deg, #9a3412, #ea580c); }
.sentona-kpi-overdue { background: linear-gradient(135deg, #991b1b, #dc2626); }
.sentona-kpi-ontime { background: linear-gradient(135deg, #166534, #16a34a); }
.sentona-kpi-orders { background: linear-gradient(135deg, #5b21b6, #8b5cf6); }
.sentona-kpi-mangel { background: linear-gradient(135deg, #9d174d, #db2777); }

/* The quick actions above the tiles (SB.2, D-392): a thumb-sized target in gloves. */
.sentona-quick-action {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

@media (max-width: 575.98px) {
    .sentona-kpi {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.875rem;
    }

    .sentona-kpi-value {
        font-size: 1.5rem;
    }
}

.sentona-dashboard-filter {
    min-width: 13rem;
}

/*
 * Under the xl breakpoint Sneat turns the menu row into a drawer and moves the
 * navbar logo into it. The logo row (200px image plus the product name) was wider
 * than the 260px drawer, so while the drawer was closed the name stuck out over the
 * page and lay on top of the menu button: on a phone the menu could not be opened
 * at all (measured 29.09.2026. at 390px, Playwright: "intercepts pointer events").
 */
.layout-menu.menu-vertical {
    overflow-x: hidden;
}

.layout-menu.menu-vertical .app-brand-link img {
    width: 96px;
    height: auto;
}

.layout-menu.menu-vertical .app-brand-text {
    font-size: 1rem;
    white-space: nowrap;
}

/*
 * The menu on the left (SB.1, D-391). The logo row holds the logo and the one control that folds
 * the bar to its icons on a computer and closes the drawer under xl; the control is a touch
 * target of 44 px. Folded, the bar shows icons only: the name and the logo give way.
 */
.layout-menu.menu-vertical .app-brand {
    align-items: center;
    justify-content: space-between;
    padding-inline: 1rem;
}

/*
 * Sneat draws the toggle of the logo row as a round button that sticks out over the edge of the
 * bar, and hides it while the folded bar is hovered; ours is a plain button inside the row that
 * is always there, so the specificity matches Sneat's rules to win over them.
 */
.menu .app-brand .layout-menu-toggle.sentona-menu-collapse {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--bs-body-color);
    /* Sneat fades the toggle out while the bar is folded; this one is how it is opened again. */
    opacity: 1 !important;
}

.menu .app-brand .layout-menu-toggle.sentona-menu-collapse i {
    color: inherit;
    block-size: auto;
    inline-size: auto;
}

.layout-menu-collapsed .sentona-menu-collapse .fa-angles-left {
    transform: rotate(180deg);
}

@media (min-width: 1200px) {
    .layout-menu-collapsed:not(.layout-menu-hover) .layout-menu.menu-vertical .app-brand-link,
    .layout-menu-collapsed:not(.layout-menu-hover) .layout-menu.menu-vertical .menu-link > div {
        display: none;
    }

    .layout-menu-collapsed:not(.layout-menu-hover) .layout-menu.menu-vertical .app-brand {
        padding-inline: 0;
        justify-content: center;
    }

    .layout-menu-collapsed:not(.layout-menu-hover) .layout-menu.menu-vertical .menu-link .badge {
        position: absolute;
        inset-block-start: 0.25rem;
        inset-inline-end: 0.25rem;
        margin: 0;
    }
}

/*
 * Handlungsbedarf action list (PROJECT 5.2, KN.6).
 */
.sentona-handlungsbedarf-link {
    color: inherit;
    text-decoration: none;
}

.sentona-handlungsbedarf-link:hover,
.sentona-handlungsbedarf-link:focus-visible {
    text-decoration: underline;
}

.sentona-handlungsbedarf-urgent {
    color: var(--bs-danger);
    font-weight: 600;
}

.sentona-chart {
    min-height: 12rem;
}

.sentona-chart-wide {
    min-height: 16rem;
}

/*
 * ONE calendar colours (PROJECT 5.10, core.mdc 6.5). FullCalendar events, legend
 * swatches and the embedded month grid all use fc-deadline-<kind>.
 */
.sentona-deadline-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.125rem;
    flex-shrink: 0;
}

.fc-deadline-maintenance,
.sentona-deadline-swatch.fc-deadline-maintenance {
    background-color: #696cff;
}

.fc-deadline-inspection,
.sentona-deadline-swatch.fc-deadline-inspection {
    background-color: #ffab00;
}

.fc-deadline-work_order,
.sentona-deadline-swatch.fc-deadline-work_order {
    background-color: #03c3ec;
}

.fc-deadline-warranty,
.sentona-deadline-swatch.fc-deadline-warranty {
    background-color: #71dd37;
}

.fc-deadline-contract,
.sentona-deadline-swatch.fc-deadline-contract {
    background-color: #6610f2;
}

/* The two sources added after the first five had no colour at all: they drew as
   plain text in the grid and as empty swatches in the legend (Word 16.09., 3.1). */
.fc-deadline-mangel,
.sentona-deadline-swatch.fc-deadline-mangel {
    background-color: #e11d48;
}

.fc-deadline-cleaning_control,
.sentona-deadline-swatch.fc-deadline-cleaning_control {
    background-color: #0d9488;
}

/* The three sources added later still had none (TD-129): a defect's own Frist, a planned
   Rundgang and a meter's Eichfrist. */
.fc-deadline-mangel_due,
.sentona-deadline-swatch.fc-deadline-mangel_due {
    background-color: #b91c1c;
}

.fc-deadline-round,
.sentona-deadline-swatch.fc-deadline-round {
    background-color: #ea580c;
}

.fc-deadline-meter_calibration,
.sentona-deadline-swatch.fc-deadline-meter_calibration {
    background-color: #475569;
}

/* The day of an appointment with a firm (L13.3, D-361): a dark sky blue, white text. */
.fc-deadline-appointment_day,
.sentona-deadline-swatch.fc-deadline-appointment_day {
    background-color: #0369a1;
}

.fc-deadline-done {
    opacity: 0.45;
}

/* An appointment a substitute took over from somebody who is away: a dashed edge in the colour
   of the text, so it is known at a glance as only temporarily his (L11.9, D-351). The body colour
   follows the theme, so the same rule holds in the dark one. */
.fc-event.fc-deadline-covered {
    border: 2px dashed var(--bs-body-color);
}

/* Event text is white on every source colour (Word 16.09., 3.1) — except on the
   three light ones (amber Prüfung, light-blue Auftrag, green Garantie), where white
   was hard to read; those get dark text (Mihael 01.10.2026., point 10: legible). */
.fc .fc-event[class*="fc-deadline-"],
.fc .fc-event[class*="fc-deadline-"] .fc-event-title,
.fc .fc-event[class*="fc-deadline-"] .fc-event-time {
    color: #fff;
    border-color: transparent;
}

.fc .fc-event.fc-deadline-inspection,
.fc .fc-event.fc-deadline-inspection .fc-event-title,
.fc .fc-event.fc-deadline-inspection .fc-event-time,
.fc .fc-event.fc-deadline-work_order,
.fc .fc-event.fc-deadline-work_order .fc-event-title,
.fc .fc-event.fc-deadline-work_order .fc-event-time,
.fc .fc-event.fc-deadline-warranty,
.fc .fc-event.fc-deadline-warranty .fc-event-title,
.fc .fc-event.fc-deadline-warranty .fc-event-time,
.sentona-month-chip.fc-deadline-inspection,
.sentona-month-chip.fc-deadline-work_order,
.sentona-month-chip.fc-deadline-warranty {
    color: #1f2430;
}

/*
 * Mihael 01.10.2026., point 10: every day cell the same height, "+n mehr" for what
 * does not fit, the rest in FullCalendar's own popover beside the cell. The popover
 * must stay inside a phone screen and scroll when a day has very many entries.
 */
/* Sneat's theme pins the view harness to min-block-size: 650px, which defeats any
   fixed calendar height (the grid overflowed the card by 100+ px, measured
   01.10.2026.); the height option must be the only thing that sizes it. */
#deadline-calendar .fc-view-harness {
    min-block-size: 0;
}

.fc .fc-popover {
    max-width: calc(100vw - 2rem);
    z-index: 1060;
}

.fc .fc-more-popover .fc-popover-body {
    max-height: 60vh;
    overflow-y: auto;
}

.fc .fc-daygrid-more-link {
    font-size: 0.75rem;
    font-weight: 600;
}

/* One line per entry in a day cell (the full title is in the popover and on the
   entry's own page): a wrapped two-line entry left FullCalendar room for none at
   all, and the cell showed only "+13 mehr" (measured 01.10.2026.). */
#deadline-calendar .fc-daygrid-day-events .fc-daygrid-event {
    overflow: hidden;
    white-space: nowrap;
}

#deadline-calendar .fc-daygrid-day-events .fc-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#deadline-calendar .fc-daygrid-day-bottom .fc-daygrid-more-link {
    margin-block-start: 0.125rem;
}

/* Sneat spaces the entries of a day 10 px apart (margin on the entry, another on
   the harness) — with a fixed cell height that cost a whole entry per cell. */
#deadline-calendar .fc-daygrid-event-harness + .fc-daygrid-event-harness .fc-daygrid-event,
#deadline-calendar .fc-daygrid-event-harness-abs .fc-event {
    margin-block: 0 0.125rem;
}

#deadline-calendar .fc-daygrid-day-events .fc-daygrid-event {
    padding-block: 0.125rem;
}

#deadline-calendar .fc-daygrid-day-top .fc-daygrid-day-number {
    padding-block: 0.25rem;
}

/*
 * Interactive month calendar on the building page (Word 16.09.2026., point 2.1):
 * one cell per day, each appointment a chip in its source colour with the full title
 * on hover and the entity behind a click.
 */
.sentona-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.sentona-month-head {
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.sentona-month-day {
    min-height: 5.25rem;
    padding: 0.25rem 0.3rem;
    border-radius: 0.375rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    /* No overflow: hidden here — the chips clip themselves, and the "+n" popup must
       be able to reach out of the cell (01.10.2026., point 10). */
    min-width: 0;
}

.sentona-month-day-empty {
    background: transparent;
    border-color: transparent;
}

.sentona-month-day-today {
    border-color: var(--bs-primary);
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.sentona-month-daynum {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sentona-month-day-today .sentona-month-daynum {
    color: var(--bs-primary);
}

.sentona-month-chip {
    display: block;
    margin-bottom: 2px;
    padding: 1px 0.375rem;
    border-radius: 0.25rem;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.sentona-month-chip:hover,
.sentona-month-chip:focus-visible {
    color: #fff;
    filter: brightness(0.92);
}

/* "+n weitere" on the building's month calendar opens a popup beside the cell with
   every entry of that day (Mihael 01.10.2026., point 10); the cell is its anchor. */
.sentona-month-day {
    position: relative;
}

.sentona-month-more {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bs-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.sentona-month-popover {
    position: absolute;
    top: 1.5rem;
    left: 0;
    z-index: 1050;
    width: 16rem;
    max-width: calc(100vw - 2rem);
    padding: 0.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: var(--bs-paper-bg, #fff);
    box-shadow: var(--bs-box-shadow);
    text-align: left;
}

.sentona-month-popover[hidden] {
    display: none;
}

.sentona-month-popover-body {
    max-height: 60vh;
    overflow-y: auto;
}

.sentona-month-popover-right {
    left: auto;
    right: 0;
}

.sentona-month-popover-up {
    top: auto;
    bottom: 1.5rem;
}

.sentona-month-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.sentona-month-popover .sentona-month-chip {
    font-size: 0.8125rem;
    height: auto;
    padding: 0.2rem 0.5rem;
    white-space: normal;
}

.sentona-month-popover .btn-close {
    font-size: 0.625rem;
}

@media (max-width: 767.98px) {
    .sentona-month-day {
        min-height: 3.5rem;
        padding: 0.15rem 0.2rem;
    }

    .sentona-month-chip {
        font-size: 0;
        height: 0.45rem;
        padding: 0;
        margin-bottom: 2px;
    }

    .sentona-month-popover .sentona-month-chip {
        font-size: 0.8125rem;
        height: auto;
        padding: 0.2rem 0.5rem;
    }

    .sentona-month-popover {
        position: fixed;
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        width: auto;
    }
}

.sentona-chart-box + .sentona-chart-box {
    margin-top: 1.25rem;
}

.sentona-upcoming-text {
    min-width: 0;
}

/* Two lines of the title instead of one cut after a few letters on a phone (D.1). */
.sentona-upcoming-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* Eight tabs do not fit a phone: the strip scrolls sideways instead of widening the
   page (measured 29.09.2026. at 390 px: the page scrolled 428 px to the right). */
.sentona-detail-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.sentona-detail-tabs .nav-link {
    white-space: nowrap;
}

/* L2.12: the vendor stylesheet capitalises every word of a tab ("Treba Obaviti"); a tab keeps
   the words as written in the translation. */
.nav-tabs .nav-link,
.nav-pills .nav-link {
    text-transform: none;
}

@media (max-width: 834px) {
    .content-wrapper {
        overflow-x: clip;
        max-width: 100%;
    }

    .sentona-detail-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.sentona-embedded-calendar-grid .sentona-deadline-swatch {
    width: 0.625rem;
    height: 0.625rem;
}

.sentona-embedded-calendar-day {
    min-width: 2.25rem;
    vertical-align: top;
}

/* Global header search (PROJECT 5.2a) */

.global-search-input {
    min-width: 12rem;
    max-width: 16rem;
}

.global-search-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 1080;
    min-width: 20rem;
    max-width: 28rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow);
    overflow: hidden;
}

.global-search-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 0.5rem;
    padding: 0.5rem 0.75rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.global-search-item:last-child {
    border-bottom: none;
}

.global-search-item:hover,
.global-search-item-active {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.global-search-type {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.global-search-label {
    grid-column: 2;
    font-weight: 500;
}

.global-search-context {
    grid-column: 2;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

/*
 * One colour per DIN 276 group, everywhere (Word 16.09.2026., point 2.2): the capture
 * wizard, the Anlagen drill-down and the asset detail all read the same tone from the
 * first two digits of the code (app/catalog/display.py kg_tone). The first
 * digit alone is the fallback for a code that has no second one.
 */
:root {
    --kg-3: #64748b;
    --kg-33: #78716c;
    --kg-34: #a16207;
    --kg-35: #4d7c0f;
    --kg-36: #0f766e;
    --kg-37: #7c3aed;
    --kg-38: #9f1239;
    --kg-39: #52525b;
    --kg-4: #4f46e5;
    --kg-41: #0284c7;
    --kg-42: #dc2626;
    --kg-43: #0d9488;
    --kg-44: #d97706;
    --kg-45: #7c3aed;
    --kg-46: #4f46e5;
    --kg-47: #b45309;
    --kg-48: #475569;
    --kg-49: #6b7280;
    --kg-0: #94a3b8;
}

.kg-tone-3 { --kg: var(--kg-3); }
.kg-tone-33 { --kg: var(--kg-33); }
.kg-tone-34 { --kg: var(--kg-34); }
.kg-tone-35 { --kg: var(--kg-35); }
.kg-tone-36 { --kg: var(--kg-36); }
.kg-tone-37 { --kg: var(--kg-37); }
.kg-tone-38 { --kg: var(--kg-38); }
.kg-tone-39 { --kg: var(--kg-39); }
.kg-tone-4 { --kg: var(--kg-4); }
.kg-tone-41 { --kg: var(--kg-41); }
.kg-tone-42 { --kg: var(--kg-42); }
.kg-tone-43 { --kg: var(--kg-43); }
.kg-tone-44 { --kg: var(--kg-44); }
.kg-tone-45 { --kg: var(--kg-45); }
.kg-tone-46 { --kg: var(--kg-46); }
.kg-tone-47 { --kg: var(--kg-47); }
.kg-tone-48 { --kg: var(--kg-48); }
.kg-tone-49 { --kg: var(--kg-49); }
.kg-tone-0 { --kg: var(--kg-0); }

/*
 * Anlagen drill-down on the building (Word 16.09.2026., point 2.2; FM_1).
 */
.sentona-browser-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.sentona-browser-trail-sep {
    color: var(--bs-secondary-color);
    padding: 0 0.125rem;
}

.sentona-browser-trail .btn.active {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    font-weight: 600;
}

/* Groups as FM_6 rows (Mihael 01.10.2026., point 4): a section per Hauptgruppe,
   its Untergruppen as .sentona-list-row buttons in the group's own colour. */
.sentona-kg-section {
    overflow: hidden;
}

.sentona-kg-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.sentona-kg-chip {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    background: var(--kg, #94a3b8);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sentona-kg-section-name {
    font-weight: 600;
}

.sentona-kg-section-count {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.sentona-kg-row {
    --sentona-tone: var(--kg, #94a3b8);
    width: 100%;
    border: 0;
    border-top: 1px solid var(--bs-border-color);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.sentona-kg-section .sentona-list-row:first-child {
    border-top: 0;
}

.sentona-kg-code {
    flex: 0 0 3rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--kg, #94a3b8);
}

.sentona-group-card-code {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--kg, #94a3b8);
}

.sentona-asset-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sentona-browser-search {
    width: 11rem;
    min-width: 8rem;
}

@media (max-width: 575.98px) {
    .sentona-browser-search {
        width: 100%;
    }
}


/* --- Detail screens: one "Technische Daten" card (Word 16.09.2026., 2.3.2 / 2.5) --- */

.sentona-data-caption {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-bottom: 0.5rem;
}

.sentona-data-caption .text-lowercase {
    letter-spacing: 0;
}

.sentona-data-list {
    margin: 0;
}

.sentona-data-list > div {
    display: flex;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.sentona-data-list > div:last-child {
    border-bottom: 0;
}

.sentona-data-list dt {
    flex: 0 0 46%;
    font-weight: 500;
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}

.sentona-data-list dd {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.sentona-data-empty {
    color: var(--bs-secondary-color);
    opacity: 0.6;
}

@media (min-width: 768px) {
    .sentona-data-list-2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 2rem;
    }
}

/* The Mängel block sits in a narrow column: its actions go under the text, in a
   row that wraps, instead of squeezing "Gewährleistungsanzeige senden" into a
   sliver on the right. */
.sentona-mangel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sentona-mangel-actions .btn {
    white-space: nowrap;
}

/* --- Edit screens: captioned sections (Word 16.09.2026., 2.4.1 / 2.5.1) --- */

/* A fieldset draws its padding-top BELOW the legend, so the spacing between two
   sections is a margin, not a padding. */
.sentona-form-section {
    padding: 0 0 1.25rem;
    margin: 0 0 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    min-width: 0;
}

.sentona-form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
}

.sentona-form-legend {
    float: none;
    width: auto;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-bottom: 0.75rem;
}

/* --- Sammelvorgang picker (Word 16.09.2026., 2.4.3; PROJECT 5.8 dopuna) --- */

.sentona-picker {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.sentona-pick-group {
    border-left: 4px solid var(--kg, #94a3b8);
    padding-left: 0.75rem;
    margin-bottom: 1rem;
}

.sentona-pick-group .sentona-pick-group {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.sentona-pick-group-head {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sentona-pick-list,
.sentona-pick-parts {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sentona-pick-parts {
    padding-left: 1.75rem;
}

.sentona-pick-row {
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.sentona-pick-row:last-child {
    border-bottom: 0;
}

.sentona-pick-extra {
    display: flex;
    gap: 0.5rem;
    margin: 0.25rem 0 0 1.75rem;
}

.sentona-pick-extra .form-select {
    max-width: 16rem;
}

.sentona-pick-extra .form-control {
    max-width: 5rem;
}

/* Source 8, the user's own reminder (Word 16.09.2026., 3.1). */
.fc-deadline-reminder,
.sentona-deadline-swatch.fc-deadline-reminder {
    background-color: #db2777;
}

/* The "+" on a day of the building's month calendar: shown on hover or focus, so
   the grid stays quiet (Word 16.09.2026., 3.1). */
.sentona-month-daynum {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sentona-month-add {
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    color: var(--bs-secondary-color);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sentona-month-day:hover .sentona-month-add,
.sentona-month-add:focus-visible {
    opacity: 1;
}

.sentona-month-add:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

@media (hover: none) {
    .sentona-month-add {
        opacity: 0.6;
    }
}

/*
 * Tile panels and list rows (Mihael 01.10.2026., points 2-4 and the FM_6 example).
 * A tile that has a list behind it unfolds that list above the objects; the open
 * tile shows a ring and its chevron turns. The rows are the FM_6 shape used from
 * here on wherever a screen lists things: a coloured bar in the tile's colour, name
 * over place, one pill, a chevron.
 */
.sentona-kpi-go {
    transition: transform 0.2s ease;
}

.sentona-kpi[aria-expanded="true"] {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(38, 43, 67, 0.35);
}

.sentona-kpi[aria-expanded="true"] .sentona-kpi-go {
    transform: rotate(180deg);
}

.sentona-tile-panel-icon {
    color: var(--sentona-tone, var(--bs-primary));
}

.sentona-tile-panel-buildings { --sentona-tone: #4f46e5; }
.sentona-tile-panel-assets { --sentona-tone: #0891b2; }
.sentona-tile-panel-critical { --sentona-tone: #ea580c; }
.sentona-tile-panel-overdue { --sentona-tone: #dc2626; }
.sentona-tile-panel-orders { --sentona-tone: #7c3aed; }
.sentona-tile-panel-mangel { --sentona-tone: #db2777; }

.sentona-list {
    display: flex;
    flex-direction: column;
}

.sentona-list-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 0.875rem;
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.sentona-list-row:hover,
.sentona-list-row:focus-visible {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}

.sentona-list-bar {
    flex: 0 0 auto;
    width: 0.25rem;
    align-self: stretch;
    min-height: 2.25rem;
    border-radius: 0.25rem;
    background: var(--sentona-tone, var(--bs-primary));
}

.sentona-list-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.sentona-list-title {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.sentona-list-subtitle {
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}

.sentona-list-row .badge {
    flex: 0 0 auto;
    white-space: nowrap;
}

.sentona-list-pills {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.375rem;
}

.sentona-list-chevron {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.sentona-list-row-buildings { --sentona-tone: #4f46e5; }
.sentona-list-row-assets { --sentona-tone: #0891b2; }
.sentona-list-row-critical { --sentona-tone: #ea580c; }
.sentona-list-row-overdue { --sentona-tone: #dc2626; }
.sentona-list-row-orders { --sentona-tone: #7c3aed; }
.sentona-list-row-mangel { --sentona-tone: #db2777; }
.sentona-list-row-soon { --sentona-tone: #d97706; }

/* A row with a second action (D.1, "Protokoll erfassen"): the row itself is a box,
   its text is the link to the thing and the button sits beside it. */
.sentona-list-main {
    color: inherit;
    text-decoration: none;
}

.sentona-list-main:hover,
.sentona-list-main:focus-visible {
    color: inherit;
}

.min-w-0 {
    min-width: 0;
}

/* On a phone a "stack" row moves its pills under the text instead of squeezing
   the name into a column of broken words (measured 01.10.2026. at 390 px). Rows
   without the class keep one line — a value, a photo and a button beside the text. */
@media (max-width: 575.98px) {
    .sentona-list-row-stack {
        flex-wrap: wrap;
        row-gap: 0.375rem;
    }

    .sentona-list-row-stack .sentona-list-text {
        flex: 1 1 0;
        min-width: calc(100% - 2.5rem);
    }

    .sentona-list-row-stack .sentona-list-chevron {
        order: 2;
    }

    .sentona-list-row-stack > .badge,
    .sentona-list-row-stack > .btn,
    .sentona-list-row-stack .sentona-list-pills {
        order: 3;
        margin-left: 1rem;
        justify-content: flex-start;
    }

    .sentona-kg-row .sentona-list-text {
        min-width: calc(100% - 6.75rem);
    }

    .sentona-kg-row .sentona-list-pills {
        margin-left: 4.75rem;
    }
}

.sentona-list-thumb {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
    border-radius: 0.375rem;
}

/* The reading history on a phone (01.10.2026., point 8): two lines per reading —
   date over the difference, value over photo and the correction button. */
.sentona-reading-card {
    display: grid;
    grid-template-columns: 0.25rem minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    row-gap: 0.25rem;
    align-items: center;
    padding: 0.625rem 0.25rem 0.625rem 0;
    border-top: 1px solid var(--bs-border-color);
}

.sentona-reading-card:first-child {
    border-top: 0;
}

.sentona-reading-card .sentona-list-bar {
    --sentona-tone: var(--bs-primary);
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
}

.sentona-reading-title {
    grid-column: 2;
    grid-row: 1;
    font-weight: 600;
}

.sentona-reading-value {
    grid-column: 3;
    grid-row: 1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.sentona-reading-sub {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.sentona-reading-actions {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.sentona-reading-note {
    grid-column: 2 / span 2;
    grid-row: 3;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

/*
 * "Foto aufnehmen" (Mihael 01.10.2026., points 6, 7, 9; _macros/photo_capture.html).
 * The picture is shown before it is sent, with retake and remove under it; the
 * camera modal shows the live image and then the still in the same frame.
 */
.sentona-photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sentona-photo-preview {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 0;
}

.sentona-photo-preview-image {
    width: 9rem;
    height: 9rem;
    object-fit: cover;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
}

.sentona-photo-preview-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 2rem;
    color: var(--bs-secondary-color);
}

.sentona-photo-preview-file .small {
    max-width: 100%;
    font-size: 0.75rem;
}

.sentona-photo-preview-actions {
    display: flex;
    gap: 0.375rem;
}

.sentona-camera-stage {
    display: grid;
    place-items: center;
    min-height: 12rem;
    max-height: 70vh;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #111;
}

.sentona-camera-stage video,
.sentona-camera-stage img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.sentona-camera-stage [hidden] {
    display: none;
}

/*
 * Anlagenaufnahme in the FM_6 shape (Mihael 01.10.2026.): one step bar with numbered
 * circles ("Schritt n" over the title, done steps ticked), the context column as
 * labelled rows with small chips, the DIN 276 hint as a soft blue box, the lists as
 * .sentona-list-row rows with section heads per Hauptgruppe.
 */
#capture-steps .bs-stepper-header {
    display: none;
}

.sentona-steps {
    padding: 1rem 1.25rem;
}

.sentona-steps-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sentona-step {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.sentona-step + .sentona-step::before {
    content: "";
    flex: 0 0 2rem;
    height: 2px;
    margin-right: 0.25rem;
    background: var(--bs-border-color);
}

.sentona-step-circle {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 50%;
    background: var(--bs-paper-bg, #fff);
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.sentona-step-check {
    display: none;
}

.sentona-step.active .sentona-step-circle {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.16);
}

.sentona-step.done .sentona-step-circle {
    border-color: var(--bs-success);
    background: var(--bs-success);
    color: #fff;
}

.sentona-step.done .sentona-step-number {
    display: none;
}

.sentona-step.done .sentona-step-check {
    display: inline;
}

.sentona-step-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sentona-step-kicker {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.sentona-step-title {
    font-weight: 600;
    line-height: 1.25;
    color: var(--bs-secondary-color);
}

.sentona-step.active .sentona-step-title {
    color: var(--bs-primary);
}

.sentona-step.done .sentona-step-title {
    color: var(--bs-body-color);
}

@media (max-width: 991.98px) {
    /* Tablet and phone: the titles of the other steps would wrap into columns of
       single words; only the current step keeps its title. */
    .sentona-step:not(.active) .sentona-step-text {
        display: none;
    }

    .sentona-step {
        flex: 0 0 auto;
    }

    .sentona-step.active {
        flex: 1 1 auto;
    }

    .sentona-step + .sentona-step::before {
        flex-basis: 1rem;
    }
}

.sentona-capture-side .sentona-side-caption {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.sentona-side-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
    color: var(--bs-body-color);
    text-decoration: none;
}

a.sentona-side-link:hover .sentona-side-value {
    color: var(--bs-primary);
}

.sentona-side-chip {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.5rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.sentona-side-chip-kg {
    background: color-mix(in srgb, var(--kg, #94a3b8) 14%, transparent);
    color: var(--kg, #94a3b8);
}

.sentona-side-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sentona-side-label {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.sentona-side-value {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sentona-capture-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.sentona-capture-search {
    position: relative;
    flex: 0 1 16rem;
    min-width: 12rem;
}

.sentona-capture-search .fa-magnifying-glass {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    color: var(--bs-secondary-color);
    transform: translateY(-50%);
}

.sentona-capture-search .form-control {
    padding-left: 2.25rem;
}

.sentona-capture-list {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
}

.sentona-capture-list .sentona-kg-section-head {
    border-top: 1px solid var(--bs-border-color);
}

.sentona-capture-list > :first-child {
    border-top: 0;
}

.sentona-capture-list .sentona-kg-row {
    min-height: 3.5rem;
}

.sentona-capture-list .sentona-kg-code {
    flex-basis: 3.75rem;
}

.sentona-kg-section-head .btn {
    margin-left: 0.5rem;
}

@media (max-width: 575.98px) {
    .sentona-capture-search {
        flex-basis: 100%;
    }
}

/* Asset rows of the building's Anlagen tab (01.10.2026., point 4): FM_6 rows in the
   group's colour inside the section card; the list has no gaps of its own. */
.sentona-asset-line {
    --sentona-tone: var(--kg, #94a3b8);
}

.sentona-kg-section .sentona-asset-list {
    gap: 0;
}

.sentona-kg-section .sentona-list > .sentona-list-row:first-child {
    border-top: 0;
}

.sentona-kg-section-head + .sentona-list > .sentona-list-row:first-child {
    border-top: 0;
}

/* Revierplan tiles as filters (D.3, Mihael 01.10.2026.): the chosen one is marked. */
.sentona-revier-tile {
    color: var(--bs-body-color);
    border: 2px solid transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sentona-revier-tile:hover,
.sentona-revier-tile:focus-visible {
    color: var(--bs-body-color);
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.12);
}

.sentona-revier-tile.active {
    border-color: var(--bs-primary);
}

.sentona-revier-tile-done .fs-4 {
    color: #16a34a;
}

.sentona-revier-tile-open .fs-4 {
    color: #d97706;
}

/* One task in a room (D.3): a large tick box, the state beside it, edit below. */
.sentona-task-check {
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.sentona-task-label {
    display: block;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: break-word;
    cursor: pointer;
}

.sentona-task-done .sentona-task-label {
    color: var(--bs-secondary-color);
    text-decoration: line-through;
}

/* Comments next to the tasks of a room (D.5): the other side's on the left edge,
   one's own marked, the text kept readable on a phone. */
.sentona-task-comment {
    padding: 0.375rem 0.625rem;
    margin-bottom: 0.375rem;
    border-left: 3px solid var(--bs-info);
    background: var(--bs-tertiary-bg);
    border-radius: 0 0.375rem 0.375rem 0;
}

.sentona-task-comment-mine {
    border-left-color: var(--bs-primary);
}

.sentona-task-comment-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.sentona-grade-chip {
    min-width: 1.75rem;
}

.sentona-finding-photo {
    width: 6rem;
    height: 6rem;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* The error page (lanac D): one calm icon above what happened. */
.sentona-error-icon {
    font-size: 2.5rem;
    color: var(--bs-secondary-color);
}

/* A row action with icon and word (Reinigung, lanac D). */
.sentona-row-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
}

.sentona-row-action i {
    font-size: 0.875rem;
}

/* The camera picture of the QR scan (Reinigung): the full width of a phone, no wider
   than 480 px on a larger screen. */
.sentona-scan-video {
    max-width: 480px;
}

/* Kommunikation (M2): the text of a message keeps its line breaks in the preview. */
.sentona-preserve-lines {
    white-space: pre-line;
}

/* PR.9b — readable Sentona colours on Bootstrap dark (D-100). Light theme uses :root above. */
[data-bs-theme="dark"] {
    --kg-3: #94a3b8;
    --kg-33: #a8a29e;
    --kg-34: #fbbf24;
    --kg-35: #a3e635;
    --kg-36: #5eead4;
    --kg-37: #c4b5fd;
    --kg-38: #fda4af;
    --kg-39: #a1a1aa;
    --kg-4: #a5b4fc;
    --kg-41: #7dd3fc;
    --kg-42: #fca5a5;
    --kg-43: #5eead4;
    --kg-44: #fdba74;
    --kg-45: #c4b5fd;
    --kg-46: #a5b4fc;
    --kg-47: #fcd34d;
    --kg-48: #94a3b8;
    --kg-49: #9ca3af;
    --kg-0: #cbd5e1;
}

[data-bs-theme="dark"] .sentona-kg-chip {
    background: color-mix(in srgb, var(--kg, #94a3b8) 55%, #0f172a);
    color: #f8fafc;
}

[data-bs-theme="dark"] .sentona-side-chip-kg {
    background: color-mix(in srgb, var(--kg, #94a3b8) 22%, transparent);
    color: var(--kg, #cbd5e1);
}

[data-bs-theme="dark"] .sentona-scale {
    --scale-success: #4ade80;
    --scale-warning: #facc15;
    --scale-orange: #fb923c;
    --scale-danger: #f87171;
    /* the band of 1 is the darkest red, darker than 2-3; its number stays light to be read */
    --scale-dark: #b91c1c;
    --scale-dark-text: #fca5a5;
}

[data-bs-theme="dark"] .sentona-scale-end-good {
    color: #4ade80;
}

[data-bs-theme="dark"] .sentona-scale-end-bad {
    color: #f87171;
}

[data-bs-theme="dark"] .layout-navbar .avatar-initial.bg-info {
    background-color: #67cfea !important;
    color: #0b2e36;
}

[data-bs-theme="dark"] .badge.bg-light.text-dark {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

/* PR.9g — capture wizard step 1 on toned kg rows (D-100 follow-up). */
[data-bs-theme="dark"] .sentona-capture-list .sentona-kg-section-head[class*="kg-tone-"] .sentona-kg-section-count {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .sentona-capture-list .sentona-kg-row[class*="kg-tone-"] .sentona-list-subtitle {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .sentona-capture-list .sentona-kg-row[class*="kg-tone-"] .badge.bg-label-secondary {
    background-color: color-mix(in srgb, var(--bs-body-color) 18%, transparent) !important;
    color: #f1f5f9 !important;
}

/* A text typed over several lines keeps its line breaks (the notice to tenants, L5.5). */
.sentona-prewrap {
    white-space: pre-wrap;
}

/*
 * Absence wizard (L6.12, D-207): without the script every step stands on the page one below the
 * other; with it (.is-stepping, set by js/absence_wizard.js) one step is shown at a time.
 */
.absence-wizard .wizard-step + .wizard-step {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bs-border-color);
}

.absence-wizard [data-wizard-js] {
    display: none;
}

.absence-wizard .wizard-nav-last,
.absence-wizard.is-stepping .wizard-nav {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.absence-wizard.is-stepping [data-wizard-fallback] {
    display: none;
}

.absence-wizard.is-stepping [data-wizard-js]:not(.wizard-nav) {
    display: block;
}

.absence-wizard.is-stepping .wizard-nav button[data-wizard-js] {
    display: inline-block;
}

.absence-wizard.is-stepping .wizard-step:not(.is-active) {
    display: none;
}

.absence-wizard.is-stepping .wizard-step + .wizard-step {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.absence-wizard .wizard-step-title:focus {
    outline: none;
}

/* "Mehrere auf einmal" (L8.13, D-265): whatever a person taps or types into is 44 px high (FE.8). */
.sentona-bulk .form-control,
.sentona-bulk .form-select,
.sentona-bulk .btn {
    min-height: 44px;
}

.sentona-bulk .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sentona-bulk textarea.form-control {
    min-height: 8rem;
}

.sentona-bulk-summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
}

[data-source-text] .sentona-bulk-summary {
    font-weight: 600;
}

/* "Anlage außer Betrieb genommen" on the report forms (L8.15, D-267): the question stands out once
   the form asks it; Bootstrap's danger colour follows the dark theme by itself. */
.mg-oos-question {
    margin: 0 0 4px;
    font-weight: 600;
}

.mg-oos-question.is-asked {
    color: var(--bs-danger);
}

/* The fields of a firm that is not in the system (L8.22, D-274): hidden until the list of firms
   has chosen its last line; Bootstrap's subtle primary follows the dark theme by itself. */
.nf-fields {
    margin-top: 16px;
}

.nf-fields[hidden] {
    display: none;
}

.nf-hint {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 6px;
    background: var(--bs-primary-bg-subtle);
    font-size: 14px;
}

/*
 * The list of notifications (L8.24, D-249 P4, D-276): picture 12 on the Sneat theme. The states
 * as chips, one card with "Zu erledigen" over "Zur Info", and per row its name in capitals, its
 * title, one line and ONE button; the rarer actions open under "Mehr". Used by
 * deadlines/notifications_list.html, in this file and not in a file of its own: a stylesheet more
 * in <head> held the page back by a third of a second after every click on it. Whatever a person
 * taps is at least 44 px high (FE.8). A tone is never told by its colour alone: the name says
 * what the row is, the line says its day. Below 576 px a row stacks - its text, then its button
 * the whole width - and nothing runs sideways.
 */

.nl-card {
    --nl-task: #696cff;
    --nl-soon: #c2410c;
    --nl-info: #6b7280;
    --nl-line: rgba(67, 89, 113, 0.14);
    --nl-head-bg: rgba(67, 89, 113, 0.04);
    --nl-muted: #6b7280;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .nl-card {
    --nl-task: #a5a7ff;
    --nl-soon: #fb923c;
    --nl-info: #9ca3af;
    --nl-line: rgba(255, 255, 255, 0.14);
    --nl-head-bg: rgba(255, 255, 255, 0.05);
    --nl-muted: #9ca3af;
}

/* The states as chips */

.nl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.nl-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(67, 89, 113, 0.2);
    border-radius: 22px;
    color: var(--bs-body-color);
    text-decoration: none;
}

.nl-chip:hover,
.nl-chip:focus-visible {
    border-color: #696cff;
    color: #696cff;
}

.nl-chip.is-current {
    background: rgba(105, 108, 255, 0.16);
    border-color: transparent;
    color: #696cff;
    font-weight: 600;
}

[data-bs-theme="dark"] .nl-chip {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .nl-chip:hover,
[data-bs-theme="dark"] .nl-chip:focus-visible,
[data-bs-theme="dark"] .nl-chip.is-current {
    color: #a5a7ff;
}

/* The two parts of the card */

.nl-part-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 14px 20px;
    background: var(--nl-head-bg);
    border-bottom: 1px solid var(--nl-line);
    font-size: 1rem;
}

.nl-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    background: #dc2626;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
}

.nl-empty {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--nl-line);
    color: var(--nl-muted);
}

/* One row */

.nl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--nl-line);
}

.nl-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.nl-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.nl-label {
    color: var(--nl-task);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nl-row[data-notification-tone="soon"] .nl-label {
    color: var(--nl-soon);
}

.nl-row[data-notification-tone="info"] .nl-label {
    color: var(--nl-info);
}

.nl-flag {
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(105, 108, 255, 0.16);
    color: #696cff;
    font-size: 0.75rem;
    font-weight: 600;
}

.nl-flag-done {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

[data-bs-theme="dark"] .nl-flag {
    color: #a5a7ff;
}

[data-bs-theme="dark"] .nl-flag-done {
    color: #4ade80;
}

.nl-title {
    display: block;
    margin-top: 2px;
    color: var(--bs-heading-color, var(--bs-body-color));
    font-size: 1rem;
    font-weight: 600;
}

a.nl-title:hover,
a.nl-title:focus-visible {
    color: #696cff;
}

.nl-line,
.nl-note {
    margin-top: 2px;
    color: var(--nl-muted);
    font-size: 0.875rem;
}

/* The one button and "Mehr" */

.nl-actions {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.nl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.nl-btn-solid {
    background: #696cff;
    color: #fff;
}

.nl-btn-solid:hover,
.nl-btn-solid:focus-visible {
    background: #5f61e6;
    color: #fff;
}

.nl-btn-outline {
    border-color: #696cff;
    color: #696cff;
}

.nl-btn-outline:hover,
.nl-btn-outline:focus-visible {
    background: rgba(105, 108, 255, 0.12);
}

.nl-btn-quiet {
    border-color: rgba(67, 89, 113, 0.3);
    color: var(--bs-body-color);
}

.nl-btn-quiet:hover,
.nl-btn-quiet:focus-visible {
    background: var(--nl-head-bg);
}

[data-bs-theme="dark"] .nl-btn-outline {
    border-color: #a5a7ff;
    color: #a5a7ff;
}

[data-bs-theme="dark"] .nl-btn-quiet {
    border-color: rgba(255, 255, 255, 0.3);
}

.nl-more > summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
    color: var(--nl-muted);
    font-size: 0.875rem;
    cursor: pointer;
}

.nl-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    padding: 4px;
    background: var(--bs-body-bg);
    border: 1px solid var(--nl-line);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(67, 89, 113, 0.18);
}

.nl-menu form {
    display: block;
}

.nl-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.nl-menu-item:hover,
.nl-menu-item:focus-visible {
    background: var(--nl-head-bg);
}

/* A phone: the text, then its button the whole width */

@media (max-width: 575.98px) {
    .nl-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 16px;
    }

    .nl-actions {
        align-items: stretch;
    }

    .nl-actions form {
        display: block;
    }

    .nl-btn {
        width: 100%;
    }

    .nl-menu {
        position: static;
        min-width: 0;
        box-shadow: none;
    }
}

/*
 * The page of the Mängelanzeige (L8.25, D-277): picture neu_3 on the Sneat theme. The letter is the
 * left card (about two thirds), "Vorschau" over "Was danach passiert" the right column; below 992 px
 * one column, the letter first. Used by maintenance/mangel_notice_form.html. Whatever a person taps
 * is at least 44 px high (FE.8) and nothing runs sideways on a phone.
 */

.nz-page {
    --nz-line: rgba(67, 89, 113, 0.18);
    --nz-muted: #6b7280;
    --nz-badge-bg: #e7e7ff;
    --nz-badge-ink: #696cff;
    --nz-box-bg: #fff4d6;
    --nz-box-line: #f5d27a;
    --nz-box-ink: #5c4300;
    --nz-skeleton: rgba(67, 89, 113, 0.14);
}

[data-bs-theme="dark"] .nz-page {
    --nz-line: rgba(255, 255, 255, 0.18);
    --nz-muted: #9ca3af;
    --nz-badge-bg: rgba(165, 167, 255, 0.18);
    --nz-badge-ink: #a5a7ff;
    --nz-box-bg: rgba(245, 210, 122, 0.12);
    --nz-box-line: rgba(245, 210, 122, 0.4);
    --nz-box-ink: #f3d98b;
    --nz-skeleton: rgba(255, 255, 255, 0.16);
}

.nz-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 1rem;
}

.nz-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--nz-badge-bg);
    color: var(--nz-badge-ink);
    font-size: 14px;
    font-weight: 600;
}

.nz-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.nz-card {
    min-width: 0;
    padding: 24px;
    border-radius: 8px;
    background: var(--bs-card-bg, var(--bs-body-bg));
    box-shadow: 0 2px 8px rgba(67, 89, 113, 0.12);
}

.nz-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.nz-page .nz-label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
}

.nz-page .nz-label:first-child {
    margin-top: 0;
}

.nz-sublabel {
    display: block;
    margin: 12px 0 6px;
    font-size: 14px;
    color: var(--nz-muted);
}

.nz-page .form-control,
.nz-page .form-select {
    min-height: 44px;
    max-width: 100%;
}

.nz-page textarea.form-control {
    min-height: 0;
}

.nz-readonly {
    padding: 10px 14px;
    border: 1px solid var(--nz-line);
    border-radius: 6px;
    background: var(--nz-skeleton);
    overflow-wrap: anywhere;
}

.nz-hint {
    margin-top: 6px;
    font-size: 14px;
    color: var(--nz-muted);
}

.nz-more-head {
    margin: 8px 0;
    font-size: 14px;
    color: var(--nz-muted);
}

.nz-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    min-height: 44px;
    margin-bottom: 8px;
    padding: 4px 12px;
    border: 1px solid var(--nz-line);
    border-radius: 6px;
}

.nz-row[hidden],
.nz-desc[hidden],
.nz-desc-title[hidden] {
    display: none;
}

.nz-row-main {
    display: flex;
    flex: 1 1 220px;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    cursor: pointer;
}

.nz-title {
    overflow-wrap: anywhere;
}

.nz-place {
    color: var(--nz-muted);
    font-size: 14px;
}

.nz-frist {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nz-frist .form-control {
    width: 9.5rem;
}

.nz-frist-label {
    color: var(--nz-muted);
}

.nz-desc-title {
    margin: 8px 0 4px;
    font-size: 14px;
    font-weight: 600;
}

.nz-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.nz-days {
    display: inline-block;
    margin-top: 6px;
    color: var(--nz-muted);
}

.nz-copy summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.nz-copy-list {
    margin-top: 8px;
}

.nz-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    cursor: pointer;
}

.nz-box {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--nz-box-line);
    border-radius: 6px;
    background: var(--nz-box-bg);
    color: var(--nz-box-ink);
}

.nz-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.nz-foot > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.nz-sheet {
    padding: 16px;
    border: 1px solid var(--nz-line);
    border-radius: 6px;
}

.nz-sheet-title {
    font-weight: 700;
}

.nz-sheet-meta {
    margin: 6px 0 10px;
    font-size: 14px;
    color: var(--nz-muted);
    overflow-wrap: anywhere;
}

.nz-sheet-line {
    margin: 10px 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.nz-skeleton {
    height: 31px;
    margin: 10px 0;
    background-repeat: no-repeat;
    background-image:
        linear-gradient(var(--nz-skeleton), var(--nz-skeleton)),
        linear-gradient(var(--nz-skeleton), var(--nz-skeleton)),
        linear-gradient(var(--nz-skeleton), var(--nz-skeleton));
    background-size: 100% 7px, 90% 7px, 70% 7px;
    background-position: 0 0, 0 12px, 0 24px;
}

.nz-skeleton-short {
    height: 19px;
    background-size: 100% 7px, 70% 7px, 0 0;
}

.nz-side ul {
    margin: 0;
    padding-left: 1.2rem;
}

.nz-side li {
    margin-bottom: 8px;
}

@media (max-width: 991.98px) {
    .nz-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nz-two {
        grid-template-columns: minmax(0, 1fr);
    }

    .nz-card {
        padding: 16px;
    }

    .nz-foot > .btn {
        flex: 1 1 100%;
    }
}

/* The Prüfbuch of a building (L8.35, D-292): the matrix Vorlage x week, its legend and the panel.
   The colours are the legend of picture 6; a state is never only a colour - every cell carries its
   word or its count, and the legend names each colour. */
.pb-matrix-box {
    overflow-x: auto;
    max-width: 100%;
}

.pb-matrix {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 4px;
    font-size: 13px;
}

.pb-matrix th.pb-week {
    font-weight: 500;
    text-align: center;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
}

.pb-matrix th.pb-name {
    font-weight: 600;
    min-width: 150px;
    white-space: normal;
}

.pb-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #fff;
}

a.pb-cell:hover,
a.pb-cell:focus {
    filter: brightness(0.92);
    color: #fff;
}

.pb-done { background: #16a34a; color: #fff; }
.pb-deviation { background: #d97706; color: #fff; }
.pb-transferred { background: #0284c7; color: #fff; }
.pb-missed { background: #dc2626; color: #fff; }
.pb-open { background: transparent; color: var(--bs-body-color, #384551); border: 1px dashed #9aa3ad; }
.pb-not_due { background: #ececec; color: var(--bs-body-color, #384551); }

[data-bs-theme="dark"] .pb-not_due { background: #3a3f55; }
[data-bs-theme="dark"] .pb-open { border-color: #6c7488; }

.pb-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: -2px;
}

.pb-swatch.pb-open { border: 1px dashed #9aa3ad; }

.pb-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin-bottom: 16px;
}

.pb-facts dt { font-weight: 400; color: var(--bs-secondary-color, #6c757d); }
.pb-facts dd { margin: 0; text-align: right; }

.pb-results li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bs-border-color, #e6e8ec);
}

.pb-rounds-of-cell .pb-cell { display: inline-flex; }

/* The language switch at the top of the login card (TD.12, D-297) */
.login-language-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.login-language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--bs-border-color, #d9dee3);
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.login-language-switch a[aria-current="true"] {
    background: var(--bs-primary, #696cff);
    border-color: var(--bs-primary, #696cff);
    color: #fff;
}

/* The rules of a new password at its field (L9.12, D-310): the mark is a character, the colour
   only repeats it */
.password-rules li.is-ok {
    color: var(--bs-success, #71dd37);
}

.password-rules li.is-bad {
    color: var(--bs-danger, #ff3e1d);
}

.password-rule-mark {
    display: inline-block;
    min-width: 1.2em;
    font-weight: 600;
}

/* Meine Aufgaben as a board (L9.30, D-332): a row with the edge of its state - red late, orange
   today and soon, grey otherwise. The colours are the theme's own, so the dark mode follows. */
.task-board-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-left: 4px solid var(--bs-secondary, #8592a3);
    border-bottom: 1px solid var(--bs-border-color, #d9dee3);
}

.task-board-row:last-child {
    border-bottom: 0;
}

.task-board-row--danger {
    border-left-color: var(--bs-danger, #ff3e1d);
}

.task-board-row--warning {
    border-left-color: var(--bs-warning, #ffab00);
}

.task-board-row .task-board-when {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* "Termine mit Firmen" in Meine Aufgaben (L13.3, D-361): the sentence, its state and the one
   button of the next step in a row; the button keeps a dodgeable size on a tablet. */
.task-board-row[data-my-appointment] > div {
    flex: 1 1 auto;
    min-width: 0;
}

.task-board-row[data-my-appointment] .task-board-action {
    flex: 0 0 auto;
}

.task-board-row[data-my-appointment] .badge {
    flex: 0 0 auto;
    white-space: normal;
    text-align: left;
}

.task-board-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    text-align: left;
}

.task-board-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* "Zurück" before the breadcrumb trail (L11.2, D-344). It is as high as one line of the trail, so a
   page does not move down when it gets one; the padding and the negative margin make the part
   that can be tapped 44 px high all the same (frontend.mdc FE.8). */
.sentona-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-block: 0.75rem;
    margin-block: -0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* L11.4 (D-346): a row of a Historie opens whole - the stretched link of its title covers the
   row; the small icons on the right stay above it and keep their own click. */
[data-history-row] {
    position: relative;
}

[data-history-row] .history-actions,
[data-history-row] .history-link {
    position: relative;
    z-index: 2;
}

/* L12.1 (D-355): the filter above a Historie and its tools are touch targets of a tablet. */
.history-filter,
.history-tool {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

/* The recipient boxes of "Per E-Mail senden" (L12.2): the list is a scroll area of its own, and
 * what the script hides (a folder, a row, the elements only JavaScript can use) stays hidden
 * whatever display the row has. */
.recipient-list {
    max-height: 28rem;
    overflow-y: auto;
}

[data-recipient-picker] [hidden] {
    display: none !important;
}

/* K9.11 (D-373): the question before signing out while entries of the person wait to be sent.
 * .d-none (Bootstrap, !important) hides it; the dark layer is the same in both themes. */
.fm-logout-warning {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.fm-logout-warning .card {
    max-width: 28rem;
}

/*
 * The text of a banner with a button beside it takes the room that is left and wraps inside it, so
 * the button stays on its right while the menu on the left narrows the page (SB.1); on a phone the
 * basis does not fit beside the button and the button goes below.
 */
.sentona-banner-text {
    flex: 1 1 24rem;
}

/*
 * The button "+ Neu" and its four tiles (WA.2, D-399): one tile per thing a person wants to do, in
 * two columns, in one on a phone. A tile is a link with the whole card as its target (44 px at
 * least); colours come from Bootstrap variables, so both themes follow.
 */
.neu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.neu-tile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 44px;
    height: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-decoration: none;
}

.neu-tile:hover,
.neu-tile:focus-visible {
    border-color: var(--bs-primary);
    color: var(--bs-body-color);
}

.neu-tile-name {
    font-weight: 600;
}

.neu-tile-what {
    font-size: 0.875rem;
}

.neu-tile-examples {
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.neu-cell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.neu-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 575.98px) {
    .neu-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* WA.5 (D-402): the page "Wartung / Prüfung erfassen" - what is due on the left, the chosen one on
   the right. A row is a touch target of its own; the chosen one keeps its text readable. */
.erfassen-item {
    min-height: 44px;
    white-space: normal;
}
.erfassen-item.active .text-muted {
    color: inherit !important;
    opacity: 0.85;
}
.erfassen-group summary {
    cursor: pointer;
    min-height: 44px;
}
.erfassen-mangel .form-label {
    font-weight: 600;
}
