/* Booking Management: staff and public pages. Prefix bk-. Builds on modern-form.css. */

:root {
    --bk-accent: #667eea;
    --bk-accent-2: #764ba2;
    --bk-accent-soft: #eef2ff;
    --bk-ink: #1f2937;
    --bk-muted: #6b7280;
    --bk-line: #e5e7eb;
    --bk-surface: #ffffff;
    --bk-canvas: #f6f7fb;
    --bk-success: #059669;
    --bk-warning: #d97706;
    --bk-danger: #dc2626;
    --bk-radius: 12px;
    --bk-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --bk-hour: 64px;
}

/* ---------- Module tabs ---------- */
.bk-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    margin-bottom: 16px;
    background: var(--bk-surface);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    scrollbar-width: none;
    position: sticky;
    top: calc(var(--erp-top-navbar-offset, 44px) + env(safe-area-inset-top, 0px) + 4px);
    z-index: 20;
    box-shadow: var(--bk-shadow);
}
.bk-page .item-form-sticky-header.is-stuck ~ .bk-tabs,
.bk-page .item-form-sticky-header.is-stuck + .bk-tabs {
    top: calc(var(--erp-top-navbar-offset, 44px) + env(safe-area-inset-top, 0px) + 56px);
}
.bk-tabs::-webkit-scrollbar { display: none; }
.bk-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 8px;
    color: var(--bk-muted);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex: 0 0 auto;
}
.bk-tabs a:hover { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-tabs a.is-active { background: var(--bk-accent); color: #fff; }
.bk-tabs a.is-active .erp-icon,
.bk-tabs a.is-active .bi,
.bk-tabs a.is-active svg { filter: brightness(0) invert(1); }
.bk-tabs a:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: 2px; }

/* Header: primary CTA stays; secondary collapse into More on phone */
.bk-header-more { display: none; }
.bk-header-more .dropdown-menu { min-width: 12rem; }
.bk-header-more .dropdown-item form { margin: 0; }
.bk-header-more .dropdown-item button {
    background: none; border: 0; padding: 0; width: 100%; text-align: left;
    color: inherit; font: inherit; cursor: pointer;
}

.bk-subtitle { margin: 4px 0 0; opacity: .9; font-size: .925rem; }
.bk-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-title-row h1 { margin: 0; }
.bk-help-btn {
    width: 28px; height: 28px; padding: 0; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .15); color: #fff;
    font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.bk-help-btn:hover, .bk-help-btn:focus-visible { background: #fff; color: var(--bk-accent); outline: none; }
.bk-alert {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
    background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
}
.bk-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.bk-alert .btn-close { margin-left: auto; }

/* ---------- Status pill ---------- */
.bk-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    background: #f3f4f6;
    color: #374151;
}
.bk-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bk-status--requested { background: #f1f5f9; color: #475569; }
.bk-status--pendingapproval { background: #fef3c7; color: #b45309; }
.bk-status--confirmed { background: var(--bk-accent-soft); color: #4f46e5; }
.bk-status--checkedin { background: #e0f2fe; color: #0369a1; }
.bk-status--inprogress { background: #f3e8ff; color: #7e22ce; }
.bk-status--completed { background: #d1fae5; color: #047857; }
.bk-status--cancelled { background: #f3f4f6; color: #6b7280; }
.bk-status--noshow { background: #fee2e2; color: #b91c1c; }
.bk-status--rescheduled { background: #f3f4f6; color: #6b7280; }
.bk-status--waiting { background: #f1f5f9; color: #475569; }
.bk-status--offered { background: #fef3c7; color: #b45309; }
.bk-status--booked, .bk-status--accepted { background: #d1fae5; color: #047857; }
.bk-status--expired, .bk-status--left { background: #f3f4f6; color: #6b7280; }
.bk-status--closed { background: #f3f4f6; color: #6b7280; }

/* ---------- Stat tiles ---------- */
.bk-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bk-stat {
    background: var(--bk-surface);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    padding: 14px 16px;
    box-shadow: var(--bk-shadow);
    min-width: 0;
}
.bk-stat__label { color: var(--bk-muted); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.bk-stat__value { font-size: 1.6rem; font-weight: 700; color: var(--bk-ink); line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bk-stat__hint { color: var(--bk-muted); font-size: .8rem; margin-top: 2px; }
.bk-stat--link { text-decoration: none; display: block; transition: border-color .15s, transform .15s; }
.bk-stat--link:hover { border-color: var(--bk-accent); transform: translateY(-1px); }
.bk-meter { height: 6px; border-radius: 999px; background: #eef0f4; overflow: hidden; margin-top: 10px; }
.bk-meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--bk-accent), var(--bk-accent-2)); border-radius: inherit; }
.bk-meter--success > span { background: var(--bk-success); }
.bk-section-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bk-muted); margin: 8px 0 10px; }

/* ---------- Cards, empty states ---------- */
.bk-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bk-card-head h2, .bk-card-head h3 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--bk-ink); }
.bk-empty { text-align: center; padding: 40px 16px; color: var(--bk-muted); }
.bk-empty__icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bk-accent-soft); color: var(--bk-accent); margin-bottom: 12px;
}
.bk-empty h3 { font-size: 1.05rem; color: var(--bk-ink); margin-bottom: 4px; }
.bk-empty p { margin: 0 auto 12px; max-width: 420px; }

/* ---------- Toolbar / segmented ---------- */
.bk-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bk-toolbar .form-control-modern { width: auto; min-width: 0; }
.bk-segment { display: inline-flex; background: #f1f3f7; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.bk-segment a,
.bk-segment label {
    padding: 6px 12px; border-radius: 8px; color: var(--bk-muted); font-weight: 500; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; margin: 0;
}
.bk-segment a.is-active,
.bk-segment label.is-active { background: #fff; color: var(--bk-ink); box-shadow: var(--bk-shadow); }
.bk-segment label input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.bk-count { background: #e5e7eb; color: #374151; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 600; }
.bk-segment a.is-active .bk-count { background: var(--bk-accent); color: #fff; }
.bk-search { position: relative; flex: 0 1 260px; width: min(260px, 100%); max-width: 100%; min-width: 0; }
.bk-search .bi,
.bk-search .erp-icon,
.bk-search > svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .5;
    pointer-events: none;
    z-index: 1;
    display: block;
    flex-shrink: 0;
}
.bk-search input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 36px;
}
.bk-card-head .bk-search { margin-left: auto; }

/* ---------- Booking list ---------- */
.bk-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.bk-table th {
    font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted);
    padding: 10px 12px; border-bottom: 1px solid var(--bk-line); background: #fafbfc; white-space: nowrap;
}
.bk-table td { padding: 12px; border-bottom: 1px solid var(--bk-line); vertical-align: middle; }
.bk-table tbody tr { transition: background .12s; }
.bk-table tbody tr:hover { background: #fafaff; }
.bk-table tbody tr[data-href] { cursor: pointer; }
.bk-table tbody tr[hidden] { display: none !important; }
.bk-when { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.bk-date-chip {
    width: 46px; flex: 0 0 46px; text-align: center; border-radius: 10px; background: var(--bk-accent-soft); color: #4f46e5; padding: 4px 0;
    line-height: 1.1;
}
.bk-date-chip small { display: block; font-size: .65rem; font-weight: 600; text-transform: uppercase; }
.bk-date-chip strong { font-size: 1.1rem; }
.bk-time { font-weight: 600; color: var(--bk-ink); font-variant-numeric: tabular-nums; }
.bk-guest { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bk-avatar {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--bk-accent), var(--bk-accent-2)); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem;
}
.bk-avatar--lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 1.15rem; }
.bk-guest__name { font-weight: 600; color: var(--bk-ink); }
.bk-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; color: var(--bk-muted); }
.bk-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.bk-money--due { color: var(--bk-warning); }
.bk-money--settled { color: var(--bk-success); }
.bk-money--none { color: var(--bk-muted, #6c757d); font-weight: 500; }

/* ---------- Calendar (legacy resource grid kept for any leftover refs) ---------- */
.bk-cal-wrap { overflow: auto; border: 1px solid var(--bk-line); border-radius: var(--bk-radius); background: #fff; max-height: calc(100vh - 260px); min-height: 420px; }
.bk-cal { display: grid; min-width: 100%; position: relative; }
.bk-cal__corner, .bk-cal__head {
    position: sticky; top: 0; z-index: 3; background: #fafbfc; border-bottom: 1px solid var(--bk-line);
    padding: 10px 12px; font-weight: 600; font-size: .9rem; color: var(--bk-ink); min-height: 48px;
}
.bk-cal__corner { left: 0; z-index: 4; }
.bk-cal__head { border-left: 1px solid var(--bk-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-cal__head small { display: block; font-weight: 400; color: var(--bk-muted); font-size: .75rem; }
.bk-cal__times { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid var(--bk-line); }
.bk-cal__time { height: var(--bk-hour); font-size: .75rem; color: var(--bk-muted); text-align: right; padding: 2px 8px 0 0; font-variant-numeric: tabular-nums; }
.bk-cal__col {
    position: relative; border-left: 1px solid var(--bk-line);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--bk-hour) - 1px), var(--bk-line) calc(var(--bk-hour) - 1px), var(--bk-line) var(--bk-hour));
}
.bk-cal__slot {
    position: absolute; left: 0; right: 0; height: var(--bk-hour);
    display: flex; align-items: center; justify-content: center;
    color: transparent; font-size: .8rem; font-weight: 600; text-decoration: none; transition: background .12s, color .12s;
}
.bk-cal__slot:hover, .bk-cal__slot:focus-visible { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-cal__event {
    position: absolute; left: 4px; right: 4px; z-index: 1;
    border-radius: 8px; padding: 4px 8px; overflow: hidden;
    background: var(--bk-accent-soft); border-left: 4px solid var(--bk-accent);
    color: var(--bk-ink); text-decoration: none; font-size: .8rem; line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: box-shadow .12s, transform .12s;
}
.bk-cal__event:hover { box-shadow: 0 6px 16px rgba(79, 70, 229, .18); transform: translateY(-1px); z-index: 2; color: var(--bk-ink); }
.bk-cal__event strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-cal__event span { color: var(--bk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bk-cal__event--pendingapproval, .bk-cal__event--requested { background: #fffbeb; border-left-color: #f59e0b; }
.bk-cal__event--checkedin { background: #f0f9ff; border-left-color: #0284c7; }
.bk-cal__event--inprogress { background: #faf5ff; border-left-color: #9333ea; }
.bk-cal__event--completed { background: #ecfdf5; border-left-color: #059669; }
.bk-cal__event--noshow { background: #fef2f2; border-left-color: #dc2626; }
.bk-cal__now { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 2; pointer-events: none; }
.bk-cal__now::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.bk-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- Calendly-style staff calendar ---------- */
.bk-calapp {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--bk-line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .08);
    min-height: 560px;
}
.bk-calapp__banner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 22px 20px;
    background: linear-gradient(165deg, #1e293b 0%, #334155 55%, #0f172a 100%);
    color: #f8fafc;
    position: relative;
}
.bk-calapp__banner::after {
    content: "";
    position: absolute;
    inset: auto -20% -30% 20%;
    height: 180px;
    background: radial-gradient(circle, rgba(102, 126, 234, .35), transparent 70%);
    pointer-events: none;
}
.bk-calapp__brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.bk-calapp__logo {
    width: 40px; height: 40px; border-radius: 10px; background: #fff; object-fit: contain; padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.bk-calapp__brand-name { font-weight: 700; font-size: 1rem; letter-spacing: .01em; }
.bk-calapp__brand-tag { font-size: .75rem; color: #94a3b8; font-weight: 500; }
.bk-calapp__day-title { margin: 18px 0 0; font-size: 1.65rem; font-weight: 700; line-height: 1.15; position: relative; z-index: 1; }
.bk-calapp__day-date { margin: 0; color: #cbd5e1; font-weight: 500; position: relative; z-index: 1; }
.bk-calapp__facts {
    list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1;
}
.bk-calapp__facts li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06);
}
.bk-calapp__fact-label { color: #94a3b8; font-size: .8rem; font-weight: 600; }
.bk-calapp__facts strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.bk-calapp__banner-link {
    color: #c7d2fe; font-weight: 600; font-size: .85rem; text-decoration: none; position: relative; z-index: 1;
}
.bk-calapp__banner-link:hover { color: #fff; text-decoration: underline; }
.bk-calapp__banner-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 4px; padding: 10px 14px; border-radius: 999px;
    background: #fff; color: #1e293b; font-weight: 700; font-size: .9rem; text-decoration: none;
    position: relative; z-index: 1; transition: transform .15s, box-shadow .15s;
}
.bk-calapp__banner-cta:hover { color: #1e293b; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
.bk-calapp__powered {
    margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(148, 163, 184, .25);
    font-size: .78rem; color: #94a3b8; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
    position: relative; z-index: 1;
}
.bk-calapp__powered a {
    color: #fff; font-weight: 700; text-decoration: none; letter-spacing: .01em;
}
.bk-calapp__powered a:hover { text-decoration: underline; }

.bk-calapp__card {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, .9fr);
    min-width: 0;
    background: #fff;
}
.bk-calapp__month {
    padding: 28px 28px 20px;
    border-right: 1px solid var(--bk-line);
    min-width: 0;
}
.bk-calapp__month-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px;
}
.bk-calapp__month-title { margin: 0; font-size: 1.1rem; font-weight: 700; min-width: 9em; text-align: center; }
.bk-calapp__nav {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: var(--bk-accent); text-decoration: none; background: transparent; transition: background .15s;
}
.bk-calapp__nav:hover { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-calapp__dow {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--bk-muted); font-weight: 600; margin-bottom: 8px;
}
.bk-calapp__grid {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
}
.bk-calapp__cell {
    position: relative;
    aspect-ratio: 1;
    max-width: 52px;
    width: 100%;
    margin: 0 auto;
    border-radius: 14px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--bk-ink);
    font-weight: 600;
    font-size: .95rem;
    transition: background .15s, color .15s, box-shadow .15s, border-color .15s;
}
.bk-calapp__cell.is-empty { pointer-events: none; }
.bk-calapp__cell.is-past { color: #9ca3af; }
.bk-calapp__cell:hover:not(.is-empty):not(.is-selected) { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-calapp__cell.is-today:not(.is-selected) { box-shadow: inset 0 0 0 2px var(--bk-accent); color: var(--bk-accent); }
.bk-calapp__cell.is-selected {
    background: var(--bk-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(102, 126, 234, .35);
}
.bk-calapp__cell.has-bookings:not(.is-selected) {
    background: var(--bk-accent-soft);
    color: var(--bk-accent);
    box-shadow: inset 0 0 0 1.5px rgba(102, 126, 234, .4);
}
.bk-calapp__cell.has-bookings.is-past:not(.is-selected) {
    background: #eef2ff;
    color: #6366f1;
    opacity: .85;
}
.bk-calapp__cell.has-bookings.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 2px var(--bk-accent);
}
.bk-calapp__daynum { line-height: 1.1; }
.bk-calapp__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.05rem;
    padding: 0 .28rem;
    border-radius: 999px;
    background: var(--bk-accent);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}
.bk-calapp__cell.is-selected .bk-calapp__mark {
    background: #fff;
    color: var(--bk-accent);
}
.bk-calapp__cell.is-past:not(.is-selected) .bk-calapp__mark {
    background: #818cf8;
}
.bk-calapp__tz {
    margin: 18px 0 0; color: var(--bk-muted); font-size: .8rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
}

.bk-calapp__schedule {
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fafbfc;
}
.bk-calapp__schedule-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.bk-calapp__schedule-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.bk-calapp__schedule-meta { color: var(--bk-muted); font-size: .85rem; font-weight: 600; }
.bk-calapp__empty {
    text-align: center; padding: 40px 16px; color: var(--bk-muted);
}
.bk-calapp__empty h4 { margin: 0 0 6px; color: var(--bk-ink); font-size: 1rem; }
.bk-calapp__empty p { margin: 0 0 16px; font-size: .9rem; }
.bk-calapp__slots {
    display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: min(520px, calc(100vh - 320px));
    padding-right: 2px;
}
.bk-calapp__slot {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--bk-line);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.bk-calapp__slot-body .bk-status { margin-top: 4px; }
.bk-calapp__slot-actions {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end;
}
.bk-calapp__slot-actions .bk-calapp__slot-btn {
    min-width: 72px; padding: 8px 12px; font-size: .82rem;
}
.bk-calapp__slot:hover {
    border-color: var(--bk-accent);
    box-shadow: 0 6px 18px rgba(102, 126, 234, .14);
    transform: translateY(-1px);
    color: inherit;
}
.bk-calapp__slot-time {
    display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.bk-calapp__slot-time strong { color: var(--bk-accent); font-size: .95rem; }
.bk-calapp__slot-time span { color: var(--bk-muted); font-size: .75rem; font-weight: 600; }
.bk-calapp__slot-guest { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-calapp__slot-meta { color: var(--bk-muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-calapp__slot--pendingapproval, .bk-calapp__slot--requested { border-left: 4px solid #f59e0b; }
.bk-calapp__slot--confirmed { border-left: 4px solid var(--bk-accent); }
.bk-calapp__slot--checkedin { border-left: 4px solid #0284c7; }
.bk-calapp__slot--inprogress { border-left: 4px solid #9333ea; }
.bk-calapp__slot--completed { border-left: 4px solid #059669; }
.bk-calapp__slot--noshow { border-left: 4px solid #dc2626; }

.bk-calapp__slot-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 88px; padding: 10px 16px; border-radius: 999px;
    border: 1px solid var(--bk-accent); color: var(--bk-accent); background: #fff;
    font-weight: 700; font-size: .9rem; text-decoration: none;
    transition: background .15s, color .15s, box-shadow .15s;
}
.bk-calapp__slot-btn:hover {
    background: var(--bk-accent); color: #fff; box-shadow: 0 6px 14px rgba(102, 126, 234, .25);
}
.bk-calapp__slot-btn--ghost {
    min-width: 64px; padding: 8px 12px; font-size: .82rem; border-color: var(--bk-line); color: var(--bk-ink);
}
.bk-calapp__slot-btn--ghost:hover { border-color: var(--bk-accent); background: var(--bk-accent-soft); color: var(--bk-accent); box-shadow: none; }
.bk-calapp__quick {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bk-line);
}
.bk-calapp__resources { margin-top: 16px; color: var(--bk-muted); font-size: .85rem; }
.bk-calapp__resources summary { cursor: pointer; font-weight: 600; color: var(--bk-ink); }
.bk-calapp__resources ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.bk-calapp__resources li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-calapp__resources small { color: var(--bk-muted); }
.bk-calapp__res-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

@media (max-width: 1100px) {
    .bk-calapp { grid-template-columns: 220px minmax(0, 1fr); }
    .bk-calapp__card { grid-template-columns: minmax(0, 1fr) minmax(240px, .95fr); }
}
/* Phone calendar layout continues in the mobile section below (≤900px). */
@media (max-width: 560px) {
    .bk-calapp__month { padding: 12px 12px 16px; }
    .bk-calapp__schedule { padding: 16px 12px; }
    .bk-calapp__facts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- Detail ---------- */
.bk-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 992px) { .bk-detail { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); } }
.bk-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bk-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 20px; margin: 0; }
.bk-kv dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted); margin-bottom: 2px; }
.bk-kv dd { margin: 0; color: var(--bk-ink); word-break: break-word; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-actions form { margin: 0; }
.bk-ledger { list-style: none; padding: 0; margin: 0; }
.bk-ledger li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--bk-line); font-variant-numeric: tabular-nums; }
.bk-ledger li:last-child { border-bottom: 0; }
.bk-ledger li.is-total { font-weight: 700; font-size: 1.05rem; border-bottom: 0; padding-top: 10px; }
.bk-disclosure { border: 1px solid var(--bk-line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.bk-disclosure > summary {
    list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--bk-ink);
    display: flex; align-items: center; gap: 10px;
}
.bk-disclosure > summary::-webkit-details-marker { display: none; }
.bk-disclosure > summary::after { content: "+"; margin-left: auto; color: var(--bk-muted); font-weight: 400; font-size: 1.2rem; }
.bk-disclosure[open] > summary::after { content: "\2212"; }
.bk-disclosure > summary small { font-weight: 400; color: var(--bk-muted); }
.bk-disclosure__body { padding: 0 0 0 30px; }
.bk-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.bk-timeline li { position: relative; padding: 0 0 14px 22px; }
.bk-timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bk-accent); }
.bk-timeline li::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--bk-line); }
.bk-timeline li:last-child::after { display: none; }
.bk-timeline small { color: var(--bk-muted); display: block; }
.bk-chip { display: inline-flex; align-items: center; gap: 6px; background: #f3f4f6; border-radius: 999px; padding: 3px 10px; font-size: .8rem; color: #374151; margin: 0 6px 6px 0; }

/* ---------- Steps and choice cards (front desk, public) ---------- */
.bk-steps { display: flex; gap: 8px; margin-bottom: 16px; }
.bk-step {
    flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
    background: #fff; border: 1px solid var(--bk-line); color: var(--bk-muted); font-weight: 500; min-width: 0;
    font: inherit; text-align: left; cursor: default;
}
button.bk-step { cursor: pointer; appearance: none; -webkit-appearance: none; }
button.bk-step:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: 2px; }
.bk-step__num {
    width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: #f1f3f7; font-size: .8rem; font-weight: 700;
}
.bk-step.is-active { border-color: var(--bk-accent); color: var(--bk-ink); }
.bk-step.is-active .bk-step__num { background: var(--bk-accent); color: #fff; }
.bk-step.is-done .bk-step__num { background: var(--bk-success); color: #fff; }
.bk-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bk-choice { position: relative; }
.bk-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bk-choice label {
    display: block; height: 100%; padding: 12px 14px; border: 1.5px solid var(--bk-line); border-radius: 10px; background: #fff;
    cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; margin: 0;
}
.bk-choice label:hover { border-color: #c7d2fe; }
.bk-choice input:checked + label { border-color: var(--bk-accent); background: var(--bk-accent-soft); box-shadow: 0 0 0 3px rgba(102, 126, 234, .15); }
.bk-choice input:focus-visible + label { outline: 2px solid var(--bk-accent); outline-offset: 2px; }
.bk-choice__title { font-weight: 600; color: var(--bk-ink); display: block; }
.bk-choice__meta { font-size: .82rem; color: var(--bk-muted); }
.bk-choice__price { font-weight: 700; color: #4f46e5; float: right; margin-left: 8px; }
.bk-arrivals { list-style: none; margin: 0; padding: 0; }
.bk-arrivals li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bk-line); }
.bk-arrivals li:last-child { border-bottom: 0; }
.bk-arrivals .bk-arrivals__main { flex: 1; min-width: 0; }
.bk-arrivals form { margin: 0; }

/* ---------- Interactive user guide ---------- */
.bk-guide {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
@media (min-width: 992px) {
    .bk-guide { grid-template-columns: 260px minmax(0, 1fr); }
}
.bk-guide__nav {
    background: #fff;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    padding: 12px;
    position: sticky;
    top: calc(var(--erp-top-navbar-offset, 44px) + env(safe-area-inset-top, 0px) + 72px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: var(--bk-shadow);
}
.bk-guide__progress { margin-bottom: 12px; }
.bk-guide__progress-label {
    font-size: .8rem; font-weight: 600; color: var(--bk-muted);
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.bk-guide__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bk-guide__step {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: 10px; border: 0; background: transparent;
    color: var(--bk-muted); font: inherit; font-weight: 500; text-align: left; cursor: pointer;
    min-height: 44px;
}
.bk-guide__step:hover { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-guide__step.is-active { background: var(--bk-accent); color: #fff; }
.bk-guide__step.is-active .erp-icon,
.bk-guide__step.is-active .bi,
.bk-guide__step.is-active svg { filter: brightness(0) invert(1); }
.bk-guide__step.is-done:not(.is-active) { color: var(--bk-ink); }
.bk-guide__step-num {
    width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f1f3f7; font-size: .75rem; font-weight: 700;
}
.bk-guide__step.is-active .bk-guide__step-num { background: rgba(255, 255, 255, .22); color: #fff; }
.bk-guide__step.is-done .bk-guide__step-num { background: #d1fae5; color: #047857; }
.bk-guide__step.is-active.is-done .bk-guide__step-num { background: rgba(255, 255, 255, .22); color: #fff; }
.bk-guide__step-label { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; }
.bk-guide__step-check {
    width: 10px; height: 10px; border-radius: 50%; background: transparent; flex: 0 0 auto;
}
.bk-guide__step.is-done .bk-guide__step-check { background: var(--bk-success); }
.bk-guide__step.is-active.is-done .bk-guide__step-check { background: #fff; }
.bk-guide__panel[hidden] { display: none !important; }
.bk-guide__done-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin: 0;
    font-size: .85rem; font-weight: 600; color: var(--bk-muted); cursor: pointer;
}
.bk-guide__done-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--bk-accent); }
.bk-guide__cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 16px 0;
}
.bk-guide__card {
    border: 1px solid var(--bk-line); border-radius: 12px; padding: 14px;
    background: #fafbfc; display: grid; gap: 6px; color: var(--bk-muted); font-size: .88rem;
}
.bk-guide__card strong { color: var(--bk-ink); font-size: .95rem; }
.bk-guide__checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bk-guide__checklist > li {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; border: 1px solid var(--bk-line); border-radius: 12px; background: #fff;
}
.bk-guide__checklist > li > div { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.bk-guide__checklist > li strong { color: var(--bk-ink); }
.bk-guide__checklist > li span { color: var(--bk-muted); font-size: .9rem; }
.bk-guide__path {
    border: 1px solid var(--bk-line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: #fafbfc;
}
.bk-guide__path h3 { font-size: 1rem; margin: 0 0 8px; }
.bk-guide__path ol { margin: 0 0 12px; padding-left: 1.2rem; }
.bk-guide__path li { margin-bottom: 4px; }
.bk-guide__flow {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    padding: 12px; border-radius: 10px; background: var(--bk-accent-soft);
    color: #4338ca; font-weight: 600; font-size: .9rem; margin-bottom: 14px;
}
.bk-guide__nav-btns {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px;
}
@media (max-width: 991.98px) {
    .bk-guide__nav {
        position: static; max-height: none;
        display: flex; flex-direction: column;
    }
    .bk-guide__steps {
        display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px;
        -webkit-overflow-scrolling: touch; padding-bottom: 4px;
    }
    .bk-guide__steps > li { flex: 0 0 auto; }
    .bk-guide__step { white-space: nowrap; }
    .bk-guide__step-label .erp-icon,
    .bk-guide__step-label .bi,
    .bk-guide__step-label svg { display: none; }
}
@media (max-width: 575.98px) {
    .bk-guide__step-label { font-size: .82rem; }
    .bk-guide__nav-btns .btn { flex: 1 1 auto; }
}

/* ---------- Settings ---------- */
.bk-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 992px) {
    .bk-settings { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
    .bk-settings-nav { grid-row: 1 / -1; }
    .bk-settings > .tab-content,
    .bk-settings > .bk-settings-sticky-save--global {
        grid-column: 2;
    }
}
.bk-settings-nav {
    display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius); padding: 8px; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto;
}
.bk-settings-nav .nav-link {
    display: flex; align-items: center; gap: 10px; color: var(--bk-muted); border-radius: 8px; padding: 10px 12px; font-weight: 500; text-align: left;
    border: 0; background: none; width: 100%; transition: background .12s, color .12s;
}
.bk-settings-nav .nav-link:hover { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-settings-nav .nav-link.active { background: var(--bk-accent); color: #fff; box-shadow: 0 4px 12px rgba(102, 126, 234, .28); }
.bk-settings-nav .nav-link.active .erp-icon,
.bk-settings-nav .nav-link.active .bi,
.bk-settings-nav .nav-link.active svg { filter: brightness(0) invert(1); }
.bk-settings-nav .bk-count { margin-left: auto; background: #eef0f4; color: #4b5563; }
.bk-settings-nav .nav-link.active .bk-count { background: rgba(255, 255, 255, .22); color: #fff; }
.bk-settings-nav .nav-link:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: 2px; }
@media (max-width: 991.98px) {
    .bk-settings-nav {
        flex-direction: row; overflow-x: auto; position: static; max-height: none;
        padding: 6px; gap: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    }
    .bk-settings-nav .nav-link { white-space: nowrap; width: auto; flex: 0 0 auto; }
}
.bk-settings-pane-lead {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.bk-settings-pane-lead p { margin: 0; color: var(--bk-muted); font-size: .925rem; max-width: 52rem; line-height: 1.45; }
.bk-settings-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    font-size: .9rem; font-weight: 600; line-height: 1.2; background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .35);
}
.bk-settings-pill .erp-icon,
.bk-settings-pill .bi,
.bk-settings-pill svg { color: #fff; fill: currentColor; }
.bk-settings-pill--ok { background: rgba(16, 185, 129, .2); border-color: rgba(16, 185, 129, .45); }
.bk-settings-pill--warn { background: rgba(245, 158, 11, .22); border-color: rgba(245, 158, 11, .5); }
.bk-settings-card-intro {
    font-size: .875rem; color: var(--bk-muted); margin: -4px 0 14px; line-height: 1.45;
}
.bk-settings-group {
    border: 1px solid var(--bk-line); border-radius: 12px; padding: 14px 16px; background: #fafbfc; margin-top: 14px;
}
.bk-settings-group > .bk-section-label { margin-top: 0; }
.bk-settings-sticky-save {
    position: sticky; bottom: 12px; z-index: 5; margin-top: 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .92);
    border: 1px solid var(--bk-line); box-shadow: 0 8px 24px rgba(17, 24, 39, .08); backdrop-filter: blur(8px);
}
.bk-settings-sticky-save .bk-help { margin: 0; flex: 1 1 12rem; }
.bk-settings-sticky-save--global[hidden] { display: none !important; }
.bk-select-meet {
    min-width: min(100%, 16rem);
    width: 100%;
}
.bk-meet-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-end;
}
.bk-meet-row__field {
    flex: 1 1 16rem;
    min-width: min(100%, 16rem);
}
.bk-meet-row__actions { flex: 0 0 auto; }
.bk-meet-row__hint {
    flex: 1 1 100%;
    margin: 0;
}
.bk-pane-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bk-list-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--bk-line);
    border-radius: 12px; background: #fafbfc;
}
.bk-list-toolbar .bk-search { flex: 1 1 200px; max-width: 320px; margin: 0; }
.bk-list-toolbar__select { width: auto; min-width: 8.5rem; max-width: 12rem; flex: 0 1 auto; }
.bk-list-toolbar__size { min-width: 7rem; max-width: 8.5rem; }
.bk-table-scroll {
    overflow: auto; border: 1px solid var(--bk-line); border-radius: 12px; background: #fff;
    max-height: min(70vh, 720px);
}
.bk-table-scroll .bk-table { margin: 0; }
.bk-table--compact th, .bk-table--compact td { padding: 10px 12px; }
.bk-table--compact thead th {
    position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--bk-line);
}
.bk-table .bk-meta { font-size: .78rem; color: var(--bk-muted); margin-top: 2px; }
.bk-table .bk-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.bk-slug {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem; background: #f3f4f6; color: #374151; padding: 2px 6px; border-radius: 6px;
}
.bk-chip--ok { background: #ecfdf5; color: #047857; }
.bk-chip-wrap { display: flex; flex-wrap: wrap; gap: 0; }
.bk-td-actions { white-space: nowrap; }
.bk-row-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.bk-row-detail > td { background: #f8fafc; border-bottom: 1px solid var(--bk-line); padding: 14px 16px !important; }
.bk-row-detail__grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
}
.bk-row-detail__panel {
    background: #fff; border: 1px solid var(--bk-line); border-radius: 12px; padding: 14px;
}
.bk-row-detail__title { font-size: .92rem; font-weight: 600; margin: 0 0 4px; color: var(--bk-ink); }
.bk-res-row.is-expanded { background: #f5f3ff; }
.bk-res-row.is-expanded td { border-bottom-color: transparent; }
.bk-pager {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 12px; padding-top: 4px;
}
.bk-pager__meta { font-size: .85rem; color: var(--bk-muted); font-variant-numeric: tabular-nums; }
.bk-pager__btns { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bk-pager__pages { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.bk-pager__pages .btn.is-active {
    background: var(--bk-accent); border-color: var(--bk-accent); color: #fff;
}
@media (max-width: 767.98px) {
    .bk-list-toolbar .bk-search { max-width: none; flex-basis: 100%; }
    .bk-list-toolbar__select { flex: 1 1 calc(50% - 8px); max-width: none; min-width: 0; }
    .bk-table-scroll { max-height: none; border: 0; }
    .bk-table--compact thead th { position: static; }
    .bk-td-actions .bk-row-actions { justify-content: flex-start; }
    .bk-pager { flex-direction: column; align-items: stretch; }
    .bk-pager__btns { justify-content: space-between; }
}
.bk-settings-checklist.is-complete {
    border-color: #a7f3d0; background: linear-gradient(180deg, #ecfdf5, #fff);
}
.bk-settings-checklist.is-complete .bk-meter { display: none; }
.bk-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px 16px; }
.bk-form-grid > * { min-width: 0; }
.bk-form-grid .bk-span-2 { grid-column: span 2; }
.bk-datetime-now {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
.bk-datetime-now > input {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    max-width: 100%;
}
.bk-datetime-now__btn {
    flex: 0 0 auto;
    white-space: nowrap;
    align-self: stretch;
}
@media (max-width: 575.98px) {
    .bk-form-grid .bk-span-2 { grid-column: span 1; }
}
.bk-switch {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    padding-left: 0; min-height: 0; margin-bottom: 0;
}
.bk-switch .form-check-input {
    float: none; margin: 0; flex: 0 0 auto;
    width: 2.25em; height: 1.25em;
}
.bk-switch .form-check-label {
    font-weight: 500; color: var(--bk-ink); margin: 0; padding: 0;
}
.bk-help { font-size: .8rem; color: var(--bk-muted); margin-top: 4px; }
.bk-copy { display: flex; gap: 6px; }
.bk-copy input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.bk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bk-week__day { background: #fafbfc; border: 1px solid var(--bk-line); border-radius: 8px; padding: 8px; min-height: 72px; font-size: .8rem; }
.bk-week__day strong { display: block; color: var(--bk-ink); margin-bottom: 4px; }
.bk-week__range { display: block; background: var(--bk-accent-soft); color: #4f46e5; border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bk-hours-edit { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bk-hours-edit__row {
    display: grid; grid-template-columns: minmax(8.5rem, 11rem) 1fr; gap: 12px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--bk-line); border-radius: 10px; background: #fafbfc;
}
.bk-hours-edit__day {
    display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; color: var(--bk-ink); cursor: pointer;
}
.bk-hours-edit__day input { width: 1.1rem; height: 1.1rem; accent-color: var(--bk-accent); cursor: pointer; }
.bk-hours-edit__times { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bk-hours-edit__times .form-control { max-width: 9rem; }
.bk-hours-edit__sep { color: var(--bk-muted); font-size: .85rem; }
.bk-hours-edit__row:has(input[data-hours-open]:not(:checked)) { opacity: .55; }
.bk-hours-edit__row:has(input[data-hours-open]:not(:checked)) .bk-hours-edit__times { pointer-events: none; }
.bk-empty--compact { padding: 28px 16px; }
.bk-empty--compact .bk-empty__icon { margin-bottom: 10px; }

/* ---------- Public booking pages ---------- */
.bk-public { background: var(--bk-canvas); min-height: 100vh; color: var(--bk-ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.bk-public__hero { background: linear-gradient(135deg, var(--bk-accent), var(--bk-accent-2)); color: #fff; padding: 32px 0 72px; }
.bk-public__hero h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.bk-public__hero p { margin: 6px 0 0; opacity: .9; }
.bk-public__main { margin-top: -48px; padding-bottom: 48px; }
.bk-panel { background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(17, 24, 39, .08); padding: 24px; margin-bottom: 16px; }
.bk-panel h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.bk-panel h2 .bk-step__num { background: var(--bk-accent); color: #fff; }
.bk-summary { position: sticky; top: 16px; }
.bk-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; }
.bk-summary__row span:first-child { color: var(--bk-muted); }
.bk-summary__total { border-top: 1px solid var(--bk-line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.1rem; }
.bk-public .form-control, .bk-public .form-select { border-radius: 10px; min-height: 46px; }
.bk-public .btn-primary { background: var(--bk-accent); border-color: var(--bk-accent); border-radius: 10px; min-height: 48px; font-weight: 600; }
.bk-public .btn-primary:hover { background: #5a67d8; border-color: #5a67d8; }
.bk-ticket { text-align: center; }
.bk-ticket__code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: .12em; font-weight: 700; color: #4338ca; background: var(--bk-accent-soft); border-radius: 12px; padding: 10px 16px; display: inline-block; }
.bk-public__foot { text-align: center; color: var(--bk-muted); font-size: .8rem; padding: 16px 0 32px; }

/* ---------- Row overflow (Open + More) ---------- */
.bk-row-more .dropdown-toggle::after { margin-left: 4px; }
.bk-row-more .dropdown-menu { min-width: 10rem; }
.bk-row-more .dropdown-item form { margin: 0; }
.bk-row-more .dropdown-item button {
    background: none; border: 0; padding: 0; width: 100%; text-align: left;
    color: inherit; font: inherit; cursor: pointer;
}
.bk-row-more .dropdown-item button.text-danger { color: var(--bk-danger) !important; }

/* ---------- Detail sticky CTA ---------- */
.bk-detail-sticky {
    display: none;
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--bk-line);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .14);
    backdrop-filter: blur(8px);
    gap: 10px;
    align-items: center;
}
.bk-page:has(.bk-detail-sticky) { padding-bottom: 88px; }
.bk-detail-sticky__who { flex: 1; min-width: 0; }
.bk-detail-sticky__name { font-weight: 700; color: var(--bk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-detail-sticky__meta { font-size: .78rem; color: var(--bk-muted); }
.bk-detail-sticky__actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.bk-detail-sticky__actions .btn { min-height: 40px; }
.bk-ops-desktop { display: block; }
.bk-disclosure--mobile-default[open] { /* open only when attribute present */ }

/* ---------- Front desk stepped (mobile) ---------- */
.bk-frontdesk-layout { display: grid; gap: 16px; }
@media (min-width: 992px) {
    .bk-frontdesk-layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; }
}
.bk-step-panel-nav { display: none; gap: 8px; margin-top: 12px; }
.bk-arrivals-first { order: 0; }
.bk-walkin-form { order: 1; }

/* ---------- Reports date stack ---------- */
.bk-reports-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-reports-dates .form-control-modern { min-width: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    .bk-tabs {
        top: calc(var(--erp-top-navbar-offset, 44px) + env(safe-area-inset-top, 0px));
        margin-left: -4px;
        margin-right: -4px;
        border-radius: 10px;
    }
    .bk-page .page-header-actions .bk-header-secondary { display: none !important; }
    .bk-header-more { display: inline-flex; }
    .bk-page .page-header-actions .btn-save { flex: 1 1 auto; }

    .bk-toolbar { flex-direction: column; align-items: stretch; }
    .bk-toolbar .bk-segment { width: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bk-toolbar .bk-segment a,
    .bk-toolbar .bk-segment label { flex: 0 0 auto; min-height: 40px; }
    .bk-toolbar .bk-search,
    .bk-search.ms-auto { flex: 1 1 100%; width: 100%; max-width: none; margin-left: 0 !important; }
    .bk-reports-dates { width: 100%; flex-direction: column; align-items: stretch; }
    .bk-reports-dates .form-control-modern { width: 100%; }
    .bk-reports-dates .btn { width: 100%; }

    .bk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .bk-stat { padding: 12px; }
    .bk-stat--link { min-height: 88px; }
    .bk-stat__value { font-size: 1.3rem; }
    .bk-step__text { display: none; }
    .bk-step { justify-content: center; cursor: pointer; }
    .bk-step.is-clickable { cursor: pointer; }
    .bk-form-grid .bk-span-2 { grid-column: auto; }
    .bk-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bk-hours-edit__row { grid-template-columns: 1fr; gap: 8px; }
    .bk-hours-edit__times .form-control { max-width: none; flex: 1 1 6rem; }
    .bk-page .form-control-modern, .bk-page .form-select, .bk-public .form-control, .bk-public .form-select { font-size: 16px; }
    .bk-page .btn, .bk-public .btn { min-height: 44px; touch-action: manipulation; }
    .bk-actions { flex-direction: column; align-items: stretch; }
    .bk-actions .btn, .bk-actions form, .bk-actions form .btn { width: 100%; }
    .bk-detail-sticky { display: flex; }
    .bk-ops-desktop .bk-actions--primary { display: none; }
    .bk-disclosure--mobile-default:not([data-force-open]) { }
    details.bk-disclosure--mobile-default:not(.is-open-desktop) > summary ~ * { }
    .bk-settings-sticky-save {
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .bk-settings-current-tab {
        display: block; font-size: .8rem; font-weight: 600; color: var(--bk-muted);
        margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em;
    }

    /* Front desk: one step at a time */
    .bk-frontdesk-layout { display: flex; flex-direction: column; }
    .bk-arrivals-first { order: -1; }
    .bk-walkin-form .bk-step-panel { display: none; }
    .bk-walkin-form .bk-step-panel.is-active { display: block; }
    .bk-step-panel-nav { display: flex; }
    .bk-step-panel-nav .btn { flex: 1; }

    .bk-table--cards thead { display: none; }
    .bk-table--cards, .bk-table--cards tbody, .bk-table--cards tr, .bk-table--cards td { display: block; width: 100%; }
    .bk-table--cards tr { border: 1px solid var(--bk-line); border-radius: 12px; margin-bottom: 10px; padding: 6px 4px; background: #fff; }
    .bk-table--cards td { border: 0; padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .bk-table--cards td[data-label]::before { content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted); font-weight: 600; }
    .bk-table--cards td.bk-td-main { display: block; }
    .bk-table--cards td.bk-td-actions { justify-content: flex-start; gap: 8px; }
    .bk-table--cards .bk-row-detail {
        border-style: dashed; background: #f8fafc; margin-top: -6px; margin-bottom: 14px;
    }
    .bk-table--cards .bk-row-detail > td {
        display: block; padding: 10px !important;
    }
    .bk-table--cards .bk-row-detail > td::before { display: none; content: none; }
    .bk-table--cards .bk-res-row.is-expanded {
        margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    }
    .bk-table--cards .bk-res-row.is-expanded + .bk-row-detail {
        border-top-left-radius: 0; border-top-right-radius: 0;
    }
    .bk-public__hero { padding: 24px 0 64px; }
    .bk-panel { padding: 18px; border-radius: 14px; }
    .bk-summary { position: static; }
}

@media (min-width: 768px) {
    .bk-settings-current-tab { display: none; }
    details.bk-disclosure--mobile-default { }
}

/* Calendar phone: schedule first, compact banner */
@media (max-width: 900px) {
    .bk-calapp { display: flex; flex-direction: column; gap: 12px; }
    .bk-calapp__banner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand cta"
            "day day"
            "facts facts"
            "link link"
            "powered powered";
        gap: 10px 12px;
        padding: 16px;
        min-height: 0;
    }
    .bk-calapp__brand { grid-area: brand; }
    .bk-calapp__day-title { grid-area: day; margin: 0; font-size: 1.25rem; }
    .bk-calapp__day-date { display: none; }
    .bk-calapp__facts {
        grid-area: facts;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin: 0;
        padding: 0;
        list-style: none;
        border: 0;
    }
    .bk-calapp__facts li {
        display: flex; flex-direction: column; gap: 2px;
        padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .08);
        border: 0;
    }
    .bk-calapp__banner-link { grid-area: link; }
    .bk-calapp__banner-cta { grid-area: cta; align-self: start; margin: 0; }
    .bk-calapp__powered { grid-area: powered; margin: 0; padding-top: 4px; }
    .bk-calapp__card {
        display: flex;
        flex-direction: column;
    }
    .bk-calapp__schedule { order: -1; }
    .bk-calapp__month {
        border-right: 0;
        border-top: 1px solid var(--bk-line);
        border-bottom: 0;
    }
    .bk-calapp__month-summary {
        display: flex; align-items: center; justify-content: space-between;
        gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600;
        list-style: none;
    }
    .bk-calapp__month-summary::-webkit-details-marker { display: none; }
    .bk-calapp__month-body { padding: 0 16px 16px; }
    .bk-calapp__slots { max-height: none; }
    .bk-calapp__slot {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 8px 12px;
    }
    .bk-calapp__slot-body .bk-status { display: inline-flex; }
    .bk-calapp__slot-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    .bk-calapp__slot-actions .bk-calapp__slot-btn,
    .bk-calapp__slot-actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }
}
@media (min-width: 901px) {
    .bk-calapp__month-summary { display: none; }
    .bk-calapp__month-body { display: block !important; padding: 0; }
}
