/* == Module header (D6). Purpose/Status are hand-written; Module-Map.py --check verifies the rest. ==
   Purpose:   Brothers identity; retain semantic red for errors and outages.
   Status:    active
   Loaded by: alarm-monitoring.html, change-password.html, customer-portal.html,
              customer-welcome.html, fire-inspections.html, login.html, phone-sign-in.html,
              reset-password.html, single-sign-on.html, support-desk.html, support-sessions.html,
              two-step-sign-in.html
   Replaces:  none
   History:   311, 626
   == end of module header == */
/* BSS 626 (2026-11-01, theme clean-up): the important flag stays only where it still wins somewhere; declarations
 * that other rules beat on every page were removed. Each change was checked element by element on every page, at eight
 * screen widths, light and dark, with no difference. A flagged rule that no page currently draws was left as it
 * was. */
/* Brothers identity; retain semantic red for errors and outages. */
@layer app {
    @media(max-width:760px) {
        .nav31 a {
            flex-shrink: 0
        }
    }

    /* One Brothers layout and palette across every section. */

    .header32.app-header,
    .header32.file-header,
    #lf-topbar.header32,
    header.support-header67 {
        flex: none;
        align-items: center;
        background: var(--panel);
        border-bottom: 1px solid var(--line);
    }

    .header32 .brand32,
    header.support-header67>a.brand {
        position: relative;
        overflow: hidden;
        flex: 0 0 144px;
    }

    .header32 .header-middle32 {
        flex: 1 1 180px;
    }

    .header32 .header-right32 {
        flex: 0 0 auto;
    }

    .header32 .header-right32 .nav31 {
        flex: 0 0 auto;
    }

    .header32 .header-right32 .nav31 a {
        flex: 0 0 auto;
    }

    .header32 .header-right32 .nav31 svg {
        flex: 0 0 21px;
    }

    .header32 .top-photo31 {
        flex: 0 0 42px;
    }

    body[data-staff] h1 {
        font-weight: 500
    }

    body[data-staff] .card,
    body[data-staff] .table-wrap {
        border-radius: 12px
    }

    body[data-staff] input,
    body[data-staff] select,
    body[data-staff] textarea {
        border-radius: 8px
    }

    body[data-staff] header .header-right {
        margin-left: auto
    }

    .device67 {
        width: 420px;
        max-width: calc(100vw - 32px);
        padding: 26px;
        border: 1px solid var(--line);
        border-top: 3px solid var(--blue);
        border-radius: 14px;
        background: var(--panel);
        color: var(--text);
        font: 14px Arial, system-ui, sans-serif;
        box-shadow: 0 18px 60px #0004
    }

    .device67::backdrop {
        background: #0009
    }

    .device67 h2 {
        font-size: 20px;
        margin: 0 0 14px
    }

    .device67 p {
        line-height: 1.5;
        margin: 0 0 22px
    }

    .device67 .choices67 {
        display: flex;
        gap: 10px;
        margin-top: 10px
    }

    .device67 button {
        min-height: 42px;
        flex: 1;
        padding: 10px 16px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--bg);
        color: var(--text);
        font: 600 14px Arial;
        cursor: pointer
    }

    .device67>button {
        width: 100%;
        background: var(--blue);
        border-color: var(--blue);
        color: white
    }

    .device67 [role=status]:empty {
        display: none
    }

    .device67 [role=status] {
        margin: 12px 0 0;
        color: var(--muted)
    }

    @media(max-width:1150px) {
        .header32 .header-middle32 {
            flex: 1 1 calc(100% - 180px)}

        .header32 .header-right32 {
            flex: 1 1 100%;
        }

    }

    @media(max-width:600px) {
        .header32 .header-right32 .nav31 {
            flex: 1 1 0;
            min-width: 0;
        }

    }

    /* Match the Inventory typeface and keep the shared theme authoritative. */
    @font-face {
        font-family: Montserrat;
        src: url('/static/fonts/Montserrat.ttf') format('truetype');
        font-display: swap;
        font-style: normal /* BSS 311 (2026-10-15, review O2): from ui-layer-235: the variable font covers every weight, so bold is never synthesised */;
        font-weight: 100 900 /* BSS 311 (2026-10-15, review O2): from ui-layer-235: the variable font covers every weight, so bold is never synthesised */
    }

    body,
    body[data-staff],
    .header32 .header-right32 .nav31 a {
        font-family: Montserrat, Arial, sans-serif !important
    }

    .header32 .brand32,
    header.support-header67>a.brand {
        transform: none}

    /* Shared account menu, matching LogicFortress controls on every section. */
    body .account-menu32 {
        margin: 82px 12px auto auto;
        max-width: calc(100vw - 24px);
        padding: 22px;
    }

    body .account-menu32 .dialog-heading31 {
        position: relative;
        gap: 12px;
    }

    body .account-menu32 .dialog-heading31 h2 {
        flex: 1;
        font-size: 21px;
        font-weight: 400;
        text-align: left
    }

    body .account-menu32 .dialog-heading31>button {
        display: grid;
        place-items: center;
        flex: 0 0 40px;
        height: 40px;
        padding: 6px;
        border-radius: 50%
    }

    body .account-menu32 .theme36 svg {
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6
    }

    body .account-menu32 .close38 svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round
    }

    body .account-menu32 .dialog-heading31>button.theme36 {
        background: #e5e7eb}

    .dark body .account-menu32 .dialog-heading31>button.theme36 {
        background: #393c3f}

    body .account-menu32>button {
        border-radius: 0;
    }

    body .account-menu32 .theme-options36 {
        position: absolute;
        top: 44px;
        left: 0;
        z-index: 2;
        min-width: 185px;
        background: var(--panel31);
        box-shadow: 0 4px 16px #0004;
        border-radius: 8px;
        padding: 6px
    }

    body .theme-options36 button {
        display: block;
        width: 100%;
        padding: 10px 12px;
        text-align: left;
        background: transparent;
        border: 0;
        color: var(--ink31)
    }

    body .theme-options36 button[aria-checked=true] {
        font-weight: 700
    }

    body .theme-options36 button:hover {
        background: #8882
    }

    @media(max-width:600px) {
        body .account-menu32 {
            margin: 72px 8px auto;
            width: calc(100vw - 16px)}
    }

    .search68 {
        border-radius: 28px;
    }

    .search68 svg {
        flex: none;
    }

    /* Keep all logo artwork inside its padded slot. */

    body[data-staff] #page>.toolbar>a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        color: var(--text);
        text-decoration: none;
        font-size: 13px
    }

    body[data-staff] #page>.toolbar>a:hover {
        background: var(--selected)
    }

    @media(max-width:600px) {
        header.support-header67 .header-right32 .nav31 {
            scroll-padding: 8px
        }

        header.support-header67 .header-right32 .nav31 a {
            scroll-margin: 8px
        }
    }

    /* The support form's column-label rule must not apply to header search. */
    header.support-header67 label.search68 {
        justify-content: flex-start;
    }

    header.support-header67 label.search68>svg {
        flex: 0 0 20px;
    }

    header.support-header67 label.search68>input {
        flex: 1 1 0;
        align-self: center;
        border-radius: 0;
    }

    /* Shared Inventory search typography and geometry across suite headers. */
    html body .header32 :is(.search-control, .directory-search, #file-search-form) {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 9px;
        min-height: 0;
        padding: 0 14px;
        border-radius: 32px;
    }

    html body .header32 :is(.search-control, .directory-search, #file-search-form)[hidden] {
        display: none !important
    }

    html body .header32 :is(.search-control, .directory-search, #file-search-form) input {
        font-family: Arial, system-ui, sans-serif !important;
        font-size: 16px;
        line-height: 1.45 !important;
        height: 100%;
        min-height: 0;
        padding: 0;
    }

    html body .header32 :is(.search-control, .directory-search, #file-search-form) input::placeholder {
        font-family: Arial, system-ui, sans-serif !important;
        font-size: 16px !important;
    }

    html body .header32 :is(.search-control, .directory-search, #file-search-form) svg {
        stroke: #969da6;
        stroke-width: 1.8;
        color: #969da6
    }

    @media(max-width:600px) {
        html body .header32 :is(.search-control, .directory-search, #file-search-form) {
            padding: 0 10px}
    }

    /* Log links share their module icons and the sidebar's existing geometry. */
    .sidebar a.sidebar-link[href="/support/staff#ticket-log"] svg,
    .sidebar a.sidebar-link[href="/support/staff#incidents"] svg {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6
    }

    .sidebar a.sidebar-link[href="/support/staff#ticket-log"] svg {
        color: var(--muted31)
    }

    .sidebar a.sidebar-link[href="/support/staff#incidents"] svg {
        color: var(--muted31)
    }

    .dark .sidebar a.sidebar-link[href="/support/staff#ticket-log"] svg {
        color: var(--muted31)
    }

    .dark .sidebar a.sidebar-link[href="/support/staff#incidents"] svg {
        color: var(--muted31)
    }

    /* BSS 311 (2026-10-15, review O2): from ui-layer-235 (look and consistency): one typeface on the app pages (Inventory, Files, Dashboard,
       staff workspace); the sign-in pages and the customer portal keep theirs. The page-kind attribute is the only thing
       that tells those pages apart; the rule keeps its force because design-system.css forces Arial on the body. */

    /* BSS 311 (2026-10-15, review O2): from ui-layer-235 (look and consistency): top nav links and icons in one colour (app-header-account.css's
       per-section icon colours are gone); the current page (and a hovered one) in the accent; an icon with a fill
       takes the text colour. */
    .header32 .header-right32 .nav31 a svg [fill]:not([fill="none"]) { fill: currentColor; }
}

/* priority rules. Rules above sit in the app layer; these plain rules
   win over any of them (what !important used to do), and compete with each other as before. */
.login-logo26 {
    width: 230px;
    height: 110px;
}
.header32 .brand32 img, header.support-header67>a.brand img {
    height: auto;
}
.header32 .header-right32 .nav31 a[aria-current=page] {
    color: var(--blue);
}
#lf-topbar .category-control.category-next {
    flex: 0 0 auto;
    /* BSS 311 (2026-10-15, review O2): from ui-layer-277: the category control takes its own width on the Inventory header */
    min-width: 180px;
}
#lf-topbar .category-button-next {
    white-space: nowrap;
}
body .account-menu32 .dialog-heading31>button {
    min-width: 40px;
    min-height: 40px;
}
body .account-menu32 .close38 svg {
    display: block;
    width: 30px;
    height: 30px;
}
header.support-header67 .nav31 a:focus:not(:focus-visible) {
    outline: none;
}
header.support-header67 label.search68>input::placeholder {
    color: var(--muted);
    opacity: 1;
}
html body .header32 :is(.search-control, .directory-search, #file-search-form) input::placeholder {
    font-weight: 400;
    color: #687078;
    opacity: 1;
}
html.dark body .header32 :is(.search-control, .directory-search, #file-search-form) input::placeholder {
    color: #aab0b7;
}
html body .header32 :is(.search-control, .directory-search, #file-search-form) svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}
