:root {
  --ink: #0b1220;
  --ink-muted: #5b6575;
  --ink-faint: #8b95a5;
  --line: #e6eaf0;
  --line-strong: #d5dbe6;
  --surface: #ffffff;
  --bg0: #eef2f7;
  --bg1: #e4ebf5;
  --accent: #0069ff;
  --accent-soft: #e8f1ff;
  --accent-hover: #0054cc;
  --success: #0f7b4a;
  --success-soft: #e7f7ef;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --nav-w: 240px;
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #dce8ff 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e7eef8 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* ——— Shared bits ——— */
.flash {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.flash-ok {
  background: var(--success-soft);
  color: var(--success);
}
.flash-err {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost:hover {
  background: var(--accent-soft);
}
.btn-muted {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-img {
  object-fit: cover;
  background: #e8eef5;
  padding: 0;
}
.avatar-sm { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-md { width: 56px; height: 56px; font-size: 1.05rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.35rem; }

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ——— Marketing / account shell ——— */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none !important;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.topbar-nav a {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  text-decoration: none !important;
}
.topbar-nav a:hover,
.topbar-nav a.is-active {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.05);
}

.page {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.main-bleed {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem 1rem 3rem;
}

.page-card {
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
}

.page h1 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}
.page .lede {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
}

.section-title {
  margin: 2rem 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  background: #fbfcfe;
}
.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
}
.stat-label {
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.35rem 0 0.75rem;
}
.stat-card a {
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.hero {
  width: min(560px, 100%);
  text-align: center;
  margin: 0;
}
.hero .brand-mark {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.hero p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin: 0;
}
.auth-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}
.auth-card p {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.list-row:hover {
  border-color: #b6cffc;
  box-shadow: 0 4px 16px rgba(0, 105, 255, 0.08);
}
.list-row .title {
  font-weight: 700;
}
.list-row .meta {
  color: var(--ink-muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-muted { background: #f1f4f8; color: var(--ink-muted); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table-wrap th,
.table-wrap td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.table-wrap th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: #f8fafc;
}
.table-wrap tr:last-child td {
  border-bottom: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.input-group {
  display: flex;
}
.input-group .prefix {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  color: var(--ink-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}
.input-group input {
  border-radius: 0 10px 10px 0 !important;
  flex: 1;
}

/* ——— Public booking shell ——— */
.book-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem 2.5rem;
}

.book-card {
  position: relative;
  width: min(920px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.book-card.narrow {
  width: min(560px, 100%);
}

.powered {
  position: absolute;
  top: 0;
  right: 0;
  background: #3a4454;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 1.6rem 0.45rem 1.1rem;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 2;
}

.book-home {
  padding: 2.25rem 2rem 2rem;
  text-align: center;
}
.book-home .avatar {
  margin: 0 auto 0.9rem;
}
.book-home h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.book-home .intro {
  margin: 0.55rem auto 1.5rem;
  max-width: 28rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.book-home-divider {
  height: 1px;
  background: var(--line);
  margin: 0 0 0.35rem;
}

.meeting-pick {
  text-align: left;
}
.meeting-pick a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 0.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none !important;
}
.meeting-pick a:last-child {
  border-bottom: 0;
}
.meeting-pick a:hover .mtitle {
  color: var(--accent);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mtitle {
  font-weight: 700;
  flex: 1;
}
.chev {
  color: var(--ink-muted);
}

.book-split {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  min-height: 520px;
}

.book-aside {
  padding: 1.35rem 1.4rem 1.5rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.book-aside .host-name {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}
.book-aside h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.meta-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}
.meta-list .icon {
  margin-top: 0.15rem;
  color: var(--ink-muted);
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  text-decoration: none !important;
}
.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.book-main {
  padding: 1.5rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.book-main h3 {
  margin: 0 0 1.1rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 220px);
  gap: 1.25rem;
  align-items: start;
  flex: 1;
}
.schedule-row.solo {
  grid-template-columns: 1fr;
  max-width: 360px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.cal-head strong {
  font-size: 1.05rem;
}
.cal-nav {
  display: flex;
  gap: 0.35rem;
}
.cal-nav a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  text-decoration: none !important;
}
.cal-nav a:hover {
  background: var(--accent-soft);
}
.cal-nav a.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem 0.2rem;
  text-align: center;
}
.cal-dow {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding: 0.25rem 0 0.45rem;
}
.cal-day {
  aspect-ratio: 1;
  width: 100%;
  max-width: 42px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-faint);
  text-decoration: none !important;
  position: relative;
  line-height: 1;
}
.cal-day.is-available {
  background: var(--accent-soft);
  color: var(--accent);
}
.cal-day.is-available:hover {
  background: #d6e6ff;
}
.cal-day.is-selected {
  background: var(--accent);
  color: #fff;
}
.cal-day.is-today {
  color: var(--ink);
  font-weight: 700;
}
.cal-day.is-available.is-today {
  color: var(--accent);
}
.cal-day.is-selected.is-today {
  color: #fff;
}
.cal-day.is-today::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
}
.cal-day.is-selected.is-today::after {
  background: #fff;
}
.cal-day.is-empty {
  visibility: hidden;
}

.tz-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.slot-pane h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.slot-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.slot-btn {
  display: block;
  text-align: center;
  padding: 0.7rem 0.9rem;
  border: 1px solid #9ec2ff;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none !important;
  background: #fff;
}
.slot-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.book-form {
  max-width: 420px;
}
.book-confirm {
  padding: 3rem 2rem;
  text-align: center;
}
.book-confirm .avatar {
  margin: 0 auto 1rem;
}
.book-confirm h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}
.book-confirm p {
  color: var(--ink-muted);
  margin: 0.35rem 0;
}

.book-foot {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
}
.book-home-foot {
  margin-top: 1.5rem;
  text-align: left;
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .book-split {
    grid-template-columns: 1fr;
  }
  .book-aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .schedule-row {
    grid-template-columns: 1fr;
  }
  .slot-list {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    width: calc(100% - 1.5rem);
    padding: 0.75rem 0;
  }
  .page {
    width: calc(100% - 1rem);
    margin-top: 1rem;
  }
  .page-card {
    padding: 1.15rem;
  }
  .book-home {
    padding: 1.75rem 1.15rem;
  }
  .page-card form > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}
