:root {
  --espresso: #433625;
  --espresso-deep: #2f2519;
  --bone: #e9e4e0;
  --cream: #f7f4ef;
  --white: #ffffff;
  --ink: #1c1613;
  --taupe: #8a7c6c;
  --line: #ddd5cb;
  --sage: #6f8b64;
  --sage-soft: #e3eadf;
  --sage-deep: #42573b;
  --blue-soft: #dfe7ec;
  --blue-deep: #43606f;
  --amber: #b07f2e;
  --amber-soft: #f3e7d2;
  --rust: #7a2e1d;
  --past: #efeae4;
  --past-text: #96897a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Karla", -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 24px 48px -32px rgba(67, 54, 37, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* The hidden attribute must always win, even over display: flex/grid classes. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

button { font: inherit; cursor: pointer; color: inherit; }

:focus-visible { outline: 2px solid var(--espresso); outline-offset: 2px; }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--espresso);
}
.wordmark em { font-style: italic; font-weight: 400; color: var(--taupe); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--taupe);
  margin-bottom: 0.75rem;
}

/* ---------- Buttons ---------- */

.btn {
  border: none;
  border-radius: 4px;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary { background: var(--espresso); color: var(--bone); }
.btn-primary:hover { background: var(--espresso-deep); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

/* Premium gold treatment for the main booking CTA. */
.btn-gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #e8bd5f 0%, #cf9433 55%, var(--amber) 100%);
  color: var(--espresso-deep);
  border-radius: 6px;
  box-shadow: 0 10px 22px -12px rgba(176, 127, 46, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.btn-gold:hover {
  background: linear-gradient(160deg, #e8bd5f 0%, #cf9433 55%, var(--amber) 100%);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(176, 127, 46, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-gold:hover::after { transform: translateX(110%); }
.btn-gold:active { transform: translateY(0) scale(0.98); }
.btn-block { width: 100%; }
.btn-ghost {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--espresso);
  font-weight: 700;
}
.btn-ghost:hover { background: var(--cream); }
.btn-ghost.danger { color: var(--rust); }
.btn-menu {
  background: var(--sage);
  color: var(--white);
  font-size: 1.05rem;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.25rem;
}
.btn-menu:hover { background: var(--sage-deep); }

.btn-confirm {
  background: var(--sage);
  color: var(--white);
  font-size: 1.05rem;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.25rem;
}
.btn-confirm:hover { background: var(--sage-deep); }
.btn-confirm:disabled { opacity: 0.6; cursor: wait; }

.confirmed-note {
  background: var(--sage-soft);
  color: var(--sage-deep);
  border: 1px solid var(--sage);
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.form-error { font-size: 0.88rem; color: var(--rust); margin-top: 0.9rem; }
.form-error.center { text-align: center; }
.center-row { text-align: center; margin-top: 0.75rem; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--taupe); }

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bone);
}

.login-panel {
  display: flex;
  width: 100%;
  max-width: 52rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.login-brand {
  flex: 1.1;
  background: var(--espresso);
  color: var(--bone);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.eyebrow.on-dark { color: #b9ab97; }

.login-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.login-wordmark { font-size: 2.2rem; text-wrap: balance; color: var(--bone); }
.login-wordmark em { color: #cbbfae; }

.login-tag { color: #cbbfae; font-size: 0.95rem; margin-top: 0.75rem; }

.login-card {
  flex: 1;
  background: var(--white);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--espresso);
}

.login-lede { color: var(--taupe); margin: 0.5rem 0 0.5rem; font-size: 0.92rem; }

.login-status { color: var(--taupe); font-size: 0.88rem; margin-top: 0.9rem; }

.login-links { text-align: right; margin-top: 0.5rem; }
.login-links .link-btn, .login-foot .link-btn { font-size: 0.82rem; }

.login-foot {
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: var(--taupe);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .login-panel { flex-direction: column; }
  .login-brand { padding: 2rem 1.75rem; }
  .login-card { padding: 2rem 1.75rem; }
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--espresso);
  margin: 1rem 0 0.4rem;
}

input[type="email"], input[type="date"], input[type="time"],
input[type="search"], select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--espresso);
  outline-offset: -1px;
  border-color: var(--espresso);
}
#login-btn { margin-top: 1.25rem; }

/* ---------- App shell ---------- */

.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.6rem clamp(0.8rem, 2.5vw, 1.6rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; }
.wordmark-sm { font-size: 1.15rem; white-space: nowrap; }

.view-tabs { display: flex; gap: 0.25rem; margin-inline: auto; }

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  color: var(--taupe);
}
.tab:hover { color: var(--espresso); }
.tab.active { color: var(--espresso); border-bottom-color: var(--espresso); }

.topbar-tools { display: flex; align-items: center; gap: 0.6rem; }

.search-wrap { width: clamp(9rem, 18vw, 15rem); }
#search { padding: 0.45rem 0.75rem; font-size: 0.9rem; background: var(--cream); }

.icon-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1rem;
  color: var(--taupe);
}
.icon-btn:hover { color: var(--espresso); background: var(--cream); }

.account-wrap { position: relative; }

.account-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
}
.account-btn:hover { background: var(--cream); }

.avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--bone);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.account-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.account-name { font-weight: 700; font-size: 0.85rem; }
.account-email { font-size: 0.72rem; color: var(--taupe); }
.caret { color: var(--taupe); font-size: 0.7rem; }

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  min-width: 15rem;
  padding: 0.5rem;
  z-index: 40;
}
.account-menu-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--taupe);
  padding: 0.35rem 0.5rem;
}
.account-list { list-style: none; margin-bottom: 0.35rem; }
.account-list li {
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
  border-radius: 4px;
}
.account-list li::before { content: "◦ "; color: var(--sage); font-weight: 700; }
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  padding: 0.55rem 0.5rem 0.35rem;
  font-weight: 700;
  font-size: 0.88rem;
}
.menu-item.danger { color: var(--rust); }

/* ---------- Body layout ---------- */

.app-body { display: flex; flex: 1; min-height: 0; }

.sidebar {
  width: 12.5rem;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--white);
  padding: 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
  font-weight: 700;
  color: var(--taupe);
  text-align: left;
}
.side-item:hover { background: var(--cream); color: var(--espresso); }
.side-item.active { background: var(--bone); color: var(--espresso); }
.side-icon { font-size: 1rem; }

.badge {
  margin-left: auto;
  background: var(--rust);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 4rem;
  max-width: 80rem;
}

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-groups { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.filters { display: flex; gap: 0.35rem; flex-wrap: wrap; }

#client-filters { border-left: 1px solid var(--line); padding-left: 0.75rem; }

.pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--taupe);
}
.pill:hover { color: var(--espresso); }
.pill.active { background: var(--espresso); border-color: var(--espresso); color: var(--bone); }

#add-session-btn {
  font-size: 1.05rem;
  padding: 0.85rem 1.7rem;
  /* Auto margins center the CTA in the toolbar's free space (and fully
     center it when it wraps to its own row on small screens). */
  margin-inline: auto;
}

.next-session { font-size: 0.95rem; color: var(--espresso); margin-bottom: 1rem; }
.next-session strong { font-weight: 700; }

/* ---------- Calendar ---------- */

.calendar-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem clamp(0.8rem, 2.5vw, 1.75rem) 1.25rem;
  box-shadow: var(--shadow);
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.month-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
}
.month-title .year { color: var(--taupe); }

.cal-nav { display: flex; gap: 0.4rem; }

.nav-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--espresso);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
}
.nav-btn:hover { background: var(--cream); }
.nav-today { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.weekdays span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--taupe);
  text-align: center;
  padding: 0.3rem 0;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

.day {
  min-height: 6rem;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.35rem;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.12s ease;
}
.day:hover { border-color: var(--sage); }
.day:hover .day-add { opacity: 1; }
.day.outside { background: transparent; cursor: default; }
.day.outside:hover { border-color: transparent; }
.day.outside .day-num { color: var(--line); }

.day-num {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--taupe);
  font-variant-numeric: tabular-nums;
}

.day-add {
  position: absolute;
  top: 0.2rem;
  right: 0.3rem;
  color: var(--sage);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.day.today { border-color: var(--espresso); background: var(--white); }
.day.today .day-num { color: var(--espresso); font-weight: 700; }

.day.selected {
  border-color: var(--sage);
  background: var(--sage-soft);
  box-shadow: 0 0 0 2px var(--sage-soft);
}
.day.selected .day-add { opacity: 1; }
.day.has-session { cursor: pointer; }

.chip {
  border: none;
  text-align: left;
  background: var(--sage-soft);
  color: var(--sage-deep);
  border-left: 3px solid var(--sage);
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow: hidden;
  width: 100%;
}
.chip:hover { filter: brightness(0.96); }
.chip .chip-time { font-weight: 700; display: block; }
.chip .chip-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}
.chip.past { background: var(--past); color: var(--past-text); border-left-color: var(--past-text); }
.chip.needs-menu { background: var(--amber-soft); color: var(--amber); border-left-color: var(--amber); }
.chip.confirmed { background: var(--sage); color: var(--white); border-left-color: var(--sage-deep); }
.chip.confirmed .chip-label { opacity: 1; }
/* Client booking states: pending = light yellow (awaiting the chef),
   confirmed-soft = light green (confirmed, menu still needed),
   confirmed = full green (confirmed + menu in). */
.chip.pending { background: #faf3d3; color: #8a6d1f; border-left-color: #d4b34a; }
.chip.confirmed-soft { background: var(--sage-soft); color: var(--sage-deep); border-left-color: var(--sage); }
.board-card.confirmed { border-left-color: var(--sage-deep); background: var(--sage-soft); }
.board-card.pending { border-left-color: #d4b34a; background: #faf3d3; }
.board-card.confirmed-soft { border-left-color: var(--sage); background: var(--sage-soft); }
.chip.dimmed { opacity: 0.3; }

.cal-hint {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--taupe);
  text-align: center;
}

/* ---------- List view ---------- */

.list-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr auto auto;
  gap: 1rem;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1.25rem;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--cream); }
.list-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.list-date small { display: block; font-weight: 400; color: var(--taupe); }
.list-main { min-width: 0; }
.list-chef { font-weight: 700; }
.list-sub {
  font-size: 0.82rem;
  color: var(--taupe);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-empty { padding: 2.5rem; text-align: center; color: var(--taupe); }

.status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-tag.st-upcoming { background: var(--sage-soft); color: var(--sage-deep); }
.status-tag.st-progress { background: var(--blue-soft); color: var(--blue-deep); }
.status-tag.st-done { background: var(--past); color: var(--past-text); }
.status-tag.st-menu { background: var(--amber-soft); color: var(--amber); }
.status-tag.st-pending { background: #faf3d3; color: #8a6d1f; }

.pending-note {
  background: #faf3d3;
  color: #8a6d1f;
  border: 1px solid #d4b34a;
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

/* ---------- Board view ---------- */

.board-wrap { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }

.board-col {
  flex: 1;
  min-width: 14rem;
  background: var(--bone);
  border-radius: 6px;
  padding: 0.75rem;
}
.board-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--taupe);
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}
.board-col-title .count { color: var(--espresso); }

.board-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--sage);
}
.board-card:hover { box-shadow: var(--shadow); }
.board-card.past { border-left-color: var(--past-text); }
.board-card.needs-menu { border-left-color: var(--amber); }
.board-card .bc-date { font-weight: 700; font-size: 0.88rem; }
.board-card .bc-sub { font-size: 0.8rem; color: var(--taupe); }
.board-col-empty { font-size: 0.82rem; color: var(--taupe); padding: 0.25rem; }

/* ---------- Empty state ---------- */

.empty-state {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--taupe);
}
.empty-state .btn { margin-top: 1.5rem; }

.empty-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--espresso);
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

/* ---------- Modals ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 19, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal {
  background: var(--white);
  border-radius: 6px;
  padding: 2rem;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}
.modal-wide { max-width: 34rem; }

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--taupe);
  line-height: 1;
}
.modal-close:hover { color: var(--espresso); }

.modal-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--espresso);
  margin-bottom: 0.25rem;
  padding-right: 1.5rem;
}
.modal-lede { color: var(--taupe); font-size: 0.92rem; margin-bottom: 1rem; }
.modal .btn-block { margin-top: 1.4rem; }
.modal .btn-menu.btn-block { margin-top: 0.25rem; }

/* Chef guard — centered, badge on top, no dismiss affordance. */
.modal.chef-guard { text-align: center; max-width: 26rem; }
.modal.chef-guard .modal-title { padding-right: 0; }
.modal.chef-guard .modal-lede { margin-bottom: 0.5rem; }
.chef-guard-badge {
  width: 64px;
  height: 64px;
  margin: 0.25rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 50%;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
}

.detail-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.25rem;
  margin-bottom: 1.25rem;
}
.detail-fields dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--taupe);
  padding-top: 0.15rem;
}
.detail-fields dd { font-size: 0.92rem; white-space: pre-line; }
.detail-fields dd a { color: var(--sage-deep); font-weight: 700; }

.detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.detail-actions .btn { font-size: 0.85rem; padding: 0.5rem 0.85rem; }

.act-form {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.act-form .field-label { margin-top: 0; }
.act-form input, .act-form textarea { margin-bottom: 0.75rem; }
.act-confirm { font-size: 0.92rem; margin-bottom: 0.75rem; }
.act-form-row { display: flex; gap: 0.5rem; }

/* ---------- Inbox ---------- */

.inbox-layout { display: flex; gap: 1rem; align-items: stretch; }

.pane-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--espresso);
}

.thread-list {
  width: 16rem;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.9rem 0.75rem;
  max-height: 72vh;
  overflow-y: auto;
}
.thread-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  padding: 0 0.25rem;
}
.thread-list-head .btn { font-size: 0.8rem; padding: 0.35rem 0.7rem; }

.thread-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0.55rem 0.6rem;
}
.thread-btn:hover { background: var(--cream); }
.thread-btn.active { background: var(--bone); }
.thread-name { font-weight: 700; font-size: 0.88rem; display: flex; align-items: center; gap: 0.4rem; }
.thread-role {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--taupe);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}
.thread-prev {
  font-size: 0.78rem;
  color: var(--taupe);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}
.unread-dot {
  background: var(--rust);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  margin-left: auto;
}

.convo {
  flex: 1;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 26rem;
  max-height: 72vh;
}
.convo-head {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.inbox-note { text-align: center; color: var(--taupe); font-size: 0.88rem; padding: 1rem; }

.bubble {
  max-width: 75%;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.92rem;
  white-space: pre-line;
  overflow-wrap: break-word;
}
.bubble.mine {
  align-self: flex-end;
  background: var(--sage-soft);
  border-bottom-right-radius: 3px;
}
.bubble.theirs {
  align-self: flex-start;
  background: var(--cream);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.msg-time { display: block; font-size: 0.66rem; color: var(--taupe); margin-top: 0.3rem; }
.msg-link-btn {
  display: inline-block;
  margin-top: 0.45rem;
  background: var(--espresso);
  color: var(--bone);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.msg-link-btn:hover { background: var(--espresso-deep); }

.msg-form { border-top: 1px solid var(--line); padding: 0.75rem; }
.msg-main-row { display: flex; gap: 0.5rem; }
.msg-main-row input { flex: 1; }
.owner-link-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.owner-link-row input { flex: 1; font-size: 0.82rem; padding: 0.45rem 0.6rem; }

.settings-list { display: flex; flex-direction: column; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.settings-row:first-child { border-top: none; }
.settings-info { display: flex; flex-direction: column; gap: 0.15rem; }
.settings-info strong { font-size: 0.95rem; }
.settings-desc { font-size: 0.82rem; color: var(--taupe); }
.settings-row .btn { flex-shrink: 0; font-size: 0.85rem; padding: 0.5rem 0.9rem; }

.contact-list { margin-top: 0.75rem; max-height: 50vh; overflow-y: auto; }
.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.contact-btn:hover { background: var(--cream); }

@media (max-width: 760px) {
  .inbox-layout { flex-direction: column; }
  .thread-list { width: 100%; max-height: 14rem; }
}

/* ---------- Booking flow ---------- */

.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 19, 0.55);
  z-index: 40;
  animation: fade-in 0.35s ease;
}

.calendar-card.spotlight {
  position: relative;
  z-index: 45;
  box-shadow: 0 0 0 4px var(--sage-soft), 0 32px 90px rgba(28, 22, 19, 0.5);
  animation: brighten 0.45s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes brighten {
  0% { transform: scale(0.985); filter: brightness(0.9); }
  60% { transform: scale(1.01); filter: brightness(1.05); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12) rotate(-1.5deg); }
  70% { transform: scale(0.97); }
  100% { transform: scale(1); }
}
.pop { animation: pop 0.45s ease; }

/* Gold sparkle burst fired when a client starts a booking. Purely
   decorative: pointer-events off, removed from the DOM after ~1.2s. */
.sparkle-burst {
  position: fixed;
  width: 0;
  height: 0;
  z-index: 80;
  pointer-events: none;
}
.spark {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe08a 0%, #e0a83c 65%, var(--amber) 100%);
  box-shadow: 0 0 6px 1px rgba(224, 168, 60, 0.55);
  animation: spark-fly 0.9s cubic-bezier(0.16, 0.6, 0.3, 1) forwards;
}
.spark-star {
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: #e8b545;
  box-shadow: none;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
}
@keyframes spark-fly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  15% { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1.15) rotate(45deg); }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 12px)) scale(0.5) rotate(160deg); }
}

.booking-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--sage-soft);
  border: 1px solid var(--sage);
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  color: var(--sage-deep);
}
.booking-banner p { flex: 1; }
.booking-banner .btn { flex-shrink: 0; font-size: 0.82rem; padding: 0.45rem 0.9rem; }

/* Availability colors: white = open, light red = blocked (half = that part of
   the day), green = your own booked session, dark grey = past. */
.day.avail-open { background: var(--white); border-color: var(--line); cursor: pointer; }
.day.avail-blocked { background: #f5d7d2; cursor: pointer; }
.day.avail-am {
  background: linear-gradient(to bottom, #f5d7d2 0 50%, var(--white) 50% 100%);
  cursor: pointer;
}
.day.avail-pm {
  background: linear-gradient(to bottom, var(--white) 0 50%, #f5d7d2 50% 100%);
  cursor: pointer;
}
.day.avail-both {
  background: linear-gradient(to bottom, #f5d7d2 0 34%, var(--white) 34% 66%, #f5d7d2 66% 100%);
  cursor: pointer;
}
.day.own-day { background: #dcecd7; border-color: var(--sage); }
.day.past-day { background: #b8b2aa; cursor: default; }
.day.past-day .day-num { color: #675f56; }

.booking-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}
.slot {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--espresso);
}
.slot:hover { background: var(--cream); }
.slot.selected { background: var(--espresso); border-color: var(--espresso); color: var(--bone); }

.radio-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  cursor: pointer;
}
.radio-row input { accent-color: var(--espresso); width: auto; }
#avail-modal .btn-block { margin-top: 1.25rem; }

.booking-avail-note {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.booking-avail-note.ok { color: var(--sage-deep); }
.booking-avail-note.warn { color: var(--amber); }
.booking-avail-note.bad { color: var(--rust); }

.booking-duration {
  font-size: 0.88rem;
  color: var(--taupe);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin: -0.4rem 0 1rem;
}

/* ---------- "How many menu items?" step ---------- */

.item-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.item-count-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 0.5rem 0.75rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.item-count-btn:hover {
  background: var(--cream);
  border-color: var(--espresso);
  transform: translateY(-2px);
}
.item-count-num {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--espresso);
  line-height: 1;
}
.item-count-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--taupe);
}
.items-hint {
  font-size: 0.82rem;
  color: var(--taupe);
  margin-top: 1rem;
}

.chef-placards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.9rem;
  margin-top: 0.75rem;
  max-height: 55vh;
  overflow-y: auto;
  padding: 0.25rem;
}

.placard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.placard-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 4px 12px rgba(28, 22, 19, 0.18);
}
.placard-initial {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--bone);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.8rem;
}
.placard-name { font-family: var(--serif); font-size: 1.05rem; color: var(--espresso); font-weight: 500; }
.placard-meta { font-size: 0.78rem; color: var(--taupe); }
.placard .btn-ghost { margin-top: 0.15rem; width: 100%; font-size: 0.8rem; padding: 0.45rem; }

.bio-viewer {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 70;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.3s ease;
}
@keyframes slide-up {
  from { transform: translateY(4%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.bio-viewer-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(0.8rem, 2.5vw, 1.6rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.bio-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--espresso);
}
.bio-frame { flex: 1; border: none; width: 100%; background: var(--bone); }
.photo-gallery {
  flex: 1;
  overflow-y: auto;
  padding: clamp(0.8rem, 2.5vw, 1.4rem);
  background: var(--bone);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  align-content: start;
}
.photo-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.photo-gallery img:hover,
.photo-gallery img:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  outline: none;
}

/* ---------- Food photo lightbox ---------- */

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-close {
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2rem;
}
.lightbox-prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-count {
  position: absolute;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.photo-gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--taupe);
  font-family: var(--serif);
  font-size: 1.05rem;
  padding: 3rem 1.2rem;
}
.placard-status { font-size: 0.75rem; font-weight: 700; }
.placard-status.ok { color: var(--sage-deep); }
.placard-status.warn { color: var(--amber); }
.placard .btn { margin-top: 0.5rem; width: 100%; font-size: 0.85rem; padding: 0.5rem; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--espresso);
  color: var(--bone);
  border-radius: 6px;
  padding: 0.8rem 1.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  z-index: 60;
  max-width: min(92vw, 34rem);
  text-align: center;
}
.toast.error { background: var(--rust); color: var(--white); }

.loading { opacity: 0.5; transition: opacity 0.2s ease; }

/* ---------- Chef job day ---------- */
/* Mobile-first, delivery-app style: one card, big buttons, one next step. */

#job-pane { max-width: 34rem; margin: 0 auto; }

.job-offline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}

.job-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.1rem 1.4rem;
  box-shadow: var(--shadow);
}

.job-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--taupe);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.job-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--espresso);
  margin: 0.35rem 0 0.1rem;
}

.job-sub { color: var(--taupe); font-size: 0.95rem; margin-bottom: 1rem; }

.job-chip {
  display: inline-block;
  background: var(--sage-soft);
  color: var(--sage-deep);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.job-more-today {
  font-size: 0.85rem;
  color: var(--taupe);
  border-top: 1px dashed var(--line);
  margin-top: 1.1rem;
  padding-top: 0.8rem;
}

/* -- step list -- */

.job-steps { list-style: none; margin-top: 0.4rem; }

.job-step {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  column-gap: 0.75rem;
  padding: 0.55rem 0;
  position: relative;
}
/* the connecting line between step dots */
.job-step::before {
  content: "";
  position: absolute;
  left: calc(1.05rem - 1px);
  top: 2.4rem;
  bottom: -0.55rem;
  width: 2px;
  background: var(--line);
}
.job-step:last-child::before { display: none; }
.job-step.done::before { background: var(--sage); }

.step-dot {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--cream);
  border: 2px solid var(--line);
  color: var(--taupe);
  z-index: 1;
}
.job-step.done .step-dot { background: var(--sage); border-color: var(--sage); color: var(--white); }
.job-step.current .step-dot { background: var(--espresso); border-color: var(--espresso); color: var(--bone); }
.job-step.locked .step-dot { opacity: 0.55; }

.step-title { font-weight: 700; color: var(--ink); padding-top: 0.3rem; }
.job-step.locked .step-title { color: var(--taupe); opacity: 0.75; }
.job-step.done .step-title { color: var(--sage-deep); }
.step-meta { font-size: 0.82rem; color: var(--taupe); }

.step-body { grid-column: 2; margin-top: 0.5rem; }

/* -- the one big action -- */

.job-cta {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 1.05rem 1rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
}
.job-cta:disabled { opacity: 0.6; cursor: wait; }

.job-cta-secondary {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--espresso);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
}
.job-cta-secondary:hover { background: var(--cream); }

.job-link-row { margin-top: 0.65rem; text-align: center; }
.job-quiet-link {
  background: none;
  border: none;
  color: var(--taupe);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.3rem;
}
.job-quiet-link:hover { color: var(--espresso); }

/* -- step content blocks -- */

.receipt-rules {
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.receipt-rules strong { color: var(--amber); }
.receipt-rules ul { margin: 0.4rem 0 0 1.1rem; }
.receipt-rules li { margin-top: 0.15rem; }

.job-address {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.job-address a { color: var(--blue-deep); font-weight: 700; }

.job-details { margin: 0 0 0.75rem; }
.job-details dt {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--taupe);
  margin-top: 0.6rem;
}
.job-details dd { margin: 0.1rem 0 0; font-size: 0.95rem; }
.job-details a { color: var(--blue-deep); font-weight: 700; }

.job-thumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.job-thumbs img {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.job-thumbs .thumb-count {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--taupe);
}

.job-upload-note {
  font-size: 0.82rem;
  color: var(--sage-deep);
  font-weight: 700;
  margin: 0.4rem 0;
}

.job-textarea {
  width: 100%;
  margin-bottom: 0.6rem;
}
.job-miles-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.job-miles-row input { width: 6rem; }
.job-miles-row label { font-size: 0.88rem; color: var(--taupe); font-weight: 700; }

/* -- empty / done states -- */

.job-empty { text-align: center; padding: 1.25rem 0.5rem 0.75rem; }
.job-empty-icon { font-size: 2.2rem; }
.job-empty-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--espresso);
  margin: 0.4rem 0 0.3rem;
}
.job-empty p { color: var(--taupe); font-size: 0.95rem; }

.job-done { text-align: center; padding: 1.5rem 0.5rem 0.5rem; }
.job-done-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-done-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--espresso);
  margin-bottom: 0.3rem;
}
.job-done p { color: var(--taupe); }

.job-toggle-row { text-align: center; margin-top: 1rem; }

/* Job-day on bigger screens: same card, just breathing room. */
@media (min-width: 861px) {
  .job-card { padding: 1.75rem 1.75rem 1.9rem; }
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .account-meta { display: none; }
  .search-wrap { width: 8rem; }
  .view-tabs { margin-inline: 0; }
  .topbar { flex-wrap: wrap; gap: 0.5rem; }
  .app-body { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 0.6rem;
  }
  .side-item { width: auto; }
}

@media (max-width: 560px) {
  .day { min-height: 4.4rem; padding: 0.25rem; }
  .chip .chip-label { display: none; }
  .chip { font-size: 0.64rem; padding: 2px 4px; }
  .weekdays span { font-size: 0.58rem; letter-spacing: 0.06em; }
  .login-card { padding: 2.25rem 1.5rem; }
  .list-row { grid-template-columns: 1fr auto; }
  .list-sub { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* -- job day: timing plan, packet link, breaks, shopping list -- */

.job-packet { margin: 0 0 0.6rem; }
.job-packet-link {
  display: inline-block;
  margin-right: 0.75rem;
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 0.92rem;
}

.job-plan {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 0.9rem;
}
.job-plan .plan-row { font-weight: 700; font-size: 0.98rem; padding: 0.1rem 0; }
.job-plan .plan-sub { color: var(--taupe); font-size: 0.82rem; margin-top: 0.25rem; }

.job-breaks {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.job-breaks strong { font-size: 0.9rem; }
.job-breaks .step-meta { margin: 0.25rem 0 0.5rem; }

.shoplist-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
}

.shopping-note { font-size: 0.85rem; color: var(--taupe); }

/* -- client: post-booking "choose menu now or later?" popup -- */
#post-booking-later { margin-top: 0.5rem; }

/* -- client: ordered menu items in the session detail -- */
.menu-items { display: block; }
.menu-item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-weight: 600;
}
.menu-item-photo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: none;
}
/* rows that link to the product page on cookedbyconte.com */
a.menu-item-row {
  color: inherit;
  text-decoration: none;
}
a.menu-item-row:hover,
a.menu-item-row:focus-visible { text-decoration: underline; }
a.menu-item-row::after { content: " ↗"; font-weight: 400; color: var(--taupe); }

/* -- shift timeline + break compliance -- */
.shift-worked { font-weight: 700; font-size: 0.92rem; margin: 0.35rem 0; }
.shift-timeline { margin: 0.4rem 0 0.6rem; }
.shift-bar {
  position: relative;
  height: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.shift-seg { position: absolute; top: 0; bottom: 0; }
.shift-seg.work { background: var(--sage-deep, #6b8f71); opacity: 0.85; }
.shift-seg.gap {
  background: repeating-linear-gradient(45deg, transparent, transparent 4px, var(--taupe) 4px, var(--taupe) 6px);
  opacity: 0.5;
}
.shift-mark {
  position: absolute; top: -2px; bottom: -2px; width: 3px;
  background: var(--amber, #d99a2b);
  border-radius: 2px;
}
.shift-legend {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--taupe); margin-top: 0.15rem;
}
.break-status { font-size: 0.86rem; padding: 0.2rem 0; }
.break-status.ok { color: var(--sage-deep, #4c7a54); font-weight: 600; }
.break-status.warn { color: #a4670a; font-weight: 700; }
.break-status.danger { color: var(--rust, #b0432f); font-weight: 800; }

/* -- pantry checklist (client) -- */
.pantry-instructions {
  font-size: 0.88rem;
  color: var(--taupe);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0 0.8rem;
}
.pantry-list {
  max-height: 46vh;
  overflow-y: auto;
  margin-bottom: 0.9rem;
  border-top: 1px solid var(--line);
}
.pantry-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0.2rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.95rem;
}
.pantry-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.05rem;
  flex: none;
  accent-color: var(--sage-deep, #4c7a54);
  cursor: pointer;
}
.pantry-item:has(input:checked) .pantry-item-text {
  color: var(--sage-deep, #4c7a54);
  font-weight: 600;
}

/* ======================= Create account & Google sign-in ======================= */

.google-signin-wrap { margin-top: 0.9rem; }
.login-or {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--taupe); font-size: 0.8rem; margin: 0.4rem 0 0.8rem;
}
.login-or::before, .login-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.google-signin-btn { display: flex; justify-content: center; }

/* ======================= Onboarding wizard ======================= */

.onboarding-viewer {
  background: var(--cream);
  overflow-y: auto;
  display: block;
}
.onboarding-shell {
  max-width: 520px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem;
}
.onboarding-logo { width: 74px; height: 74px; object-fit: contain; margin: 0 auto 1rem; display: block; }
.onboarding-progress {
  height: 6px; background: var(--bone); border-radius: 999px;
  margin: 1.2rem 0 1.8rem; overflow: hidden;
}
.onboarding-bar {
  height: 100%; width: 5%; border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), #d9a84e);
  transition: width 0.4s ease;
}
.ob-question {
  font-family: var(--serif); font-weight: 500; font-size: 1.35rem;
  color: var(--espresso); margin-bottom: 1rem;
}
.ob-note { color: var(--taupe); margin-bottom: 1rem; }
.ob-back {
  background: none; border: none; padding: 0; margin-bottom: 0.85rem; cursor: pointer;
  color: var(--taupe); font: inherit; font-size: 0.88rem; font-weight: 600;
}
.ob-back:hover { color: var(--espresso); }
.ob-optional { color: var(--taupe); font-weight: 400; }
.ob-options { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.ob-option {
  text-align: left; background: var(--white); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 1rem 1.1rem; font-weight: 700; font-size: 1.02rem;
  color: var(--espresso); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ob-option:hover { border-color: var(--amber); transform: translateY(-1px); box-shadow: var(--shadow); }
.ob-option.selected { border-color: var(--amber); background: var(--amber-soft); }
.ob-option-sub { display: block; font-weight: 400; font-size: 0.88rem; color: var(--taupe); margin-top: 0.2rem; }
.onboarding-page input, .onboarding-page select,
.rf-page input, .rf-page select {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--white); margin-bottom: 0.9rem; font: inherit;
}

/* ======================= Cart (review your dates) ======================= */

.cart-fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 45;
  background: var(--espresso); color: var(--bone); border: none;
  border-radius: 999px; padding: 0.85rem 1.3rem; font-weight: 700;
  box-shadow: 0 12px 30px -10px rgba(47, 37, 25, 0.55);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.cart-fab:hover { background: var(--espresso-deep); }
.cart-fab-count {
  background: var(--amber); color: var(--white); border-radius: 999px;
  min-width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center;
  justify-content: center; font-size: 0.85rem; padding: 0 0.35rem;
}
.cart-body, .menu-body {
  max-width: 640px; margin: 0 auto; padding: 1.25rem 1.1rem 6rem; overflow-y: auto;
  height: calc(100% - 58px);
}
.cart-lede { color: var(--taupe); margin-bottom: 1rem; }
.cart-rows { display: grid; gap: 0.8rem; margin-bottom: 1.1rem; }
.cart-row {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 0.95rem 1.05rem;
}
.cart-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.cart-row-date { font-weight: 700; color: var(--espresso); }
.cart-row-price { font-weight: 700; color: var(--espresso); white-space: nowrap; }
.cart-row-sub { color: var(--taupe); font-size: 0.88rem; margin-top: 0.15rem; }
/* Who the session is for — multi-client logins only */
.cart-row-participant {
  display: flex; align-items: center; gap: 0.45rem;
  margin-top: 0.3rem; font-size: 0.88rem; color: var(--taupe);
}
.cart-participant-select, .cart-edit-participant-swap select {
  padding: 0.3rem 0.5rem; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--white); font: inherit; font-size: 0.88rem;
}
.cart-row-menu { font-size: 0.88rem; margin-top: 0.35rem; color: var(--sage-deep); }
.cart-row-actions {
  display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; flex-wrap: wrap;
}
.cart-stepper {
  display: inline-flex; align-items: center; gap: 0.15rem;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 0.1rem 0.3rem;
  background: var(--cream);
}
.cart-stepper button {
  border: none; background: none; font-size: 1.1rem; font-weight: 700;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; color: var(--espresso);
}
.cart-stepper button:hover { background: var(--bone); }
.cart-stepper button:disabled { opacity: 0.3; cursor: default; }
.cart-stepper-count { min-width: 4.6rem; text-align: center; font-size: 0.86rem; font-weight: 700; }
.cart-remove { margin-left: auto; }
.cart-summary {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 0.15rem 0; }
.cart-summary-row.total { font-weight: 800; font-size: 1.05rem; border-top: 1px solid var(--line); margin-top: 0.4rem; padding-top: 0.55rem; }
.cart-foot { color: var(--taupe); font-size: 0.85rem; margin-top: 0.9rem; text-align: center; }
.cart-empty { text-align: center; color: var(--taupe); padding: 2.5rem 0; }

/* ======================= Native menu chooser ======================= */

.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem; margin-bottom: 5.5rem;
}
/* Invisible row at the end of a windowed grid — scrolling it into view
   (600px early) appends the next batch of cards. */
.grid-sentinel { grid-column: 1 / -1; height: 1px; }
.menu-card {
  background: var(--white); border: 2px solid var(--line); border-radius: 14px;
  overflow: hidden; text-align: left; padding: 0; position: relative;
  transition: border-color .15s, transform .15s;
}
.menu-card:hover { transform: translateY(-2px); }
.menu-card.selected { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.menu-card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bone); }
.menu-card-photo-empty {
  width: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; background: var(--bone); color: var(--taupe);
}
.menu-card-body { padding: 0.6rem 0.7rem 0.75rem; }
.menu-card-name { font-weight: 700; font-size: 0.92rem; color: var(--espresso); }
.menu-card-sub { color: var(--taupe); font-size: 0.8rem; margin-top: 0.15rem; }
.menu-card-check {
  position: absolute; top: 0.5rem; right: 0.5rem; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; background: var(--amber); color: var(--white);
  display: none; align-items: center; justify-content: center; font-weight: 800;
}
.menu-card.selected .menu-card-check { display: flex; }
.menu-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 62;
  background: var(--white); border-top: 1px solid var(--line);
  padding: 0.8rem 1.1rem; display: flex; align-items: center; gap: 1rem;
  justify-content: space-between;
}
#menu-count-line { font-weight: 700; color: var(--espresso); font-size: 0.92rem; white-space: nowrap; }

/* Selected-dish thumbnails between the count and Submit — 5 slots so a full
   menu fills the bar; tapping one reopens that dish's popup. */
.menu-picks {
  display: flex; gap: 0.45rem; flex: 1 1 auto; justify-content: center;
  min-width: 0; align-items: center;
}
.menu-pick, .menu-pick-slot { width: 46px; height: 46px; border-radius: 12px; flex: 0 1 46px; }
.menu-pick {
  position: relative; border: 2px solid var(--amber); background: var(--bone);
  padding: 0; overflow: hidden; cursor: pointer;
  box-shadow: 0 0 0 3px var(--amber-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: transform .12s;
}
.menu-pick:hover { transform: translateY(-2px); }
.menu-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-pick-slot { border: 2px dashed var(--line); display: inline-block; }

/* ---------- collections landing page ---------- */
.menu-colls-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.8rem; margin-bottom: 1rem;
}
.menu-coll-card {
  position: relative; border: none; border-radius: 16px; overflow: hidden;
  padding: 0; text-align: left; cursor: pointer; aspect-ratio: 16 / 11;
  background: var(--bone); box-shadow: 0 6px 18px -12px rgba(47, 37, 25, 0.45);
  transition: transform .15s, box-shadow .15s;
}
.menu-coll-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(47, 37, 25, 0.55); }
.menu-coll-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.menu-coll-photo-empty {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 2.4rem; color: var(--taupe);
}
.menu-coll-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24, 18, 10, 0.78) 0%, rgba(24, 18, 10, 0.25) 45%, rgba(24, 18, 10, 0) 70%);
}
.menu-coll-label { position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.6rem; color: #fff; }
.menu-coll-name { font-weight: 800; font-size: 0.98rem; line-height: 1.2; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.menu-coll-count { font-size: 0.78rem; opacity: 0.9; margin-top: 0.1rem; }
.menu-all-dishes { margin-bottom: 5.5rem; }

/* "← Collections" + search, under the pills */
.menu-searchrow { display: flex; gap: 0.5rem; align-items: center; width: 100%; }
.menu-back-collections { flex: 0 0 auto; white-space: nowrap; padding: 0.45rem 0.8rem; border-radius: 999px; }
.menu-searchrow .menu-search { flex: 1 1 auto; min-width: 0; }

@media (max-width: 640px) {
  /* Two-row bar on phones: pick chips on top, count + Submit below. */
  .menu-bar { flex-wrap: wrap; row-gap: 0.55rem; padding: 0.6rem 0.9rem 0.75rem; }
  .menu-picks { order: -1; flex: 1 1 100%; }
  .menu-pick, .menu-pick-slot { width: 44px; height: 44px; flex-basis: 44px; }
  #menu-count-line { font-size: 0.85rem; }
  .menu-grid { margin-bottom: 8rem; }
  .menu-all-dishes { margin-bottom: 8rem; }
  .menu-colls-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
}

/* ---------- native catalog: collections + search + dish detail ---------- */
.menu-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  margin-bottom: 0.9rem;
}
.menu-collections {
  display: flex; gap: 0.45rem; overflow-x: auto; flex: 1 1 auto;
  padding-bottom: 0.2rem; scrollbar-width: thin;
}
.menu-collections .pill { flex: 0 0 auto; }
.menu-search {
  flex: 0 1 220px; min-width: 150px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.95rem; font-size: 0.9rem; background: var(--white);
}
.menu-card-info {
  position: absolute; top: 0.5rem; left: 0.5rem; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; border: none; background: rgba(255,255,255,0.9);
  color: var(--espresso); font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.menu-card-style {
  margin-top: 0.45rem; width: 100%; font-size: 0.8rem;
  border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.4rem;
  background: var(--bone); color: var(--espresso);
}
/* The dish popup must float ABOVE the full-screen menu chooser (.bio-viewer,
   z-index 70) — the shared backdrop's 50 left it hidden underneath. */
#dish-modal { z-index: 75; }
/* Owner variant editor stacks the same way — above the dish editor (50),
   and it closes alone so the dish editor is still there underneath. */
#cat-var-modal { z-index: 75; }
#cat-var-modal .modal { max-height: 88vh; overflow-y: auto; }
.dish-modal { max-height: 88vh; overflow-y: auto; }
.dish-config { margin: 0.6rem 0 0.4rem; }
.dish-config-row { margin-bottom: 0.55rem; }
.dish-config-label {
  display: block; font-weight: 700; font-size: 0.83rem; color: var(--espresso);
  margin-bottom: 0.2rem;
}
.dish-config-row select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.5rem 0.7rem; font-size: 0.92rem; background: var(--white);
  color: var(--espresso);
}
.dish-config-row select.unchosen { border-color: var(--amber); }
.dish-config-hint { color: var(--taupe); font-size: 0.85rem; margin: 0.5rem 0 0; }
.dish-modal .btn-block + .btn-block { margin-top: 0.5rem; }
.menu-card-choice { color: var(--amber); font-size: 0.78rem; font-weight: 700; margin-top: 0.2rem; }
.dish-photos {
  display: flex; gap: 0.6rem; overflow-x: auto; margin: 0.4rem 0 0.8rem;
  scrollbar-width: thin;
}
.dish-photos img {
  height: 180px; border-radius: 12px; flex: 0 0 auto; max-width: 85%;
  object-fit: cover;
}
.dish-variants { margin: 0.4rem 0; }
.dish-variant-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
  margin-bottom: 0.4rem;
}
.dish-variant-name { font-weight: 700; font-size: 0.83rem; color: var(--taupe); }
.dish-variant-chip {
  background: var(--bone); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.15rem 0.65rem; font-size: 0.8rem; color: var(--espresso);
}
.dish-desc { white-space: pre-wrap; color: var(--espresso); font-size: 0.92rem; margin: 0.6rem 0 1rem; }

/* ---------- owner Menu Catalog tab ---------- */
.catalog-head {
  display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-start;
  justify-content: space-between; margin-bottom: 0.9rem;
}
.catalog-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
}
.cat-card { text-align: left; cursor: pointer; }
.cat-inactive { opacity: 0.55; }
.pill.cat-hidden { border-style: dashed; }
.pill-edit { margin-left: 0.25rem; opacity: 0.7; }
.pill-edit:hover { opacity: 1; }
.ci-photos { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0; }
.ci-photo { position: relative; }
.ci-photo img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line);
}
/* collection cover-photo picker */
.cc-cover-hint { color: var(--taupe); font-size: 0.85rem; margin: 0.15rem 0 0.5rem; }
.cc-cover-grid {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem;
  max-height: 220px; overflow-y: auto;
}
.cc-cover-tile {
  position: relative; width: 84px; height: 63px; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--line); background: var(--bone); padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.cc-cover-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-cover-tile.active { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.cc-cover-badge {
  position: absolute; left: 0.25rem; bottom: 0.25rem; background: rgba(24, 18, 10, 0.75);
  color: #fff; font-size: 0.62rem; font-weight: 700; padding: 0.05rem 0.4rem; border-radius: 999px;
}
.cc-cover-note { color: var(--taupe); font-size: 0.85rem; }

.ci-photo-x {
  position: absolute; top: -0.4rem; right: -0.4rem; width: 1.35rem; height: 1.35rem;
  border-radius: 50%; border: none; background: var(--espresso); color: var(--bone);
  font-size: 0.9rem; line-height: 1; cursor: pointer;
}
.ci-collections { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.35rem 0 0.6rem; }
.ci-col-check { font-size: 0.9rem; color: var(--espresso); }
.ci-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem; align-items: end;
}
.ci-buttons { margin-top: 1rem; grid-template-columns: auto auto; justify-content: space-between; }
.ci-active { display: block; margin-top: 0.7rem; font-weight: 700; color: var(--espresso); }
.btn.danger { color: #b3261e; }
#ci-variants { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }

/* Billing-hold badge on session cards / detail */
.hold-badge {
  display: inline-block; background: var(--amber-soft); color: var(--amber);
  border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.75rem; font-weight: 700;
}

/* ---------- Independent facilitator home ---------- */

.fac-toolbar { align-items: center; }
.fac-toolbar .pane-title { font-family: var(--serif); color: var(--espresso); }

.fac-card { padding: 1.1rem 1.25rem 1.25rem; margin-bottom: 1.25rem; overflow: visible; }
.fac-heading {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--espresso);
}
.fac-lede { color: var(--taupe); font-size: 0.9rem; margin: 0.2rem 0 0.9rem; }

.fac-participants { display: flex; flex-direction: column; }
.fac-participant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
.fac-participant:last-child { border-bottom: none; }
.fac-participant-name { color: var(--espresso); }
.fac-participant-status {
  background: var(--amber-soft);
  color: var(--amber);
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.fac-participant-status.onboarded { background: var(--sage-soft); color: var(--sage-deep); }

.fac-resource {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 0.6rem;
  background: var(--white);
}
.fac-resource summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--espresso);
  padding: 0.75rem 0.9rem;
  list-style-position: inside;
}
.fac-resource summary:hover { background: var(--cream); }
.fac-resource[open] summary { border-bottom: 1px solid var(--line); }
.fac-resource-body { padding: 0.85rem 1rem 1rem; font-size: 0.92rem; }
.fac-resource-body p { margin-bottom: 0.6rem; }
.fac-resource-body p:last-child { margin-bottom: 0; }
.fac-resource-body ul, .fac-resource-body ol { margin: 0.3rem 0 0.6rem 1.2rem; }
.fac-resource-body li { margin-bottom: 0.35rem; }
.fac-resource-body a { color: var(--blue-deep); }

/* Pricing chart inside the facilitator resources */
.fac-table-wrap { overflow-x: auto; margin: 0.4rem 0 0.7rem; }
.fac-price-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fac-price-table th, .fac-price-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  text-align: left;
  white-space: nowrap;
}
.fac-price-table th { background: var(--cream); color: var(--espresso); }
.fac-price-table tr:nth-child(even) td { background: var(--cream); }

/* FAQ — each question is its own dropdown */
.fac-faq-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--white);
}
.fac-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--espresso);
  padding: 0.6rem 0.75rem;
  list-style-position: inside;
}
.fac-faq-item summary:hover { background: var(--cream); }
.fac-faq-item[open] summary { border-bottom: 1px solid var(--line); }
.fac-faq-a { padding: 0.7rem 0.85rem 0.8rem; }
.fac-faq-a p { margin-bottom: 0.6rem; }
.fac-faq-a p:last-child { margin-bottom: 0; }
.fac-faq-a ul { margin: 0.3rem 0 0.6rem 1.2rem; }
.fac-faq-a li { margin-bottom: 0.35rem; }
.fac-faq-cta-row { font-weight: 700; margin-top: 0.9rem; }
#fac-faq-msg { margin: 0.2rem 0 0.5rem; }

/* Care-team shared progress on the roster */
.fac-participant { flex-wrap: wrap; }
.fac-participant-shared {
  background: var(--sage-soft);
  color: var(--sage-deep);
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.fac-progress { flex-basis: 100%; margin-top: 0.4rem; }
.fac-progress-session {
  border-left: 3px solid var(--sage-soft);
  padding: 0.35rem 0 0.35rem 0.7rem;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}
.fac-progress-session strong { display: block; color: var(--espresso); }

/* Care-team question on the client onboarding closer */
.ob-careteam-q { margin-top: 1.2rem; }

/* ======================= Onboarding v2 + chef application ======================= */

.ob-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
@media (max-width: 480px) { .ob-two-col { grid-template-columns: 1fr; } }
.onboarding-page textarea, .rf-page textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--white); margin-bottom: 0.9rem; font: inherit;
}
.ob-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.ob-chip {
  border: 1.5px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 0.45rem 0.95rem; font-weight: 700; font-size: 0.88rem; color: var(--espresso);
}
.ob-chip.selected { border-color: var(--amber); background: var(--amber-soft); }
.chefapp-shell input, .chefapp-shell select, .chefapp-shell textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--white); margin-bottom: 0.9rem; font: inherit;
}
.chefapp-shell .ob-question { margin-top: 1.6rem; }

/* Address autocomplete dropdown */
.addr-wrap { position: relative; }
.addr-suggest {
  position: absolute; top: calc(100% - 0.8rem); left: 0; right: 0; z-index: 30;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden;
}
.addr-suggest button {
  display: block; width: 100%; text-align: left; padding: 0.6rem 0.85rem;
  border: none; background: none; font-size: 0.9rem;
}
.addr-suggest button:hover, .addr-suggest button.active { background: var(--cream); }

/* ======================= Chef limited portal ======================= */

.chef-limited-banner {
  background: var(--amber-soft); border: 1px solid var(--amber); border-radius: 14px;
  padding: 1rem 1.2rem; margin-bottom: 1rem; display: flex; align-items: center;
  gap: 1rem; flex-wrap: wrap; justify-content: space-between;
}
.chef-limited-banner p { margin: 0; color: var(--espresso); font-weight: 600; }

/* ======================= Interval pre-fill ======================= */

.interval-panel { margin-bottom: 0.9rem; }
.interval-form {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.1rem; margin-top: 0.6rem;
}
.interval-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0 0.8rem; margin-bottom: 0.8rem;
}
.interval-grid select, .interval-grid input {
  width: 100%; padding: 0.55rem 0.7rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--white); font: inherit; margin-bottom: 0.7rem;
}
.interval-note { margin-top: 0.7rem; font-size: 0.88rem; color: var(--taupe); }

/* "Clear all dates" — empties the tentative cart; armed = tap-again confirm */
.clear-dates-btn { display: block; margin-top: 0.6rem; color: var(--rust); }
.clear-dates-btn.armed { background: var(--rust); color: var(--white); }

/* ======================= Tentative cart dates on the calendar ======================= */

.day .cart-mark {
  position: absolute; top: 3px; right: 3px; font-size: 0.62rem; font-weight: 800;
  background: var(--amber); color: var(--white); border-radius: 999px;
  padding: 0 0.35rem; line-height: 1.35; pointer-events: none;
}
.day.in-cart, .day.cart-conflict { position: relative; cursor: pointer; }
.day.in-cart { box-shadow: inset 0 0 0 2px var(--amber); border-radius: 10px; }
.day.cart-conflict { box-shadow: inset 0 0 0 2px var(--rust); border-radius: 10px; }
.day.cart-conflict .cart-mark { background: var(--rust); }

/* The tentative arrival time, pinned to the bottom of the cell */
.day .cart-time {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  font-size: 0.6rem; font-weight: 800; white-space: nowrap;
  background: var(--amber); color: var(--white); border-radius: 999px;
  padding: 0 0.4rem; line-height: 1.6; pointer-events: none; max-width: calc(100% - 6px);
  overflow: hidden; text-overflow: ellipsis;
}
.day .cart-time.bad { background: var(--rust); }

/* Tentative-date editor inside the booking modal */
.booking-edit-panel { margin-bottom: 0.6rem; }
.cart-edit-row {
  display: block; width: 100%; text-align: left; border: 1.5px solid var(--amber);
  background: #fbf3e2; border-radius: 10px; padding: 0.55rem 0.7rem;
  margin-bottom: 0.45rem; font: inherit;
}
button.cart-edit-row { cursor: pointer; }
.cart-edit-row.selected { border-color: var(--espresso); box-shadow: 0 0 0 1.5px var(--espresso); }
.cart-edit-row.conflict { border-color: var(--rust); background: #fdf3f0; }
.cart-edit-line { font-weight: 700; display: block; }
.cart-edit-participant { display: block; font-size: 0.85rem; font-weight: 600; color: var(--taupe); margin-top: 0.15rem; }
.cart-edit-participant-swap {
  display: flex; align-items: center; gap: 0.45rem;
  margin: 0.55rem 0 0.2rem; font-size: 0.88rem; color: var(--taupe);
}
.cart-edit-conflict { display: block; color: var(--rust); font-size: 0.85rem; font-weight: 700; margin-top: 0.2rem; }
.cart-edit-note { font-size: 0.88rem; color: var(--taupe); margin: 0.2rem 0 0; }

/* Red "remove this date" + the dashed ring marking the current tentative time */
.btn-remove-date { background: var(--rust); color: var(--white); margin-top: 0.6rem; }
.btn-remove-date:hover { filter: brightness(1.12); }
.slot.current { outline: 2px dashed var(--amber); outline-offset: 1px; }

/* Cart conflict rows on the review page */
.cart-row.conflict { border-color: var(--rust); background: #fdf3f0; }
.cart-conflict-reason {
  color: var(--rust); font-size: 0.88rem; font-weight: 700; margin-top: 0.4rem;
}
.cart-conflict-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ---------- Account Balance dashboard ---------- */
#balance-pane { max-width: 760px; margin: 0 auto; padding: 4px 4px 40px; }
.bal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.bal-title { font-size: 1.35rem; margin: 0; }
.bal-account-select { padding: 8px 10px; border-radius: 10px; border: 1px solid #d5d5e0; font: inherit; }
.bal-hero {
  background: linear-gradient(135deg, #283593, #3949ab);
  color: #fff; border-radius: 16px; padding: 20px 22px; margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(40, 53, 147, 0.25);
}
.bal-hero-label { font-size: 0.85rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; }
.bal-hero-amount { font-size: 2.4rem; font-weight: 800; margin: 2px 0 12px; }
.bal-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.bal-stat { display: flex; flex-direction: column; }
.bal-stat-label { font-size: 0.75rem; opacity: 0.8; }
.bal-stat-val { font-weight: 700; }
.bal-note { font-size: 0.8rem; opacity: 0.85; margin: 0; line-height: 1.4; }
.bal-section { margin: 22px 0 10px; font-size: 1.05rem; }
.bal-card {
  background: #fff; border: 1px solid #e3e3ee; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 2px 6px rgba(20, 20, 60, 0.05);
}
.bal-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bal-card-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: #555; font-size: 0.88rem; margin-top: 4px; }
.bal-paid { color: #1d7a34; font-weight: 700; }
.bal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bal-btn { font-size: 0.85rem; padding: 8px 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.bal-chip { font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.bal-chip-green { background: #e2f4e6; color: #1d7a34; }
.bal-chip-amber { background: #fdf1d7; color: #92600a; }
.bal-chip-blue  { background: #e3e8fb; color: #283593; }
.bal-chip-gray  { background: #ececf1; color: #666; }
.bal-credit { color: #1d7a34; font-size: 0.88rem; margin: 8px 0 0; }
/* E-sign: typed name renders as a script signature */
.sign-box { margin-top: 12px; padding: 12px; border: 1px dashed #b9c0e8; border-radius: 12px; background: #f8f9ff; }
.sign-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.sign-input { width: 100%; max-width: 340px; padding: 9px 12px; border: 1px solid #d5d5e0; border-radius: 10px; font: inherit; }
.sign-script {
  font-family: "Snell Roundhand", "Savoye LET", "Brush Script MT", "Segoe Script", cursive;
  font-size: 1.7rem; color: #1a237e; line-height: 1.2;
}
.sign-preview { min-height: 2.2rem; border-bottom: 2px solid #283593; max-width: 340px; margin: 10px 0; padding: 2px 6px; }
.bal-signed { margin-top: 10px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bal-signed-note { font-size: 0.8rem; color: #666; }

/* ---------- Owner jobs calendar ---------- */

.oj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.oj-controls { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.oj-month-label {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--espresso);
  min-width: 9.5rem;
  text-align: center;
}
.oj-nav-btn { padding: 0.3rem 0.7rem; font-size: 1.1rem; line-height: 1; }

/* Status-group colors. One dot/pill/tag vocabulary everywhere: summary
   chips, day cells, section headers, rows, and the detail modal. */
.oj-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; display: inline-block; flex: none; }
.g-urgent .oj-dot    { background: #b3261e; }
.g-action .oj-dot    { background: var(--amber); }
.g-hold .oj-dot      { background: #d4b34a; }
.g-live .oj-dot      { background: var(--blue-deep); }
.g-pending .oj-dot   { background: var(--taupe); }
.g-ready .oj-dot     { background: var(--sage); }
.g-done .oj-dot      { background: var(--past-text); }
.g-cancelled .oj-dot { background: #c9c0b4; }

.oj-pill, .oj-tag {
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.oj-pill { font-size: 0.7rem; padding: 0.05rem 0.42rem; }
.oj-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oj-pill.g-urgent,    .oj-tag.g-urgent    { background: #f6dcd8; color: #8c2318; }
.oj-pill.g-action,    .oj-tag.g-action    { background: var(--amber-soft); color: #7c5a1e; }
.oj-pill.g-hold,      .oj-tag.g-hold,
.oj-tag.oj-tag-hold                       { background: #faf3d3; color: #8a6d1f; }
.oj-pill.g-live,      .oj-tag.g-live      { background: var(--blue-soft); color: var(--blue-deep); }
.oj-pill.g-pending,   .oj-tag.g-pending   { background: var(--bone); color: var(--espresso); }
.oj-pill.g-ready,     .oj-tag.g-ready     { background: var(--sage-soft); color: var(--sage-deep); }
.oj-pill.g-done,      .oj-tag.g-done      { background: var(--past); color: var(--past-text); }
.oj-pill.g-cancelled, .oj-tag.g-cancelled { background: var(--past); color: var(--past-text); }
.oj-tag.g-cancelled { text-decoration: line-through; }

/* Needs-attention strip */
.oj-attention {
  background: #fdf6f4;
  border: 1px solid #e7c4bc;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.oj-attention-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; gap: 0.5rem; }
.oj-attention-title { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; color: var(--rust); }
.oj-attention-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.5rem;
}
.oj-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rust);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font-family: var(--sans);
}
.oj-card.g-urgent { border-left-color: #b3261e; }
.oj-card.g-action { border-left-color: var(--amber); }
.oj-card:hover { box-shadow: var(--shadow); }
.oj-card-when { font-size: 0.75rem; color: var(--taupe); font-weight: 700; }
.oj-card-client { font-size: 0.92rem; color: var(--ink); }
.oj-card-status { font-size: 0.8rem; color: #8c2318; }
.oj-card.g-action .oj-card-status { color: #7c5a1e; }

/* Summary chips — double as the legend */
.oj-summary { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.oj-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}
.oj-chip b { font-weight: 700; }

/* Month grid */
.oj-grid-wrap { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem; }
.oj-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.oj-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--taupe);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.oj-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.oj-cell {
  min-height: 5.5rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.45rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--sans);
  min-width: 0;
}
button.oj-cell { cursor: pointer; background: var(--white); }
button.oj-cell:hover { border-color: var(--espresso); box-shadow: var(--shadow); }
.oj-cell-blank { background: transparent; border: none; min-height: 0; }
.oj-cell-empty .oj-cell-num { color: var(--past-text); font-weight: 400; }
.oj-cell.today { outline: 2px solid var(--sage); outline-offset: -1px; }
.oj-cell-head { display: flex; justify-content: space-between; align-items: baseline; }
.oj-cell-num { font-weight: 700; font-size: 0.85rem; color: var(--espresso); }
.oj-cell-total { font-size: 0.72rem; color: var(--taupe); font-weight: 700; }
.oj-cell-pills { display: flex; flex-wrap: wrap; gap: 3px; }
.oj-note { grid-column: 1 / -1; color: var(--taupe); padding: 1rem; text-align: center; }

/* Expanded day panel */
.modal.oj-day { max-width: 46rem; display: flex; flex-direction: column; overflow: hidden; }
.oj-day-search { margin: 0.25rem 0 0.75rem; }
.oj-day-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 0.25rem;
}
.oj-sec-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  background: var(--cream);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 0.4rem;
}
.oj-sec-head:first-child { margin-top: 0; }
.oj-sec-label { font-weight: 700; }
.oj-sec-count { color: var(--taupe); font-weight: 700; }
.oj-sec-caret { margin-left: auto; color: var(--taupe); }
.oj-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font-family: var(--sans);
}
.oj-row:hover { border-color: var(--espresso); }
.oj-row-main { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.oj-row-time { font-size: 0.78rem; font-weight: 700; color: var(--taupe); flex: none; }
.oj-row-client { font-size: 0.9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oj-row-chef { font-size: 0.8rem; color: var(--taupe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oj-row-tags { display: flex; gap: 0.3rem; flex: none; flex-wrap: wrap; justify-content: flex-end; }

/* Job detail */
.oj-detail-body { display: flex; flex-direction: column; gap: 0.55rem; }
.oj-detail-row { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem; font-size: 0.9rem; }
.oj-detail-label {
  color: var(--taupe);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.1rem;
}
.oj-detail-value { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.oj-detail-value.oj-flag { color: var(--rust); font-weight: 600; }

@media (max-width: 640px) {
  .oj-cell { min-height: 4.2rem; padding: 0.25rem 0.3rem; }
  .oj-pill { font-size: 0.62rem; padding: 0 0.3rem; }
  .oj-detail-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .oj-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .oj-row-tags { justify-content: flex-start; }
}

/* ===================== Owner Clients desk ===================== */

.oc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.oc-controls { display: flex; gap: 0.5rem; align-items: center; }
.oc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.oc-card {
  text-align: left; background: #fff; border: 1px solid #e3e3ee; border-radius: 14px;
  padding: 14px 16px; cursor: pointer; font: inherit; box-shadow: 0 2px 6px rgba(20, 20, 60, 0.05);
}
.oc-card:hover { border-color: var(--espresso, #4b3621); }
.oc-card-meta { justify-content: flex-start; }
.oc-back { margin-bottom: 0.6rem; }
.oc-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.oc-stats { margin: 0.6rem 0 1rem; }
.oc-section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.oc-doc-notes { color: #555; font-size: 0.85rem; margin: 6px 0 0; white-space: pre-wrap; }

.oc-profile { background: #fff; border: 1px solid #e3e3ee; border-radius: 14px; padding: 14px 16px; }
.oc-profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 14px; }
.oc-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.oc-field-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #777; }
.oc-field input[type="text"], .oc-field input[type="number"], .oc-field textarea {
  border: 1px solid #d8d8e2; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.9rem; width: 100%;
}
.oc-field textarea { min-height: 3.4rem; resize: vertical; }
.oc-field-ro .oc-ro-value { font-size: 0.9rem; color: #444; background: #f6f6f9; border-radius: 8px; padding: 6px 8px; overflow-wrap: anywhere; }
.oc-add-field { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.oc-add-field input { flex: 1 1 200px; border: 1px solid #d8d8e2; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.9rem; }
.oc-save-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

.oc-lines { display: flex; flex-direction: column; gap: 6px; }
.oc-line { display: grid; grid-template-columns: 1fr 10rem 7rem 2.2rem; gap: 6px; align-items: center; }
.oc-line-po { grid-template-columns: 1fr 10rem 5rem 7rem 2.2rem; }
.oc-line input { border: 1px solid #d8d8e2; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.9rem; width: 100%; }
.oc-line-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #777; }
.oc-lines-actions { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; }
.oc-lines-total { font-weight: 700; }
.oc-doc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; }
.oc-opt { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; font-weight: 700; color: #777; text-transform: uppercase; letter-spacing: 0.04em; }
.oc-opt input, .oc-opt select, .oc-opt textarea {
  border: 1px solid #d8d8e2; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.9rem;
  font-weight: 400; text-transform: none; letter-spacing: normal; color: var(--ink, #222);
}
.oc-opt-wide { grid-column: 1 / -1; }
.oc-create-btn { margin-top: 12px; width: 100%; }

@media (max-width: 640px) {
  .oc-line { grid-template-columns: 1fr 1fr; }
  .oc-line-head { display: none; }
  .oc-doc-opts { grid-template-columns: 1fr; }
}

/* ---------- Send Docs (owner) — native hire-doc e-sign ---------- */

.sd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 10px; }
.sd-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sd-tabs { margin: 6px 0 14px; }
.sd-body { display: flex; flex-direction: column; gap: 10px; }
.sd-doc-card { border-left: 4px solid #b9c0e8; }
.sd-doc-inactive { opacity: 0.55; }
.sd-doc-meta { font-size: 0.8rem; color: #777; }
.sd-card-btns { margin-top: 8px; }
.sd-danger { color: #9c2f21; }

.sd-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.sd-chip-wait { background: #faf3d3; color: #8a6d1f; }
.sd-chip-action { background: #fde8d7; color: #a04d12; }
.sd-chip-done { background: var(--sage-soft, #e2ece0); color: var(--sage-deep, #42573b); }
.sd-chip-dead { background: #eee; color: #777; }
.sd-chip-neutral { background: #eef0fa; color: #3c4a9c; }

.sd-modal { max-height: 88vh; overflow-y: auto; }
.sd-modal-body { display: flex; flex-direction: column; gap: 12px; }
.sd-modal-foot { margin-top: 6px; justify-content: space-between; }

/* shared doc renderer */
.sd-doc-view { display: flex; flex-direction: column; gap: 10px; border: 1px solid #e3e3ec; border-radius: 12px; padding: 16px; background: #fffdfa; }
.sd-block-h { margin: 12px 0 2px; font-size: 1rem; color: #283593; border-bottom: 1px solid #e3e3ec; padding-bottom: 4px; }
.sd-block-p { margin: 0; font-size: 0.9rem; line-height: 1.55; color: #444; }
.sd-block-note {
  margin: 0; font-size: 0.85rem; line-height: 1.5; font-style: italic; color: #4a3d17;
  background: #faf6e7; border-left: 3px solid #d4b34a; padding: 8px 12px; border-radius: 6px;
}
.sd-field { display: flex; flex-direction: column; gap: 4px; }
.sd-field-locked .sd-field-ro { color: #888; font-size: 0.9rem; border-bottom: 1px dashed #ddd; padding: 4px 2px; }
.sd-field-error .sd-input, .sd-field-error input { border-color: #c0392b !important; background: #fdf3f1; }
.sd-field-err-msg { color: #9c2f21; font-size: 0.78rem; margin: 0; }
.sd-input {
  border: 1px solid #d5d5e0; border-radius: 10px; padding: 9px 12px; font: inherit; width: 100%;
  background: #fff;
}
.sd-textarea { resize: vertical; }
.sd-check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; line-height: 1.45; cursor: pointer; }
.sd-check input { margin-top: 3px; flex-shrink: 0; }
.sd-radios { display: flex; flex-direction: column; gap: 7px; }
.sd-sigline { border-top: 2px solid #283593; padding-top: 6px; margin: 14px 0 4px; }
.sd-sigline-label { font-size: 0.78rem; font-weight: 700; color: #283593; display: block; }
.sd-sigline-blank { color: #999; font-size: 0.85rem; font-style: italic; padding: 8px 0; }
.sd-countersign { margin-top: 12px; border-top: 1px dashed #cfd4ef; padding-top: 10px; }
.sd-events { font-size: 0.82rem; color: #666; }
.sd-events summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.sd-event { padding: 2px 0; border-bottom: 1px dotted #eee; }

/* editor */
.sd-editor-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sd-editor-meta .sd-input { flex: 1 1 160px; width: auto; }
.sd-editor-blocks { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px; background: #f7f7fb; border-radius: 12px; }
.sd-editor-block { background: #fff; border: 1px solid #e3e3ec; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.sd-editor-bar { display: flex; justify-content: space-between; align-items: center; }
.sd-editor-kind { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #3c4a9c; }
.sd-tool { border: 1px solid #d8d8e2; background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 0.85rem; }
.sd-tool:hover { background: #f0f1f8; }
.sd-editor-add { border-top: 1px solid #eee; padding-top: 10px; }

/* ---------- Signing page (?signdocs=TOKEN) ---------- */

.sign-page { min-height: 100vh; background: #e9e4e0; display: flex; flex-direction: column; }
.sg-head {
  background: #433625; color: #e9e4e0; padding: 14px clamp(16px, 4vw, 40px);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 5;
}
.sg-wordmark { font-family: Georgia, serif; font-size: 1.15rem; }
.sg-wordmark em { color: #cbbfae; }
.sg-progress { display: flex; align-items: center; gap: 10px; }
.sg-progress-text { font-size: 0.8rem; opacity: 0.9; }
.sg-bar { width: 130px; height: 7px; background: rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; }
.sg-bar-fill { height: 100%; background: #d4b34a; border-radius: 999px; transition: width 0.4s; }
.sg-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(14px, 3vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.sg-card { background: #fff; border-radius: 14px; border: 1px solid #ddd5cb; padding: clamp(16px, 4vw, 30px); }
.sg-center { text-align: center; }
.sg-eyebrow { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8a7c6c; margin: 0 0 4px; }
.sg-title { margin: 0 0 10px; font-size: 1.35rem; }
.sg-doclist { margin: 10px 0 18px; padding-left: 20px; line-height: 1.8; }
.sg-done-tag { color: var(--sage-deep, #42573b); font-weight: 700; font-size: 0.8rem; }
.sg-foot {
  position: sticky; bottom: 0; background: rgba(233,228,224,0.96); backdrop-filter: blur(4px);
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px calc(10px + env(safe-area-inset-bottom));
}
.sg-foot .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.sg-decline { color: #8a7c6c; font-size: 0.8rem; }
.sg-bigcheck { font-size: 3rem; margin-bottom: 6px; }
.sg-downloads { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* ---------- Signing: split view + live document preview ---------- */

.sg-body.sg-wide { max-width: 1340px; }
.sg-split {
  display: grid; grid-template-columns: minmax(330px, 10fr) minmax(360px, 11fr);
  gap: 18px; align-items: start;
}
.sg-preview-col { position: sticky; top: 86px; }
.sg-preview-cap {
  margin: 0 0 6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: #8a7c6c; text-align: center;
}

/* The paper itself */
.sg-paper {
  position: relative; background: #fff; border-radius: 4px;
  box-shadow: 0 4px 18px rgba(40, 30, 15, 0.22); overflow: hidden;
}
.sg-paper-img { display: block; width: 100%; user-select: none; -webkit-user-drag: none; }

/* Overlays on the real government form (percent boxes from formmaps.json).
   --s = px per PDF point, set by a ResizeObserver, so text scales with the page. */
.sg-ov {
  position: absolute; display: flex; align-items: center; overflow: hidden;
  white-space: nowrap; line-height: 1; border-radius: 2px; cursor: pointer;
  color: #16257e; font-family: Helvetica, Arial, sans-serif;
  font-size: calc(var(--s, 1) * 8.6px);
}
.sg-ov:hover { outline: 2px solid rgba(212, 179, 74, 0.75); background: rgba(212, 179, 74, 0.10); }
.sg-ov-focus, .sg-ov-focus:hover { outline: 2px solid #d4b34a; background: rgba(212, 179, 74, 0.18); }
.sg-ov-check, .sg-ov-radio { justify-content: center; font-weight: 800; }
.sg-ov-comb { padding: 0; }
.sg-ov-comb span { flex: 1; text-align: center; }
.sg-ov-sig { overflow: visible; }
.sg-ov-script, .sg-pd-sigscript {
  font-family: "Snell Roundhand", "Savoye LET", "Brush Script MT", "Segoe Script", cursive;
  color: #1a237e;
}
.sg-ov-script { font-size: calc(var(--s, 1) * 13px); }
.sg-ov-sigchip {
  border: 0; background: #d4b34a; color: #2d2410; font-weight: 800;
  font-size: calc(var(--s, 1) * 8px); padding: calc(var(--s, 1) * 3px) calc(var(--s, 1) * 8px);
  border-radius: 4px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.sg-ov-sigchip:hover { filter: brightness(1.06); }

/* Paper replica for policy documents (mirrors the generated PDF layout) */
.sg-paper-doc { padding: clamp(18px, 5%, 36px); font-family: Helvetica, Arial, sans-serif; color: #212121; }
.sg-pd-title { margin: 0 0 14px; color: #283593; font-size: 1.05rem; font-weight: 700; }
.sg-pd-h {
  margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #ccc;
  color: #283593; font-size: 0.82rem; font-weight: 700;
}
.sg-pd-p { margin: 0 0 8px; color: #555; font-size: 0.74rem; line-height: 1.5; }
.sg-pd-note { margin: 0 0 8px; padding: 8px 10px; background: #f6f3ec; font-style: italic; font-size: 0.74rem; line-height: 1.45; color: #333; }
.sg-pd-field { margin: 0 0 10px; }
.sg-pd-label { margin: 0 0 2px; font-size: 0.72rem; font-weight: 700; color: #212121; }
.sg-pd-val {
  min-height: 1.25em; max-width: 430px; padding: 0 3px 2px;
  border-bottom: 1px solid #b9b9b9; color: #16257e; font-size: 0.8rem;
}
.sg-pd-check { margin: 0 0 6px; font-size: 0.76rem; line-height: 1.45; }
.sg-pd-live { cursor: pointer; border-radius: 4px; }
.sg-pd-live:hover { background: rgba(212, 179, 74, 0.12); }
.sg-pd-live.sg-ov-focus { background: rgba(212, 179, 74, 0.18); outline: 2px solid #d4b34a; }
.sg-pd-sig { margin: 18px 0 6px; }
.sg-pd-sigscript { font-size: 1.5rem; line-height: 1.2; border-bottom: 1.5px solid #444; max-width: 340px; padding: 0 6px 2px; }
.sg-pd-sigblank {
  max-width: 340px; height: 2rem; border-bottom: 1.5px solid #444;
  color: #9a8b76; font-size: 0.74rem; display: flex; align-items: flex-end; padding: 0 6px 4px;
}
.sg-pd-sigme { cursor: pointer; color: #a4841f; font-weight: 700; }
.sg-pd-sigme:hover { background: rgba(212, 179, 74, 0.12); }
.sg-pd-siglabel { margin-top: 3px; font-size: 0.68rem; color: #777; }

/* Consistency flags — amber "double-check this" review aids (never errors) */
.sg-flagbox {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 10px;
  background: #fdf6e3; border: 1px solid #e4cf8e;
}
.sg-flagbox[hidden] { display: none; }
.sg-flagbox-title { margin: 0 0 6px; font-weight: 800; font-size: 0.85rem; color: #7a5d0f; }
.sg-flagbox-item { margin: 0 0 5px; font-size: 0.78rem; line-height: 1.45; color: #5d4a12; }
.sg-flagbox-link { cursor: pointer; }
.sg-flagbox-link:hover { text-decoration: underline; }
.sg-flagbox-note { margin: 8px 0 0; font-size: 0.7rem; color: #8a7c4c; font-style: italic; }
.sg-flagbox-modal { margin-top: 10px; }
.sg-flagack { margin-top: 10px; font-weight: 600; align-items: flex-start; }
.sd-field-warn > .sd-input, .sd-field-warn select.sd-input { border-color: #d9b23e; background: #fffdf4; }
.sg-signame-hint { margin: 2px 0 8px; font-size: 0.78rem; font-weight: 600; color: #a3540f; }
.sd-field-warn-msg { margin: 4px 0 0; font-size: 0.74rem; color: #8a690f; }
.sg-ov-warn, .sg-ov-warn:hover { outline: 2px solid #d9a13e; background: rgba(217, 161, 62, 0.16); }
.sd-ownerflags {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: #fdf6e3; border: 1px solid #e4cf8e;
}
.sd-ownerflags-title { margin: 0 0 6px; font-weight: 800; font-size: 0.82rem; color: #7a5d0f; }
.sd-ownerflag { margin: 0 0 4px; font-size: 0.76rem; line-height: 1.45; color: #5d4a12; }

/* Mobile: DocuSign-style Fill / Document toggle */
.sg-tabs { display: none; }
@media (max-width: 979px) {
  .sg-split { display: block; }
  .sg-preview-col { display: none; position: static; }
  .sg-split.sg-doc-mode .sg-preview-col { display: block; }
  .sg-split.sg-doc-mode .sg-fill-col { display: none; }
  .sg-tabs {
    display: flex; position: sticky; top: 66px; z-index: 4;
    width: fit-content; margin: 0 auto; padding: 4px; gap: 2px;
    background: #fff; border: 1px solid #ddd5cb; border-radius: 999px;
    box-shadow: 0 2px 10px rgba(40, 30, 15, 0.12);
  }
  .sg-tab {
    border: 0; background: transparent; padding: 8px 20px; border-radius: 999px;
    font-weight: 700; font-size: 0.86rem; color: #6b5d4c; cursor: pointer;
  }
  .sg-tab-active { background: #433625; color: #f2ede7; }
}

@media (max-width: 640px) {
  .sd-head { flex-direction: column; align-items: stretch; }
  .sd-editor-meta { flex-direction: column; align-items: stretch; }
  .sg-progress { width: 100%; justify-content: space-between; }
}
