:root {
  color-scheme: light;
  --bg: #f8f4ef;
  --surface: #fffdfb;
  --surface-soft: #f3ece8;
  --surface-strong: #eee5df;
  --ink: #2e1830;
  --ink-soft: #6f6672;
  --ink-faint: #9d949e;
  --plum: #5d3c5c;
  --plum-dark: #432743;
  --plum-soft: #eee4ef;
  --sage: #6f8767;
  --sage-soft: #e6eee2;
  --apricot: #c96f4f;
  --apricot-soft: #fae7de;
  --lilac: #8d6c90;
  --lilac-soft: #eee6f1;
  --line: rgba(67, 39, 67, 0.1);
  --shadow: 0 10px 35px rgba(56, 32, 50, 0.08);
  --shadow-soft: 0 6px 22px rgba(56, 32, 50, 0.06);
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-right: var(--tg-content-safe-area-inset-right, 0px);
  --safe-bottom: var(--tg-content-safe-area-inset-bottom, 0px);
  --safe-left: var(--tg-content-safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100vh);
  overflow-x: hidden;
  background: #ece6e1;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(93, 60, 92, 0.25);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  position: relative;
  width: min(100%, 560px);
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100vh);
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(60, 38, 52, 0.08);
}

.app-content {
  min-height: 100%;
  padding-bottom: calc(116px + var(--safe-bottom));
}

.view {
  display: none;
  animation: view-in 260ms ease both;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar,
.simple-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(22px + var(--safe-top)) calc(20px + var(--safe-right)) 12px calc(20px + var(--safe-left));
}

.simple-header {
  justify-content: space-between;
  padding-top: calc(30px + var(--safe-top));
  padding-bottom: 24px;
}

.avatar {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-strong);
}

.avatar--owner {
  width: 56px;
  height: 56px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65);
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--plum-soft);
  color: var(--plum);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topbar__copy {
  min-width: 0;
  flex: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar h1,
.simple-header h1,
.section-heading h2,
.sheet h2,
.wizard h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.topbar h1 {
  font-size: 29px;
  line-height: 1;
}

.simple-header h1 {
  font-size: 36px;
  line-height: 1.05;
}

.simple-header h1 span {
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 20px;
}

.current-date {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  cursor: pointer;
}

.notification-button {
  color: var(--plum);
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface-soft);
  border-radius: 50%;
  background: #af6a9c;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  gap: 3px;
  padding: 12px 14px 20px;
}

.day-button {
  display: grid;
  min-height: 70px;
  padding: 8px 2px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.day-button span {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.day-button b {
  display: block;
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.day-button i {
  width: 5px;
  height: 5px;
  margin-top: 4px;
  border-radius: 50%;
  background: transparent;
}

.day-button.has-session i {
  background: currentColor;
  opacity: 0.65;
}

.day-button.is-selected {
  background: var(--plum);
  box-shadow: 0 9px 22px rgba(93, 60, 92, 0.22);
  color: #fff;
}

.attention-card {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 24px;
  padding: 18px;
  text-align: left;
  border: 1px solid rgba(201, 111, 79, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f7ece6 0%, #f3ebe9 100%);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.attention-card__headline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.attention-card__headline .chevron {
  margin-left: auto;
}

.attention-icon,
.mini-icon,
.task-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.attention-icon {
  background: var(--apricot);
}

.attention-icon svg,
.mini-icon svg,
.task-icon svg {
  width: 18px;
  height: 18px;
}

.mini-icon--apricot,
.task-icon--apricot {
  background: var(--apricot-soft);
  color: var(--apricot);
}

.mini-icon--lilac,
.task-icon--lilac {
  background: var(--lilac-soft);
  color: var(--lilac);
}

.attention-card__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
  padding-left: 3px;
}

.attention-card__items {
  display: contents;
}

.attention-card__item > span:last-child {
  min-width: 0;
}

.attention-card__item b,
.attention-card__item small {
  display: block;
}

.attention-card__item b {
  font-size: 14px;
  font-weight: 650;
}

.attention-card__item small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.agenda-section,
.day-summary {
  padding: 0 16px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-heading--compact {
  align-items: center;
}

.section-heading h2,
.sheet h2 {
  font-size: 31px;
}

.section-kicker {
  color: var(--ink-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.text-button {
  min-height: 44px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: var(--plum);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.timeline {
  position: relative;
  padding-bottom: 24px;
}

.timeline::before {
  position: absolute;
  top: 25px;
  bottom: 58px;
  left: 50px;
  width: 1px;
  background: rgba(93, 60, 92, 0.17);
  content: "";
}

.session-row {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.session-time {
  position: relative;
  padding-top: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
}

.session-time::after {
  position: absolute;
  top: 30px;
  right: -6px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--plum);
  content: "";
}

.session-card {
  width: 100%;
  padding: 17px;
  text-align: left;
  border: 1px solid rgba(93, 60, 92, 0.06);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.session-card__top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  gap: 11px;
  align-items: center;
}

.session-card__copy {
  min-width: 0;
}

.session-card h3 {
  overflow: hidden;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-card__copy > p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.dual-time {
  margin: 14px 0 10px;
  font-size: 14px;
  font-weight: 620;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.session-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-pill--paid {
  background: var(--sage-soft);
  color: #54704e;
}

.status-pill--later,
.status-pill--pending {
  background: var(--apricot-soft);
  color: #aa5537;
}

.status-pill--completed {
  background: var(--plum-soft);
  color: var(--plum);
}

.status-pill--unlinked {
  background: var(--lilac-soft);
  color: var(--lilac);
}

.deadline {
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.deadline--completion {
  color: #aa5537;
  font-weight: 720;
}

.deadline--receipt {
  color: var(--lilac);
  font-weight: 720;
}

.session-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.session-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.session-meta svg {
  width: 17px;
  height: 17px;
}

.session-meta .sync-warning {
  color: var(--apricot);
}

.empty-state {
  display: grid;
  min-height: 220px;
  padding: 32px 22px;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(93, 60, 92, 0.16);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
}

.empty-state b {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
}

.fab {
  position: fixed;
  z-index: 8;
  right: max(18px, calc((100vw - 560px) / 2 + 18px));
  bottom: calc(78px + var(--safe-bottom));
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--plum);
  box-shadow: 0 14px 30px rgba(67, 39, 67, 0.28);
  color: #fff;
  font-weight: 720;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.fab:active {
  transform: scale(0.97);
}

.fab svg {
  width: 22px;
  height: 22px;
}

.bottom-nav {
  position: fixed;
  z-index: 7;
  right: max(0px, calc((100vw - 560px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 560px) / 2));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(72px + var(--safe-bottom));
  padding: 7px 12px var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 251, 0.94);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  min-height: 56px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: pointer;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item.is-active {
  color: var(--plum);
  font-weight: 700;
}

.calendar-card {
  margin: 0 16px;
  padding: 18px 12px 14px;
  border: 1px solid rgba(93, 60, 92, 0.06);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.calendar-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-weekdays span {
  padding-bottom: 10px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.month-day {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.month-day.is-muted {
  color: var(--ink-faint);
  opacity: 0.45;
}

.month-day.is-selected {
  background: var(--plum);
  box-shadow: 0 6px 15px rgba(93, 60, 92, 0.22);
  color: #fff;
}

.day-dots {
  position: absolute;
  bottom: 5px;
  display: flex;
  gap: 2px;
}

.day-dots i,
.legend-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.dot-paid,
.legend-dot--paid { background: var(--sage); }
.dot-pending,
.legend-dot--pending { background: var(--apricot); }
.dot-later,
.legend-dot--later { background: var(--lilac); }
.month-day.is-selected .day-dots i { background: #fff; }

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding: 14px 20px 24px;
  color: var(--ink-soft);
  font-size: 11px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
}

.day-summary {
  padding-bottom: 28px;
}

.count-badge {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  place-items: center;
  border-radius: 999px;
  background: var(--plum-soft);
  color: var(--plum);
  font-weight: 750;
}

.compact-list,
.client-list {
  display: grid;
  gap: 10px;
}

.compact-session,
.client-card {
  display: flex;
  width: 100%;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  text-align: left;
  border: 1px solid rgba(93, 60, 92, 0.06);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.compact-session__time {
  min-width: 46px;
  color: var(--plum);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
}

.compact-session__copy,
.client-card__copy {
  min-width: 0;
  flex: 1;
}

.compact-session b,
.compact-session small,
.client-card b,
.client-card small {
  display: block;
}

.compact-session small,
.client-card small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin: 0 16px 14px;
  padding: 0 15px;
  border: 1px solid rgba(93, 60, 92, 0.08);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink-faint);
}

.search-field svg {
  width: 20px;
  height: 20px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--ink-faint);
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 17px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: var(--plum);
  background: var(--plum);
  color: #fff;
}

.client-list {
  padding: 0 16px 30px;
}

.client-card .status-pill {
  padding: 4px 8px;
}

.client-card .chevron,
.task-card .chevron,
.session-card .chevron {
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
}

.overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(37, 22, 35, 0.35);
  opacity: 0;
  backdrop-filter: blur(3px);
  transition: opacity 200ms ease;
}

.overlay.is-visible {
  opacity: 1;
}

.sheet {
  position: fixed;
  z-index: 21;
  right: max(0px, calc((100vw - 560px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 560px) / 2));
  max-height: min(86vh, 760px);
  overflow-y: auto;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  border-radius: 30px 30px 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 50px rgba(44, 25, 40, 0.18);
  transform: translateY(105%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet.is-open {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: rgba(93, 60, 92, 0.16);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sheet-close {
  width: 40px;
  height: 40px;
}

.detail-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-profile .avatar {
  width: 62px;
  height: 62px;
}

.detail-profile h2 {
  font-size: 29px;
}

.detail-profile p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.detail-time-card {
  margin: 20px 0 14px;
  padding: 17px;
  border-radius: 20px;
  background: var(--surface-soft);
}

.detail-time-card strong,
.detail-time-card span {
  display: block;
}

.detail-time-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.detail-time-card span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 13px;
}

.detail-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}

.detail-status {
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.detail-status small,
.detail-status b {
  display: block;
}

.detail-status small {
  color: var(--ink-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-status b {
  margin-top: 7px;
  font-size: 13px;
}

.detail-status--attention {
  border-color: rgba(201, 111, 79, 0.24);
  background: var(--apricot-soft);
}

.detail-status--wide {
  grid-column: 1 / -1;
  min-height: 72px;
}

.automation-summary {
  display: grid;
  gap: 8px;
  margin: -4px 0 20px;
  padding: 14px;
  border-radius: 17px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
}

.automation-summary span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.automation-summary svg {
  width: 17px;
  height: 17px;
  color: var(--plum);
}

.claim-link-preview {
  display: grid;
  gap: 7px;
  margin: -6px 0 20px;
  padding: 14px;
  border: 1px solid rgba(201, 111, 79, 0.2);
  border-radius: 17px;
  background: var(--apricot-soft);
}

.claim-link-preview small {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.claim-link-preview code {
  overflow-wrap: anywhere;
  color: var(--plum);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.claim-message-preview {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.claim-link-preview span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.action-button,
.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 0 14px;
  border-radius: 16px;
  font-weight: 720;
  cursor: pointer;
}

.action-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--plum);
}

.action-button--wide {
  grid-column: 1 / -1;
}

.action-button svg {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -4px;
}

.action-button--primary,
.primary-button {
  border: 0;
  background: var(--plum);
  color: #fff;
}

.action-button--danger {
  color: var(--apricot);
}

.action-button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.completion-client {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
}

.completion-client .avatar {
  width: 48px;
  height: 48px;
}

.completion-client span:last-child {
  min-width: 0;
}

.completion-client b,
.completion-client small {
  display: block;
}

.completion-client small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.completion-consequences {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 16px;
  border-radius: 19px;
  background: var(--sage-soft);
}

.completion-consequences > b {
  font-size: 14px;
}

.completion-consequences > span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.completion-consequences svg,
.receipt-connection-note > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--plum);
}

.receipt-connection-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid rgba(157, 132, 168, 0.25);
  border-radius: 19px;
  background: var(--lilac-soft);
}

.receipt-connection-note b,
.receipt-connection-note small {
  display: block;
}

.receipt-connection-note small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.completion-actions {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
}

.task-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.task-card b,
.task-card small {
  display: block;
}

.task-card small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.wizard {
  position: fixed;
  z-index: 30;
  top: 0;
  right: max(0px, calc((100vw - 560px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 560px) / 2));
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px);
  transition: opacity 200ms ease, transform 240ms ease;
}

.wizard.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wizard-header {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  gap: 10px;
  align-items: center;
  padding: calc(15px + var(--safe-top)) 16px 12px;
}

.wizard-header h2 {
  overflow: hidden;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 3px;
  margin: 0 20px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-strong);
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--plum);
  transition: width 220ms ease;
}

.wizard-body {
  overflow-y: auto;
  padding: 22px 20px 28px;
}

.wizard-lead {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.unscheduled-copy-card {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.unscheduled-copy-card b {
  color: var(--ink);
  font-size: 14px;
}

.unscheduled-copy-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice-card {
  display: flex;
  width: 100%;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
}

.choice-card.is-selected {
  border-color: rgba(93, 60, 92, 0.55);
  box-shadow: 0 0 0 2px rgba(93, 60, 92, 0.08), var(--shadow-soft);
}

.choice-card__copy {
  min-width: 0;
  flex: 1;
}

.choice-card b,
.choice-card small {
  display: block;
}

.choice-card small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.radio-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(93, 60, 92, 0.25);
  border-radius: 50%;
}

.choice-card.is-selected .radio-mark {
  border: 6px solid var(--plum);
}

.new-client-card {
  display: flex;
  width: 100%;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px;
  text-align: left;
  border: 1px solid rgba(93, 60, 92, 0.18);
  border-radius: 19px;
  background: var(--plum-soft);
  color: var(--plum);
  cursor: pointer;
}

.new-client-card.is-selected {
  border-color: var(--plum);
  box-shadow: 0 0 0 2px rgba(93, 60, 92, 0.08);
}

.new-client-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.new-client-card b,
.new-client-card small {
  display: block;
}

.new-client-card small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.new-client-card__icon,
.automation-toggle__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
}

.new-client-card__icon svg,
.automation-toggle__icon svg {
  width: 20px;
  height: 20px;
}

.new-client-form {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.new-client-form > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.form-field span,
.form-field input {
  display: block;
}

.form-field span {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 750;
}

.form-field span i {
  color: var(--ink-faint);
  font-weight: 500;
  font-style: normal;
}

.form-field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--bg);
  color: var(--ink);
}

.form-field input:focus {
  border-color: var(--plum);
}

.text-action {
  justify-self: start;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--plum);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.search-field--wizard {
  margin: 0 0 14px;
}

.existing-client-block > .form-label {
  margin-top: 4px;
}

.date-strip {
  display: flex;
  gap: 9px;
  margin: 0 -20px 18px;
  padding: 0 20px 7px;
  overflow-x: auto;
  scroll-padding-inline: 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

.date-option {
  width: 92px;
  min-width: 92px;
  min-height: 68px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  cursor: pointer;
  scroll-snap-align: center;
}

.date-option span,
.date-option b {
  display: block;
}

.date-option span {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: capitalize;
}

.date-option b {
  font-size: 14px;
}

.date-option.is-selected {
  border-color: var(--plum);
  background: var(--plum);
  color: #fff;
}

.date-option.is-selected span {
  color: rgba(255, 255, 255, 0.76);
}

.form-field--date {
  margin-bottom: 20px;
}

.time-input-field {
  display: block;
  margin-bottom: 16px;
}

.time-input-field input {
  height: 58px;
  background: var(--surface);
  color: var(--plum);
  font-size: 24px;
  font-weight: 750;
  text-align: center;
}

.form-label--compact {
  color: var(--ink-soft);
  font-size: 12px;
}

.time-scroll {
  display: grid;
  max-height: 178px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 4px 10px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--lilac) transparent;
  scrollbar-width: thin;
}

.time-scroll .select-tile {
  min-height: 48px;
  scroll-margin-block: 58px;
}

.select-tile {
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  cursor: pointer;
}

.select-tile.is-selected {
  border-color: var(--plum);
  background: var(--plum);
  color: #fff;
}

.form-label {
  display: block;
  margin: 0 0 9px;
  font-size: 13px;
  font-weight: 750;
}

.form-label--section {
  margin-top: 24px;
}

.automation-toggle {
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
}

.automation-toggle > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.automation-toggle b,
.automation-toggle small {
  display: block;
}

.automation-toggle small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.automation-toggle > i {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface-strong);
  transition: background 160ms ease;
}

.automation-toggle > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(44, 25, 40, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.automation-toggle.is-on {
  border-color: rgba(111, 135, 103, 0.35);
  background: var(--sage-soft);
}

.automation-toggle.is-on > i {
  background: var(--sage);
}

.automation-toggle.is-on > i::after {
  transform: translateX(18px);
}

.delivery-options {
  display: grid;
  gap: 9px;
}

.select-rule {
  min-height: 66px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
}

.select-rule b,
.select-rule small {
  display: block;
}

.select-rule small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.select-rule.is-selected {
  border-color: var(--plum);
  background: var(--plum-soft);
}

.timezone-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 18px;
  background: var(--plum-soft);
  color: var(--plum);
}

.timezone-preview span,
.timezone-preview b {
  display: block;
}

.timezone-preview span {
  font-size: 11px;
  opacity: 0.75;
}

.timezone-preview b {
  margin-top: 4px;
  font-size: 15px;
}

.wizard-error {
  margin: 12px 0 0;
  color: var(--apricot);
  font-size: 13px;
  font-weight: 650;
}

.confirmation-card {
  padding: 18px;
  border: 1px solid rgba(93, 60, 92, 0.08);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.confirmation-client {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.confirmation-client b,
.confirmation-client small {
  display: block;
}

.confirmation-client small {
  margin-top: 4px;
  color: var(--ink-soft);
}

.confirmation-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  color: var(--ink-soft);
  font-size: 13px;
}

.confirmation-line b {
  max-width: 60%;
  color: var(--ink);
  text-align: right;
}

.sync-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.sync-preview span {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border-radius: 14px;
  background: var(--sage-soft);
  color: #54704e;
  font-size: 12px;
  font-weight: 700;
}

.sync-preview svg {
  width: 17px;
  height: 17px;
}

.workflow-preview {
  display: grid;
  gap: 8px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.workflow-preview span {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.workflow-preview svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--sage);
}

.wizard-footer {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.4fr);
  gap: 10px;
  padding: 12px 20px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(248, 244, 239, 0.94);
  backdrop-filter: blur(18px);
}

.wizard-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--plum-soft);
  color: var(--plum);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.wizard-status.is-error {
  background: var(--apricot-soft);
  color: var(--apricot);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--plum);
}

.primary-button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.toast {
  position: fixed;
  z-index: 50;
  right: max(16px, calc((100vw - 560px) / 2 + 16px));
  bottom: calc(86px + var(--safe-bottom));
  left: max(16px, calc((100vw - 560px) / 2 + 16px));
  max-width: 528px;
  margin: 0 auto;
  padding: 14px 17px;
  border-radius: 16px;
  background: var(--plum-dark);
  box-shadow: 0 12px 30px rgba(34, 19, 32, 0.3);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.has-modal {
  overflow: hidden;
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    border-radius: 32px;
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 32px 32px;
  }

  .sheet,
  .wizard {
    bottom: 24px;
  }

  .wizard {
    top: 24px;
    border-radius: 32px;
    overflow: hidden;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 10px;
  }

  .avatar--owner {
    width: 50px;
    height: 50px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .session-card {
    padding: 14px;
  }

  .fab span {
    display: none;
  }

  .fab {
    width: 54px;
    padding: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1f181e;
  --surface: #2a2229;
  --surface-soft: #342a32;
  --surface-strong: #40343d;
  --ink: #fbf4f8;
  --ink-soft: #c2b6c0;
  --ink-faint: #918590;
  --plum: #b890b1;
  --plum-dark: #583e55;
  --plum-soft: #3c2d3b;
  --sage-soft: #29352a;
  --apricot-soft: #442d29;
  --lilac-soft: #372c3b;
  --line: rgba(255, 255, 255, 0.09);
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 7px 24px rgba(0, 0, 0, 0.14);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell {
  background: var(--bg);
}

html[data-theme="dark"] .attention-card {
  background: linear-gradient(135deg, #382925 0%, #33282f 100%);
}

html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .wizard-footer {
  background: rgba(42, 34, 41, 0.94);
}
