/*
 * BRP brand layer for the user-facing pages (AdminLTE 3 / Bootstrap 4, see templates/site_base.html).
 * Source: BRP Brand Book 2026/05 — Colors (p.75-78) and Typefaces (p.81-85).
 *
 *  - BRP Yellow is a background/accent colour: black text on yellow, never yellow text on white.
 *  - White backgrounds for web applications, black for typography.
 *  - Digital greys are for UI surfaces and borders, not text (p.78).
 *  - Internal tools use Arial (body), Arial Narrow Bold (subtitles) and Arial Narrow Bold Italic, all caps
 *    (titles); Trade Gothic is licensed per user and is not served here.
 *  - Left alignment is the standard (p.83); one logo per composition (the sidebar shows the BRP mark).
 */
:root {
    --brp-yellow: #FFD200;        /* Pantone 116 C */
    --brp-yellow-hover: #E6BD00;
    --brp-black: #000000;
    --brp-white: #FFFFFF;
    --brp-gray-1: #474546;        /* Digital Gray 1 */
    --brp-gray-2: #5C5A5B;        /* Digital Gray 2 */
    --brp-gray-3: #C4C8CC;        /* Digital Gray 3 */
    --brp-gray-4: #E8E9EB;        /* Digital Gray 4 */
    --brp-sidebar: #2E2D2D;       /* sidebar: darker charcoal between BRP black and Digital Gray 1 */
    --brp-font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
    --brp-font-title: "Arial Narrow", "Arial Nova Cond", "Roboto Condensed", Arial, sans-serif;
    --brp-font-heavy: "Arial Black", "Arial Bold", Arial, sans-serif;

    /* Shell and components */
    --brp-header-height: calc(3.5rem + 1px);   /* AdminLTE's navbar height; the sidebar logo block matches it */
    --brp-radius: 12px;
    --brp-radius-sm: 8px;
    --brp-hover: rgba(232, 233, 235, .6);       /* Digital Gray 4, translucent: hover on white */
    --brp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --brp-shadow-md: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 24px -12px rgba(0, 0, 0, .18);
}

/* ---------- Typography ---------- */
body,
.tooltip,
.popover {
    font-family: var(--brp-font-body);
    color: var(--brp-black);
}

/* Brand title style (Arial Narrow Bold Italic, all caps, tight leading): page titles only.
 * h1.h3 etc. stay page titles; the .hN class only sets their size. */
h1, .h1,
h1.h2, h1.h3, h1.h4, h1.h5, h1.h6,
.brp-page-title {
    font-family: var(--brp-font-title);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: .95;
}
/* Every other heading is plain Arial Bold, in the case it was written in, so pages don't shout. */
h2, h3, h4, h5, h6,
.h2, .h3, .h4, .h5, .h6 {
    font-family: var(--brp-font-body);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
}
.content-wrapper h2 { font-size: 1.375rem; }
.content-wrapper h3 { font-size: 1.125rem; }
.content-wrapper h4 { font-size: 1.0625rem; }
.content-wrapper h5 { font-size: 1rem; }
.content-wrapper h6 { font-size: .9375rem; }

/* "BRPForms" wordmark (sidebar, phone top bar): heavy italic, same as the login page title. */
.brp-wordmark {
    font-family: var(--brp-font-heavy);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -.02em;
    text-transform: none;
    color: var(--brp-black);
    white-space: nowrap;
}

a {
    color: var(--brp-black);
}
a:hover,
a:focus {
    color: var(--brp-black);
    text-decoration: underline;
}
/* Links are black like body text, so underline them inside page content to keep them recognisable.
 * Components with a brp-* class (tiles, link rows) are recognisable on their own. */
.content-wrapper a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.badge):not([class*="brp-"]) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Top bar: white, hairline bottom border ---------- */
.main-header.navbar {
    box-sizing: border-box;
    height: var(--brp-header-height);
    min-height: var(--brp-header-height);
    padding: 0 1.25rem 0 1rem;
    background-color: var(--brp-white);
    border-bottom: 1px solid var(--brp-gray-4);
}
.main-header .navbar-nav {
    gap: .25rem;
}
.main-header .navbar-nav .nav-link.brp-icon-button,
.main-header .navbar-nav .nav-link.brp-account-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 2.25rem;
    min-width: 2.25rem;
    padding: 0 .625rem;
    border-radius: var(--brp-radius-sm);
    color: var(--brp-black);
    font-size: .9375rem;
    line-height: 1;
    transition: background-color .15s;
}
.main-header .navbar-nav .nav-link.brp-account-button {
    padding: 0 .625rem 0 .25rem;
}
.main-header .navbar-nav .nav-link:hover,
.main-header .navbar-nav .show > .nav-link {
    background-color: var(--brp-gray-4);
    color: var(--brp-black);
    text-decoration: none;
}
.main-header .navbar-nav .nav-link:focus-visible {
    outline: 2px solid var(--brp-black);
    outline-offset: 1px;
}
.brp-lang-code {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.brp-avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: var(--brp-yellow);   /* black text on yellow */
    color: var(--brp-black);
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1;
}
.brp-account-name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .875rem;
    font-weight: 700;
}
.brp-account-caret {
    font-size: .625rem;
}
.brp-topbar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: .25rem;
    font-size: 1.0625rem;
    line-height: 1;
}
.brp-topbar-brand:hover,
.brp-topbar-brand:focus {
    text-decoration: none;
}
.brp-topbar-brand img {
    height: 26px;
    width: auto;
}

/* Language and account menus */
.main-header .dropdown-menu {
    min-width: 12rem;
    margin-top: .375rem;
    padding: .375rem;
    border: 1px solid var(--brp-gray-4);
    border-radius: var(--brp-radius);
    box-shadow: var(--brp-shadow-md);
    font-size: .875rem;
}
.main-header .dropdown-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem .625rem;
    border-radius: 6px;
    color: var(--brp-black);
}
.main-header .dropdown-item > i {
    width: 1rem;
    text-align: center;
}
.main-header .dropdown-item:hover,
.main-header .dropdown-item:focus {
    background-color: var(--brp-gray-4);
    color: var(--brp-black);
    text-decoration: none;
}
.main-header .dropdown-item.active,
.main-header .dropdown-item:active {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--brp-black) !important;
    font-weight: 700;
}
.main-header .dropdown-item.active:hover {
    background-color: var(--brp-gray-4) !important;
}
.main-header .dropdown-divider {
    margin: .375rem -.375rem;
    border-top-color: var(--brp-gray-4);
}
#site-usermenu {
    min-width: 16rem;
}
.brp-menu-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .625rem;
    line-height: 1.3;
}
.brp-menu-header .brp-avatar {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
}
.brp-menu-header-name {
    font-weight: 700;
}
.brp-menu-header-sub {
    font-size: .8125rem;
    word-break: break-all;
}

/* ---------- Sidebar: one dark charcoal column top to bottom, white logo + text; active item = lighter pill, yellow icon ---------- */
.main-sidebar {
    background-color: var(--brp-sidebar) !important;   /* white text on it: ~13:1 contrast */
    border-right: 0;
    box-shadow: none !important;
}
.main-sidebar .brand-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: .625rem;
    height: var(--brp-header-height);
    padding: 0 0 0 1.4rem;
    background-color: var(--brp-sidebar) !important;   /* same charcoal as the rest of the sidebar */
    border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
    color: var(--brp-white);
    overflow: hidden;
}
.main-sidebar .brand-link:hover,
.main-sidebar .brand-link:focus {
    color: var(--brp-white);
    text-decoration: none;
}
.main-sidebar .brand-link .brand-image {
    float: none;
    flex: none;
    height: 30px;
    max-height: none;
    width: auto;
    margin: 0;
    box-shadow: none !important;
    opacity: 1 !important;
}
.main-sidebar .brp-wordmark {
    color: var(--brp-white);   /* white on the dark sidebar; stays black in the white phone top bar */
}
.main-sidebar .brand-link .brand-text {
    font-size: 1.125rem;
    line-height: 1;
}
.main-sidebar .sidebar {
    padding: .75rem .75rem 1rem;
}
.main-sidebar .nav-sidebar > .nav-item > .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 2px;
    padding: .5rem .75rem;
    border-radius: var(--brp-radius-sm);
    color: var(--brp-white);
    font-size: .9375rem;
    line-height: 1.25rem;
    transition: background-color .15s;
}
.main-sidebar .nav-sidebar > .nav-item > .nav-link .nav-icon {
    flex: none;
    width: 1.25rem;
    margin: 0;
    font-size: 1rem;
    text-align: center;
}
.main-sidebar .nav-sidebar .nav-link p {
    white-space: nowrap;
}
.main-sidebar .nav-sidebar .brp-external {
    margin-left: .25rem;
    font-size: .625rem;
    vertical-align: 1px;
}
.main-sidebar .nav-sidebar > .nav-item:hover > .nav-link,
.main-sidebar .nav-sidebar > .nav-item > .nav-link:focus {
    background-color: rgba(255, 255, 255, .08);
    color: var(--brp-white);
}
.main-sidebar .nav-sidebar > .nav-item > .nav-link:focus-visible {
    outline: 2px solid var(--brp-white);
    outline-offset: -2px;
}
.main-sidebar .nav-sidebar > .nav-item > .nav-link.active {
    background-color: rgba(255, 255, 255, .14) !important;
    color: var(--brp-white) !important;
    font-weight: 700;
    box-shadow: none;
}
.main-sidebar .nav-sidebar > .nav-item > .nav-link.active .nav-icon {
    color: var(--brp-yellow);   /* yellow on the dark charcoal: high contrast */
}
.main-sidebar .brp-nav-divider {
    height: 1px;
    margin: .75rem;
    background-color: rgba(255, 255, 255, .12);
}
/* Collapsed (icon-only) sidebar: centre the icons and the mark in the 4.6rem rail. */
@media (min-width: 992px) {
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover) .nav-sidebar > .nav-item > .nav-link {
        gap: 0;
        padding-left: .925rem;
    }
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover) .brand-link {
        padding-left: 1.3rem;
    }
}

/* ---------- Content area ---------- */
.content-wrapper {
    background-color: var(--brp-gray-4);   /* light grey page so white cards stand out */
}
.content-wrapper > .content {
    padding: 3.25rem 2rem 3rem;   /* page title lines up with the active sidebar item (Home) */
}
/* Optional title bar from site_base.html; hidden while content_title, breadcrumbs and page_actions are empty. */
.content-wrapper > .brp-content-header {
    padding: 1.25rem 2rem 0;
}
.brp-content-header:has(h1:empty):not(:has(h1 + *)):not(:has(.row > :nth-child(2))) {
    display: none;
}
.brp-content-header h1 {
    font-size: 1.5rem;
    border-right-color: var(--brp-gray-4) !important;
}

/* ---------- Page header ----------
 * .brp-page-head: page title + one-line description, left-aligned (dashboard pages).
 * Most portal templates still use the old centred hero (".py-5.text-center" holding the round BRP logo,
 * an <h2> and ".lead" paragraphs). These rules render it as the same left-aligned header and hide its
 * logo, since the sidebar already shows the BRP mark. */
.brp-page-head,
.content-wrapper .text-center:has(> img[src*="brp-logo-primary"]) {
    margin: 0 0 2rem;
    padding: 0 !important;
    text-align: left !important;
}
.content-wrapper .text-center > img[src*="brp-logo-primary"] {
    display: none !important;
}
.brp-page-title,
.content-wrapper .text-center:has(> img[src*="brp-logo-primary"]) > h2 {
    margin: 0;
    font-family: var(--brp-font-title);
    font-size: 2.125rem;
    font-weight: 700;
    font-style: italic;
    line-height: .95;
    letter-spacing: 0;
    text-transform: uppercase;
}
.brp-page-lead,
.content-wrapper .text-center:has(> img[src*="brp-logo-primary"]) > p {
    max-width: 46rem;
    margin: .75rem 0 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}
.content-wrapper .text-center:has(> img[src*="brp-logo-primary"]) > p + p {
    margin-top: .25rem;
}
/* Old hero in a .container followed by a full-width .container-fluid (report grids): widen it so the
 * title lines up with the grid below. */
.content-wrapper .container:has(> .text-center > img[src*="brp-logo-primary"]):has(+ .container-fluid) {
    max-width: none;
}

/* ---------- Sections, tiles, stats and panels (dashboard/landing.html, dashboard/dashboard.html) ---------- */
.brp-section {
    margin-bottom: 2.5rem;
}
.content-wrapper .brp-section-title {
    margin: 0 0 1rem;
    font-family: var(--brp-font-title);   /* Arial Narrow Bold: the brand's subtitle style */
    font-size: 1.3125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
}
.brp-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
    gap: 1rem;
}
.brp-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
}

/* Clickable tile: icon, title, one line of text; the whole tile is the link. */
.brp-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 1.25rem 1.25rem 1.375rem;
    background-color: var(--brp-white);
    border: 1px solid var(--brp-gray-4);
    border-radius: var(--brp-radius);
    box-shadow: var(--brp-shadow-sm);
    color: var(--brp-black);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.brp-tile:hover,
.brp-tile:focus-visible {
    border-color: var(--brp-gray-3);
    box-shadow: var(--brp-shadow-md);
    color: var(--brp-black);
    text-decoration: none;
    transform: translateY(-1px);
}
.brp-tile:focus-visible {
    outline: 2px solid var(--brp-black);
    outline-offset: 2px;
}
.brp-icon-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background-color: var(--brp-gray-4);
    color: var(--brp-black);
    font-size: 1rem;
    transition: background-color .15s;
}
.brp-tile .brp-icon-chip {
    margin-bottom: 1rem;
}
.brp-tile:hover .brp-icon-chip,
.brp-tile:focus-visible .brp-icon-chip {
    background-color: var(--brp-yellow);
}
.brp-tile-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}
.brp-tile-text {
    margin-top: .25rem;
    font-size: .875rem;
    line-height: 1.45;
}
.brp-tile-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.25rem;
    font-size: .875rem;
    opacity: .3;
    transition: opacity .15s, transform .15s;
}
.brp-tile:hover .brp-tile-arrow,
.brp-tile:focus-visible .brp-tile-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* Stat tiles: label, big number; the icon chip turns yellow when something is waiting. */
.brp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1rem;
}
.brp-stat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--brp-white);
    border: 1px solid var(--brp-gray-4);
    border-radius: var(--brp-radius);
    box-shadow: var(--brp-shadow-sm);
}
.brp-stat-label {
    font-size: .875rem;
    line-height: 1.3;
}
.brp-stat-value {
    margin-top: .625rem;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.brp-stat.is-pending .brp-icon-chip {
    background-color: var(--brp-yellow);
}

/* Panel: bordered box with a header row, for lists and tables. */
.brp-panel {
    display: flex;
    flex-direction: column;
    background-color: var(--brp-white);
    border: 1px solid var(--brp-gray-4);
    border-radius: var(--brp-radius);
    box-shadow: var(--brp-shadow-sm);
    overflow: hidden;
}
.brp-panel-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--brp-gray-4);
}
.brp-panel-head .brp-icon-chip {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    font-size: .875rem;
}
.content-wrapper .brp-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}
.brp-panel-meta {
    margin-left: auto;
    font-size: .8125rem;
    white-space: nowrap;
}
.brp-link-list {
    margin: 0;
    padding: .375rem;
    list-style: none;
}
.brp-link-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem .75rem;
    border-radius: var(--brp-radius-sm);
    color: var(--brp-black);
    font-size: .9375rem;
    line-height: 1.35;
    transition: background-color .15s;
}
.brp-link-row:hover,
.brp-link-row:focus-visible {
    background-color: var(--brp-gray-4);
    color: var(--brp-black);
    text-decoration: none;
}
.brp-link-row:focus-visible {
    outline: 2px solid var(--brp-black);
    outline-offset: -2px;
}
.brp-link-row-end {
    margin-left: auto;
    font-size: .75rem;
    opacity: .4;
    transition: opacity .15s, transform .15s;
}
.brp-link-row:hover .brp-link-row-end {
    opacity: 1;
    transform: translateX(2px);
}
.brp-link-row:hover .brp-link-row-end.fa-arrow-up-right-from-square {
    transform: translate(1px, -1px);
}

/* Data table inside a panel */
.brp-table {
    width: 100%;
    margin: 0;
    font-size: .9375rem;
}
.brp-table th,
.brp-table td {
    padding: .75rem 1.25rem;
    vertical-align: middle;
}
.content-wrapper .brp-table thead th {
    border-top: 0;
    border-bottom: 1px solid var(--brp-gray-4);
    background-color: var(--brp-white);
    color: var(--brp-black);
    font-size: .8125rem;
    font-weight: 700;
}
.brp-table tbody td {
    border-top: 1px solid var(--brp-gray-4);
}
.brp-table tbody tr:first-child td {
    border-top: 0;
}
.brp-table tbody tr:hover td {
    background-color: var(--brp-hover);
}
.brp-table .brp-table-empty {
    padding: 2rem 1.25rem;
    text-align: center;
}
.brp-table-empty i {
    display: block;
    margin-bottom: .5rem;
    font-size: 1.25rem;
    opacity: .35;
}

/* Notice: a bordered message box with a yellow icon chip (snow/eol.html). */
.brp-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 46rem;
    padding: 1.5rem;
    background-color: var(--brp-white);
    border: 1px solid var(--brp-gray-4);
    border-radius: var(--brp-radius);
    box-shadow: var(--brp-shadow-sm);
}
.brp-notice .brp-icon-chip {
    background-color: var(--brp-yellow);
}
.content-wrapper .brp-notice-title {
    margin: .5rem 0 .625rem;
    font-size: 1.125rem;
}
.brp-notice p {
    margin: 0 0 .375rem;
    line-height: 1.5;
}
.brp-notice .btn {
    margin-top: .875rem;
}

/* Forms read best at a comfortable line length, not the full container width. */
.brp-form {
    max-width: 46rem;
}

/* ---------- Bootstrap components inside portal pages ---------- */
.content-wrapper .card,
.content-wrapper .brp-card {
    border: 1px solid var(--brp-gray-4);
    border-radius: var(--brp-radius);
    box-shadow: var(--brp-shadow-sm);
}
.content-wrapper .card.border-info,
.content-wrapper .card.border-secondary,
.content-wrapper .card.border-light {
    border-color: var(--brp-gray-4) !important;   /* Bootstrap's teal/grey border utilities are off-brand */
}
.content-wrapper .card-header {
    padding: 1rem 1.25rem;
    background-color: var(--brp-white);
    border-bottom: 1px solid var(--brp-gray-4);
    font-weight: 700;
}
.content-wrapper .card-header:first-child {
    border-radius: var(--brp-radius) var(--brp-radius) 0 0;
}
.content-wrapper .card-body {
    padding: 1.25rem;
}
.content-wrapper .table {
    color: var(--brp-black);
}
.content-wrapper .table td,
.content-wrapper .table th {
    border-top-color: var(--brp-gray-4);
}
.content-wrapper .form-control,
.content-wrapper .custom-select {
    border-color: var(--brp-gray-3);
    border-radius: var(--brp-radius-sm);
}
.content-wrapper input[type="file"]::file-selector-button {
    margin-right: .75rem;
    padding: .4375rem .875rem;
    background-color: var(--brp-white);
    border: 1px solid var(--brp-gray-3);
    border-radius: var(--brp-radius-sm);
    color: var(--brp-black);
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s;
}
.content-wrapper input[type="file"]::file-selector-button:hover {
    background-color: var(--brp-gray-4);
}
.content-wrapper .btn {
    border-radius: var(--brp-radius-sm);
}
.content-wrapper .btn-primary,
.content-wrapper .btn-warning {
    font-weight: 700;
}
.content-wrapper .alert {
    border-radius: var(--brp-radius-sm);
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled,
.btn-warning {
    background-color: var(--brp-yellow);
    border-color: var(--brp-yellow);
    color: var(--brp-black);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:not(:disabled):not(.disabled):active {
    background-color: var(--brp-yellow-hover);
    border-color: var(--brp-yellow-hover);
    color: var(--brp-black);
    text-decoration: none;
}
.btn-primary:focus,
.btn-primary.focus,
.btn-warning:focus,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .35);
}
.btn-outline-primary {
    color: var(--brp-black);
    border-color: var(--brp-black);
}
.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    background-color: var(--brp-yellow);
    border-color: var(--brp-yellow);
    color: var(--brp-black);
}
.btn-dark,
.btn-secondary {
    background-color: var(--brp-black);
    border-color: var(--brp-black);
    color: var(--brp-white);
}
.btn-dark:hover,
.btn-secondary:hover {
    background-color: var(--brp-gray-1);
    border-color: var(--brp-gray-1);
    color: var(--brp-white);
}

/* ---------- Bootstrap "primary" accents ---------- */
.bg-primary,
.badge-primary,
.card-primary:not(.card-outline) > .card-header,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.dropdown-item.active,
.dropdown-item:active,
.page-item.active .page-link,
.progress-bar {
    background-color: var(--brp-yellow) !important;
    border-color: var(--brp-yellow) !important;
    color: var(--brp-black) !important;
}
.text-primary {
    color: var(--brp-black) !important;   /* yellow text on white fails contrast */
}
.border-primary,
.card-primary.card-outline {
    border-color: var(--brp-yellow) !important;
}
.card-primary.card-outline {
    border-top: 3px solid var(--brp-yellow);
}
.page-link {
    color: var(--brp-black);
}
.page-link:hover {
    color: var(--brp-black);
    background-color: var(--brp-gray-4);
}
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--brp-black);
    border-color: var(--brp-black);
}
.form-control:focus,
.custom-select:focus {
    border-color: var(--brp-black);
    box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .12);
}
.table thead th {
    color: var(--brp-black);
    border-bottom: 1px solid var(--brp-gray-3);
}

/* ---------- Footer ---------- */
.main-footer {
    padding: 1rem 2rem;
    background-color: var(--brp-gray-4);
    border-top: 1px solid var(--brp-gray-3);
    color: var(--brp-black);
    font-size: .8125rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 991.98px) {
    /* Off-canvas sidebar: give the open drawer depth over the dimmed page. */
    .sidebar-open .main-sidebar {
        box-shadow: 0 0 48px rgba(0, 0, 0, .2) !important;
    }
    .sidebar-open #sidebar-overlay {
        background-color: rgba(0, 0, 0, .25);
    }
}
@media (max-width: 767.98px) {
    .main-header.navbar {
        padding: 0 .75rem 0 .5rem;
    }
    .content-wrapper > .content {
        padding: 1.5rem .5rem 2.5rem;
    }
    .main-footer {
        padding: 1rem;
    }
    .brp-page-title,
    .content-wrapper .text-center:has(> img[src*="brp-logo-primary"]) > h2 {
        font-size: 1.75rem;
    }
}
@media (max-width: 575.98px) {
    /* Tiles become compact rows: icon on the left, title and text on the right. */
    .brp-tiles {
        gap: .75rem;
    }
    .brp-tile {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: .875rem;
        align-items: start;
        padding: 1rem 2.5rem 1rem 1rem;
    }
    .brp-tile .brp-icon-chip {
        grid-row: span 2;
        margin-bottom: 0;
    }
    .brp-tile-arrow {
        top: 50%;
        right: 1rem;
        margin-top: -.4375rem;
    }
    .brp-stats {
        gap: .75rem;
    }
    .brp-stat {
        align-items: center;
        padding: 1rem;
    }
    .brp-stat-value {
        margin-top: .375rem;
        font-size: 1.75rem;
    }
}

/* ---------- Login page (allauth pages: site_login_base.html) ----------
 * Centred white card (BRP mark + site name, "Sign in with Microsoft" button) on a white-to-Digital-Gray-4
 * background with a soft BRP Yellow glow and a faint dot grid. Same design as the admin login page
 * (login section of brand/unfold-brand.css): keep the two in sync. */
body.site-login-page {
    min-height: 100vh;
    height: auto;
    background-color: var(--brp-white);
    background-image:
        radial-gradient(40rem 28rem at 50% 45%, rgba(255, 210, 0, .22), rgba(255, 210, 0, 0) 70%),
        linear-gradient(180deg, var(--brp-white) 0%, var(--brp-white) 50%, var(--brp-gray-4) 100%);
    background-attachment: fixed;
}
body.site-login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(var(--brp-gray-3) 1px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0%, transparent 100%);
}
.site-login-page .brp-login {
    position: relative;
    width: 100%;
    max-width: 28rem;   /* 26rem card, same as the admin login */
    padding: 4.5rem 1rem;
}
.site-login-page .brp-login-card {
    padding: 2.75rem 2.5rem 2.5rem;
    background: var(--brp-white);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .04), 0 24px 56px -12px rgba(0, 0, 0, .16);
}
.site-login-page .brp-login-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .875rem;
    margin-bottom: 2.25rem;
    text-align: center;
}
.site-login-page .brp-login-mark {
    height: 56px;   /* brand book minimum for the digital logo: 50px */
    width: auto;
}
/* Heavy italic, like the brand title face (Trade Gothic Next Condensed Heavy Italic, not servable) */
.site-login-page .brp-login-title {
    margin: 0;
    font-family: "Arial Black", "Arial Bold", Arial, sans-serif;
    font-size: 2.125rem;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    letter-spacing: -.02em;
    text-transform: none;
    white-space: nowrap;
}
/* "Sign in with Microsoft": light theme of Microsoft's sign-in button branding guidelines
 * (white, #8C8C8C border, #5E5E5E Segoe UI text, logo left of the text), stretched to the card width. */
.site-login-page .brp-ms-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 3rem;
    padding: 0 12px;
    background: #FFFFFF;
    border: 1px solid #8C8C8C;
    border-radius: 10px;
    color: #5E5E5E;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.site-login-page .brp-ms-button:hover {
    background-color: rgba(0, 0, 0, .035);
    border-color: #5E5E5E;
}
.site-login-page .brp-ms-button:focus-visible {
    outline: 2px solid var(--brp-black);
    outline-offset: 2px;
}
.site-login-page .brp-ms-logo {
    flex: none;
}
@media (max-width: 480px) {
    .site-login-page .brp-login-card {
        padding: 2.25rem 1.5rem 1.75rem;
    }
}

/* Sidebar toggle: same icon as the admin's (Material Symbols "dock_to_right", Unfold's icon font) */
.brp-toggle-icon.material-symbols-outlined {
    display: inline-block;
    font-family: "Material Symbols Outlined";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}
