/* ── Self-hosted DM Sans (variable weight 300-700) ── */
/* latin-ext */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Light mode tokens (Slate & Teal) ── */
:root {
    --sidebar-width: 260px;
    --color-primary: #0d9488;
    --color-primary-light: #14b8a6;
    --color-primary-dark: #0f766e;
    --color-primary-rgb: 13, 148, 136;
    --color-primary-light-rgb: 20, 184, 166;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #f43f5e;
    --color-info: #0ea5e9;
    --color-surface: #ffffff;
    --color-surface-alt: #f8fafc;
    --color-border: #e1ebed;
    --color-separator: #e1ebed;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-sidebar-bg: #0f2333;
    --color-sidebar-text: #a7d8d2;
    --color-sidebar-hover: #1a3550;
    --color-sidebar-active: var(--color-primary);
}

/* ── Dark mode overrides ── */
/* Applied when html.dark class is present (set by ThemeSwitcher or early-init script) */
html.dark {
--color-primary: #14b8a6;
--color-primary-light: #2dd4bf;
--color-primary-dark: #0d9488;
--color-primary-rgb: 20, 184, 166;
--color-primary-light-rgb: 45, 212, 191;
    --color-surface: #1e293b;
    --color-surface-alt: #0f172a;
    --color-border: #334155;
    --color-separator: var(--color-surface-alt);
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    color-scheme: dark;
}

/* Badges */
html.dark .badge-reserved       { background: rgba(251,191,36,0.22);  color: #fbbf24; }
html.dark .badge-available      { background: rgba(16,185,129,0.22);  color: #34d399; }
html.dark .badge-partly-available { background: rgba(251,191,36,0.22); color: #fbbf24; }
html.dark .badge-fully-booked   { background: rgba(239,68,68,0.22);   color: #f87171; }
html.dark .badge-occupied       { background: rgba(100,116,139,0.22); color: #94a3b8; }
html.dark .badge-booked         { background: rgba(139,92,246,0.22);  color: #a78bfa; }
html.dark .badge-checked-in { background: rgba(14,165,233,0.22);  color: #38bdf8; }
html.dark .badge-cancelled  { background: rgba(100,116,139,0.18); color: #94a3b8; }
html.dark .badge-expired    { background: rgba(244,63,94,0.15);   color: #fb7185; }
html.dark .badge-desk       { background: rgba(20, 184, 166, 0.22);  color: #5eead4; }
html.dark .badge-meeting    { background: rgba(14,165,233,0.22);  color: #38bdf8; }
html.dark .badge-parking    { background: rgba(251,191,36,0.22);  color: #fbbf24; }
html.dark .badge-shared     { background: rgba(139,92,246,0.22);  color: #c4b5fd; }

/* Alerts */
html.dark .alert-success { background: rgba(16,185,129,0.12);  color: #34d399; border-color: rgba(16,185,129,0.25); }
html.dark .alert-danger  { background: rgba(244,63,94,0.12);   color: #fb7185; border-color: rgba(244,63,94,0.25); }
html.dark .alert-info    { background: rgba(14,165,233,0.12);  color: #38bdf8; border-color: rgba(14,165,233,0.25); }
html.dark .alert-warning { background: rgba(251,191,36,0.12);  color: #fbbf24; border-color: rgba(251,191,36,0.25); }

/* Buttons */
html.dark .btn-secondary { background: #334155; color: #e2e8f0; }
html.dark .btn-secondary:hover:not(:disabled) { background: #475569; }
html.dark .btn-outline { border-color: var(--color-border); color: var(--color-text-muted); }
html.dark .btn-outline:hover:not(:disabled) { background: rgba(255,255,255,0.05); color: var(--color-text); }

/* Ghost action icon buttons – dark-mode hover fills */
html.dark .action-icon-btn.action-checkin:hover:not(:disabled) { color: #34d399; background: rgba(16,185,129,0.12);  border-color: rgba(16,185,129,0.25); }
html.dark .action-icon-btn.action-cancel:hover:not(:disabled)  { color: #fb7185; background: rgba(244,63,94,0.12);   border-color: rgba(244,63,94,0.25); }
html.dark .action-icon-btn.action-ical:hover:not(:disabled),
html.dark .action-icon-btn.action-teams:hover:not(:disabled)   { color: var(--color-primary); background: rgba(var(--color-primary-light-rgb), 0.12); border-color: rgba(var(--color-primary-light-rgb), 0.3); }
html.dark .action-icon-btn.action-delete:hover:not(:disabled)  { color: #fb7185; background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.25); }
html.dark .action-icon-btn.action-equipment-active             { color: #fbbf24; }
html.dark .action-icon-btn.action-equipment-active:hover:not(:disabled) { color: #fbbf24; background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.25); }

/* Modal / cancel detail box */
html.dark .cancel-booking-details { background: rgba(255,255,255,0.04); }



html, body {
    font-family: 'DM Sans', 'Google Sans', system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background-color: var(--color-surface-alt);
    margin: 0;
    padding: 0;
    height: 100%;
}

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Page layout */
.page {
    display: flex;
    min-height: 100vh;
}

.page .sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar-bg);
    color: var(--color-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
    transition: width 0.25s ease;
}

.page .sidebar::-webkit-scrollbar {
    width: 4px;
}

.page .sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.page .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
}

.page .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.22);
}

.page .main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-width: 0;
    transition: margin-left 0.25s ease;
}

.page.no-sidebar .main-content {
    margin-left: 0;
}

.page.no-sidebar .page-deco {
    left: 0;
}

/* Sidebar brand */
.sidebar-brand {
    padding: 1.25rem 1.5rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;

}

.sidebar-collapse-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.sidebar-collapse-toggle:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
}
.sidebar.collapsed .sidebar-collapse-toggle {
    display: none;
}
.sidebar-brand.clickable {
    cursor: pointer;
}
.sidebar-brand.clickable:hover {
    background: rgba(255,255,255,0.05);
}

.sidebar-expand-icon {
    display: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.95rem;
}
.sidebar.collapsed .sidebar-expand-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sidebar-brand .brand-logo {
    height: 1.5rem;
    width: auto;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}
.sidebar-brand-link:hover {
    color: inherit;
    text-decoration: none;
}

/* Sidebar logo bounce on page load */
.nav-logo-pin {
    transform-origin: 20px 26px;
    animation: nav-pin-bounce 1.6s ease-in-out 0.2s 1 both;
}

.nav-logo-dot {
    transform-origin: 20px 19px;
    animation: nav-dot-jelly 1.6s ease-in-out 0.3s 1 both;
}

@keyframes nav-pin-bounce {
    0% {
        transform: translateY(0);
    }
    15% {
        transform: translateY(-10px);
    }
    30% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    50%, 100% {
        transform: translateY(0);
    }
}

@keyframes nav-dot-jelly {
    0% {
        transform: translateY(0) scaleY(1) scaleX(1);
    }
    10% {
        transform: translateY(2px) scaleY(0.85) scaleX(1.12);
    }
    20% {
        transform: translateY(-12px) scaleY(1.15) scaleX(0.9);
    }
    35% {
        transform: translateY(2px) scaleY(0.9) scaleX(1.08);
    }
    45% {
        transform: translateY(-5px) scaleY(1.08) scaleX(0.95);
    }
    55%, 100% {
        transform: translateY(0) scaleY(1) scaleX(1);
    }
}

/* Sidebar nav */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 0;
}

.sidebar-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin: 0.25rem 0.75rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.08);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    overflow: hidden;
}

.sidebar-profile-card:hover {
    background: rgba(255,255,255,0.14);
}

.sidebar-profile-avatar {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--color-primary, #14b8a6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.sidebar-profile-avatar-img {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-profile-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-email {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-menu {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
}

.sidebar-profile-menu:hover {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
}

.sidebar-bottom-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.25rem 1.5rem;
}

.sidebar-user {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

a.sidebar-user:hover {
    background: var(--color-sidebar-hover);
}

a.sidebar-user:hover .sidebar-user-name {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sidebar-user-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.sidebar-user-name i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-edit {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.15s;
}

a.sidebar-user:hover .sidebar-user-edit {
    opacity: 0.7;
}

.sidebar-user-nav {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user-nav .nav-item a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group-label {
    padding: 0.75rem 1.5rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: color 0.15s;
}

.nav-group-label:hover {
    color: rgba(255,255,255,0.6);
}

.nav-group-chevron {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-group-chevron.collapsed {
    transform: rotate(-90deg);
}

.nav-item {
    display: block;
}

.nav-item a,
.nav-item .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--color-sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.nav-item a:hover,
.nav-item .nav-link:hover {
    background-color: var(--color-sidebar-hover);
    color: #fff;
}

.nav-item a.active,
.nav-item .nav-link.active {
    background-color: rgba(var(--color-primary-light-rgb), 0.18);
    color: #fff;
    border-left-color: var(--color-sidebar-active);
}

.nav-icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--color-text);
}

.page-header p {
    color: var(--color-text-muted);
    margin: 0;
}

/* Card styles */
.card {
    background: var(--color-surface);
    border-radius: 0.375rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--color-separator);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-body {
    padding: 1.5rem;
}

/* Table styles */
.table-container {
    overflow-x: auto; overflow-y: visible;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-separator);
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-separator);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:not(:has(.empty-state)):hover {
    background: var(--color-surface-alt, #f7fafc);
}

/* Paging bar */
.paging-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-top: 2px solid var(--color-separator);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.paging-bar:first-child {
    border-top: none;
    border-bottom: 2px solid var(--color-separator);
}

/* Booking tabs – Material Design 3 pill style */
.booking-tabs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 0.1rem;
    background: var(--color-surface);
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    width: fit-content;
}

.booking-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.84rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    line-height: 1.4;
}

.booking-tab i {
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
}

.booking-tab:hover:not(.active) {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.booking-tab.active {
    color: #fff;
    background: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(var(--color-primary-rgb), 0.3);
}

html.dark .booking-tabs {
    background: var(--color-surface-alt);
    border-color: var(--color-border);
}

html.dark .booking-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06);
}

html.dark .booking-tab.active {
    box-shadow: 0 1px 6px rgba(var(--color-primary-light-rgb), 0.35);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--color-text);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #cbd5e1;
}

.btn-danger {
    background-color: var(--color-danger);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--color-success);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background-color: #16a34a;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-text-muted);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--color-surface-alt);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.8rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.form-select {
    appearance: none;
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-surface) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/12px 12px;
    color: var(--color-text);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.form-inline {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.badge-available {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-partly-available {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-reserved {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-fully-booked {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-occupied {
    background-color: #e2e8f0;
    color: #475569;
}

.badge-restricted {
    background-color: #e2e8f0;
    color: #475569;
}

.badge-booked {
    background-color: #ede9fe;
    color: #6d28d9;
}

.badge-checked-in {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-cancelled {
    background-color: #f1f5f9;
    color: #64748b;
}

.badge-expired {
    background-color: #ffe4e6;
    color: #9f1239;
}

.badge-desk {
    background-color: rgba(13, 148, 136, 0.12);
    color: #0f766e;
}

.badge-meeting {
    background-color: #e0f2fe;
    color: #075985;
}

.badge-parking {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-shared {
    background-color: #ede9fe;
    color: #6d28d9;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    vertical-align: middle;
    white-space: nowrap;
}
.badge-shared i { margin-right: 0.15rem; }

/* ── Booking wizard steps — inline number + label, value row always reserved ── */
.wizard-filter-toggle {
    display: none;
}

.wizard-steps {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 2rem;
    flex: 1;
    min-width: 0;
}

.wizard-step {
    flex: 1;
    display: grid;
    grid-template-areas:
        "num label"
        ".   value";
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1rem;
    column-gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background 0.2s;
    cursor: default;
}

/* Connecting lines — none */
.wizard-step::before,
.wizard-step::after {
    display: none;
}

/* ── Active & completed segment fills ── */
.wizard-step.active {
    background-color: var(--color-primary);
}

.wizard-step.completed {
    background-color: rgba(var(--color-primary-rgb), 0.1);
    cursor: pointer;
}

.wizard-step.completed:hover {
    background-color: rgba(var(--color-primary-rgb), 0.17);
}

/* ── Step number badge ── */
.wizard-step-number {
    grid-area: num;
    align-self: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.wizard-step.active .wizard-step-number {
    color: rgba(255, 255, 255, 0.75);
}

.wizard-step.completed .wizard-step-number {
    color: var(--color-primary-light);
}

/* ── Step label (inline with number) ── */
.wizard-step-label {
    grid-area: label;
    align-self: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1;
}

.wizard-step.active .wizard-step-label {
    color: #fff;
    font-weight: 600;
}

.wizard-step.completed .wizard-step-label {
    color: var(--color-text);
    font-weight: 500;
}

/* ── Selected value (always in reserved row, teal colour) ── */
.wizard-step-value {
    grid-area: value;
    align-self: start;
    font-size: 0.7rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.wizard-step.active .wizard-step-value {
    color: rgba(255, 255, 255, 0.8);
}

.wizard-step.completed .wizard-step-value {
    color: var(--color-primary-dark);
}

html.dark .wizard-step.completed           { background-color: rgba(var(--color-primary-light-rgb), 0.14); }
html.dark .wizard-step.completed:hover     { background-color: rgba(var(--color-primary-light-rgb), 0.22); }
html.dark .wizard-step.completed .wizard-step-value { color: var(--color-primary-light); }







/* Resource cards for booking */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.resource-card {
    background: var(--color-surface-alt);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.resource-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.1);
    z-index: 10;
}

.resource-card.selected {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
}

.resource-card.unavailable {
    cursor: not-allowed;
    color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.resource-card.unavailable .resource-name,
.resource-card.unavailable .resource-meta,
.resource-card.unavailable .resource-card-occupant,
.resource-card.unavailable .resource-eq-chip,
.resource-card.unavailable .resource-card-booking-slot,
.resource-card.unavailable .resource-equipment-row,
.resource-card.unavailable .badge {
    opacity: 0.5;
}
.resource-card.unavailable:hover {
    z-index: 10;
    position: relative;
}
.resource-card.unavailable .eq-more-popup,
.resource-card.unavailable .eq-more-popup .resource-eq-chip,
.resource-card.unavailable .booking-popup {
    opacity: 1;
    color: var(--color-text);
}

.resource-card .resource-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.resource-card .badge + .badge {
    margin-left: 0.35rem;
}

.resource-card .resource-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.resource-card .badge {
    max-width: 48%;
    min-width: 0;
}

/* Booked time slots inside resource cards */
.resource-card-occupant {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: var(--color-surface-alt, #f7fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
}

.resource-card-bookings {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.resource-card-booking-slot {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--color-text);
    padding: 0.3rem 0.45rem;
    border-radius: 0.3rem;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    font-weight: 500;
}

.resource-card-booking-slot .booking-date-label {
    font-weight: 600;
    font-size: 0.72rem;
    white-space: nowrap;
}

.resource-card-booking-slot .booking-time-label {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.resource-card-booking-slot.today {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.booking-date-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.8);
}

.resource-card-booking-slot.today .booking-date-badge,
.booking-date-badge.booking-date-today {
    background: rgba(245, 158, 11, 0.15);
    color: rgba(180, 110, 0, 0.9);
}

.resource-card-booking-slot .booking-user-name {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    display: none;
    align-items: center;
    gap: 0.2rem;
    cursor: default;
}

/* Booking slot hover popup */
.resource-card-booking-slot.has-popup {
    position: relative;
    cursor: default;
}

.resource-card-booking-slot .booking-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    min-width: 240px;
    max-width: 300px;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0.85rem;
    pointer-events: none;
}

.resource-card-booking-slot .booking-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-surface, #fff);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
}

.resource-card-booking-slot .booking-popup::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--color-border);
}

.resource-card-booking-slot.has-popup:hover .booking-popup {
    display: block;
}

.booking-popup-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--color-border);
}

.booking-popup-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.booking-popup-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary, #0d9488);
    flex-shrink: 0;
}

.booking-popup-user {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.booking-popup-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-popup-email {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-popup-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.booking-popup-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.booking-popup-row i {
    font-size: 0.85rem;
    color: var(--color-primary, #0d9488);
    flex-shrink: 0;
}

/* Inline booking list for floorplan popup */
.fp-booking-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.fp-booking-inline {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.fp-booking-inline .booking-popup-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.fp-booking-inline .booking-popup-details {
    gap: 0.25rem;
}

/* Equipment chips on resource cards */
.resource-equipment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.45rem;
}

.resource-eq-chip {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #1e40af;
    background: #dbeafe;
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
    white-space: nowrap;
    cursor: default;
}

html.dark .resource-eq-chip {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
}

.eq-more-chip {
    position: relative;
    cursor: pointer;
}

.eq-more-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.35rem);
    left: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.4rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 20;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: max-content;
}

.eq-more-chip:hover .eq-more-popup {
    display: flex;
}

.resource-card:has(.eq-more-chip:hover) {
    z-index: 20;
}

/* Equipment filter multiselect on Book page */
.eq-multiselect-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1050;
}

.eq-multiselect-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.eq-multiselect-toggle {
    cursor: pointer;
    white-space: nowrap;
}

.eq-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    min-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #dee2e6);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 0.35rem 0;
    margin-top: 2px;
}

.eq-multiselect-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.eq-multiselect-item:hover {
    background: var(--color-surface-alt, #f7fafc);
}

.eq-multiselect-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.eq-multiselect-cat {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--color-text-muted, #718096);
}

.eq-multiselect-clear {
    border-top: 1px solid var(--color-border, #dee2e6);
    padding: 0.35rem 0.75rem;
    text-align: center;
}
.eq-multiselect-clear button {
    background: none;
    border: none;
    color: var(--color-text-muted, #718096);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.15rem 0;
    width: 100%;
}
.eq-multiselect-clear button:hover {
    color: var(--color-danger, #f43f5e);
}

/* Equipment filter multiselect on Resources page */
.multiselect-wrap {
    position: relative;
    display: inline-block;
    z-index: 1050;
}

.multiselect-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.multiselect-toggle {
    cursor: pointer;
    white-space: nowrap;
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    min-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #dee2e6);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 0.35rem 0;
    margin-top: 2px;
}

.multiselect-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.multiselect-item:hover {
    background: var(--color-surface-alt, #f7fafc);
}

.multiselect-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Time conflict warning & booked slots reference (step 5) */
.time-conflict-warning {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-danger);
}

.confirm-when-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.confirm-when-label i {
    color: var(--color-primary);
    font-size: 0.85rem;
}

.confirm-when-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.confirm-when-date-part {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.confirm-when-presets-row {
    padding: 0;
    margin-top: 0.875rem;
}

.book-or-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.75rem 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.book-or-divider::before,
.book-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-separator);
    max-width: 3rem;
}

.recurring-form-separator {
    height: 1px;
    background: var(--color-separator);
    margin: 0.35rem 0;
}

.recurring-booking-hint {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0.4rem 0 0;
    line-height: 1.5;
}

.recurring-summary-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.625rem;
}

.recurring-summary-line i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.confirm-time-pair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.confirm-time-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.confirm-time-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.confirm-when-date-part input[type="date"],
.confirm-time-pair input[type="time"] {
    width: auto;
}

html.dark input[type="date"],
html.dark input[type="time"] {
    color-scheme: dark;
}

html.dark input[type="date"]::-webkit-calendar-picker-indicator,
html.dark input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
    cursor: pointer;
}

/* ── Custom Date & Time Pickers ── */

.custom-picker {
    position: relative;
    display: inline-block;
}

.custom-picker-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
    user-select: none;
}

.custom-picker-trigger i {
    font-size: 0.95rem;
    color: var(--color-primary);
    flex-shrink: 0;
    line-height: 1;
}

.custom-picker-display {
    font-variant-numeric: tabular-nums;
}

.custom-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.custom-picker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1050;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
}

.custom-picker-dropdown.dp-flip {
    top: auto;
    bottom: calc(100% + 4px);
}

/* ── Date Picker Calendar ── */

.dp-calendar {
    width: 280px;
    padding: 0.5rem;
}

.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.25rem 0.5rem;
}

.dp-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.85rem;
}

.dp-nav-btn:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
}

.dp-month-year-btn {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
    text-transform: capitalize;
}

.dp-month-year-btn:hover {
    background: var(--color-surface-alt);
}

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--color-separator);
    margin-bottom: 0.25rem;
}

.dp-weekdays span.dp-weekend {
    opacity: 0.45;
}

.dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.dp-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    padding: 0;
    font-variant-numeric: tabular-nums;
}

.dp-day:hover:not(:disabled) {
    background: var(--color-surface-alt);
}

.dp-day:disabled {
    color: var(--color-text-muted);
    opacity: 0.35;
    cursor: not-allowed;
}

.dp-day.dp-other {
    color: var(--color-text-muted);
    opacity: 0.4;
}

.dp-day.dp-today {
    font-weight: 700;
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1.5px var(--color-primary);
}

.dp-day.dp-weekend:not(.dp-selected):not(.dp-other) {
    color: var(--color-text-muted);
    opacity: 0.55;
}

.dp-day.dp-booked:not(.dp-selected) {
    box-shadow: inset 0 0 0 1.5px var(--color-warning);
}

.dp-day.dp-booked.dp-today:not(.dp-selected) {
    box-shadow: inset 0 0 0 1.5px var(--color-warning), inset 0 0 0 3px var(--color-surface), inset 0 0 0 4.5px var(--color-primary);
}

.dp-day.dp-selected {
    background: var(--color-primary) !important;
    color: #fff !important;
    font-weight: 700;
    opacity: 1;
}

.dp-footer {
    display: flex;
    justify-content: center;
    padding: 0.35rem 0 0.15rem;
    border-top: 1px solid var(--color-separator);
    margin-top: 0.25rem;
}

.dp-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.dp-today-btn:hover {
    background: rgba(var(--color-primary-rgb), 0.08);
}

.dp-today-btn i {
    font-size: 0.85rem;
    line-height: 1;
}

/* Month grid (year/month view) */
.dp-months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    padding: 0.5rem 0.25rem;
}

.dp-month-cell {
    padding: 0.5rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    text-transform: capitalize;
}

.dp-month-cell:hover {
    background: var(--color-surface-alt);
}

.dp-month-cell.dp-selected {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

/* ── Time Picker ── */

.tp-list {
    width: 120px;
    max-height: 240px;
    overflow-y: auto;
    padding: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.tp-list::-webkit-scrollbar {
    width: 4px;
}

.tp-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.tp-slot {
    display: block;
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--color-text);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s;
    font-family: inherit;
}

.tp-slot:hover {
    background: var(--color-surface-alt);
}

.tp-slot.tp-selected {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

/* Dark mode tweaks for custom pickers */
html.dark .custom-picker-dropdown {
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.booked-slots-reference {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.booked-slots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.booked-slot-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.booked-slot-chip.today {
    background: var(--color-surface-alt);
    border-color: var(--color-border);
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Quick-select buttons */
.quick-select-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.quick-select-btn:hover {
    border-color: var(--color-primary-light);
    background: rgba(var(--color-primary-rgb), 0.04);
}

.quick-select-btn.active {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
    color: var(--color-primary);
}

.quick-select-hint {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Weekday label next to date picker */
.booking-weekday {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary, #4a6fa5);
    white-space: nowrap;
    text-transform: capitalize;
}

/* Recurring booking section */
.recurring-section {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
}

.recurring-options {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.weekday-chips {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.weekday-chip {
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.weekday-chip:hover {
    border-color: var(--color-primary-light);
}

.weekday-chip.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

html.dark .weekday-chip:not(.active) {
    color: var(--color-text-muted);
}

.recurring-preview {
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.4rem;
    font-size: 0.85rem;
}

.recurring-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.recurring-date-remove {
    all: unset;
    cursor: pointer;
    margin-left: 0.25rem;
    font-size: 0.6rem;
    opacity: 0.5;
    line-height: 1;
    vertical-align: middle;
}

.recurring-date-remove:hover {
    opacity: 1;
    color: var(--color-danger, #f43f5e);
}

/* Selection list for booking flow */
.selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--color-surface-alt);
    border: 2px solid var(--color-border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}


.selection-item:hover {
    border-color: var(--color-primary-light);
    background-color: rgba(var(--color-primary-rgb), 0.05);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.08);
}

.selection-item.selected {
    border-color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.07);
}

.selection-item .item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.selection-item .item-name {
    font-weight: 600;
}

.selection-item .item-detail {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.selection-item .item-arrow {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--color-primary);
    font-size: 1rem;
}

/* Alert / message */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
}

.filter-bar .card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
}

.filter-divider {
    width: 1px;
    height: 1.4rem;
    background: var(--color-border);
    margin: 0 0.15rem;
    flex-shrink: 0;
}

.filter-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.filter-section-row {
    align-items: center;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Compact input/select that matches chip height for use inside filter bars */
.filter-input,
.filter-select {
    padding: 0.22rem 0.65rem;
    font-size: 0.78rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-surface);
    color: var(--color-text);
    min-width: 9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.12);
}

.filter-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.filter-select {
    appearance: none;
    padding-right: 1.75rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 10px 10px;
    cursor: pointer;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.filter-chip.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* Loading spinner */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.75rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    line-height: 1;
}

.empty-state p {
    margin: 0;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

/* ─── Flyout Panel (right-side drawer) ─── */
.flyout-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 201;
    animation: flyout-slide-in 0.25s ease-out;
}

@keyframes flyout-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.flyout-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flyout-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.flyout-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flyout-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-dialog {
    background: var(--color-surface);
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0.25rem;
}

/* Floor plan picker (load dialog) */
.fp-picker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
}

.fp-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s;
}

.fp-picker-item:last-child { border-bottom: none; }
.fp-picker-item:hover { background: var(--color-bg); }

.fp-picker-item .fp-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.fp-picker-item .fp-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.fp-picker-item .fp-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.fp-badge.draft { background: #fefcbf; color: #975a16; }
.fp-badge.assigned { background: #c6f6d5; color: #276749; }

.fp-picker-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted);
}

.fp-picker-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 0;
}

.fp-picker-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--color-text-muted);
    transition: color 0.15s, border-color 0.15s;
}

.fp-picker-tab:hover { color: var(--color-text); }
.fp-picker-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ── Mobile Navigation Toggle ── */

.mobile-topbar {
    display: none;
}

.mobile-nav-toggle {
    display: flex;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background-color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.mobile-nav-toggle:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
}

html.dark .mobile-nav-toggle {
    background: var(--color-sidebar-bg);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

html.dark .mobile-nav-toggle:hover {
    background: var(--color-sidebar-hover);
    color: #fff;
}

.mobile-topbar-actions {
    display: none;
}

.hamburger-icon {
    line-height: 1;
}

.sidebar-overlay {
    display: none;
}

/* ── Collapsed sidebar ── */
.sidebar.collapsed {
    width: 60px;
}

.page:has(.sidebar.collapsed) .main-content {
    margin-left: 60px;
}

.page:has(.sidebar.collapsed) .page-deco {
    left: 60px;
}

.page:has(.sidebar.collapsed) .book-continue-overlay {
    left: 60px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-text {
    display: none;
}

/* Collapse group labels into thin separators when sidebar is collapsed */
.sidebar.collapsed .nav-group-label {
    font-size: 0;
    padding: 0;
    margin: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.4rem 0.75rem;
    overflow: hidden;
    letter-spacing: 0;
}

.sidebar.collapsed .nav-group-label .nav-group-chevron {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 1.25rem 0.5rem;
}

.sidebar.collapsed .sidebar-brand .brand-logo {
    display: none;
}

.sidebar.collapsed .nav-item a,
.sidebar.collapsed .nav-item .nav-link {
    justify-content: center;
    padding: 0.6rem;
    border-left-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-icon {
    width: auto;
    margin: 0;
}

.sidebar.collapsed .sidebar-bottom {
    padding: 0.5rem 0;
}

.sidebar.collapsed .sidebar-profile-card {
    justify-content: center;
    padding: 0.6rem;
    margin: 0.25rem 0.5rem;
    background: transparent;
}

.sidebar.collapsed .sidebar-profile-card:hover {
    background: rgba(255,255,255,0.08);
}

.sidebar.collapsed .sidebar-profile-info,
.sidebar.collapsed .sidebar-profile-menu {
    display: none;
}


/* Responsive */
@media (max-width: 768px) {
    .book-wizard-card {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .book-wizard-card > .card-body {
        padding: 0 !important;
    }

    .book-wizard-card .confirm-section-row {
        padding: 0;
        border-bottom: none;
    }

    .confirm-sections > .confirm-section-row + .confirm-section-row {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--color-separator);
    }

    .book-location-heading,
    .book-wizard-heading {
        display: none;
    }

    .wizard-back-inline {
        display: none;
    }



    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        padding: 0.5rem 0.75rem;
        background: var(--color-sidebar-bg);
        border-bottom: none;
        color: #fff;
    }
    .mobile-topbar .mobile-nav-toggle {
        background: transparent;
        border: none;
        color: #fff;
        box-shadow: none;
    }
    .mobile-topbar .mobile-nav-toggle:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }
    .mobile-topbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: inherit;
        text-decoration: none;
    }
    .mobile-topbar-brand-text {
        font-weight: 700;
        font-size: 1.25rem;
        color: #fff;
        letter-spacing: -0.01em;
    }

    .mobile-topbar-actions {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .page-topbar {
        display: none !important;
    }

    .page-deco {
        display: none;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .page .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: var(--sidebar-width);
    }

    .page .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .sidebar-collapse-toggle,
    .sidebar-expand-icon {
        display: none !important;
    }

    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .nav-text {
        display: inline !important;
    }

    .sidebar.collapsed .brand-logo {
        display: inline !important;
    }

    .sidebar.collapsed .nav-group-label {
        font-size: inherit !important;
        padding: 0.75rem 1.5rem 0.35rem !important;
        margin: 0 !important;
        height: auto !important;
        background: none !important;
        overflow: visible !important;
        letter-spacing: 0.06em !important;
    }

    .sidebar.collapsed .sidebar-brand {
        justify-content: flex-start !important;
        padding: 1.25rem 1.5rem !important;
    }

    .sidebar.collapsed .nav-item a,
    .sidebar.collapsed .nav-item .nav-link {
        justify-content: flex-start !important;
        padding: 0.5rem 1.5rem !important;
        border-left-width: 3px !important;
        overflow: visible !important;
    }

    .sidebar.collapsed .nav-icon {
        width: 1.5rem !important;
        margin: 0 !important;
    }

    .page .sidebar.open {
        transform: translateX(0);
    }

    .page .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* ── Wizard steps: compact horizontal breadcrumb on mobile ── */
    .wizard-steps-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .wizard-steps {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.25rem;
        margin-bottom: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.1rem;
        flex: 1;
        min-width: 0;
    }

    .wizard-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .wizard-steps::-webkit-scrollbar {
        display: none;
    }

    /* Hide future (not active, not completed) steps entirely */
    .wizard-step:not(.active):not(.completed) {
        display: none;
    }

    .wizard-step {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.3rem 0.65rem;
        border-radius: 9999px;
        min-width: 0;
        white-space: nowrap;
    }

    .wizard-step-number {
        font-size: 0.78rem;
        line-height: 1;
    }

    /* Completed steps: show value (not label) */
    .wizard-step.completed .wizard-step-label {
        display: none;
    }

    .wizard-step.completed .wizard-step-value {
        font-size: 0.75rem;
        margin: 0;
        color: var(--color-primary);
        font-weight: 600;
    }

    /* Active step: show label, hide value */
    .wizard-step.active .wizard-step-label {
        font-size: 0.75rem;
        font-weight: 600;
    }

    .wizard-step.active .wizard-step-value {
        display: none;
    }

    .wizard-step-value {
        font-size: 0.7rem;
    }

    /* ── Hide back button rows on mobile — breadcrumb chips navigate back ── */
    .confirm-section-row:has(> .btn-outline:only-child) {
        display: none;
    }

    /* ── Compact selection items ── */
    .selection-item {
        padding: 0.6rem 0.85rem;
        border-width: 1px;
        border-radius: 0.5rem;
    }

    .selection-item .item-name {
        font-size: 0.88rem;
    }

    .selection-item .item-detail {
        font-size: 0.72rem;
    }

    .selection-list {
        gap: 0.35rem;
    }

    /* ── Compact step content heading ── */
    .confirm-section-row h3 {
        font-size: 0.92rem;
        margin: 0 0 0.5rem !important;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .card-header .filter-bar {
        flex: 1 1 100%;
        margin: 0;
    }

    .card-header-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0.3rem;
    }

    /* Hide bulk export icons on mobile — per-item actions are in the action bar */
    .card-header-actions .action-icon-btn {
        display: none;
    }

    .filter-count {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .filter-input,
    .filter-select {
        flex: 1 1 100%;
        min-width: 0;
    }

    .btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .paging-bar {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }

    .booking-tabs {
        width: 100%;
    }

    .booking-tab {
        flex: 1;
        justify-content: center;
        padding: 0.45rem 0.5rem;
        font-size: 0.78rem;
    }

    /* ── Fix filter bar layout on mobile ── */
    .filter-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filter-bar .form-select,
    .filter-bar .form-control {
        flex: 1 1 100%;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .filter-bar .filter-count {
        margin-left: auto;
    }

    .filter-section {
        min-width: 0;
        flex: 1 1 100%;
    }

    .filter-divider {
        display: none;
    }

    .book-step-filter {
        padding: 0.75rem 0;
    }

    .book-step-filter h3 {
        font-size: 0.88rem;
        margin-bottom: 0.5rem;
    }

    .book-step-header {
        display: none !important;
    }

    .book-step-section {
        padding: 0.75rem 0;
    }

    /* ── Step 4: collapsible mobile filter ── */
    .desktop-filter-title,
    .desktop-filter-bar {
        display: none;
    }

    .mobile-filter-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        flex-wrap: nowrap;
    }

    .mobile-filter-header .filter-section {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    .mobile-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .mobile-filter-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.1rem;
        height: 1.1rem;
        border-radius: 9999px;
        background: var(--color-primary);
        color: #fff;
        font-size: 0.62rem;
        font-weight: 700;
        line-height: 1;
    }

    .mobile-filter-sheet-overlay {
        position: fixed;
        inset: 0;
        z-index: 1070;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .mobile-filter-sheet {
        width: 100%;
        max-height: 80vh;
        background: var(--color-surface);
        border-radius: 0.75rem 0.75rem 0 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: bookSlideUp 0.25s ease-out;
    }

    .mobile-filter-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--color-border);
        flex-shrink: 0;
    }

    .mobile-filter-sheet-title {
        font-size: 0.95rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .mobile-filter-sheet-title i {
        color: var(--color-primary);
    }

    .mobile-filter-sheet-body {
        padding: 1rem;
        overflow-y: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mobile-filter-sheet-body .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        flex: 0 0 auto;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .mobile-filter-sheet-body .filter-section:first-child {
        padding-top: 0;
    }

    /* Remove border from the last visible section (the one before the hidden clear-button section) */
    .mobile-filter-sheet-body .filter-section:nth-last-child(2),
    .mobile-filter-sheet-body .filter-section:last-child {
        border-bottom: none;
    }

    /* Hide the inline clear button inside the sheet — footer has its own */
    .mobile-filter-sheet-body .filter-section:has(> .action-icon-btn) {
        display: none;
    }

    .mobile-filter-sheet-body .filter-label {
        font-size: 0.78rem;
        font-weight: 600;
    }

    .mobile-filter-sheet-body .filter-input {
        width: 100%;
        min-width: 0;
    }

    .mobile-filter-sheet-body .filter-chips {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .mobile-filter-sheet-footer {
        display: flex;
        align-items: stretch;
        gap: 0.35rem;
        width: 100%;
        padding: 0.5rem 0.75rem;
        border-top: 2px solid var(--color-primary);
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        flex-shrink: 0;
    }

    html.dark .mobile-filter-sheet-footer {
        background: rgba(15, 23, 42, 0.97);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
    }

    .mobile-filter-sheet-footer > .action-icon-btn {
        flex: 1;
        width: 0;
        min-width: 0;
        height: auto;
        padding: 0.45rem 0.25rem;
        font-size: 1.1rem;
        border-radius: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
    }

    .mobile-filter-sheet-footer .action-label {
        display: block;
        font-size: 0.62rem;
        font-weight: 500;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .mobile-filter-sheet-footer .mobile-filter-apply-btn {
        color: var(--color-primary);
        font-weight: 700;
    }

    /* Equipment dropdown opens upward inside the mobile filter sheet */
    .mobile-filter-sheet-body .eq-multiselect-dropdown {
        bottom: 100%;
        top: auto;
        margin-bottom: 0.25rem;
        margin-top: 0;
        max-height: 40vh;
    }

/* Equipment filter chips: gap + clear chip styling */
.eq-multiselect-wrap {
    gap: 0.35rem;
}

.eq-clear-chip {
    background: var(--color-surface-alt, #e5e7eb) !important;
    border-color: var(--color-border, #d1d5db) !important;
    color: var(--color-text-muted, #6b7280) !important;
}

.eq-clear-chip i {
    font-size: 0.7em;
}

    .mobile-filter-reset {
        flex-shrink: 0;
    }

    .book-step-filter {
        padding: 0.6rem 0 !important;
        border-bottom: none !important;
    }

    /* ── Step 4: compact resource cards ── */
    .resource-card {
        padding: 0.75rem 0.85rem;
        border-radius: 0.5rem;
        border: 1px solid var(--color-border);
    }

    .resource-card .resource-name {
        font-size: 0.88rem;
        margin-bottom: 0.25rem;
    }

    .resource-card .resource-meta {
        font-size: 0.75rem;
    }

    .resource-card-bookings {
        margin-top: 0.35rem;
        padding-top: 0.35rem;
    }

    .resource-card-booking-slot {
        font-size: 0.7rem;
        padding: 0.2rem 0.35rem;
    }

    .resource-equipment-row {
        margin-top: 0.25rem;
    }

    .resource-eq-chip {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Compact card badges: icon-only on mobile */
    .resource-card .badge {
        font-size: 0;
        padding: 0.2rem;
        min-width: 1.4rem;
        min-height: 1.4rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .resource-card .badge::before {
        font-family: 'Phosphor';
        font-size: 0.75rem;
    }

    .resource-card .badge-desk::before { content: '\ed16'; }
    .resource-card .badge-meeting::before { content: '\e4d6'; }
    .resource-card .badge-parking::before { content: '\e112'; }
    .resource-card .badge-available::before { content: '\e182'; }
    .resource-card .badge-partly-available::before { content: '\e19a'; }
    .resource-card .badge-fully-booked::before { content: '\e4f6'; }
    .resource-card .badge-occupied::before { content: '\e4c2'; }
    .resource-card .badge-restricted::before { content: '\e2fa'; }

    /* Hide booking slots & equipment on compact cards */
    .resource-card-bookings,
    .resource-card-occupant,
    .resource-equipment-row {
        display: none;
    }

    .book-step-content {
        padding: 0 !important;
        padding-bottom: 3.5rem !important;
        background: transparent !important;
        border-radius: 0;
    }

    /* ── User switcher: full-width on mobile ── */
    .user-switcher {
        flex: 1 1 100%;
    }

    .user-switcher-btn {
        width: 100%;
        justify-content: space-between;
        padding: 0.45rem 0.75rem;
        border: 1px solid var(--color-border);
        border-radius: 0.375rem;
        background: var(--color-surface-alt);
    }

    .user-switcher-dropdown {
        left: 0;
        right: 0;
        min-width: unset;
    }

    /* ── Book page step 4: view toggle icons only ── */
    .view-toggle-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    .view-toggle-btn span,
    .view-toggle-btn:not(:has(i)) {
        /* keep text visible — icons + labels both fit at smaller size */
    }

    /* ── Book page step 4: filter bar stacks vertically ── */
    .book-step-filter .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .book-step-filter .filter-bar .filter-section {
        flex: 1 1 100%;
    }

    .book-step-filter .filter-bar .filter-input {
        flex: 1;
        min-width: 0;
    }

    /* ── Book page step 5: confirm section padding ── */
    .confirm-section-row {
        padding: 1rem;
    }

    /* Hide back button row on mobile (moved to action bar) */
    .confirm-header-row > .btn-outline {
        display: none;
    }

    /* Hide headline on mobile */
    .confirm-heading {
        display: none;
    }

    /* Hide weekday label after date picker (already shown inside picker) */
    .desktop-only {
        display: none;
    }

    /* Breadcrumb: path items inline, resource on its own row */
    .confirm-breadcrumb {
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.75rem;
    }

    .confirm-bc-sep {
        display: flex;
    }

    .confirm-bc-item {
        font-size: 0.75rem;
    }

    .confirm-bc-resource {
        margin-top: 0.1rem;
        font-size: 0.88rem;
    }

    /* Center date, time presets, OR divider, and time pickers on mobile — full width */
    .confirm-when-date-part {
        justify-content: center;
        width: 100%;
    }

    .confirm-when-date-part .custom-picker {
        display: block;
        width: 100%;
    }

    .confirm-when-date-part .custom-picker-trigger {
        width: 100%;
    }

    .confirm-time-field .custom-picker {
        display: block;
        width: 100%;
    }

    .confirm-time-field .custom-picker-trigger {
        width: 100%;
    }

    .quick-select-group {
        flex-direction: column;
        width: 100%;
    }

    .quick-select-btn {
        width: 100%;
        justify-content: space-between;
    }

    .book-or-divider {
        justify-content: center;
        margin: 1rem 0;
    }

    .book-or-divider::before,
    .book-or-divider::after {
        max-width: none;
    }

    .confirm-time-pair {
        justify-content: center;
        width: 100%;
    }

    .confirm-time-field {
        flex: 1;
        min-width: 0;
    }

    /* Weekday chips: touch-friendly on mobile */
    .weekday-chips {
        gap: 0.35rem;
        flex-wrap: wrap;
    }

    .weekday-chip {
        padding: 0.45rem 0.65rem;
        font-size: 0.78rem;
        min-height: 2.25rem;
        min-width: 2.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Recurring dates list: smaller chips */
    .recurring-dates-list {
        gap: 0.3rem;
    }

    .booked-slot-chip {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    /* Selection items (steps 1-3): tighter padding */
    .selection-item {
        padding: 0.75rem 1rem;
    }

    /* ── Book continue bar: tighter on mobile ── */
    .book-continue-summary {
        font-size: 0.82rem;
    }

    /* ── MyBookings: booking tabs full width ── */
    .booking-tab i {
        font-size: 0.85rem;
    }

    /* ── MyBookings: paging bar compact ── */
    .paging-bar {
        padding: 0.5rem 1rem;
        font-size: 0.78rem;
        gap: 0.4rem;
    }

    /* ── MyBookings / Home: filter chips smaller ── */
    .filter-chip {
        padding: 0.25rem 0.6rem;
        font-size: 0.72rem;
    }

    /* ── Modals: full-width on mobile ── */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    /* ── Success modal: tighter padding ── */
    .bk-success-body {
        padding: 1.25rem 1rem;
    }

    .bk-success-exports {
        flex-direction: column;
        gap: 0.4rem;
    }

    .bk-success-exports .btn {
        width: 100%;
        justify-content: center;
    }

    .bk-success-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* ── Page header: reduce vertical space ── */
    .page-header {
        margin-bottom: 0.75rem;
    }

    .page-header p {
        font-size: 0.82rem;
        margin-bottom: 0;
    }

    .page-header-row {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    /* ── Mobile tap-to-select: hide inline row actions ── */
    .bookings-list-table .row-actions,
    .bookings-list-table .btn-rebook,
    .recent-bookings-list .btn-rebook {
        display: none;
    }

    /* Status + actions column: keep status visible, hide actions */
    .bookings-list-table .data-table td:nth-child(4) {
        display: none;
    }

    /* Selected row highlight */
    .bookings-list-table .data-table tr.mobile-selected,
    .recent-booking-item.mobile-selected {
        background: rgba(var(--color-primary-rgb), 0.08);
        box-shadow: inset 3px 0 0 var(--color-primary);
    }

    /* Make table rows / recent items look tappable */
    .bookings-list-table .data-table tbody tr,
    .recent-booking-item {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(var(--color-primary-rgb), 0.1);
    }
}

/* ── Mobile booking action bar (tap-to-select pattern) ── */
.mobile-action-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-action-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1060;
        pointer-events: none;
    }

    .mobile-action-bar-inner {
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 2px solid var(--color-primary);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        animation: bookSlideUp 0.3s ease-out;
    }

    html.dark .mobile-action-bar-inner {
        background: rgba(15, 23, 42, 0.97);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
    }

    .mobile-action-bar-actions {
        display: flex;
        align-items: stretch;
        gap: 0.35rem;
        width: 100%;
    }

    .mobile-action-bar-actions > .action-icon-btn {
        flex: 1;
        width: 0;
        min-width: 0;
        height: auto;
        padding: 0.45rem 0.25rem;
        font-size: 1.1rem;
        border-radius: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
    }

    .mobile-action-bar-actions .action-label {
        display: block;
        font-size: 0.62rem;
        font-weight: 500;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

/* Hide action-label on desktop (only shown inside mobile action bar) */
.action-label {
    display: none;
}

/* Skeleton loader */
@keyframes skeleton-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-border) 25%,
        var(--color-surface-alt) 50%,
        var(--color-border) 75%
    );
    background-size: 600px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    display: block;
}

.skeleton-text  { border-radius: 0.25rem; }

.skeleton-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.skeleton-table-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--color-separator);
}

.skeleton-table-row:last-child { border-bottom: none; }

.skeleton-actions-placeholder {
    display: flex;
    gap: 0.3rem;
    margin-left: auto;
    flex-shrink: 0;
}

.skeleton-recent-row {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-separator);
}

.skeleton-recent-row:last-child { border-bottom: none; }

/* Reload overlay — keeps existing content visible but dimmed */
.content-reloading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Page header row with optional right-side widget */
.page-deco {
    position: fixed;
    inset: 0;
    left: var(--sidebar-width);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    transition: left 0.25s ease;
}

.content-wrap {
    position: relative;
    z-index: 1;
}

.page-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 0.5rem;
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header-row .page-header {
    margin-bottom: 0;
}

/* User switcher dropdown (admin, top-right of header) */
.user-switcher {
    position: relative;
    flex-shrink: 0;
}

.user-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.user-switcher-btn:hover,
.user-switcher.open .user-switcher-btn {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
}

.user-switcher-icon {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.user-switcher-name {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-switcher-chevron {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.user-switcher.open .user-switcher-chevron {
    transform: rotate(180deg);
}

.user-switcher-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 500;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 260px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-switcher-search-wrap {
    padding: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.user-switcher-input {
    width: 100%;
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    border: 1px solid var(--color-border);
    border-radius: 0.25rem;
    outline: none;
    box-sizing: border-box;
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.user-switcher-input:focus {
    border-color: var(--color-primary);
}

.user-switcher-list {
    overflow-y: auto;
    max-height: 240px;
}

.user-switcher-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.1s;
}

.user-switcher-item:hover {
    background: var(--color-surface-alt);
}

.user-switcher-item.active {
    background: rgba(79, 70, 229, 0.06);
}

.user-switcher-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

.user-switcher-item-email {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Icon-only action buttons in table rows */
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
}

/* ── Responsive booking list table ── */
.bookings-list-table {
    container-type: inline-size;
    container-name: bookings-table;
}

@container bookings-table (max-width: 520px) {
    .data-table,
    .data-table tbody {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    /* Each row: 2-column grid — info on the left, status+actions on the right */
    .data-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        padding: 0.65rem 1rem;
        border-bottom: 1px solid var(--color-separator);
        gap: 0.15rem 0.75rem;
    }

    .data-table tbody tr:last-child {
        border-bottom: none;
    }

    .data-table td {
        padding: 0;
        border-bottom: none;
        vertical-align: middle;
    }

    /* What (resource name) — top-left */
    .data-table td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    /* When (date/time) — bottom-left */
    .data-table td:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }

    /* Status badge — top-right */
    .data-table td:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }

    /* Actions — bottom-right */
    .data-table td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }

    /* Keep action buttons in a single horizontal row */
    .row-actions {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.15rem;
    }

    .action-icon-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }
}

.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    padding: 0;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.action-icon-btn:hover:not(:disabled) {
    background: var(--color-surface-alt);
    border-color: var(--color-border);
    color: var(--color-text);
}

.action-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.action-icon-btn.action-checkin:hover:not(:disabled) {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.22);
}

.action-icon-btn.action-cancel:hover:not(:disabled) {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.22);
}

.action-icon-btn.action-ical,
.action-icon-btn.action-teams {
    color: var(--color-text-muted);
}

.action-icon-btn.action-ical:hover:not(:disabled),
.action-icon-btn.action-teams:hover:not(:disabled) {
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.35);
    background: rgba(var(--color-primary-rgb), 0.08);
}

.action-icon-btn.action-delete:hover:not(:disabled) {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.22);
}

.action-icon-btn.action-equipment-active {
    color: var(--color-warning, #f59e0b);
}
.action-icon-btn.action-equipment-active:hover:not(:disabled) {
    color: var(--color-warning, #f59e0b);
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.22);
}

/* Rebook ghost button (used in recent bookings list) */
.btn-rebook {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}

.btn-rebook:hover {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.btn-rebook i {
    font-size: 0.85rem;
    line-height: 1;
    pointer-events: none;
    flex-shrink: 0;
}

/* Unified icon helpers (SVG + Phosphor <i>) */
.action-icon-btn svg, .btn svg, .modal-close svg,
.action-icon-btn i,   .btn i,   .modal-close i {
    pointer-events: none;
    flex-shrink: 0;
    line-height: 1;
}

.action-icon-btn i { font-size: 1rem; }
.section-label i    { font-size: 0.95rem; line-height: 1; }
.btn i              { font-size: 0.875rem; }
.modal-close i      { font-size: 1.1rem; }
.user-switcher-icon i,
.user-switcher-chevron i { line-height: 1; font-size: 0.875rem; }
.cancel-booking-details i { font-size: 0.85rem; line-height: 1; flex-shrink: 0; }
.nav-icon i         { font-size: 1rem; line-height: 1; }
.nav-group-label i  { font-size: 0.85rem; line-height: 1; }
.hamburger-icon i   { font-size: 1.2rem; line-height: 1; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cancel-booking-details {
    padding: 0.875rem 1rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
}

/* ── Shared Admin Table Styles ── */
.admin-filter-count {
    font-size: 0.8rem;
    color: var(--color-text-muted, #718096);
    white-space: nowrap;
}

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-th:hover {
    background: var(--color-surface-alt, #f7fafc);
}

.sort-indicator {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-left: 0.2rem;
}

.sortable-th:hover .sort-indicator {
    opacity: 0.8;
}

.new-resource-row {
    background: rgba(var(--color-primary-rgb), 0.06) !important;
}

.new-resource-row td {
    border-top: 2px solid var(--color-primary) !important;
}

.new-resource-row .form-control {
    background: var(--color-surface);
    border-color: var(--color-border);
}

.new-resource-panel {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--color-separator);
    background: rgba(var(--color-primary-rgb), 0.06);
}

/* Translation panel */
.translation-row td {
    background: rgba(var(--color-primary-rgb), 0.04);
    border-top: none !important;
}

.translation-panel {
    padding: 0.75rem 1rem;
}

    .translation-panel h6 {
        margin: 0 0 0.5rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--color-text-secondary);
    }

.translation-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

    .translation-entry .translation-lang {
        min-width: 40px;
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
        color: var(--color-text-secondary);
    }

.translation-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.new-resource-panel .form-control,
.new-resource-panel .form-select {
    background: var(--color-surface);
    border-color: var(--color-border);
}

.admin-name-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}

.admin-name-link:hover {
    color: var(--color-primary) !important;
}







/* ── Book page step-4 card sections ── */
.book-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.5rem;
    border-bottom: 2px solid var(--color-separator);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.book-step-filter {
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid var(--color-separator);
}

.book-step-filter h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
    color: var(--color-text);
}

.book-step-section {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--color-separator);
}

.book-step-content {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 0 0 0.375rem 0.375rem;
}

/* ── Book page: sliding sticky continue bar ── */
.book-continue-overlay {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width, 260px);
    right: 0;
    z-index: 1060;
    animation: bookSlideUp 0.3s ease-out;
}

@media (max-width: 768px) {
    .book-continue-overlay {
        left: 0;
    }
}

.book-continue-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 2px solid var(--color-primary, #4a6fa5);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.book-continue-back {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    font-size: 1.1rem;
}

.book-continue-confirm {
    flex: 1;
}

html.dark .book-continue-bar {
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.book-continue-summary {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text, #2d3748);
    margin-right: auto;
}

@media (max-width: 768px) {
    .book-continue-back {
        display: inline-flex;
    }

    .book-continue-bar {
        padding: 0.6rem 1rem;
    }

    .book-continue-desktop {
        display: none;
    }
}

/* ── Floorplan resource detail popup ── */

.fp-popup-actions {
    display: flex;
    gap: 0.5rem;
}

.fp-resource-popup {
    position: fixed;
    bottom: 1.5rem;
    right: 2.5rem;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    max-width: 320px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    animation: fpPopupIn 0.25s ease-out;
}

.fp-resource-popup .resource-card {
    max-height: 40vh;
    overflow-y: auto;
    background: var(--color-surface-alt);
}

html.dark .fp-resource-popup {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

@keyframes fpPopupIn {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Mobile: bottom sheet, no backdrop */
@media (max-width: 768px) {
    .fp-resource-popup {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        width: auto;
        border-radius: 0.75rem 0.75rem 0 0;
        padding: 0.75rem 1rem 1rem;
        border-bottom: none;
        animation: bookSlideUp 0.25s ease-out;
    }

    .fp-resource-popup .resource-card {
        max-height: 40vh;
    }
}

/* ── Booking confirmation step (step 5) ── */

/* Breadcrumb path wrapper: inline by default, flex row on mobile */
.confirm-bc-path {
    display: contents;
}

@media (max-width: 768px) {
    .confirm-bc-path {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

.confirm-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.confirm-user-selector {
    flex-shrink: 0;
    max-width: 300px;
    min-width: 180px;
}

.confirm-user-selector .form-control {
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
    background: var(--color-surface-alt);
    border-color: var(--color-border);
}

.confirm-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.confirm-bc-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.confirm-bc-item i {
    font-size: 0.8rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.confirm-bc-resource { font-weight: 600; color: var(--color-text); }

.confirm-bc-sep {
    display: flex;
    align-items: center;
    color: var(--color-text-muted);
    opacity: 0.35;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.confirm-sections {
    border-radius: 0 0 0.375rem 0.375rem;
}

.confirm-section-row {
    padding: 1.5rem;
    border-bottom: 2px solid var(--color-separator);
}

.confirm-section-row:last-child {
    border-bottom: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

.confirm-time-inputs {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.confirm-time-dash {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

.confirm-time-inputs .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.2rem;
}

.confirm-time-inputs .form-control {
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
    width: auto;
    min-width: 90px;
}

.confirm-when input[type="date"] {
    width: auto;
}

.confirm-recurring-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.booked-slots-conflict-note {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--color-danger);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.booked-slots-reference.has-conflict {
    border-left: 2px solid var(--color-danger);
    padding-left: 0.5rem;
}

.booked-slot-chip.conflict {
    border-color: rgba(244, 63, 94, 0.5);
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    font-weight: 600;
}

html.dark .booked-slot-chip.conflict {
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(244, 63, 94, 0.08);
    color: #fb7185;
}

.confirm-recurring-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    cursor: pointer;
    user-select: none;
}

.confirm-recurring-toggle i {
    color: var(--color-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.confirm-section {
    margin-top: 0.75rem;
}

.confirm-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--color-border);
}

.confirm-section-title i { font-size: 0.9rem; color: var(--color-primary); }

html.dark .time-conflict-warning {
    color: #fb7185;
}

.time-validation-hint {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #d97706;
}

html.dark .time-validation-hint {
    color: #fbbf24;
}

@keyframes bookSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Booking Success Modal ── */

.bk-success-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.75rem 1.5rem;
    gap: 0.25rem;
    text-align: center;
}

.bk-success-icon {
    font-size: 3rem;
    color: var(--color-primary);
    line-height: 1;
    animation: checkin-pop 0.4s ease;
    align-self: center;
}

.bk-success-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    align-self: center;
}

.bk-success-recurring {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 0.15rem;
}

.bk-success-recurring i {
    font-size: 0.85rem;
}

.bk-success-card {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--color-surface-alt);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.bk-success-resource {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.bk-success-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.84rem;
    color: var(--color-text-muted);
}

.bk-success-meta-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bk-success-meta-row i {
    font-size: 0.85rem;
    color: var(--color-primary);
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
}

.bk-success-exports {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.bk-success-exports .btn {
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.4rem 0.5rem;
}

.bk-success-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.75rem 0 0.25rem;
}

.bk-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bk-success-actions .btn {
    justify-content: center;
}

/* ── View mode toggle ── */
.view-toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}
.view-toggle-btn {
    padding: 0.35rem 0.85rem;
    border: none;
    background: var(--color-surface, #fff);
    color: var(--color-text-muted, #718096);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.view-toggle-btn + .view-toggle-btn {
    border-left: 1px solid var(--color-border, #e2e8f0);
}
.view-toggle-btn:hover {
    background: var(--color-surface-alt, #f7fafc);
}
.view-toggle-btn.active {
    background: var(--color-primary, #0d9488);
    color: #fff;
    font-weight: 600;
}

/* ── Mobile-only elements: hidden on desktop ── */
@media (min-width: 769px) {
    .mobile-filter-header,
    .mobile-filter-sheet-overlay,
    .mobile-filter-toggle,
    .mobile-filter-reset {
        display: none;
    }
}




/* ── Floor plan editor SVG cursors ── */
#editor-canvas-wrap { cursor: default; }
#editor-svg [data-editor-id] { cursor: pointer; }
#editor-svg .wall { stroke-linecap: round !important; stroke-linejoin: round !important; }
#editor-svg .window { stroke-linecap: round !important; stroke-dasharray: 8 6 !important; stroke-dashoffset: 4 !important; }
#editor-canvas-wrap.placement-mode #editor-svg,
#editor-canvas-wrap.placement-mode #editor-svg [data-editor-id] { cursor: crosshair !important; }
#editor-canvas-wrap.pan-ready #editor-svg,
#editor-canvas-wrap.pan-ready #editor-svg [data-editor-id] { cursor: grab !important; }
#editor-canvas-wrap.panning #editor-svg,
#editor-canvas-wrap.panning #editor-svg [data-editor-id] { cursor: grabbing !important; }

/* ── Booking view floor plan SVG element colours ──
Inline styles from the SVG editor are stripped at runtime by
svg-resource-interop.js, so these class rules apply cleanly. */
.floorplan-bg .wall        { stroke: #475569; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.floorplan-bg .door        { fill: rgba(148, 163, 184, 0.1); stroke: #94a3b8; }
.floorplan-bg .window      { stroke: #38bdf8; stroke-dasharray: 8 6; stroke-linecap: round; stroke-dashoffset: 4; }
.floorplan-bg .room        { fill: #f0fdf4; stroke: #64748b; }
.floorplan-bg .desk        { fill: #f0f9ff; stroke: #4a6fa5; }
.floorplan-bg .parking     { fill: #f0f9ff; stroke: #4a6fa5; stroke-dasharray: 2 3; stroke-linecap: round; }
.floorplan-bg .fp-staircase { fill: #f1f5f9; stroke: #cbd5e1; stroke-width: 1; }
.floorplan-bg .fp-stair-line { stroke: #cbd5e1; stroke-width: 0.75; }
.floorplan-bg .fp-meeting-rect,
.floorplan-bg .fp-meeting-circle,
.floorplan-bg .fp-meeting-oval,
.floorplan-bg .fp-meeting-ushape { fill: #f0f9ff; stroke: #4a6fa5; }
.floorplan-bg .fp-mt-shape { stroke-width: 2; }
.floorplan-bg .fp-mt-seat  { fill: #cbd5e1; stroke: #94a3b8; stroke-width: 1; }

/* Unmatched SVG elements (no resource assigned) — CSS class rules control
their appearance since inline styles are stripped at runtime. */
.floorplan-bg .room:not([data-resource-id])    { fill: #f0fdf4; stroke: #64748b; fill-opacity: 1; }
.floorplan-bg .desk:not([data-resource-id])    { fill: #f0f9ff; stroke: #4a6fa5; fill-opacity: 1; }
.floorplan-bg .parking:not([data-resource-id]) { fill: #f0f9ff; stroke: #4a6fa5; stroke-dasharray: 2 3; stroke-linecap: round; fill-opacity: 1; }

/* SVG background transparent — both the element background and any background rect */
.floorplan-bg,
.floorplan-bg svg {
    background: transparent !important;
}
.floorplan-bg svg > rect:first-child:not(.fp-staircase):not(.fp-mt-shape):not(.desk):not(.room):not(.parking):not(.wall):not(.fp-meeting-rect),
.floorplan-bg svg > g > rect:first-child:not(.fp-staircase):not(.fp-mt-shape):not(.desk):not(.room):not(.parking):not(.wall):not(.fp-meeting-rect),
.floorplan-bg .fp-bg {
    fill: transparent;
    stroke: none;
}

/* Dark mode: restyle SVG elements instead of using filter (filter can’t make backgrounds truly transparent) */
html.dark .floorplan-bg .wall        { stroke: #94a3b8; stroke-width: 6; }
html.dark .floorplan-bg .door        { fill: rgba(71, 85, 105, 0.1); stroke: #475569; }
html.dark .floorplan-bg .window      { stroke: #60a5fa; }
html.dark .floorplan-bg .room        { fill: #1e293b; stroke: #475569; }
html.dark .floorplan-bg .desk        { fill: #1e293b; stroke: #4a6fa5; }
html.dark .floorplan-bg .parking     { fill: #1e293b; stroke: #4a6fa5; stroke-dasharray: 2 3; stroke-linecap: round; }
html.dark .floorplan-bg .fp-staircase{ fill: #161f32; stroke: #334155; stroke-width: 1; }
html.dark .floorplan-bg .fp-stair-line { stroke: #334155; stroke-width: 0.75; }
html.dark .floorplan-bg .fp-meeting-rect,
html.dark .floorplan-bg .fp-meeting-circle,
html.dark .floorplan-bg .fp-meeting-oval,
html.dark .floorplan-bg .fp-meeting-ushape { fill: #1e293b; stroke: #4a6fa5; }
html.dark .floorplan-bg .fp-mt-seat { fill: #334155; stroke: #475569; }
html.dark .floorplan-bg .room:not([data-resource-id])    { fill: #1e293b; stroke: #475569; fill-opacity: 1; }
html.dark .floorplan-bg .desk:not([data-resource-id])    { fill: #1e293b; stroke: #4a6fa5; fill-opacity: 1; }
html.dark .floorplan-bg .parking:not([data-resource-id]) { fill: #1e293b; stroke: #4a6fa5; stroke-dasharray: 2 3; stroke-linecap: round; fill-opacity: 1; }
html.dark .floorplan-bg text:not(.svg-resource-icon),
html.dark .floorplan-bg .fp-label    { fill: #94a3b8; }

.fp-shape-rect, .fp-shape-circle, .fp-shape-oval { fill: #eff1f4; stroke: none; }
.floorplan-bg .fp-shape-rect,
.floorplan-bg .fp-shape-circle,
.floorplan-bg .fp-shape-oval          { fill: #eff1f4 !important; stroke: none !important; }
html.dark .fp-shape-rect,
html.dark .fp-shape-circle,
html.dark .fp-shape-oval              { fill: #1e3248; }
html.dark .floorplan-bg .fp-shape-rect,
html.dark .floorplan-bg .fp-shape-circle,
html.dark .floorplan-bg .fp-shape-oval { fill: #1e3248 !important; }

/* Shared floorplan styles */
.floorplan-body {
    display: flex;
}
.zone-sidebar {
    width: 200px;
    min-width: 200px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 0.75rem;
    overflow-y: auto;
    align-self: stretch;
}
.zone-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}
.zone-chip {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
    background: var(--color-surface);
    border-radius: 6px;
}
.zone-chip-selected {
    background: var(--color-primary-bg, #eef2ff);
}
.zone-chip-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}
.zone-chip-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.mobile-zone-chips {
    display: none;
}
@media (max-width: 768px) {
.zone-sidebar {
    display: none;
}
.floorplan-body {
    flex-direction: column;
}
.mobile-zone-chips {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}
    .mobile-zone-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.25rem 0.6rem;
        border: 1px solid var(--color-border);
        border-radius: 9999px;
        background: var(--color-surface);
        font-size: 0.75rem;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.15s;
        color: var(--color-text-muted);
    }
    .mobile-zone-chip.active {
        border-color: var(--mzc-color, var(--color-primary));
        background: color-mix(in srgb, var(--mzc-color, var(--color-primary)) 15%, transparent);
        color: var(--color-text);
        font-weight: 600;
    }
    .mobile-zone-chip-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }
}
.floorplan-viewport {
position: relative;
flex: 1;
overflow: hidden;
display: flex;
align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
}
.book-floorplan-viewport {
max-height: calc(100vh - 16rem);
overflow: hidden;
}
.floorplan-container {
    position: relative;
    display: block;
    width: 100%;
    cursor: grab;
    transform-origin: 0 0;
    transition: none;
    will-change: transform;
    touch-action: none;
}
.floorplan-container:active {
    cursor: grabbing;
}
.floorplan-bg {
    position: relative;
    z-index: 2;
    width: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
.floorplan-bg svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    background: transparent !important;
}
.zoom-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 6px;
    opacity: 0.85;
}
.zoom-controls.collapsed { padding: 4px; }
.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface-alt);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    line-height: 1;
    padding: 0;
}
.zoom-btn:hover {
    background: var(--color-surface);
    opacity: 1;
}
.zoom-btn-reset { font-size: 16px; }
.zoom-collapse-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted, #718096);
    font-size: 12px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    align-self: center;
}
.zoom-collapse-btn:hover { color: var(--color-text, #2d3748); }
.floorplan-marker {
    position: absolute;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 5;
    font-size: 14px;
}
.floorplan-marker:hover {
    transform: scale(1.3);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.floorplan-marker.selected {
    transform: scale(1.5);
    z-index: 10;
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--color-primary), 0 4px 16px rgba(0,0,0,0.4);
    animation: marker-pulse 1.5s ease-in-out infinite;
}
@keyframes marker-pulse {
    0%, 100% { box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--color-primary), 0 4px 16px rgba(0,0,0,0.4); }
    50%      { box-shadow: 0 0 0 5px #fff, 0 0 0 12px rgba(var(--color-primary-rgb), 0.35), 0 4px 16px rgba(0,0,0,0.4); }
}
.marker-available { background: var(--color-primary); border: 2px solid var(--color-primary-dark); }
.marker-partly-available { background: #f59e0b; border: 2px solid #d97706; }
.marker-restricted { background: #78716c; border: 2px solid #57534e; opacity: 0.65; }
.marker-disabled  { cursor: not-allowed; pointer-events: none; }
.marker-disabled:hover { transform: none; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.marker-booked    { background: #ef4444; border: 2px solid #dc2626; }
.marker-occupied  { background: #6b7280; border: 2px solid #4b5563; opacity: 0.65; }
.marker-room      { background: #8b5cf6; border: 2px solid #7c3aed; }
.marker-parking   { background: #3b82f6; border: 2px solid #2563eb; }
.marker-icon { line-height: 1; }
.marker-icon i { font-size: 13px; line-height: 1; pointer-events: none; color: #fff; }

/* Occupied marker hover popup */
.marker-has-popup { pointer-events: auto !important; cursor: default !important; }
.marker-occupant-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    padding: 0.55rem 0.75rem;
    z-index: 100;
    white-space: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
}
.marker-occupant-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-surface, #fff);
}
.marker-has-popup:hover .marker-occupant-popup {
    display: flex;
}
.equip-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.zone-rect {
    position: absolute;
    border: none;
    border-radius: 6px;
    background: repeating-linear-gradient(
        135deg,
        color-mix(in srgb, var(--zone-color, currentColor) 8%, transparent),
        color-mix(in srgb, var(--zone-color, currentColor) 8%, transparent) 4px,
        transparent 4px,
        transparent 12px
    );
    box-sizing: border-box;
    z-index: 1;
    transition: background 0.2s;
    pointer-events: none;
}
.zone-rect.zone-selected {
    border: none;
    background: repeating-linear-gradient(
        135deg,
        color-mix(in srgb, var(--zone-color, currentColor) 25%, transparent),
        color-mix(in srgb, var(--zone-color, currentColor) 25%, transparent) 4px,
        color-mix(in srgb, var(--zone-color, currentColor) 6%, transparent) 4px,
        color-mix(in srgb, var(--zone-color, currentColor) 6%, transparent) 12px
    );
    z-index: 1;
}
.zone-rect-label {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.selected-row {
    background: var(--color-primary-bg, #eef2ff);
}
.selected-row td {
    color: var(--color-primary, #4f46e5);
    font-weight: 600;
}
.floorplan-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0; font-size: 0.85rem; }
.floorplan-legend-toggle { display: none; }
.floorplan-legend-mobile { display: none; padding: 0.5rem 0.75rem; }
@media (max-width: 768px) {
    .floorplan-legend-desktop { display: none; }
    .floorplan-legend-toggle { display: inline-flex; }
    .floorplan-legend-mobile { display: flex; }
    .book-floorplan-viewport {
        max-height: calc(100vh - 12rem);
    }
    .floorplan-viewport { touch-action: manipulation; }
    .zoom-controls { display: none; }
}
.legend-group { display: flex; align-items: center; flex-wrap: wrap; row-gap: 0.35rem; padding: 0.1rem 0.75rem; }
.legend-group + .legend-group { border-left: 1px solid var(--color-border); }
.legend-item { display: inline-flex; align-items: center; padding-right: 0.9rem; white-space: nowrap; }
.legend-group .legend-item:last-child { padding-right: 0; }
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-right: 0.5rem; }
.legend-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; margin-right: 0.35rem; font-size: 11px; color: #fff; }
.legend-icon.legend-available { background: #0d9488; }
.legend-icon.legend-partly-available { background: #f59e0b; }
.legend-icon.legend-booked { background: #f43f5e; }
.legend-icon.legend-occupied { background: #6b7280; }
.legend-icon.legend-restricted { background: #78716c; }
.legend-available { background: #0d9488; }
.legend-partly-available { background: #f59e0b; }
.legend-restricted { background: #78716c; }
.legend-booked    { background: #f43f5e; }
.legend-occupied  { background: #6b7280; }
.legend-room      { background: #8b5cf6; }
.legend-meeting   { background: #8b5cf6; }
.legend-parking   { background: #3b82f6; }
.legend-zone      { background: #f59e0b; }

/* ── Toast notifications ── */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    font-size: 0.85rem;
    pointer-events: auto;
    animation: toast-slide-in 0.3s ease-out;
}

@keyframes toast-slide-in {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

.toast-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1;
}

.toast-msg {
    flex: 1;
    min-width: 0;
}

.toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s;
}

.toast-close:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
}

.toast-close i {
    font-size: 0.8rem;
    line-height: 1;
    pointer-events: none;
}

.toast-success {
    border-left: 3px solid var(--color-success);
}

.toast-success .toast-icon {
    color: var(--color-success);
}

.toast-error {
    border-left: 3px solid var(--color-danger);
}

.toast-error .toast-icon {
    color: var(--color-danger);
}

.toast-warning {
    border-left: 3px solid var(--color-warning);
}

.toast-warning .toast-icon {
    color: var(--color-warning);
}

.toast-info {
    border-left: 3px solid var(--color-info);
}

.toast-info .toast-icon {
    color: var(--color-info);
}

html.dark .toast {
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* ── Print Styles ── */
@media print {
    .sidebar,
    .mobile-topbar,
    .sidebar-overlay,
    .toast-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* ── Resource detail sheet (book step 4) ── */
/* Desktop: floating popup (same as fp-resource-popup) */
.resource-detail-sheet-overlay {
    position: fixed;
    bottom: 1.5rem;
    right: 2.5rem;
    z-index: 1060;
}

.resource-detail-sheet {
    display: flex;
    flex-direction: column;
    width: 340px;
    max-width: 340px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    animation: fpPopupIn 0.25s ease-out;
    overflow: hidden;
}

html.dark .resource-detail-sheet {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.resource-detail-sheet-header {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    gap: 0.3rem;
}

.resource-detail-sheet-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.resource-detail-sheet-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}

.resource-detail-sheet-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.resource-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.resource-detail-meta i {
    font-size: 0.9rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.resource-detail-sheet-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.resource-detail-sheet-footer .btn {
    flex: 1;
}

/* Desktop footer: show proper primary button, hide mobile-style next icon */
@media (min-width: 769px) {
    .resource-detail-sheet-footer .mobile-filter-apply-btn {
        display: none;
    }

    .resource-detail-sheet-footer .action-label {
        display: none;
    }

    .resource-detail-sheet-footer .desktop-next-btn {
        display: inline-flex;
        justify-content: center;
        margin-left: auto;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Hide desktop button on mobile */
.desktop-next-btn {
    display: none;
}

/* Mobile: bottom sheet matching filter sheet */
@media (max-width: 768px) {
    .resource-detail-sheet-overlay {
        position: fixed;
        inset: 0;
        z-index: 1070;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .resource-detail-sheet {
        width: 100%;
        max-width: 100%;
        max-height: 80vh;
        border-radius: 0.75rem 0.75rem 0 0;
        animation: bookSlideUp 0.25s ease-out;
    }

    .resource-detail-sheet-body {
        max-height: 60vh;
    }

    .resource-detail-sheet-footer {
        display: flex;
        align-items: stretch;
        gap: 0.35rem;
        width: 100%;
        padding: 0.5rem 0.75rem;
        border-top: 2px solid var(--color-primary);
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    html.dark .resource-detail-sheet-footer {
        background: rgba(15, 23, 42, 0.97);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
    }

    .resource-detail-sheet-footer > .action-icon-btn {
        flex: 1;
        width: 0;
        min-width: 0;
        height: auto;
        padding: 0.45rem 0.25rem;
        font-size: 1.1rem;
        border-radius: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
    }

    .resource-detail-sheet-footer .action-label {
        display: block;
        font-size: 0.62rem;
        font-weight: 500;
        line-height: 1.1;
        white-space: nowrap;
    }

    .resource-detail-sheet-footer .mobile-filter-apply-btn {
        color: var(--color-primary);
        font-weight: 700;
    }
}
