:root {
  --bg: #f5f6fb;
  --text: #181a2a;
  --muted: #6b7186;
  --line: #e7e8f2;
  --panel: #fff;
  --soft: #f1f2fb;
  --primary: #6c5ce7;
  --primary-strong: #4b3fc9;
  --accent: #ff7a59;
  --grad: linear-gradient(135deg, #6c5ce7 0%, #8b7bff 55%, #a66bff 100%);
  --grad-soft: linear-gradient(160deg, #f3f1ff 0%, #eef1fb 100%);
  --ring: rgba(108, 92, 231, .18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button,
a.nav-link {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

button:hover,
.button:hover,
a.nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

button:active,
.button:active {
  transform: scale(.98);
}

button.primary,
.primary {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px var(--ring);
}
button.primary:hover,
.primary:hover {
  filter: brightness(1.05);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.booking-page {
  min-height: 100vh;
  padding: 0;
  background: linear-gradient(180deg, #f2f7f3 0%, var(--bg) 60%);
}

/* Standalone booking/manage pages: TRUE full-screen, edge to edge, scales with
   the viewport. (Scoped to .booking-page so the embed iframe stays compact.) */
.booking-page .booking-card {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 901px) {
  .booking-page .booking-card {
    grid-template-columns: 340px 1fr;
  }
  .booking-page .booking-main {
    padding: 40px clamp(40px, 5vw, 96px);
  }
  .booking-page .booking-side {
    padding: 40px 30px;
  }
  .booking-page .section-title {
    font-size: 2rem;
  }
  .booking-page .section-copy {
    font-size: 1.04rem;
  }
  /* Spread service/staff cards across the full width on big screens. */
  .booking-page .service-grid,
  .booking-page .staff-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.booking-card {
  max-width: 1120px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(20, 30, 25, .12);
  display: grid;
  grid-template-columns: 320px 1fr;
}

.booking-side {
  background: var(--grad-soft);
  border-right: 1px solid var(--line);
  padding: 22px;
}

.booking-main {
  min-height: 680px;
  padding: 22px;
}

.brand-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--grad);
  box-shadow: 0 8px 18px var(--ring);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}

.brand-row h1,
.auth-card h1,
.admin-nav h1 {
  margin: 0;
  font-size: 22px;
}

.muted {
  color: var(--muted);
}

.step-list {
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.step {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  justify-content: flex-start;
}

.step.active {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.notice {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid #d9e8df;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  line-height: 1.6;
}

.section-title {
  margin: 0;
  font-size: 28px;
}

.section-copy {
  color: var(--muted);
  line-height: 1.6;
}

.service-grid,
.staff-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.card-option {
  text-align: left;
  display: block;
  min-height: auto;
  padding: 16px;
}

.card-option.active {
  border-color: var(--primary);
  background: #efecfe;
  box-shadow: 0 0 0 3px var(--ring);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.style-tabs.two {
  grid-template-columns: repeat(2, 1fr);
}

.style-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
  background: var(--soft);
}

.style-tabs button {
  min-height: 34px;
  border-radius: 7px;
  background: transparent;
  border: 0;
  font-size: 12px;
}

.style-tabs button.active {
  background: #fff;
  color: var(--primary);
}

.calendar-layout {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.05fr .95fr;
}

.month-panel,
.slot-panel,
.panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 16px;
}

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

.weekdays {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  margin: 12px 0 5px;
}

.day-btn {
  min-height: 64px;
  padding: 8px;
  display: block;
  text-align: left;
  background: #fff;
}

.day-btn.out {
  opacity: .45;
}

.day-btn.closed {
  background: #f6f7f4;
  color: var(--muted);
}

.day-btn.active {
  background: #efecfe;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}

.day-btn span {
  display: block;
  font-size: 11px;
  color: var(--primary);
  margin-top: 8px;
}

.d-av i {
  font-style: normal;
}

.d-cl {
  color: var(--muted) !important;
}

/* Small availability indicator on a day cell (replaces raw slot counts). */
.d-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  margin-top: 8px;
}

.day-btn:disabled {
  cursor: default;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.slot-btn {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-height: 52px;
  height: auto;
  padding: 8px 12px;
  line-height: 1.2;
  text-align: left;
  overflow: hidden;
}

.slot-btn strong {
  font-size: 0.92rem;
  white-space: nowrap;
}

.slot-btn .muted {
  font-size: 0.72rem;
  font-weight: 600;
}

.slot-btn.active {
  background: #efecfe;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

input::placeholder,
textarea::placeholder {
  color: #9aa0b4;
}

.full {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
}

.summary {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 16px;
}

/* Keep readable content from stretching across a full-bleed page.
   A professional layout caps form/text width even when the chrome is full-screen. */
.step-narrow {
  max-width: 640px;
}
.booking-main .section-copy {
  max-width: 760px;
}
.stack-form {
  max-width: 560px;
}

.success {
  color: var(--primary);
  font-weight: 750;
}

.error {
  color: #b42318;
  font-weight: 750;
}

.auth-page,
.staff-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-card,
.staff-card {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
}

.staff-portal {
  min-height: 100vh;
  padding: 26px;
}

.staff-hero {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.admin-nav {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px;
}

.nav-link {
  margin-top: 8px;
  width: 100%;
  justify-content: flex-start;
}

.nav-link.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px var(--ring);
}
.admin-nav-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-nav-name {
  flex: 1;
  min-width: 0;
}
.admin-nav-name h1 {
  margin: 0;
}
.admin-nav-name p {
  margin: 0;
}
.admin-nav-toggle {
  display: none;
  min-height: 42px;
  min-width: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 1.25rem;
  line-height: 1;
}
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 14px 2px 4px;
}
.nav-ext {
  color: var(--muted);
}
.nav-arrow {
  margin-left: auto;
  opacity: .65;
  font-size: 0.9em;
}
.nav-signout {
  margin-top: 12px;
  color: #b42318;
}
.nav-signout:hover {
  border-color: #e4b6b1;
  background: #fdecea;
}

.admin-main {
  padding: 26px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.admin-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-tools > button,
.admin-tools > .button {
  white-space: nowrap;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.admin-head h2 {
  margin: 4px 0 0;
  font-size: 30px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-top: 22px;
}

.admin-grid.wide-left {
  grid-template-columns: 1.35fr .65fr;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.metric-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  font-size: 30px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel h3 {
  margin-top: 0;
}

.panel-subtitle {
  margin-top: 22px;
}

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

.appointment-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.appointment-row.status-cancelled,
.appointment-row.status-no_show,
.calendar-event.status-cancelled,
.calendar-event.status-no_show {
  opacity: .62;
  background: #faf7f5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 34px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.bar-row div {
  height: 9px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.trend-grid div {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  align-content: end;
  gap: 8px;
}

.trend-grid span {
  display: block;
  background: linear-gradient(180deg, var(--primary), #8dc9a8);
  border-radius: 7px 7px 3px 3px;
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.calendar-column {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf7;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.calendar-event {
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 7px;
}

.calendar-event.clickable {
  cursor: pointer;
}

.calendar-event.clickable:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 6px rgba(15, 107, 88, .12);
}

/* "+" quick-add button in day/week column headers. */
.cal-add {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--primary);
}

.cal-add:hover {
  background: #efecfe;
}

.staff-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.staff-admin-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 7px;
}

.staff-dot {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
}

.stack-form {
  display: grid;
  gap: 12px;
}

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

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-row input {
  width: auto;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

pre {
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #111816;
  color: #dff7eb;
  padding: 12px;
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .booking-card,
  .admin-shell,
  .admin-grid,
  .admin-grid.wide-left,
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .metric-grid,
  .trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .admin-nav-links {
    display: none;
    margin-top: 12px;
  }
  .admin-nav-links.open {
    display: block;
  }
  .booking-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  /* Mobile: compact the sidebar so the booking content is the focus. */
  .booking-side .notice {
    display: none;
  }
  .booking-side .brand-row p {
    display: none;
  }
  .booking-side .step-list {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    margin-top: 14px;
    overflow-x: auto;
  }
  .booking-side .step {
    justify-content: center;
    text-align: center;
    padding: 9px 6px;
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .service-grid,
  .staff-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .slot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .row-between,
  .admin-head,
  .admin-tools,
  .staff-hero,
  .top-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .booking-page {
    padding: 0;
  }
  .booking-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .booking-main,
  .booking-side,
  .admin-main,
  .staff-portal {
    padding: 16px;
  }
  .month-grid {
    gap: 4px;
  }
  .day-btn {
    min-height: 50px;
    padding: 5px 3px;
    font-size: 12px;
  }
  .day-btn span {
    font-size: 10px;
    margin-top: 4px;
  }
  /* On phones the day cells are tiny: show just the number, hide the word
     "slots" and the "Closed" text (closed days are conveyed by the dim style). */
  .day-btn .d-av i,
  .day-btn .d-cl {
    display: none;
  }
  .metric-grid,
  .trend-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 1fr;
  }
  .admin-shell {
    display: block;
  }
}

/* ---- Upgrade components: loading, toast, modal, manage, services ---- */
.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
}
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  animation: velora-spin 0.8s linear infinite;
}
@keyframes velora-spin {
  to { transform: rotate(360deg); }
}

button.danger,
.danger {
  border-color: #e4b6b1;
  color: #b42318;
  background: #fff;
}
button.danger:hover {
  background: #fdecea;
}
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.button-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.row-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.row-actions button {
  min-height: 34px;
  font-size: 0.85rem;
}
.manage-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.manage-link:hover {
  text-decoration: underline;
}
.success-text {
  color: var(--primary-strong);
  font-weight: 600;
}
.success-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.month-nav {
  min-height: 32px;
  min-width: 36px;
  padding: 0 10px;
  font-size: 1.1rem;
}
/* The manage page is a single centered card (no sidebar), so it must opt out
   of the full-bleed two-column treatment that .booking-page .booking-card adds. */
.booking-page .booking-card.manage-card {
  display: block;
  width: min(560px, 100% - 32px);
  max-width: 560px;
  margin: 44px auto;
  min-height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(20, 30, 25, .12);
}
.manage-card .booking-main {
  min-height: auto;
}
.manage-summary {
  border-left: 4px solid var(--primary);
}

/* Login / auth page (was unstyled) */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
main.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 460px at 50% -10%, #efeafe 0%, rgba(239, 234, 254, 0) 60%),
    linear-gradient(180deg, #f3f1ff 0%, var(--bg) 60%);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(20, 30, 25, .14);
  display: grid;
  gap: 14px;
}
.auth-card h1 {
  margin: 6px 0 0;
  font-size: 1.5rem;
}
.auth-card > p {
  margin: 0 0 4px;
  color: var(--muted);
}

/* OAuth ("Continue with Google") button + separator */
.oauth-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .85rem;
}
.oauth-sep::before,
.oauth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #1f2430;
  font-weight: 600;
  text-decoration: none;
}
.oauth-btn:hover {
  background: #f6f7fb;
}
.oauth-btn .g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #dadce0;
  font-weight: 800;
  color: #4285f4;
}

/* Getting-started checklist for a brand-new (empty) business */
.onboard-panel {
  border-left: 4px solid var(--primary);
}
.onboard-steps {
  margin: 12px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.onboard-steps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================================
   Full-page auth experience (login / register) — modern SaaS look
   ============================================================ */
.auth-body { margin: 0; }
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
/* Left brand / marketing panel */
.auth-hero {
  position: relative;
  color: #fff;
  padding: 56px 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, #6d5cf0 0%, #8b5cf6 45%, #5b6cf0 100%);
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 80% 10%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(600px 500px at 10% 90%, rgba(255,255,255,.12), transparent 60%);
  pointer-events: none;
}
.auth-hero-inner { position: relative; max-width: 440px; }
.auth-hero h1 { font-size: 2.1rem; margin: 18px 0 10px; line-height: 1.15; }
.auth-hero p { font-size: 1.05rem; opacity: .92; margin: 0 0 26px; }
.auth-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-features li { display: flex; align-items: center; gap: 10px; font-size: .98rem; opacity: .95; }
.auth-features li b { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.22); align-items: center; justify-content: center; font-size: 13px; }
.auth-hero .brand-mark { background: rgba(255,255,255,.18); color: #fff; width: 52px; height: 52px; font-size: 18px; }

/* Right form panel */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #f7f8fc;
}
.auth-box {
  width: 100%;
  max-width: 410px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 30px 26px;
  box-shadow: 0 24px 60px rgba(30, 25, 60, .10);
  position: relative;
}
.auth-box .auth-lang { position: absolute; top: 16px; right: 16px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #eef0f7;
  border-radius: 12px;
  padding: 4px;
  margin: 6px 0 22px;
}
.auth-tab {
  border: 0;
  background: transparent;
  padding: 10px 0;
  border-radius: 9px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s ease;
}
.auth-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.auth-form { display: grid; gap: 14px; animation: authfade .25s ease; }
@keyframes authfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.auth-form h2 { margin: 0; font-size: 1.35rem; }
.auth-form .sub { margin: -6px 0 4px; color: var(--muted); font-size: .92rem; }
.auth-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.auth-form input[type=email],
.auth-form input[type=password],
.auth-form input[type=text] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .98rem;
}
.auth-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.auth-form input.invalid { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.12); }
.field-error { color: #d92d20; font-size: .8rem; font-weight: 500; }
.auth-submit {
  position: relative;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .06s ease, filter .15s ease;
}
.auth-submit:hover { filter: brightness(1.05); }
.auth-submit:active { transform: scale(.985); }
.auth-submit:disabled { opacity: .7; cursor: default; }
.auth-submit .spin {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}
.auth-submit.loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; }
.terms-row { display: flex; align-items: flex-start; gap: 9px; font-size: .82rem; color: var(--muted); font-weight: 500; }
.terms-row input { margin-top: 2px; width: 16px; height: 16px; }
.terms-row a { color: var(--primary); }
.auth-form .error { color: #d92d20; font-size: .88rem; margin: 0; min-height: 1em; }
.auth-form .success-text { color: #0a7d52; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { padding: 34px 26px; min-height: auto; }
  .auth-hero h1 { font-size: 1.6rem; }
  .auth-hero p { margin-bottom: 14px; }
  .auth-features { display: none; }
  .auth-panel { padding: 26px 16px 40px; }
  .auth-box { box-shadow: none; border: 1px solid var(--line); }
}

/* "Please verify your email" banner in the admin shell */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff7e6;
  border: 1px solid #f0d9a8;
  color: #7a5b12;
  padding: 10px 16px;
  font-size: .9rem;
}
.verify-banner button {
  border-color: #e3c889;
  background: #fff;
}

/* Language switch — segmented control (globe + EN | 中文) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 25, .04);
}
.lang-globe {
  color: var(--muted);
  opacity: .75;
  margin-right: 3px;
  flex: 0 0 auto;
}
.lang-switch {
  flex: 0 0 auto;
  white-space: nowrap;
}
.lang-seg {
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.lang-seg:hover {
  transform: none;
  border-color: transparent;
}
.lang-seg:hover:not(.active) {
  color: var(--primary);
}
.lang-seg.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 3px 10px var(--ring);
}
.side-lang {
  margin-top: 16px;
}
.manage-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.auth-lang {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-weight: 600;
}
.toast-ok { background: var(--primary); }
.toast-err { background: #b42318; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 28, 24, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-head h3 {
  margin: 0;
}
.modal-x {
  min-height: 32px;
  min-width: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  line-height: 1;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .modal-overlay {
    padding: 12px;
  }
  .toast {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* Availability board */
.avail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.avail-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.avail-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avail-head .min0 {
  flex: 1;
  min-width: 0;
}
.avail-head .min0 p {
  margin: 0;
}
.staff-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-free {
  background: #e7f5ee;
  color: var(--primary-strong);
  border: 1px solid #bfe3d0;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 600;
}
.avail-appt {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.avail-appt:last-child {
  border-bottom: 0;
}
.status-pill.green { background: #e7f5ee; color: #0a4b3d; }
.status-pill.red { background: #fdecea; color: #b42318; }
.status-pill.gold { background: #fbf2da; color: #8a6d1f; }
.status-pill.neutral { background: var(--soft); color: var(--muted); }

.license-bar {
  background: #fdecea;
  color: #b42318;
  border: 1px solid #e4b6b1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 600;
}

/* Brand logo in the booking widget */
.brand-logo {
  max-height: 44px;
  max-width: 160px;
  object-fit: contain;
}

/* Calendar toolbar (day/week/month) */
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.seg button {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}
.seg button.active {
  background: var(--primary);
  color: #fff;
}
.cal-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cal-nav strong {
  min-width: 150px;
  text-align: center;
}
.cal-tools {
  display: inline-flex;
  gap: 8px;
}
.cal-tools input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

/* Week grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.week-col {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  min-height: 90px;
  background: #fff;
}
.week-col > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.cal-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.cal-actions select {
  min-height: 32px;
  flex: 1;
}
.cal-actions button {
  min-height: 32px;
  font-size: 0.8rem;
}

/* Settings brand previews */
.brand-preview {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}
.logo-preview {
  max-height: 56px;
  max-width: 200px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}
.favicon-preview {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

@media (max-width: 900px) {
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Share booking link */
.share-panel {
  border-left: 4px solid var(--primary);
}
.link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.link-row input {
  flex: 1;
  min-width: 220px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

/* JotForm-style method picker grid */
.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.embed-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  text-align: left;
  padding: 16px;
  min-height: auto;
  height: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.embed-tile.active {
  border-color: var(--primary);
  background: #efecfe;
  box-shadow: 0 0 0 3px var(--ring);
}
.embed-tile-ic {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--primary);
}
.embed-tile-title {
  font-weight: 800;
}
.tile-tag {
  font-size: 0.66rem;
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

/* Share & embed: config on the left, live preview sticky on the right */
.embed-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.embed-options {
  max-width: none;
}
.embed-code-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.embed-previewcol .panel {
  position: sticky;
  top: 16px;
}
@media (max-width: 1000px) {
  .embed-2col {
    grid-template-columns: 1fr;
  }
  .embed-previewcol .panel {
    position: static;
  }
}

.embed-preview-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  margin-top: 10px;
}
#embed-preview {
  width: 100%;
  height: 640px;
  border: 0;
  display: block;
}

/* Service cards with a photo */
.card-option.service-card {
  padding: 0;
  overflow: hidden;
}
.service-img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
}
.service-img--ph {
  height: 84px;
}
.service-card-body {
  display: block;
  padding: 14px 16px;
}

/* Technician cards with a photo / avatar */
.card-option.staff-card {
  display: flex;
  gap: 14px;
  align-items: center;
}
.staff-card-body {
  min-width: 0;
}
.staff-card-body p {
  margin: 2px 0 0;
}
.staff-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.staff-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.staff-avatar--any {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.appointment-row.clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.appointment-row.clickable:hover { border-color: var(--primary); box-shadow: 0 1px 8px rgba(108,92,231,.12); }

/* Admin thumbnails for service/staff images */
.img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.staff-admin-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.staff-photo-btn {
  margin-top: 10px;
  min-height: 32px;
  font-size: 0.8rem;
}

/* "‹ change time" inline link in the progressive date/time panel */
.back-inline {
  border: 0;
  background: none;
  color: var(--primary);
  padding: 0;
  margin-bottom: 10px;
  min-height: auto;
  font-weight: 700;
  cursor: pointer;
}
.back-inline:hover {
  text-decoration: underline;
  transform: none;
  border-color: transparent;
}

/* ============================================================
   Glass auth theme — shared by login / register / forgot / reset / verify
   ============================================================ */
body.glass-auth { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.auth-stage {
  position: relative; min-height: 100vh; display: grid; place-items: center;
  padding: 24px; overflow: hidden;
  background: radial-gradient(1200px 800px at 15% 20%, #2a1d63 0%, transparent 55%),
              radial-gradient(1000px 700px at 85% 80%, #1b2a6b 0%, transparent 55%),
              linear-gradient(135deg, #0b0a1e 0%, #14123a 50%, #0c1430 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: 0; pointer-events: none; }
.blob.b1 { width: 420px; height: 420px; background: #7c3aed; top: -120px; left: -80px; animation: drift1 16s ease-in-out infinite; }
.blob.b2 { width: 360px; height: 360px; background: #4f46e5; bottom: -120px; right: -60px; animation: drift2 19s ease-in-out infinite; }
.blob.b3 { width: 300px; height: 300px; background: #db2777; top: 40%; right: 12%; opacity: .35; animation: drift3 22s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.1); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,-30px) scale(1.08); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px,30px); } }
.glass-card {
  position: relative; z-index: 1; width: 100%; max-width: 430px; padding: 34px 32px 28px;
  border-radius: 22px; background: rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18);
  color: #fff; animation: cardIn .5s cubic-bezier(.2,.7,.3,1);
}
@keyframes cardIn { from { opacity:0; transform: translateY(18px) scale(.98); } to { opacity:1; transform:none; } }
.glass-card .lang-top { position: absolute; top: 14px; right: 14px; }
.glass-brand { display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom: 18px; }
.glass-logo {
  width: 56px; height: 56px; border-radius: 16px; display:flex; align-items:center; justify-content:center;
  font-weight: 800; font-size: 20px; color:#fff; letter-spacing:.5px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1); box-shadow: 0 10px 30px rgba(124,58,237,.55);
}
.glass-brand h1 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.glass-brand p { margin: 2px 0 0; font-size: .9rem; color: rgba(255,255,255,.62); text-align:center; }
.gtabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; margin: 4px 0 20px;
  background: rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius: 12px; }
.gtab { border:0; background:transparent; color:rgba(255,255,255,.6); font-weight:700; padding:9px 0; border-radius:9px; cursor:pointer; transition:.2s; }
.gtab.active { background:rgba(255,255,255,.16); color:#fff; box-shadow:0 2px 10px rgba(0,0,0,.2); }
.gform { display:grid; gap:15px; animation: ffade .3s ease; }
.gform[hidden] { display: none; }
@keyframes ffade { from { opacity:0; transform:translateY(8px);} to {opacity:1;transform:none;} }
.gform h2 { margin:0 0 -2px; font-size:1.32rem; font-weight:700; color:#fff; }
.gform .sub { margin:0 0 4px; font-size:.88rem; color:rgba(255,255,255,.6); }
.gform label { display:grid; gap:7px; font-size:.82rem; font-weight:600; color:rgba(255,255,255,.78); }
.gform input[type=email], .gform input[type=password], .gform input[type=text] {
  width:100%; padding:12px 14px; border-radius:11px; font-size:.96rem; color:#fff;
  background: rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.16);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.gform input::placeholder { color: rgba(255,255,255,.4); }
.gform input:focus { outline:none; border-color: #8b5cf6; background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px rgba(139,92,246,.25); }
.gform input.invalid { border-color:#fb7185; box-shadow:0 0 0 3px rgba(251,113,133,.2); }
.gbtn { position:relative; width:100%; padding:13px; border:0; border-radius:12px; cursor:pointer;
  font-size:1rem; font-weight:700; color:#fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%); box-shadow: 0 12px 30px rgba(99,102,241,.45);
  transition: transform .06s ease, box-shadow .2s ease, filter .2s ease; }
.gbtn:hover { filter:brightness(1.08); box-shadow:0 14px 38px rgba(99,102,241,.6); }
.gbtn:active { transform: scale(.98); }
.gbtn:disabled { opacity:.7; cursor:default; }
.gbtn .spin { display:none; width:16px; height:16px; margin-right:8px; vertical-align:-3px;
  border:2px solid rgba(255,255,255,.5); border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; }
.gbtn.loading .spin { display:inline-block; }
@keyframes spin { to { transform: rotate(360deg);} }
.gsep { display:flex; align-items:center; gap:12px; color:rgba(255,255,255,.45); font-size:.8rem; margin:4px 0; }
.gsep::before, .gsep::after { content:""; flex:1; height:1px; background:rgba(255,255,255,.16); }
.gsocial { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:12px;
  border-radius:12px; text-decoration:none; font-weight:600; color:#fff;
  background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); transition:.18s; }
.gsocial:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.gsocial .gico { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center;
  background:#fff; border-radius:50%; color:#4285f4; font-weight:800; font-size:13px; }
.grow { display:flex; align-items:center; justify-content:space-between; font-size:.82rem; }
.grow a, .gfoot a, .gterms a { color:#c4b5fd; text-decoration:none; }
.grow a:hover, .gfoot a:hover, .gterms a:hover { text-decoration:underline; }
.gterms { display:flex; gap:9px; align-items:flex-start; font-size:.78rem; color:rgba(255,255,255,.62); }
.gterms input { margin-top:2px; width:16px; height:16px; accent-color: #8b5cf6; }
.gerror { color:#fda4af; font-size:.85rem; margin:0; min-height:1em; }
.gsuccess { color:#86efac; font-size:.92rem; margin:0; }
.gfoot { text-align:center; font-size:.85rem; color:rgba(255,255,255,.6); margin: 2px 0 0; }
.glass-card .lang-switch { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.glass-card .lang-switch button { color:#fff; }
.glass-card .lang-switch .active { background:#fff; color:#1a1147; }
@media (max-width: 480px) {
  .glass-card { padding: 26px 20px 22px; border-radius: 18px; }
  .blob { filter: blur(50px); }
}
