/* _content/BMSCoreTech.Web/Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-pe921n7vgy] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-pe921n7vgy] {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sidebar[b-pe921n7vgy] {
    background: var(--surface-bg);
    border-right: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar.collapsed[b-pe921n7vgy] {
    width: 0 !important;
    padding: 0;
    overflow: hidden;
}

.top-row[b-pe921n7vgy] {
    background: var(--topbar-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--surface-border);
    justify-content: flex-start;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.burger-btn[b-pe921n7vgy] {
    background: var(--content-bg);
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.18s ease;
}

.burger-btn:hover[b-pe921n7vgy] {
    background: var(--menu-hover-bg);
    border-color: var(--text-muted);
}

.burger-btn .bi[b-pe921n7vgy] {
    font-size: 1.1rem;
}

.top-row span.text-muted[b-pe921n7vgy] {
    color: var(--text-strong) !important;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Modern sidebar menu */
.modern-nav[b-pe921n7vgy] {
    padding-top: 0.9rem;
    color: var(--text-strong);
}

.modern-nav .app-brand[b-pe921n7vgy] {
    margin: 0 0.85rem 0.35rem 0.85rem !important;
    height: 3.5rem;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    padding: 0 0.25rem !important;
    border-bottom: 1px solid #f0f2f5;
    letter-spacing: 0;
    opacity: 1;
}

.modern-nav .section-toggle[b-pe921n7vgy] {
    cursor: pointer;
    border-radius: 12px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    transition: background-color 0.18s ease;
}

.modern-nav .section-toggle:hover[b-pe921n7vgy] {
    background: #f8fafc;
}

.modern-nav[b-pe921n7vgy]  .nav-item {
    margin-bottom: 0.2rem;
}

.modern-nav[b-pe921n7vgy]  .nav-link {
    color: var(--text-strong) !important;
    border-radius: 12px;
    padding: 0.58rem 0.75rem;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    font-weight: 600;
}

.modern-nav[b-pe921n7vgy]  .nav-link:hover {
    color: var(--text-strong) !important;
    background: var(--menu-hover-bg);
    border-color: var(--surface-border);
}

.modern-nav[b-pe921n7vgy]  .nav-link.active {
    color: #166534 !important;
    background: #dcfce7;
    border-color: #86efac;
    box-shadow: none;
}

.modern-nav[b-pe921n7vgy]  .nav-link .bi {
    opacity: 1;
    font-size: 0.96rem;
    color: var(--text-muted);
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--surface-border);
    background: var(--content-bg);
    margin-right: 0.55rem !important;
}

.modern-nav[b-pe921n7vgy]  .nav-link.active .bi {
    color: #18a75b;
    border-color: #cbedd9;
    background: #e8f9ef;
}

.modern-nav .section-title[b-pe921n7vgy] {
    color: var(--text-muted) !important;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Indented items under a collapsible section */
.modern-nav[b-pe921n7vgy]  .nav-link.nav-submenu {
    padding-left: 1.35rem;
    font-size: 0.94rem;
    color: var(--text-muted) !important;
}

.modern-nav[b-pe921n7vgy]  .nav-link.nav-submenu .bi {
    color: var(--text-muted) !important;
}

/* Selected submenu: must follow .nav-submenu so active wins over muted defaults */
.modern-nav[b-pe921n7vgy]  .nav-link.nav-submenu.active {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
    font-weight: 600;
}

.modern-nav[b-pe921n7vgy]  .nav-link.nav-submenu.active .bi {
    color: #18a75b !important;
    border-color: #cbedd9 !important;
    background: #e8f9ef !important;
}

html[data-theme="dark"] .modern-nav[b-pe921n7vgy]  .nav-link.nav-submenu.active {
    color: #bbf7d0 !important;
    background: rgba(22, 101, 52, 0.35) !important;
    border-color: #22c55e !important;
}

html[data-theme="dark"] .modern-nav[b-pe921n7vgy]  .nav-link.nav-submenu.active .bi {
    color: #86efac !important;
    border-color: #4ade80 !important;
    background: rgba(20, 83, 45, 0.45) !important;
}

.top-row[b-pe921n7vgy]  a, .top-row[b-pe921n7vgy]  .btn-link {
    white-space: nowrap;
    text-decoration: none;
}

@media (max-width: 640.98px) {
    .top-row[b-pe921n7vgy] {
        justify-content: space-between;
    }

    .top-row[b-pe921n7vgy]  a, .top-row[b-pe921n7vgy]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-pe921n7vgy] {
        flex-direction: row;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    .sidebar[b-pe921n7vgy] {
        width: 250px;
        flex-shrink: 0;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    /* NavMenu root: own vertical scroll, independent of main content */
    .sidebar[b-pe921n7vgy]  .nav-scrollable {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    main[b-pe921n7vgy] {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .top-row[b-pe921n7vgy] {
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    article.content[b-pe921n7vgy] {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--content-bg);
    }

    .top-row.auth[b-pe921n7vgy]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }
}

@media print {
    .sidebar[b-pe921n7vgy] {
        display: none !important;
    }

    .top-row[b-pe921n7vgy] {
        display: none !important;
    }

    .page[b-pe921n7vgy] {
        flex-direction: column !important;
    }
}

#blazor-error-ui[b-pe921n7vgy] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-pe921n7vgy] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* _content/BMSCoreTech.Web/Components/Layout/NavMenu.razor.rz.scp.css */
/* Collapsible section headers (Master data, Finance, …) — hand cursor like links */
.section-toggle[b-aaofp5xo7n] {
    cursor: pointer;
    color: var(--text-muted) !important;
}

.section-toggle.section-toggle-active[b-aaofp5xo7n] {
    background: var(--menu-hover-bg);
    border: 1px solid var(--surface-border);
    color: var(--text-strong) !important;
    border-radius: 10px;
}

/* Scoped to NavMenu — subgroup titles for light sidebar */
.nav-group-label[b-aaofp5xo7n] {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted) !important;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    padding-top: 0.4rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-top: 1px solid var(--surface-border);
}

.nav-group-label.nav-group-label-first[b-aaofp5xo7n] {
    border-top: none;
    margin-top: 0;
    padding-top: 0.2rem;
}

/* Separator before Audit trail (no extra heading — avoids orphaned “Compliance” label) */
.nav-setup-divider-before[b-aaofp5xo7n] {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--surface-border);
}

.app-brand .brand-logo[b-aaofp5xo7n] {
    width: 100%;
    max-width: 185px;
    height: 34px;
    object-fit: contain;
    object-position: left center;
    display: block;
}

/* Keep active state in NavMenu scope so selected item is always visible */
.nav-link[b-aaofp5xo7n] {
    color: var(--text-strong) !important;
    display: flex;
    width: 100%;
    padding: 0.58rem 0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
}

.nav-link.active[b-aaofp5xo7n] {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
    font-weight: 600;
}

.nav-link .nav-label[b-aaofp5xo7n] {
    color: inherit !important;
}

.nav-link.active .nav-label[b-aaofp5xo7n] {
    color: #166534 !important;
}

.nav-link.active .bi[b-aaofp5xo7n] {
    color: #18a75b !important;
}

.nav-link.nav-submenu[b-aaofp5xo7n] {
    color: var(--text-muted) !important;
}

.nav-link.nav-submenu .bi[b-aaofp5xo7n] {
    color: var(--text-muted) !important;
}

.nav-link.nav-submenu.active[b-aaofp5xo7n] {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

.nav-link.nav-submenu.active .nav-label[b-aaofp5xo7n] {
    color: #166534 !important;
}

.nav-link.nav-submenu.active .bi[b-aaofp5xo7n] {
    color: #18a75b !important;
}
/* _content/BMSCoreTech.Web/Components/Layout/PlatformLayout.razor.rz.scp.css */
@media (min-width: 641px) {
    .platform-shell[b-tv4kxnh7xf] {
        height: 100vh;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .platform-shell-content[b-tv4kxnh7xf] {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.75rem;
    }
}

.platform-nav .platform-nav-btn[b-tv4kxnh7xf] {
    transition: all 0.18s ease;
}

.platform-nav .platform-nav-btn.platform-nav-active[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn.active[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn[aria-current="page"][b-tv4kxnh7xf] {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
    font-weight: 600;
}

.platform-nav .platform-nav-btn.platform-nav-active:hover[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn.active:hover[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn[aria-current="page"]:hover[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn.platform-nav-active:focus[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn.active:focus[b-tv4kxnh7xf],
.platform-nav .platform-nav-btn[aria-current="page"]:focus[b-tv4kxnh7xf] {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}
/* _content/BMSCoreTech.Web/Components/Pages/PlatformTenants.razor.rz.scp.css */
.platform-tenants-table-region[b-jcb8ugc8wc] {
    overflow-x: hidden;
}
/* _content/BMSCoreTech.Web/Components/Pages/Roles.razor.rz.scp.css */
/* Flexbox: allow children to shrink so inner scroll regions work */
.roles-split .min-h-0[b-y2l5e8ez7m] {
    min-height: 0;
}

.roles-split[b-y2l5e8ez7m] {
    align-items: stretch;
}

.roles-list-scroll[b-y2l5e8ez7m] {
    max-height: min(70vh, 36rem);
    overflow: auto;
}

.role-edit-card[b-y2l5e8ez7m] {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

/* Cap editor height to viewport so header + actions stay visible; only the matrix scrolls */
.roles-editor-card--filled[b-y2l5e8ez7m] {
    max-height: calc(100dvh - 6.5rem);
}

@media (max-width: 991.98px) {
    .roles-editor-card--filled[b-y2l5e8ez7m] {
        max-height: calc(100dvh - 5.25rem);
    }

    .roles-list-scroll[b-y2l5e8ez7m] {
        max-height: none;
    }
}

.roles-editor-card-body[b-y2l5e8ez7m] {
    min-height: 0;
}

/* EditForm renders a <form> — stretch it in the flex column */
.roles-editor-card[b-y2l5e8ez7m]  form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.roles-editor-form-stack[b-y2l5e8ez7m] {
    min-height: 0;
}

/* Only this region scrolls vertically */
.roles-editor-matrix-scroll[b-y2l5e8ez7m] {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 8rem;
}

.roles-editor-actions[b-y2l5e8ez7m] {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--content-bg, #fff);
    margin-bottom: 0;
}

.permission-category-title[b-y2l5e8ez7m] {
    color: var(--bs-secondary-color, #6c757d);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.permission-matrix-table .module-col[b-y2l5e8ez7m] {
    min-width: 10rem;
    width: 28%;
}

.permission-matrix-table .action-col[b-y2l5e8ez7m] {
    width: auto;
    min-width: 4.5rem;
    vertical-align: middle;
}

.permission-matrix-table tbody th[b-y2l5e8ez7m] {
    background-color: var(--bs-body-bg, #fff);
}

.matrix-na[b-y2l5e8ez7m] {
    display: inline-block;
    min-width: 1rem;
    font-size: 0.9rem;
    user-select: none;
}

.additional-perms .form-check[b-y2l5e8ez7m] {
    margin-bottom: 0;
}

tr.roles-row-selected[b-y2l5e8ez7m] {
    --bs-table-bg-state: var(--bs-primary-bg-subtle);
}

@media (max-width: 576px) {
    .permission-matrix-table .module-col[b-y2l5e8ez7m] {
        width: auto;
    }
}
