/* ── Facility board (single-day, hour-granular grid; click-only, no drag&drop) ──────────── */
.fb-board {
    overflow-x: auto;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 14px;
    background: var(--mud-palette-surface);
    margin-top: 16px;
}

.fb-inner {
    min-width: calc(180px + var(--fb-hours) * 70px);
}

.fb-head-row,
.fb-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: stretch;
}

.fb-head-row {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--mud-palette-surface);
    box-shadow: 0 1px 0 var(--mud-palette-divider);
}

.fb-row {
    border-top: 1px solid var(--mud-palette-divider);
}

    .fb-row.row-alt {
        background: rgba(100, 116, 139, .035);
    }

.fb-cell-resource {
    position: sticky;
    left: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 8px 14px;
    border-right: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface);
    min-height: 56px;
}

    .fb-cell-resource .resource-name {
        font-weight: 800;
    }

    .fb-cell-resource small {
        color: var(--mud-palette-text-secondary);
    }

.fb-corner {
    font-weight: 800;
    color: var(--mud-palette-text-secondary);
}

.fb-hours-grid {
    display: grid;
    grid-template-columns: repeat(var(--fb-hours), minmax(70px, 1fr));
    height: 100%;
}

.fb-hourcol {
    text-align: center;
    padding: 8px 0;
    border-right: 1px solid var(--mud-palette-divider);
    font-size: .8rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
}

.fb-hours {
    position: relative;
    min-height: 56px;
}

.fb-hourbg {
    border-right: 1px solid var(--mud-palette-divider);
    min-height: 56px;
}

    .fb-hourbg.available { background: rgba(16, 185, 129, .10); }
    .fb-hourbg.occupied { background: rgba(239, 68, 68, .14); }
    .fb-hourbg.unavailable { background: var(--mud-palette-background-gray); }

    .fb-hourbg.clickable { cursor: pointer; }
    .fb-hourbg.clickable:hover {
        background: rgba(124, 58, 237, .10);
        box-shadow: inset 0 0 0 2px rgba(124, 58, 237, .20);
    }
    .fb-hourbg.selected {
        background: rgba(124, 58, 237, .18);
        box-shadow: inset 0 0 0 2px #7C3AED;
    }

.fb-bar {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 10px;
    overflow: hidden;
    white-space: nowrap;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .18), inset 0 0 0 1px rgba(255, 255, 255, .18);
    transition: filter .16s ease, box-shadow .16s ease;
}

    .fb-bar:hover {
        filter: brightness(.96);
        box-shadow: 0 6px 14px rgba(15, 23, 42, .24), inset 0 0 0 1px rgba(255, 255, 255, .28);
        z-index: 3;
    }

.fb-bar-text {
    overflow: hidden;
    text-overflow: ellipsis;
}
