/* Generic */
:root {
    --bs-font-sans-serif: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    /*--bs-font-sans-serif: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol',sans-serif;*/
}
.label {
    line-height: 2;
}

.btn-group-xs>.btn,
.btn-xs {
    padding: .4rem;
    font-size: .8rem;
    line-height: .5;
    border-radius: .2rem;
}

.drag-handle {
    cursor: move;
}

/* Selectize overrides */
.selectize-control {
    padding: 0;
}
.selectize-input {
    border: none;
}

/* Layout */
.app-app > .navbar {
    background-image: var(--bb-navbar-gradient, linear-gradient(rgba(255, 255, 255, 0.14902), rgba(0, 0, 0, 0.14902)));
    min-height: var(--bb-navbar-min-height, 70px);
}

.app-app > .navbar .app-logo {
    max-height: 100px;
}

.app-app > .navbar .navbar-nav>.active>a {
    background-color: transparent !important;
}

.breadcrumb {
    padding: 0.5rem;
    background-color: var(--bs-tertiary-bg, #f5f5f5);
}

/* Spinning wheel */
.glyphicon.spinning,
.fa-spinner {
    animation: spin 2s infinite linear;
    -webkit-animation: spin2 2s infinite linear;
}

@keyframes spin {
    from {
        transform: scale(1) rotate(0deg);
    }

    to {
        transform: scale(1) rotate(360deg);
    }
}

@-webkit-keyframes spin2 {
    from {
        -webkit-transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(360deg);
    }
}

/* Modals */
#app-popup-modal .modal-dialog {
    /* This rule is a workaround for modal-lg not being applied when viewport is smaller than 992px,
       thus making the modal too narrow. */
    --bs-modal-width: 800px;
}

#app-popup-modal-title .breadcrumb {
    margin-bottom: 0px;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
}

/* Experimental: hide breadcrumb from popups */
.app-app .modal-header .breadcrumb-item:not(.active) { display: none; }

.note-modal { z-index: 1090 !important; }  /* Make it higher than view modals */

/* Above #app-popup-modal (1055); below .note-modal (1090). */
#bb-file-preview-modal {
  z-index: 1065;
}
/* When preview opens over an existing modal, Bootstrap appends a second backdrop. */
body:has(#bb-file-preview-modal.show) .modal-backdrop ~ .modal-backdrop {
  z-index: 1060;
}

/* Views */
.app-view {
    margin-bottom: 2rem;
    break-inside: avoid;
}

.app-view-menu .nav {
    margin-bottom: 20px;
}

/* Unsaved-form hint on the tab/accordion control that owns dirty content */
.app-tab-link.bb-tab-dirty::after {
    content: '';
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-left: 0.4em;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
    vertical-align: middle;
}

.app-view img {
    max-width: 100%;
}
.bb-menu-cards {
    display: flex;
    flex-wrap: wrap;
}
.bb-menu-card {
    border-radius: 0.4rem;
    min-width: 180px;
    display: inline-block;
    font-size: 18px;
    padding: 0.8rem;
    margin-right: 5px;
    margin-top: 5px;
    position: relative;
    overflow: hidden;
    line-height: 1.6rem;
    background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.14902), rgba(0, 0, 0, 0.14902));
    text-align: center;
    max-width: 200px;
}
.bb-menu-card:hover {
    background-image: linear-gradient(145deg, rgba(50, 50, 50, 0.14902), rgba(0, 0, 0, 0.14902));
}
.bb-menu-card-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.bb-menu-card a {
    color: white !important;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.bb-menu-card-label {
    margin: 0.6em;
    flex-grow: 1;
}
.bb-menu-card-icon {
    font-size: 1.6em;
    padding: 0.2em;
    margin-top: 0.4em;
}
.bb-menu-card-description {
    font-size: 0.75em;
    line-height: 1.4em;
    margin: 0.8em 0.1em;
}

/* Table */
.table-responsive {
    clear: both;
    /*max-width: 100%;*/
    /*table-layout: auto;*/
    /*word-wrap: break-word;*/
    overflow: auto;
}
/* Let the viewport scroll the grid (no nested table scrollbars / double scroll).
   Wide tables still expand via container-fluid (see App.TableScrollport). */
.app-view-table {
    position: relative;
}
.app-view-table .bb-view-task-busy {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.65);
    pointer-events: all;
    cursor: wait;
}
.app-view-table .table-responsive,
.app-view-pivot .table-responsive {
    overflow: visible;
}
/* Flex min-width:0 would clip wide tables; allow content to widen the page instead. */
#main-container[data-bb-wide-for-table] .bb-page-layout-main {
    min-width: auto;
}
.app-view-table .table-responsive > table > thead > tr > th,
.app-view-pivot .table-responsive > table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bs-body-bg, #fff);
    box-shadow: inset 0 -1px 0 var(--bs-border-color, #dee2e6);
}
.bb-table-col-narrow {
    width: 1%;
    white-space: nowrap;
}
.app-view-table .bb-sort-col {
    float: right;
    opacity: 0.35;
}
.app-view-table .bb-sort-current {
    opacity: 1;
}
.app-view-table .bb-sortable-column:hover .bb-sort-col {
    opacity: 0.7;
    cursor: pointer;
}
.app-view-table .bb-sortable-column:hover .bb-sort-current {
    opacity: 1;
}
.app-view-table .bb-sortable-column {
    cursor: pointer;
}
/* Tighter indent than Bootstrap's 2rem — lists in narrow grid cells */
.app-view-table td .content ul,
.app-view-table td .content ol {
    padding-left: 1rem;
}
.bb-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1050;
    padding: 0.5rem 1rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
}
.bb-skip-link:focus {
    position: absolute;
}
.bb-reorder-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    white-space: nowrap;
}

/* Search */
.app-search {
    display: inline-block;
}

/* Importdata */
.striked {
    text-decoration: line-through;
}

/* Table filters */
.app-filters-container,
.app-filters {
    display: inline-block;
}

.app-filter-template {
    display: none;
}

.app-filter {
    padding: 3px 5px;
    margin-right: 3px;
}

.app-filter .close {
    margin: auto 0 auto 7px;
    line-height: 18px;
    float: none;
}

.app-filter .app-filter-field,
.app-filter .app-filter-value,
.app-filter .app-filter-value2 {
    font-weight: bold;
}

.app-filter-editor-container {
    display: none;
}

.app-table-filter .popover {
    width: auto;
    max-width: 100%;
}

.bb-truncated-text-expand {
    vertical-align: baseline;
    line-height: 1;
    text-decoration: none;
}

.bb-truncated-text-popover {
    max-width: min(480px, 90vw);
}

.bb-truncated-text-popover .bb-truncated-text-popover-body {
    max-height: min(320px, 50vh);
    overflow: auto;
    white-space: normal;
}

.app-search button {
    display: none;
}

/* Static filter panel */
.app-filter-panel {
    background: #f7f7f8;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem 0.5rem;
    margin-bottom: 0.75rem;
}

.app-filter-panel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}

@media (max-width: 991.98px) {
    .app-filter-panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .app-filter-panel-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.app-filter-panel-field {
    min-width: 0;
}

/* Highlight filters that currently have a value in panel mode */
.app-filter-panel-field.is-set {
    background: #fff3cd;
    border-radius: 0.25rem;
    box-shadow: inset 0 0 0 1px #ffecb5;
}

.app-filter-panel-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.app-filter-panel-range {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.app-filter-panel-range .form-control {
    min-width: 0;
}

.app-filter-panel-advanced {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.app-filter-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.app-filter-panel-footer-end {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.app-filter-panel-footer .btn-link {
    text-decoration: none;
}

.app-filters-panel-hidden {
    display: none !important;
}

/* Login */
.form-signin {
    max-width: 330px;
    padding: 15px;
    margin: 0 auto;
}

.form-signin .checkbox {
    margin-bottom: 10px;
}

.form-signin .form-control {
    position: relative;
    box-sizing: border-box;
    height: auto;
    padding: 10px;
    font-size: 16px;
}

.form-signin .form-control:focus {
    z-index: 2;
}

.bb-login-fields input:not(:last-of-type) {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.bb-login-fields input:not(:first-of-type) {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.bb-login-fields input:last-of-type {
    margin-bottom: 10px;
}

/* Form */
/* Bootstrap reboot sizes bare legends ~1.5rem; keep form field legends like .form-label */
legend.form-label {
    font-size: inherit;
}

.required .form-label:after {
    content: " *";
    color: red;
}

.app-view-form textarea {
    height: 120px;
}

.app-view-form textarea.bb-textarea-lg {
    height: 400px;
}

.bb-form-cancel {
    display: none;
}
#app-popup-modal .bb-form-cancel {
    display: inline-block;
}

.form-control-inline {
    display: inline-block;
    width: auto;
}

/* Detail (classic horizontal/vertical; multi-column via placement width) */
.app-view-detail .bb-detail-record th {
    width: 1%;
    min-width: 200px;
    max-width: 50%;
    white-space: nowrap;
}
.app-view-detail .bb-detail-record td {
    width: auto;
}
.bb-detail-classic-fields > .bb-detail-item {
    margin-bottom: 0.35rem;
}
.bb-detail-pair-horizontal {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}
.bb-detail-pair-horizontal .bb-detail-label {
    flex: 0 0 200px;
    max-width: 50%;
    font-weight: 600;
}
.bb-detail-pair-horizontal .bb-detail-value {
    flex: 1 1 auto;
    min-width: 0;
}
.bb-detail-pair-vertical .bb-detail-label {
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.bb-detail-group-break {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Detail KPI Cards */
.bb-kpi-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.bb-kpi-card {
    flex: 1 1 160px;
    min-width: 160px;
    max-width: 280px;
    padding: 1rem 1.15rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.4rem;
    background-color: var(--bs-body-bg, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.bb-kpi-card-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
}
.bb-kpi-icon {
    font-size: 1.35rem;
    color: var(--bs-secondary, #6c757d);
    line-height: 1;
    flex-shrink: 0;
}
.bb-kpi-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.bb-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bs-secondary, #6c757d);
    line-height: 1.3;
    margin-bottom: 0;
}
.bb-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}
.bb-kpi-value a {
    text-decoration: none;
}
.bb-kpi-value a:hover {
    text-decoration: underline;
}
.bb-kpi-heading {
    flex: 1 1 100%;
    width: 100%;
    margin: 0.25rem 0;
}
.bb-kpi-group-break {
    flex: 1 1 100%;
    width: 100%;
    height: 0;
    margin: 0.25rem 0;
}

/* Detail / Gallery card layout */
.bb-card-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.bb-card-group {
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1em;
}
.bb-card-group-break {
    margin: 0.25rem 0;
    opacity: 0.4;
}
.bb-card-node {
    display: flex;
    min-width: 0;
}
.bb-card-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    /* Row itself fills the parent; its children must NOT each be width:100%
       or flex-wrap puts every child on its own line (looks like a stack). */
    width: 100%;
}
.bb-card-stack {
    flex-direction: column;
}
/* Stacks fill a column parent / group. Never width:100% when they are
   children of a row - that forces vertical wrapping. */
.bb-card-group > .bb-card-stack,
.bb-card-stack > .bb-card-stack {
    width: 100%;
}
.bb-card-row > .bb-card-stack,
.bb-card-row > .bb-card-item {
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;
}
.bb-card-row > .bb-card-stack.bb-card-grow,
.bb-card-row > .bb-card-item.bb-card-grow {
    flex: 1 1 6rem;
}
.bb-card-gap-none { gap: 0; }
.bb-card-gap-sm { gap: 0.35rem; }
.bb-card-gap-md { gap: 0.75rem; }
.bb-card-gap-lg { gap: 1.25rem; }
.bb-card-align-start { align-items: flex-start; }
.bb-card-align-center { align-items: center; }
.bb-card-align-end { align-items: flex-end; }
.bb-card-align-stretch { align-items: stretch; }
.bb-card-justify-start { justify-content: flex-start; }
.bb-card-justify-center { justify-content: center; }
.bb-card-justify-end { justify-content: flex-end; }
.bb-card-justify-between { justify-content: space-between; }
/* Grow must sit on the flex child of a row/stack (leaf or nested container). */
.bb-card-grow {
    flex: 1 1 6rem;
    min-width: 0;
    max-width: 100%;
}
.bb-card-item {
    min-width: 0;
}
.bb-card-item.bb-card-grow {
    /* Fill the grown slot so label/value layout can use the free width. */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.bb-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.15rem;
}
.bb-card-value {
    display: inline;
    word-break: break-word;
}
.bb-card-heading {
    font-size: 1.1rem;
    font-weight: 700;
}
.bb-card-size-sm { font-size: 0.85rem; }
.bb-card-size-md { font-size: 1rem; }
.bb-card-size-lg { font-size: 1.35rem; }
.bb-card-size-xl { font-size: 1.75rem; }
.bb-card-weight-normal { font-weight: 400; }
.bb-card-weight-bold { font-weight: 700; }
/* Bootstrap .btn sets its own font-size/weight/color; apply card chrome on the control. */
.btn.bb-card-size-sm { font-size: 0.75rem; }
.btn.bb-card-size-md { font-size: 0.875rem; }
.btn.bb-card-size-lg { font-size: 1.1rem; }
.btn.bb-card-size-xl { font-size: 1.35rem; padding: 0.5rem 1rem; }
.btn.bb-card-weight-normal { font-weight: 400; }
.btn.bb-card-weight-bold { font-weight: 700; }
.bb-card-separator {
    color: var(--bs-secondary-color, #6c757d);
    flex-shrink: 0;
    user-select: none;
}
.bb-card-badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.75em;
    text-decoration: none;
}
a.bb-card-badge:hover,
a.bb-card-badge:focus {
    text-decoration: none;
}
.bb-card-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bb-card-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.bb-card-avatar-initials {
    background: #e9d5ff;
    color: #6b21a8;
    font-size: 0.75rem;
    font-weight: 700;
}
.app-view-multidetail .bb-card-layout .bb-card-group {
    height: 100%;
}

/* Builder: custom layout editor (WYSIWYG) */
.bb-card-ed-wysiwyg {
    max-width: 960px;
}
.bb-card-ed-canvas.bb-card-group {
    min-height: 80px;
    position: relative;
}
.bb-card-ed-node {
    position: relative;
    min-width: 0;
}
/* Flex child of .bb-card-ed-children; must carry grow (not only the inner preview). */
.bb-card-ed-node.bb-card-ed-grow,
.bb-card-ed-node.bb-card-grow {
    flex: 1 1 6rem;
    min-width: 0;
    max-width: 100%;
}
.bb-card-ed-node.bb-card-ed-grow > .bb-card-ed-leaf-body,
.bb-card-ed-node.bb-card-grow > .bb-card-ed-leaf-body {
    width: 100%;
}
.bb-card-ed-node.bb-card-ed-grow > .bb-card-ed-children-wrap,
.bb-card-ed-node.bb-card-grow > .bb-card-ed-children-wrap {
    width: 100%;
}
.bb-card-ed-node.bb-card-ed-leaf {
    outline: 1px dashed transparent;
    border-radius: 0.25rem;
}
.bb-card-ed-node.bb-card-ed-leaf:hover,
.bb-card-ed-node.bb-card-ed-leaf.bb-card-ed-selected {
    outline-color: var(--bs-primary, #0d6efd);
}
.bb-card-ed-node.bb-card-ed-selected:not(.bb-card-ed-leaf) > .bb-card-ed-node-bar {
    background: rgba(13, 110, 253, 0.08);
    border-radius: 0.25rem;
}
.bb-card-ed-node:not(.bb-card-ed-leaf):not(.bb-card-ed-root) {
    border: 1px dashed var(--bs-border-color, #ced4da);
    border-radius: 0.35rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.6);
}
.bb-card-ed-node.bb-card-ed-root {
    border: none;
    padding: 0;
    background: transparent;
}
.bb-card-ed-node-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    padding: 0.15rem 0.25rem;
}
.bb-card-ed-leaf-body {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.25rem;
}
.bb-card-ed-preview {
    flex: 1 1 auto;
    min-width: 0;
}
.bb-card-ed-preview-value {
    word-break: break-word;
}
.bb-card-ed-children-wrap {
    position: relative;
    min-height: 1.75rem;
    width: 100%;
}
.bb-card-ed-children {
    min-height: 1.75rem;
    width: 100%;
}
/* Editor: flex children of a row must shrink-wrap. width:100% on the wrap
   inside a nested container otherwise resolves to the full row width. */
.bb-card-row > .bb-card-ed-node {
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;
}
.bb-card-row > .bb-card-ed-node.bb-card-ed-grow,
.bb-card-row > .bb-card-ed-node.bb-card-grow {
    flex: 1 1 6rem;
}
.bb-card-row > .bb-card-ed-node > .bb-card-ed-children-wrap {
    width: auto;
    max-width: 100%;
    min-width: 0;
}
.bb-card-row > .bb-card-ed-node > .bb-card-ed-children-wrap > .bb-card-ed-children {
    width: auto;
    max-width: 100%;
}
.bb-card-row > .bb-card-ed-node.bb-card-ed-grow > .bb-card-ed-children-wrap,
.bb-card-row > .bb-card-ed-node.bb-card-grow > .bb-card-ed-children-wrap,
.bb-card-row > .bb-card-ed-node.bb-card-ed-grow > .bb-card-ed-children-wrap > .bb-card-ed-children,
.bb-card-row > .bb-card-ed-node.bb-card-grow > .bb-card-ed-children-wrap > .bb-card-ed-children {
    width: 100%;
}
.bb-card-ed-empty {
    font-size: 0.8rem;
    padding: 0.5rem;
    border: 1px dashed var(--bs-border-color, #ced4da);
    border-radius: 0.25rem;
    color: var(--bs-secondary-color, #6c757d);
    pointer-events: none;
}
.bb-card-ed-palette-item {
    cursor: grab;
}
.bb-card-ed-palette-item:active {
    cursor: grabbing;
}
.bb-card-ed-children-wrap.bb-card-ed-drop-hover {
    outline: 2px dashed var(--bs-primary, #0d6efd);
    outline-offset: 2px;
    background: rgba(13, 110, 253, 0.06);
    border-radius: 0.25rem;
}
.bb-card-ed-node > .bb-card-separator {
    align-self: center;
}
.bb-card-ed-ghost {
    opacity: 0.5;
}
.bb-card-ed-group-header {
    max-width: 960px;
}
.bb-help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.35rem;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    border: 1px solid #ced4da;
    color: #adb5bd;
    cursor: help;
    font-size: 0.55rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
}
.bb-help-tip:hover,
.bb-help-tip:focus {
    color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    outline: none;
}
.col-form-label .bb-help-tip,
.form-check-label .bb-help-tip {
    margin-left: 0.3rem;
    position: relative;
    top: -0.05rem;
}
.bb-help-tip-tooltip {
    max-width: 22rem;
}
.bb-help-tip-tooltip .bb-help-tip-docs {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.85em;
}
.bb-help-tip-tooltip .bb-help-tip-docs a {
    color: inherit;
    text-decoration: underline;
}

/* Stepper */
.bb-stepper-nav {
    width: 100%;
}
.bb-stepper {
    display: flex;
    align-items: flex-start;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-stepper-horizontal {
    flex-direction: row;
}
.bb-stepper-vertical {
    flex-direction: column;
}
.bb-stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 4.5rem;
    max-width: 10rem;
    position: relative;
    flex: 0 0 auto;
}
/* Equal columns across the full width; marker+title stay centered in each. */
.bb-stepper-horizontal .bb-stepper-step {
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
}
/*
 * Connector from the previous step's marker to this one. With equal-width
 * steps, the previous marker center is at -50% of this step's width.
 */
.bb-stepper-horizontal .bb-stepper-has-line::before {
    content: "";
    position: absolute;
    left: calc(-50% + 1.2rem);
    right: calc(50% + 1.2rem);
    top: calc(1.2rem - 1px);
    height: 2px;
    background: #dee2e6;
    z-index: 0;
}
.bb-stepper-horizontal .bb-stepper-has-line.bb-stepper-line-completed::before {
    background: #198754;
}
.bb-stepper-horizontal .bb-stepper-control {
    position: relative;
    z-index: 1;
}
.bb-stepper-vertical .bb-stepper-step {
    flex-direction: row;
    text-align: left;
    max-width: none;
    min-width: 0;
}
.bb-stepper-vertical .bb-stepper-has-line {
    padding-top: 0.25rem;
}
.bb-stepper-vertical .bb-stepper-has-line::before {
    content: "";
    position: absolute;
    left: calc(1.2rem - 1px);
    top: 0;
    width: 2px;
    height: 0.25rem;
    background: #dee2e6;
}
.bb-stepper-vertical .bb-stepper-has-line.bb-stepper-line-completed::before {
    background: #198754;
}
.bb-stepper-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    max-width: 10rem;
}
.bb-stepper-vertical .bb-stepper-control {
    flex-direction: row;
    text-align: left;
    max-width: none;
}
.bb-stepper-marker {
    box-sizing: border-box;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color, #adb5bd);
    background: var(--bs-body-bg, #fff);
    color: var(--bs-secondary-color, #6c757d);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bb-stepper-number {
    font-weight: 600;
    font-size: 0.9rem;
}
.bb-stepper-title {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #6c757d;
}
.bb-stepper-vertical .bb-stepper-title {
    margin-top: 0;
    margin-left: 0.75rem;
}
.bb-stepper-completed .bb-stepper-marker {
    border-color: #198754;
    background: #198754;
    color: #fff;
}
.bb-stepper-completed .bb-stepper-title {
    color: #198754;
}
.bb-stepper-current .bb-stepper-marker {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}
.bb-stepper-current .bb-stepper-title {
    color: #0d6efd;
    font-weight: 600;
}
.bb-stepper-clickable {
    cursor: pointer;
}
.bb-stepper-clickable:hover .bb-stepper-marker {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}
.bb-stepper-clickable:focus {
    outline: none;
}
.bb-stepper-clickable:focus-visible .bb-stepper-marker {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.45);
}
.bb-stepper-clickable:disabled,
.bb-stepper-clickable.bb-stepper-busy {
    cursor: wait;
    opacity: 0.7;
}
.bb-stepper-panel {
    margin-top: 1rem;
    min-height: 2rem;
}
.bb-stepper-panel:focus {
    outline: none;
}
.bb-stepper-panel:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Timeline */
.bb-timeline-region {
    padding: 0.5rem 0 0.25rem;
}
.bb-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-timeline-event {
    position: relative;
    margin: 0 0 1rem;
}
.bb-timeline-year {
    margin: 0 0 0.75rem 4.5rem;
}
.bb-timeline-year-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 0.35rem;
    background: #2b5dbc;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}
.bb-timeline-row {
    display: grid;
    grid-template-columns: 3.25rem 1.5rem 1fr;
    column-gap: 0.5rem;
    align-items: stretch;
}
.bb-timeline-date {
    text-align: right;
    padding-top: 0.35rem;
    color: #212529;
}
.bb-timeline-month {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #495057;
    line-height: 1.1;
}
.bb-timeline-day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    color: #212529;
}
.bb-timeline-axis {
    position: relative;
    display: flex;
    justify-content: center;
}
.bb-timeline-spine {
    position: absolute;
    top: 0;
    bottom: -1rem;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: #ced4da;
}
.bb-timeline-event:last-child .bb-timeline-spine {
    bottom: 50%;
}
.bb-timeline-node {
    position: relative;
    z-index: 1;
    width: 0.7rem;
    height: 0.7rem;
    margin-top: 0.7rem;
    border-radius: 50%;
    background: #2b5dbc;
    flex-shrink: 0;
}
.bb-timeline-card {
    border: 1px solid #ced4da;
    border-radius: 0.35rem;
    padding: 0.65rem 0.85rem;
    background: var(--bs-body-bg, #fff);
    min-width: 0;
}
.bb-timeline-card-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
}
.bb-timeline-link {
    color: #2b5dbc;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}
.bb-timeline-link:hover {
    color: #1f4a9a;
}
.bb-timeline-link:focus {
    outline: none;
}
.bb-timeline-link:focus-visible {
    outline: 2px solid #2b5dbc;
    outline-offset: 2px;
    border-radius: 2px;
}
.bb-timeline-title-text {
    color: #212529;
}
.bb-timeline-card-meta {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #495057;
}
.bb-timeline-empty {
    margin: 0.5rem 0 0;
    color: #495057;
}

/* Index widget: record nav list (often in the sidebar) */
.bb-index-region {
    margin: 0;
}
.bb-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-index-item {
    position: relative;
    margin: 0;
    padding: 0;
    border-left: 3px solid transparent;
}
.bb-index-item-selected {
    border-left-color: var(--bs-primary, #0d6efd);
}
.bb-index-item-selected .bb-index-link,
.bb-index-item-selected .bb-index-label-text {
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}
.bb-index-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem 0.4rem calc(0.5rem + (var(--bb-index-depth, 0) * 1rem));
    min-height: 2rem;
}
.bb-index-label {
    flex: 1 1 auto;
    min-width: 0;
}
.bb-index-link,
.bb-index-label-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}
.bb-index-link:hover {
    text-decoration: underline;
}
.bb-index-link:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}
.bb-index-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 0 1 auto;
}
.bb-index-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.3;
    border-radius: 0.2rem;
    background: #e9ecef;
    color: #212529;
    white-space: nowrap;
}
.bb-index-count {
    flex: 0 0 auto;
    min-width: 1.5rem;
    padding: 0.1rem 0.35rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.3;
    border-radius: 0.25rem;
    background: #e9ecef;
    color: #212529;
}
.bb-index-item-selected .bb-index-count {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
}
.bb-index-empty {
    margin: 0.5rem 0 0;
    color: #495057;
}

/* fix rateYo with Bootstrap */
.jq-ry-container {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

@media print {
    .container {
        padding-top: 2em;
    }
    a[href]:after {
        content: none;
    }
    .bb-no-print, .navbar-expand-md .navbar-collapse {
        display: none !important;
    }
}

/* File / PDF preview: split pane + modal */
.bb-page-with-preview {
    display: block;
}
.bb-page-with-preview.bb-file-preview-open {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 120px);
}
.bb-page-with-preview-main {
    min-width: 0;
    flex: 1 1 auto;
}
.bb-page-with-preview.bb-file-preview-open .bb-page-with-preview-main #main-container {
    max-width: none;
}
.bb-file-sidepane {
    flex: 0 0 42%;
    max-width: 42%;
    min-width: 280px;
    border-left: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-body-bg, #fff);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.bb-file-sidepane[hidden] {
    display: none !important;
}
.bb-file-sidepane .bb-file-preview-chrome {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 60vh;
}
.bb-file-preview-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.bb-file-preview-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bb-file-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.bb-file-preview-stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-height: 70vh;
    background: #111;
}
.bb-file-preview-media {
    display: none;
    width: 100%;
    border: 0;
    background: #111;
}
.bb-file-preview-media.bb-file-preview-media-active {
    display: block;
}
.bb-file-preview-iframe.bb-file-preview-media-active {
    flex: 1 1 auto;
    min-height: 70vh;
    background: #f8f9fa;
}
.bb-file-preview-video.bb-file-preview-media-active,
.bb-file-preview-image.bb-file-preview-media-active {
    flex: 1 1 auto;
    min-height: 70vh;
    max-height: 80vh;
    object-fit: contain;
}
.bb-file-preview-audio.bb-file-preview-media-active {
    display: block;
    width: min(100%, 32rem);
    margin: 2rem auto;
    padding: 0 1rem;
}
#bb-file-preview-modal .bb-file-preview-chrome {
    display: flex;
    flex-direction: column;
}
#bb-file-preview-modal .modal-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
#bb-file-preview-modal .bb-file-preview-stage {
    min-height: 75vh;
}
#bb-file-preview-modal .bb-file-preview-iframe.bb-file-preview-media-active,
#bb-file-preview-modal .bb-file-preview-video.bb-file-preview-media-active,
#bb-file-preview-modal .bb-file-preview-image.bb-file-preview-media-active {
    min-height: 75vh;
}
#bb-file-preview-modal .modal-header {
    flex-wrap: wrap;
}
@media (max-width: 767.98px) {
    .bb-page-with-preview.bb-file-preview-open {
        flex-direction: column;
    }
    .bb-file-sidepane {
        flex: 1 1 auto;
        max-width: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--bs-border-color, #dee2e6);
        min-height: 50vh;
    }
}

/* Record-page viewers (presence) - page-body banner above main content */
.bb-presence-banner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    padding: 0.55rem 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.375rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    color: var(--bs-body-color, #212529);
}
.bb-presence-banner[hidden] {
    display: none !important;
}
.bb-presence-banner--popup {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}
.bb-presence-label {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: right;
}
.bb-presence-avatars {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    flex: 0 0 auto;
}
.bb-presence-avatar {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-secondary, #6c757d);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border: 2px solid var(--bs-body-bg, #fff);
    margin-left: -0.4rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.bb-presence-avatar:last-child {
    margin-left: 0;
}
.bb-presence-more {
    width: auto;
    min-width: 1.85rem;
    padding: 0 0.35rem;
    background: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-body-color, #212529);
    font-size: 0.7rem;
}

/* Live page auto-update status */
.bb-events-status,
.bb-events-stale {
    position: fixed;
    z-index: 1080;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.25rem;
    max-width: calc(100vw - 2rem);
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    display: none;
}
.bb-events-status {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}
.bb-events-stale {
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    border: 1px solid var(--bs-border-color, #dee2e6);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.bb-events-stale-pulse {
    animation: bb-events-pulse 0.7s ease;
}
@keyframes bb-events-pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.45); }
    100% { box-shadow: 0 0 0 0.75rem rgba(13, 110, 253, 0); }
}

/* Page content sidebar (widget placement=sidebar) */
.bb-page-layout--with-sidebar {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    min-height: 12rem;
}
.bb-page-sidebar {
    flex: 0 0 auto;
    width: var(--bb-sidebar-width, 28%);
    max-width: 50%;
    min-width: 12rem;
    border-right: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-body-bg, #fff);
    min-height: 0;
}
.bb-page-layout--with-sidebar.is-sidebar-collapsed .bb-page-sidebar {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
}
.bb-page-sidebar-chrome {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.5rem 0.75rem 1rem;
}
.bb-page-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}
.bb-page-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.15rem 0.35rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: inherit;
    line-height: 1;
    cursor: pointer;
}
.bb-page-sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
}
.bb-page-sidebar-toggle:focus-visible,
.bb-page-sidebar-splitter:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}
.bb-page-sidebar-panel {
    flex: 1 1 auto;
    min-width: 0;
    overflow: auto;
}
.bb-page-layout--with-sidebar.is-sidebar-collapsed .bb-page-sidebar-panel {
    visibility: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.bb-page-layout--with-sidebar.is-sidebar-collapsed .bb-page-sidebar-toggle .fa-chevron-left {
    transform: rotate(180deg);
}
.bb-page-sidebar-splitter {
    flex: 0 0 0.35rem;
    cursor: col-resize;
    background: transparent;
    position: relative;
    touch-action: none;
}
.bb-page-sidebar-splitter::before {
    content: "";
    position: absolute;
    inset: 0 -0.2rem;
}
.bb-page-sidebar-splitter:hover,
.bb-page-sidebar-splitter:focus {
    background: var(--bs-border-color, #dee2e6);
}
.bb-page-layout--with-sidebar.is-sidebar-collapsed .bb-page-sidebar-splitter {
    display: none;
}
.bb-page-layout-main {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 1rem;
}
.bb-page-layout--with-sidebar.is-sidebar-resizing {
    user-select: none;
    cursor: col-resize;
}
@media (prefers-reduced-motion: reduce) {
    .bb-page-sidebar,
    .bb-page-sidebar-toggle .fa-chevron-left {
        transition: none !important;
    }
}
@media (max-width: 767.98px) {
    .bb-page-layout--with-sidebar {
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
    }
    .bb-page-sidebar {
        width: 100% !important;
        max-width: none;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    }
    .bb-page-layout--with-sidebar.is-sidebar-collapsed .bb-page-sidebar {
        width: 100% !important;
        max-width: none;
        min-width: 0;
    }
    .bb-page-sidebar-splitter {
        display: none;
    }
    .bb-page-layout-main {
        padding-left: 0;
        padding-top: 0.75rem;
    }
}

/* Builder page editor: sidebar vs main zones */
.bb-page-thumb .bb-page-zones {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.bb-page-thumb .bb-page-sidebar-zone,
.bb-page-thumb .bb-page-main-zone {
    min-height: 6rem;
}
.bb-page-thumb .bb-page-sidebar-zone {
    flex: 0 0 28%;
    max-width: 28%;
    border: 1px dashed var(--bs-border-color, #adb5bd);
    border-radius: 0.25rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
}
.bb-page-thumb .bb-page-main-zone {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px dashed transparent;
    border-radius: 0.25rem;
    padding: 0.5rem;
}
.bb-page-thumb .bb-page-zone-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.bb-page-thumb .bb-page-zone-empty {
    font-size: 0.85rem;
    color: #6c757d;
    padding: 1rem 0.5rem;
    text-align: center;
}

/* App sidenav (root-page sidebar_nav) — distinct from content .bb-page-sidebar */
.bb-sidenav-shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}
.bb-sidenav {
    flex: 0 0 260px;
    width: 260px;
    max-width: 85vw;
    display: flex;
    flex-direction: column;
    background-color: var(--bb-sidenav-bg, #212529);
    background-image: var(--bb-navbar-gradient, linear-gradient(rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18)));
    color: var(--bs-navbar-color, rgba(255, 255, 255, 0.85));
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1030;
    overflow: hidden;
}
.bb-sidenav-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.bb-sidenav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bb-sidenav-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
    color: inherit;
    text-decoration: none;
}
.bb-sidenav-brand-link:hover {
    color: inherit;
    text-decoration: none;
    opacity: 0.95;
}
.bb-sidenav-brand-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1rem;
}
.bb-sidenav-brand-text {
    min-width: 0;
    overflow: hidden;
}
.bb-sidenav-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bs-navbar-brand-color, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.bb-sidenav-logo {
    max-height: 2.5rem;
    max-width: 100%;
}
.bb-sidenav-close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0.25rem 0.5rem;
    opacity: 0.75;
}
.bb-sidenav-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}
.bb-sidenav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-sidenav-section {
    margin-bottom: 1.25rem;
}
.bb-sidenav-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-navbar-color, rgba(255, 255, 255, 0.55));
    padding: 0.25rem 0.75rem 0.5rem;
}
.bb-sidenav-item {
    margin: 0.15rem 0;
}
.bb-sidenav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
}
.bb-sidenav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    text-decoration: none;
}
.bb-sidenav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--bs-navbar-active-color, #fff);
    font-weight: 600;
}
.bb-sidenav-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.bb-sidenav-item-icon {
    width: 1.25rem;
    text-align: center;
    flex: 0 0 auto;
    opacity: 0.9;
}
.bb-sidenav-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}
.bb-sidenav-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
}
.bb-sidenav-user-avatar {
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bs-navbar-brand-color, #fff);
}
.bb-sidenav-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-navbar-brand-color, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-sidenav-logout {
    flex: 0 0 auto;
    color: inherit;
    opacity: 0.75;
    padding: 0.35rem 0.5rem;
    border-radius: 0.35rem;
    text-decoration: none;
}
.bb-sidenav-logout:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}
.bb-sidenav-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background-image: var(--bb-navbar-gradient, linear-gradient(rgba(255, 255, 255, 0.14902), rgba(0, 0, 0, 0.14902)));
    color: var(--bs-navbar-color, rgba(255, 255, 255, 0.85));
}
.bb-sidenav-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.25rem;
    padding: 0.35rem 0.5rem;
    color: inherit;
}
.bb-sidenav-toggler .navbar-toggler-icon {
    filter: invert(1);
    width: 1.25rem;
    height: 1.25rem;
}
.bb-sidenav-topbar-brand {
    color: var(--bs-navbar-brand-color, #fff);
    font-weight: 600;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bb-sidenav-topbar-brand:hover {
    color: var(--bs-navbar-brand-color, #fff);
    text-decoration: none;
}
.bb-sidenav-topbar-logo {
    max-height: 1.75rem;
}
.bb-sidenav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1025;
}
.bb-sidenav-shell--preview {
    min-height: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.25rem;
    overflow: hidden;
}
.bb-sidenav-shell--preview .bb-sidenav {
    position: relative;
    height: auto;
    min-height: 16rem;
    max-height: none;
}
.bb-page-thumb .bb-sidenav-shell--preview .bb-sidenav-main {
    background: #fff;
}

@media (max-width: 767.98px) {
    .bb-has-sidenav .bb-sidenav-shell {
        display: block;
        min-height: 0;
    }
    .bb-has-sidenav .bb-sidenav {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: none;
    }
    .bb-has-sidenav.bb-sidenav-open .bb-sidenav {
        transform: translateX(0);
        box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.35);
    }
    .bb-has-sidenav.bb-sidenav-open .bb-sidenav-backdrop {
        display: block;
    }
}

/* File upload dropzone (form File/Image fields + Uploader widget) */
.bb-file-dropzone {
    position: relative;
    display: block;
    border: 1.5px dashed var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius, 0.375rem);
    background-color: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-secondary-color, #6c757d);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    min-height: 5.5rem;
}
/* Author display:block above would otherwise win over the UA [hidden] rule. */
.bb-file-dropzone[hidden] {
    display: none !important;
}
.bb-file-dropzone-lg {
    min-height: 8rem;
}
.bb-file-dropzone:hover,
.bb-file-dropzone:focus-within {
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-body-color, #212529);
}
.bb-file-dropzone.bb-file-dropzone-active {
    border-color: var(--bs-primary, #0d6efd);
    border-style: solid;
    background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
    color: var(--bs-primary, #0d6efd);
}
.bb-file-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
    font-size: 0;
}
.bb-file-dropzone-surface {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    text-align: center;
    pointer-events: none;
    min-height: inherit;
}
.bb-file-dropzone-icon {
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.85;
}
.bb-file-dropzone-lg .bb-file-dropzone-icon {
    font-size: 1.85rem;
}
.bb-file-dropzone-prompt {
    font-size: 0.9rem;
    line-height: 1.35;
}
.bb-file-dropzone-files {
    font-size: 0.8rem;
    color: var(--bs-body-color, #212529);
    max-width: 100%;
    word-break: break-word;
}
.bb-file-dropzone-files[hidden] {
    display: none !important;
}
.bb-file-dropzone.has-files .bb-file-dropzone-prompt {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* SharePoint browse (File import + Remotefile) */
.bb-sharepoint-browse,
.bb-remotefile-browse {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.bb-sharepoint-browse .bb-sharepoint-icon,
.bb-remotefile-browse .bb-sharepoint-icon {
    font-size: 1.05em;
    line-height: 1;
    color: #038387; /* SharePoint teal */
}
.btn-outline-secondary.bb-sharepoint-browse:hover .bb-sharepoint-icon,
.btn-outline-secondary.bb-remotefile-browse:hover .bb-sharepoint-icon,
.btn-outline-secondary.bb-sharepoint-browse:focus-visible .bb-sharepoint-icon,
.btn-outline-secondary.bb-remotefile-browse:focus-visible .bb-sharepoint-icon {
    color: inherit;
}

/* Current stored file/image chip (form fields) */
.bb-file-current-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius, 0.375rem);
    background-color: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
}
.bb-file-current-body {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
}
.bb-file-current-icon {
    flex: 0 0 auto;
    opacity: 0.7;
}
.bb-file-current-thumb {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    border-radius: var(--bs-border-radius-sm, 0.25rem);
}
.bb-file-current-name,
.bb-file-current-body .bb-file-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 18rem;
}
.bb-file-current-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin: 0;
    border: 0;
    border-radius: var(--bs-border-radius-sm, 0.25rem);
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    cursor: pointer;
    line-height: 1;
}
.bb-file-current-toggle:hover,
.bb-file-current-toggle:focus {
    background-color: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-danger, #dc3545);
}
.bb-file-current-pending {
    display: none;
    margin-top: 0.35rem;
}
.bb-file-current-undo {
    margin-left: 0.35rem;
    color: var(--bs-link-color, #0d6efd);
    cursor: pointer;
    text-decoration: underline;
}
.bb-file-current-undo:hover {
    color: var(--bs-link-hover-color, #0a58ca);
}
.bb-file-current:has(.bb-file-current-flag:checked) .bb-file-current-chip {
    opacity: 0.55;
}
.bb-file-current:has(.bb-file-current-flag:checked) .bb-file-current-body {
    text-decoration: line-through;
}
.bb-file-current:has(.bb-file-current-flag:checked) .bb-file-current-toggle {
    display: none;
}
.bb-file-current:has(.bb-file-current-flag:checked) .bb-file-current-pending {
    display: block;
}
