/* =====================================================================
   Brycer Brand Navigation — Bootstrap 5 companion styles
   Drop into wwwroot/css/ and link in index.html after bootstrap.min.css
   ===================================================================== */

/* ── Header wrapper + flame badge ────────────────────────────────────
   Wraps the utility strip and main nav bar so a single circular flame
   badge can be absolutely positioned to straddle the boundary between
   them, left-justified. */
.brycer-nav-header {
    position: relative;
}

.brycer-flame-badge {
    position: absolute;
    left: 10px;
    top: 8px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #203457;
    border: 1px solid #101F33;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.brycer-flame-badge:hover {
    box-shadow: 0px 0px 15px rgba(255,156,48,1.35);
}

.brycer-flame-badge img {
    width: 60px;
    height: 60px;
}

/* Room for the flame badge on the left of both bars' content. */
.brycer-main-nav-inner {
    padding-left: 128px !important;
}

/* ── Utility Strip ───────────────────────────────────────────────── */
.brycer-utility-strip {
    background: #101f33;
    height: 34px;
    display: flex;
    align-items: center;
}

/* Left-packed layout: logged-in-as + version banner, then search right next
   to it, then support info pushed to the far right (via ms-auto in markup). */
.brycer-utility-strip.brycer-utility-strip-grid {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 4px 0 84px;
}

.brycer-utility-label {
    color: rgba(255,255,255,.55);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.brycer-entity-icon {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: rgba(240,144,44,.18);
    border: 1px solid rgba(240,144,44,.5);
    color: #f0902c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Logged-in entity name — plain text, not a dropdown trigger */
.brycer-entity-name {
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* Version refresh badge */
.brycer-refresh-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 22px;
    padding: 0 10px;
    border-radius: 20px;
    background: #f0902c;
    border: none;
    color: #1a1408;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    animation: vpulse 2s ease-in-out infinite;
    text-decoration: none;
}

.brycer-refresh-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1a1408;
    flex-shrink: 0;
}

.brycer-divider {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,.16);
    flex-shrink: 0;
}

.brycer-utility-link {
    color: rgba(255,255,255,.85);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.brycer-utility-link:hover { color: #fff; }

.brycer-phone-link {
    color: #ffd9a3;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.brycer-phone-link:hover { color: #ffe9c4; }

.brycer-help-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    flex-shrink: 0;
}
.brycer-help-btn:hover { background: rgba(255,255,255,.16); color: #fff; }

/* User avatar */
/* Icon buttons */
.brycer-icon-btn {
    width:30px; 
    height:30px;
    border-radius:6px; 
    border:none; 
    background:transparent;
    color:rgba(255,255,255,.75);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer; 
    text-decoration:none; 
    transition:background .12s,color .12s;
    padding:0;
}

.brycer-icon-btn:hover {
    background:rgba(255,255,255,.12);
    color:#fff;
}

.brycer-icon-btn-active {
    background: rgba(255,255,255,.18);
    color: #fff;
}

/* User dropdown trigger */
.brycer-user-toggle.btn-link {
    color: #fff;
    box-shadow: none;
    text-decoration: none;
}
.brycer-user-toggle.btn-link:hover { opacity: .85; }

/* ── Main Nav Bar ─────────────────────────────────────────────────── */
.brycer-main-nav {
    background: linear-gradient(180deg, #21365b, #172a42);
    height: 54px;
    padding: 0 !important;
    padding-left: 84px !important;
}

.brycer-nav-link {
    color: rgba(255,255,255,.82) !important;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    padding: 0 0 2px 0;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.brycer-nav-link:hover { 
    color: #fff !important;
    /*border-bottom: 1px solid #f0902c;*/
}
.brycer-nav-link.active {
    color: #fff !important;
    font-weight: 700;
    border-bottom-color: #f0902c;
}

/* ── Main nav mobile collapse (hamburger) ─────────────────────────────
   navbar-expand-lg (added in markup alongside navbar-dark) is what actually
   drives the show/hide breakpoint and the collapse plugin — that's stock
   Bootstrap, already bundled (bootstrap.bundle.min.js), so no custom JS is
   needed here. This is just: style the toggler to match the dark navy bar,
   and make the collapsed panel's contents stack legibly instead of staying
   in the desktop flex-row layout the inline utility classes (d-flex
   flex-row) hardcode — those utility classes don't get any less "flex-row"
   just because the panel around them collapsed. */
.brycer-navbar-toggler {
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 6px;
    padding: 4px 8px;
    line-height: 1;
}
.brycer-navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(240,144,44,.5);
}

@media (max-width: 991.98px) {
    /* Reclaim the desktop-only space reserved for the flame badge — it
       shrinks below, so less padding is needed before the toggler/links. */
    .brycer-main-nav {
        padding-left: 42px !important;
    }
    .brycer-main-nav-inner {
        padding-left: 64px !important;
    }
    .brycer-utility-strip.brycer-utility-strip-grid {
        padding-left: 64px;
    }
    .brycer-flame-badge {
        width: 44px;
        height: 44px;
        left: 6px;
        top: 6px;
    }
    .brycer-flame-badge img {
        width: 36px;
        height: 36px;
    }

    /* Bootstrap's default .navbar-dark toggler icon is a subtle ~55%-opacity
       white SVG, sized for a slim desktop bar — bump contrast and size.
       margin-left:auto pushes the toggler (and the entity-info block right
       after it, in normal flow) all the way to the right edge of the bar —
       when the collapse panel is closed, those two are the only visible
       children left of it, so without this they'd sit stranded right after
       the flame-badge gutter instead of at the right side of the bar. */
    .brycer-navbar-toggler {
        margin-left: auto;
        padding: 6px 10px;
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.55);
    }
    .brycer-navbar-toggler .navbar-toggler-icon {
        width: 1.75em;
        height: 1.75em;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* "Current entity" — the utility strip's full "Logged in as X / Account
       Number: Y" is hidden on mobile (below); this is a compact replacement,
       left-aligned right after the flame-badge gutter (first child in the
       bar, so no extra left margin needed), always visible (not tucked
       inside the collapsible panel). The toggler comes after it in markup
       and gets pushed to the far right via margin-left:auto. */
    .brycer-entity-name-mobile {
        overflow: hidden;
        line-height: 1.25;
        max-width: calc(100vw - 180px);
    }
    .brycer-entity-name-mobile .brycer-entity-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }

    /* The collapsed panel drops down below the bar instead of sitting inline
       next to the toggler — it now overlays page content, so it needs its
       own background/shadow/scroll rather than the transparent, inline
       styling it has at desktop widths. */
    .brycer-main-nav-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1c2e4a;
        box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.3);
        padding: 8px 16px 16px;
        z-index: 1000;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }
    .brycer-main-nav-collapse .navbar-nav {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        width: 100%;
        margin: 0 !important;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
    .brycer-main-nav-collapse .nav-item {
        width: 100%;
    }
    .brycer-main-nav-collapse .brycer-nav-link {
        display: block;
        padding: 10px 4px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }
    /* No trailing divider under the last link — nothing follows it inside
       this stack, so the border just dead-ends against the section below. */
    .brycer-main-nav-collapse .nav-item:last-child .brycer-nav-link {
        border-bottom: none;
    }
    /* Icon-only action buttons read fine wrapped in a row — unlike the text
       links above, they don't need a full-width column stack. Sized up from
       the desktop 30px — a mouse-precision target is too small to comfortably
       tap on a phone. */
    .brycer-main-nav-collapse .brycer-main-nav-actions {
        flex-wrap: wrap;
        justify-content: flex-start !important;
        padding-top: 10px;
        gap: 10px !important;
    }
    .brycer-main-nav-collapse .brycer-main-nav-actions .brycer-icon-btn {
        width: 42px;
        height: 42px;
    }
    .brycer-main-nav-collapse .brycer-main-nav-actions .brycer-icon-btn .fa-1_5x,
    .brycer-main-nav-collapse .brycer-main-nav-actions .brycer-icon-btn .fa-1x {
        font-size: 1.75rem;
    }
    .brycer-main-nav-collapse .brycer-divider {
        display: none;
    }
    /* Duplicate of the utility-strip's "New Version Available" badge (that
       one is hidden on mobile) — rendered here instead, on its own full-width
       row below the action icons rather than competing for space in the wrap. */
    .brycer-refresh-badge-mobile {
        flex: 1 0 100%;
        justify-content: center;
        margin-top: 4px;
    }

    /* ── Utility strip (logged-in-as / search / support) ──────────────
       Three sections plus a wide flame-badge gutter don't fit a phone
       width — drop the least essential info (org name, account number)
       and shrink the search bar; keep support visible since it's the one
       thing worth reaching in a pinch. */
    /* !important alone wasn't enough — the div also carries Bootstrap's
       d-flex utility class (display:flex !important), same specificity as a
       bare .brycer-utility-loggedin, so the two !important declarations tie
       and whichever wins the source-order tiebreak is fragile to reason
       about. Qualify with the ancestor to unambiguously outrank it instead. */
    .brycer-utility-strip .brycer-utility-loggedin {
        display: none !important;
    }
    .brycer-search-bar-slim {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }
}

.brycer-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 32%;
    min-width: 160px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    padding: 0 13px;
    flex-shrink: 0;
}

/* Smaller variant used in the slim utility strip (center column). Sits flush
   with the navy strip at rest (larger icon, muted gray text/placeholder) and
   turns white once focused, so it doesn't compete for attention until used. */
.brycer-search-bar-slim {
    width: 25vw;
    min-width: 25vw;
    max-width: 100%;
    height: 26px;
    border-radius: 6px;
    padding: 0 10px;
    background: #16283f !important;
    transition: background .15s;
}
.brycer-search-bar-slim .brycer-search-icon {
    font-size: 25px;
    color: #aab4c2 !important;
    transition: color .15s;
    margin-top: -5px;
}
.brycer-search-bar-slim .brycer-search-input,
.brycer-search-bar-slim .tt-input,
.brycer-search-bar-slim .tt-hint {
    font-size: 12px;
    color: #aab4c2 !important;
    transition: color .15s;
}
.brycer-search-bar-slim .brycer-search-input::placeholder {
    color: #7c8898 !important;
}
.brycer-search-bar-slim:focus-within {
    background: #fff !important;
    /* The background swap alone is too low-salience to read as "focused" — add a
       visible ring since the input itself has outline:none (see .brycer-search-input). */
    box-shadow: 0 0 0 2px rgba(232,133,61,.55);
}
.brycer-search-bar-slim:focus-within .brycer-search-icon {
    color: #9aa3af !important;
}
.brycer-search-bar-slim:focus-within .brycer-search-input,
.brycer-search-bar-slim:focus-within .tt-input,
.brycer-search-bar-slim:focus-within .tt-hint {
    color: #374151 !important;
}
.brycer-search-bar-slim:focus-within .brycer-search-input::placeholder {
    color: #9aa3af !important;
}

.brycer-search-icon {
    color: #9aa3af;
    font-size: 18px;
    flex-shrink: 0;
}

.brycer-search-input {
    border: none;
    outline: none;
    background: transparent;
    color: #374151;
    font-size: 14px;
    width: 100%;
}
.brycer-search-input::placeholder { color: #9aa3af; }

/* The multisearch input is enhanced by typeahead.js at runtime, which wraps it
   in a .twitter-typeahead div and adds a .tt-hint ghost input; typeahead.css
   gives those a border/box-shadow of their own, so they must be neutralized
   here to keep the appearance of a single input inside the search bar. */
.brycer-search-bar .twitter-typeahead {
    display: flex !important;
    align-items: center;
    width: 100%;
    flex: 1 1 auto;
}

.brycer-search-bar .tt-input,
.brycer-search-bar .tt-hint {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    background: transparent;
    color: #374151;
    font-size: 14px;
    line-height: normal;
    width: 100% !important;
    padding: 0 !important;
}
.brycer-search-bar .tt-hint { color: #9aa3af; }

.brycer-search-bar .tt-menu { margin-top: 8px; }

/* ── Page Header ──────────────────────────────────────────────────── */
/* All page-header actions share one look: a plain white icon button, fixed
   size (no layout shift on hover), with the title shown as a floating
   tooltip below the button instead of some being orange CTAs and others
   icon-only. */
.brycer-header-icon-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #9EA4AA;
    background: transparent;
    color: #f0f0f0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    padding: 18px;
    margin-left: 1px;
    transition: background .15s, box-shadow .15s;
}

.brycer-header-icon-btn i.fa-2xl {
    font-size: 1.5rem;
}

.brycer-header-icon-btn i,
.brycer-header-icon-btn span {
    color: inherit !important;
}

.brycer-header-icon-btn i.text-danger,
.brycer-header-icon-btn span.text-danger {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
}

.brycer-header-icon-btn:hover {
    background: rgba(255,255,255,.18);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    color: #f0f0f0 !important;
    text-decoration: none;
}

/* Floating tooltip (from the title attribute) — purely visual, doesn't
   affect the button's own size/layout. Right-aligned (not centered) to the
   button's own right edge, since #page-actions always sits at the far right
   of the header — centering would push the tooltip's left half past the
   viewport edge and get clipped for buttons close to it. */
.brycer-header-icon-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 90%;
    right: 0;
    margin-bottom: 6px;
    background: #ffd9a3;
    color: #000;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 20;
}
.brycer-header-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.brycer-footer {
    background: #101f33;
    padding: 22px 26px 18px;
}

.brycer-footer-link {
    color: rgba(255,255,255,.82);
    font-size: 12.5px;
    font-family: var(--app-font-family) !important;
    font-weight: 600;
    text-decoration: none;
}
.brycer-footer-link:hover { color: #fff; }

.brycer-footer-copyright {
    color: rgba(255,255,255,.55);
    font-size: 12px;
    font-weight: 500;
}

.brycer-footer-version {
    /* .45 measured ~4.4:1 on the #101f33 footer bg, just under the 4.5:1 minimum for
       text this size (WAVE flagged it) — bumped to .6 for a solid margin (~6.6:1). */
    color: rgba(255,255,255,.6);
    font-size: 11.5px;
    font-weight: 600;
    font-family: ui-monospace, Menlo, monospace;
}

.fa-1_25x {
    font-size: 1.25rem;
}

.fa-1_5x {
    font-size: 1.5rem;
}

/* ── Keyframes ────────────────────────────────────────────────────── */
@keyframes vpulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240,144,44,.55); }
    50%       { box-shadow: 0 0 0 6px rgba(240,144,44,0); }
}

@keyframes brycerFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Main content area ───────────────────────────────────────────────
   Square corners (no card-like boxing) and it grows to fill all the way
   down to the footer regardless of how much content a page has, instead
   of leaving white space between short pages and the footer. */
html.brycer-new-ui .brycer-main-content {
    background: #edf0f5;
    border-radius: 0;
    flex: 1 0 auto;
}

/* ── Home Dashboard (content redesign) ───────────────────────────────
   Action tiles use the v1 icon-grid layout; the messages panel, chart
   cards, and overall page chrome match the shared layout from the
   design handoff (identical between v1/v2 per its README).
   Scoped entirely under .brycer-home-page (applied to Index.razor's
   root container) so none of these rules leak onto other pages that
   reuse the same shared card components (TceCard/CustomTceCard/
   FlipCardHeader). Existing icons, chart data, and the Esri map widget
   are untouched — this only re-skins chrome/spacing/typography.
   Background/border-radius live on .brycer-main-content (<main>) now,
   not here, so the page background fills all the way to the footer. */

/* Everything in this section is the New UI's Home page reskin. Index.razor
   renders one shared markup for both styles (unlike the FilterTable pages,
   there's no old/new @if split here), so without html.brycer-new-ui scoping
   every one of these rules — icon sizing, tile hover effects, card chrome,
   the count-chip badge — applies unconditionally and Old UI silently inherits
   the New UI redesign. */
html.brycer-new-ui .brycer-home-page {
    padding: 20px;
}

html.brycer-new-ui .brycer-home-page .card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05) !important;
    overflow: hidden !important;
    animation: brycerFadeUp .35s ease both;
}

html.brycer-new-ui .brycer-home-page .card-header {
    padding: 14px 18px 13px;
    border-bottom: 1px solid #f0f3f8;
    display: flex;
    align-items: center;
    gap: 4px !important;
    background-color: #f4f6fa !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

html.brycer-new-ui .brycer-home-page .card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a2d4a;
    text-align: left !important;
    margin: 0 auto 0 0 !important;
}

/* Messages panel (and any other Home page card panel) — title, body content
   (message subject/date rows, "No Messages" text) and footer link all need
   forcing explicitly; plain inheritance from body isn't reaching them. The
   wildcard excludes icon-glyph elements (FontAwesome's "fa-" and "fa" classes,
   the loading spinner, Syncfusion's "e-icon" and "e-spin") — those rely on OWN
   icon-font font-family (also !important), and our universal selector's
   higher specificity (.card-body * beats a bare .fa-solid) was winning that
   fight and rendering their glyphs as boxes/wrong characters instead of
   icons. */
html.brycer-new-ui .brycer-home-page .card-title,
html.brycer-new-ui .brycer-home-page .card-body,
html.brycer-new-ui .brycer-home-page .card-body *:not([class*="fa-"]):not(.fa):not([class*="e-icon"]):not([class*="e-spin"]),
html.brycer-new-ui .brycer-home-page .card-footer,
html.brycer-new-ui .brycer-home-page .card-footer *:not([class*="fa-"]):not(.fa):not([class*="e-icon"]):not([class*="e-spin"]) {
    font-family: var(--app-font-family) !important;
}

/* Same boxed-icon-button look as the New UI table toolbar's
   .brycer-table-gear-btn, applied directly to the <i> itself since
   TceCard/FlipCardHeader render these as bare icons with no wrapping
   button element to attach the box to. */
html.brycer-new-ui .brycer-home-page .card-header i,
html.brycer-new-ui .brycer-home-page .card-header .fas,
html.brycer-new-ui .brycer-home-page .card-header .fa-solid {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #f4f6fa;
    border: 1.5px solid #e4eaf3;
    color: #6a7f96;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
/* TceCard/FlipCardHeader apply their own m-2 spacing between these icons —
   redundant now that .card-header itself has a gap, and it was making the
   icon group sit further apart than the 4px gap intends. */
html.brycer-new-ui .brycer-home-page .card-header .m-2 {
    margin: 0 !important;
}
html.brycer-new-ui .brycer-home-page .card-header i:hover,
html.brycer-new-ui .brycer-home-page .card-header .fas:hover,
html.brycer-new-ui .brycer-home-page .card-header .fa-solid:hover {
    background: #eef1f8;
    border-color: #c4cdd8;
    color: #e8853d;
}

/* TceCard/FlipCardHeader render the refresh icon in a "left" group before the
   title; push it to the end of the flex row instead so it lands with the
   other icons on the right (title keeps its left position via the
   margin-right:auto above, so this doesn't reopen the space-between gap). */
html.brycer-new-ui .brycer-home-page .card-header > .text-left {
    order: 10;
}

/* Actions + Messages row — 3fr/2fr on large screens, stacked below.
   Uses the *exact* same -8px row margin / 8px column padding gutter as the
   charts row below (unconditionally, not just at the >=992px breakpoint),
   so both rows' cards land on identical left/right edges at every width.
   !important on display/grid-template-columns guards against Bootstrap's
   .row{display:flex} winning a same-specificity tie and leaving both panels
   shrink-wrapped to their content instead of splitting the full row width. */
html.brycer-new-ui .brycer-home-row-actions {
    margin-left: -8px;
    margin-right: -8px;
}
html.brycer-new-ui .brycer-home-row-actions > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}
/* Neutralize TceCard's own nested Bootstrap column (col-lg-12/mt-2) at every
   width so its card sits flush with the outer column instead of getting an
   extra inset the charts row's cards don't have. */
html.brycer-new-ui .brycer-home-row-actions > [class*="col-"] > [class*="col-"] {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}
@media (min-width: 992px) {
    html.brycer-new-ui .brycer-home-row-actions {
        display: grid !important;
        grid-template-columns: 3fr 2fr !important;
    }
    html.brycer-new-ui .brycer-home-row-actions > [class*="col-"] {
        flex: none;
        width: 100%;
        max-width: none;
        min-width: 0;
    }
}

/* Charts row gutter — tighten Bootstrap's default gutter to match the 16px spec */
html.brycer-new-ui .brycer-home-charts-row {
    margin-left: -8px;
    margin-right: -8px;
}
html.brycer-new-ui .brycer-home-charts-row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* Action Tiles — v1 icon grid (4-column, large illustrated tiles) */
html.brycer-new-ui .brycer-home-tiles .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    margin: 0;
}
html.brycer-new-ui .brycer-home-tiles .row > [class*="col-"] {
    padding: 0;
    max-width: none;
    width: auto;
}
html.brycer-new-ui .brycer-home-tiles .row > [class*="col-"] > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    height: 100%;
    padding: 22px 10px 16px;
    border: 1.5px solid #eef1f7;
    border-radius: 10px;
    background: #fafbfd;
    text-decoration: none;
    transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}
html.brycer-new-ui .brycer-home-tiles .row > [class*="col-"] > a:hover {
    border-color: #e8853d;
    background: #fff9f5;
    box-shadow: 0 4px 14px rgba(232,133,61,.14);
    transform: translateY(-2px);
}
html.brycer-new-ui .brycer-home-tiles .icon-container {
    position: static !important;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}
html.brycer-new-ui .brycer-home-tiles .icon-container img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}
html.brycer-new-ui .brycer-home-tiles .row > [class*="col-"] > a > img.img-fluid {
    width: 68px;
    height: 68px;
    object-fit: contain;
}
/* Since .icon-container is no longer a positioning context (above), this badge
   now positions relative to the tile <a> itself (which has position:relative),
   landing it in the top-right corner of the whole clickable tile. */
html.brycer-new-ui .brycer-home-tiles .icon-container .position-absolute {
    top: -9px !important;
    right: 9px !important;
    left: auto !important;
    padding: 0 !important;
}
html.brycer-new-ui .brycer-home-tiles .icon-container .position-absolute p {
    background: #fdebdc !important;
    /* Keep in sync with .tce-orange-count-chip (app.css) — this selector's
       higher specificity wins over that class, so the color has to live
       here too, not just there. #96501c: ~5.2:1 on this bg vs #b8621f's 3.76:1. */
    color: #96501c !important;
    font-weight: 700 !important;
    min-width: 30px;
    height: 30px;
    border-radius: 11px !important;
    border: 1.5px solid #e8853d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px !important;
    margin: 0;
    line-height: 1;
}
html.brycer-new-ui .brycer-home-tiles .figure-caption {
    font-size: 11.5px;
    font-family: var(--app-font-family) !important;
    font-weight: 600;
    color: #1a2d4a;
    margin: 11px 0 0;
    text-align: center;
    line-height: 1.35;
}

/* Messages panel — restyle rows without touching message data/routing */
html.brycer-new-ui .brycer-home-page .list-group-item {
    padding: 13px 10px;
    border: none;
    border-bottom: 1px solid #f5f7fb;
    border-radius: 8px;
    transition: background .15s;
}
html.brycer-new-ui .brycer-home-page .list-group-item:hover {
    background: #fafbfd;
}
html.brycer-new-ui .brycer-home-page .list-group-item:last-child {
    border-bottom: none;
}
/* Plain colored icons (no wrapping circle) — the severity color (tce-red/
   orange/blue) already applied in the markup shows directly on the glyph. */
html.brycer-new-ui .brycer-home-page .list-group-item .fa-circle-exclamation,
html.brycer-new-ui .brycer-home-page .list-group-item .fa-triangle-exclamation,
html.brycer-new-ui .brycer-home-page .list-group-item .fa-circle-info,
html.brycer-new-ui .brycer-home-page .list-group-item .fa-envelope {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}





/*
    Main Content Styling
 */

html.brycer-new-ui .card {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .05) !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

html.brycer-new-ui .card-header {
    padding: 11px 18px !important;
    border-bottom: 1px solid #f0f3f8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    background-color: #f4f6fa !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

html.brycer-new-ui .card-header h5 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a2d4a !important;
    margin-bottom: 0 !important;
    text-transform: uppercase !important;
}


/* ── Links in TCE blue ───────────────────────────────────────────────
   app.css sets `a, .btn-link { color: #03233d }`, but the calendar code
   (PremisesCalendarBuilder.js) imports a second copy of Bootstrap that
   webpack injects after app.css, and its `a` rule wins with
   --bs-link-color (#0d6efd). Redefine the link variables here:
   html.brycer-new-ui out-ranks Bootstrap's :root whatever the load
   order. Scoped to the new shell so the legacy UI is unchanged. */
html.brycer-new-ui {
    --bs-link-color: #03233d;
    --bs-link-color-rgb: 3, 35, 61;
    --bs-link-hover-color: #021729;
    --bs-link-hover-color-rgb: 2, 23, 41;
}

html.brycer-new-ui .btn-link {
    --bs-btn-focus-shadow-rgb: 3, 35, 61;
}

/* Syncfusion's bootstrap5 theme hard-codes #0d6efd on grid pagers, so the
   link variables above can't reach them. Disabled arrows keep their grey. */
html.brycer-new-ui .e-pager .e-spacing,
html.brycer-new-ui .e-pager .e-numericitem,
html.brycer-new-ui .e-pager .e-numericitem:hover,
html.brycer-new-ui .e-pager div.e-icons.e-pager-default,
html.brycer-new-ui .e-pager div.e-icons.e-pager-default:hover {
    color: #03233d;
}

html.brycer-new-ui .e-pager .e-currentitem,
html.brycer-new-ui .e-pager .e-currentitem:hover {
    background: #03233d;
    border-color: #03233d;
    color: #fff;
}
