/* Activity — a single list with two rows of filter chips.
   Nothing here is position:fixed: the topbar is the only fixed chrome, and
   .staff-main already clears it. (The old fixed tab strips overlapped each
   other and the first list rows.) */

.activity-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted, #6f6b63);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e2d9);
  border-radius: 999px;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  color: #ffffff;
  background: var(--primary, #175D31);
  border-color: var(--primary, #175D31);
  font-weight: 600;
}
.chip:focus-visible { outline: 2px solid var(--primary, #175D31); outline-offset: 2px; }

/* Active-orders count inside the Active chip. */
.orders-tab-count {
  display: inline-block;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  pointer-events: none;
}
.orders-tab-count.hidden { display: none !important; }

.activity-list { padding-bottom: 2rem; }
.activity-empty { text-align: center; padding: 1.5rem 0; }
.activity-more { width: 100%; margin-top: 0.5rem; }

/* Stage headings inside the Active list stay visible while scrolling. */
.orders-section-h {
  position: sticky;
  top: calc(var(--topbar-h) + var(--safe-top));
  background: var(--bg, #f4f3ee);
  padding: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1;
}

/* Catalog section switcher uses the same chips as Activity. */
a.chip { text-decoration: none; }

/* Activity header: title left, Bookings menu button right */
.activity-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0 0 0.25rem; }
.activity-head h1 { margin: 0; }
.activity-head .bookings-bar { margin: 0; display: flex; align-items: center; gap: 0.35rem; }
.activity-clear { display: inline-flex; align-items: center; text-decoration: none; padding: 0 0.6rem; font-size: 1.1rem; line-height: 1; }
.activity-clear.hidden { display: none; }
.bookings-bar .bookings-menu { right: 0; }
.bookings-row { display: block; width: 100%; box-sizing: border-box; text-align: left; background: none; border: 0; font: inherit; cursor: pointer; }
.bookings-row.is-on { font-weight: 600; color: var(--primary, #175D31); }

/* Staff catalog: small Bookings button + menu, and booking-page nav */
.bookings-bar { position: relative; display: flex; justify-content: flex-end; margin: 0 0 1rem; }
.bookings-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 12rem; padding: 6px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e2d9); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.bookings-menu[hidden] { display: none; }
.bookings-row { display: block; padding: 0.55rem 0.7rem; border-radius: 8px; color: var(--text, #1b1a17); text-decoration: none; }
.bookings-row:hover, .bookings-row:focus-visible { background: var(--bg, #f4f3ee); outline: none; }
.bookings-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 1rem; }

/* Home: KPI card + recent activity */
.kpi-card { border: 1px solid var(--border, #e5e2d9); border-radius: 18px; padding: 0.9rem 1rem 1rem; margin: 0 0 1.25rem; background: var(--surface, #faf9f5); color: var(--text, #1c1b19); }
.kpi-tabs { display: flex; gap: 1.1rem; border-bottom: 1px solid var(--border, #e5e2d9); }
.kpi-tabs button { border: 0; background: none; color: var(--muted, #6f6b63); font: inherit; font-size: 0.85rem; padding: 0.2rem 0 0.5rem; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; }
.kpi-tabs button[aria-pressed="true"] { color: var(--text, #1c1b19); font-weight: 600; border-bottom-color: var(--text, #1c1b19); }
.kpi-tabs button:focus-visible { outline: 2px solid var(--primary-text, #175d31); outline-offset: 2px; border-radius: 4px; }
.kpi-hero { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.85rem 0 0.1rem; }
.kpi-count { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: 0.95rem; color: var(--muted, #6f6b63); }
.kpi-delta { min-height: 1.25rem; font-size: 0.85rem; font-weight: 600; color: var(--muted, #6f6b63); }
.kpi-delta.up { color: #16a34a; }
.kpi-delta.down { color: #dc2626; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.5rem; margin: 0.7rem 0 0.6rem; }
.kpi-tile { border: 1px solid var(--border, #e5e2d9); border-radius: 12px; padding: 0.55rem 0.75rem; min-width: 0; }
.kpi-tile.hidden { display: none; }
.kpi-tile small { display: block; font-size: 0.75rem; color: var(--muted, #6f6b63); margin-bottom: 0.15rem; }
.kpi-val { font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-more { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--primary-text, #175d31); text-decoration: none; }
.kpi-more:hover, .kpi-more:focus-visible { text-decoration: underline; }
.home-h { font-size: 1rem; margin: 0 0 0.6rem; }
.recent-card .recent-list { margin: 0; }
.recent-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border, #e5e2d9);
  color: inherit;
  text-decoration: none;
}
.recent-row:first-child { border-top: 0; padding-top: 0.15rem; }
.recent-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}
.recent-type {
  font-weight: 600;
  flex: none;
}
.recent-detail {
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.recent-meta {
  font-size: 0.8rem;
  color: var(--muted, #6f6b63);
  text-transform: capitalize;
}
.home-hello {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

/* Build 73: Home header, Quick Actions, Share page */
.home-head { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0 0 1.25rem; }
.qa-tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1rem; border: 1px solid var(--border, #e5e2d9); border-radius: 14px; color: inherit; text-decoration: none; }
button.qa-tile { font: inherit; text-align: left; background: none; cursor: pointer; width: 100%; box-sizing: border-box; }
.qa-tile span { font-size: 0.8rem; color: var(--muted, #6f6b63); }
.qa-tile { position: relative; }
.qa-tile .qa-badge { position: absolute; top: 0.6rem; right: 0.7rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 999px; background: var(--danger, #b91c1c); color: #fff; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.qa-tile .qa-badge.hidden { display: none; }
.qa-tile:hover, .qa-tile:focus-visible { border-color: #11261a; outline: none; }
.share-back { display: inline-block; margin: 0 0 0.75rem; color: var(--muted, #6f6b63); text-decoration: none; font-size: 0.9rem; }
.share-hero { background: #11261a; color: #fff; border-radius: 18px; padding: 1.25rem; margin: 0 0 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.share-eyebrow { font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.share-hero h1 { margin: 0.3rem 0 0.4rem; font-size: 1.5rem; color: #fff; }
.share-hero p { margin: 0 0 0.9rem; opacity: .8; font-size: 0.9rem; }
.share-url { background: rgba(255,255,255,.12); border-radius: 10px; padding: 0.6rem 0.75rem; margin: 0 0 0.8rem; }
.share-url code { color: #fff; background: none; word-break: break-all; font-size: 0.85rem; }
.share-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-light { background: #fff; color: #11261a; border: 0; font-weight: 600; }
.share-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.share-card { margin: 0 0 1rem; }
.share-card h3 { margin: 0 0 0.6rem; }
.share-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }
.share-chips button { border: 1px solid var(--border, #e5e2d9); background: transparent; color: inherit; font: inherit; font-size: 0.85rem; padding: 0.3rem 0.8rem; border-radius: 999px; cursor: pointer; }
.share-chips button[aria-pressed="true"] { background: #11261a; color: #fff; border-color: #11261a; }
#share-msg { width: 100%; box-sizing: border-box; font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--border, #e5e2d9); border-radius: 10px; resize: vertical; margin: 0.25rem 0 0.75rem; background: transparent; color: inherit; }
.share-channels { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share-ch { border: 1px solid var(--border, #e5e2d9); background: transparent; color: inherit; font: inherit; font-size: 0.85rem; padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer; text-decoration: none; }
.share-ch:hover, .share-ch:focus-visible { border-color: #11261a; outline: none; }
.share-ch[hidden] { display: none; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--border, #e5e2d9); }
.share-row:first-of-type { border-top: 0; padding-top: 0; }
.share-row-main { flex: 1; min-width: 12rem; }
.share-row-main strong { display: block; }
.share-row-main code { font-size: 0.8rem; word-break: break-all; }
.share-qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.share-qr { text-align: center; border: 1px solid var(--border, #e5e2d9); border-radius: 14px; padding: 0.8rem; }
.share-qr img { width: 100%; max-width: 140px; aspect-ratio: 1; background: #fff; border-radius: 8px; display: block; margin: 0 auto 0.5rem; }
.share-qr img[hidden] { display: none; }



/* —— Catalog editor: flat, no nested cards —— */
.cat-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.6rem 0.9rem; padding: 0.7rem 0.9rem; margin: 0 0 1rem;
  border: 1px solid var(--border); border-radius: 12px;
}
.cat-bar-text { flex: 1 1 15rem; font-size: 0.9rem; line-height: 1.4; }
.cat-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-left: auto; }
.cat-bar-actions .bookings-bar { margin: 0; }
.tabs-menu { min-width: 15rem; max-width: calc(100vw - 2rem); left: auto; right: 0; }   /* opens to the left of the button */
.tabs-menu.flip { left: auto; right: 0; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }
.menu-form { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.4rem 0.5rem 0.5rem; }
.menu-form.hidden { display: none; }
.menu-form .field { flex: 1; min-width: 8rem; }

.cat-tab-head { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.25rem 0 0.4rem; }
.cat-tab-head h2 { margin: 0; font-size: 1.2rem; }
.cat { border-top: 1px solid var(--border); padding: 0.8rem 0 0.4rem; margin-top: 0.9rem; }
.cat:first-of-type { margin-top: 0; }
.cat-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.6rem;
  padding: 0.5rem 0.6rem; border-left: 4px solid var(--primary); border-radius: 0 10px 10px 0;
  background: var(--chip-bg, rgba(0,0,0,.05));
  background: color-mix(in srgb, var(--primary) 9%, transparent);
}
.cat-head h3 { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.cat-count { font-size: 0.85rem; }
.cat-actions { margin-left: auto; display: flex; gap: 0.4rem; }
.cat-hint { font-size: 0.8rem; margin: 0.25rem 0 0; }
.cat-empty { margin: 0.5rem 0; font-size: 0.9rem; }
.cat-add { border-top: 1px solid var(--border); padding: 0.8rem 0 0.2rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.5rem 0; }
.inline-form.hidden { display: none; }
.inline-form .field { flex: 1; min-width: 8rem; width: auto; }
.inline-form .item-add-price { flex: 0 1 7rem; min-width: 5rem; }

.items { list-style: none; margin: 0.4rem 0 0.2rem; padding: 0; }
.item { border-top: 1px solid var(--border); }
.item:first-child { border-top: 0; }
.item-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto 1rem; align-items: center; gap: 0.6rem;
  width: 100%; padding: 0.6rem 0.15rem; background: none; border: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.item-row:focus-visible { outline: 2px solid var(--primary, #175D31); outline-offset: 2px; border-radius: 6px; }
.item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-price { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.item-chev { color: var(--muted); transition: transform .15s; }
.item-row.is-open .item-chev { transform: rotate(180deg); }

.item-edit { padding: 0.1rem 0.15rem 0.9rem; }
.item-form .form-group { margin-bottom: 0.65rem; }
.item-form .form-group > label { font-size: 0.82rem; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0 0.6rem; }
.item-adv { border-top: 1px dashed var(--border); padding: 0.5rem 0; }
.item-adv > summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.item-adv[open] > summary { margin-bottom: 0.4rem; }
.item-adv .form-group { margin-bottom: 0; }
.item-thumb { width: 100%; max-width: 20rem; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.item-btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.item-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; border-top: 1px dashed var(--border); padding-top: 0.7rem; }
.item-foot .item-btn-row { margin-top: 0; }
.item-status { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }
.item-status label { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: normal; font-size: 0.9rem; margin: 0; }


/* Activity: search by order / booking code */
.activity-search { margin: 0.5rem 0 0.25rem; }
.activity-search input { width: 100%; box-sizing: border-box; font-size: 1rem; }

/* Reservation options editor */
.res-option > summary { cursor: pointer; padding: 0.15rem 0; }
.res-body label { display: block; margin: 0.6rem 0 0.2rem; font-size: 0.85rem; font-weight: 600; }
.res-body input, .res-body select, .res-body textarea { width: 100%; box-sizing: border-box; }
.res-grid { display: flex; gap: 0.5rem; margin: 0.35rem 0; align-items: center; }
.res-grid > * { flex: 1; min-width: 0; }
.res-grid > button { flex: 0 0 auto; width: auto; }
.res-area { border: 1px solid var(--border, #e5e2d9); border-radius: 10px; padding: 0.6rem; margin: 0 0 0.6rem; }
.res-area > input { margin: 0.35rem 0; }
.res-h { margin: 1.1rem 0 0.2rem; font-size: 0.95rem; }
.res-hint { font-size: 0.82rem; margin: 0 0 0.5rem; }
.res-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.res-chip { margin: 0 !important; font-weight: 500 !important; }
.res-chip input { position: absolute; opacity: 0; width: 1px !important; height: 1px; }
.res-chip span { display: inline-block; padding: 0.3rem 0.7rem; border: 1px solid var(--border, #d9d6cb); border-radius: 999px; font-size: 0.85rem; cursor: pointer; }
.res-chip input:checked + span { background: var(--chip-bg, #e8f3ec); border-color: var(--primary, #175D31); color: var(--primary-text, #175D31); font-weight: 600; }
.res-chip input:focus-visible + span { outline: 2px solid var(--primary, #175D31); outline-offset: 2px; }
.res-body .res-check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; margin-top: 0.9rem; }
.res-body .res-check input { width: auto; margin-top: 0.2rem; }

/* Reservation options: catalog-style rows (name · price · type), labelled fields, grouped sections */
.res-body .item-form .form-group > label,
.res-f > label { display: block; margin: 0 0 0.2rem; font-size: 0.82rem; font-weight: 600; }
.res-f { flex: 1; min-width: 0; }
.res-area { background: var(--soft-bg, #faf9f5); }
.res-addon { align-items: center; }
.item-adv .res-hint { margin: 0 0 0.5rem; }
.item-adv > .btn { margin-top: 0.4rem; }
.item-foot .res-check { margin: 0; font-size: 0.9rem; }
.item-row .badge { white-space: nowrap; }
.res-flat { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.res-flat .cat-add { border-top: 1px solid var(--border); margin-top: 0.4rem; }

/* Catalog: Sections button on its own row, far right, under the publish bar */
.cat-sections { display: flex; justify-content: flex-end; margin: -0.35rem 0 0.9rem; }
.cat-sections .bookings-bar { margin: 0; }
.item-note { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Headers and long text never push the page sideways */
.activity-head { flex-wrap: wrap; }
.activity-head h1 { min-width: 0; font-size: clamp(1.5rem, 7.5vw, 2rem); overflow-wrap: anywhere; }
.activity-head .bookings-bar { flex: 0 0 auto; }
.res-flat, .res-flat .items, .res-flat .item { min-width: 0; max-width: 100%; }
.res-flat .item-edit { overflow-wrap: anywhere; }
.res-flat .item-edit input, .res-flat .item-edit select, .res-flat .item-edit textarea { max-width: 100%; box-sizing: border-box; }
.item-row-sub { grid-template-columns: minmax(0, 1fr) auto 1rem; }
.item-main { display: flex; flex-direction: column; min-width: 0; }
.item-sub { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub:empty { display: none; }

/* Reservation option photo (details pop-up only) */
.res-photo-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.res-photo-img { width: 144px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--border, #e5e2d9); background: var(--soft-bg, #faf9f5); }
.res-photo-img.hidden { display: none; }
.res-photo-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.res-photo .hidden { display: none; }
.res-photo-actions .btn[disabled] { opacity: 0.6; }

/* Appointments / Reservations (staff): tinted cards, same green wash as Catalog category headers */
.bk-card, .res-flat .item {
  background: var(--chip-bg, rgba(0,0,0,.05));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
}
.bk-card { border-left: 4px solid var(--primary); }
.res-flat .item { border-radius: 12px; padding: 0 0.6rem; margin: 0 0 0.5rem; list-style: none; }
.res-flat .items { padding: 0; list-style: none; }

/* Category "+" menu and form close buttons */
.cat-actions { position: relative; align-items: center; }
.cat-plus { min-width: 2.2rem; padding: 0 0.55rem; font-size: 1.2rem; font-weight: 700; line-height: 1; }
.cat-menu { right: 0; left: auto; min-width: 14rem; max-width: calc(100vw - 2rem); }
.cat-menu .bookings-row { white-space: nowrap; }
.form-x {
  flex: 0 0 auto; width: 2.1rem; height: 2.1rem; display: inline-grid; place-items: center; border: 0; border-radius: 8px;
  background: none; color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.form-x:hover, .form-x:focus-visible { background: var(--bg, #f4f3ee); color: var(--text); outline: none; }

/* Me: wallet ledger */
.me-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.me-kpi { border: 1px solid var(--border, #e5e2d9); border-radius: 14px; padding: 0.75rem 0.85rem; background: var(--soft-bg, #f6f5f0); min-width: 0; }
.me-kpi small { display: block; font-size: 0.75rem; color: var(--muted, #6f6b63); margin-bottom: 0.2rem; }
.me-kpi-amt { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.me-kpi-date { font-size: 1rem; font-weight: 600; }
.me-kpi-sub { font-size: 0.8rem; margin-top: 0.15rem; }
.me-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border, #e5e2d9); }
.me-row:last-child { border-bottom: 0; }
.me-row-main { min-width: 0; }
.me-row-sub { font-size: 0.8rem; overflow-wrap: anywhere; }
.me-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.me-pos { color: #16a34a; }
.me-neg { color: #dc2626; }
