/* ============================================================
   Bia — Component styles
   ============================================================ */

/* === App layout ============================================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  height: 100vh;
  min-height: 100vh;
  background: var(--bg-app);
  transition: grid-template-columns 220ms cubic-bezier(.2,.7,.2,1);
}
.app.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

.app__main {
  grid-area: main;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "content";
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--border-subtle);
}

.content { grid-area: content; min-height: 0; overflow: hidden; }

/* ============================================================
   Sidebar
   ============================================================ */
.sb {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  border-right: 1px solid var(--border-subtle);
  padding: 12px 10px 12px 10px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.sb--collapsed { /* width comes from grid-template-columns; padding stays so icons don't shift */ }
.sb__item, .sb__brand, .sb__toggle, .sb__user { white-space: nowrap; }

.sb__brand {
  display: flex; align-items: center; gap: 8px;
  position: relative;
  height: 36px;
  padding: 0 8px 0 35px;  /* left padding clears the absolutely-positioned wordmark */
}
.sb__wordmark {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 17px;
  color: var(--text-primary);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}
.sb__wordmark-i { color: var(--sage-600); }
.sb__brand-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage-500);
  box-shadow: 0 0 0 3px var(--sage-50);
  margin-left: 4px;
}

/* Toggle button — sits below the brand */
.sb__toggle {
  position: relative;
  display: flex; align-items: center;
  height: 28px;
  padding: 0 8px 0 35px;
  margin: 0 0 12px 0;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--r-md);
  font: inherit;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: left;
  transition: background 120ms, color 120ms;
  cursor: pointer;
}
.sb__toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.sb__toggle-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb__toggle > svg:first-of-type {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
}

.sb__nav {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1;
  min-height: 0;
}

.sb__item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 32px;
  padding: 0 10px 0 35px;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: var(--t-md);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 120ms, color 120ms;
}
.sb__item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sb__item.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--border-subtle);
}
.sb__item-ico {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex; width: 17px; height: 17px;
  align-items: center; justify-content: center;
  color: var(--text-tertiary);
}
.sb__item.is-active .sb__item-ico { color: var(--sage-600); }
.sb__item-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb__item.is-active .sb__item-rail {
  position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 2px; background: var(--sage-500); border-radius: 0 2px 2px 0;
}

.sb__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--clay-100);
  color: var(--clay-700);
  line-height: 1.4;
}

.sb__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 4px;
}

.sb__user {
  position: relative;
  display: flex; align-items: center;
  height: 48px;
  padding: 0 8px 0 38px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.sb__avatar {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.88 0.04 75) 0%, oklch(0.78 0.06 50) 100%);
  color: oklch(0.30 0.05 40);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px oklch(0.6 0.05 50 / 0.20);
}
.sb__user-meta { min-width: 0; overflow: hidden; }
.sb__user-name { font-size: var(--t-sm); font-weight: 600; color: var(--text-primary); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb__user-sub  { font-size: var(--t-xs); color: var(--text-tertiary); line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Collapsed sidebar — only hide text; icons stay at the same x in both states
   so nothing moves during the width transition. */
.sb--collapsed .sb__item-label,
.sb--collapsed .sb__user-meta,
.sb--collapsed .sb__brand-dot,
.sb--collapsed .sb__toggle-label,
.sb--collapsed .sb__badge,
.sb--collapsed .sb__wordmark-a,
.sb--collapsed .sb__wordmark-i { display: none; }

/* ============================================================
   Topbar — single merged title bar (title + nav + filters + cta + user)
   ============================================================ */
.tb {
  grid-area: topbar;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px 0 14px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--topbar-h);
  position: relative;
  z-index: 5;
  gap: 14px;
}
.tb__cluster { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb__cluster--left { flex: 1; min-width: 0; }
.tb__cluster--right { flex-shrink: 0; }

.tb__filters-wrap { position: relative; display: inline-flex; align-items: center; }
.chip--filter { height: 28px; padding: 0 8px 0 9px; gap: 6px; }
.chip--filter.is-open { background: var(--bg-hover); border-color: var(--border-strong); }

/* Filters popover */
.tb__filters-scrim {
  position: fixed; inset: 0;
  z-index: 40;
}
.tb__filters-pop {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  z-index: 50;
  min-width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg, 0 8px 24px oklch(0.2 0 0 / 0.12));
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.tb__filters-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}
.tb__filters-pop-title {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-tertiary);
  font-weight: 600;
}
.tb__filters-pop-clear {
  border: none; background: transparent;
  color: var(--sage-600);
  font: inherit; font-size: var(--t-xs); font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.tb__filters-pop-clear:hover { background: var(--bg-hover); }
.tb__filters-pop-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 4px 6px;
}
.tb__filters-pop-label {
  font-size: var(--t-sm);
  color: var(--text-secondary);
  font-weight: 500;
}
.chip--inline {
  height: 26px; padding: 0 8px;
}

.tb__sep {
  width: 1px;
  height: 22px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.tb__title-block {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0;
  margin-left: 4px;
}
.tb__title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.tb__title-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: none; background: transparent;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: background 120ms, color 120ms;
  position: relative;
  flex-shrink: 0;
}
.iconbtn:hover { background: var(--bg-hover); color: var(--text-primary); }
.iconbtn--ghost { width: 28px; height: 28px; }

.iconbtn--notif .iconbtn__badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 13px; height: 13px; padding: 0 3px;
  border-radius: 999px;
  background: var(--clay-500);
  color: white;
  font-size: 9px;
  font-weight: 600;
  font-family: var(--font-mono);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-app);
}

.clinic-select {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 8px; height: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--text-primary);
  transition: background 120ms, border-color 120ms;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  flex-shrink: 0;
}
.clinic-select:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.clinic-select.is-open { background: var(--bg-hover); border-color: var(--border-strong); }
.clinic-select__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage-500);
  box-shadow: 0 0 0 2px var(--sage-100);
}
.clinic-select__dot--sage { background: var(--sage-500); box-shadow: 0 0 0 2px var(--sage-100); }
.clinic-select__dot--teal { background: oklch(0.58 0.075 195); box-shadow: 0 0 0 2px oklch(0.93 0.030 195); }
.clinic-select__dot--clay { background: var(--clay-500); box-shadow: 0 0 0 2px var(--clay-100); }

.clinic-select-wrap { position: relative; }
.clinic-menu {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  z-index: 41;
  min-width: 248px;
  padding: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg, 0 8px 24px oklch(0 0 0 / 0.10));
  display: flex; flex-direction: column; gap: 1px;
}
.clinic-menu__head {
  padding: 8px 10px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.clinic-menu__item {
  display: grid;
  grid-template-columns: 16px 1fr 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px 7px 8px;
  border: none;
  background: transparent;
  border-radius: 5px;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 100ms;
}
.clinic-menu__item:hover { background: var(--bg-hover); }
.clinic-menu__item.is-on { background: var(--sage-50); }
.clinic-menu__dot {
  width: 8px; height: 8px; border-radius: 50%;
  justify-self: center;
}
.clinic-menu__text {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.clinic-menu__label {
  font-size: var(--t-sm); font-weight: 500; color: var(--text-primary);
  line-height: 1.25;
}
.clinic-menu__item.is-on .clinic-menu__label { color: var(--sage-700); font-weight: 600; }
.clinic-menu__check {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sage-600);
}
.clinic-menu__pill {
  display: none;
}
.clinic-menu__divider {
  height: 1px; background: var(--border-subtle); margin: 4px 2px;
}
.clinic-menu__action {
  display: inline-flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  background: transparent;
  border-radius: 5px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--t-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 100ms, color 100ms;
}
.clinic-menu__action:hover { background: var(--bg-hover); color: var(--text-primary); }
.clinic-menu__action svg { color: var(--text-tertiary); }

.tb__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.88 0.04 75) 0%, oklch(0.78 0.06 50) 100%);
  color: oklch(0.30 0.05 40);
  font-weight: 600;
  font-size: 10.5px;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px oklch(0.6 0.05 50 / 0.20);
  margin-left: 2px;
  flex-shrink: 0;
}

/* Filter chip with count */
.chip--filter {
  height: 28px;
  padding: 0 10px 0 9px;
}
.chip__count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--sage-100);
  color: var(--sage-700);
  margin-left: 2px;
  line-height: 1.3;
}

.btn--sm { height: 28px; padding: 0 10px; font-size: var(--t-sm); }

/* ============================================================
   Page header
   ============================================================ */
.ph {
  padding: 20px 28px 14px 28px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 14px;
  flex-shrink: 0;
}
.ph__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ph__row--filters { align-items: center; }
.ph__title-block { min-width: 0; }
.ph__actions { flex-shrink: 0; white-space: nowrap; }

.ph__eyebrow {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 4px;
}
.ph__title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.15;
}
.ph__title time { font-variant-numeric: tabular-nums; }

.ph__actions { display: flex; align-items: center; gap: 10px; }

.dayswitch {
  display: inline-flex; align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 2px;
}
.dayswitch__btn, .dayswitch__today {
  border: none; background: transparent;
  padding: 0 8px; height: 28px;
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 120ms, color 120ms;
  white-space: nowrap;
}
.dayswitch__today {
  padding: 0 10px;
  font-size: var(--t-sm); font-weight: 600;
  color: var(--text-primary);
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}
.dayswitch__btn:hover, .dayswitch__today:hover { background: var(--bg-hover); color: var(--text-primary); }

/* === View switcher (Google-Calendar-style dropdown) ====================== */
.viewswitch { position: relative; display: inline-flex; align-items: center; }
.viewswitch__trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 8px 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--t-sm); font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
  white-space: nowrap;
}
.viewswitch__trigger:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.viewswitch__trigger.is-open { background: var(--bg-hover); border-color: var(--border-strong); }
.viewswitch__trigger-label { color: var(--text-primary); }
.viewswitch__trigger svg { color: var(--text-tertiary); }

.viewswitch__scrim {
  position: fixed; inset: 0;
  z-index: 40;
}
.viewswitch__menu {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  z-index: 41;
  min-width: 184px;
  padding: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg, 0 8px 24px oklch(0 0 0 / 0.08));
  display: flex; flex-direction: column; gap: 1px;
}
.viewswitch__item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 30px;
  padding: 0 8px 0 6px;
  border: none;
  background: transparent;
  border-radius: 5px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--t-sm);
  text-align: left;
  cursor: pointer;
  transition: background 100ms;
}
.viewswitch__item:hover { background: var(--bg-hover); }
.viewswitch__item.is-on { color: var(--text-primary); }
.viewswitch__item-check {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sage-600);
  width: 18px; height: 18px;
}
.viewswitch__item-label { font-weight: 500; }
.viewswitch__item.is-on .viewswitch__item-label { font-weight: 600; }
.viewswitch__kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-bottom-width: 1.5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.viewswitch__item.is-on .viewswitch__kbd {
  color: var(--text-secondary);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none;
  font-family: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 0 12px; height: 32px;
  border-radius: var(--r-md);
  transition: background 120ms, transform 80ms, box-shadow 120ms;
  white-space: nowrap;
}
.btn--primary {
  background: var(--btn-primary-bg, var(--text-primary));
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm), inset 0 1px 0 oklch(1 0 0 / 0.1);
}
.btn--primary:hover { background: var(--btn-primary-bg-hover, oklch(0.42 0.135 230)); }
.btn--primary:active { transform: translateY(0.5px); }
.btn--ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn--ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn--full { width: 100%; height: 36px; }
.btn--span { grid-column: span 2; }

/* Filters */
.ph__filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--t-sm);
  box-shadow: var(--shadow-xs);
  transition: background 120ms;
}
.chip:hover { background: var(--bg-hover); }
.chip__label { color: var(--text-tertiary); font-weight: 500; }
.chip__sep   { color: var(--text-disabled); }
.chip__value { color: var(--text-primary); font-weight: 500; }
.chip--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-tertiary); }
.chip--ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Legend */
.legend {
  display: flex; align-items: center; gap: 14px;
  font-size: var(--t-xs);
  color: var(--text-tertiary);
}
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend__item--confirmed  .legend__dot { background: var(--sage-500); }
.legend__item--pending    .legend__dot { background: transparent; border: 1.5px dashed var(--amber-500); width: 9px; height: 9px; }
.legend__item--inprogress .legend__dot { background: var(--teal-500); box-shadow: 0 0 0 2px var(--teal-100); }
.legend__item--urgency    .legend__dot { background: var(--clay-500); }
.legend__item--missed     .legend__dot { background: var(--c-missed); }

/* === Filter chip active state ============================================ */
.chip--filter.is-active {
  border-color: var(--sage-500);
  background: var(--sage-50);
  color: var(--text-primary);
}
.chip--filter .chip__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px;
  padding: 0 5px;
  background: var(--sage-600);
  color: oklch(1 0 0);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* === Filters popover (wide, interactive) ================================= */
.tb__filters-pop--wide {
  width: 340px;
  padding: 6px 6px 8px;
  gap: 2px;
}
.tb__filters-pop--wide .tb__filters-pop-head {
  padding: 6px 8px 8px;
}
.tb__filters-pop-clear:disabled {
  color: var(--text-disabled);
  cursor: default;
}
.tb__filters-pop-clear:disabled:hover { background: transparent; }

.fgroup {
  padding: 6px 4px 8px;
  border-top: 1px solid var(--border-subtle);
}
.fgroup:first-of-type { border-top: none; }

.fgroup__head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 2px 6px 6px;
}
.fgroup__label {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-tertiary);
  font-weight: 600;
}
.fgroup__summary {
  font-size: var(--t-xs);
  color: var(--text-tertiary);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.fgroup__clear {
  border: none; background: transparent;
  color: var(--sage-600);
  font: inherit; font-size: var(--t-2xs); font-weight: 600;
  padding: 2px 4px;
  margin-left: auto;
  border-radius: 3px;
  cursor: pointer;
}
.fgroup__summary + .fgroup__clear { margin-left: 0; }
.fgroup__clear:hover { background: var(--bg-hover); }

.fgroup__opts {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 0 4px;
}

.fopt {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px;
  padding: 0 9px 0 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.fopt:hover { background: var(--bg-hover); }
.fopt.is-on {
  background: var(--sage-50);
  border-color: var(--sage-500);
  color: var(--sage-700);
}
.fopt__check {
  width: 14px; height: 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  color: oklch(1 0 0);
  flex-shrink: 0;
  transition: background 120ms, border-color 120ms;
}
.fopt__check.is-on {
  background: var(--sage-600);
  border-color: var(--sage-600);
}
.fopt__dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}
.fopt__dot--lm { background: var(--doc-lm); }
.fopt__dot--ac { background: var(--doc-ac); }
.fopt__dot--me { background: var(--doc-me); }
.fopt__dot--status.fopt__dot--confirmed  { background: var(--sage-500); }
.fopt__dot--status.fopt__dot--pending    { background: transparent; border: 1.5px dashed var(--amber-500); width: 9px; height: 9px; }
.fopt__dot--status.fopt__dot--inprogress { background: var(--teal-500); }
.fopt__dot--status.fopt__dot--missed     { background: var(--c-missed); }

.tb__filters-pop-foot {
  display: flex; justify-content: flex-end;
  padding: 8px 4px 0;
  margin-top: 4px;
  border-top: 1px solid var(--border-subtle);
}
.tb__filters-pop-done {
  border: 1px solid var(--border-default);
  background: var(--btn-primary-bg, var(--sage-600));
  color: oklch(1 0 0);
  font: inherit; font-size: var(--t-sm); font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
}
.tb__filters-pop-done:hover { background: var(--btn-primary-bg-hover, var(--sage-700)); }

/* === Filtered-out slots (dimmed) ========================================= */
.slot.is-filtered-out {
  opacity: 0.22;
  filter: saturate(0.4);
  pointer-events: none;
  transition: opacity 160ms ease, filter 160ms ease;
}
.slot:not(.is-filtered-out) {
  transition: opacity 160ms ease, filter 160ms ease;
}
