/* Yanyja — Modal & toast styles
 * Loaded after pages.css.
 */

/* ----- Backdrop ----- */
.yj-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 12, 0.42);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 20px 20px;
  overflow-y: auto;
  animation: yj-modal-fade 140ms ease-out;
}
@keyframes yj-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ----- Card ----- */
.yj-modal {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 28px 60px rgba(7,20,12,0.28), 0 6px 14px rgba(7,20,12,0.10);
  overflow: hidden;
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms cubic-bezier(.4,0,.2,1);
}
.yj-modal[data-open="true"] {
  transform: translateY(0) scale(1);
}

/* ----- Head ----- */
.yj-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.yj-modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-accent);
  margin-bottom: 4px;
}
.yj-modal-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.2;
  color: var(--fg-brand);
  letter-spacing: -0.01em;
  margin: 0;
}
.yj-modal-close {
  border: 0;
  background: transparent;
  color: var(--fg-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 0;
}
.yj-modal-close:hover { color: var(--fg-primary); background: var(--bg-sunken); }

/* ----- Body ----- */
.yj-modal-body {
  padding: 18px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* ----- Context block (top of body) ----- */
.yj-modal-context {
  background: var(--bg-sunken);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.yj-modal-context .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 5px 0;
  font-size: 12.5px;
  align-items: center;
}
.yj-modal-context .row .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.yj-modal-context .row .v {
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.yj-modal-context .row .v .mono { font-family: var(--font-mono); font-size: 12px; }
.res-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 2px 8px 2px 4px;
  font-size: 12px;
}
.av-xs {
  width: 18px; height: 18px; border-radius: 50%;
  color: var(--mist-25);
  display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-size: 9px;
  flex-shrink: 0;
}
.res-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 6px;
  background: #FBEEEB;
  color: #8E2F22;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ----- Section ----- */
.yj-modal-section {
  margin-bottom: 16px;
}
.yj-modal-section:last-child { margin-bottom: 0; }
.yj-modal-section h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  font-weight: 500;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.yj-modal-section h4 .ct {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  color: var(--fg-tertiary);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.yj-modal-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 6px;
}
.yj-modal-label .opt {
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  margin-left: 4px;
}
.yj-modal-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--fg-primary);
  font-family: inherit;
  font-size: 13px;
  border-radius: 7px;
  outline: none;
  resize: vertical;
  line-height: 1.5;
}
.yj-modal-input:focus {
  border-color: var(--canopy-400);
  box-shadow: var(--ring-focus);
}
select.yj-modal-input {
  appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-tertiary) 50%), linear-gradient(135deg, var(--fg-tertiary) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.yj-modal-hint {
  font-size: 11px;
  color: var(--fg-tertiary);
  margin-top: 6px;
  line-height: 1.5;
}

.yj-modal-tabs {
  display: inline-flex;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
  margin-bottom: 14px;
}
.yj-modal-tabs button {
  padding: 4px 12px;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--fg-secondary);
  border-radius: 4px;
  cursor: pointer;
}
.yj-modal-tabs button[data-active="true"] {
  background: var(--bg-surface);
  color: var(--fg-primary);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.yj-modal-empty {
  background: var(--bg-sunken);
  border: 1px dashed var(--border-default);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--fg-tertiary);
}

/* ----- Reassign grid ----- */
.reassign-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.reassign-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 120ms;
}
.reassign-card:hover {
  border-color: var(--canopy-300);
  background: var(--canopy-50);
}
.reassign-card[data-selected="true"] {
  border-color: var(--canopy-700);
  background: var(--canopy-50);
  box-shadow: 0 0 0 2px var(--canopy-100);
}
.reassign-card .av {
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--mist-25);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12px;
  flex-shrink: 0;
}
.reassign-card .meta { flex: 1; min-width: 0; }
.reassign-card .nm { font-size: 13px; font-weight: 500; color: var(--fg-primary); }
.reassign-card .role { font-family: var(--font-mono); font-size: 10px; color: var(--fg-tertiary); letter-spacing: 0.04em; }
.reassign-card .check {
  color: var(--canopy-700);
  font-size: 14px;
  opacity: 0;
  transition: opacity 120ms;
}
.reassign-card[data-selected="true"] .check { opacity: 1; }

.reassign-blocked {
  display: flex; flex-direction: column;
}
.reassign-blocked-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  color: var(--fg-tertiary);
  border-bottom: 1px dashed var(--border-subtle);
}
.reassign-blocked-row:last-child { border-bottom: 0; }
.reassign-blocked-row .nm { color: var(--fg-secondary); }
.reassign-blocked-row .why {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-tertiary);
}

/* ----- Reschedule slots ----- */
.reschedule-group + .reschedule-group { margin-top: 14px; }
.reschedule-group-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 8px;
  display: flex; gap: 8px; align-items: baseline;
}
.reschedule-group-h .ct { background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; }
.reschedule-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 6px;
}
.resched-slot {
  padding: 8px 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-primary);
  cursor: pointer;
  transition: all 120ms;
}
.resched-slot:hover {
  border-color: var(--canopy-400);
  background: var(--canopy-50);
}
.resched-slot[data-selected="true"] {
  background: var(--sunlight-400);
  color: var(--canopy-900);
  border-color: var(--sunlight-400);
  font-weight: 600;
}

/* ----- Cancel warn ----- */
.yj-modal-warn {
  display: flex; gap: 12px;
  align-items: flex-start;
  background: #FBEEEB;
  border: 1px solid #E8C2B8;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.yj-modal-warn-icon {
  width: 24px; height: 24px;
  background: #C24A36;
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
}
.yj-modal-warn-h {
  font-size: 13px;
  font-weight: 500;
  color: #8E2F22;
  margin-bottom: 3px;
}
.yj-modal-warn-sub {
  font-size: 12px;
  color: #8E2F22;
  line-height: 1.5;
  opacity: 0.85;
}

/* ----- Attendance picker ----- */
.attendance-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.att-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 120ms;
}
.att-opt:hover { background: var(--bg-sunken); }
.att-opt[data-selected="true"] {
  border-color: var(--canopy-700);
  background: var(--canopy-50);
  box-shadow: 0 0 0 2px var(--canopy-100);
}
.att-opt .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.att-opt .dot.attended { background: var(--moss-500); }
.att-opt .dot.late { background: var(--sunlight-400); }
.att-opt .dot.no_show { background: #C24A36; }
.att-opt .lbl { font-size: 14px; font-weight: 500; color: var(--fg-primary); }
.att-opt .sub { font-size: 11.5px; color: var(--fg-tertiary); margin-top: 1px; }

/* ----- Foot ----- */
.yj-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-sunken);
  border-top: 1px solid var(--border-subtle);
}
.yj-btn-modal {
  padding: 9px 16px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--fg-primary);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
  transition: all 120ms;
}
.yj-btn-modal:hover:not(:disabled) { background: var(--bg-sunken); }
.yj-btn-modal:disabled { opacity: 0.4; cursor: not-allowed; }
.yj-btn-modal.primary {
  background: var(--canopy-700);
  border-color: var(--canopy-700);
  color: var(--mist-25);
}
.yj-btn-modal.primary:hover:not(:disabled) { background: var(--canopy-800); border-color: var(--canopy-800); }
.yj-btn-modal.danger {
  background: #C24A36;
  border-color: #C24A36;
  color: #fff;
}
.yj-btn-modal.danger:hover:not(:disabled) { background: #A23A2E; border-color: #A23A2E; }
.yj-btn-modal.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--fg-secondary);
}
.yj-btn-modal.quiet:hover { background: var(--bg-sunken); color: var(--fg-primary); }

/* ====== Send-invitation modal ====== */
.invite-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}
.invite-grid .field-col { min-width: 0; }
.invite-role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.invite-role {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms;
  min-width: 0;
}
.invite-role:hover {
  border-color: var(--canopy-300);
  background: var(--canopy-50);
}
.invite-role[data-selected="true"] {
  border-color: var(--canopy-700);
  background: var(--canopy-50);
  box-shadow: 0 0 0 2px var(--canopy-100);
}
.invite-role .lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary);
  margin-bottom: 3px;
}
.invite-role .sub {
  font-size: 11px;
  color: var(--fg-tertiary);
  line-height: 1.3;
}
.invite-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  max-height: 168px;
  overflow-y: auto;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
}
.invite-svc {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--fg-primary);
}
.invite-svc input { cursor: pointer; }
.invite-svc .svc-lbl { font-size: 12.5px; }
.invite-svc .svc-meta {
  font-size: 10.5px;
  color: var(--fg-tertiary);
  letter-spacing: 0;
}
.yj-invite-notice {
  background: var(--sunlight-50);
  border: 1px solid var(--sunlight-200);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--sunlight-700);
  line-height: 1.5;
}
.yj-invite-notice .ic {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--sunlight-400);
  color: var(--canopy-900);
  display: grid;
  place-items: center;
}
.yj-invite-notice .ic svg { width: 12px; height: 12px; stroke-width: 2; }
.yj-invite-notice strong { color: var(--sunlight-700); font-weight: 500; }

/* ====== Create-booking flow ====== */
.cb-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--bg-sunken);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}
.cb-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--fg-tertiary);
}
.cb-step-n {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--mist-100);
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
}
.cb-step[data-state="active"] {
  background: var(--bg-surface);
  color: var(--fg-primary);
  box-shadow: 0 1px 2px rgba(7,20,12,0.06);
  font-weight: 500;
}
.cb-step[data-state="active"] .cb-step-n {
  background: var(--sunlight-400);
  color: var(--canopy-900);
}
.cb-step[data-state="done"] .cb-step-n {
  background: var(--moss-400);
  color: var(--mist-25);
}
.cb-step[data-state="done"] .cb-step-l {
  color: var(--moss-500);
}

.cb-customer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cb-customer {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 100ms;
}
.cb-customer:hover {
  background: var(--bg-sunken);
  border-color: var(--canopy-300);
}
.cb-customer[data-selected="true"] {
  background: var(--canopy-50);
  border-color: var(--canopy-700);
  box-shadow: 0 0 0 2px var(--canopy-100);
}
.cb-customer .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--canopy-100);
  color: var(--canopy-700);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.cb-customer .av.new {
  background: var(--bg-sunken);
  border: 1.5px dashed var(--border-strong);
  color: var(--fg-tertiary);
  font-size: 16px;
  font-family: var(--font-mono);
}
.cb-customer .nm {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-primary);
}
.cb-customer .sub {
  font-size: 11.5px;
  color: var(--fg-tertiary);
  margin-top: 2px;
}
.cb-customer .sub .warn {
  color: var(--status-danger);
  font-weight: 500;
}
.cb-customer.cb-new[data-selected="true"] .av.new {
  background: var(--canopy-100);
  border-color: var(--canopy-700);
  color: var(--canopy-700);
}

.cb-svc-cats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cb-svc-cat-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 6px;
}
.cb-svc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.cb-svc {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 12px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms;
}
.cb-svc:hover {
  border-color: var(--canopy-300);
  background: var(--canopy-50);
}
.cb-svc[data-selected="true"] {
  border-color: var(--canopy-700);
  background: var(--canopy-50);
  box-shadow: 0 0 0 2px var(--canopy-100);
}
.cb-svc .nm {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary);
  margin-bottom: 2px;
}
.cb-svc .sub {
  font-size: 11px;
  color: var(--fg-tertiary);
  letter-spacing: 0;
}

.cb-duration-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cb-duration {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 100ms;
}
.cb-duration:hover {
  border-color: var(--canopy-300);
  color: var(--fg-primary);
}
.cb-duration[data-selected="true"] {
  background: var(--canopy-700);
  border-color: var(--canopy-700);
  color: var(--mist-25);
}

.cb-res-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cb-res {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  color: var(--fg-secondary);
  transition: all 100ms;
}
.cb-res:hover {
  border-color: var(--canopy-300);
  color: var(--fg-primary);
}
.cb-res[data-selected="true"] {
  background: var(--canopy-50);
  border-color: var(--canopy-700);
  color: var(--fg-primary);
  font-weight: 500;
  box-shadow: 0 0 0 2px var(--canopy-100);
}
.cb-res .av {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--mist-25);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: -0.02em;
}

.cb-confirm-card {
  background: linear-gradient(180deg, var(--canopy-50), var(--bg-surface) 70%);
  border: 1px solid var(--canopy-200);
  border-radius: 12px;
  padding: 18px 20px;
}
.cb-confirm-when {
  border-bottom: 1px solid var(--canopy-100);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.cb-confirm-when-time {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--fg-brand);
  line-height: 1;
  margin-bottom: 4px;
}
.cb-confirm-when-day {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--canopy-500);
}
.cb-confirm-rows .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--canopy-100);
}
.cb-confirm-rows .row:last-child { border-bottom: 0; }
.cb-confirm-rows .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--canopy-500);
}
.cb-confirm-rows .v { color: var(--fg-primary); }
.cb-confirm-rows .v .mono { font-family: var(--font-mono); }
.cb-confirm-rows .v .cb-tag {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--sunlight-400);
  color: var(--canopy-900);
}

.cb-notify {
  display: flex;
  gap: 9px;
  font-size: 13px;
  color: var(--fg-secondary);
  align-items: flex-start;
  cursor: pointer;
}
.cb-notify input { margin-top: 3px; cursor: pointer; }
.cb-notify strong { color: var(--fg-primary); font-weight: 500; }

/* Override foot to space-between for create-booking */
.yj-modal[data-tone] .yj-modal-foot {
  /* no-op marker, leaves default */
}
#cb-back, #cb-next {
  /* normal */
}

/* ====== Availability editor ====== */
.av-week {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.av-day {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  align-items: flex-start;
}
.av-day[data-on="false"] { background: var(--bg-sunken); }
.av-day-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-primary);
  cursor: pointer;
  padding-top: 6px;
}
.av-day-toggle input { cursor: pointer; }
.av-day-name { font-size: 13.5px; font-weight: 500; }
.av-day-ranges {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.av-day-off {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  padding: 8px 4px;
}
.av-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.av-time {
  width: 78px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: var(--bg-surface);
  color: var(--fg-primary);
  outline: none;
}
.av-time:focus {
  border-color: var(--canopy-400);
  box-shadow: var(--ring-focus);
}
.av-arrow {
  font-family: var(--font-mono);
  color: var(--fg-tertiary);
  font-size: 14px;
}
.av-range-rm {
  background: transparent;
  border: 0;
  width: 22px; height: 22px;
  border-radius: 4px;
  color: var(--fg-tertiary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.av-range-rm:hover {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
.av-range-add {
  background: transparent;
  border: 0;
  padding: 4px 0;
  font-size: 11.5px;
  color: var(--canopy-700);
  cursor: pointer;
  text-align: left;
  width: fit-content;
}
.av-range-add:hover { text-decoration: underline; }

.av-overlap {
  background: var(--moss-50);
  border: 1px solid var(--moss-200);
  border-radius: 8px;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  color: var(--moss-500);
  font-size: 12.5px;
  line-height: 1.5;
}
.av-overlap .ic {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--moss-400);
  color: var(--mist-25);
  display: grid;
  place-items: center;
}
.av-overlap .ic svg { width: 12px; height: 12px; stroke-width: 2.2; }
.av-overlap strong { color: var(--moss-600); font-weight: 500; display: block; margin-bottom: 1px; }
.av-overlap .sub { color: var(--moss-500); font-size: 12px; }

.av-leave-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.av-leave-item {
  display: grid;
  grid-template-columns: 32px 1fr auto 22px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
}
.av-leave-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--canopy-50);
  color: var(--canopy-700);
  display: grid;
  place-items: center;
}
.av-leave-icon svg { width: 14px; height: 14px; stroke-width: 1.6; }
.av-leave-h {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-primary);
}
.av-leave-sub {
  font-size: 11px;
  color: var(--fg-tertiary);
  margin-top: 1px;
  letter-spacing: 0;
}
.av-leave-conflicts {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--status-danger);
  background: var(--status-danger-bg);
  padding: 3px 7px;
  border-radius: 4px;
}
.av-leave-clean {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss-500);
}
.av-leave-rm {
  background: transparent;
  border: 0;
  width: 22px; height: 22px;
  border-radius: 4px;
  color: var(--fg-tertiary);
  cursor: pointer;
  font-size: 14px;
}
.av-leave-rm:hover {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.av-cascade {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--status-danger-bg);
  border-radius: 8px;
  overflow: hidden;
}
.av-cascade-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px dashed var(--status-danger-bg);
  background: #FCEFEB;
}
.av-cascade-row:last-child { border-bottom: 0; }
.av-cascade-row .when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--status-danger);
}
.av-cascade-row .nm {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary);
}
.av-cascade-row .sub {
  font-size: 11.5px;
  color: var(--fg-tertiary);
  margin-top: 1px;
}
.av-cascade-row .action {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--status-danger);
}

/* ====== Service editor ====== */
.es-duration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.es-duration-cell { transition: opacity 160ms; }

.es-price-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  overflow: hidden;
}
.es-price-row:focus-within {
  border-color: var(--canopy-400);
  box-shadow: var(--ring-focus);
}
.es-price-sym {
  background: var(--mist-25);
  padding: 0 11px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-tertiary);
  border-right: 1px solid var(--border-subtle);
}
.es-price-row input.es-price {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-family: var(--font-mono);
  outline: none;
  box-shadow: none !important;
}

.es-res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.es-res {
  display: grid;
  grid-template-columns: 14px 26px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 120ms;
}
.es-res:hover {
  border-color: var(--canopy-300);
  background: var(--canopy-50);
}
.es-res.on {
  background: var(--canopy-50);
  border-color: var(--canopy-700);
  box-shadow: 0 0 0 1px var(--canopy-100);
}
.es-res input { cursor: pointer; }
.es-res .av {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--mist-25);
  letter-spacing: -0.02em;
}
.es-res .meta { min-width: 0; }
.es-res .nm {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.es-res .sub {
  font-size: 10.5px;
  color: var(--fg-tertiary);
}

/* ----- Booking rules block (auto-confirm, buffer, advance) ----- */
.es-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px;
}
.es-rule {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-surface);
  border-radius: 6px;
  cursor: pointer;
}
.es-rule-input { cursor: default; }
.es-rule-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.es-rule-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-primary);
}
.es-rule-sub {
  font-size: 11.5px;
  color: var(--fg-tertiary);
  line-height: 1.45;
}

/* Toggle switch */
.es-toggle {
  position: relative;
  display: inline-block;
}
.es-toggle input { opacity: 0; position: absolute; pointer-events: none; }
.es-toggle-track {
  width: 36px; height: 20px;
  background: var(--mist-200);
  border-radius: 999px;
  position: relative;
  transition: background 160ms;
  display: inline-block;
}
.es-toggle-thumb {
  width: 16px; height: 16px;
  background: var(--bg-surface);
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: transform 200ms cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 1px 2px rgba(7,20,12,0.18);
}
.es-toggle input:checked ~ .es-toggle-track {
  background: var(--canopy-700);
}
.es-toggle input:checked ~ .es-toggle-track .es-toggle-thumb {
  transform: translateX(16px);
}

/* Numeric stepper */
.es-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--bg-surface);
  overflow: hidden;
  font-family: var(--font-mono);
}
.es-stepper button {
  width: 26px;
  background: var(--bg-sunken);
  border: 0;
  color: var(--fg-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background 100ms;
}
.es-stepper button:hover { background: var(--canopy-50); color: var(--canopy-700); }
.es-stepper input {
  width: 48px;
  border: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  background: var(--bg-surface);
  color: var(--fg-primary);
  -moz-appearance: textfield;
  appearance: textfield;
}
.es-stepper input::-webkit-outer-spin-button,
.es-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.es-stepper-unit {
  padding: 0 9px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg-tertiary);
  background: var(--mist-25);
  border-left: 1px solid var(--border-subtle);
}

/* ----- Image upload slot ----- */
.es-image-slot {
  border: 1.5px dashed var(--border-default);
  border-radius: 10px;
  padding: 18px;
  background: var(--mist-25);
  text-align: center;
  transition: all 160ms;
  position: relative;
}
.es-image-slot:hover {
  border-color: var(--canopy-300);
  background: var(--canopy-50);
}
.es-image-slot[data-uploading="true"] {
  background: linear-gradient(90deg, var(--mist-25), var(--canopy-50), var(--mist-25));
  background-size: 200% 100%;
  animation: bk-shimmer 1.2s ease-in-out infinite;
  border-color: var(--canopy-300);
}
.es-image-slot.has-image {
  padding: 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  text-align: left;
}
.es-image-empty svg {
  width: 28px; height: 28px;
  color: var(--fg-tertiary);
  margin-bottom: 8px;
}
.es-image-h {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-primary);
  margin-bottom: 3px;
}
.es-image-sub {
  font-size: 11.5px;
  color: var(--fg-tertiary);
  margin-bottom: 12px;
  line-height: 1.4;
}
.es-image-empty .yj-btn-modal {
  padding: 6px 14px;
  font-size: 12px;
}
.es-image-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  min-height: 60px;
  position: relative;
  overflow: hidden;
}
.es-image-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 12, 0.45);
}
.es-image-preview > * { position: relative; z-index: 1; color: var(--mist-25); }
.es-image-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist-25);
}
.es-image-meta {
  font-size: 11px;
  color: var(--mist-100);
  margin-top: 2px;
}
.es-image-remove {
  background: rgba(255,255,255,0.16);
  color: var(--mist-25);
  border: 0;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.es-image-remove:hover { background: rgba(255,255,255,0.28); }

/* ----- Toast ----- */
.yj-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 1100;
  background: var(--canopy-800);
  color: var(--mist-25);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(7,20,12,0.30);
  opacity: 0;
  transition: opacity 200ms, transform 200ms cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; gap: 10px;
  border-left: 3px solid var(--moss-400);
}
.yj-toast[data-show="true"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.yj-toast[data-tone="warn"] { border-left-color: var(--sunlight-400); }
.yj-toast[data-tone="danger"] { border-left-color: #C24A36; }


/* ====================================================================
 * Account deletion (FR-084)
 * ================================================================== */
.del-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.del-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-secondary);
  padding-left: 18px;
  position: relative;
}
.del-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--status-danger);
}
.del-list strong { color: var(--fg-primary); font-weight: 500; }

.del-blocker {
  border: 1px solid #E5BCB4;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
}
.del-blocker-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  background: #FCEFEB;
  border-bottom: 1px dashed #E5BCB4;
  font-size: 12.5px;
}
.del-blocker-row:last-child { border-bottom: 0; }
.del-blocker-row .when {
  font-size: 12px;
  color: var(--status-danger);
}
.del-blocker-row .what { color: var(--fg-primary); }
.del-blocker-row .tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-surface);
  color: var(--status-danger);
  padding: 2px 7px;
  border-radius: 4px;
}
.del-blocker-more {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--fg-tertiary);
  background: var(--mist-25);
  text-align: center;
  font-style: italic;
}


/* ====================================================================
 * Availability — Add a block form (FR-033 range + custom_hours)
 * ================================================================== */
.av-add-form {
  background: var(--mist-25);
  border: 1.5px dashed var(--border-default);
  border-radius: 10px;
  padding: 16px;
}
.av-add-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.av-add-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.av-add-sub {
  font-size: 11.5px;
  color: var(--fg-tertiary);
}
.av-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.av-add-dates {
  grid-template-columns: 1fr 1fr 1fr;
}
.av-add-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.av-add-field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.av-add-input {
  padding: 7px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--fg-primary);
  outline: none;
  font-family: inherit;
}
.av-add-input:focus {
  border-color: var(--canopy-400);
  box-shadow: var(--ring-focus);
}
.av-add-seg {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
}
.av-add-seg button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--fg-secondary);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.av-add-seg button[data-active="true"] {
  background: var(--canopy-700);
  color: var(--mist-25);
  font-weight: 500;
}
.av-add-hours {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.av-add-hours .av-time {
  width: 64px;
}

.av-add-warn {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--sunlight-50);
  border: 1px solid var(--sunlight-200);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--sunlight-700);
  line-height: 1.5;
}
.av-add-warn-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--sunlight-400);
  color: var(--canopy-900);
  display: grid;
  place-items: center;
}
.av-add-warn-icon svg { width: 12px; height: 12px; stroke-width: 2; }
.av-add-warn strong { display: block; color: var(--sunlight-700); font-weight: 500; }

.av-add-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.av-add-hint {
  font-size: 11px;
  color: var(--fg-tertiary);
  font-style: italic;
}
