/* PachBae Studi-OS — Bookings module */

.bookings {
  padding: 36px 36px 80px;
  width: 100%;
  margin: 0 auto;
}

.bookings .stat-strip {
  grid-template-columns: repeat(4, 1fr);
}

/* ─── Toolbar ────────────────────────────────────────────────────────── */
.bk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bk-toolbar-l,
.bk-toolbar-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bk-week-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.bk-week-btn {
  width: 28px;
  height: 28px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-muted);
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: background 0.12s, color 0.12s;
}
.bk-week-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.bk-week-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0 12px;
  min-width: 200px;
  max-width: 320px;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.bk-week-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.bk-view-toggle {
  display: inline-flex;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.bk-view-btn {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: calc(var(--radius) - 2px);
  transition: background 0.12s, color 0.12s;
}
.bk-view-btn.active {
  background: color-mix(in oklab, var(--accent) 12%, var(--surface-2));
  color: var(--accent);
}

.bk-view-toggle .bk-view-btn {
  padding: 0 10px;
}

/* ─── Filters ────────────────────────────────────────────────────────── */
.bk-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bk-status-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bk-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.bk-status-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.bk-status-pill.active {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  background: color-mix(in oklab, var(--accent) 8%, var(--surface));
  color: var(--text-primary);
}
.bk-status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bk-status-pill-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}

/* ─── Week calendar ────────────────────────────────────────────────────── */
.bk-cal-wrap {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.bk-cal-grid {
  display: grid;
  grid-template-columns: 72px repeat(var(--bk-room-cols, 4), 1fr);
  min-width: 0;
}

.bk-cal-head {
  display: contents;
}

.bk-cal-corner {
  padding: 12px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.bk-cal-room-head {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bk-cal-room-head:last-child { border-right: none; }

.bk-cal-room-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px color-mix(in oklab, var(--chip-color, var(--accent)) 60%, transparent);
  background: var(--chip-color, var(--accent));
}

.bk-cal-row {
  display: contents;
}

.bk-cal-day-label {
  padding: 10px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.bk-cal-day-label:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}
.bk-cal-day-label.bk-today {
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
  color: var(--text-primary);
}
.bk-cal-day-label.bk-today .bk-cal-day-num {
  color: var(--accent);
  font-weight: 600;
}
.bk-cal-day-name {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bk-cal-day-num { font-size: 13px; }

.bk-cal-cell {
  min-height: 72px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.12s;
}
.bk-cal-cell:last-child { border-right: none; }
.bk-cal-cell.bk-today {
  background: color-mix(in oklab, var(--accent) 3%, var(--surface));
}
.bk-cal-cell.bk-weekend {
  background: color-mix(in oklab, var(--surface-2) 40%, var(--surface));
}

/* ─── Page-head right summary card ────────────────────────────────────── */
.page-head-r {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 280px;
}
.phr-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 16px;
  white-space: nowrap;
}
.phr-row > :first-child { color: var(--text-muted); letter-spacing: 0.02em; }
.phr-row > :last-child  { color: var(--text-primary); text-align: right; }
.phr-divider { height: 1px; background: var(--border); margin: 3px -16px 3px; }
.phr-ok      { color: oklch(0.80 0.14 145); }

/* ─── Consolidated header strip ───────────────────────────────────────── */
.bk-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.bk-header-l { display: flex; align-items: center; gap: 18px; }
.bk-nav {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 4px;
  overflow: hidden;
}
.bk-nav-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: var(--text-secondary);
  font-size: 16px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
}
.bk-nav-btn:last-child { border-right: none; }
.bk-nav-btn:hover { color: var(--text-primary); background: var(--surface-2); }
.bk-nav-today {
  height: 30px;
  padding: 0 14px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  font-family: var(--font-mono);
  cursor: pointer;
}
.bk-nav-today:hover { background: var(--surface-2); color: var(--accent); }

.bk-range-label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.1;
}
.bk-range-sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}

.bk-header-c { display: flex; gap: 18px; align-items: center; justify-content: center; }
.bk-stat { min-width: 0; padding: 0 14px; border-right: 1px solid var(--border); }
.bk-stat:last-child { border-right: none; }
.bk-stat-k {
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.bk-stat-v { display: flex; align-items: baseline; gap: 6px; }
.bk-stat-num {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.bk-stat.accent .bk-stat-num { color: var(--accent); }
.bk-stat.warn   .bk-stat-num { color: var(--red, oklch(0.7 0.18 25)); }
.bk-stat-sub { font-size: 10px; color: var(--text-faint); letter-spacing: 0.04em; }
.bk-stat-pct { font-size: 13px; color: var(--text-muted); margin-left: 1px; }
.bk-util-bar {
  width: 60px; height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}
.bk-util-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, oklch(0.72 0.13 145), var(--accent));
  border-radius: 2px;
  box-shadow: 0 0 6px var(--accent);
}

.bk-header-r { display: flex; gap: 10px; align-items: center; }
.bk-header-r .bk-view-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
}
.bk-header-r .bk-view-toggle button {
  height: 26px;
  padding: 0 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  border-radius: 3px;
  cursor: pointer;
}
.bk-header-r .bk-view-toggle button:hover { color: var(--text-primary); }
.bk-header-r .bk-view-toggle button.active {
  background: var(--surface-2);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.bk-subtoolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

/* ─── Detail rail (right side panel) ──────────────────────────────────── */
.bk-detail {
  background: var(--surface);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.bk-detail.empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
}
.bk-detail-empty { display: flex; flex-direction: column; align-items: center; }
.bk-detail-empty-glyph {
  font-size: 28px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.bk-detail-empty-title {
  font-size: 16px;
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.bk-detail-empty-body {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.5;
}

.bk-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.bk-detail-kicker {
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--detail-color, var(--accent));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--detail-color, var(--accent)) 25%, var(--border));
  padding-right: 14px;
}
.bk-detail-glyph { font-size: 11px; }
.bk-detail-close {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s;
}
.bk-detail-close:hover { color: var(--text-primary); border-color: var(--border-strong, var(--border)); }

.bk-detail-title-block { margin-top: -6px; }
.bk-detail-artist {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.05;
}
.bk-detail-project {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  margin-top: 4px;
}
.bk-detail-label {
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.bk-detail-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.bk-detail-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px 0 8px;
  border-radius: 11px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  background: color-mix(in oklab, currentColor 8%, var(--surface));
  border: 1px solid;
}
.bk-detail-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.bk-detail-hold-info {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bk-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bk-detail-cell { min-width: 0; }
.bk-detail-k {
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.bk-detail-v {
  font-size: 12.5px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.bk-detail-v.accent { color: var(--accent); font-weight: 500; }
.bk-detail-v-sub {
  font-size: 10px;
  color: var(--text-faint);
  margin-left: 3px;
  font-family: var(--font-mono);
}

.bk-detail-section {
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.bk-detail-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.bk-detail-section-count { color: var(--text-faint); font-size: 9.5px; }
.bk-detail-gear { display: flex; flex-direction: column; gap: 4px; }
.bk-detail-gear-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--border);
}
.bk-detail-gear-row:last-child { border-bottom: none; }
.bk-detail-gear-id { font-size: 9.5px; color: var(--text-faint); }
.bk-detail-gear-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bk-detail-gear-brand { font-size: 9.5px; color: var(--text-muted); }
.bk-detail-gear-model { font-size: 11.5px; color: var(--text-primary); }
.bk-detail-gear-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--detail-color, var(--accent));
  box-shadow: 0 0 6px var(--detail-color, var(--accent));
}

.bk-detail-notes {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.bk-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.bk-detail-actions .tb-btn { width: 100%; }
.bk-detail-actions .bk-drawer-delete--confirm {
  color: var(--red, oklch(0.7 0.18 25));
  border-color: var(--red, oklch(0.7 0.18 25));
}

/* ─── Booking pills (calendar) ───────────────────────────────────────── */
.bk-pill {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 5px 9px 5px 13px;
  border-radius: 4px;
  border: 1px solid color-mix(in oklab, var(--chip-color, var(--accent)) 40%, var(--border-strong, var(--border)));
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--chip-color, var(--accent)) 24%, var(--surface-2)),
    color-mix(in oklab, var(--chip-color, var(--accent)) 14%, var(--surface)));
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.12s, box-shadow 0.12s;
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 2px 4px rgba(0,0,0,0.2);
}
.bk-pill::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--chip-color, var(--accent));
  box-shadow: 0 0 8px var(--chip-color, var(--accent));
}
.bk-pill:hover {
  transform: translateY(-1px);
  border-color: var(--chip-color, var(--accent));
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 6px 14px -4px color-mix(in oklab, var(--chip-color, var(--accent)) 50%, rgba(0,0,0,0.4));
}
.bk-pill.selected {
  border-color: var(--chip-color, var(--accent));
  box-shadow:
    0 0 0 1px var(--chip-color, var(--accent)),
    0 0 24px color-mix(in oklab, var(--chip-color, var(--accent)) 40%, transparent),
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset;
}
.bk-pill.bk-pill--continued {
  opacity: 0.85;
  border-style: dashed;
}
.bk-pill.bk-pill--conflict {
  border-color: oklch(0.65 0.18 25);
  border-style: dashed;
}
.bk-pill-artist {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-pill-meta {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-pill-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
  color: var(--text-faint);
}

.bk-pill--compact {
  padding: 3px 6px;
  border-radius: 3px;
}
.bk-pill--compact .bk-pill-artist {
  font-size: 10px;
  font-weight: 500;
}

/* ─── Month view ─────────────────────────────────────────────────────── */
.bk-cal-wrap--month {
  overflow-x: auto;
}

.bk-month-grid {
  min-width: 720px;
}

.bk-month-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.bk-month-dow {
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
}

.bk-month-body {
  display: flex;
  flex-direction: column;
}

.bk-month-week {
  position: relative;
  border-bottom: 1px solid var(--border);
  min-height: 110px;
  display: flex;
  flex-direction: column;
}
.bk-month-week:last-child { border-bottom: none; }

.bk-month-week-cells {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  pointer-events: auto;
}
.bk-month-week-bars {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 22px;
  gap: 2px 1px;
  padding: 26px 2px 0;
  pointer-events: none;
  min-height: calc(26px + var(--lane-count, 1) * 24px);
}
.bk-month-week-bars > * { pointer-events: auto; }

.bk-month-week-more {
  position: absolute;
  inset: auto 0 4px 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  z-index: 1;
  pointer-events: none;
}
.bk-month-more-cell {
  padding: 0 6px;
  text-align: left;
}

.bk-month-cell {
  min-height: 110px;
  padding: 6px 8px 8px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.12s;
}
.bk-month-cell:nth-child(7n) { border-right: none; }
.bk-month-cell:hover {
  background: var(--surface-2);
}
.bk-month-cell--outside {
  background: color-mix(in oklab, var(--surface-2) 55%, var(--surface));
}
.bk-month-cell--outside .bk-month-day-num {
  color: var(--text-faint);
}
.bk-month-cell.bk-today {
  background: color-mix(in oklab, var(--accent) 5%, var(--surface));
}
.bk-month-cell.bk-weekend {
  background: color-mix(in oklab, var(--surface-2) 35%, var(--surface));
}

.bk-month-day-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1;
}
.bk-month-day-num--today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.bk-month-more {
  font-size: 9.5px;
  color: var(--text-muted);
  padding: 2px 4px;
}

.bk-month-bar {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 8px 0 12px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid color-mix(in oklab, var(--chip-color, var(--accent)) 40%, var(--border-strong, var(--border)));
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--chip-color, var(--accent)) 24%, var(--surface-2)),
    color-mix(in oklab, var(--chip-color, var(--accent)) 14%, var(--surface)));
  color: var(--text-primary);
  cursor: grab;
  text-align: left;
  overflow: hidden;
  transition: transform 0.1s, border-color 0.12s, box-shadow 0.12s;
  touch-action: none;
  user-select: none;
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 2px 4px rgba(0,0,0,0.2);
}
.bk-month-bar::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--chip-color, var(--accent));
  box-shadow: 0 0 8px var(--chip-color, var(--accent));
}
.bk-month-bar:active { cursor: grabbing; }
.bk-month-bar--dragging {
  z-index: 10;
  opacity: 0.92;
  transition: none;
}
.bk-month-bar-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  z-index: 2;
}
.bk-month-bar-handle--l { left: 0; }
.bk-month-bar-handle--r { right: 0; }
.bk-month-bar-handle:hover {
  background: color-mix(in oklab, black 25%, transparent);
}
.bk-month-bar:hover {
  transform: translateY(-1px);
  border-color: var(--chip-color, var(--accent));
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 6px 14px -4px color-mix(in oklab, var(--chip-color, var(--accent)) 50%, rgba(0,0,0,0.4));
}
.bk-month-bar.selected {
  border-color: var(--chip-color, var(--accent));
  box-shadow:
    0 0 0 1px var(--chip-color, var(--accent)),
    0 0 24px color-mix(in oklab, var(--chip-color, var(--accent)) 40%, transparent),
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset;
}
.bk-month-bar--cont-l {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
  padding-left: 8px;
  margin-left: -1px;
}
.bk-month-bar--cont-l::before { display: none; }
.bk-month-bar--cont-r {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  margin-right: -1px;
}
.bk-month-bar-title {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Day view (legacy classes kept for safety) ─────────────────── */
.bk-day-empty {
  font-size: 11.5px;
  color: var(--text-faint);
  font-style: italic;
  padding: 8px 4px;
}

/* ─── List view ──────────────────────────────────────────────────────── */
.bk-list-wrap {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.bk-list-head,
.bk-list-row {
  display: grid;
  grid-template-columns: 100px 1.4fr 1fr 0.9fr 0.8fr 100px 72px;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
}

.bk-list-head {
  height: 36px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.bk-list-row {
  min-height: 52px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.bk-list-row:last-child { border-bottom: none; }
.bk-list-row:hover { background: var(--surface-2); }
.bk-list-row.selected {
  background: color-mix(in oklab, var(--accent) 6%, var(--surface-2));
}
.bk-list-row.bk-list-row--conflict .bk-list-id {
  color: oklch(0.75 0.14 25);
}

.bk-list-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.bk-list-artist { font-weight: 500; color: var(--text-primary); }
.bk-list-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.bk-list-room {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.bk-list-room-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chip-color, var(--accent));
}

.bk-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
}
.bk-status-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.bk-conflict-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: oklch(0.75 0.14 25);
  padding: 2px 6px;
  border: 1px solid oklch(0.55 0.14 25);
  border-radius: 4px;
}

.bk-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─── Body layout (list + drawer) ───────────────────────────────────── */
.bk-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.bk-main {
  flex: 1;
  min-width: 0;
}
.bk-body > .bk-detail { width: 340px; flex-shrink: 0; }

/* ─── Booking drawer extras ──────────────────────────────────────────── */
.bk-drawer-range {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.bookings .drawer-hero {
  padding: 20px 16px 16px;
  min-height: auto;
}
.bk-drawer-conflict {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin: 12px 14px 0;
  background: color-mix(in oklab, oklch(0.65 0.18 25) 10%, var(--surface));
  border: 1px solid oklch(0.55 0.14 25);
  border-radius: var(--radius);
  font-size: 12px;
  color: oklch(0.82 0.12 25);
  line-height: 1.4;
}
.bk-drawer-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.bk-drawer-actions .tb-btn { flex: 1; justify-content: center; }
.bk-drawer-delete { color: oklch(0.75 0.14 25) !important; }
.bk-drawer-delete--confirm {
  border-color: oklch(0.55 0.14 25) !important;
  background: color-mix(in oklab, oklch(0.65 0.18 25) 12%, var(--surface)) !important;
  color: oklch(0.82 0.12 25) !important;
}

@media (max-width: 1100px) {
  .bk-list-head,
  .bk-list-row {
    grid-template-columns: 90px 1fr 0.8fr 80px;
  }
  .bk-list-head > :nth-child(4),
  .bk-list-head > :nth-child(5),
  .bk-list-head > :nth-child(6),
  .bk-list-row > :nth-child(4),
  .bk-list-row > :nth-child(5),
  .bk-list-row > :nth-child(6) {
    display: none;
  }
}

@media (max-width: 900px) {
  .bookings { padding: 24px 20px 60px; }
  .bookings .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .drawer { width: 100%; position: fixed; inset: auto 0 0 0; max-height: 70vh; z-index: 50; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* ─── Horizontal week view ───────────────────────────────────────── */
.bk-wk-wrap { overflow-x: auto; }

.bk-wk-header {
  display: grid;
  grid-template-columns: 100px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.bk-wk-corner {
  padding: 12px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-right: 1px solid var(--border);
}
.bk-wk-dayhd {
  padding: 10px 12px;
  text-align: left;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background 0.1s;
}
.bk-wk-dayhd:last-child { border-right: none; }
.bk-wk-dayhd:hover { background: var(--surface-3, color-mix(in oklab, var(--border) 30%, var(--surface-2))); }
.bk-wk-dayhd.bk-today { background: color-mix(in oklab, var(--accent) 9%, var(--surface-2)); }
.bk-wk-dayhd.bk-weekend { opacity: 0.75; }

.bk-wk-room-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 80px;
}
.bk-wk-room-row:last-child { border-bottom: none; }

.bk-wk-room-label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 12px 10px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.bk-wk-track {
  position: relative;
  min-height: 80px;
}

.bk-wk-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.bk-wk-bg-cell {
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  background: var(--surface);
}
.bk-wk-bg-cell:last-child { border-right: none; }
.bk-wk-bg-cell:hover { background: color-mix(in oklab, var(--accent) 4%, var(--surface)); }
.bk-wk-bg-cell.bk-today { background: color-mix(in oklab, var(--accent) 5%, var(--surface)); }
.bk-wk-bg-cell.bk-weekend { background: color-mix(in oklab, var(--surface-2) 50%, var(--surface)); }

.bk-wk-block {
  position: absolute;
  top: 8px;
  height: calc(100% - 16px);
  min-height: 48px;
  padding: 7px 9px 6px 13px;
  border-radius: 4px;
  border: 1px solid color-mix(in oklab, var(--chip-color, var(--accent)) 40%, var(--border-strong, var(--border)));
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--chip-color, var(--accent)) 24%, var(--surface-2)),
    color-mix(in oklab, var(--chip-color, var(--accent)) 14%, var(--surface)));
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: transform 0.1s, border-color 0.12s, box-shadow 0.12s;
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 2px 4px rgba(0,0,0,0.2);
  z-index: 1;
}
.bk-wk-block::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--chip-color, var(--accent));
  box-shadow: 0 0 8px var(--chip-color, var(--accent));
}
.bk-wk-block:hover {
  transform: translateY(-1px);
  border-color: var(--chip-color, var(--accent));
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 6px 14px -4px color-mix(in oklab, var(--chip-color, var(--accent)) 50%, rgba(0,0,0,0.4));
  z-index: 2;
}
.bk-wk-block.selected {
  border-color: var(--chip-color, var(--accent));
  box-shadow:
    0 0 0 1px var(--chip-color, var(--accent)),
    0 0 24px color-mix(in oklab, var(--chip-color, var(--accent)) 40%, transparent),
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset;
  z-index: 3;
}
.bk-wk-block.conflict { border-style: dashed; }
.bk-wk-block { cursor: grab; touch-action: none; user-select: none; }
.bk-wk-block:active { cursor: grabbing; }
.bk-wk-block--dragging {
  opacity: 0.55;
  z-index: 10;
  transition: none;
}
.bk-wk-block-artist {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-wk-block-type {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.bk-wk-cont {
  font-size: 9px;
  opacity: 0.6;
  position: absolute;
}
.bk-wk-cont-l { left: 3px; top: 50%; transform: translateY(-50%); }
.bk-wk-cont-r { right: 3px; top: 50%; transform: translateY(-50%); }

/* ─── Quick status buttons in drawer ─────────────────────────── */
.bk-drawer-status-row {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  flex-wrap: wrap;
}
.bk-quick-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.bk-quick-status:hover { color: var(--text-primary); border-color: var(--border-strong); }
.bk-quick-status.active {
  border-color: var(--s-color);
  background: color-mix(in oklab, var(--s-color) 10%, var(--surface));
  color: var(--text-primary);
}
.bk-quick-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--s-color);
  flex-shrink: 0;
}
.bk-drawer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid color-mix(in oklab, var(--s-color) 40%, var(--border));
  background: color-mix(in oklab, var(--s-color) 12%, var(--surface));
  font-size: 11px;
  color: var(--text-secondary);
}

/* ─── Event type visual treatment ─────────────────────────────── */
/* All types use --chip-color with a type-specific fallback so custom
   colours and room colours always take precedence.                  */

/* Maintenance — dashed border distinguishes from a same-room session */
.bk-pill.ev--maintenance,
.bk-wk-block.ev--maintenance,
.bk-dg-event.ev--maintenance,
.bk-month-bar.ev--maintenance {
  border-style: dashed;
}

/* Block — neutral grey fallback; uses room color when set */
.bk-pill.ev--block,
.bk-wk-block.ev--block,
.bk-dg-event.ev--block,
.bk-month-bar.ev--block {
  --chip-color: var(--chip-color, oklch(0.62 0.01 65));
  opacity: 0.92;
}

/* "Other" — uses chip-color; muted purple-grey is the default fallback */
.bk-pill.ev--other,
.bk-wk-block.ev--other,
.bk-dg-event.ev--other,
.bk-month-bar.ev--other {
  --chip-color: var(--chip-color, oklch(0.70 0.06 300));
}

.bk-pill-type-icon {
  font-size: 9px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* ─── Cancelled events ───────────────────────────────────────────
   Cancelled sessions stay visible on the calendar (they're only
   removed when actually deleted) but are clearly marked: dimmed,
   diagonally hatched, and struck through.                          */
.bk-pill.is-cancelled,
.bk-month-bar.is-cancelled,
.bk-wk-block.is-cancelled,
.bk-dg-event.is-cancelled {
  opacity: 0.52;
  filter: grayscale(0.55);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 6px,
    rgba(0, 0, 0, 0.16) 6px 12px
  );
}
.bk-pill.is-cancelled:hover,
.bk-month-bar.is-cancelled:hover,
.bk-wk-block.is-cancelled:hover,
.bk-dg-event.is-cancelled:hover {
  opacity: 0.72;
}
.bk-pill.is-cancelled .bk-pill-artist,
.bk-month-bar.is-cancelled .bk-month-bar-title,
.bk-wk-block.is-cancelled .bk-wk-block-artist,
.bk-dg-event.is-cancelled .bk-dg-event-title {
  text-decoration: line-through;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1.2px;
  text-decoration-skip-ink: none;
}
.bk-pill.is-cancelled .bk-pill-status {
  color: oklch(0.65 0.02 65);
  font-weight: 600;
}
/* Small "cancelled" tag on month bars / week blocks / day events,
   which otherwise have no status label of their own.               */
.bk-month-bar.is-cancelled::after,
.bk-wk-block.is-cancelled::after,
.bk-dg-event.is-cancelled::after {
  content: "Cancelled";
  position: absolute;
  top: 2px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: oklch(0.65 0.02 65);
  opacity: 0.9;
  pointer-events: none;
}

/* ─── Event modal type selector ────────────────────────────────── */
.bk-event-modal { max-width: 560px; }

.bk-type-selector {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.bk-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.bk-type-btn:hover { color: var(--text-primary); }
.bk-type-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}
.bk-type-btn-icon { font-size: 11px; }

/* All-day toggle + time row */
.bk-allday-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.bk-allday-toggle input { accent-color: var(--accent); }
.bk-time-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.bk-time-row .mf-field { flex: 1; }

/* Event colour picker */
.bk-color-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bk-color-picker .mf-label { white-space: nowrap; }
.bk-color-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bk-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sw-color);
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: transform 0.1s, box-shadow 0.1s;
}
.bk-color-swatch:hover { transform: scale(1.2); }
.bk-color-swatch.active {
  border-color: var(--bg);
  box-shadow: 0 0 0 2px var(--sw-color);
}

/* Recurrence section */
.bk-recurrence-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.bk-recurrence-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color 0.1s;
}
.bk-recurrence-toggle:hover { color: var(--text-primary); }
.bk-recurrence-body { margin-top: 10px; }

/* ─── Drawer event type badge ───────────────────────────────────── */
.bk-drawer-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.bk-drawer-type-icon { font-size: 11px; }
.bk-drawer-recurrence {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.bk-drawer-status-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  align-self: center;
}

/* ─── Standard week/day view header cells ───────────────────────── */
.bk-sgw-dayhd {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  cursor: pointer;
  transition: background 0.1s;
}
.bk-sgw-dayhd:hover { background: color-mix(in oklab, var(--accent) 6%, var(--surface-2)); }
.bk-sgw-dayhd.bk-today { background: color-mix(in oklab, var(--accent) 10%, var(--surface-2)); }
.bk-sgw-dayhd.bk-weekend { opacity: 0.75; }
.bk-sgw-today-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
.bk-dg-col.bk-today { background: color-mix(in oklab, var(--accent) 3%, transparent); }
.bk-dg-col.bk-weekend { background: color-mix(in oklab, var(--surface-2) 40%, transparent); }

/* ─── Day view time grid ─────────────────────────────────────────── */
.bk-dg-wrap {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.bk-dg-header {
  display: grid;
  grid-template-columns: 52px repeat(var(--bk-room-cols, 2), 1fr);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.bk-dg-corner {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.bk-dg-room-head {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bk-dg-room-head:last-child { border-right: none; }

/* All-day strip */
.bk-dg-allday-row {
  display: grid;
  grid-template-columns: 52px repeat(var(--bk-room-cols, 2), 1fr);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
  min-height: 32px;
}
.bk-dg-allday-row--span {
  grid-template-columns: 52px 1fr;
}
.bk-dg-allday-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: calc(8px + var(--lane-count, 1) * 24px);
}
.bk-dg-allday-track .bk-dg-allday-cell {
  background: var(--surface);
}
.bk-allday-bars {
  position: absolute;
  inset: 4px 2px 4px 2px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 22px;
  gap: 2px 1px;
  pointer-events: none;
}
.bk-allday-bars > * { pointer-events: auto; }

.bk-dg-allday-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.bk-dg-allday-cell {
  padding: 4px 6px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--surface);
}
.bk-dg-allday-cell:last-child { border-right: none; }
.bk-dg-allday-empty { display: block; height: 24px; }

/* Scrollable time body */
.bk-dg-scrollbody {
  overflow-y: auto;
  flex: 1;
  max-height: 580px;
  scroll-behavior: smooth;
}

.bk-dg-inner {
  display: flex;
  position: relative;
}

.bk-dg-gutter {
  width: 52px;
  flex-shrink: 0;
  position: relative;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.bk-dg-hour-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-faint);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}

/* Grid body (hour lines + columns overlaid) */
.bk-dg-cols-wrap {
  flex: 1;
  position: relative;
}

.bk-dg-hline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  pointer-events: none;
  z-index: 0;
}
.bk-dg-hline--half {
  background: color-mix(in oklab, var(--border) 40%, transparent);
}

/* Current-time indicator */
.bk-dg-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 5;
  pointer-events: none;
}
.bk-dg-now-dot {
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Room column grid */
.bk-dg-cols {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--bk-room-cols, 2), 1fr);
}

.bk-dg-col {
  position: relative;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.bk-dg-col:last-child { border-right: none; }
.bk-dg-col:hover { background: color-mix(in oklab, var(--accent) 2%, transparent); }

/* Timed event blocks */
.bk-dg-event {
  position: absolute;
  left: 4px;
  right: 4px;
  min-height: 18px;
  padding: 4px 8px 4px 12px;
  border-radius: 4px;
  border: 1px solid color-mix(in oklab, var(--chip-color, var(--accent)) 40%, var(--border-strong, var(--border)));
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--chip-color, var(--accent)) 24%, var(--surface-2)),
    color-mix(in oklab, var(--chip-color, var(--accent)) 14%, var(--surface)));
  color: var(--text-primary);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.1s, border-color 0.12s, box-shadow 0.12s;
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 2px 4px rgba(0,0,0,0.2);
}
.bk-dg-event::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--chip-color, var(--accent));
  box-shadow: 0 0 8px var(--chip-color, var(--accent));
}
.bk-dg-event:hover {
  transform: translateY(-1px);
  border-color: var(--chip-color, var(--accent));
  z-index: 2;
  box-shadow:
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset,
    0 6px 14px -4px color-mix(in oklab, var(--chip-color, var(--accent)) 50%, rgba(0,0,0,0.4));
}
.bk-dg-event.selected {
  border-color: var(--chip-color, var(--accent));
  z-index: 3;
  box-shadow:
    0 0 0 1px var(--chip-color, var(--accent)),
    0 0 24px color-mix(in oklab, var(--chip-color, var(--accent)) 40%, transparent),
    0 1px 0 oklch(0.32 0.008 65 / 0.25) inset;
}

.bk-dg-event-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.bk-dg-event-time {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-faint);
  margin-top: 1px;
}

/* ─── Right-click context menu ──────────────────────────────────── */
.bk-ctx-menu {
  position: fixed;
  z-index: 999;
  min-width: 192px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: var(--radius);
  box-shadow: 0 8px 32px -4px rgba(0,0,0,0.55), 0 2px 8px -2px rgba(0,0,0,0.3);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bk-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-primary);
  border-radius: calc(var(--radius) - 2px);
  text-align: left;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
}
.bk-ctx-item:hover {
  background: color-mix(in oklab, var(--accent) 10%, var(--surface-3, var(--surface)));
  color: var(--text-primary);
}
.bk-ctx-item.danger { color: oklch(0.75 0.14 25); }
.bk-ctx-item.danger:hover {
  background: color-mix(in oklab, oklch(0.65 0.18 25) 12%, var(--surface));
  color: oklch(0.85 0.12 25);
}
.bk-ctx-item.checked { color: var(--accent); }
.bk-ctx-icon {
  width: 14px;
  font-size: 10px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.bk-ctx-item.checked .bk-ctx-icon,
.bk-ctx-item.danger .bk-ctx-icon { color: inherit; }

.bk-ctx-sep {
  height: 1px;
  background: var(--border);
  margin: 3px 4px;
}

/* ─── Booking rate fields ─────────────────────────────────────────── */
.bk-rate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bk-rate-modes { display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bk-rate-mode {
  padding: 4px 10px;
  font-size: 11px;
  background: var(--bg);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.bk-rate-mode + .bk-rate-mode { border-left: 1px solid var(--border); }
.bk-rate-mode.active { background: color-mix(in oklab, var(--accent) 16%, transparent); color: var(--text-primary); }
.bk-rate-row { display: flex; align-items: center; gap: 8px; }
.bk-rate-row .mf-input-prefix { flex: 0 0 150px; }
.bk-rate-unit { font-size: 11px; color: var(--text-faint); }
.bk-rate-reset {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--accent);
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  border-radius: 999px;
  padding: 3px 9px;
  cursor: pointer;
}
.bk-rate-reset:hover { background: color-mix(in oklab, var(--accent) 12%, transparent); }
.bk-rate-tag {
  margin-left: 8px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  vertical-align: middle;
}

/* ─── Client combobox ─────────────────────────────────────────────── */
.bk-combobox { position: relative; }
.bk-combobox-field { position: relative; display: flex; align-items: center; }
.bk-combobox-field .mf-input { width: 100%; padding-right: 84px; }
.bk-combobox-badge {
  position: absolute;
  right: 8px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  pointer-events: none;
}
.bk-combobox-badge.linked { color: oklch(0.78 0.13 150); border: 1px solid color-mix(in oklab, oklch(0.78 0.13 150) 40%, var(--border)); }
.bk-combobox-badge.new { color: var(--text-muted); border: 1px solid var(--border); }
.bk-combobox-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop, 0 8px 24px rgba(0,0,0,0.35));
  overflow: hidden;
}
.bk-combobox-list { max-height: 240px; overflow-y: auto; padding: 4px; }
.bk-combobox-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.bk-combobox-opt.hi, .bk-combobox-opt:hover { background: var(--surface-3, color-mix(in oklab, var(--accent) 10%, transparent)); }
.bk-combobox-opt.sel { background: color-mix(in oklab, var(--accent) 14%, transparent); }
.bk-combobox-avatar {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.34 0.04 60), oklch(0.24 0.03 100));
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.bk-combobox-opt-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bk-combobox-opt-name { font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-combobox-opt-sub { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-combobox-opt-check { color: var(--accent); font-size: 12px; }
.bk-combobox-empty { padding: 10px 12px; font-size: 11.5px; color: var(--text-faint); }
.bk-combobox-foot {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: var(--bg);
  line-height: 1.4;
}
.bk-combobox-foot-plus { color: var(--accent); margin-right: 4px; }

/* ─── Add-to-rolodex modal ────────────────────────────────────────── */
.bk-newclient-modal { max-width: 540px; }
.bk-newclient-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.45; max-width: 420px; }
.bk-newclient-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* ─── Room timeline (Rooms mode: week + day) ─────────────────────────────
   Rooms down the left, 24h across the top. The header rows and the room
   column are sticky inside one scroll container, so both stay frozen. */
.bk-tl-wrap {
  --tl-label-w: 168px;
  --tl-head-h: 68px;
  --tl-row-h: 92px;
  position: relative;
  overflow: auto;
  max-height: max(420px, calc(100vh - 330px));
  overscroll-behavior: contain;
  border-color: var(--border-strong);
  background: var(--surface);
}
.bk-tl-grid {
  position: relative;
  width: calc(var(--tl-label-w) + var(--tl-days) * var(--tl-day-w));
  min-width: 100%;
}

/* Frozen header */
.bk-tl-head {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  height: var(--tl-head-h);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
}
.bk-tl-corner {
  position: sticky;
  left: 0;
  z-index: 7;
  flex: none;
  width: var(--tl-label-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 11px 14px 6px;
  background: var(--surface-2);
  border-right: 1px solid var(--border-strong);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.bk-tl-corner .mono { font-size: 10px; color: var(--text-faint); letter-spacing: 0.04em; }
.bk-tl-days { display: flex; }
.bk-tl-day {
  flex: none;
  width: var(--tl-day-w);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-strong);
}
.bk-tl-day:last-child { border-right: none; }
.bk-tl-day[role="button"] { cursor: pointer; }
.bk-tl-day[role="button"]:hover .bk-tl-day-label { background: color-mix(in oklab, var(--border) 25%, var(--surface-2)); }
.bk-tl-day-label {
  flex: 1;
  position: sticky;
  left: var(--tl-label-w);
  align-self: flex-start;
  width: max-content;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px 0;
  transition: background 0.1s;
}
.bk-tl-day-label .bk-cal-day-num { font-size: 17px; }
.bk-tl-day-month { font-size: 12px; color: var(--text-muted); }
.bk-tl-day.bk-today .bk-cal-day-name,
.bk-tl-day.bk-today .bk-cal-day-num { color: var(--accent); }
.bk-tl-day.bk-weekend .bk-tl-day-label { opacity: 0.8; }
.bk-tl-ruler {
  position: relative;
  height: 22px;
  border-top: 1px solid var(--border);
}
.bk-tl-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 5px 0 0 4px;
  font-size: 9.5px;
  color: var(--text-faint);
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
.bk-tl-tick.major { color: var(--text-muted); border-left-color: var(--border-strong); }
.bk-tl-tick:first-child { border-left: none; }

/* Rows */
.bk-tl-row {
  display: flex;
  height: var(--tl-row-h);
  border-bottom: 1px solid var(--border);
}
.bk-tl-row:last-of-type { border-bottom: none; }
.bk-tl-room {
  position: sticky;
  left: 0;
  z-index: 4;
  flex: none;
  width: var(--tl-label-w);
  display: flex;
  align-items: stretch;
  gap: 11px;
  padding: 0 12px 0 0;
  background: var(--surface-2);
  border-right: 1px solid var(--border-strong);
}
.bk-tl-room-rail { width: 3px; flex: none; background: var(--room-color, var(--accent)); }
.bk-tl-room-info { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.bk-tl-room-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-tl-room-sub { font-size: 10.5px; color: var(--text-muted); }

.bk-tl-track {
  position: relative;
  flex: none;
  width: calc(var(--tl-days) * var(--tl-day-w));
  cursor: copy;
  /* hour lines: faint every hour, stronger every 6h */
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(var(--tl-hour) * 6 - 1px), color-mix(in oklab, var(--border) 85%, transparent) calc(var(--tl-hour) * 6 - 1px) calc(var(--tl-hour) * 6)),
    repeating-linear-gradient(90deg, transparent 0 calc(var(--tl-hour) - 1px), color-mix(in oklab, var(--border) 35%, transparent) calc(var(--tl-hour) - 1px) var(--tl-hour));
}
.bk-tl-daybg {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--tl-day-w);
  border-right: 1px solid var(--border-strong);
  pointer-events: none;
}
.bk-tl-daybg.bk-weekend { background: color-mix(in oklab, var(--surface-2) 45%, transparent); }
.bk-tl-daybg.bk-today { background: color-mix(in oklab, var(--accent) 4%, transparent); }

/* Blocks reuse .bk-wk-block's look; these set the horizontal geometry */
.bk-tl-block {
  top: 8px;
  height: calc(100% - 16px);
  min-height: 0;
  margin: 0;
  padding: 7px 8px 6px 12px;
  justify-content: flex-start;
}
.bk-tl-block-time { font-size: 10px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-tl-block.is-narrow { padding: 6px 4px 6px 9px; }
.bk-tl-block.is-narrow .bk-wk-block-artist { font-size: 11px; }
.bk-tl-block.is-hold {
  background: repeating-linear-gradient(45deg,
    color-mix(in oklab, var(--chip-color) 22%, var(--surface-2)) 0 5px,
    color-mix(in oklab, var(--chip-color) 9%, var(--surface)) 5px 10px);
}
.bk-tl-block.is-tentative { border-style: dashed; background: color-mix(in oklab, var(--chip-color) 10%, var(--surface)); }
.bk-tl-block.bk-wk-block--dragging { opacity: 0.8; }
.bk-tl-block::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.bk-tl-block.is-cancelled::after { width: auto; cursor: inherit; }

/* Now line — runs below the frozen header, above the blocks */
.bk-tl-now {
  position: absolute;
  top: var(--tl-head-h);
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--red);
  z-index: 3;
  pointer-events: none;
}
.bk-tl-now-label {
  position: sticky;
  top: calc(var(--tl-head-h) + 4px);
  display: inline-block;
  transform: translateX(-50%);
  margin-left: 1px;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: oklch(0.98 0.01 30);
  background: var(--red);
}
.bk-tl-empty { padding: 32px; color: var(--text-muted); font-size: 13px; }

@media (max-width: 720px) {
  .bk-tl-wrap { --tl-label-w: 112px; --tl-row-h: 80px; max-height: calc(100vh - 240px); }
}
