/*
 * Booking page styles — booking, cancel, sign-in and admin pages.
 * Layout and interactions follow Calendly's scheduling page.
 */

/* Tokens ------------------------------------------------------------------ */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;

  --page: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f5;
  --line: #e6e9ef;
  --line-strong: #cfd5df;
  --ink: #1a1a1a;
  --ink-2: #4d5261;
  --ink-3: #737885;

  --blue: #006bff;
  --blue-hover: #005ee0;
  --blue-ink: #0060e6;
  --blue-wash: rgba(0, 107, 255, .065);
  --blue-wash-2: rgba(0, 107, 255, .14);
  --blue-line: rgba(0, 107, 255, .5);
  --ring: rgba(0, 107, 255, .25);
  --on-blue: #ffffff;
  --picked: #4d5261;

  --red: #d22f2f;
  --red-solid: #c62828;
  --red-wash: #fdeeee;
  --green: #0f8a55;
  --green-wash: #e5f6ee;
  --amber: #8a5a00;
  --amber-wash: #fff4dc;

  --shadow-card: 0 1px 3px rgba(16, 24, 40, .06), 0 12px 40px -12px rgba(16, 24, 40, .16);
  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, .28);
  --radius-card: 16px;
  --radius: 10px;
  --radius-sm: 8px;
  --pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0b0d12;
    --surface: #14161c;
    --surface-2: #191c23;
    --surface-3: #22262f;
    --line: #262a33;
    --line-strong: #3a3f4b;
    --ink: #f1f2f5;
    --ink-2: #b9bdc8;
    --ink-3: #8b909c;

    --blue: #0f66f0;
    --blue-hover: #2a78f5;
    --blue-ink: #7fb0ff;
    --blue-wash: rgba(58, 134, 255, .12);
    --blue-wash-2: rgba(58, 134, 255, .24);
    --blue-line: rgba(127, 176, 255, .45);
    --ring: rgba(58, 134, 255, .35);
    --picked: #5b6170;

    --red: #ff6b6b;
    --red-wash: rgba(255, 107, 107, .12);
    --green: #3ddc97;
    --green-wash: rgba(61, 220, 151, .12);
    --amber: #f5c451;
    --amber-wash: rgba(245, 196, 81, .12);

    --shadow-card: 0 0 0 1px rgba(255, 255, 255, .02), 0 24px 60px -24px rgba(0, 0, 0, .7);
    --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, .8);
  }
}

/* Base -------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { flex: none; }

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--pill);
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.btn-danger { background: var(--red-solid); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.94); }
.btn-danger-text, .btn-danger-text:hover:not(:disabled) { color: var(--red); }
.btn-danger-text:hover:not(:disabled), .confirm[open] > summary { background: var(--red-wash); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-3);
  transition: background-color .15s, color .15s;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }

/* Notices ----------------------------------------------------------------- */

.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 14px; line-height: 1.5;
}
.notice .icon { margin-top: 1px; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.notice-error { background: var(--red-wash); color: var(--red); }
.notice-warn { background: var(--amber-wash); color: var(--amber); }
.notice-success { background: var(--green-wash); color: var(--green); }
.notice-info { background: var(--blue-wash); color: var(--ink-2); border: 1px solid var(--blue-wash-2); }
.notice-info > .icon { color: var(--blue-ink); }
.notice-info strong { color: var(--ink); }
.booked-list { list-style: none; margin: 8px 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.booked-list li { padding: 4px 10px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.booked-list a { color: var(--blue-ink); font-weight: 600; text-decoration: none; }
.booked-list a:hover { text-decoration: underline; }
.booked-list span { color: var(--ink-3); }
.notice-foot { font-size: 13.5px; color: var(--ink-3); }
.notice a { color: inherit; font-weight: 600; }

/* ============================================================================
   Booking page
   ========================================================================= */

.shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(16px, 6vh, 72px) 16px 32px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
  min-height: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  animation: card-in .5s var(--ease) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Left: host and event details */

.info {
  position: relative;
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
}

.back-btn {
  position: absolute; top: 24px; left: 24px;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--blue);
  transition: background-color .15s, border-color .15s;
}
.back-btn:hover { background: var(--blue-wash); border-color: var(--blue-line); }

.info-host { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.card[data-step="details"] .info-host { margin-top: 64px; }

.avatar {
  width: 64px; height: 64px; margin-bottom: 14px;
  border-radius: 50%; object-fit: cover;
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--line);
}
.avatar-initials {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #006bff, #7b61ff); color: #fff;
  font-weight: 700; font-size: 22px; letter-spacing: .02em;
}
.avatar-sm { width: 32px; height: 32px; margin: 0; font-size: 12px; }
.avatar-lg { width: 80px; height: 80px; margin: 0 auto 18px; font-size: 26px; }

.host-name { font-size: 15px; font-weight: 600; color: var(--ink-3); }
.host-role { font-size: 13px; color: var(--ink-3); line-height: 1.45; }

.event-name {
  margin: 12px 0 22px;
  font: 700 28px/1.2 var(--font-display);
  letter-spacing: -.02em;
  color: var(--ink);
}

.session-switch {
  display: inline-flex; gap: 4px; padding: 4px; margin: -8px 0 20px;
  background: var(--surface-3); border-radius: var(--pill);
}
.session-switch button {
  border: 0; background: transparent; border-radius: var(--pill);
  padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.session-switch [aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }

.meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.meta li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; font-weight: 600; color: var(--ink-3); line-height: 1.4; }
.meta .icon { margin-top: 0; color: var(--ink-3); }
.meta small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 400; }
.meta .meta-when, .meta .meta-zone { color: var(--ink-2); }
.meta .is-struck span { text-decoration: line-through; }

.info-copy { margin-top: 22px; display: grid; gap: 12px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* Right: the step panels */

.stage { min-width: 0; padding: 28px 32px 32px; display: flex; flex-direction: column; }
.panel { display: flex; flex-direction: column; flex: 1; min-height: 0; animation: panel-in .35s var(--ease) both; }
.panel.from-left { animation-name: panel-in-left; }
@keyframes panel-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes panel-in-left { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

.panel-title { font: 700 20px/1.3 var(--font-display); letter-spacing: -.01em; margin: 4px 0 22px; }

.picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  flex: 1;
}

/* Calendar */

.cal-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.cal-title { min-width: 150px; text-align: center; font-size: 16px; font-weight: 500; color: var(--ink); }
.nav-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--blue-wash); color: var(--blue-ink);
  transition: background-color .15s, opacity .15s;
}
.nav-btn:hover:not(:disabled) { background: var(--blue-wash-2); }
.nav-btn:disabled { background: transparent; color: var(--ink-3); opacity: .45; cursor: default; }

.cal-weekdays, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; color: var(--ink-2); padding: 6px 0; }
.cal-days { row-gap: 6px; }

.day {
  position: relative;
  justify-self: center;
  width: 100%; max-width: 44px; aspect-ratio: 1;
  display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2);
  font-size: 16px; font-weight: 400; font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s, transform .15s;
}
.day:disabled { cursor: default; }
.day.is-blank { visibility: hidden; }
.day.is-open { background: var(--blue-wash); color: var(--blue-ink); font-weight: 700; }
.day.is-open:hover { background: var(--blue-wash-2); }
.day.is-selected, .day.is-selected:hover { background: var(--blue); color: var(--on-blue); }
.day.is-today::after {
  content: ""; position: absolute; bottom: 6px; left: 50%;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: currentColor;
}
.day.is-loading { background: var(--surface-3); color: transparent; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }

.cal-note {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface-2); font-size: 14px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
}
.link-btn {
  border: 0; background: none; padding: 0;
  color: var(--blue-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

/* Time zone */

.tz { margin-top: 26px; }
.tz-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.tz-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tz-select-wrap { position: relative; flex: 1 1 220px; min-width: 0; display: flex; align-items: center; }
.tz-select-wrap > .icon { position: absolute; left: 10px; color: var(--ink-2); pointer-events: none; }
.tz-select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: 40px; padding: 8px 34px 8px 36px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); font-size: 14.5px;
  text-overflow: ellipsis; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.tz-select:hover { background: var(--surface-2); border-color: var(--line); }
.tz-caret { position: absolute; right: 10px; color: var(--ink-3); pointer-events: none; transform: rotate(90deg); }
.tz-caret .icon { width: 16px; height: 16px; }

.clock-toggle { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--surface-3); }
.clock-toggle button {
  border: 0; background: transparent; border-radius: var(--pill);
  padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.clock-toggle [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .16); }

/* Times */

.times { display: flex; flex-direction: column; min-height: 0; }
.times-head { min-height: 52px; margin-bottom: 12px; }
.times-date { font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.times-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.times-body {
  flex: 1;
  max-height: 452px;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 2px 6px 18px;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
}
.time-list { display: grid; gap: 10px; }

.slot { display: flex; gap: 8px; }
.slot-time, .slot-next {
  flex: 1 1 100%;
  min-width: 0; height: 52px; padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: flex-basis .25s var(--ease), background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.slot-time {
  border: 1px solid var(--blue-line); background: var(--surface); color: var(--blue-ink);
}
.slot-time:hover { border: 1px solid var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.slot-next {
  display: none;
  border: 1px solid var(--blue); background: var(--blue); color: var(--on-blue);
}
.slot-next:hover { background: var(--blue-hover); }
.slot.is-picked .slot-time { flex-basis: 50%; background: var(--picked); border-color: var(--picked); color: #fff; box-shadow: none; }
.slot.is-picked .slot-next { display: block; flex-basis: 50%; animation: next-in .25s var(--ease) both; }
@keyframes next-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

.times-empty {
  display: grid; place-items: center; align-content: center; gap: 8px;
  min-height: 240px; padding: 24px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 12px;
  font-size: 14px; color: var(--ink-3);
}
.times-empty .icon { color: var(--ink-3); }
.times-empty strong { color: var(--ink); font-size: 15px; }
.skeleton-slot { height: 52px; border-radius: var(--radius-sm); background: var(--surface-3); animation: pulse 1.2s ease-in-out infinite alternate; }

/* Details form */

.form { display: grid; gap: 20px; max-width: 520px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.req { color: var(--ink); }
.optional { font-weight: 400; font-size: 13px; color: var(--ink-3); margin-left: 4px; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-size: 16px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: var(--ink-3); opacity: .8; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
.field.has-error .input { border-color: var(--red); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px var(--red-wash); }
.field-error { font-size: 13.5px; color: var(--red); }
.field-error:empty { display: none; }
.hint { font-size: 13px; color: var(--ink-3); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fineprint { font-size: 13px; color: var(--ink-3); }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lede { font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* Confirmation (spans the whole card) */

.panel-done {
  grid-column: 1 / -1;
  align-items: center;
  padding: 48px 28px 44px;
  text-align: center;
  outline: none;
}
.card[data-step="done"] .info,
.card[data-step="done"] .stage { display: none; }
.card[data-step="done"] { grid-template-columns: 1fr; min-height: 0; max-width: 720px; margin: 0 auto; }

.done-avatar { margin: 0 auto 18px; }
.done-title {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 24px/1.3 var(--font-display); letter-spacing: -.01em;
}
.done-check {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: #fff; flex: none;
  animation: pop .45s var(--ease) both;
}
.done-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .2s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-sub { margin-top: 8px; color: var(--ink-2); }

.summary {
  width: 100%; max-width: 520px; margin: 28px auto 0;
  padding: 22px 24px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px;
}
.summary h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.summary .meta li { font-size: 15px; }
.summary .meta a { font-weight: 600; word-break: break-all; }

.add-cal { margin-top: 26px; display: grid; justify-items: center; gap: 12px; }
.add-cal-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.add-cal-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.done-foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); width: 100%; max-width: 520px; font-size: 14px; color: var(--ink-2); display: grid; gap: 14px; justify-items: center; }
.done .notice { max-width: 520px; margin: 22px auto 0; text-align: left; }

/* Cancel page */

.card-cancel { min-height: 460px; }
.stage-center { justify-content: center; max-width: 560px; }
.stage-center .lede { margin: -8px 0 24px; }
.state { display: grid; justify-items: start; gap: 12px; }
.state .lede { margin: 0 0 8px; }
.state .panel-title { margin: 4px 0 0; }
.state-mark {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue-wash); color: var(--blue-ink); margin: 0 auto 6px;
}
.state .state-mark { margin: 0 0 4px; }
.state-mark-muted { background: var(--surface-3); color: var(--ink-2); }

.site-foot { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.site-foot a { color: inherit; }
.noscript { text-align: center; padding: 16px; }

/* Toast */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 50; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--surface);
  font-size: 14.5px; box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
  animation: toast-in .3s var(--ease) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Responsive: booking page */

@media (max-width: 1000px) {
  .card { grid-template-columns: 280px minmax(0, 1fr); }
  .info { padding: 24px 22px 28px; }
  .stage { padding: 24px 24px 28px; }
  .picker { grid-template-columns: minmax(0, 1fr) 190px; gap: 22px; }
  .event-name { font-size: 25px; }
}

@media (max-width: 760px) {
  .shell { padding: 0 0 24px; }
  .card {
    grid-template-columns: 1fr; min-height: 0;
    border-radius: 0; border-width: 0 0 1px; box-shadow: none;
  }
  .info { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px 22px; text-align: center; }
  .info-host { align-items: center; }
  .card[data-step="details"] .info-host { margin-top: 0; }
  .back-btn { top: 16px; left: 16px; }
  .event-name { font-size: 24px; margin: 8px 0 16px; }
  .session-switch { margin: -4px auto 16px; }
  .meta { justify-items: center; gap: 10px; }
  .meta li { text-align: left; font-size: 14.5px; }
  .day.is-trailing { display: none; }
  .info-copy { margin-top: 16px; font-size: 14px; }
  .card[data-step="details"] .info-copy { display: none; }
  .stage { padding: 22px 16px 28px; }
  .panel-title { text-align: center; }
  .picker { grid-template-columns: 1fr; gap: 26px; }
  .cal-days { row-gap: 4px; }
  .day { max-width: 46px; }
  .times-body { max-height: none; overflow: visible; mask-image: none; -webkit-mask-image: none; padding-bottom: 4px; }
  .time-list { gap: 10px; }
  .form { max-width: none; }
  .form-actions .btn-primary { flex: 1; }
  .panel-done { padding: 36px 16px; }
  .card[data-step="done"] { max-width: none; }
  .card-cancel .info { text-align: left; }
  .card-cancel .info-host { align-items: flex-start; }
  .card-cancel .meta { justify-items: start; }
}

/* ============================================================================
   Sign-in pages
   ========================================================================= */

.solo { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; padding: 24px 16px; }
.solo-card {
  width: min(420px, calc(100vw - 32px));
  padding: 36px 32px 32px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  display: grid; gap: 14px;
  animation: card-in .5s var(--ease) both;
}
.solo-card .avatar-lg { margin-bottom: 4px; }
.solo-card .state-mark { margin-top: -4px; }
.solo-title { font: 700 22px/1.3 var(--font-display); letter-spacing: -.01em; }
.solo-form { display: grid; gap: 10px; text-align: left; margin-top: 6px; }
.solo-form .hint { text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ============================================================================
   Admin
   ========================================================================= */

.page-admin { background: var(--page); }

.admin-top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.admin-top-inner { max-width: 1040px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-3); }
.admin-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.admin-nav a:hover { background: var(--surface-3); color: var(--ink); }
.admin-nav a[aria-current="page"] { color: var(--blue-ink); background: var(--blue-wash); font-weight: 600; }
.admin-top-actions { display: flex; align-items: center; gap: 6px; }
.admin-top-actions form { margin: 0; }

.admin-main { max-width: 1040px; margin: 0 auto; padding: 32px 20px 96px; display: grid; gap: 20px; align-content: start; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-h1 { font: 700 28px/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 4px; }
.muted { color: var(--ink-3); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stat b { display: block; font: 700 28px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-3); }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--blue-ink); border-bottom-color: var(--blue); font-weight: 600; }

.day-group { display: grid; gap: 8px; }
.day-label { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 2px; display: flex; gap: 8px; align-items: baseline; }
.day-rel { color: var(--blue-ink); }
.events { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.event + .event { border-top: 1px solid var(--line); }
.event-row {
  display: grid; grid-template-columns: auto 132px minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 16px 20px; cursor: pointer; list-style: none;
  transition: background-color .15s;
}
.event-row::-webkit-details-marker { display: none; }
.event-row:hover { background: var(--surface-2); }
.event-dot { width: 22px; height: 22px; border-radius: 50%; background: #8247f5; box-shadow: inset 0 0 0 5px color-mix(in srgb, #8247f5 30%, var(--surface)); }
.event-time { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.event-who { display: grid; gap: 1px; min-width: 0; }
.event-who b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-who span { font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-who strong { color: var(--ink-2); font-weight: 600; }
.event-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-3); }
.event-toggle .icon { transition: transform .2s var(--ease); }
.event[open] .event-toggle .icon { transform: rotate(90deg); }
.event.is-cancelled .event-dot { background: var(--line-strong); box-shadow: none; }
.event.is-cancelled .event-time, .event.is-cancelled .event-who b { color: var(--ink-3); text-decoration: line-through; }

.event-body {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px;
  padding: 4px 20px 22px 58px;
  animation: panel-in-down .25s var(--ease) both;
}
@keyframes panel-in-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.event-side { display: grid; gap: 8px; align-content: start; }
.confirm summary { list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm-form { display: grid; gap: 8px; margin-top: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.confirm-form label { font-size: 13.5px; font-weight: 600; }
.confirm-form .input { min-height: 0; font-size: 14px; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500 !important; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.notify-extra { display: grid; gap: 8px; }
.event.is-highlighted { box-shadow: inset 3px 0 0 var(--blue); }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.facts > div { min-width: 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.facts-wide { grid-column: 1 / -1; }
.facts .notes { padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); line-height: 1.55; color: var(--ink-2); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.tag-danger { background: var(--red-wash); color: var(--red); }
.tag-warn { background: var(--amber-wash); color: var(--amber); white-space: normal; }
.tag-warn a { color: inherit; }
.tag-live { background: var(--green-wash); color: var(--green); }

.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; display: grid; justify-items: center; gap: 8px; }
.empty-slim { padding: 40px 24px; }
.empty h2 { font-size: 17px; }
.empty p { color: var(--ink-3); max-width: 420px; font-size: 14.5px; margin-bottom: 8px; }
.empty-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-ink); margin-bottom: 4px; }

.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; display: grid; gap: 16px; }
.panel-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.panel-card-head h2 .icon { color: var(--ink-3); }
.panel-card-head form { margin: 0; }

/* Availability editor */

.availability { display: grid; gap: 20px; }
.week { display: grid; }
.week-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.week-row:first-child { border-top: 0; padding-top: 0; }
.day-toggle { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.day-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day-chip {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-size: 12px; font-weight: 700;
  background: var(--surface-3); color: var(--ink-3);
  transition: background-color .15s, color .15s;
}
.day-toggle input:checked + .day-chip { background: var(--blue); color: #fff; }
.day-toggle input:focus-visible + .day-chip { outline: 2px solid var(--blue); outline-offset: 2px; }
.day-name { font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.ranges { display: grid; gap: 8px; }
.range { display: flex; align-items: center; gap: 8px; }
.range-dash { color: var(--ink-3); }
.input-time { width: 128px; min-height: 40px; padding: 6px 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
.unavailable { display: none; min-height: 40px; align-items: center; color: var(--ink-3); font-size: 14.5px; }
.week-row.is-off .unavailable { display: flex; }
.week-row.is-off .range, .week-row.is-off [data-add-range] { display: none; }

.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 20px; }
.rules .field label { font-size: 14px; }
.input-unit { display: flex; align-items: center; gap: 10px; }
.input-unit .input { width: 96px; min-height: 40px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.input-unit span { font-size: 13.5px; color: var(--ink-3); }

.sticky-actions {
  position: sticky; bottom: 16px; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 12px 12px 18px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop);
}
.sticky-buttons { display: flex; gap: 8px; margin-left: auto; }
.preview { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.preview .icon { color: var(--blue-ink); }

/* Session, date range and date-specific hours */

.session-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.field-grow { min-width: 0; }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.choice:hover { border-color: var(--line-strong); }
.choice:has(input[type="radio"]:checked) { border-color: var(--blue-line); background: var(--blue-wash); }
.choice input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.choice-body { display: grid; gap: 8px; min-width: 0; }
.choice-body b { font-size: 15px; }
.choice-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.input-inline { width: 84px; min-height: 38px; padding: 5px 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
.input-date { width: auto; min-height: 40px; padding: 6px 10px; font-size: 15px; font-variant-numeric: tabular-nums; }

.dates { display: grid; }
.date-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.date-row-day { display: grid; gap: 6px; justify-items: start; }
.date-row-actions { display: flex; gap: 2px; }
.date-row.is-off .unavailable { display: flex; }
.preview-warn, .preview-warn .icon { color: var(--amber); }

/* Notifications */

.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui {
  position: relative; width: 42px; height: 26px; border-radius: var(--pill);
  background: var(--line-strong); transition: background-color .2s var(--ease);
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .3);
  transition: transform .2s var(--ease);
}
.switch input:checked + .switch-ui { background: var(--blue); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--blue); outline-offset: 2px; }

.address-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.address { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; transition: background-color .2s; }
.address + .address { border-top: 1px solid var(--line); }
.address-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue-wash); color: var(--blue-ink); font-weight: 700; font-size: 15px;
  transition: background-color .2s, color .2s;
}
.address-main { min-width: 0; }
.address-main b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.address-main > span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.address-state { color: var(--green); font-weight: 600; }
.address.is-off .address-state { color: var(--ink-3); font-weight: 500; }
.address.is-off .address-icon { background: var(--surface-3); color: var(--ink-3); }
.address.is-off .address-main b { color: var(--ink-2); }
.address-actions { display: flex; align-items: center; gap: 4px; }
.add-address { display: flex; gap: 10px; }
.add-address .input { flex: 1; min-width: 0; }

.choice-compact { padding: 12px 16px; align-items: center; }
.choice-compact input[type="radio"] { margin: 0; }
.choice-compact b { font-weight: 600; overflow-wrap: anywhere; }

.email-preview { margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.email-preview figcaption { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.email-preview p { font-size: 14px; color: var(--ink-2); }
.email-preview-link { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; transition: background-color .3s; border-radius: 4px; }
.email-preview-link.is-fresh { background: var(--blue-wash-2); }
.panel-card-quiet { background: var(--surface-2); }
.sender-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.inbox-preview {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 13px; color: var(--ink-3);
}
.inbox-preview > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-preview b { color: var(--ink); margin-right: 6px; }
.inbox-avatar { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-ink); }
.hint .icon { display: inline-block; vertical-align: -2px; margin-right: 2px; }
.preview.is-unsaved, .preview.is-unsaved .icon { color: var(--amber); }

/* Time off */

.off-form { display: grid; grid-template-columns: 170px 170px minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.off-form .field label { font-size: 14px; }
.off-form .input { min-height: 44px; }
.off-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.off-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 20px; }
.off-item + .off-item { border-top: 1px solid var(--line); }
.off-item form { margin: 0; }
.off-dates { display: grid; gap: 4px; justify-items: start; }
.off-dates b { font-size: 15px; }
.off-dates > span:not(.tag) { font-size: 13.5px; color: var(--ink-3); }

/* Setup */

.copy-row { display: flex; gap: 10px; align-items: center; }
.snippet .copy-row { align-items: flex-start; }
.copy-row .input { flex: 1; min-width: 0; }
.code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 0 !important; resize: none; }
.snippet { display: grid; gap: 12px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.snippet-preview { padding: 6px 0 2px; }
.snippet-preview p { margin: 0; }

.checklist, .mail-log { list-style: none; margin: 0; padding: 0; display: grid; }
.checklist li, .mail-log li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.checklist li:first-child, .mail-log li:first-child { border-top: 0; padding-top: 0; }
.checklist b, .mail-log b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.checklist li span:not(.check-icon), .mail-log li span:not(.check-icon) { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.check-icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; }
.is-ok .check-icon { background: var(--green-wash); color: var(--green); }
.is-warn .check-icon { background: var(--amber-wash); color: var(--amber); }
.mail-log .error-text { color: var(--red) !important; }

@media (max-width: 760px) {
  .admin-top-inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .admin-nav { order: 3; flex-basis: 100%; margin: 0 -8px; }
  .admin-top-actions { margin-left: auto; }
  .admin-top-actions .btn span { display: none; }
  .admin-top-actions .btn { padding: 0 10px; }
  .admin-main { padding: 22px 16px 96px; }
  .admin-h1 { font-size: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .event-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; }
  .event-dot { grid-row: span 2; }
  .event-time { grid-column: 2; font-size: 14px; color: var(--ink-2); }
  .event-who { grid-column: 2; grid-row: 2; }
  .event-row .tag { grid-column: 3; grid-row: 1; justify-self: end; }
  .event-toggle { grid-column: 3; grid-row: 2; }
  .event-toggle { font-size: 0; }
  .event-body { grid-template-columns: 1fr; gap: 18px; padding: 4px 16px 18px; }
  .facts { grid-template-columns: 1fr; }
  .week-row { grid-template-columns: 1fr auto; }
  .date-row { grid-template-columns: 1fr auto; }
  .date-row .ranges { grid-column: 1 / -1; grid-row: 2; }
  .session-row { grid-template-columns: 1fr; }
  .week-row .ranges { grid-column: 1 / -1; grid-row: 2; }
  .off-form { grid-template-columns: 1fr 1fr; }
  .off-form .field-grow { grid-column: 1 / -1; }
  .off-form .btn { grid-column: 1 / -1; }
  .copy-row { flex-direction: column; }
  .address { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sender-grid { grid-template-columns: 1fr; }
  .address-icon { display: none; }
  .address-actions .btn span { display: none; }
  .address-actions .btn { padding: 0 10px; }
}

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

/* Confirmation content */
.done { width: 100%; display: grid; justify-items: center; }
.done .avatar { margin: 0 auto 18px; }
