/* Mindset Task Manager — Production stylesheet */
@import url("./css/tokens.css");
@import url("./css/base.css");
@import url("./css/components.css");

/* ── Auth screen ── */
.authShell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s6);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(154,85,51,0.07), transparent 50%),
    var(--bg);
}

.authContent { width: 100%; }
.authContentSingle { max-width: 420px; }

.authCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s7);
  box-shadow: var(--shadow-lg);
}

.authCard .sectionHead { display: block; margin-bottom: 24px; }
.authCard h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}

.authForm { display: grid; gap: 16px; }

.linkButton {
  border: 0;
  padding: 0;
  justify-self: center;
  color: var(--accent);
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.linkButton:hover { text-decoration: underline; }

/* ── App layout ── */
.appShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

/* ── Sidebar ── */
.sidebar {
  padding: 20px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brandLine {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 4px;
}

.brandMark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  overflow: hidden;
}

.brandMark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brandLogo-dark { display: none; }
:root[data-theme="dark"] .brandLogo-light { display: none; }
:root[data-theme="dark"] .brandLogo-dark { display: block; }

.eyebrow, .cardLabel {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  line-height: 1.1;
}

.profileCard, .sidebarCard {
  padding: var(--s3);
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.profileCard h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

#userMeta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.navGroup { display: grid; gap: 4px; }

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.nav:hover {
  background: var(--subtle);
  color: var(--ink);
}

.nav.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.nav.active i { color: #fff; }

.miniMetric {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.miniMetric strong { color: var(--ink); }

.sidebar .btn { margin-top: auto; }

/* ── Main panel ── */
.mainPanel {
  padding: 0;
  overflow-y: auto;
  width: 100%;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.toolbarFilters {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(140px, 200px);
  gap: 10px;
  align-items: end;
}

.memberMode .toolbarFilters { display: none !important; }

/* ── Views ── */
.view { display: none; padding: 24px 28px 48px; }
.view.active {
  display: block;
  animation: fadeIn 150ms ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Stat cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.cards article {
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* The four cards used to carry accent / gold / amber / red stripes by
   position. Colour keyed to nth-child is decoration, not information — the
   third card was not "warning" in any real sense. The numbers carry the
   card. */

.cards span {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cards strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── Layout helpers ── */
.split, .grid.statGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.lowerOverview { margin-top: 20px; }
.authForm, .taskList, .stack, .adminNotes { display: grid; gap: 12px; }

/* ── Panel ── */
.panel {
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.sectionHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.sectionHead h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}

.sectionNote {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 560px;
}

.standaloneNote { margin-top: 0; }
.subtle { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ── Task rows (Linear-style) ── */
.taskGrid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.taskRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  cursor: pointer;
  transition: background var(--transition);
}

.taskRow:hover { background: var(--subtle); }

/* Overdue reads as a tinted row rather than a stripe, so a list with several
   overdue items still scans as a list. */
.taskRow.isOverdue { background: var(--tint-red); }
.taskRow.isOverdue:hover { background: rgba(184,66,51,0.11); }
:root[data-theme="dark"] .taskRow.isOverdue:hover { background: rgba(224,104,96,0.16); }

.taskRow-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.taskRow-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  padding: 0;
  transition: all var(--transition);
}

.taskRow-check:hover { border-color: var(--mint); color: var(--mint); }
.taskRow-check.checked { border-color: var(--mint); background: var(--mint); color: #fff; }
.taskRow-check .bi { font-size: 12px; }

.taskRow-content { min-width: 0; flex: 1; }

.taskRow-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.taskRow-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskRow-title.taskDone {
  text-decoration: line-through;
  color: var(--muted);
}

.taskRow-id {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.taskRow-notes {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskRow-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.taskRow-prio { font-size: 15px; }
.prio-urgent { color: var(--red); }
.prio-high { color: var(--amber); }
.prio-medium { color: var(--accent); }
.prio-low { color: var(--muted); }

.taskRow-editBtn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
  opacity: 0;
  transition: all var(--transition);
}

.taskRow:hover .taskRow-editBtn { opacity: 1; }
.taskRow-editBtn:hover { background: var(--subtle-2); color: var(--ink); }

.taskRow-repeat { font-size: 12px; color: var(--accent); margin-left: 4px; }

.dangerText { color: var(--red) !important; font-weight: 700; }
.warningText { color: var(--amber) !important; font-weight: 700; }

/* ── Activity timeline ── */
.logDate {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 16px 0 6px;
}

.logDate:first-child { padding-top: 0; }

.logEntry {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}

.logEntry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 7px;
}

.logEntry-body { min-width: 0; flex: 1; }

.logEntry-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

.logEntry-head strong { font-weight: 700; }

.logEntry-task {
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

.logEntry-task::before { content: "on "; }

.logEntry-note {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Task scope tabs ── */
.taskScopeTabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--subtle);
  width: fit-content;
  margin: 10px 0;
}

.scopeTab {
  border: 0;
  border-radius: var(--radius);
  padding: 8px 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.scopeTab.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* ── Filters ── */
.filters { display: flex; gap: 8px; align-items: center; }
.filters select { width: 140px; }

#tasks .sectionHead { align-items: flex-end; margin-bottom: 4px; }

/* ── Pills ── */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--subtle-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.pill.Urgent, .pill.High, .overduePill {
  background: rgba(184,66,51,0.08);
  color: var(--red);
  border-color: rgba(184,66,51,0.2);
}

.pill.Medium {
  background: rgba(196,138,42,0.08);
  color: var(--amber);
  border-color: rgba(196,138,42,0.18);
}

.pill.ToStart, .pill.Ongoing {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(154,85,51,0.18);
}

.pill.Low, .pill.Active, .pill.Accepted, .pill.Completed {
  background: rgba(90,138,106,0.08);
  color: var(--mint);
  border-color: rgba(90,138,106,0.18);
}

.pill.Blocked, .pill.Admin {
  background: rgba(124,94,138,0.08);
  color: var(--violet);
  border-color: rgba(124,94,138,0.18);
}

.pill.Pending {
  background: var(--subtle-2);
  color: var(--muted);
}

.inlineDateField {
  min-width: 180px;
}

/* ── Room calendar ── */
.dateNav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dateNav .btn-sm { padding: 6px 10px; min-width: 0; }

.roomCards { margin-top: 12px; }

.roomSplit {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 400px);
  gap: 20px;
  align-items: start;
}

.roomSideStack,
.roomBookingForm,
.roomTimeline {
  display: grid;
  gap: 14px;
}

.compactFormGrid { grid-template-columns: 1fr 1fr; }

.formActions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.roomCalendarGrid {
  display: grid;
  grid-template-columns: 80px repeat(2, minmax(0, 1fr));
  grid-auto-rows: 48px;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.roomCalendarHeader,
.roomTimeCell,
.roomCalendarCell {
  padding: 8px 10px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}

.roomCalendarHeader {
  background: var(--subtle);
  color: var(--ink);
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.roomTimeCell {
  display: flex;
  align-items: center;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
}

.roomCalendarCell {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 36px;
  background: var(--surface);
  font-size: 12px;
}

.roomCalendarCell.open {
  color: var(--muted);
  border: none;
}

.roomCalendarCell.booked {
  z-index: 2;
  overflow: hidden;
  padding: 8px 12px;
  margin: 2px 3px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.roomCalendarCell.booked strong { font-size: 13px; }
.roomCalendarCell.booked span { opacity: 0.8; font-size: 11px; }

/* Cabin identity is real information, so it keeps its colour — carried by a
   tint and a full 1px edge rather than a side stripe, which reads the same at
   a glance and survives being stacked. */
.roomCalendarCell.room-0 {
  background: var(--tint-accent);
  border: 1px solid var(--edge-accent);
}
.roomCalendarCell.room-1 {
  background: var(--tint-mint);
  border: 1px solid var(--edge-mint);
}

.roomTimelineItem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.roomTimelineItem.room-0 { border-color: var(--edge-accent); background: var(--tint-accent); }
.roomTimelineItem.room-1 { border-color: var(--edge-mint); background: var(--tint-mint); }

.roomTimelineItem strong {
  display: block;
  margin-bottom: 2px;
}

.roomTimelineItem p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ── Members ── */
.memberGrid { display: grid; gap: 12px; }

.person, .memberCard {
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.person h4, .memberCard h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.memberCard p { color: var(--muted); font-size: 13px; }

.meta, .memberMeta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.row, .memberFooter { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }

.track {
  height: 5px;
  border-radius: 999px;
  background: var(--subtle-3);
  overflow: hidden;
  margin-top: 10px;
}

.fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

/* ── Invite task variants ── */
.inviteTask { background: var(--subtle-2); }

/* ── Due Soon panel ── */
.panelDueSoon {
  border-color: rgba(220,38,38,0.25);
  background: linear-gradient(180deg, rgba(220,38,38,0.04), var(--surface));
}

.panelDueSoon .sectionHead h3 { color: var(--red); }
.dueSoonLabel { color: var(--red) !important; }

.panelDueSoon .taskGrid { border-color: rgba(220,38,38,0.18); }
.panelDueSoon .taskRow:hover { background: rgba(220,38,38,0.03); }

/* ── Empty state ──
   One definition. This was declared twice, ~500 lines apart, with different
   padding and alignment — so which one an empty list got depended on source
   order rather than intent. */
.emptyState {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  border-radius: var(--radius-lg);
  padding: var(--s7) var(--s6);
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--subtle-3);
  text-align: center;
}

.emptyState .emptyIcon {
  font-size: 28px;
  line-height: 1;
  opacity: 0.35;
}

.emptyState p {
  margin: 0;
  font-size: 14px;
  max-width: 42ch;
}

/* The second line tells staff what to do next, so it reads quieter. */
.emptyState p + p,
.emptyState .emptyHint {
  font-size: 13px;
  opacity: 0.8;
}

/* ── Info boxes ── */
.infoBox {
  padding: 14px 16px;
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.infoBox strong { display: block; margin-bottom: 6px; font-size: 14px; }
.infoBox p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ── Forms ── */
label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input, select, textarea {
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154,85,51,0.12);
}

textarea { min-height: 100px; resize: vertical; }

input:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.formGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.formGrid { align-items: start; }
.sharedWithLabel { grid-column: 1 / -1; }

.chipPicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.chipPicker.isDisabled { opacity: 0.55; pointer-events: none; }

.chipOption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.chipOption:hover { border-color: var(--accent); }
.chipOption input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.chipOption:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chipOption:has(input:checked)::before {
  content: "✓";
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}

.fieldHint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.passwordGuide {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--subtle);
  font-size: 13px;
}
.passwordGuide strong { color: var(--ink); }

.permissionNote {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(217,119,6,0.22);
  border-radius: var(--radius);
  color: var(--amber);
  background: rgba(217,119,6,0.06);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Theme toggle ── */
/* Keep native time values readable beside the browser clock affordance. */
#settings .timeInput {
  width: 112px !important;
  min-width: 112px !important;
  padding-inline: 12px 10px !important;
  color-scheme: light dark;
}

@media (max-width: 640px) {
  #settings .timeInput {
    width: 104px !important;
    min-width: 104px !important;
    font-size: 13px !important;
  }
}

.themeToggle {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: min(100%, 380px);
  padding: 4px;
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.themeOption {
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.themeOption i { margin-right: 5px; }

.themeOption.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ── Settings logout ── */
.settingsLogout { margin-top: 16px; }

/* ── Toast notifications ── */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  max-width: 360px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
}

.toast-msg.show { opacity: 1; transform: translateY(0); }
.toast-error { border-color: rgba(220,38,38,0.35); color: var(--red); }
.toast-success { border-color: rgba(5,150,105,0.35); color: var(--mint); }

/* ── Responsive: tablet ── */
@media (max-width: 1440px) {
  .split, .grid.statGrid { grid-template-columns: 1fr; }
  .roomSplit { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .appShell { grid-template-columns: 1fr; }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    gap: 10px;
    flex-direction: column;
  }

  .profileCard, .sidebarCard, #logoutBtn { display: none; }

  .navGroup {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .navGroup::-webkit-scrollbar { display: none; }
  .nav { white-space: nowrap; min-width: max-content; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .taskGrid { grid-template-columns: 1fr; }
  .toolbarFilters { grid-template-columns: 1fr; }
}

/* ── Responsive: mobile ── */
@media (max-width: 640px) {
  .sidebar { padding: var(--s3); gap: 8px; }

  .brandMark { width: 34px; height: 34px; font-size: 15px; border-radius: var(--radius-lg); }
  .sidebar h2 { font-size: 16px; }
  .sidebar .eyebrow { display: none; }

  .nav { padding: 8px 12px; font-size: 13px; border-radius: 999px; }
  .nav i { display: none; }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    gap: 10px;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .actions .btn { font-size: 12px; padding: 8px 6px; }
  .actions .btn i { display: none; }

  .toolbarFilters {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .view { padding: 14px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }

  .cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cards article { padding: var(--s3); }
  .cards span { font-size: 11px; }
  .cards strong { font-size: 24px; }

  .panel { padding: var(--s4); border-radius: var(--radius-lg); }
  .sectionHead h3 { font-size: 18px; }

  .taskRow { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .taskRow-left { flex: 1 1 100%; min-width: 0; }
  .taskRow-right {
    flex: 1 1 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 32px;
  }
  .taskRow-editBtn { opacity: 1; }
  .taskRow-title { white-space: normal; word-break: break-word; }
  .taskRow-notes { white-space: normal; }
  .dateChip { white-space: nowrap; }

  html, body { overflow-x: hidden; }
  .mainPanel { min-width: 0; overflow-x: hidden; }

  .formGrid { grid-template-columns: 1fr; }
  .sharedWithLabel { grid-column: auto; grid-row: auto; }

  .sectionHead { flex-direction: column; align-items: stretch; }
  #tasks .sectionHead { align-items: stretch; }
  .filters { flex-direction: row; width: 100%; gap: 8px; }
  .filters select { width: 100%; flex: 1 1 0; }

  .taskScopeTabs { width: 100%; }
  .scopeTab { flex: 1; }

  form footer { flex-direction: column; }
  form footer .btn { width: 100%; }

  #toastContainer { right: 12px; left: 12px; bottom: 16px; }
  .toast-msg { max-width: 100%; }
}

@media (max-width: 420px) {
  .actions { grid-template-columns: 1fr 1fr; }
  .actions #addBtn { grid-column: 1 / -1; order: -1; }
  .cards { grid-template-columns: 1fr 1fr; }
}

/* ── Avatars ── */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}

.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }

.profileCard .avatar { width: 36px; height: 36px; font-size: 14px; }

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

/* ── Loading skeleton ── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--subtle-2);
  border-radius: var(--radius);
  min-height: 60px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--subtle-3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeletonCard {
  height: 80px;
  border: 1px solid var(--border);
}

.skeletonLine {
  height: 14px;
  width: 60%;
  border-radius: var(--radius-sm);
}

.skeletonLine.short { width: 35%; }

/* ── Dialog animations ── */
/* Ease-out-quart, not the elastic overshoot this used to have: a dialog that
   springs past its size and settles back reads as a toy, and staff open these
   dozens of times a day. */
dialog[open] {
  animation: dialogIn 200ms cubic-bezier(0.25, 1, 0.5, 1);
}

dialog[open]::backdrop {
  animation: backdropIn 200ms ease forwards;
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Relative date chip ── */
.dateChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--subtle-2);
  color: var(--muted);
}

.dateChip.today { background: rgba(37,99,235,0.08); color: var(--accent); }
.dateChip.tomorrow { background: rgba(217,119,6,0.08); color: var(--amber); }
.dateChip.overdue { background: rgba(220,38,38,0.08); color: var(--red); }
.dateChip.done { background: rgba(5,150,105,0.08); color: var(--mint); }

/* ── Better toast ── */
.toast-msg {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-msg .toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg .toast-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 var(--radius) var(--radius);
  animation: toastBar 3.5s linear forwards;
}

.toast-error .toast-bar { background: var(--red); }
.toast-success .toast-bar { background: var(--mint); }
.toast-info .toast-bar { background: var(--accent); }

@keyframes toastBar {
  from { width: 100%; }
  to { width: 0%; }
}

/* ── Member card improvements ── */
.memberCard {
  transition: border-color var(--transition), transform 200ms ease;
}

.memberCard:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

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

.memberCardHeader h4 { margin-bottom: 0; }

/* ── Keyboard shortcut hints ── */
.kbdHint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  opacity: 0.45;
  font-size: 11px;
}

.kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

/* ── Progress ring ── */
.progressRing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.progressRing svg {
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}

.progressRing .ringBg { stroke: var(--subtle-3); }
.progressRing .ringFill {
  stroke: var(--mint);
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms ease;
}

.progressLabel {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.progressLabel small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Sidebar active indicator dot ── */
.nav.active {
  position: relative;
}

/* ── Sync spin animation ── */
.syncSpin i { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile hamburger ── */
.menuToggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 1100px) {
  .menuToggle { display: flex; align-items: center; gap: 10px; }
  .menuToggle .mobileLogo { height: 28px; }
  .brandLogo-dark.mobileLogo { display: none; }
  :root[data-theme="dark"] .brandLogo-light.mobileLogo { display: none; }
  :root[data-theme="dark"] .brandLogo-dark.mobileLogo { display: inline; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 250ms ease;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
  }

  .sidebarOverlay.open { display: block; }

  .profileCard, .sidebarCard, #logoutBtn { display: flex; flex-direction: column; }

  .topbar { padding-left: 16px; }

  .navGroup {
    flex-direction: column;
    overflow-x: visible;
  }
  .nav { white-space: normal; min-width: 0; }
}

@media (min-width: 1101px) {
  .sidebarOverlay { display: none !important; }
  .menuToggle { display: none !important; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- consents */

.consentBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.consentStatus {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 13px;
}

.consentStatusError {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}

.consentList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.consentEmpty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.consentRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.consentRow:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.consentRowMain {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.consentRowMeta {
  color: var(--muted);
  font-size: 12px;
}

.consentRowTags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.consentTag {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.consentPill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.consentPill-awaiting_clinician { background: var(--amber); }
.consentPill-signed { background: var(--mint); }
.consentPill-rejected { background: var(--red); }

.consentAnswers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

.consentGroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.consentField {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.consentField span { color: var(--muted); }
.consentField strong { text-align: right; word-break: break-word; }

.consentSignatures {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.consentSigCard {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.consentSigCard figcaption {
  color: #4b472e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.consentSigCard img {
  display: block;
  width: 190px;
  height: auto;
}

.consentSigCard small {
  color: #6b7280;
  font-size: 10px;
}

.consentSignBlock {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.consentHint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.consentCanvas {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 140px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.consentActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Header actions that belong to specific views only (see switchView). */
.viewHidden { display: none !important; }

/* ------------------------------------------------------------------- PWA */

/* Notched phones: keep the sidebar and topbar clear of the status bar and
   home indicator when running standalone. */
@supports (padding: env(safe-area-inset-top)) {
  .topbar {
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }
  .sidebar,
  aside {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

/* iOS Human Interface Guidelines: 44px minimum tappable area. Applied on
   touch pointers only, so desktop density is unchanged. */
@media (pointer: coarse) {
  .nav,
  .btn,
  .consentRow,
  .signatureButton,
  .pwaToastBtn {
    min-height: 44px;
  }
  .consentActions .btn {
    flex: 1 1 auto;
  }
}

.pwaToast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: #4b472e;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pwaToastBtn {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: #b49b73;
  color: #2b2a24;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pwaToastDismiss {
  border: 0;
  background: none;
  color: #d8d3c4;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pwaOfflinePill {
  position: fixed;
  left: 50%;
  top: calc(8px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 1000;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--red, #dc2626);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Writes are pointless offline; make that visible rather than letting someone
   sign a form that cannot be submitted. */
body.isOffline .consentActions .btn,
body.isOffline #consentSignBtn {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Booking Desk v3 ── */
.bd-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.bd-header h3{margin:0;font-size:22px;font-weight:700;letter-spacing:-.03em}
.bd-subtitle{margin:2px 0 0;color:var(--muted);font-size:13px}
.bd-header-actions{display:flex;gap:8px}
.deskTherapist .adminDeskOnly{display:none!important}

.bd-tabs{display:flex;gap:2px;margin-bottom:20px;border-bottom:1px solid var(--border-soft);padding-bottom:0}
.bd-tab{padding:10px 18px;font-weight:600;font-size:13px;color:var(--muted);background:none;border:none;border-bottom:2px solid transparent;transition:color var(--transition),border-color var(--transition);cursor:pointer}
.bd-tab:hover{color:var(--ink)}
.bd-tab.active{color:var(--accent);border-bottom-color:var(--accent)}

.bd-toast{margin-bottom:14px;padding:10px 14px;border-radius:var(--radius);font-weight:600;font-size:13px;animation:fadeIn 120ms ease}
.bd-toast.hidden{display:none}
.bd-toast.success{background:rgba(53,122,86,.08);color:#357a56}
.bd-toast.error{background:rgba(184,66,51,.08);color:var(--red)}
.bd-toast.info{background:var(--subtle);color:var(--ink)}

.bd-body{min-height:300px}
.bd-pane{display:none}
.bd-pane.active{display:block;animation:fadeIn 150ms ease}

/* ── Stepped flow ── */
.bd-flow{max-width:560px}
.bd-step{display:none}
.bd-step.active{display:block;animation:fadeIn 150ms ease}
.bd-step-header{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.bd-step-num{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;font-weight:700;font-size:13px;flex-shrink:0}
.bd-step-header h4{margin:0;font-size:16px;font-weight:700;letter-spacing:-.02em}
.bd-step-body{display:grid;gap:14px;padding-left:40px}
.bd-step-nav{display:flex;justify-content:space-between;align-items:center;padding-top:8px}

/* ── Buttons ── */
.bd-btn{display:inline-flex;align-items:center;gap:6px;padding:9px 16px;border:none;border-radius:var(--radius);font-weight:600;font-size:13px;cursor:pointer;transition:all var(--transition)}
.bd-btn-sm{padding:6px 12px;font-size:12px}
.bd-btn-primary{background:var(--accent);color:#fff}.bd-btn-primary:hover{background:var(--accent-hover)}
.bd-btn-primary:disabled{opacity:.45;pointer-events:none}
.bd-btn-accent{background:var(--accent);color:#fff;padding:12px 24px;font-size:14px;border-radius:var(--radius)}.bd-btn-accent:hover{background:var(--accent-hover)}
.bd-btn-ghost{background:none;color:var(--muted);border:1px solid var(--border-soft)}.bd-btn-ghost:hover{background:var(--subtle);color:var(--ink)}
.bd-btn-danger-ghost{background:none;color:var(--red);border:1px solid rgba(184,66,51,.2)}.bd-btn-danger-ghost:hover{background:rgba(184,66,51,.06)}
.bd-link-btn{display:inline-flex;align-items:center;gap:6px;padding:0;background:none;border:none;color:var(--accent);font-weight:600;font-size:13px;cursor:pointer}.bd-link-btn:hover{text-decoration:underline}

/* ── Inputs ── */
.bd-search{width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:14px;outline:none;transition:border-color var(--transition),box-shadow var(--transition)}
.bd-search:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(154,85,51,.1)}
.bd-search.hidden{display:none}

/* ── Client search results ── */
.bd-search-results{display:grid;gap:0}
.bd-search-loading,.bd-search-empty{padding: var(--s3);color:var(--muted);font-size:13px}
.bd-client-row{display:grid;gap:2px;padding:10px 14px;border:none;border-bottom:1px solid var(--border-soft);background:none;color:var(--ink);text-align:left;cursor:pointer;transition:background var(--transition),color var(--transition)}
.bd-client-row:last-child{border-bottom:0}
.bd-client-row:hover,.bd-client-row:focus-visible{background:var(--subtle);outline:none}
.bd-client-row strong{font-size:14px;font-weight:600;color:var(--ink)}
.bd-client-row span{font-size:12px;color:var(--muted)}

.bd-selected-client{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid rgba(53,122,86,.25);border-radius:var(--radius);background:rgba(53,122,86,.05)}
.bd-selected-client.hidden{display:none}
.bd-client-info{display:grid;gap:2px}
.bd-client-info strong{font-size:14px;font-weight:600}
.bd-client-info span{font-size:12px;color:var(--muted)}

.bd-new-client{display:grid;gap:10px}
.bd-new-client.hidden{display:none}
.bd-new-client input,.bd-new-client textarea{width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:14px;outline:none;transition:border-color var(--transition)}
.bd-new-client input:focus,.bd-new-client textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(154,85,51,.1)}

/* ── Session fields ── */
.bd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bd-field{display:grid;gap:5px}
.bd-field span{font-weight:600;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.bd-field select,.bd-field input{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:14px;outline:none;transition:border-color var(--transition)}
.bd-field select:focus,.bd-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(154,85,51,.1)}
.bd-field select:disabled{opacity:.5}

.bd-mode-toggle{display:flex;gap:0;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.bd-mode{flex:1;padding:10px;font-weight:600;font-size:13px;background:var(--surface);color:var(--muted);border:none;display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;transition:all var(--transition)}
.bd-mode:first-child{border-right:1px solid var(--border)}
.bd-mode:hover{background:var(--subtle)}
.bd-mode.active{background:var(--accent);color:#fff}

/* ── Date + Slots ── */
.bd-date-row{display:flex;gap:10px;align-items:center}
.bd-date-input{padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:14px;outline:none}
.bd-date-input:focus{border-color:var(--accent)}

.bd-slots{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.bd-slots-loading,.bd-slots-empty{padding: var(--s5);text-align:center;color:var(--muted);font-size:13px}
.bd-slot{padding: var(--s3);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-align:center;cursor:pointer;transition:all var(--transition)}
.bd-slot:hover{border-color:var(--accent);background:var(--accent-light)}
.bd-slot.active{border-color:var(--accent);background:var(--accent);color:#fff}
.bd-slot.active .bd-slot-meta{color:rgba(255,255,255,.7)}
.bd-slot-date{display:block;font-size:12px;font-weight:600;color:var(--muted)}
.bd-slot.active .bd-slot-date{color:rgba(255,255,255,.8)}
.bd-slot-time{display:block;font-size:15px;font-weight:700;margin:2px 0}
.bd-slot-meta{display:block;font-size:11px;color:var(--muted)}

/* ── Confirm summary ── */
.bd-summary-card{border:1px solid var(--border-soft);border-radius:var(--radius-lg);padding: var(--s4);background:var(--surface)}
.bd-summary-card hr{border:none;border-top:1px solid var(--border-soft);margin:8px 0}
.bd-summary-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0}
.bd-summary-row span{color:var(--muted);font-size:13px}
.bd-summary-row strong{font-size:14px;font-weight:600}

/* ── Bookings list ── */
.bd-list-controls{display:flex;gap:10px;margin-bottom:14px}
.bd-list-controls .bd-search{max-width:320px}
.bd-filter-select{padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:13px;outline:none}

.bd-bookings-list{display:grid;gap:8px}
.bd-empty{padding: var(--s7);text-align:center;color:var(--muted);font-size:14px}

.bd-booking-card{padding:14px 16px;border:1px solid var(--border-soft);border-radius:var(--radius);background:var(--surface);transition:box-shadow var(--transition)}
.bd-booking-card:hover{box-shadow:var(--shadow-sm)}
.bd-booking-main{display:flex;align-items:center;gap:16px}
.bd-booking-time{min-width:100px;flex-shrink:0}
.bd-booking-time strong{display:block;font-size:13px;font-weight:600}
.bd-booking-time span{display:block;font-size:12px;color:var(--muted)}
.bd-booking-detail{flex:1;min-width:0}
.bd-booking-detail strong{display:block;font-size:14px;font-weight:600}
.bd-booking-detail span{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bd-booking-actions{display:flex;gap:6px;margin-top:8px;justify-content:flex-end}

.bd-pill{display:inline-flex;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:700;text-transform:capitalize}
.bd-pill.paid{background:rgba(53,122,86,.1);color:#357a56}
.bd-pill.pending{background:rgba(196,138,42,.12);color:#8a5d12}

/* ── Dialog ── */
.bd-dialog{border:0;border-radius:var(--radius-xl);padding:0;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lg);width:min(480px,calc(100vw - 32px))}
.bd-dialog::backdrop{background:rgba(20,18,14,.4);backdrop-filter:blur(3px)}
.bd-dialog form{padding: var(--s5);display:grid;gap:14px}
.bd-dialog h4{margin:0;font-size:16px;font-weight:700}
.bd-dialog-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bd-dialog-footer{display:flex;justify-content:flex-end;gap:8px;padding-top:4px}

/* ── Responsive ── */
@media(max-width:720px){
  .bd-header{display:grid;gap:8px}
  .bd-header-actions{justify-content:flex-start}
  .bd-step-body{padding-left:0}
  .bd-field-row{grid-template-columns:1fr}
  .bd-slots{grid-template-columns:repeat(2,1fr)}
  .bd-list-controls{display:grid}
  .bd-list-controls .bd-search{max-width:none}
  .bd-booking-main{display:grid;gap:8px}
  .bd-booking-time{min-width:0}
  .bd-dialog-fields{grid-template-columns:1fr}
}
