/* ============================================================================
   Facility panels: work orders, asset information, documents.
   Built on the viewer's own docking panels; colours follow its dark theme.
   ============================================================================ */

.fac-panel {
    --fac-text: #f5f5f5;
    --fac-text-2: rgba(255, 255, 255, 0.68);
    --fac-text-3: rgba(255, 255, 255, 0.45);
    --fac-line: rgba(255, 255, 255, 0.08);
    --fac-line-2: rgba(255, 255, 255, 0.14);
    --fac-hover: rgba(255, 255, 255, 0.06);
    --fac-field: rgba(255, 255, 255, 0.07);
    --fac-accent: #0696D7;
    resize: both;
    overflow: hidden;
    font-family: ArtifaktElement, "Helvetica Neue", "Segoe UI Semilight", sans-serif;
}

.light-theme .fac-panel {
    --fac-text: #3c3c3c;
    --fac-text-2: rgba(0, 0, 0, 0.62);
    --fac-text-3: rgba(0, 0, 0, 0.45);
    --fac-line: rgba(0, 0, 0, 0.08);
    --fac-line-2: rgba(0, 0, 0, 0.15);
    --fac-hover: rgba(0, 0, 0, 0.04);
    --fac-field: rgba(0, 0, 0, 0.05);
}

.fac-panel .docking-panel-title {
    padding-right: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fac-body,
.fac-body *,
.fac-docviewer-bar,
.fac-docviewer-bar *,
.fac-pin,
.fac-pin * {
    box-sizing: border-box;
}

.fac-scroll {
    overflow-y: auto;
    overflow-x: hidden;
}

.fac-body {
    padding: 4px 0 16px;
    color: var(--fac-text);
    font-size: 12px;
    line-height: 1.4;
}

.fac-body button,
.fac-body input,
.fac-body select {
    font-family: inherit;
}

.fac-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fac-icon svg {
    width: 100%;
    height: 100%;
}

.fac-empty {
    padding: 18px 16px;
    color: var(--fac-text-3);
    font-size: 12px;
    text-align: center;
}

.fac-note {
    margin: 14px 16px 0;
    color: var(--fac-text-3);
    font-size: 11px;
}

/* --- Sections and headings --------------------------------------------- */

.fac-section {
    padding: 10px 16px 8px;
}

.fac-kicker {
    margin-bottom: 8px;
    color: var(--fac-text-3);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.fac-asset-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fac-asset-title {
    color: var(--fac-text);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.fac-asset-sub {
    margin-top: 2px;
    color: var(--fac-text-2);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.fac-asset-meta {
    margin-top: 4px;
    color: var(--fac-text-3);
    font-size: 11px;
}

.fac-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 2px;
    padding: 3px 8px;
    border-radius: 2px;
    background: rgba(6, 150, 215, 0.16);
    color: #3DB0E6;
    font-size: 11px;
}

.fac-time-chip .fac-icon {
    width: 13px;
    height: 13px;
}

.fac-inferred {
    display: inline-flex;
    margin-top: 8px;
    padding: 2px 8px;
    border: 1px dashed var(--fac-line-2);
    border-radius: 2px;
    color: var(--fac-text-2);
    font-size: 11px;
}

.fac-group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 10px;
    padding: 8px 16px 6px;
    border-top: 1px solid var(--fac-line);
    color: var(--fac-text);
    font-size: 13px;
}

.fac-count {
    color: var(--fac-text-3);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.fac-subhead {
    padding: 12px 16px 4px;
    color: var(--fac-text-3);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* --- Stat tiles --------------------------------------------------------- */

.fac-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 16px;
    overflow: hidden;
    border: 1px solid var(--fac-line);
    border-radius: 2px;
    background: var(--fac-line);
}

.fac-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 10px;
    border: 0;
    background: rgba(34, 34, 34, 0.96);
    color: var(--fac-text);
    text-align: left;
}

.light-theme .fac-stat {
    background: #fff;
}

button.fac-stat {
    cursor: pointer;
    transition: background-color 0.12s;
}

button.fac-stat:hover {
    background: #2e2e2e;
}

.fac-stat.is-active {
    box-shadow: inset 0 -2px 0 var(--tone, var(--fac-accent));
}

.fac-stat-value {
    font-size: 18px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.fac-stat.has-tone .fac-stat-value {
    color: var(--tone);
}

.fac-stat-label {
    color: var(--fac-text-3);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* --- Controls ------------------------------------------------------------ */

.fac-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px 2px;
}

.fac-row {
    display: flex;
    gap: 6px;
}

.fac-search {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: var(--fac-field);
    color: var(--fac-text-3);
}

.fac-search:focus-within {
    border-color: var(--fac-accent);
}

.fac-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fac-text);
    font-size: 12px;
}

.fac-search input::placeholder {
    color: var(--fac-text-3);
}

.fac-select {
    flex: 1;
    min-width: 0;
    height: 28px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 2px;
    outline: 0;
    background: var(--fac-field);
    color: var(--fac-text);
    font-size: 12px;
}

.fac-select:focus {
    border-color: var(--fac-accent);
}

.fac-select option {
    background: #2a2a2a;
    color: #f5f5f5;
}

.fac-toggles {
    gap: 16px;
    padding: 4px 0 0;
}

.fac-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fac-text-2);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.fac-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fac-check span {
    position: relative;
    width: 14px;
    height: 14px;
    border: 1px solid var(--fac-line-2);
    border-radius: 2px;
    background: var(--fac-field);
}

.fac-check input:checked + span {
    border-color: var(--fac-accent);
    background: var(--fac-accent);
}

.fac-check input:checked + span::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.fac-check input:focus-visible + span {
    outline: 1px solid var(--fac-accent);
    outline-offset: 2px;
}

/* --- Lists ----------------------------------------------------------------- */

.fac-list {
    display: flex;
    flex-direction: column;
}

.fac-item,
.fac-doc,
.fac-summary-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 6px 16px;
    border: 0;
    border-left: 2px solid transparent;
    background: transparent;
    color: var(--fac-text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.12s;
}

.fac-item:hover,
.fac-doc:hover,
.fac-summary-btn:hover {
    background: var(--fac-hover);
}

.fac-item:focus-visible,
.fac-doc:focus-visible,
.fac-summary-btn:focus-visible {
    outline: 0;
    border-left-color: var(--fac-accent);
    background: var(--fac-hover);
}

.fac-summary-btn {
    width: calc(100% - 32px);
    margin: 4px 16px 0;
    padding: 8px 10px;
    border: 1px solid var(--fac-line-2);
    border-radius: 2px;
}

.fac-item-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.fac-item-title {
    overflow: hidden;
    color: var(--fac-text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fac-item-sub {
    overflow: hidden;
    color: var(--fac-text-3);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fac-item-sub:empty {
    display: none;
}

.fac-item-meta {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
}

.fac-item-count {
    min-width: 22px;
    color: var(--fac-text-2);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.fac-item-icon {
    display: inline-flex;
    color: var(--fac-text-2);
}

.fac-chevron {
    color: var(--fac-text-3);
}

.fac-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--tone);
}

.fac-chip {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--tone) 22%, transparent);
    color: var(--tone);
    font-size: 11px;
    line-height: 18px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.fac-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 14px 16px 0;
    color: var(--fac-text-3);
    font-size: 11px;
}

.fac-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- Navigation ------------------------------------------------------------ */

.fac-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 0 10px;
}

.fac-nav-actions {
    display: inline-flex;
    gap: 2px;
}

.fac-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--fac-accent);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}

.fac-link:hover {
    background: var(--fac-hover);
}

.fac-link .fac-icon {
    width: 14px;
    height: 14px;
}

.fac-more {
    margin: 12px 10px 0;
}

.fac-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--fac-text-2);
    cursor: pointer;
}

.fac-icon-btn:hover {
    background: var(--fac-hover);
    color: var(--fac-text);
}

/* --- Work order history ------------------------------------------------------ */

.fac-timeline {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    border-top: 1px solid var(--fac-line);
}

.fac-order {
    position: relative;
    border-bottom: 1px solid var(--fac-line);
}

.fac-order::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tone);
    opacity: 0.85;
}

.fac-order-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 9px 16px 9px 18px;
    border: 0;
    background: transparent;
    color: var(--fac-text);
    text-align: left;
    cursor: pointer;
}

.fac-order-head:hover,
.fac-order.is-open .fac-order-head {
    background: var(--fac-hover);
}

.fac-order-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fac-order-number {
    color: var(--fac-text-2);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.fac-order-date {
    color: var(--fac-text-3);
    font-size: 11px;
}

.fac-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: var(--tone);
    font-size: 11px;
}

.fac-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tone);
}

.fac-order-title {
    font-size: 12px;
}

.fac-order-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--fac-text-2);
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fac-order-meta {
    color: var(--fac-text-3);
    font-size: 11px;
}

.fac-order-meta:empty {
    display: none;
}

.fac-order-details {
    padding: 2px 16px 12px 18px;
    background: var(--fac-hover);
}

.fac-label {
    margin-top: 8px;
    color: var(--fac-text-3);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fac-text {
    margin: 4px 0 0;
    color: var(--fac-text);
    font-size: 12px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.fac-props {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 4px 10px;
    margin: 10px 0 0;
    font-size: 11px;
}

.fac-props dt {
    color: var(--fac-text-3);
}

.fac-props dd {
    margin: 0;
    color: var(--fac-text);
    overflow-wrap: anywhere;
}

/* --- Asset properties ------------------------------------------------------- */

.fac-tabs {
    display: flex;
    gap: 2px;
    margin-top: 10px;
    padding: 0 12px;
    border-bottom: 1px solid var(--fac-line);
}

.fac-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--fac-text-2);
    font-size: 12px;
    cursor: pointer;
}

.fac-tab:hover {
    color: var(--fac-text);
}

.fac-tab.is-active {
    border-bottom-color: var(--fac-accent);
    color: var(--fac-text);
}

.fac-tab-count {
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--fac-field);
    color: var(--fac-text-2);
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}

.fac-props-block {
    padding: 0 16px;
}

.fac-prop {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--fac-line);
    font-size: 12px;
}

.fac-prop:last-child {
    border-bottom: 0;
}

.fac-prop-name {
    color: var(--fac-text-3);
    overflow-wrap: anywhere;
}

.fac-prop-value {
    color: var(--fac-text);
    overflow-wrap: anywhere;
}

.fac-doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--fac-field);
    color: var(--fac-text-2);
}

.fac-doc-icon .fac-icon {
    width: 16px;
    height: 16px;
}

.fac-doc-icon.is-pdf {
    background: rgba(236, 74, 65, 0.16);
    color: #F27B74;
}

.fac-doc-icon.is-link {
    background: rgba(6, 150, 215, 0.16);
    color: #3DB0E6;
}

/* --- Document viewer -------------------------------------------------------- */

.fac-docviewer-bar {
    position: absolute;
    left: 0;
    right: 0;
    top: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 34px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--fac-line);
    background: rgba(34, 34, 34, 0.94);
    color: var(--fac-text-2);
    font-size: 12px;
}

.fac-docviewer-frame {
    position: absolute;
    left: 0;
    right: 0;
    top: 84px;
    bottom: 20px;
    width: 100%;
    height: calc(100% - 104px);
    border: 0;
    background: #525659;
}

.fac-docviewer .docking-panel-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

/* --- Pins --------------------------------------------------------------------- */

.fac-pin-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.fac-pin {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    will-change: transform;
}

.fac-pin-head {
    position: absolute;
    left: -12px;
    top: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--tone);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
    transition: transform 0.12s ease-out;
}

.fac-pin-count {
    color: #fff;
    font-family: ArtifaktElement, "Helvetica Neue", sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transform: rotate(45deg);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

.fac-pin:hover .fac-pin-head {
    transform: rotate(-45deg) scale(1.12);
}

.fac-pin.is-selected .fac-pin-head {
    box-shadow: 0 0 0 3px rgba(6, 150, 215, 0.85), 0 1px 4px rgba(0, 0, 0, 0.45);
    transform: rotate(-45deg) scale(1.18);
}

.fac-pin.is-selected {
    z-index: 1;
}

.fac-pin:focus-visible {
    outline: 0;
}

.fac-pin:focus-visible .fac-pin-head {
    box-shadow: 0 0 0 3px rgba(6, 150, 215, 0.85);
}

/* --- Desk occupancy -------------------------------------------------------- */

.fac-desk-hero {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fac-desk-pct {
    color: var(--fac-text);
    font-size: 28px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
}

.fac-desk-sub {
    color: var(--fac-text-2);
    font-size: 12px;
}

.fac-desk-bar {
    display: flex;
    gap: 2px;
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 3px;
}

.fac-desk-bar span {
    background: var(--tone);
    min-width: 0;
}

.fac-desk-legend {
    padding: 8px 0 0;
}

.fac-desk-legend b {
    color: var(--fac-text);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.fac-desk-slider input {
    width: 100%;
    accent-color: var(--fac-accent);
}

.fac-desk-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 96px;
    padding: 4px 16px 0;
}

.fac-desk-col {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 0 0 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.fac-desk-col-bar {
    display: block;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: rgba(6, 150, 215, 0.55);
    transition: background-color 0.12s;
}

.fac-desk-col:hover .fac-desk-col-bar {
    background: rgba(6, 150, 215, 0.8);
}

.fac-desk-col.is-current .fac-desk-col-bar {
    background: var(--fac-accent);
}

.fac-desk-col-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: var(--fac-text-3);
    font-size: 10px;
    text-align: center;
}

.fac-desk-area.is-selected {
    border-left-color: var(--fac-accent);
    background: rgba(6, 150, 215, 0.14);
}

.fac-desk-mini {
    position: relative;
    width: 56px;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--fac-field);
}

.fac-desk-mini span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #FAA21B;
}

.fac-desk-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 4px;
}

.fac-desk-peak {
    font-size: 13px;
    line-height: 1.6;
}

/* --- Space views ----------------------------------------------------------- */

.fac-space-tabs {
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.fac-space-tag {
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.2);
    color: #C99BFB;
    text-transform: lowercase;
}

.fac-space-ramp {
    height: 8px;
    margin-top: 10px;
    border-radius: 4px;
}

.fac-space-ramp-labels {
    display: flex;
    justify-content: space-between;
    padding-top: 4px;
    color: var(--fac-text-2);
    font-size: 11px;
}

.fac-space-compare {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.fac-space-note {
    padding-top: 6px;
    color: var(--fac-text-2);
    font-size: 11px;
}

.fac-space-total {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(34, 34, 34, 0.88);
    color: #eee;
    transform: translateX(-50%);
    pointer-events: none;
}

.fac-space-total[hidden] {
    display: none;
}

.fac-space-total-value {
    font-size: 24px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
}

.fac-space-total-label {
    color: #bbb;
    font-size: 11px;
    line-height: 1.3;
}

.fac-space .fac-item.is-selected {
    background: var(--fac-field);
    box-shadow: inset 2px 0 0 var(--fac-accent);
}

/* Document row with a "Show in model" action */
.fac-doc-row {
    display: flex;
    align-items: center;
    padding-right: 10px;
}

.fac-doc-row .fac-doc {
    flex: 1;
    min-width: 0;
}

/* --- Building F: pinned legend, toggle, summary strip ---------------------- */

/* Legend pinned to the bottom of a panel while its list scrolls. */
.bf-legend {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 14px 0 -16px;
    padding: 0 0 12px;
    border-top: 1px solid var(--fac-line-2);
    background: #262626;
}

/* Short content: the legend still sits at the very bottom of the panel. */
.fac-body:has(> .bf-legend) {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.fac-body > .bf-legend {
    margin-top: auto;
}

.light-theme .bf-legend {
    background: #f4f4f4;
}

.bf-legend .fac-legend {
    padding-top: 10px;
}

.bf-legend > .fac-space-ramp,
.bf-legend > .fac-space-ramp-labels {
    margin-left: 16px;
    margin-right: 16px;
}

.bf-legend.fac-legend {
    padding: 10px 16px 12px;
}

.bf-legend-note {
    flex-basis: 100%;
    color: var(--fac-text-3);
}

.bf-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 16px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fac-text-2);
    font-size: 12px;
    cursor: pointer;
}

.bf-toggle-track {
    position: relative;
    width: 26px;
    height: 14px;
    border-radius: 7px;
    background: var(--fac-line-2);
    transition: background 0.15s;
}

.bf-toggle-track i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.15s;
}

.bf-toggle.is-on {
    color: var(--fac-text);
}

.bf-toggle.is-on .bf-toggle-track {
    background: var(--fac-accent);
}

.bf-toggle.is-on .bf-toggle-track i {
    left: 14px;
}

/* Summary strip: three headline numbers at the top of the viewer. */
.bf-strip {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    /* Inside the viewer: above the model, below the docking panels (20) and toolbar. */
    z-index: 10;
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(30, 30, 30, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-family: ArtifaktElement, "Helvetica Neue", "Segoe UI Semilight", sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bf-strip-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 128px;
    padding: 6px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #f5f5f5;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.bf-strip-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bf-strip-value {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
}

.bf-strip-item[data-tone="warn"] .bf-strip-value {
    color: #FAA21B;
}

.bf-strip-item[data-tone="good"] .bf-strip-value {
    color: #87B340;
}

.bf-strip-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1100px) {
    .bf-strip { top: auto; bottom: 10px; left: 10px; transform: none; }
    .bf-strip-item { min-width: 0; padding: 4px 10px; }
}

/* Only the four Building F buttons in the custom toolbar group: model search and
   export stay loaded (code untouched) but their buttons are hidden for the demo. */
#model-search-btn,
#model-export-btn {
    display: none !important;
}
