/* /Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-3scb89lcyt] { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

main[b-3scb89lcyt] { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper); }

/* ---- Sidebar: midnight, with the line-of-business "spine" on its edge ---- */
.sidebar[b-3scb89lcyt] {
    position: relative; display: flex; flex-direction: column;
    background:
        radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 55%),
        linear-gradient(180deg, var(--midnight-2) 0%, var(--midnight) 42%, #0a111d 100%);
}
.sidebar[b-3scb89lcyt]::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2px; pointer-events: none;
    background: linear-gradient(180deg, var(--accent-bright) 0%, color-mix(in srgb, var(--accent) 35%, transparent) 30%, transparent 85%);
    opacity: .9; transition: background .35s ease;
}

/* ---- Top bar ---- */
.top-row[b-3scb89lcyt] {
    /* The bar has an ORDER of its own, at every width. `backdrop-filter` below makes it a stacking context, so the
       menus that open from it (notifications, account) are only ever as high as the bar is — whatever z-index they
       declare. With none, every positioned thing in the page painted over them: on a phone, where the bar was not
       sticky and so had no z-index at all, tabs, inputs and buttons sat on top of the open menu on most pages
       (owner screenshots 2026-10-05). 40 = above the page's own layers (≤ 5), below the nav drawer (55/60), the
       full-screen grid and drill drawer (1000) and Kendo popups and windows (10000+). */
    position: relative; z-index: 40;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: inset 0 2px 0 var(--accent);   /* the line-of-business signal, follows the switch */
    transition: box-shadow .35s ease;
    height: 3.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.top-bar__left[b-3scb89lcyt] { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.top-bar__right[b-3scb89lcyt] { display: flex; align-items: center; gap: .8rem; min-width: 0; }

/* hamburger — mobile only */
.nav-toggle[b-3scb89lcyt] {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none;
    border: 1px solid var(--border); border-radius: 9px;
    background: var(--surface); color: var(--ink); cursor: pointer; transition: background .15s;
}
.nav-toggle:hover[b-3scb89lcyt] { background: var(--surface-2); }
.brand-mini[b-3scb89lcyt] { display: inline-flex; align-items: center; }
.brand-mini[b-3scb89lcyt]  img { height: 24px; width: auto; max-width: 120px; object-fit: contain; display: block; }

/* sidebar collapse toggle — desktop only (mobile uses the hamburger drawer) */
.nav-collapse[b-3scb89lcyt] {
    display: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: none;
    border: 1px solid var(--border); border-radius: 9px;
    background: var(--surface); color: var(--ink); cursor: pointer; transition: background .15s;
}
.nav-collapse:hover[b-3scb89lcyt] { background: var(--surface-2); }

/* tenant pill */
.tenant[b-3scb89lcyt] {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--border); background: var(--surface-2);
    border-radius: 999px; padding: .3rem .55rem .3rem .7rem; font-size: .78rem;
}
.tenant__dot[b-3scb89lcyt] { width: 7px; height: 7px; border-radius: 50%; flex: none;
    background: #22a06b; box-shadow: 0 0 0 3px rgba(34, 160, 107, .16); }
.tenant__name[b-3scb89lcyt] { color: var(--text); font-weight: 600;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant__code[b-3scb89lcyt] { font: 700 .64rem/1 var(--font-mono); letter-spacing: .06em;
    background: var(--midnight); color: #fff; padding: .24rem .44rem; border-radius: 6px; }
.tenant__line[b-3scb89lcyt] { font: 700 .66rem/1 var(--font-sans); letter-spacing: .02em;
    background: var(--accent); color: var(--accent-ink); padding: .24rem .5rem; border-radius: 6px;
    transition: background-color .3s ease, color .3s ease; }

/* breadcrumb — where this screen lives */
.crumb[b-3scb89lcyt] { display: flex; align-items: baseline; gap: .45rem; min-width: 0; font-size: .86rem; }
.crumb__group[b-3scb89lcyt] { color: var(--muted); white-space: nowrap; }
.crumb__sep[b-3scb89lcyt] { color: var(--faint); }
.crumb__page[b-3scb89lcyt] { color: var(--text); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-backdrop[b-3scb89lcyt] { display: none; }

article.content[b-3scb89lcyt] { padding-top: 1.6rem; padding-bottom: 3rem; }

/* ===== tablet (641–1023): the rail stays open, so the bar has about 500px — keep what identifies, drop what repeats.
   Measured 2026-10-05: at 820px (an iPad upright) the company name and the user's full name pushed the user menu
   past the edge and EVERY page scrolled sideways (875–947px wide). The matching .userchip__name rule is in app.css
   for the reason given below. ===== */
@media (min-width: 641px) and (max-width: 1023.98px) {
    .tenant__name[b-3scb89lcyt], .crumb__group[b-3scb89lcyt], .crumb__sep[b-3scb89lcyt] { display: none; }
}

/* ===== mobile (<641): off-canvas sidebar drawer, single top bar ===== */
@media (max-width: 640.98px) {
    .sidebar[b-3scb89lcyt] {
        position: fixed; top: 0; left: 0; bottom: 0; width: 270px; max-width: 84vw; z-index: 60;
        transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto;
    }
    .page.nav-open .sidebar[b-3scb89lcyt] { transform: translateX(0); box-shadow: 0 0 44px rgba(0, 0, 0, .4); }
    .page.nav-open .nav-backdrop[b-3scb89lcyt] { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(8, 20, 24, .45); }
    /* Only .tenant__name belongs here — it is MainLayout's own element. The matching rule for
       .userchip__name lives in app.css, because that span belongs to UserMenu: a scoped stylesheet only
       stamps its scope attribute on ITS OWN component's markup, so a selector aimed across the boundary
       matches nothing and fails silently. That is what left the full name on screen at phone width,
       pushing the top bar out (fixed 2026-07-31). */
    .tenant__name[b-3scb89lcyt], .crumb__group[b-3scb89lcyt], .crumb__sep[b-3scb89lcyt] { display: none; }   /* keep the bar compact */
    /* Phone width budget (responsive audit 2026-10-03): the bar measured 437px on a 390px phone and widened
       every page. The line badge is the one tenant signal that changes meaning, so it stays; the company
       code and status dot go (the logo already says which company). */
    .tenant__dot[b-3scb89lcyt], .tenant__code[b-3scb89lcyt] { display: none; }
    .tenant[b-3scb89lcyt] { padding: 0; border: 0; background: none; }
    .top-row[b-3scb89lcyt] { gap: .5rem; padding-left: .75rem !important; padding-right: .75rem !important; }
    .top-bar__left[b-3scb89lcyt] { gap: .45rem; }
    .top-bar__right[b-3scb89lcyt] { gap: .4rem; }
    .crumb__page[b-3scb89lcyt] { max-width: 30vw; }
}

/* ===== desktop (>=641): fixed left sidebar ===== */
@media (min-width: 641px) {
    .page[b-3scb89lcyt] { flex-direction: row; }
    .sidebar[b-3scb89lcyt] { width: 268px; height: 100vh; position: sticky; top: 0; transition: width .22s ease; overflow-x: hidden; }
    .page.nav-collapsed .sidebar[b-3scb89lcyt] { width: 0; min-width: 0; border-right: none; }
    .top-row[b-3scb89lcyt] { position: sticky; top: 0; }   /* its z-index is the base rule's — see there */
    .top-row[b-3scb89lcyt], article[b-3scb89lcyt] { padding-left: 2rem !important; padding-right: 2rem !important; }
    .nav-toggle[b-3scb89lcyt], .brand-mini[b-3scb89lcyt] { display: none; }
    .nav-collapse[b-3scb89lcyt] { display: inline-flex; }
}

#blazor-error-ui[b-3scb89lcyt] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0; left: 0; width: 100%;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    display: none;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    z-index: 1000;
}
#blazor-error-ui .dismiss[b-3scb89lcyt] { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* ---- Brand ---- */
.brand[b-zcwveu6uv9] {
    display: flex; align-items: center; gap: .6rem;
    height: 3.75rem; padding: 0 1.25rem;
}
.brand[b-zcwveu6uv9]  .brand__logo { height: 26px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.brand__erp[b-zcwveu6uv9] {
    color: var(--accent-bright); font: 700 .7rem/1 var(--font-sans); letter-spacing: .12em;
    padding: .28rem .45rem; border: 1px solid color-mix(in srgb, var(--accent-bright) 45%, transparent); border-radius: 6px;
    transition: color .3s ease, border-color .3s ease;
}

/* ---- Line of business switch (DBP) — the pill slides, the chrome's accent follows ---- */
.line-switch[b-zcwveu6uv9] {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    margin: .1rem 1rem .85rem; padding: 4px; border-radius: 12px;
    background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.line-switch__pill[b-zcwveu6uv9] {
    position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px;
    background: var(--accent); box-shadow: 0 6px 18px -6px var(--accent-glow);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), background-color .3s ease;
}
.line-switch[data-active="L"] .line-switch__pill[b-zcwveu6uv9] { transform: translateX(100%); }
.line-switch button[b-zcwveu6uv9] {
    position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
    padding: .5rem .4rem; border-radius: 9px;
    font: 600 .78rem/1 var(--font-sans); color: rgba(255, 255, 255, .62);
    transition: color .25s ease;
}
.line-switch button:hover[b-zcwveu6uv9] { color: #fff; }
.line-switch button.on[b-zcwveu6uv9] { color: var(--accent-ink); }
.line-switch button:focus-visible[b-zcwveu6uv9] { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* ---- Find a screen ---- */
.nav-find[b-zcwveu6uv9] {
    display: flex; align-items: center; gap: .5rem;
    margin: 0 1rem .6rem; padding: 0 .7rem; height: 2.3rem; border-radius: 10px;
    background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .5); transition: box-shadow .2s ease, background .2s ease;
}
.nav-find:focus-within[b-zcwveu6uv9] { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--accent); color: #fff; }
.nav-find .ic[b-zcwveu6uv9] { width: 16px; height: 16px; flex: none; }
.nav-find input[b-zcwveu6uv9] {
    flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff;
    font: 500 .82rem/1 var(--font-sans);
}
.nav-find input[b-zcwveu6uv9]::placeholder { color: rgba(255, 255, 255, .42); }
.nav-find input[b-zcwveu6uv9]::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }

/* ---- Scroll area ---- */
.nav-scroll[b-zcwveu6uv9] { overflow-y: auto; flex: 1; min-height: 0; padding: .2rem .7rem 2rem; }
.nav-scroll[b-zcwveu6uv9]::-webkit-scrollbar { width: 8px; }
.nav-scroll[b-zcwveu6uv9]::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 8px; }
.nav-empty[b-zcwveu6uv9] { color: rgba(255, 255, 255, .5); font-size: .8rem; padding: .6rem .8rem; }

/* ---- Module accordion head ---- */
.nav-mod[b-zcwveu6uv9] { margin-bottom: .1rem; }
.nav-modhead[b-zcwveu6uv9] {
    width: 100%; display: flex; align-items: center; gap: .7rem;
    background: none; border: 0; cursor: pointer;
    padding: .6rem .75rem; border-radius: 10px;
    color: rgba(255, 255, 255, .72);
    font: 600 .84rem/1 var(--font-sans); text-align: left;
    transition: background .15s ease, color .15s ease;
}
.nav-modhead:hover[b-zcwveu6uv9] { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-modhead:focus-visible[b-zcwveu6uv9] { outline: 2px solid var(--accent-bright); outline-offset: -2px; }
.nav-modhead .ic[b-zcwveu6uv9] { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav-modhead > span:first-of-type[b-zcwveu6uv9] { flex: 1; }
.nav-modhead .chev[b-zcwveu6uv9] { width: 14px; height: 14px; opacity: .45; transition: transform .2s ease; }
.nav-mod.open > .nav-modhead .chev[b-zcwveu6uv9] { transform: rotate(90deg); }
.nav-mod.open > .nav-modhead[b-zcwveu6uv9] { color: #fff; }
.nav-mod.open > .nav-modhead .ic[b-zcwveu6uv9] { color: var(--accent-bright); opacity: 1; }

/* svg defaults */
.ic[b-zcwveu6uv9], .chev[b-zcwveu6uv9] { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Submenu ---- */
.nav-sub[b-zcwveu6uv9] { margin: .1rem 0 .55rem 1.55rem; padding-left: .55rem; border-left: 1px solid rgba(255, 255, 255, .08); }

/* A section of a group (Setting, P2): a quiet caption over its pages, aligned with the links' text. */
.nav-cap[b-zcwveu6uv9] { padding: .6rem .7rem .15rem; font: 600 .66rem/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .38); }

/* ---- Items ---- */
.nav-scroll[b-zcwveu6uv9]  .nav-link {
    position: relative; display: flex; align-items: center; gap: .5rem;
    padding: .45rem .7rem; margin: 1px 0; border-radius: 8px;
    color: rgba(255, 255, 255, .6); font: 500 .82rem/1.25 var(--font-sans);
    text-decoration: none; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.nav-scroll[b-zcwveu6uv9]  .nav-link:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-scroll[b-zcwveu6uv9]  .nav-link:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: -2px; }
.nav-scroll[b-zcwveu6uv9]  .nav-link.active {
    background: linear-gradient(90deg, var(--accent-soft), rgba(255, 255, 255, .02));
    color: #fff; font-weight: 600;
}
.nav-scroll[b-zcwveu6uv9]  .nav-link.active::before {
    content: ""; position: absolute; left: -.62rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 3px;
    background: var(--accent-bright); box-shadow: 0 0 10px var(--accent-glow);
}
.nav-scroll[b-zcwveu6uv9]  .nav-link.nav-top { padding: .6rem .75rem; color: rgba(255, 255, 255, .78); font-weight: 600; gap: .7rem; }
.nav-scroll[b-zcwveu6uv9]  .nav-link.nav-top .ic { width: 18px; height: 18px; }
.nav-scroll[b-zcwveu6uv9]  .nav-link.nav-top.active::before { left: -.7rem; }

@media (prefers-reduced-motion: reduce) {
    .line-switch__pill[b-zcwveu6uv9], .nav-modhead .chev[b-zcwveu6uv9] { transition: none; }
}
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-l9nvybdvh5],
.components-reconnect-repeated-attempt-visible[b-l9nvybdvh5],
.components-reconnect-failed-visible[b-l9nvybdvh5],
.components-pause-visible[b-l9nvybdvh5],
.components-resume-failed-visible[b-l9nvybdvh5],
.components-rejoining-animation[b-l9nvybdvh5] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-retrying[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-failed[b-l9nvybdvh5],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-l9nvybdvh5] {
    display: block;
}


#components-reconnect-modal[b-l9nvybdvh5] {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-l9nvybdvh5 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-l9nvybdvh5 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-l9nvybdvh5 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-l9nvybdvh5]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-l9nvybdvh5 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-l9nvybdvh5 {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-l9nvybdvh5 {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-l9nvybdvh5 {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-l9nvybdvh5] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-l9nvybdvh5] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-l9nvybdvh5] {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover[b-l9nvybdvh5] {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active[b-l9nvybdvh5] {
        background-color: #6b9ed2;
    }

.components-rejoining-animation[b-l9nvybdvh5] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-l9nvybdvh5] {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-l9nvybdvh5 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-l9nvybdvh5] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-l9nvybdvh5 {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
