/* =====================================================================
   shadcn/ui design tokens (neutral theme) + component styles
   ported to plain CSS so they work without React or a build step.
   ===================================================================== */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 3.9%;
  --primary: 0 0% 9%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 96.1%;
  --secondary-foreground: 0 0% 9%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --accent: 0 0% 96.1%;
  --accent-foreground: 0 0% 9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 89.8%;
  --input: 0 0% 89.8%;
  --ring: 0 0% 3.9%;
  --radius: 0.5rem;
  --chart-1: 12 76% 61%;
  --chart-2: 173 58% 39%;
  --chart-3: 197 37% 24%;
  --chart-4: 43 74% 66%;
  --chart-5: 27 87% 67%;
  --sidebar: 0 0% 98%;
  --sidebar-foreground: 0 0% 25%;
  --sidebar-accent: 0 0% 94%;
  --sidebar-border: 0 0% 91%;
  --success: 142 71% 40%;
  --warning: 38 92% 50%;
  --info: 217 91% 60%;
}
.dark {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --card: 0 0% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 0 0% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 14.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  --accent: 0 0% 14.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 50%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 14.9%;
  --input: 0 0% 14.9%;
  --ring: 0 0% 83.1%;
  --chart-1: 220 70% 50%;
  --chart-2: 160 60% 45%;
  --chart-3: 30 80% 55%;
  --chart-4: 280 65% 60%;
  --chart-5: 340 75% 55%;
  --sidebar: 0 0% 6%;
  --sidebar-foreground: 0 0% 90%;
  --sidebar-accent: 0 0% 14.9%;
  --sidebar-border: 0 0% 14.9%;
  --success: 142 69% 45%;
  --warning: 38 92% 55%;
  --info: 217 91% 65%;
}

* { border-color: hsl(var(--border)); }
html { scroll-behavior: smooth; }
body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-feature-settings: "rlig" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
}
::selection { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 999px; border: 2px solid hsl(var(--background)); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  white-space: nowrap; border-radius: calc(var(--radius) - 2px);
  font-size: .875rem; line-height: 1.25rem; font-weight: 500;
  height: 2.25rem; padding: 0 1rem; cursor: pointer; user-select: none;
  border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, opacity .15s;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
}
.btn:hover { background: hsl(var(--primary) / .9); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / .8); }
.btn-outline { background: hsl(var(--background)); color: hsl(var(--foreground)); border-color: hsl(var(--input)); }
.btn-outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); box-shadow: none; }
.btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.btn-destructive:hover { background: hsl(var(--destructive) / .9); }
.btn-link { background: transparent; color: hsl(var(--foreground)); box-shadow: none; padding: 0; height: auto; text-underline-offset: 4px; }
.btn-link:hover { background: transparent; text-decoration: underline; }
.btn-sm { height: 2rem; padding: 0 .75rem; font-size: .8125rem; }
.btn-lg { height: 2.5rem; padding: 0 2rem; }
.btn-icon { width: 2.25rem; padding: 0; }
.btn-icon.btn-sm { width: 2rem; }

/* ---------- Card ---------- */
.card { border: 1px solid hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--card-foreground)); border-radius: calc(var(--radius) + 4px); box-shadow: 0 1px 3px 0 rgb(0 0 0 / .04); }
.card-header { display: flex; flex-direction: column; gap: .375rem; padding: 1.5rem; }
.card-title { font-weight: 600; line-height: 1; letter-spacing: -.01em; }
.card-description { font-size: .875rem; color: hsl(var(--muted-foreground)); }
.card-content { padding: 0 1.5rem 1.5rem; }
.card-footer { display: flex; align-items: center; padding: 0 1.5rem 1.5rem; }

/* ---------- Form controls ---------- */
.label { font-size: .875rem; font-weight: 500; line-height: 1; display: inline-block; }
.input, .textarea, .select {
  display: flex; width: 100%; border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input)); background: transparent; color: hsl(var(--foreground));
  font-size: .875rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / .04);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input, .select { height: 2.25rem; padding: 0 .75rem; }
.textarea { min-height: 4.5rem; padding: .5rem .75rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { box-shadow: 0 0 0 1px hsl(var(--ring)); outline: none; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: hsl(var(--destructive)); box-shadow: 0 0 0 1px hsl(var(--destructive) / .4); }
.input:disabled { opacity: .5; cursor: not-allowed; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center; background-size: 14px;
}
.select option { background: hsl(var(--popover)); color: hsl(var(--popover-foreground)); }
input[type="date"].input, input[type="time"].input { color-scheme: light; }
.dark input[type="date"].input, .dark input[type="time"].input { color-scheme: dark; }

.checkbox {
  appearance: none; -webkit-appearance: none; width: 1rem; height: 1rem; flex-shrink: 0; cursor: pointer;
  border: 1px solid hsl(var(--primary)); border-radius: 4px; display: inline-grid; place-content: center;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
}
.checkbox:checked { background: hsl(var(--primary)); }
.checkbox:checked::after {
  content: ""; width: 10px; height: 10px; background: hsl(var(--primary-foreground));
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.checkbox:disabled { opacity: .5; cursor: not-allowed; }

.switch { position: relative; display: inline-flex; width: 2.25rem; height: 1.25rem; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: hsl(var(--input)); transition: background .2s; box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05); }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 1rem; height: 1rem; border-radius: 999px; background: hsl(var(--background)); box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: transform .2s; }
.switch input:checked + span { background: hsl(var(--primary)); }
.switch input:checked + span::after { transform: translateX(1rem); }
.switch input:focus-visible + span { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .375rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent; padding: .125rem .625rem; font-size: .75rem; font-weight: 600; line-height: 1rem; white-space: nowrap;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
}
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-outline { background: transparent; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
.badge-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }

/* Status badge: outline + coloured dot */
.status { display: inline-flex; align-items: center; gap: .375rem; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); padding: .125rem .5rem; font-size: .75rem; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: hsl(var(--muted-foreground)); }
.status-confirmed::before, .status-active::before, .status-succeeded::before, .status-paid::before { background: hsl(var(--success)); }
.status-pending::before, .status-trial::before, .status-unpaid::before { background: hsl(var(--warning)); }
.status-completed::before, .status-free::before { background: hsl(var(--info)); }
.status-cancelled::before, .status-rejected::before, .status-failed::before, .status-suspended::before { background: hsl(var(--destructive)); }
.status-noshow::before { background: hsl(280 65% 60%); }
.status-refunded::before { background: hsl(var(--muted-foreground)); }

/* ---------- Avatar ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 500; flex-shrink: 0; overflow: hidden; user-select: none; }

/* ---------- Tabs ---------- */
.tabs-list { display: inline-flex; align-items: center; height: 2.25rem; border-radius: var(--radius); background: hsl(var(--muted)); padding: .25rem; color: hsl(var(--muted-foreground)); gap: 2px; }
.tabs-trigger { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; white-space: nowrap; border-radius: calc(var(--radius) - 2px); padding: .25rem .75rem; font-size: .875rem; font-weight: 500; height: 100%; transition: all .15s; cursor: pointer; }
.tabs-trigger:hover { color: hsl(var(--foreground)); }
.tabs-trigger[data-state="active"] { background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 1px 3px 0 rgb(0 0 0 / .1); }
.dark .tabs-trigger[data-state="active"] { background: hsl(var(--background)); }
.tabs-trigger svg { width: 1rem; height: 1rem; }

/* ---------- Table ---------- */
.table { width: 100%; caption-side: bottom; font-size: .875rem; border-collapse: collapse; }
.table thead tr { border-bottom: 1px solid hsl(var(--border)); }
.table th { height: 2.5rem; padding: 0 .75rem; text-align: left; vertical-align: middle; font-weight: 500; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.table td { padding: .625rem .75rem; vertical-align: middle; }
.table tbody tr { border-bottom: 1px solid hsl(var(--border)); transition: background .15s; }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: hsl(var(--muted) / .5); }
.table th:first-child, .table td:first-child { padding-left: 1rem; }
.table th:last-child, .table td:last-child { padding-right: 1rem; }

/* ---------- Separator / Kbd / Progress / Skeleton ---------- */
.separator { height: 1px; width: 100%; background: hsl(var(--border)); flex-shrink: 0; }
.separator-v { width: 1px; align-self: stretch; background: hsl(var(--border)); }
.kbd { display: inline-flex; align-items: center; gap: 2px; height: 1.25rem; padding: 0 .375rem; border-radius: 4px; border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); font-family: "Geist Mono", ui-monospace, monospace; font-size: 10px; font-weight: 500; color: hsl(var(--muted-foreground)); }
.progress { position: relative; height: .5rem; width: 100%; overflow: hidden; border-radius: 999px; background: hsl(var(--primary) / .15); }
.progress > div { height: 100%; background: hsl(var(--primary)); border-radius: 999px; transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* ---------- Dropdown / Popover ---------- */
.popover { position: absolute; z-index: 50; min-width: 8rem; border-radius: calc(var(--radius) - 2px); border: 1px solid hsl(var(--border)); background: hsl(var(--popover)); color: hsl(var(--popover-foreground)); padding: .25rem; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .2), 0 4px 6px -4px rgb(0 0 0 / .1); animation: popIn .12s ease-out; }
.popover.hidden { display: none; }
.menu-item { display: flex; width: 100%; align-items: center; gap: .5rem; border-radius: calc(var(--radius) - 4px); padding: .375rem .5rem; font-size: .875rem; cursor: pointer; text-align: left; }
.menu-item:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.menu-item svg { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); }
.menu-label { padding: .375rem .5rem; font-size: .875rem; font-weight: 600; }
.menu-sep { height: 1px; margin: .25rem -.25rem; background: hsl(var(--border)); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- Dialog & Sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .8); opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.dialog { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; pointer-events: none; }
.dialog-content { width: 100%; max-width: 32rem; max-height: calc(100vh - 2rem); overflow-y: auto; border: 1px solid hsl(var(--border)); background: hsl(var(--background)); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25); opacity: 0; transform: scale(.96); transition: opacity .2s, transform .2s; }
.dialog.open { pointer-events: auto; }
.dialog.open .dialog-content { opacity: 1; transform: none; }
.dialog-top { place-items: start center; padding-top: 12vh; }
.sheet { position: fixed; z-index: 50; top: 0; right: 0; height: 100%; width: 100%; max-width: 28rem; display: flex; flex-direction: column; background: hsl(var(--background)); border-left: 1px solid hsl(var(--border)); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25); transform: translateX(100%); transition: transform .3s cubic-bezier(.32,.72,0,1); }
.sheet.open { transform: none; }

/* ---------- Toast (sonner style) ---------- */
#toast-root { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; width: min(356px, calc(100vw - 2rem)); }
.toast { display: flex; gap: .625rem; align-items: flex-start; padding: 1rem; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--popover)); color: hsl(var(--popover-foreground)); font-size: .8125rem; box-shadow: 0 4px 12px rgb(0 0 0 / .1); animation: toastIn .35s cubic-bezier(.21,1.02,.73,1); }
.toast svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 1px; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(100%); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(110%); } }

/* ---------- Accordion (details) ---------- */
.accordion details { border-bottom: 1px solid hsl(var(--border)); }
.accordion summary { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; font-size: .9375rem; font-weight: 500; cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.accordion summary svg { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); transition: transform .2s; flex-shrink: 0; }
.accordion details[open] summary svg { transform: rotate(180deg); }
.accordion details > div { padding-bottom: 1rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }

/* ---------- Sidebar (shadcn sidebar block) ---------- */
.sidebar-btn { display: flex; width: 100%; align-items: center; gap: .5rem; height: 2rem; padding: 0 .5rem; border-radius: calc(var(--radius) - 2px); font-size: .875rem; color: hsl(var(--sidebar-foreground)); transition: background .15s; }
.sidebar-btn:hover { background: hsl(var(--sidebar-accent)); color: hsl(var(--foreground)); }
.sidebar-btn.active { background: hsl(var(--sidebar-accent)); color: hsl(var(--foreground)); font-weight: 500; }
.sidebar-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.sidebar-label { padding: 0 .5rem; height: 2rem; display: flex; align-items: center; font-size: .75rem; font-weight: 500; color: hsl(var(--sidebar-foreground) / .7); }

/* ---------- Selectable option card (RadioGroup card) ---------- */
.option { cursor: pointer; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); transition: border-color .15s, background .15s, box-shadow .15s; }
.option:hover { background: hsl(var(--accent) / .6); }
.option.selected { border-color: hsl(var(--primary)); box-shadow: 0 0 0 1px hsl(var(--primary)); }

/* ---------- Calendar (shadcn date picker look) ---------- */
.cal-day { height: 2.25rem; width: 100%; border-radius: calc(var(--radius) - 2px); font-size: .875rem; display: grid; place-items: center; position: relative; transition: background .15s; }
.cal-day.available { cursor: pointer; font-weight: 500; }
.cal-day.available:hover { background: hsl(var(--accent)); }
.cal-day.available::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 999px; background: hsl(var(--foreground) / .45); }
.cal-day.today { background: hsl(var(--accent)); }
.cal-day.selected { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.cal-day.selected::after { background: hsl(var(--primary-foreground)); }
.cal-day.disabled { color: hsl(var(--muted-foreground)); opacity: .5; cursor: not-allowed; }

.slot { height: 2.25rem; border-radius: calc(var(--radius) - 2px); border: 1px solid hsl(var(--input)); font-size: .875rem; font-weight: 500; transition: all .15s; cursor: pointer; background: hsl(var(--background)); }
.slot:hover { background: hsl(var(--accent)); }
.slot.selected { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }
.slot:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

/* Week calendar grid */
.week-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(110px, 1fr)); }
.hour-row { height: 60px; border-top: 1px solid hsl(var(--border)); }
.event-block { position: absolute; border-radius: calc(var(--radius) - 2px); padding: .3rem .45rem; font-size: .72rem; line-height: 1.15; overflow: hidden; cursor: pointer; border-left: 3px solid; transition: box-shadow .15s; }
.event-block:hover { box-shadow: 0 4px 12px rgb(0 0 0 / .15); z-index: 5; }

/* Steps */
.step-dot { width: 1.75rem; height: 1.75rem; border-radius: 999px; display: grid; place-items: center; font-size: .75rem; font-weight: 600; border: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); background: hsl(var(--background)); transition: all .2s; flex-shrink: 0; }
.step-dot.current { border-color: hsl(var(--primary)); color: hsl(var(--foreground)); box-shadow: 0 0 0 3px hsl(var(--primary) / .12); }
.step-dot.done { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }

/* Dotted background for marketing hero */
.bg-dots { background-image: radial-gradient(hsl(var(--foreground) / .12) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%); }

/* Subtle motion */
.fade-in { animation: fadeIn .35s ease-out both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
