/* ==========================================================================
   Calenderly — bright, clear, smooth UI
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-page: #f7f9fc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --border-input: #9ca3af;
  --border-focus: #2563eb;

  --text: #0a0f1a;
  --text-secondary: #1f2937;
  --text-muted: #4b5563;
  --text-soft: #6b7280;
  --text-on-accent: #ffffff;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-ring: rgba(37, 99, 235, 0.2);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);

  --success: #047857;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --error-border: #fecaca;

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --nav-height: 4.25rem;

  --shadow-xs: 0 1px 2px rgba(10, 15, 26, 0.04);
  --shadow-sm: 0 2px 8px rgba(10, 15, 26, 0.06);
  --shadow: 0 8px 30px rgba(10, 15, 26, 0.07);
  --shadow-lg: 0 24px 48px rgba(10, 15, 26, 0.1);

  --font: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  --text-base: 1rem;
  --leading: 1.65;
  --leading-tight: 1.25;
  /* Root size: 17.5px — scales all rem-based text sitewide */
  --font-root: 17.5px;

  --admin-layout-max: 1300px;
  --admin-layout-pad: 2.5rem;
}

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

html {
  font-size: var(--font-root);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading);
  color: var(--text-secondary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

body.app {
  display: flex;
  flex-direction: column;
}

body.app--admin {
  background: #f0f4f8;
  background-image:
    radial-gradient(ellipse 100% 80% at 0% -20%, rgba(37, 99, 235, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(124, 58, 237, 0.05) 0%, transparent 45%);
}

/* Admin top bar */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.admin-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--admin-layout-max);
  margin: 0 auto;
  padding: 0 var(--admin-layout-pad);
  height: 4.25rem;
}

.admin-topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.admin-topbar__brand em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.admin-topbar__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
}

.admin-topbar__nav {
  display: flex;
  gap: 0.25rem;
}

.admin-topbar__nav a {
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.admin-topbar__nav a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.admin-topbar__nav a.is-active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

.admin-topbar__actions .admin-topbar__nav {
  margin-right: 0.25rem;
}

/* Mobile nav menu (hamburger) */
.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.nav-menu-toggle:hover {
  background: var(--bg-subtle);
}

.nav-menu-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.nav-menu-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.is-menu-open .nav-menu-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.is-menu-open .nav-menu-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.is-menu-open .nav-menu-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu-backdrop {
  display: none;
  position: fixed;
  top: var(--nav-height, 4.25rem);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu-backdrop:not([hidden]) {
  display: block;
}

@media (max-width: 768px) {
  .nav-menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 3;
    touch-action: manipulation;
  }

  .admin-topbar,
  .site-header,
  .home-header {
    overflow: visible;
  }

  .admin-topbar__inner,
  .site-nav,
  .home-header__inner {
    position: relative;
    z-index: 2;
  }

  .admin-topbar__actions,
  .site-nav__links,
  .home-header__nav {
    display: none !important;
    position: fixed;
    top: var(--nav-height, 4.25rem);
    left: 0;
    right: 0;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100dvh - var(--nav-height, 4.25rem));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .admin-topbar__actions {
    gap: 0.5rem;
    margin-left: 0;
    padding: 0.75rem var(--admin-layout-pad) 1rem;
  }

  .site-nav__links {
    gap: 0.125rem;
    padding: 0.75rem 1.5rem 1rem;
  }

  .home-header__nav {
    gap: 0.125rem;
    padding: 0.75rem 1.5rem 1rem;
    border-bottom-color: rgba(229, 231, 235, 0.8);
  }

  .admin-topbar.is-menu-open .admin-topbar__actions,
  .site-header.is-menu-open .site-nav__links,
  .home-header.is-menu-open .home-header__nav {
    display: flex !important;
  }

  .admin-topbar__nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.125rem;
    margin-right: 0;
  }

  .admin-topbar__nav a {
    width: 100%;
  }

  .admin-topbar__actions > .btn {
    width: 100%;
    justify-content: center;
  }

  .site-nav__links a,
  .site-nav__user {
    width: 100%;
  }

  .home-header__nav a {
    width: 100%;
  }
}

/* Dashboard layout */
.dashboard {
  flex: 1;
  width: 100%;
  max-width: var(--admin-layout-max);
  margin: 0 auto;
  padding: 2.5rem var(--admin-layout-pad) 4rem;
}

.dashboard-alert {
  margin-bottom: 1.25rem;
}

.dashboard-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.dashboard-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

.dashboard-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.dashboard-hero__lead {
  margin: 0;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 40rem;
}

.dashboard-hero__cta {
  width: auto;
  flex-shrink: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1200px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

.dashboard-stats .stat-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  min-height: 6.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stats .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.dashboard-stats .stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  flex-shrink: 0;
}

.stat-card--users .stat-card__icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.stat-card--total .stat-card__icon {
  background: #eff6ff;
  color: #2563eb;
}

.stat-card--upcoming .stat-card__icon {
  background: #ecfdf5;
  color: #059669;
}

.stat-card--today .stat-card__icon {
  background: #fef3c7;
  color: #d97706;
}

.stat-card--past .stat-card__icon {
  background: #f3f4f6;
  color: #6b7280;
}

.stat-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-stats .stat-card__value {
  font-size: 2.25rem;
  line-height: 1.1;
}

.dashboard-stats .stat-card__label {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
}

.dashboard-panel {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.dashboard-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, var(--surface) 100%);
}

.dashboard-panel__title {
  margin: 0 0 0.375rem;
  font-size: 1.3125rem;
  font-weight: 700;
}

.dashboard-panel__meta {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.dashboard-panel__meta strong {
  color: var(--text);
}

.dashboard-panel__head .filter-tabs {
  flex-shrink: 0;
}

.dashboard-panel__toolbar {
  padding: 1.25rem 2rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.date-filter__label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dashboard-panel__toolbar .date-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.dashboard-panel__toolbar .date-filter__label {
  margin: 0;
  flex: 0 1 auto;
}

.dashboard-panel__toolbar .date-filter__label input[type="date"] {
  min-width: 11.5rem;
  width: auto;
}

.dashboard-panel__toolbar .date-filter .btn {
  margin: 0;
  flex-shrink: 0;
  padding-top: 0.8125rem;
  padding-bottom: 0.8125rem;
}

.dashboard-table-wrap {
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.dashboard-empty {
  padding: 3.5rem 1.5rem;
}

.appointments-table--dashboard thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-subtle);
  padding: 1.125rem 1.5rem;
  font-size: 0.8125rem;
}

.appointments-table--dashboard td {
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
}

.appointments-table--dashboard .note-cell {
  max-width: 320px;
}

.cell-primary {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.cell-secondary {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.cell-link {
  font-weight: 500;
  text-decoration: none;
}

.cell-link:hover {
  text-decoration: underline;
}

.cell-when .cell-primary,
.cell-customer .cell-primary {
  font-size: 1rem;
}

@media (max-width: 640px) {
  :root {
    --admin-layout-pad: 1.25rem;
  }

  .dashboard {
    padding: 1.75rem var(--admin-layout-pad) 2.5rem;
  }
}

/* Typography — bright & crisp */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

p {
  margin: 0;
}

strong {
  font-weight: 600;
  color: var(--text);
}

a {
  color: var(--accent);
  transition: color 0.2s ease;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: calc(1.1875rem + 1px);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.site-nav__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.site-nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.125rem;
}

.site-nav__links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: calc(0.9375rem + 1px);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav__links a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.site-nav__links a.is-active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.home-header__muted {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
}

.home-header__muted:hover {
  color: var(--accent);
}

.site-nav__cta {
  background: var(--accent) !important;
  color: var(--text-on-accent) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.site-nav__cta:hover {
  background: var(--accent-hover) !important;
  color: var(--text-on-accent) !important;
}

.site-nav__user {
  padding: 0.5rem 1rem;
  font-size: calc(0.9375rem + 1px);
  color: var(--text-muted);
}

.site-nav__user strong {
  color: var(--text);
  font-weight: 600;
}

.site-nav__muted {
  color: var(--text-soft) !important;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.site-footer__brand {
  margin: 0 0 0.375rem;
  font-size: calc(1rem + 1px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-footer__copy {
  margin: 0 0 1rem;
  font-size: calc(0.9375rem + 1px);
  color: var(--text-muted);
  line-height: 1.6;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.site-footer__links a {
  font-size: calc(0.9375rem + 1px);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent);
}

/* Page layout */
.page {
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 3rem;
}

.page--narrow {
  max-width: 460px;
}

.page--admin {
  max-width: 1140px;
}

/* Hero */
.hero {
  margin-bottom: 2rem;
}

.hero--compact {
  margin-bottom: 1.75rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.875rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 100px;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.035em;
}

.lead {
  margin: 0;
  max-width: 38rem;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Booking layout */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 920px) {
  .booking-layout {
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 2.5rem;
  }
}

.booking-aside__card {
  padding: 2rem;
  background: var(--accent-gradient);
  border-radius: var(--radius);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-lg);
}

.booking-aside__card h2 {
  margin: 0 0 0.625rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.booking-aside__card > p {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
}

.booking-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.booking-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
}

.booking-features li::before {
  content: "";
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  background: rgba(255, 255, 255, 0.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-radius: 50%;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.card--success {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.card--success h1 {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}

.card--success .lead {
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.card--success .btn-row {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-top: 0.25rem;
}

.card--success .btn-row .btn {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

/* Auth */
.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 3rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.08) 0%, transparent 55%),
    var(--bg-page);
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card--wide {
  max-width: 520px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-card .hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card .hero h1 {
  font-size: 1.875rem;
}

.auth-card .card {
  padding: 2rem;
}

/* Forms */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  margin-bottom: 1.75rem;
  padding-bottom: 0;
  border-bottom: none;
}

.form-section h2 {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 540px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.field__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.field__link:hover {
  text-decoration: underline;
}

.optional {
  font-weight: 500;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea,
.date-filter input[type="date"] {
  width: 100%;
  padding: 0.8125rem 1rem;
  border: 2px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-soft);
  font-weight: 400;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.date-filter input[type="date"]:hover {
  border-color: var(--text-soft);
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.date-filter input[type="date"]:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.field input:disabled,
.field select:disabled {
  background: var(--bg-subtle);
  color: var(--text-soft);
  cursor: not-allowed;
  opacity: 0.85;
}

.field textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.hint {
  margin: 0.625rem 0 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9375rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--sm {
  width: auto;
  padding: 0.5625rem 1.125rem;
  font-size: 0.9375rem;
}

.btn--ghost {
  width: auto;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.btn--ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--border-input);
  color: var(--text);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

.btn-row .btn {
  width: auto;
  min-width: 11rem;
}

/* Form buttons — always full width (excludes compact toolbar filters) */
form.card .btn,
form.booking-form .btn,
form.settings-form .btn,
.danger-card form .btn,
form .btn-row .btn {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

form.card .btn-row,
form.booking-form .btn-row,
.danger-card form .btn-row,
form .btn-row {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  justify-content: flex-start;
}

form .btn-row .btn {
  min-width: 0;
  flex: none;
}

/* Alerts */
.alert {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
}

.alert strong {
  color: inherit;
}

.alert--error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

.alert--success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.settings-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.settings-card__desc {
  margin: 0 0 1.5rem;
}

.settings-form {
  max-width: 28rem;
}

.settings-form .btn {
  margin-top: 0.25rem;
}

.alert ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Success */
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success-border);
  color: var(--success);
  font-size: 1.75rem;
  font-weight: 700;
}

.summary {
  margin: 2rem 0 2.25rem;
  padding: 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
}

.summary-row + .summary-row {
  border-top: 1px solid var(--border);
}

.summary-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

.summary-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.footer-link {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-link a:hover {
  text-decoration: underline;
}

.toolbar-row {
  margin: 0 0 1.5rem;
}

/* Admin */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
}

.admin-header__actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 680px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.stat-card__value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.1;
}

.stat-card__label {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.3125rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.filter-tabs a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-tabs a:hover {
  color: var(--text);
}

.filter-tabs a.is-active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.date-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.table-wrap {
  padding: 0;
  overflow: hidden;
}

.table-wrap.card {
  padding: 0;
}

.appointments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.appointments-table th,
.appointments-table td {
  padding: 1.125rem 1.375rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.appointments-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.appointments-table td {
  color: var(--text-secondary);
  font-weight: 400;
}

.appointments-table tbody tr {
  transition: background 0.15s ease;
}

.appointments-table tbody tr:hover {
  background: var(--accent-light);
}

.appointments-table tbody tr:hover td {
  color: var(--text);
}

.appointments-table tbody tr:last-child td {
  border-bottom: none;
}

.appointments-table a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.appointments-table a:hover {
  text-decoration: underline;
}

.note-cell {
  max-width: 240px;
  word-break: break-word;
  color: var(--text-muted) !important;
}

.booked-at {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-soft);
}

.badge {
  display: inline-block;
  padding: 0.3125rem 0.625rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--upcoming {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge--past {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.empty-state {
  margin: 0;
  padding: 3.5rem 1.5rem;
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.empty-state a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.empty-state a:hover {
  text-decoration: underline;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .btn {
  width: auto;
}

.text-muted {
  color: var(--text-soft);
  font-size: 0.9375rem;
}

/* Danger zone */
.danger-card {
  margin-top: 1.5rem;
  border-color: #fecaca;
  background: #fffbfb;
}

.danger-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #991b1b;
}

.danger-card__desc,
.danger-card__note {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.danger-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.danger-list li {
  margin-bottom: 0.375rem;
}

.danger-form {
  max-width: 28rem;
}

.field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.625rem;
}

.field--checkbox input {
  width: auto;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.field--checkbox span {
  font-weight: 500;
  line-height: 1.5;
}

.btn--danger {
  width: auto;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn--danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

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

@media (max-width: 768px) {
  .page {
    padding: 2rem 1.25rem 2.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .appointments-table thead {
    display: none;
  }

  .appointments-table tbody tr {
    display: block;
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .appointments-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4375rem 0;
    border: none;
    font-size: 0.9375rem;
  }

  .appointments-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .note-cell {
    max-width: none;
  }
}

/* ==========================================================================
   Home landing page
   ========================================================================== */

html:has(body.app--home) {
  scroll-behavior: smooth;
}

.home-scroll-target {
  scroll-margin-top: calc(var(--nav-height) + 0.75rem);
}

body.app--home {
  scroll-padding-top: calc(var(--nav-height) + 0.75rem);
  background: #f8fafc;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(37, 99, 235, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(37, 99, 235, 0.06) 0%, transparent 45%);
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.home-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
}

.home-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.home-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 11px;
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.home-header__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-header__nav a {
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.home-header__nav a:hover {
  color: var(--text);
  background: rgba(241, 245, 249, 0.9);
}

.home-header__cta {
  background: var(--accent) !important;
  color: var(--text-on-accent) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.home-header__cta:hover {
  background: var(--accent-hover) !important;
  color: var(--text-on-accent) !important;
}

.home-main {
  flex: 1;
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 1.5rem 4.5rem;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(124, 58, 237, 0.12) 0%, transparent 45%);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.4375rem 0.875rem 0.4375rem 0.625rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.home-hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.home-hero__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
}

.home-hero__lead {
  margin: 0 0 2rem;
  max-width: 32rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.home-hero__btn {
  width: auto;
  min-width: 11rem;
}

.home-mockup {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(4deg);
  transition: transform 0.4s ease;
}

.home-hero__visual:hover .home-mockup {
  transform: perspective(1200px) rotateY(-2deg) rotateX(2deg);
}

.home-mockup__bar {
  display: flex;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.home-mockup__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}

.home-mockup__bar span:first-child {
  background: #f87171;
}

.home-mockup__bar span:nth-child(2) {
  background: #fbbf24;
}

.home-mockup__bar span:nth-child(3) {
  background: #4ade80;
}

.home-mockup__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.home-mockup__label {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.home-mockup__slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-mockup__slots li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
}

.home-mockup__slots li.is-available {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.home-mockup__slots li.is-booked {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.home-section-head {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.home-section-head h2 {
  margin: 0 0 0.625rem;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.home-section-head p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-features {
  padding: 2rem 1.5rem 4rem;
  max-width: 1180px;
  margin: 0 auto;
}

.home-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.home-feature-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.home-feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
}

.home-feature-card__icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.home-feature-card__icon--green {
  background: #ecfdf5;
  color: #059669;
}

.home-feature-card__icon--violet {
  background: #f5f3ff;
  color: #7c3aed;
}

.home-feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.home-feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.home-panels {
  padding: 1rem 1.5rem 4rem;
  max-width: 1180px;
  margin: 0 auto;
}

.home-panels__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.home-panel {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.home-panel--organiser {
  background: linear-gradient(160deg, #ffffff 0%, #f5f8ff 100%);
  border-color: #c7d7fe;
}

.home-panel__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.home-panel h2 {
  margin: 0 0 0.625rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.home-panel__desc {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.home-panel__alert {
  margin-bottom: 1rem;
}

.home-lookup__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.home-lookup__field {
  display: flex;
  align-items: stretch;
  margin-bottom: 1rem;
  border: 2px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-lookup__field:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.home-lookup__prefix {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.home-lookup__field input {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1rem;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.home-lookup__field input:focus {
  outline: none;
}

.home-lookup .btn {
  width: 100%;
}

.home-checklist {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.home-checklist li {
  position: relative;
  padding: 0.4375rem 0 0.4375rem 1.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.home-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.home-panel__meta {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.home-panel__meta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.home-panel__meta a:hover {
  text-decoration: underline;
}

.home-steps {
  padding: 3.5rem 1.5rem 4rem;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
}

.home-section-head--light h2 {
  color: #f8fafc;
}

.home-steps__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.home-steps__list li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.home-steps__num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--accent-gradient);
  font-size: 1.125rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}

.home-steps__list h3 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #f8fafc;
}

.home-steps__list p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #94a3b8;
}

.home-stats {
  padding: 0 1.5rem 3rem;
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
}

.home-stats__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.home-stat {
  text-align: center;
  padding: 0.5rem;
}

.home-stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.home-stat__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-feature-card__icon--amber {
  background: #fffbeb;
  color: #d97706;
}

.home-feature-card__icon--rose {
  background: #fff1f2;
  color: #e11d48;
}

.home-showcase {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
}

.home-showcase__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.home-showcase__content h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.home-showcase__content p {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-showcase-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.home-showcase-card__url {
  margin: 0 0 1.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-family: ui-monospace, monospace;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: var(--radius-sm);
}

.home-showcase-card__row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.home-showcase-card__row span {
  color: var(--text-muted);
}

.home-showcase-card__btn {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  text-align: center;
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
}

.home-testimonials {
  padding: 4rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-testimonials__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.home-quote {
  margin: 0;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.home-quote p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-quote footer {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.home-quote footer strong {
  color: var(--text);
}

.home-faq {
  padding: 4rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.home-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.home-faq__item summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.home-faq__item summary::-webkit-details-marker {
  display: none;
}

.home-faq__item summary::after {
  content: "+";
  float: right;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
}

.home-faq__item[open] summary::after {
  content: "−";
}

.home-faq__item p {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-faq__item code {
  font-size: 0.875em;
  padding: 0.15rem 0.4rem;
  background: var(--bg-subtle);
  border-radius: 4px;
}

.home-cta {
  padding: 4rem 1.5rem 5rem;
  background: linear-gradient(135deg, #1e40af 0%, #4f46e5 50%, #7c3aed 100%);
}

.home-cta__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.home-cta__inner h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.home-cta__inner p {
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.88);
}

.home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.home-cta__ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}

.home-cta__ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.home-section-head--light p {
  color: #94a3b8;
}

.home-footer {
  padding: 3rem 1.5rem 2rem;
  background: #0f172a;
  color: #94a3b8;
}

.home-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.home-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem 2.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.home-footer__brand {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: #f8fafc;
}

.home-footer__tagline {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #64748b;
}

.home-footer__heading {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cbd5e1;
}

.home-footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
}

.home-footer__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
}

.home-footer__links a:hover {
  color: #fff;
}

.home-footer__copy {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
}

.home-preview-brand {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (max-width: 960px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .home-hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero__actions {
    justify-content: center;
  }

  .home-hero__visual {
    max-width: 380px;
    margin: 0 auto;
  }

  .home-mockup {
    transform: none;
  }

  .home-stats__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-features__grid {
    grid-template-columns: 1fr;
  }

  .home-showcase__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-showcase__content .home-checklist {
    text-align: left;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .home-testimonials__grid {
    grid-template-columns: 1fr;
  }

  .home-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-panels__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .home-stats__inner {
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
  }

  .home-footer__grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 2.5rem 1.25rem 3rem;
  }

  .home-hero__actions {
    flex-direction: column;
  }

  .home-hero__btn {
    width: 100%;
  }

  .home-lookup__field {
    flex-direction: column;
  }

  .home-lookup__prefix {
    border-right: none;
    border-bottom: 1px solid var(--border);
    justify-content: center;
    padding: 0.625rem;
  }
}

/* Backend super-admin */
body.app--backend {
  background-image:
    radial-gradient(ellipse 100% 80% at 0% -20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(37, 99, 235, 0.07) 0%, transparent 45%);
}

.admin-topbar--backend .admin-topbar__logo {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.admin-topbar--backend .admin-topbar__brand em {
  color: #7c3aed;
}

.backend-slug {
  font-size: 0.8125rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.backend-action-form {
  display: inline;
}

.table-actions .backend-action-form {
  margin-right: 0.25rem;
}

.backend-edit {
  flex: 1;
  max-width: 40rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1.5rem 4rem;
}

.backend-edit .dashboard-hero--centered {
  text-align: center;
}

.backend-edit .settings-form {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.backend-edit .settings-card {
  margin: 0;
}

.backend-edit .form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 0.5rem;
}

.settings-sections .settings-card,
.settings-sections .danger-card {
  margin: 0;
}

/* Copy booking link (organiser admin) */
.booking-link-copy {
  margin-top: 0.75rem;
  max-width: 36rem;
}

.dashboard-hero .booking-link-copy {
  margin-top: 1rem;
}

.booking-link-copy__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.booking-link-copy__row {
  display: flex;
  gap: 0.625rem;
  align-items: stretch;
}

.booking-link-copy__input {
  flex: 1;
  min-width: 0;
  padding: 0.6875rem 0.875rem;
  border: 2px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.booking-link-copy__input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-ring);
  background: #fff;
}

.booking-link-copy__btn {
  width: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.booking-link-copy__btn.is-copied {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--success);
}

.booking-link-copy__feedback {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
}

@media (max-width: 600px) {
  .booking-link-copy__row {
    flex-direction: column;
  }

  .booking-link-copy__btn {
    width: 100%;
  }
}

/* Organiser availability */
.availability-card + .availability-card {
  margin-top: 1.5rem;
}

.availability-weekly {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.availability-weekly__head,
.availability-weekly__row {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) 3.5rem minmax(7rem, 1fr) minmax(7rem, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
}

.availability-weekly__head {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.availability-weekly__day {
  font-weight: 600;
  color: var(--text);
}

.availability-weekly__toggle {
  display: flex;
  justify-content: center;
}

.availability-weekly__time {
  margin: 0;
}

.availability-weekly__time input {
  width: 100%;
}

.availability-date-form__grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.availability-date-form__head,
.availability-date-form__row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.25fr) minmax(6.5rem, auto) minmax(7rem, 1fr) minmax(7rem, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
}

.availability-date-form__head {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.availability-date-form__head span:nth-child(2) {
  text-align: center;
}

.availability-date-form__row .field {
  margin-bottom: 0;
  gap: 0;
}

.availability-date-form__row .field input[type="date"],
.availability-date-form__row .field input[type="time"] {
  width: 100%;
}

.availability-date-form__closed {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.0625rem;
  margin-bottom: 0;
}

.availability-date-form__closed input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex-shrink: 0;
}

.availability-empty {
  margin: 1.25rem 0 0;
}

.availability-dates-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.availability-dates-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.availability-dates-list__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.availability-dates-list__delete {
  margin: 0;
}

@media (max-width: 720px) {
  .availability-weekly__head {
    display: none;
  }

  .availability-weekly__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "day toggle"
      "start start"
      "end end";
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .availability-weekly__day {
    grid-area: day;
  }

  .availability-weekly__toggle {
    grid-area: toggle;
    justify-content: flex-end;
  }

  .availability-weekly__time:first-of-type {
    grid-area: start;
  }

  .availability-weekly__time:last-of-type {
    grid-area: end;
  }

  .availability-date-form__head {
    display: none;
  }

  .availability-date-form__row {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .availability-date-form__row .field {
    margin-bottom: 1rem;
    gap: 0.5rem;
  }

  .availability-date-form__row .field:last-child {
    margin-bottom: 0;
  }

  .availability-date-form__row .sr-only {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
  }

  .availability-date-form__closed {
    justify-content: flex-start;
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Dedicated error page */
body.app--error {
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.08) 0%, transparent 55%),
    var(--bg-page);
}

.error-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
}

.error-card {
  width: 100%;
  max-width: 28rem;
  text-align: center;
  padding: 2.5rem 2rem;
}

.error-card__code {
  margin: 0 0 0.75rem;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.35;
}

.error-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.error-card__message {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.error-card__actions {
  justify-content: center;
}

.error-card__actions .btn {
  width: auto;
  min-width: 9rem;
}

@media (max-width: 480px) {
  .error-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-card__actions .btn {
    width: 100%;
    min-width: 0;
  }
}
