/* Salon Pilot — staff workspace: shell, navigation, calendar, lists, sign-in and the printable day sheet. */

/* ---------- Shell ---------- */
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  padding: 29px 20px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar .brand {
  margin-bottom: 40px;
}
.nav-label {
  margin-bottom: 12px;
  padding: 0 13px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 650;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-md);
  font-weight: 550;
  text-align: left;
}
.nav button svg {
  width: 18px;
  height: 18px;
}
.nav button.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.salon-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: var(--text-sm);
}
.salon-switch strong {
  display: block;
  font-size: var(--text-md);
}
.shell {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar-label {
  flex: none;
  font-size: var(--text-md);
  font-weight: 650;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 17px;
}
.topbar a {
  white-space: nowrap;
  color: var(--brand);
  font-size: var(--text-md);
  font-weight: 600;
  text-decoration: none;
}
.topbar .avatar {
  width: 32px;
  height: 32px;
}
.workspace-content {
  max-width: 1700px;
  margin: auto;
  padding: 30px 38px 45px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.page-heading h1 {
  font-size: clamp(28px, 2.6vw, 36px);
}
.page-heading p {
  margin-top: 6px;
  font-size: var(--text-base);
}
.heading-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 22px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat p {
  margin-bottom: 3px;
  font-size: var(--text-sm);
}
.stat strong {
  font: 700 28px/1.1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-icon {
  display: none;
}

/* ---------- Calendar ---------- */
.calendar-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}
.calendar-date {
  margin: 0 9px;
  font-size: var(--text-base);
  font-weight: 650;
}
.calendar-date input {
  width: 150px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--text-base);
}
.segmented {
  display: flex;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
}
.segmented button {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--muted);
  font-size: var(--text-md);
}
.segmented button.active,
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    var(--shadow-1);
}
.calendar-filters {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}
.filter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.filter.active,
.filter[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-brand);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cal-0);
}
.dot.color-1 {
  background: var(--cal-1);
}
.dot.color-2 {
  background: var(--cal-2);
}
.dot.color-3 {
  background: var(--cal-3);
}
.calendar-empty {
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--text-md);
}
.calendar-scroll {
  max-height: 670px;
  overflow: auto;
  scroll-padding-top: 64px;
}
.calendar-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Day view: one column per staff member, one --hour-h row per hour. */
.day-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 64px repeat(var(--cols), minmax(170px, 1fr));
  min-width: calc(64px + var(--cols) * 170px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.day-header > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 8px;
  border-left: 1px solid var(--line);
  font-size: var(--text-md);
  font-weight: 600;
}
.day-header > div:first-child {
  border: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
}
.day-header .avatar {
  width: 28px;
  height: 28px;
  font-size: 9px;
}
.day-grid {
  position: relative;
  display: grid;
  grid-template-columns: 64px repeat(var(--cols), minmax(170px, 1fr));
  min-width: calc(64px + var(--cols) * 170px);
  height: calc(var(--hours) * var(--hour-h));
}
.time-rail {
  position: relative;
  border-right: 1px solid var(--line);
}
.time-label {
  position: absolute;
  width: 100%;
  padding-right: 12px;
  color: var(--muted);
  font: 600 var(--text-xs) / 1 var(--sans);
  text-align: right;
  transform: translateY(4px);
}
.staff-column {
  position: relative;
  border-right: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--hour-h) / 2 - 1px),
    var(--grid-half) calc(var(--hour-h) / 2 - 1px),
    var(--grid-half) calc(var(--hour-h) / 2),
    transparent calc(var(--hour-h) / 2),
    transparent calc(var(--hour-h) - 1px),
    var(--grid-hour) calc(var(--hour-h) - 1px),
    var(--grid-hour) var(--hour-h)
  );
}
.staff-column:last-child {
  border: 0;
}
.off-hours {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: repeating-linear-gradient(
    135deg,
    var(--hatch-a),
    var(--hatch-a) 6px,
    var(--hatch-b) 6px,
    var(--hatch-b) 7px
  );
  color: var(--muted);
  font-size: var(--text-xs);
}
.appointment-block,
.blocked-slot {
  left: calc(6px + (100% - 12px) * var(--lane, 0) / var(--lanes, 1));
  width: calc((100% - 12px) / var(--lanes, 1) - 2px);
}
.appointment-block {
  position: absolute;
  z-index: 2;
  min-height: 43px;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-left: 4px solid var(--cal-0);
  border-radius: var(--r-sm);
  background: var(--cal-0-bg);
  text-align: left;
  box-shadow: var(--shadow-1);
  transition: filter 0.15s;
}
.appointment-block strong {
  display: block;
  font-size: var(--text-md);
  line-height: 1.3;
}
.appointment-block small {
  display: block;
  margin-top: 3px;
  color: var(--ink-2);
  font-size: var(--text-xs);
}
.appointment-block .appt-time {
  margin-bottom: 5px;
  color: var(--ink);
  font: 700 var(--text-xs) / 1.2 var(--display);
  font-variant-numeric: tabular-nums;
}
.appointment-block .appt-price {
  position: absolute;
  bottom: 8px;
  right: 9px;
  font-size: var(--text-xs);
  opacity: 0.85;
}
.blocked-slot {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  padding: 6px 8px;
  text-align: left;
  overflow: hidden;
  border: 1px dashed var(--line-hover);
  border-radius: var(--r-xs);
  background: repeating-linear-gradient(
    135deg,
    var(--hatch-a),
    var(--hatch-a) 5px,
    var(--hatch-b) 5px,
    var(--hatch-b) 6px
  );
  color: var(--muted);
  font-size: var(--text-xs);
}
.now-line {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brass);
  pointer-events: none;
}
.now-line::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brass);
}

/* Staff colour classes (.color-0..3) shared by day blocks and week cards */
.appointment-block.color-0,
.week-card.color-0 {
  border-left-color: var(--cal-0);
  background: var(--cal-0-bg);
}
.appointment-block.color-1,
.week-card.color-1 {
  border-left-color: var(--cal-1);
  background: var(--cal-1-bg);
}
.appointment-block.color-2,
.week-card.color-2 {
  border-left-color: var(--cal-2);
  background: var(--cal-2-bg);
}
.appointment-block.color-3,
.week-card.color-3 {
  border-left-color: var(--cal-3);
  background: var(--cal-3-bg);
}
.appointment-block.pending,
.week-card.pending {
  border-left-color: var(--brass);
  border-left-style: dashed;
  background: repeating-linear-gradient(
    135deg,
    var(--brass-faint),
    var(--brass-faint) 7px,
    var(--cal-1-bg) 7px,
    var(--cal-1-bg) 14px
  );
}
.appointment-block.checked_in,
.week-card.checked_in {
  box-shadow: inset 0 0 0 2px var(--brand);
}

/* Phone agenda (day view under 700px) */
.agenda {
  display: grid;
}
.agenda-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  box-shadow: inset 4px 0 0 var(--brand);
}
.agenda-item.pending {
  box-shadow: inset 4px 0 0 var(--brass);
}
.agenda-item.checked_in {
  background: var(--brand-soft);
  box-shadow: inset 6px 0 0 var(--brand-deep);
}
.agenda-item.blocked {
  background: var(--surface-2);
  box-shadow: inset 4px 0 0 var(--line-hover);
}
.agenda-time {
  font: 700 var(--text-base) / 1.2 var(--display);
  font-variant-numeric: tabular-nums;
}
.agenda-time small {
  display: block;
  color: var(--muted);
  font: 500 var(--text-xs) / 1.3 var(--sans);
}
.agenda-body strong {
  display: block;
  font-size: var(--text-base);
}
.agenda-body small {
  display: block;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.service-tile {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.service-top {
  align-items: flex-start;
  margin-bottom: 6px;
}
.service-top h3 {
  margin: 0;
}
.service-tile p {
  min-height: 36px;
  font-size: var(--text-md);
}
.service-tile .tile-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.service-tile strong {
  font: 700 24px/1 var(--display);
}
.service-tile small {
  color: var(--muted);
  font-size: var(--text-sm);
}
.service-tile .tile-bottom small {
  text-align: right;
}
.staff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}
.staff-tags span {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: var(--text-xs);
}

/* ---------- Clients & team ---------- */
.two-panel {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
}
.list-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.list-panel .search {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 17px 20px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item.active {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.list-item strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
}
.list-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}
.profile-head .avatar {
  width: 54px;
  height: 54px;
  font-size: 17px;
}
.profile-head h2 {
  font-size: var(--text-3xl);
}
.profile-head p {
  margin-top: 5px;
  font-size: var(--text-md);
}
.schedule-days {
  display: grid;
  margin-top: 15px;
}
.schedule-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-md);
}
.schedule-day:last-child {
  border: 0;
}
.schedule-day > strong {
  min-width: 85px;
  font-size: var(--text-md);
}
.schedule-day > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.schedule-day .muted {
  padding: 3px 0;
}
.schedule-interval {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
  padding: 3px 4px 3px 12px;
  border-radius: var(--r-pill);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.schedule-interval button {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--danger);
  font-size: var(--text-lg);
  line-height: 1;
}

/* ---------- Notifications & settings ---------- */
.list-cards {
  display: grid;
  gap: 12px;
}
.notification-card {
  display: grid;
  grid-template-columns: 37px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.notification-card h3 {
  margin-bottom: 5px;
  font-size: var(--text-base);
}
.notification-card p {
  font-size: var(--text-md);
}
.notification-card small {
  color: var(--muted);
  font-size: var(--text-sm);
}
.owner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* ---------- Sign-in ---------- */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 55px 65px;
  background: var(--ink);
  color: var(--on-ink);
}
.auth-story .brand {
  align-self: flex-start;
  color: var(--on-brand);
}
.auth-story .brand-light {
  color: var(--on-ink-accent);
}
.auth-story h1 {
  max-width: 520px;
  color: var(--on-brand);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.02;
}
.auth-story p {
  max-width: 340px;
  margin-top: 25px;
  color: var(--on-ink-muted);
  font-size: var(--text-lg);
}
.auth-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--on-ink);
  font-size: var(--text-base);
}
.auth-points li {
  position: relative;
  padding-left: 26px;
}
.auth-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--brass);
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.auth-form {
  width: 100%;
  max-width: 390px;
}
.auth-form h2 {
  margin: 16px 0 10px;
  font-size: 32px;
}
.auth-form > p {
  margin-bottom: 30px;
  font-size: var(--text-base);
}
.auth-form form {
  display: grid;
  gap: 18px;
}
.auth-form .button {
  width: 100%;
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
}
.auth-switch button {
  font-size: var(--text-md);
}
.auth-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
}

/* ---------- Topbar search (combobox) ---------- */
.global-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 420px;
  margin-right: auto;
}
.global-search > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.global-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 36px 8px 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--text-md);
}
.global-search input:focus {
  background: var(--surface);
  border-color: var(--line-strong);
}
.global-search kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  min-width: 20px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--muted);
  font: 600 var(--text-xs) / 1.4 var(--sans);
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
}
.global-search input:focus ~ kbd {
  display: none;
}
.combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}
.combo-list[hidden] {
  display: none;
}
.search-list {
  min-width: min(440px, calc(100vw - 28px));
}
.combo-group {
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 650;
}
.combo-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
}
.combo-option > span:not(.dot, .avatar, .status, .combo-plus) {
  flex: 1;
  min-width: 0;
}
.combo-option strong {
  display: block;
  font-size: var(--text-md);
}
.combo-option small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combo-option .avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}
.combo-option .dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 10px 0 11px;
}
.combo-option[aria-selected='true'] {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.combo-plus {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  color: var(--brand);
  font-weight: 700;
}
.combo-new {
  margin-top: 4px;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--r-xs) var(--r-xs);
}
.combo-empty {
  padding: 12px;
  color: var(--muted);
  font-size: var(--text-md);
}

/* ---------- Today at a glance ---------- */
.today-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
}
.today-summary:has(> .today-item:nth-of-type(3):last-child) {
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
}
.today-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 13px 18px;
  background: var(--surface);
}
.today-item p {
  color: var(--muted);
  font-size: var(--text-sm);
}
.today-item > strong {
  font: 700 var(--text-2xl) / 1.15 var(--display);
  font-variant-numeric: tabular-nums;
}
.today-item small {
  overflow: hidden;
  max-width: 100%;
  color: var(--ink-2);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.today-item.is-alert {
  background: var(--brass-faint);
}
.today-item.is-alert > strong {
  color: var(--brass-ink);
}
.today-next {
  background: var(--brand-soft);
}
.today-link {
  display: block;
  max-width: 100%;
  margin: 2px -8px -4px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  text-align: left;
}
.today-link strong {
  display: block;
  font: 700 var(--text-lg) / 1.3 var(--display);
}
.today-quiet {
  font-size: var(--text-base);
  font-weight: 600;
}
.today-decide.text-button {
  min-height: 0;
  padding: 0;
  font-size: var(--text-sm);
}
.stats .stat strong.money {
  font-variant-numeric: tabular-nums;
}

/* ---------- Calendar additions ---------- */
.calendar-filters {
  align-items: center;
  justify-content: space-between;
}
.filter-group {
  display: flex;
  gap: 8px;
}
.filter .dot {
  width: 8px;
  height: 8px;
}
.filter-toggle {
  flex: none;
  margin-left: 12px;
}
.filter-toggle::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.filter-toggle[aria-pressed='true']::before {
  background: currentColor;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.avatar.tone-0 {
  background: var(--cal-0-bg);
  color: var(--brand-deep);
}
.avatar.tone-1 {
  background: var(--cal-1-bg);
  color: var(--brass-ink);
}
.avatar.tone-2 {
  background: var(--cal-2-bg);
  color: #3a4580;
}
.avatar.tone-3 {
  background: var(--cal-3-bg);
  color: #7d3a2c;
}
.staff-column,
.week-col {
  cursor: copy;
}
.staff-column .appointment-block,
.week-col .appointment-block,
.blocked-slot {
  cursor: pointer;
}
.slot-ghost {
  position: absolute;
  z-index: 0;
  left: 4px;
  right: 4px;
  height: calc(var(--hour-h) / 4);
  padding: 0 8px;
  border: 1px dashed var(--brand);
  border-radius: var(--r-xs);
  background: #e1eee8cc;
  color: var(--brand-deep);
  font: 650 var(--text-xs) / calc(var(--hour-h) / 4 - 2px) var(--sans);
  white-space: nowrap;
  pointer-events: none;
}
.hour-adds {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 64px;
  height: 100%;
}
.hour-add {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--hour-h);
  padding: 0 0 6px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: left;
  vertical-align: bottom;
}
.hour-add span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: calc(var(--hour-h) - 30px);
  border-radius: 50%;
  background: var(--brand-soft);
  opacity: 0;
}
.hour-add:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  background: var(--brand-soft);
}
.hour-add:is(:hover, :focus-visible) span {
  opacity: 1;
}
.appointment-block .appt-time {
  display: block;
}
.appointment-block.is-cancelled,
.agenda-item.is-cancelled {
  border-left-style: dotted;
  background: var(--surface-2);
  opacity: 0.75;
  box-shadow: none;
}
.appointment-block.is-cancelled strong,
.agenda-item.is-cancelled strong {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.appointment-block.compact {
  min-height: 24px;
  padding: 3px 6px 3px 7px;
  border-left-width: 3px;
  border-radius: var(--r-xs);
}
.appointment-block.compact .appt-time {
  margin: 0;
}
.appointment-block.compact strong {
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appointment-block.compact small {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blocked-slot small {
  color: var(--muted);
  font-size: var(--text-xs);
}
.blocked-slot.compact {
  padding: 3px 6px;
}

.blocked-slot {
  z-index: 0;
}
.appointment-block.short {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 26px;
  padding: 5px 10px;
}
.appointment-block.short .appt-time {
  flex: none;
  margin: 0;
}
.appointment-block.short strong {
  overflow: hidden;
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deposit-box > legend,
.hours-row > legend {
  float: left;
  width: 100%;
}
.deposit-box > legend {
  margin: 0;
}

/* Week view: 7 day columns on the same hour scale as the day view. */
.week-time {
  min-width: 760px;
}
.week-head,
.week-body {
  display: grid;
  grid-template-columns: 56px repeat(7, minmax(96px, 1fr));
}
.week-head {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.week-corner {
  border-right: 1px solid var(--line);
}
.week-dayhead {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 9px 4px 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--text-sm);
}
.week-dayhead:last-child {
  border-right: 0;
}
.week-dayhead strong {
  color: var(--ink);
  font: 700 var(--text-xl) / 1.2 var(--display);
}
.week-dayhead small {
  font-size: var(--text-xs);
}
.week-dayhead.today {
  background: var(--brand-soft);
  box-shadow: inset 0 3px 0 var(--brass);
}
.week-dayhead.today strong {
  color: var(--brand-deep);
}
.week-body {
  position: relative;
  height: calc(var(--hours) * var(--hour-h));
}
.week-body .time-rail {
  grid-row: 1;
}
.week-col {
  position: relative;
  border-right: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--hour-h) / 2 - 1px),
    var(--grid-half) calc(var(--hour-h) / 2 - 1px),
    var(--grid-half) calc(var(--hour-h) / 2),
    transparent calc(var(--hour-h) / 2),
    transparent calc(var(--hour-h) - 1px),
    var(--grid-hour) calc(var(--hour-h) - 1px),
    var(--grid-hour) var(--hour-h)
  );
}
.week-col:last-child {
  border-right: 0;
}
.week-col.today {
  background-color: #f7fbf9;
}
.week-col .off-hours {
  padding: 4px 6px;
}
.week-col .appointment-block,
.week-col .blocked-slot {
  left: calc(3px + (100% - 6px) * var(--lane, 0) / var(--lanes, 1));
  width: calc((100% - 6px) / var(--lanes, 1) - 1px);
}

/* Agenda (phones): day list, and the week as a list of days */
.agenda-item.color-1 {
  box-shadow: inset 4px 0 0 var(--cal-1);
}
.agenda-item.color-2 {
  box-shadow: inset 4px 0 0 var(--cal-2);
}
.agenda-item.color-3 {
  box-shadow: inset 4px 0 0 var(--cal-3);
}
.agenda-item.pending {
  background: var(--brass-faint);
}
.agenda-day + .agenda-day {
  border-top: 1px solid var(--line);
}
.agenda-day h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  background: var(--surface-2);
  font-size: var(--text-md);
}
.agenda-today {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--on-brand);
  font-size: var(--text-xs);
}
.agenda-none {
  padding: 12px 16px 14px;
  color: var(--muted);
  font-size: var(--text-md);
}

/* ---------- Clients ---------- */
.client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.client-head h2:focus {
  outline: none;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 8px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--brand-deep);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-link svg {
  flex: none;
  width: 15px;
  height: 15px;
}
.client-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--line);
}
.client-stats > div {
  padding: 10px 14px;
  background: var(--surface-2);
}
.client-stats dt {
  color: var(--muted);
  font-size: var(--text-xs);
}
.client-stats dd {
  margin: 0;
  font: 700 var(--text-xl) / 1.3 var(--display);
  font-variant-numeric: tabular-nums;
}
.label-hidden > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Weekly hours editor ---------- */
.hours-head h3 {
  margin: 0;
}
.hours-grid {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.hours-row {
  display: grid;
  grid-template-columns: 104px 92px minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.hours-row.read {
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
}
.hours-day {
  float: left;
  padding: 0;
  padding-top: 8px;
  font-size: var(--text-md);
  font-weight: 650;
}
.hours-row.read .hours-day {
  padding-top: 0;
}
.hours-off {
  padding-top: 9px;
  white-space: nowrap;
}
.hours-intervals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.hours-intervals[hidden] {
  display: none;
}
.hours-interval {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 3px 3px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-sm);
}
.hours-interval input {
  width: 112px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
}
.hours-interval input[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}
.icon-button.small-icon {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 20px;
}
.hours-add.text-button {
  min-height: 36px;
  padding: 4px 0;
  font-size: var(--text-sm);
}
.hours-save {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
}
.hours-error {
  grid-column: 3 / -1;
}
.hours-read {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--text-md);
}
.block-list {
  margin-top: 10px;
}
.block-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.block-row:last-child {
  border-bottom: 0;
}
.block-row strong {
  font-size: var(--text-md);
}

/* ---------- Payments: decisions ---------- */
.decision-card {
  border-color: var(--brass-line);
  box-shadow: inset 4px 0 0 var(--brass);
}
.decision-card .section-head {
  margin-bottom: 12px;
}
.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--brass);
  color: var(--on-brand);
  font: 700 var(--text-sm) / 1 var(--sans);
  vertical-align: 3px;
}
.decision-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.decision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.decision-row > div:first-child {
  display: grid;
  justify-items: start;
  gap: 3px;
}
.decision-row strong {
  font-size: var(--text-base);
}
.decision-row small {
  color: var(--muted);
  font-size: var(--text-sm);
}
.decision-amount {
  display: grid;
  justify-items: end;
  font: 700 var(--text-lg) / 1.2 var(--display);
}
.decision-amount small {
  font: 400 var(--text-xs) / 1.3 var(--sans);
}
.decision-action {
  min-width: 112px;
  text-align: right;
}

/* ---------- Notifications ---------- */
.notification-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.notification-side .button-row {
  align-items: center;
  gap: 12px;
}

/* ---------- Dialog pieces ---------- */
.appt-lead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: -12px;
}
.appt-lead p {
  font-size: var(--text-base);
}
.modal-section.disclosure {
  padding-top: 0;
}
.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-top: 12px;
  font: 700 var(--text-base) / 1.3 var(--display);
  cursor: pointer;
  list-style: none;
}
.disclosure > summary::-webkit-details-marker {
  display: none;
}
.disclosure > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
.disclosure[open] > summary::after {
  transform: rotate(-135deg);
}
.disclosure > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.modal-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.reverse-form {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.form-actions.mt-0 {
  margin-top: 0;
}
.form-legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font: 700 var(--text-base) / 1.3 var(--display);
}
.deposit-box {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--brass-line);
  border-radius: var(--r-sm);
  background: var(--brass-faint);
}
.deposit-extra {
  margin-left: 27px;
}
.deposit-extra[hidden] {
  display: none;
}
.client-picker {
  position: relative;
}
.client-chosen {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: var(--text-md);
}
.client-chosen[hidden],
.slot-mode[hidden],
.time-mode[hidden] {
  display: none;
}
.copy-row {
  display: flex;
  gap: 8px;
}
.copy-row input {
  flex: 1;
  min-width: 0;
  font-size: var(--text-sm);
}
.link-box {
  margin-top: 14px;
}
.auth-booking-link {
  margin-top: 10px;
}

/* ---------- Hover & press ---------- */
@media (hover: hover) {
  .nav button:not(.active):hover,
  .list-item:not(.active):hover,
  .agenda-item:hover {
    background: var(--surface-hover);
  }
  .appointment-block:hover,
  .week-card:hover {
    filter: brightness(0.97);
  }
  .filter:not(.active, [aria-pressed='true']):hover {
    border-color: var(--line-hover);
    background: var(--surface-hover);
  }
  .segmented button:not(.active, [aria-pressed='true']):hover {
    color: var(--ink);
    background: #ffffff99;
  }
  .topbar a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .schedule-interval button:hover {
    background: var(--danger-soft);
  }
}
.filter:active,
.segmented button:active,
.week-card:active,
.agenda-item:active,
.list-item:active {
  transform: translateY(1px);
}

/* ---------- Responsive ---------- */
@media (min-width: 1600px) {
  .calendar-scroll {
    max-height: 800px;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 13px;
  }
  .topbar {
    padding: 0 25px;
  }
  .topbar-right {
    gap: 10px;
  }
  .workspace-content {
    padding: 30px 25px 25px;
  }
  .calendar-toolbar {
    flex-wrap: wrap;
  }
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
  .two-panel {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .owner-grid {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 40px;
  }
  .auth-form-wrap {
    padding: 30px;
  }
}
@media (max-width: 800px) {
  /* minmax(0, 1fr) stops the horizontally scrolling nav from widening the page. */
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    gap: 14px;
    height: auto;
    padding: 17px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin: 0;
  }
  .nav-label,
  .sidebar-bottom,
  .nav svg,
  .topbar-label,
  .topbar-right .avatar {
    display: none;
  }
  .nav {
    display: flex;
    gap: 5px;
    overflow: auto;
  }
  .nav button {
    padding: 9px 12px;
    white-space: nowrap;
  }
  .topbar {
    justify-content: flex-end;
    height: 56px;
    padding: 0 20px;
  }
  .workspace-content {
    padding: 30px 20px 24px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-tools .button {
    padding: 10px 12px;
    font-size: var(--text-sm);
  }
  .stats .stat {
    padding: 14px;
  }
  .calendar-toolbar {
    padding: 14px;
  }
  .calendar-date {
    margin: 0 4px;
  }
  .calendar-filters {
    padding: 12px 14px;
  }
  .two-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .list-panel {
    max-height: 300px;
    overflow: auto;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    gap: 35px;
    min-height: 0;
    padding: 28px 24px;
  }
  .auth-story h1 {
    font-size: 32px;
  }
  .auth-story p,
  .auth-points {
    display: none;
  }
  .auth-form-wrap {
    padding: 35px 24px;
  }
}
@media (max-width: 480px) {
  .sidebar {
    padding: 17px 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .topbar .test-pill {
    display: none;
  }
  .workspace-content {
    padding: 30px 14px 22px;
  }
  .page-heading {
    display: block;
  }
  .heading-tools {
    margin-top: 18px;
  }
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats .stat {
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stats .stat:last-child {
    border-bottom: 0;
  }
  .stat p {
    font-size: var(--text-xs);
  }
  .stat strong {
    font-size: var(--text-2xl);
  }
  .calendar-toolbar {
    gap: 12px;
  }
  .calendar-toolbar .row {
    gap: 5px;
  }
  .calendar-toolbar .icon-button {
    width: 40px;
    height: 40px;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .notification-card {
    grid-template-columns: 30px 1fr;
    gap: 10px;
  }
  .notification-card > .status {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---------- Responsive additions ---------- */
@media (max-width: 1100px) {
  .today-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .today-summary:has(> .today-item:nth-of-type(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .global-search kbd {
    display: none;
  }
  .heading-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .hours-row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
  }
  .hours-off {
    grid-column: 2;
  }
  .hours-intervals {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .hours-save {
    grid-column: 3;
    grid-row: 1;
  }
  .hours-error {
    grid-column: 2 / -1;
  }
}
@media (max-width: 800px) {
  .topbar {
    justify-content: space-between;
    gap: 10px;
  }
  .global-search {
    max-width: none;
  }
  .topbar-right a {
    display: none;
  }
  .calendar-filters {
    flex-wrap: wrap;
  }
  .filter-group {
    overflow: auto;
    max-width: 100%;
  }
  .filter-toggle {
    margin-left: 0;
  }
  .client-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .decision-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .decision-action {
    grid-column: 1 / -1;
    text-align: left;
  }
}
@media (max-width: 650px) {
  .calendar-scroll {
    max-height: none;
  }
  .agenda-item {
    grid-template-columns: 78px 1fr auto;
  }
  .today-summary > .today-item:nth-of-type(4):last-child {
    grid-column: 1 / -1;
  }
  .today-summary,
  .today-summary:has(> .today-item:nth-of-type(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .today-next {
    grid-column: 1 / -1;
  }
  .today-item {
    padding: 11px 14px;
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .heading-tools {
    justify-content: flex-start;
  }
  .heading-tools .button {
    flex: 1 1 auto;
  }
  .hours-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hours-day {
    grid-column: 1;
  }
  .hours-off {
    grid-column: 1;
    grid-row: 2;
    padding-top: 0;
  }
  .hours-intervals {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .hours-save {
    grid-column: 2;
    grid-row: 1;
  }
  .hours-error {
    grid-column: 1 / -1;
  }
  .appt-lead {
    flex-direction: column-reverse;
    gap: 6px;
  }
  .copy-row {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats .stat {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .stats .stat:last-child {
    border-right: 0;
  }
  .global-search input {
    padding-right: 10px;
  }
}

/* ---------- Printable day sheet ----------
   workspace.js renders an agenda into #print-sheet (a direct child of <body>) and calls window.print().
   Markup: .print-sheet > h1 + .print-sheet-meta + .print-group* (h2 + table.print-table) */
.print-sheet {
  display: none;
}
@media print {
  .sidebar,
  .topbar,
  .calendar-toolbar,
  .calendar-filters,
  .heading-tools,
  .calendar-footer {
    display: none !important;
  }
  .workspace {
    display: block;
  }
  .workspace-content {
    max-width: none;
    padding: 0;
  }
  .calendar-scroll {
    max-height: none;
    overflow: visible;
  }
  /* When a day sheet has been rendered, print only the sheet. */
  body:has(> .print-sheet:not(:empty)) > :not(.print-sheet) {
    display: none !important;
  }
  .print-sheet:not(:empty) {
    display: block;
    color: #000;
    font: 11pt/1.4 var(--sans);
  }
  .print-sheet h1 {
    margin: 0 0 4pt;
    font-size: 18pt;
    line-height: 1.2;
  }
  .print-sheet-meta {
    margin: 0 0 14pt;
    color: #333;
    font-size: 10pt;
  }
  .print-group {
    margin-bottom: 16pt;
  }
  .print-group h2 {
    margin: 0 0 6pt;
    padding-bottom: 3pt;
    border-bottom: 1.5pt solid #000;
    font-size: 13pt;
    letter-spacing: 0;
    break-after: avoid;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  .print-table th,
  .print-table td {
    padding: 5pt 6pt 5pt 0;
    border-bottom: 0.5pt solid #999;
    text-align: left;
    vertical-align: top;
  }
  .print-table th {
    color: #333;
    font-size: 9pt;
    font-weight: 600;
  }
  .print-table th:nth-child(1),
  .print-table td:nth-child(1) {
    width: 16%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .print-table th:nth-child(4),
  .print-table td:nth-child(4) {
    width: 20%;
    white-space: nowrap;
  }
  .print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-table small {
    display: block;
    color: #444;
    font-size: 9pt;
  }
  .print-empty {
    color: #444;
    font-style: italic;
  }
}

/* ==========================================================================
   v3: catalog, profiles, photos, website editor, waitlist, guests
   ========================================================================== */

/* ---------- Shell additions ---------- */
.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--brass-soft);
  color: var(--brass-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nav button.active .nav-count {
  background: var(--surface);
  color: var(--brand-deep);
}
.profile-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}
.profile-button .avatar {
  width: 32px;
  height: 32px;
}
.avatar-photo {
  display: block;
  object-fit: cover;
  background: var(--neutral);
}
.mt-4 {
  margin-top: 4px;
}

/* ---------- Reordering arrows ---------- */
.order-buttons {
  display: inline-flex;
  flex: none;
  gap: 4px;
}
.icon-button.order-button {
  width: 34px;
  height: 34px;
  border-radius: var(--r-xs);
  color: var(--ink-2);
}
.icon-button.order-button svg {
  width: 16px;
  height: 16px;
}
.icon-button.order-button:disabled {
  opacity: 0.4;
}

/* ---------- Services grouped by category ---------- */
.service-group + .service-group {
  margin-top: 34px;
}
.service-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.service-group-head h2 {
  font-size: var(--text-2xl);
}
.group-count {
  color: var(--muted);
  font-size: var(--text-sm);
}
.service-group-head .order-buttons {
  margin-left: auto;
}
.tile-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin-top: -6px;
}
.service-tile {
  display: flex;
  flex-direction: column;
}
.service-tile .tile-bottom {
  margin-top: auto;
}
.service-tile .staff-tags {
  margin-bottom: 24px;
}
.price-varies strong {
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}

/* Per-stylist price and duration */
.override-box {
  display: grid;
  gap: 6px;
}
.override-table {
  width: 100%;
  border-collapse: collapse;
}
.override-table th,
.override-table td {
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}
.override-table thead th {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 650;
}
.override-table th[scope='row'] {
  font-weight: 600;
}
.override-table td {
  width: 30%;
}
.override-table td:last-child,
.override-table th:last-child {
  padding-right: 0;
}
.override-table .field {
  gap: 4px;
}
.override-table input {
  min-height: 40px;
  padding: 8px 10px;
}
.override-table input::placeholder {
  color: var(--muted);
}
.ov-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--text-md);
}
.ov-name small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
}
.ov-name .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.ov-none td {
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ---------- Team & profiles ---------- */
.list-note {
  padding: 10px 20px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: var(--text-xs);
}
.team-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.team-row:last-child {
  border-bottom: 0;
}
.team-row .list-item {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}
.team-row .order-buttons {
  padding-right: 14px;
}
.team-row .list-item.active {
  box-shadow: inset 3px 0 0 var(--brand);
}
.team-row:has(.list-item.active) {
  background: var(--brand-soft);
}
.team-row:has(.list-item.active) .order-button {
  background: var(--surface);
}
.list-item small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-head {
  align-items: flex-start;
}
.public-profile .details-list {
  margin-bottom: 0;
}
.profile-details .span-2 {
  grid-column: 1 / -1;
}
.profile-bio {
  max-width: 68ch;
  font-weight: 400 !important;
  white-space: pre-line;
}
.profile-edit {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* ---------- Photo uploader ---------- */
.uploader {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.drop-zone {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.drop-zone.is-over {
  border-color: var(--brand);
  border-style: solid;
  background: var(--brand-soft);
}
.upload-preview {
  display: grid;
  flex: none;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uploader.is-round .upload-preview,
.uploader.is-round .upload-preview img {
  border-radius: 50%;
}
.upload-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: center;
}
.upload-empty svg {
  width: 26px;
  height: 26px;
}
.upload-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.upload-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-2);
  font-size: var(--text-md);
}
.upload-text strong {
  color: var(--ink);
}
.upload-body .hint {
  font-size: var(--text-xs);
}
.upload-body .button-row {
  gap: 8px 14px;
  margin-top: 2px;
}
.upload-body .button svg {
  width: 16px;
  height: 16px;
}
.upload-body .text-button {
  min-height: 40px;
  font-size: var(--text-sm);
}
.upload-progress progress {
  width: 100%;
  height: 8px;
  accent-color: var(--brand);
}
.upload-status {
  color: var(--brand-deep);
  font-size: var(--text-sm);
  font-weight: 600;
}
.upload-status:empty {
  display: none;
}
.upload-status.is-error {
  color: var(--danger-ink);
}
.uploader.is-multi .drop-zone {
  justify-content: center;
  padding: 22px 18px;
  text-align: center;
}
.uploader.is-multi .upload-body {
  justify-items: center;
}
.uploader.is-multi .upload-text svg {
  color: var(--brand);
}
.profile-edit .drop-zone {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.profile-edit .upload-preview {
  width: 120px;
}
.profile-edit .upload-body {
  justify-items: center;
}
.profile-edit .upload-text {
  justify-content: center;
}

/* Character counters */
.field-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.char-count {
  flex: none;
  margin-left: auto;
  color: var(--muted);
  font-size: var(--text-xs) !important;
  font-variant-numeric: tabular-nums;
}
.char-count.is-near {
  color: var(--brass-ink);
  font-weight: 650;
}

/* ---------- Waitlist ---------- */
.wait-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.filter-count {
  margin-left: 2px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.filter[aria-pressed='true'] .filter-count {
  color: inherit;
}
.wait-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr));
  gap: 16px;
}
.wait-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.wait-card.is-done {
  background: var(--surface-2);
}
.wait-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wait-head h3 {
  font: 700 var(--text-xl) / 1.25 var(--display);
}
.wait-head h3:focus {
  outline: none;
}
.wait-head h3:focus-visible {
  outline: 3px solid var(--focus);
}
.wait-head p {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--text-md);
}
.wait-details {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}
.wait-details dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 650;
}
.wait-details dd {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip-list li {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.chip-list li.is-past {
  background: var(--neutral-soft);
  color: var(--muted);
  text-decoration: line-through;
}
.wait-card .contact-links {
  margin-top: 0;
}
.client-note {
  padding: 11px 14px;
  border-left: 3px solid var(--brass);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--brass-faint);
}
.client-note p {
  color: var(--ink);
  font-size: var(--text-md);
  white-space: pre-line;
}
.client-note .client-note-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: var(--brass-ink);
  font-size: var(--text-xs);
  font-weight: 700;
}
.client-note-label svg {
  width: 15px;
  height: 15px;
}
.staff-note {
  color: var(--ink-2);
  font-size: var(--text-md);
}
.staff-note strong {
  margin-right: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.wait-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.wait-form-slot:empty {
  display: none;
}
.wait-notice {
  font-size: var(--text-md);
}
.today-item.is-waiting > strong {
  color: var(--brass-ink);
}

/* Today at a glance: any number of items in one row on wide screens. */
.today-summary,
.today-summary:has(> .today-item:nth-of-type(3):last-child) {
  grid-template-columns: minmax(0, 1.6fr);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}
@media (max-width: 1100px) {
  .today-summary,
  .today-summary:has(> .today-item:nth-of-type(3):last-child) {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-flow: row;
  }
  .today-summary .today-next {
    grid-column: 1 / -1;
  }
}
@media (max-width: 650px) {
  .today-summary,
  .today-summary:has(> .today-item:nth-of-type(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .today-summary > .today-item:nth-of-type(even):last-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Guests and client notes on appointments ---------- */
.guest-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 6px;
  color: var(--ink-2);
  font-size: var(--text-md);
}
.guest-tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--info-soft);
  color: var(--info-ink);
  font-size: var(--text-xs);
  font-weight: 700;
}
.appt-flag {
  display: inline-flex;
  margin-left: 4px;
  vertical-align: -2px;
}
.appt-flag svg {
  width: 13px;
  height: 13px;
}
.guest-field[hidden] {
  display: none;
}

/* ---------- Website editor ---------- */
.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
.site-form {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.site-card {
  min-width: 0;
}
.site-card .section-head {
  margin-bottom: 18px;
}
.site-aside {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 16px;
}
.site-aside h2 {
  margin-bottom: 8px;
  font-size: var(--text-xl);
}
.site-live .button {
  width: 100%;
  margin-top: 12px;
}
.site-live .button svg,
.heading-tools .button svg,
.site-embed .button svg {
  width: 16px;
  height: 16px;
}
.site-address {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 650;
}
.code-box {
  min-height: 0 !important;
  font:
    12px/1.5 ui-monospace,
    'SF Mono',
    Menlo,
    Consolas,
    monospace !important;
  background: var(--surface-2) !important;
  resize: none !important;
}
.site-embed .copy-row input {
  font-size: var(--text-sm);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.swatch,
.theme-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
}
.swatch input,
.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.swatch:has(input:checked),
.theme-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.swatch:has(input:focus-visible),
.theme-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.swatch-chip {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #0000001f;
}
.swatch:has(input:checked) .swatch-chip::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}
.accent-forest {
  background: #1e6b58;
}
.accent-plum {
  background: #6d3f73;
}
.accent-rose {
  background: #b0465f;
}
.accent-ocean {
  background: #23628f;
}
.accent-clay {
  background: #a5552f;
}
.accent-ink {
  background: #26323c;
}
.theme-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.theme-option {
  gap: 12px;
}
.theme-option small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
}
.theme-sample {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.theme-sample span {
  width: 22px;
  height: 4px;
  border-radius: 2px;
}
.theme-light {
  background: #f7f5f0;
}
.theme-light span {
  background: #2a2a2a;
}
.theme-dark {
  background: #1d2124;
}
.theme-dark span {
  background: #eee;
}
.upload-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.upload-pair .drop-zone {
  flex-direction: column;
}
.upload-pair .upload-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.upload-pair .uploader:first-child .upload-preview img {
  object-fit: contain;
  padding: 10px;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: 12px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}
.gallery-item,
.media-item {
  min-width: 0;
}
.gallery-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
}
.gallery-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
}
.gallery-num {
  margin-right: auto;
  padding-left: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.gallery-tools .icon-button {
  width: 34px;
  height: 34px;
  border-radius: var(--r-xs);
}
.gallery-tools .icon-button svg {
  width: 16px;
  height: 16px;
}
.gallery-tools .icon-button:disabled {
  opacity: 0.35;
}
.icon-button.danger-icon {
  color: var(--danger);
}
.gallery-empty {
  padding: 18px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--text-md);
}
.gallery-count {
  margin: 6px 0 12px;
}

/* Opening hours */
.hours-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.hours-source p {
  color: var(--ink-2);
  font-size: var(--text-md);
}
.hours-source p:focus {
  outline: none;
}
.hours-source .button {
  flex: none;
}
.site-hours-row {
  display: grid;
  grid-template-columns: 120px 110px minmax(0, 1fr);
  align-items: center;
  gap: 4px 14px;
  min-height: 58px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.site-hours-row:last-child {
  border-bottom: 0;
}
.site-hours-day {
  font-weight: 650;
}
.site-hours-times {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.site-hours-times[hidden] {
  display: none;
}
.site-hours-times input {
  width: 140px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.site-hours-times input[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}
.site-hours-error {
  grid-column: 2 / -1;
}

/* Links, search preview, sections */
.seo-preview {
  display: grid;
  gap: 2px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.seo-url {
  color: var(--muted);
  font-size: var(--text-xs);
}
.seo-title {
  color: #1a4fa0;
  font-size: var(--text-xl);
}
.seo-desc {
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font-size: var(--text-md);
}
.section-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.toggle-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-weight: 600;
}
.toggle-row:has(input:checked) {
  border-color: var(--brand-tint);
  background: var(--brand-soft);
}
.toggle-row small {
  font-weight: 400;
}

/* Save bar stays in reach while editing a long page. */
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-bar);
}
.save-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 600;
}
.save-state.is-dirty {
  color: var(--brass-ink);
}
.save-state.is-dirty::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
}
.save-bar .error-inline {
  flex-basis: 100%;
  order: 3;
  margin: 0;
}

/* Photo library */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.media-item {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.media-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
}
.media-meta {
  display: grid;
  gap: 1px;
  padding: 10px 12px 0;
}
.media-meta strong {
  font-size: var(--text-md);
}
.media-meta small {
  color: var(--muted);
  font-size: var(--text-xs);
}
.media-meta .media-used {
  color: var(--brand-deep);
  font-weight: 600;
}
.media-actions {
  display: flex;
  gap: 16px;
  padding: 0 12px 4px;
}
.media-actions .text-button {
  font-size: var(--text-sm);
}
.text-button.danger-text {
  color: var(--danger-ink);
}

@media (hover: hover) {
  .swatch:not(:has(input:checked)):hover,
  .theme-option:not(:has(input:checked)):hover,
  .toggle-row:hover {
    border-color: var(--line-hover);
  }
  .profile-button:hover {
    border-color: var(--line);
  }
  .drop-zone:hover {
    border-color: var(--brand);
  }
}

/* Buttons and text buttons hidden with the attribute stay hidden despite their display rule. */
.button[hidden],
.text-button[hidden],
.uploader [data-clear][hidden] {
  display: none;
}

/* ---------- First-run setup checklist ---------- */
.setup-card {
  margin-bottom: 18px;
  padding: 22px 24px 18px;
  border: 1px solid var(--brand-soft);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--brand-tint) 0, transparent 55%), var(--surface);
}
.setup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 16px;
}
.setup-kicker {
  margin-bottom: 2px;
  color: var(--brand-deep);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.setup-head h2 {
  font-size: var(--text-3xl);
  line-height: 1.15;
}
.setup-head h2:focus-visible {
  outline-offset: 4px;
}
.setup-sub {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: var(--text-md);
}
.setup-progress {
  overflow: hidden;
  height: 8px;
  margin-top: 30px;
  border-radius: var(--r-pill);
  background: var(--neutral);
}
.setup-progress span {
  display: block;
  width: var(--p, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.4s ease;
}
.setup-hide {
  width: 34px;
  height: 34px;
  color: var(--muted);
}
.setup-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.setup-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.setup-step.is-next {
  border-color: var(--brand-soft);
  background: var(--surface);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(21, 48, 42, 0.06));
}
.setup-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-2);
  font: 700 var(--text-sm) / 1 var(--display);
  font-variant-numeric: tabular-nums;
}
.setup-step.is-next .setup-mark {
  border-color: var(--brand);
  color: var(--brand-deep);
}
.setup-step.is-done .setup-mark {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
.setup-mark svg {
  width: 18px;
  height: 18px;
}
.setup-body strong {
  display: block;
  font-size: var(--text-base);
}
.setup-step.is-done .setup-body strong {
  color: var(--ink-2);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
}
.setup-body p {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: var(--text-sm);
}
.setup-action {
  flex: none;
}
.setup-action .button svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}
.button-row.center {
  justify-content: center;
}

/* ---------- Quick add ---------- */
.quick-menu textarea {
  font-family: var(--mono, ui-monospace, 'SF Mono', Menlo, Consolas, monospace);
  font-size: var(--text-md);
  line-height: 1.6;
}
.quick-menu textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.form-actions.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
#quick-result:empty {
  display: none;
}
#quick-result,
#quick-form {
  min-width: 0;
}
.quick-table td,
.quick-table th {
  padding: 11px 12px;
}
.quick-table td {
  white-space: normal;
}
.quick-cat {
  display: none;
  color: var(--muted);
  font-size: var(--text-xs);
}
.quick-errors ul,
.notice.error ul {
  margin: 6px 0 0 18px;
  padding: 0;
  font-size: var(--text-sm);
}
.quick-table td.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.quick-progress {
  margin-bottom: 8px;
  font-weight: 600;
}
#quick-result progress {
  width: 100%;
  height: 8px;
  accent-color: var(--brand);
}

/* ---------- Hours tools: copy from a colleague ---------- */
.hours-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.copy-hours {
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-hours select {
  min-height: 36px;
  padding: 5px 30px 5px 10px;
  font-size: var(--text-sm);
}

/* ---------- Settings: payments placeholder ---------- */
.payments-panel .section-head {
  align-items: flex-start;
}
.connect-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.connect-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.connect-mark svg {
  width: 22px;
  height: 22px;
}
.connect-action {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

/* ---------- v3 responsive ---------- */
@media (max-width: 1280px) {
  .site-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: -1;
  }
  .swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .site-aside {
    grid-template-columns: minmax(0, 1fr);
  }
  .setup-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .setup-hide {
    grid-row: 1;
    grid-column: 2;
  }
  .setup-progress {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .hours-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .hours-tools {
    justify-content: flex-start;
  }
  .topbar-right .profile-button .avatar {
    display: grid;
  }
  .wait-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wait-details > div:first-child {
    grid-column: 1 / -1;
  }
  .nav-count {
    margin-left: 6px;
  }
}
@media (max-width: 650px) {
  .setup-card {
    padding: 18px 16px 14px;
  }
  .setup-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 12px;
  }
  .setup-mark {
    width: 28px;
    height: 28px;
  }
  .setup-action {
    grid-column: 2;
  }
  .setup-action .button {
    width: 100%;
  }
  .connect-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .connect-action {
    grid-column: 1 / -1;
    justify-items: stretch;
  }
  .form-actions.between {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .quick-table .col-cat {
    display: none;
  }
  .quick-cat {
    display: block;
  }
  .quick-table td,
  .quick-table th {
    padding: 10px 8px;
  }
  .copy-hours {
    width: 100%;
  }
  .copy-hours select {
    flex: 1;
    min-width: 0;
  }
  .profile-edit,
  .upload-pair,
  .section-toggles {
    grid-template-columns: minmax(0, 1fr);
  }
  .swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-hours-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .site-hours-times {
    grid-column: 1 / -1;
  }
  .site-hours-times input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .site-hours-error {
    grid-column: 1 / -1;
  }
  .hours-source {
    flex-direction: column;
    align-items: flex-start;
  }
  .drop-zone {
    flex-direction: column;
  }
  .upload-preview {
    width: 96px;
  }
  .save-bar {
    margin-inline: -4px;
    padding: 12px 14px;
  }
  .save-bar .button-row {
    width: 100%;
  }
  .save-bar .button {
    flex: 1;
  }
  .wait-card {
    padding: 16px;
  }
  .wait-actions .button {
    flex: 1 1 auto;
  }
  .service-group-head {
    flex-wrap: wrap;
  }
  .override-table td {
    width: 34%;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media print {
  .save-bar,
  .site-aside {
    display: none !important;
  }
}

.auth-help{font-size:.85rem;color:var(--muted,#6b6f66);margin:-6px 0 12px}
