/* ============================================================================
   Lancalot — refined design system
   ============================================================================

   ▸ HANDOFF / THEME SWITCHING (for Claude Code) ─────────────────────────────
     Everything below is driven by CSS custom properties, so you change the
     whole look by editing ONE line — no JS, no build, no Tweaks panel needed.

     1. PALETTE  → add ONE class to <body> in index.html:
                     (none)           Linen    — warm, default (SHIPPED)
                     theme-daylight   Daylight — cool, clean SaaS
                     theme-clay       Clay     — deep, retro
     2. ACCENT   → set --accent in :root below to one of the listed options.
                   (--accent-bg and --accent-ring derive from it automatically.)
     3. NAME COL → add body class "gutter-minimal" for the stripped-back rail.
     4. WEEKENDS → add body class "no-weekend" to remove the weekend tint.

     Class names are unchanged from the original build, so all interactions in
     app.js keep working. SHIPPED DEFAULT: Linen palette + Slate accent (#5b6f9c).
   ----------------------------------------------------------------------------
   ========================================================================== */

:root {
  /* ── Linen (default warm theme) ─────────────────────────────── */
  --bg:           #f1ece3;   /* page canvas — brighter, cleaner warm paper */
  --card:         #fffdfb;   /* crisp warm-white card so it floats          */
  --gutter-bg:    #f6f1e8;   /* resource rail — distinct from the card      */
  --inset-bg:     rgba(64, 48, 32, 0.055); /* recessed segmented-control track */

  --col-line:     rgba(64, 48, 32, 0.08);
  --head-border:  rgba(64, 48, 32, 0.13);
  --book-border:  rgba(40, 30, 20, 0.09);

  --text:         #2a2018;
  --muted:        #8a7c70;

  /* ACCENT — pick one. Options:
       Terracotta  #c25b4c
       Rust        #b5613a
       Raspberry   #b14a63
       Slate       #5b6f9c   (default)                              */
  --accent:       #5b6f9c;
  --accent-bg:    color-mix(in srgb, var(--accent) 9%,  transparent);
  --accent-ring:  color-mix(in srgb, var(--accent) 38%, transparent);
  --on-accent:    #ffffff;

  --weekend-bg:   rgba(96, 84, 68, 0.05);  /* cooler, lighter than the old tan */

  --shadow-rest:  0 1px 2px rgba(60, 45, 30, 0.05);
  --shadow-card:  0 1px 2px rgba(60, 45, 30, 0.05), 0 16px 36px -12px rgba(60, 45, 30, 0.16);
  --shadow-book:  0 1px 2px rgba(60, 45, 30, 0.06);
  --shadow-book-hover: 0 6px 22px -6px rgba(60, 45, 30, 0.22);
  --shadow-pop:   0 8px 28px rgba(50, 35, 20, 0.18);

  --gutter:       176px;
  --radius-card:  18px;
}

/* ── Daylight — cool, clean SaaS neutrals ───────────────────────── */
body.theme-daylight {
  --bg:          #eceff3;
  --card:        #ffffff;
  --gutter-bg:   #f4f6f9;
  --inset-bg:    rgba(30, 41, 59, 0.05);
  --col-line:    rgba(30, 41, 59, 0.07);
  --head-border: rgba(30, 41, 59, 0.12);
  --book-border: rgba(30, 41, 59, 0.10);
  --text:        #1f2430;
  --muted:       #79818f;
  --weekend-bg:  rgba(40, 55, 80, 0.04);
  --shadow-rest: 0 1px 2px rgba(20, 30, 50, 0.05);
  --shadow-card: 0 1px 2px rgba(20, 30, 50, 0.06), 0 16px 36px -12px rgba(20, 30, 50, 0.16);
  --shadow-book: 0 1px 2px rgba(20, 30, 50, 0.07);
  --shadow-book-hover: 0 6px 22px -6px rgba(20, 30, 50, 0.22);
  --shadow-pop:  0 8px 28px rgba(20, 30, 50, 0.18);
}

/* ── Clay — deeper, retro, cream cards ──────────────────────────── */
body.theme-clay {
  --bg:          #e7dccb;
  --card:        #fdf6ea;
  --gutter-bg:   #efe3cf;
  --inset-bg:    rgba(80, 55, 25, 0.07);
  --col-line:    rgba(80, 55, 25, 0.10);
  --head-border: rgba(80, 55, 25, 0.16);
  --book-border: rgba(70, 50, 25, 0.13);
  --text:        #2c2114;
  --muted:       #8f7c63;
  --weekend-bg:  rgba(150, 110, 60, 0.10);
  --shadow-card: 0 1px 2px rgba(70, 50, 25, 0.07), 0 16px 36px -12px rgba(70, 50, 25, 0.20);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 30px 30px 56px;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

.shell { width: 100%; }

/* ── Page header ─────────────────────────────────────────── */

.page-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}

/* Sign-out sits at the far right of the header. */
.sign-out-btn {
  margin-left: auto;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--head-border);
  border-radius: 9px;
  padding: 7px 13px;
  cursor: pointer;
}
.sign-out-btn:hover { color: var(--text); border-color: var(--accent-ring); }

/* ── Login gate ──────────────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  z-index: 100;
}
/* display:grid above overrides the [hidden] attribute, so hide it explicitly. */
.login-overlay[hidden] { display: none; }

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border: 1px solid var(--head-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 28px;
}

.login-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.auth-field input {
  font: inherit;
  padding: 10px 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--head-border);
  border-radius: 10px;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.auth-message { margin: 0; font-size: 0.82rem; color: var(--muted); }
.auth-message--error { color: #b14a4a; }

.auth-btn {
  font: inherit;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}
.auth-btn--primary { color: var(--on-accent); background: var(--accent); }
.auth-btn--primary:hover { filter: brightness(0.95); }
.auth-btn--ghost { color: var(--accent); background: transparent; border-color: var(--accent-ring); }
.auth-btn--ghost:hover { background: var(--accent-bg); }
.auth-btn--google {
  width: 100%;
  color: var(--text);
  background: var(--card);
  border-color: var(--head-border);
}
.auth-btn--google:hover { border-color: var(--accent-ring); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--head-border);
}

.wordmark {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.022em;
  color: var(--accent);
}

.brand-mark {
  flex-shrink: 0;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M8.5 3v4M15.5 3v4'/%3E%3C/svg%3E") center / 17px no-repeat,
    var(--accent);
  box-shadow: 0 1px 2px rgba(40, 45, 60, 0.18);
}

/* ── Toolbar ─────────────────────────────────────────────── */

.calendar-toolbar {
  margin-bottom: 14px;
  padding-left: var(--gutter);
  /* Three zones: left content | centred view-switch | right content.
     The auto centre column stays dead-centre regardless of side widths,
     so the Timeline|Month toggle never drifts between views. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.toolbar-zone {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0; /* let zones overflow rather than push the centre column */
}
.toolbar-zone--left   { justify-content: flex-start; }
.toolbar-zone--center { justify-content: center; }
.toolbar-zone--right  { justify-content: flex-end; }

.toolbar-month-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar-month-nav[hidden] { display: none; }

.month-label--timeline[hidden] { display: none; }

.toolbar-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar-zoom[hidden] { display: none; }

.month-label {
  min-width: 116px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* Timeline label sits left-aligned beside Today (no nav arrows, free panning). */
.month-label--timeline {
  min-width: 0;
  text-align: left;
  margin-left: 6px;
  white-space: nowrap;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--head-border);
  border-radius: 10px;
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-rest);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
}
.toolbar-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 7%, var(--card)); border-color: var(--accent-ring); }
.toolbar-btn:active:not(:disabled) { transform: translateY(1px); }
.toolbar-btn:disabled { opacity: 0.32; cursor: not-allowed; box-shadow: none; }
.toolbar-btn svg { width: 15px; height: 15px; }

.zoom-label {
  min-width: 42px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.today-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 11px;
  background: var(--card);
  border: 1px solid var(--head-border);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-rest);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.today-btn:hover { background: color-mix(in srgb, var(--accent) 7%, var(--card)); border-color: var(--accent-ring); }
.today-btn:active { transform: translateY(1px); }
.today-btn svg { width: 14px; height: 14px; }

/* Grouped segmented control (Timeline | Month) */
.view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--inset-bg);
  border-radius: 11px;
}
.view-switch__btn {
  padding: 6px 17px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.view-switch__btn:hover { color: var(--text); }
.view-switch__btn.is-active {
  background: var(--card);
  color: var(--accent);
  box-shadow: var(--shadow-rest);
}

/* Shared accessible focus ring */
.today-btn:focus-visible,
.toolbar-btn:focus-visible,
.view-switch__btn:focus-visible,
.booking-action:focus-visible,
.booking-status:focus-visible,
.booking-type-option:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

/* ── Calendar card shell ─────────────────────────────────── */

.calendar {
  display: grid;
  grid-template-columns: var(--gutter) 1fr;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.calendar[hidden] { display: none; }

/* ── Month view shell ────────────────────────────────────── */

.calendar--month {
  display: grid;
  grid-template-areas:
    "corner weekdays"
    "name   body";
  grid-template-columns: var(--gutter) 1fr;
  grid-template-rows: auto 1fr;
  position: relative;
}
.calendar--month > .calendar__corner { grid-area: corner; }
.calendar--month > .calendar__name   { grid-area: name; }

.calendar-month__weekdays {
  grid-area: weekdays;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--head-border);
}

.month-weekday {
  padding: 15px 16px 13px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.month-weekday + .month-weekday { border-left: 1px solid var(--col-line); }
.month-weekday.is-weekend { background: var(--weekend-bg); }

.calendar-month__grid {
  grid-area: body;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, minmax(104px, 1fr));
  min-height: 624px;
}

.month-cell {
  position: relative;
  padding: 8px 11px 0;
  border-right: 1px solid var(--col-line);
  border-bottom: 1px solid var(--col-line);
  cursor: default;
}
.month-cell:nth-child(7n) { border-right: none; }
.month-cell:nth-last-child(-n+7) { border-bottom: none; }
.month-cell.is-weekend { background: var(--weekend-bg); }
.month-cell.is-today { background: var(--accent-bg); }
.month-cell.is-outside .month-cell__num { opacity: 0.34; }

.month-cell__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.35em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.month-cell.is-today .month-cell__num {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 9px;
  font-weight: 700;
}

.calendar-month__bookings {
  grid-area: body;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, minmax(104px, 1fr));
  pointer-events: none;
}

/* Month booking segment — positioned by grid lines; gains continuation cues on
   wrapping edges. Selectors chain .booking-item.booking-item--month to outrank
   the generic .booking-item block below. */
.booking-item.booking-item--month {
  position: relative;
  left: auto; right: auto; top: auto;
  width: auto; height: auto;
  margin: 30px 7px 9px;
  padding: 9px 11px;
  min-width: 0;
  align-self: stretch;
  align-items: center;
}
.booking-item.booking-item--month .booking-title { padding-right: 46px; }
.booking-item.booking-item--month.continues-left {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-width: 0;
}
.booking-item.booking-item--month.continues-right {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* ── Resource rail (name gutter) ─────────────────────────── */

.calendar__corner {
  background: var(--gutter-bg);
  border-bottom: 1px solid var(--head-border);
  border-right: 1px solid var(--head-border);
}

.calendar__name {
  background: var(--gutter-bg);
  border-right: 1px solid var(--head-border);
  padding: 16px 16px 0;   /* 16px top aligns with the booking row (BOOKING_TOP) */
}

.resource {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 96px;           /* matches BOOKING_HEIGHT so it lines up with the row */
}

.resource__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}

.resource__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.resource__name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resource__role {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

/* Minimal name-column variant */
body.gutter-minimal .calendar__corner { background: var(--card); }
body.gutter-minimal .calendar__name { background: var(--card); }
body.gutter-minimal .resource__avatar,
body.gutter-minimal .resource__role { display: none; }

/* Weekend-tint off */
body.no-weekend .is-weekend { background: transparent; }
body.no-weekend .weekend-col { display: none; }

/* ── Day column headers (timeline) ───────────────────────── */

.calendar__head {
  overflow: hidden;
  border-bottom: 1px solid var(--head-border);
}
.head-track { display: grid; }

.day-col-head {
  padding: 18px 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.day-col-head + .day-col-head { border-left: 1px solid var(--col-line); }
.day-col-head.is-weekend { background: var(--weekend-bg); }
.day-col-head.is-today { background: var(--accent-bg); }

.weekend-col {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--weekend-bg);
}

.day-name {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.day-col-head.is-today .day-name { color: var(--accent); }

.day-number {
  align-self: flex-start;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.day-col-head.is-today .day-number {
  padding: 2px 9px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 11px;
  margin-left: -3px;
}

/* ── Calendar body (timeline) ────────────────────────────── */

.calendar__body {
  position: relative;
  min-height: 200px;
  cursor: grab;
  overflow: hidden;
  background: var(--card);
}
.calendar__body:active { cursor: grabbing; }

.booking-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Booking cards ───────────────────────────────────────── */

.booking-item {
  position: absolute;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--book-border);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  pointer-events: auto;
  cursor: grab;
  overflow: hidden;
  box-shadow: var(--shadow-book);
  transition: box-shadow 0.15s ease, transform 0.08s ease;
}
.booking-item:hover { box-shadow: var(--shadow-book-hover); }
.booking-item:active { cursor: grabbing; }

.booking-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.booking-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 46px;
}

.booking-dates {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.booking-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.booking-item:hover .booking-actions,
.booking-item:focus-within .booking-actions { opacity: 1; }

.booking-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.booking-action:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.booking-action svg { width: 14px; height: 14px; }

.booking-title-input {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  width: calc(100% - 46px);
  padding: 2px 7px;
  border: 1px solid var(--accent-ring);
  border-radius: 6px;
  background: var(--card);
  outline: none;
}

/* Drag affordance */
.booking-grip {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
}
.booking-grip span {
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 62%, transparent);
}

/* Resize handles — invisible but interactive */
.booking-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  cursor: ew-resize;
}
.booking-handle--left  { left: 0; }
.booking-handle--right { right: 0; }

/* ── Split handles (per-boundary scissors) ───────────────── */

.booking-split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.12s ease;
  z-index: 2;
}
.booking-split-handle:hover { opacity: 1; }

.booking-split-handle__line {
  position: absolute;
  width: 1px;
  left: 50%;
  background-image: linear-gradient(to bottom, color-mix(in srgb, var(--text) 38%, transparent) 4px, transparent 4px);
  background-size: 1px 9px;
  background-repeat: repeat-y;
  pointer-events: none;
}
.booking-split-handle__line--top    { top: 10px;    bottom: calc(50% + 16px); }
.booking-split-handle__line--bottom { bottom: 10px; top:    calc(50% + 16px); }

.booking-split-handle__scissors {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: color-mix(in srgb, var(--text) 60%, transparent);
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease;
}
.booking-split-handle__scissors svg { width: 12px; height: 12px; transform: scaleX(-1); }
.booking-split-handle__scissors:hover {
  background: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
  cursor: pointer;
}

/* ── Booking status (type) ───────────────────────────────── */

.booking-status {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent);
  transition: box-shadow 0.12s ease;
}
.booking-status:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 7%, transparent); }
.booking-status--confirmed   { background: #2f9e5f; }
.booking-status--pending     { background: #e0a82a; }
.booking-status--unavailable { background: #cf4034; }

/* Per-type card tints (confirmed = default card, no tint) */
.booking-item--pending {
  background: color-mix(in srgb, #f3c64a 16%, var(--card));
  border-color: color-mix(in srgb, #b8821e 22%, transparent);
  border-left-color: #e0a82a;
}
.booking-item--pending .booking-title { color: color-mix(in srgb, #5a4317 85%, var(--text)); }
.booking-item--pending .booking-dates { color: #997523; }

.booking-item--unavailable {
  background: color-mix(in srgb, #e8736a 15%, var(--card));
  border-color: color-mix(in srgb, #c43b30 22%, transparent);
  border-left-color: #cf4034;
}
.booking-item--unavailable .booking-title { color: color-mix(in srgb, #6b1f1c 85%, var(--text)); }
.booking-item--unavailable .booking-dates { color: #a8534c; }

/* ── Type-switch menu (popover) ──────────────────────────── */

.booking-type-menu {
  position: absolute;
  z-index: 1000;
  min-width: 164px;
  padding: 5px;
  background: var(--card);
  border: 1px solid var(--head-border);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
}
.booking-type-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.booking-type-option:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.booking-type-option.is-active { font-weight: 600; }
.booking-type-swatch { width: 11px; height: 11px; border-radius: 4px; }
.booking-type-swatch--confirmed   { background: #2f9e5f; }
.booking-type-swatch--pending     { background: #e0a82a; }
.booking-type-swatch--unavailable { background: #cf4034; }
