/* Turnero demo: Calendly-inspired scheduling app. Desktop shell >= 900px, mobile shell below. */
:root {
  --blue: #0069ff;
  --blue-d: #0052cc;
  --blue-50: #f0f6ff;
  --blue-100: #dce9ff;
  --navy: #0b2447;
  --ink: #1d2433;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e6e9ef;
  --line-2: #f1f3f7;
  --bg: #f7f8fa;
  --card: #ffffff;
  --green: #12b76a;
  --red: #e5484d;
  --amber: #f79009;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.07);
  --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, 0.1), 0 2px 4px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 28px 60px -16px rgba(16, 24, 40, 0.32);
  --hour: 84px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  overflow: clip; /* clip also blocks programmatic scrolling that would reveal hidden sheets */
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
[data-icon] { display: inline-flex; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100dvh; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.views { flex: 1; min-height: 0; overflow: auto; position: relative; }
.view { min-height: 100%; animation: view-in 0.32s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.rail { display: none; }
.m-only { display: none !important; }

@media (min-width: 1280px) {
  .app[data-screen='agenda'] { grid-template-columns: 252px minmax(0, 1fr) 312px; }
  .app[data-screen='agenda'] .rail { display: flex; }
}

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border-right: 1px solid var(--line);
  padding: 18px 14px 14px; min-height: 0; overflow: auto;
}
.sidebar > * { flex-shrink: 0; }
@media (max-height: 820px) { .share-card { display: none; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; font-weight: 800; font-size: 19px; color: var(--navy); letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: conic-gradient(from 210deg, #0069ff, #6a5cff, #d444f1, #ff9f1a, #0069ff);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.biz {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  transition: background 0.2s;
}
.biz:hover { background: var(--bg); }
.biz-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.biz-name { font-weight: 700; color: var(--navy); line-height: 1.2; }
.biz-plan { font-size: 12px; color: var(--muted); }
.biz .chev { margin-left: auto; color: var(--faint); }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: 10px; font-weight: 600; color: #475467;
  transition: background 0.18s, color 0.18s;
}
.nav-item:hover { background: var(--bg); color: var(--navy); }
.nav-item.on { background: var(--blue-50); color: var(--blue); }
.nav-item .badge { margin-left: auto; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center;
}
.share-card {
  margin-top: 14px; padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, #0b2447, #123a72); color: #fff; position: relative; overflow: hidden;
}
.share-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #d444f1, transparent 70%); opacity: 0.55;
}
.share-card p { font-size: 12px; opacity: 0.75; }
.share-card strong { display: block; font-size: 13px; margin: 2px 0 10px; word-break: break-all; position: relative; z-index: 1; }
.share-card .btn { position: relative; z-index: 1; }
.sb-foot { margin-top: auto; padding-top: 14px; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me-name { font-weight: 700; color: var(--navy); line-height: 1.2; }
.me-role { font-size: 12px; color: var(--muted); }
.me .icon-btn { margin-left: auto; }
.made-by {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #111; color: rgba(255, 255, 255, 0.7); border-radius: 10px; padding: 8px;
  font-size: 11px; font-weight: 600; text-decoration: none;
}
.made-by img { height: 18px; width: auto; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px; background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; line-height: 1.1; }
.topbar .sub { font-size: 13px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; width: 260px;
  padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--faint);
  background: var(--card); transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.search input { border: 0; outline: 0; background: none; width: 100%; color: var(--ink); }
.search input::placeholder { color: var(--faint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 700; white-space: nowrap;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s, color 0.18s, border-color 0.18s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 14px -6px rgba(0, 105, 255, 0.7); }
.btn-primary:hover { background: var(--blue-d); }
.btn-primary:disabled { background: #b8c4d6; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { border: 1.5px solid var(--line); background: var(--card); color: var(--navy); }
.btn-ghost:hover { border-color: #cdd3dd; background: var(--bg); }
.btn-soft { background: var(--blue-50); color: var(--blue); }
.btn-soft:hover { background: var(--blue-100); }
.btn-white { background: #fff; color: var(--navy); height: 32px; padding: 0 12px; font-size: 12px; }
.btn-danger { background: #fff1f1; color: var(--red); }
.btn-danger:hover { background: #ffe1e1; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #475467; position: relative;
  transition: background 0.18s;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 2px var(--card);
}

/* ---------- Avatars ---------- */
.av {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 800; font-size: 12px; letter-spacing: 0.02em;
  background: var(--h, var(--blue));
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%);
}
.av-sm { width: 26px; height: 26px; font-size: 10px; }
.av-lg { width: 48px; height: 48px; font-size: 16px; }
.stack { display: flex; }
.stack .av { box-shadow: 0 0 0 2.5px var(--card); }
.stack .av + .av { margin-left: -8px; }

/* ---------- Agenda ---------- */
.agenda { display: flex; flex-direction: column; height: 100%; }
.ag-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 28px; flex-wrap: wrap; }
.ag-toolbar h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-left: 6px; }
.ag-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #eceef3; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); transition: all 0.2s; }
.seg button.on { background: var(--card); color: var(--navy); box-shadow: var(--shadow-sm); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 5px; flex: none;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 13px; color: #475467;
  transition: all 0.18s;
}
.chip.text { padding: 0 12px; }
.chip.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }

.cal {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  margin: 0 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cal-head, .cal-grid { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); overflow: hidden; scrollbar-gutter: stable; }
.cal-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; }
.col-h { display: flex; align-items: center; gap: 10px; padding: 12px; border-left: 1px solid var(--line); min-width: 0; }
.col-h .t { font-weight: 800; color: var(--navy); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-h .s { font-size: 12px; color: var(--muted); }
.col-h.day { flex-direction: column; gap: 2px; padding: 10px 4px; }
.col-h.day .dn { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--faint); text-transform: uppercase; }
.col-h.day .dd { font-size: 20px; font-weight: 600; color: var(--navy); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; transition: background 0.2s; }
.col-h.day:hover .dd { background: var(--bg); }
.col-h.day.today .dn { color: var(--blue); }
.col-h.day.today .dd { background: var(--blue); color: #fff; }
.col-h.day.sel:not(.today) .dd { background: var(--blue-100); color: var(--blue); }

.cal-grid { position: relative; height: calc(var(--span) * var(--hour)); }
.times { position: relative; }
.times span { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--faint); }
.col {
  position: relative; border-left: 1px solid var(--line); cursor: crosshair;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.col.closed { cursor: not-allowed; }
.off {
  position: absolute; left: 0; right: 0; pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(152, 162, 179, 0.09) 0 6px, transparent 6px 12px);
}
.closed-label {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg);
  font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.ev {
  position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  padding: 4px 8px; border-radius: 8px; color: var(--navy);
  background: color-mix(in srgb, var(--c) 12%, white);
  border-left: 3px solid var(--c);
  transition: box-shadow 0.2s, transform 0.2s, filter 0.2s;
  cursor: pointer;
}
.ev:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); z-index: 3; }
.ev-name { font-weight: 800; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-meta { line-height: 1.3; font-size: 11.5px; color: #4a5568; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-time { color: var(--c); font-weight: 700; filter: brightness(0.8); }
.ev.compact { padding: 3px 5px; border-left-width: 2.5px; border-radius: 6px; }
.ev.compact .ev-name { font-size: 11.5px; }
.ev.compact .ev-meta { font-size: 10.5px; }
.ev.pending {
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 14%, white) 0 7px, color-mix(in srgb, var(--c) 5%, white) 7px 14px);
  outline: 1.5px dashed color-mix(in srgb, var(--c) 60%, white); outline-offset: -1.5px;
}
.ev.done { filter: saturate(0.35); opacity: 0.7; }
.ev.noshow { opacity: 0.55; }
.ev.noshow .ev-name { text-decoration: line-through; }
.ev.fresh { animation: fresh 1.6s var(--ease) 2; }
@keyframes fresh {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
}
.tag-pending {
  align-self: flex-start; margin-top: 2px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: #b54708; background: #fff3e0; border-radius: 4px; padding: 0 5px;
}
.now-line { position: absolute; left: -5px; right: 0; height: 2px; background: #17b897; z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #17b897; }
.ghost {
  position: absolute; z-index: 1; display: none; align-items: center; gap: 4px; padding: 0 8px;
  border-radius: 8px; border: 1.5px dashed var(--blue); background: rgba(0, 105, 255, 0.06);
  color: var(--blue); font-weight: 800; font-size: 12px; pointer-events: none;
}
.ghost.on { display: flex; }

/* ---------- Rail ---------- */
.rail { flex-direction: column; gap: 14px; padding: 20px 18px; background: var(--card); border-left: 1px solid var(--line); overflow: auto; }
.rail-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.rail-card h3 { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.mcal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mcal-head strong { font-size: 15px; color: var(--navy); text-transform: capitalize; }
.mcal-head .icon-btn { width: 30px; height: 30px; }
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mcal .wd { font-size: 10.5px; font-weight: 800; color: var(--faint); padding: 4px 0; }
.mcal button {
  aspect-ratio: 1; max-width: 38px; width: 100%; margin: auto; border-radius: 50%; font-weight: 700; font-size: 13px; color: var(--navy);
  display: grid; place-items: center; transition: background 0.15s;
}
.mcal button:hover { background: var(--bg); }
.mcal button.out { color: #c6ccd6; }
.mcal button.busy { color: var(--blue); }
.mcal button.today { box-shadow: inset 0 0 0 1.5px var(--blue); }
.mcal button.sel { background: var(--blue); color: #fff; }
.stat { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.stat + .stat { border-top: 1px solid var(--line-2); }
.stat-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; line-height: 1.1; }
.ring { margin-left: auto; }
.ring circle { fill: none; stroke-width: 5; }
.up { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; width: 100%; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s; }
.up + .up { margin-top: 8px; }
.up:hover { box-shadow: var(--shadow-md); }
.up .dotc { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-top: 5px; flex: none; }
.up .tm { font-size: 12px; color: var(--muted); }
.up .nm { font-weight: 800; color: var(--navy); }
.up .sv { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 22px 8px; font-size: 13px; }

/* ---------- Generic page ---------- */
.page { padding: 26px 28px 40px; max-width: 1080px; }
.sec-title { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 12px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head p { color: var(--muted); }
.page-head .btn { margin-left: auto; }

/* Services: the Calendly event-type card */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.svc {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%;
  padding: 18px 18px 14px 22px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  overflow: hidden; transition: box-shadow 0.2s, transform 0.2s;
}
.svc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.svc:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.svc.inactive { opacity: 0.55; }
.svc-top { display: flex; align-items: flex-start; gap: 10px; }
.svc h3 { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.svc .meta { color: var(--muted); font-size: 13.5px; }
.svc .stack { margin-left: auto; }
.svc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.svc-foot .price { font-weight: 800; color: var(--navy); }
.svc-foot .link { margin-left: auto; color: var(--blue); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.toggle {
  width: 40px; height: 24px; border-radius: 999px; background: #d0d5dd; position: relative; flex: none; transition: background 0.2s;
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.25s var(--ease);
}
.toggle.on { background: var(--blue); }
.toggle.on::after { transform: translateX(16px); }

/* Activity: the Calendly notification feed */
.feed { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 760px; }
.note { padding: 18px 22px; border-bottom: 1px solid var(--line); transition: background 0.3s; }
.note:last-child { border-bottom: 0; }
.note.unread { background: var(--blue-50); }
.note-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.note-top.cancel { color: var(--red); }
.note-top .ago { margin-left: auto; font-weight: 700; color: var(--muted); }
.note p { margin: 8px 0 12px; font-size: 15px; color: var(--ink); }
.note p b { font-weight: 800; }

/* Availability */
.avail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.panel-pad { padding: 22px; }
.panel h3 { font-size: 20px; font-weight: 800; color: var(--ink); }
.panel .hint { color: var(--muted); font-size: 13px; margin-top: 2px; }
.daypills { display: flex; gap: 6px; margin-top: 18px; }
.daypill {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid #d0d5dd; font-weight: 700; font-size: 13px; color: #475467;
  display: grid; place-items: center; transition: all 0.2s;
}
.daypill.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.tz { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 700; margin: 18px 22px 6px; }
.hours { padding: 4px 22px 18px; }
.hrow { display: grid; grid-template-columns: 100px 1fr 34px; align-items: center; gap: 12px; padding: 7px 0; }
.hrow .dname { font-weight: 600; }
.hrow.offrow .dname { color: var(--faint); }
.range {
  display: flex; align-items: center; gap: 4px; border: 1.5px solid #d0d5dd; border-radius: 10px; padding: 0 6px; height: 44px; width: fit-content;
}
.range select { border: 0; outline: 0; background: none; font-size: 15px; padding: 0 4px; cursor: pointer; appearance: none; }
.range .sep { color: var(--faint); }
.unavail { color: var(--faint); font-size: 14px; }
.rules .row-toggle:first-of-type { border-top: 0; }
.rules .rt { font-weight: 700; }
.rules .rd { font-size: 12.5px; color: var(--muted); }

/* Clients */
.table { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.trow { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 0.8fr 1fr 0.9fr; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-2); width: 100%; text-align: left; }
.trow:hover:not(.thead) { background: var(--bg); }
.thead { border-top: 0; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); background: #fbfcfd; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .n { font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .p { font-size: 12.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; width: fit-content; }
.pill-blue { background: var(--blue-50); color: var(--blue); }
.pill-green { background: #e7f8ef; color: #067647; }
.pill-amber { background: #fff3e0; color: #b54708; }
.pill-gray { background: #f2f4f7; color: #475467; }
.pill-red { background: #fff1f1; color: #c4320a; }
.num { font-weight: 700; color: var(--navy); }

/* ---------- Booking page (client view) ---------- */
.bk { min-height: 100%; background: radial-gradient(1200px 500px at 110% -10%, #e9dcff 0, transparent 60%), radial-gradient(900px 500px at -10% 110%, #dbeaff 0, transparent 60%), var(--bg); padding-bottom: 30px; }
.bk-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; background: var(--navy); color: #fff; font-size: 13px;
}
.bk-bar .eye { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; }
.bk-bar .btn { margin-left: auto; }
.bk-card {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); max-width: 1000px; margin: 34px auto 0;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden;
  min-height: 560px;
}
.bk-side { padding: 28px; border-right: 1px solid var(--line); }
.bk-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; margin-bottom: 14px; }
.bk-biz { color: var(--muted); font-weight: 700; }
.bk-side h2 { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 16px; }
.bk-meta { display: grid; gap: 12px; color: #475467; font-weight: 600; }
.bk-meta div { display: flex; align-items: flex-start; gap: 10px; }
.bk-meta svg { color: var(--faint); margin-top: 1px; }
.bk-meta .hl { color: var(--green); }
.bk-back { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--blue); margin-bottom: 16px; }
.bk-main { padding: 28px; min-width: 0; }
.bk-main h3 { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 18px; }
.bk-list { display: grid; gap: 10px; }
.bk-svc {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px 16px 22px; border: 1px solid var(--line); border-radius: 12px; position: relative; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bk-svc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.bk-svc:hover { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.bk-svc .n { font-weight: 800; font-size: 16px; }
.bk-svc .d { color: var(--muted); font-size: 13px; }
.bk-svc .pr { margin-left: auto; font-weight: 800; color: var(--navy); white-space: nowrap; }
.bk-time { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 26px; }
.bk-cal-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 10px; }
.bk-cal-head strong { min-width: 150px; text-align: center; text-transform: capitalize; font-weight: 600; font-size: 16px; }
.bk-cal-head .icon-btn { color: var(--blue); background: var(--blue-50); }
.bk-cal-head .icon-btn:disabled { color: #c6ccd6; background: none; cursor: default; }
.bk-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bk-cal .wd { text-align: center; font-size: 11px; font-weight: 800; color: var(--faint); padding-bottom: 4px; }
.bk-cal button { aspect-ratio: 1; max-width: 46px; width: 100%; margin: auto; border-radius: 50%; font-weight: 600; font-size: 15px; color: #c6ccd6; cursor: default; position: relative; }
.bk-cal button.ok { color: var(--blue); background: var(--blue-50); font-weight: 800; cursor: pointer; transition: background 0.15s; }
.bk-cal button.ok:hover { background: var(--blue-100); }
.bk-cal button.sel { background: var(--blue); color: #fff; }
.bk-cal button.today::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.bk-tz { display: flex; align-items: center; gap: 6px; margin-top: 16px; color: #475467; font-size: 13px; font-weight: 600; }
.bk-slots h4 { font-weight: 600; margin-bottom: 12px; }
.bk-slots .list { display: grid; gap: 8px; max-height: 380px; overflow: auto; padding-right: 4px; scrollbar-width: thin; }
.slot-row { display: flex; gap: 8px; }
.slot {
  flex: 1; height: 48px; border-radius: 8px; border: 1.5px solid rgba(0, 105, 255, 0.5); color: var(--blue); font-weight: 800; font-size: 15px;
  text-align: center; transition: all 0.2s var(--ease);
}
.slot:hover { border-color: var(--blue); border-width: 2px; }
.slot.chosen { background: #667085; border-color: #667085; color: #fff; }
.slot-next { flex: 1; height: 48px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 800; animation: slot-in 0.25s var(--ease); text-align: center; }
@keyframes slot-in { from { opacity: 0; transform: translateX(-10px); } }
.form { display: grid; gap: 14px; max-width: 460px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 13px; color: var(--ink); }
.field input, .field textarea {
  height: 46px; padding: 0 14px; border: 1.5px solid #d0d5dd; border-radius: 10px; outline: 0; background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { height: 84px; padding: 10px 14px; resize: none; }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #475467; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.done-wrap { text-align: center; max-width: 440px; margin: 20px auto 0; display: grid; justify-items: center; gap: 10px; }
.done-check { width: 76px; height: 76px; border-radius: 50%; background: #e7f8ef; color: var(--green); display: grid; place-items: center; animation: pop 0.6s var(--ease); }
.done-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.5s 0.25s var(--ease) forwards; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.08); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-wrap h3 { font-size: 24px; margin: 8px 0 0; }
.done-wrap p { color: var(--muted); }
.summary { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: left; display: grid; gap: 10px; margin: 8px 0; }
.summary div { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.summary svg { color: var(--faint); }
.bk-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 12px; font-weight: 600; }
.bk-foot img { height: 16px; width: auto; background: #111; padding: 3px 7px; border-radius: 6px; box-sizing: content-box; }

/* ---------- Sheet: centered modal on desktop, bottom sheet on mobile ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(11, 20, 38, 0.42); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 41; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%) scale(0.98); opacity: 0; pointer-events: none; transition: transform 0.3s var(--ease), opacity 0.2s;
}
.sheet.on { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.sheet-in { padding: 24px; }
.grab { display: none; }
.sh-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.sh-head h3 { font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.sh-kicker { font-size: 13px; font-weight: 700; color: var(--c, var(--muted)); filter: brightness(0.85); }
.sh-head .icon-btn { margin-left: auto; margin-top: -6px; margin-right: -8px; }
.sh-bar { width: 6px; align-self: stretch; border-radius: 6px; background: var(--c); }
.drows { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.drow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; }
.drow + .drow { border-top: 1px solid var(--line-2); }
.drow svg { color: var(--faint); }
.drow .k { font-size: 12px; color: var(--muted); }
.drow .v { font-weight: 700; color: var(--navy); }
.drow .pill { margin-left: auto; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acts .btn { height: 46px; border-radius: 12px; }
.acts .wide { grid-column: 1 / -1; }
.label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  font-weight: 700; font-size: 13px; transition: all 0.15s;
}
.opt .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.opt small { color: var(--muted); font-weight: 600; }
.opt.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.opt.on small { color: var(--blue); }
.days-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.days-row::-webkit-scrollbar { display: none; }
.dopt { flex: none; width: 56px; padding: 8px 0; border-radius: 12px; border: 1.5px solid var(--line); text-align: center; transition: all 0.15s; }
.dopt .a { display: block; font-size: 11px; font-weight: 800; color: var(--faint); text-transform: uppercase; }
.dopt .b { display: block; font-size: 18px; font-weight: 800; color: var(--navy); }
.dopt.on { border-color: var(--blue); background: var(--blue); }
.dopt.on .a, .dopt.on .b { color: #fff; }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slots-grid .opt { justify-content: center; padding: 9px 0; }
.share-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile {
  display: grid; justify-items: center; gap: 10px; padding: 18px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); color: var(--blue); font-weight: 700; transition: box-shadow 0.2s, transform 0.2s;
}
.tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tile .ti { width: 58px; height: 58px; border-radius: 50%; background: #f2f4f7; display: grid; place-items: center; color: #12b5e5; }
.linkbox { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; color: var(--navy); }
.linkbox svg { color: var(--blue); }
.hist { display: grid; gap: 8px; max-height: 260px; overflow: auto; }

/* ---------- Push banner + toast ---------- */
.push {
  position: fixed; z-index: 60; top: 14px; left: 50%; width: min(420px, calc(100vw - 20px));
  display: flex; gap: 12px; padding: 13px 15px; border-radius: 18px; text-align: left;
  background: rgba(246, 247, 250, 0.86); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 18px 40px -12px rgba(16, 24, 40, 0.35), 0 0 0 1px rgba(16, 24, 40, 0.06);
  transform: translate(-50%, -140%); opacity: 0; visibility: hidden; transition: transform 0.55s var(--ease), opacity 0.3s, visibility 0s 0.55s;
}
.push.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 0.55s var(--ease), opacity 0.2s; }
.push .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
.push .app-n { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: flex; }
.push .app-n span { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.push .pt { font-weight: 800; color: var(--ink); }
.push .pb { font-size: 13px; color: #344054; line-height: 1.35; }
.push > div { flex: 1; min-width: 0; }
.toast {
  position: fixed; z-index: 61; left: 50%; bottom: 26px; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; background: #101828; color: #fff; font-weight: 700; font-size: 13.5px;
  box-shadow: var(--shadow-lg); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: all 0.35s var(--ease);
  max-width: calc(100vw - 24px);
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast .ok { width: 22px; height: 22px; border-radius: 50%; background: var(--green); display: grid; place-items: center; flex: none; }

/* Scripted finger used by ?auto recordings */
.finger {
  position: fixed; z-index: 90; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(16, 24, 40, 0.28); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8); pointer-events: none;
  opacity: 0; transition: left 0.6s var(--ease), top 0.6s var(--ease), opacity 0.3s, transform 0.12s;
}
.finger.on { opacity: 1; }
.finger.tap { transform: scale(0.75); }

/* ---------- Mobile shell ---------- */
.m-status, .m-head, .tabbar, .strip-wrap { display: none; }

@media (max-width: 899px) {
  :root { --hour: 72px; }
  body { font-size: 14px; }
  .app { display: flex; flex-direction: column; background: var(--card); }
  .sidebar, .topbar, .rail, .d-only { display: none !important; }
  .m-only { display: revert !important; }
  .views { padding-bottom: 78px; }
  .app[data-screen='reservas'] .views { padding-bottom: 0; }
  .app[data-screen='reservas'] .tabbar, .app[data-screen='reservas'] .m-head { display: none; }

  .app.framed .m-status {
    display: flex; flex: none; align-items: center; justify-content: space-between; height: 44px; padding: 10px 26px 0;
    font-weight: 800; font-size: 14px; color: #000; background: var(--card);
  }
  .m-status .sig { display: flex; align-items: center; gap: 5px; }
  .app[data-screen='reservas'].framed .m-status { background: var(--navy); color: #fff; }

  .m-head { display: flex; flex: none; align-items: center; gap: 10px; padding: 12px 16px 10px; background: var(--card); }
  .m-head .search { width: auto; flex: 1; padding: 9px 14px; }
  .m-head h1 { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; flex: 1; }
  .month-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; text-transform: capitalize; flex: 1; }
  .month-btn svg { transition: transform 0.25s; color: var(--blue); }
  .month-btn.open svg { transform: rotate(180deg); }
  .m-head .icon-btn { width: 36px; height: 36px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: 74px; padding: 0 6px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .app { position: relative; }
  .tab { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--faint); padding-bottom: 2px; position: relative; }
  .tab.on { color: var(--blue); }
  .tab .badge { position: absolute; top: -6px; left: calc(50% + 4px); min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px #fff; }
  .fab {
    justify-self: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center;
    box-shadow: 0 10px 20px -6px rgba(0, 105, 255, 0.7); transition: transform 0.15s;
  }
  .fab:active { transform: scale(0.92); }

  /* Agenda */
  .ag-toolbar, .ag-tools { display: none; }
  .strip-wrap { display: block; flex: none; padding: 0 10px 10px; border-bottom: 1px solid var(--line); background: var(--card); }
  .strip { display: grid; grid-template-columns: repeat(7, 1fr); touch-action: pan-y; }
  .sday { display: grid; justify-items: center; gap: 4px; padding: 4px 0; }
  .sday .l { font-size: 12px; font-weight: 800; color: var(--faint); }
  .sday .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 600; color: var(--ink); transition: background 0.2s; }
  .sday .d { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
  .sday.busy .d { background: var(--blue); }
  .sday.today .n { color: var(--blue); font-weight: 800; }
  .sday.sel .n { background: var(--blue); color: #fff; }
  .sday.sel .d { background: transparent; }
  .sday.closed .n { color: #c6ccd6; }
  .m-month { padding: 4px 6px 10px; animation: view-in 0.25s var(--ease); }
  .m-meta { display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex: none; }
  .m-meta .sum { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
  .m-meta .sum b { color: var(--navy); }
  .m-meta .chips { margin-left: auto; }
  .m-meta .chip { height: 30px; font-size: 12px; }
  .cal { margin: 0; border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
  .cal-head { display: none; }
  .cal-grid { grid-template-columns: 50px repeat(var(--cols), minmax(0, 1fr)); }
  .col { cursor: pointer; }
  .ev { padding: 4px 7px; }

  .page { padding: 4px 16px 24px; }
  .page-head { display: none; }
  .svc-grid { grid-template-columns: 1fr; gap: 12px; }
  .svc { padding: 16px 16px 12px 20px; }
  .svc h3 { font-size: 16px; }
  .feed { border-radius: 0; border-left: 0; border-right: 0; margin: 0 -16px; }
  .note { padding: 16px; }
  .note p { font-size: 14.5px; }
  .avail { grid-template-columns: 1fr; }
  .panel-pad { padding: 18px; }
  .daypills { gap: 4px; justify-content: space-between; }
  .daypill { width: auto; flex: 1; max-width: 44px; height: auto; aspect-ratio: 1; font-size: 12px; }
  .row-toggle { padding: 14px 18px; }
  .tz { margin: 16px 18px 4px; }
  .hours { padding: 4px 18px 14px; }
  .hrow { grid-template-columns: 74px 1fr; }
  .hrow .icon-btn { display: none; }
  .range { height: 40px; }
  .range select { font-size: 14px; }
  .table { border: 0; border-radius: 0; margin: 0 -16px; }
  .thead { display: none; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  .trow .c3, .trow .c4 { display: none; }
  .trow .c2 { display: none; }

  .bk-bar { padding: 8px 12px; font-size: 12px; }
  .bk-bar .txt { line-height: 1.25; }
  .bk-card { grid-template-columns: 1fr; margin: 0; border-radius: 0; border: 0; box-shadow: none; min-height: 0; }
  .bk-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px; }
  .bk-side h2 { font-size: 20px; margin-bottom: 10px; }
  .bk-logo { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; margin-bottom: 10px; }
  .bk-meta { gap: 8px; font-size: 13px; }
  .bk-back { position: absolute; margin: 0; right: 16px; width: 36px; height: 36px; }
  .bk-side { position: relative; }
  .bk-main { padding: 18px; }
  .bk-main h3 { font-size: 18px; margin-bottom: 14px; }
  .bk-time { grid-template-columns: 1fr; gap: 18px; }
  .bk-cal { gap: 3px; }
  .bk-cal button { font-size: 14px; }
  .bk-slots .list { max-height: none; }
  .bk-svc { padding: 14px 14px 14px 18px; }
  .bk-svc .n { font-size: 15px; }
  .bk { background: var(--card); }

  .sheet {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 88%; border-radius: 22px 22px 0 0;
    transform: translateY(100%); opacity: 1; transition: transform 0.38s var(--ease);
    position: absolute;
  }
  .sheet.on { transform: translateY(0); }
  .scrim { position: absolute; }
  .sheet-in { padding: 8px 18px 22px; }
  .grab { display: block; width: 38px; height: 5px; border-radius: 9px; background: #d0d5dd; margin: 4px auto 14px; }
  .push { position: absolute; top: 8px; }
  .app.framed ~ .push { top: 46px; }
  .toast { position: absolute; bottom: 90px; font-size: 12.5px; }
  .finger { position: absolute; }
}

@media (max-width: 899px) {
  /* Bottom sheet and overlays position against the viewport-high body */
  body { position: relative; }
}

/* The landing embeds the app in a ~280px phone frame */
@media (max-width: 360px) {
  .month-btn { font-size: 19px; }
  .m-head { padding: 10px 12px 8px; gap: 6px; }
  .m-head .btn-sm { padding: 0 10px; height: 30px; }
  .m-meta { padding: 8px 10px; gap: 6px; }
  .m-meta .sum-money { display: none; }
  .m-meta .chip { height: 28px; }
  .m-meta .chip .av-sm { width: 22px; height: 22px; font-size: 9px; }
  .m-meta .chip.text { padding: 0 9px; }
  .sday .n { width: 30px; height: 30px; font-size: 15px; }
  .cal-grid { grid-template-columns: 40px repeat(var(--cols), minmax(0, 1fr)); }
  .times span { right: 6px; font-size: 10px; }
  .tabbar { height: 66px; }
  .fab { width: 46px; height: 46px; }
  .views { padding-bottom: 70px; }
}

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