:root {
  color-scheme: light;
  --ink: #092030;
  --teal: #13b8a6;
  --deep-teal: #0c3c4e;
  --coral: #f45f55;
  --paper: #fff9ee;
  --gold: #ffce54;
  --line: #dde5e8;
  --muted: #68747b;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --app-viewport-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@supports (height: 100dvh) {
  :root {
    --app-viewport-height: 100dvh;
  }
}

html {
  min-height: 100%;
  background: var(--bg);
}

* {
  box-sizing: border-box;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

button.secondary {
  background: #e8eef0;
  color: var(--ink);
}

button.danger {
  background: var(--coral);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.75rem;
  background: white;
  color: var(--ink);
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.app-shell {
  min-height: 100vh;
  min-height: var(--app-viewport-height);
}

.public-shell {
  display: grid;
  grid-template-rows: auto 1fr;
}

.public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) calc(1.5rem + env(safe-area-inset-right, 0px)) 1rem calc(1.5rem + env(safe-area-inset-left, 0px));
}

.auth-text-button {
  background: transparent;
  color: var(--ink);
  padding: 0.5rem 0;
  border-radius: 0;
  font-weight: 800;
}

.floating-back-button {
  position: fixed;
  top: clamp(8rem, 18vh, 11rem);
  left: clamp(3rem, 21vw, 26rem);
  display: grid;
  place-items: center;
  width: 3.35rem;
  height: 2.5rem;
  background: transparent;
  color: #1267b3;
  padding: 0;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, color 160ms ease;
  z-index: 2;
}

.floating-back-button:hover {
  background: transparent;
  color: #0a4f8d;
}

.back-arrow-icon {
  display: block;
  width: 3rem;
  height: 2rem;
  overflow: visible;
}

.back-arrow-main {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: currentColor;
  stroke-width: 3.25;
}

.landing-panel {
  display: grid;
  align-items: center;
  width: min(760px, calc(100vw - 2rem));
  min-height: calc(var(--app-viewport-height) - 7rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  padding: 3rem 0 calc(3rem + env(safe-area-inset-bottom, 0px));
}

.landing-copy,
.inline-auth {
  grid-area: 1 / 1;
  transition: opacity 220ms ease, transform 220ms ease;
}

.landing-copy {
  opacity: 1;
  transform: translateY(0);
}

.inline-auth {
  display: grid;
  gap: 1rem;
  width: min(520px, 100%);
  justify-self: center;
  padding-inline: clamp(1rem, 4vw, 1.6rem);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
}

.landing-panel[data-auth-stage="auth"] .landing-copy {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.75rem);
}

.landing-panel[data-auth-stage="auth"] .inline-auth {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.landing-panel[data-auth-stage="auth"] .floating-back-button {
  opacity: 1;
  pointer-events: auto;
}

.landing-panel h1 {
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 0.98;
}

.landing-panel p {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
}

.auth-panel {
  display: grid;
  gap: 1.5rem;
  width: min(460px, calc(100vw - 2rem));
  margin: 9vh auto 0;
  padding: 2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-panel h1 {
  font-size: 2.25rem;
}

.auth-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.inline-auth-header {
  display: grid;
  gap: 0.8rem;
  justify-items: start;
}

.inline-auth-header h2 {
  font-size: 1.5rem;
}

.inline-auth-header p {
  color: var(--muted);
  margin-top: 0;
}

.auth-dialog {
  display: grid;
  gap: 1rem;
  width: min(440px, calc(100vw - 2rem));
  max-height: calc(var(--app-viewport-height) - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 80px rgb(9 32 48 / 28%);
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  width: 100%;
  padding: 0.25rem;
  border-radius: 8px;
  background: #edf2f4;
}

.auth-tabs button {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  padding: 0.55rem 0.5rem;
}

.auth-tabs button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(9 32 48 / 12%);
}

.customer-sandbox-dialog {
  width: min(880px, calc(100vw - 2rem));
}

.customer-sandbox-content {
  display: grid;
  gap: 1rem;
}

.customer-demo-exit {
  width: auto;
  min-width: max-content;
  padding: 0.45rem 0;
  background: transparent;
  color: #b7322b;
  font-weight: 850;
}

.customer-demo-exit:hover {
  background: transparent;
  color: #8d201a;
}

.customer-demo-exit-wide {
  justify-self: start;
}

.customer-demo-shell {
  display: grid;
  gap: 1rem;
}

.customer-flow-back {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  background: #e8eef0;
  color: #1267b3;
  font-size: 1.8rem;
  line-height: 1;
}

.customer-flow-back:hover {
  background: #dce7ea;
}

.customer-flow-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.customer-flow-progress li {
  display: grid;
  place-items: center;
  min-height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.customer-flow-progress li.current {
  border-color: var(--teal);
  color: #066d63;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.customer-flow-progress li.complete {
  border-color: #bfe9e3;
  background: #e1faf5;
  color: #066d63;
}

.customer-demo-hero,
.customer-demo-card,
.customer-channel-card,
.customer-calendar-event {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: white;
}

.customer-demo-hero {
  border-color: #cfe5f8;
  background: #f7fbff;
}

.customer-demo-brand-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
}

.customer-demo-brand-row p,
.customer-demo-card p,
.customer-channel-card p,
.customer-calendar-event p {
  color: var(--muted);
  line-height: 1.4;
}

.customer-demo-metrics,
.customer-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.customer-demo-metric {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem;
  border: 1px solid #d8ecea;
  border-radius: 8px;
  background: white;
}

.customer-demo-metric strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.customer-demo-metric span,
.customer-demo-metric small,
.customer-demo-muted,
.customer-demo-event-meta {
  color: var(--muted);
}

.customer-demo-metric span {
  font-size: 0.82rem;
  font-weight: 800;
}

.customer-demo-metric small {
  font-size: 0.74rem;
}

.customer-demo-tabs {
  display: flex;
  gap: 0.25rem;
  width: 100%;
  padding: 0.25rem;
  border-radius: 8px;
  background: #edf2f4;
}

.customer-demo-tabs button {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 0.45rem;
}

.customer-demo-tabs button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(9 32 48 / 12%);
}

.customer-demo-view,
.customer-sync-view,
.customer-settings-view,
.customer-calendar-list,
.customer-filter-list,
.customer-setting-list {
  display: grid;
  gap: 0.75rem;
}

.customer-account-view,
.customer-calendar-ready-view {
  align-items: start;
}

.customer-account-card {
  gap: 1rem;
}

.customer-flow-actions,
.customer-ready-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.customer-flow-actions p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.customer-category-search {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.customer-ready-actions {
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-link:hover {
  background: #0da797;
}

.button-link.secondary {
  background: #e8eef0;
  color: var(--ink);
}

.button-link.secondary:hover {
  background: #dce6e9;
}

.customer-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.customer-card-header,
.customer-setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.customer-card-header h3 {
  font-size: 1rem;
}

.customer-filter-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.customer-filter-row:first-child {
  border-top: 0;
}

.customer-filter-row input {
  width: auto;
  margin-top: 0.15rem;
  accent-color: var(--teal);
}

.customer-filter-row span {
  display: grid;
  gap: 0.15rem;
}

.customer-filter-row small {
  color: var(--muted);
  line-height: 1.35;
}

.customer-setting-row {
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.customer-setting-row:first-child {
  border-top: 0;
}

.customer-setting-row strong {
  color: #066d63;
}

.customer-calendar-event time {
  color: #066d63;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.customer-demo-event-meta {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 850;
}

.hint {
  font-size: 0.88rem;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logout-door-button {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--coral);
}

.logout-door-button:hover {
  background: transparent;
}

.logout-door-icon {
  position: relative;
  display: block;
  width: 1.45rem;
  height: 1.7rem;
}

.logout-door-icon::before {
  content: "";
  position: absolute;
  inset: 0.1rem 0.5rem 0 0;
  border: 2px solid #b7322b;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}

.logout-door-icon::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.18rem;
  width: 0.85rem;
  height: 1.35rem;
  border-radius: 3px;
  background: var(--coral);
  box-shadow: 0.18rem 0.08rem 0 #c93b34;
  transform: skewY(-8deg);
  transform-origin: left center;
}

.logout-door-icon span {
  position: absolute;
  z-index: 1;
  right: 0.1rem;
  top: 0.78rem;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 999px;
  background: #fff9ee;
}

.logout-door-button.demo-exit-button {
  width: auto;
  height: auto;
  padding: 0.4rem 0;
  color: #b7322b;
  font-weight: 850;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-lockup span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.mode-tabs {
  display: inline-flex;
  gap: 0.25rem;
  background: #edf2f4;
  border-radius: 8px;
  padding: 0.25rem;
}

.mode-tabs button {
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
}

.mode-tabs button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(9 32 48 / 12%);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
}

.sidebar,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sidebar {
  align-self: start;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.sidebar h2,
.panel h2 {
  font-size: 1.2rem;
}

.panel {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.panel-head p {
  color: var(--muted);
  margin-top: 0.25rem;
}

.business-list,
.event-list,
.log-list {
  display: grid;
  gap: 0.75rem;
}

.business-item,
.event-item,
.log-item,
.metric-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: white;
}

.business-item.selected {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.business-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.business-item-intro {
  min-width: 0;
}

.business-item-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.business-item-head .event-icon-button {
  margin-top: 0;
}

.business-item button {
  margin-top: 0.75rem;
}

.business-item h3,
.event-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.business-item p,
.event-item p,
.log-item p,
.metric-item p {
  color: var(--muted);
  line-height: 1.4;
}

.event-item .event-meta {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 0.45rem;
}

.event-group-card {
  display: grid;
  gap: 0.65rem;
}

.event-type-card {
  display: grid;
  gap: 0.75rem;
}

.event-group-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.event-group-heading {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.event-group-card h3,
.event-group-card p {
  margin: 0;
}

.event-group-summary {
  color: var(--ink);
  font-weight: 800;
}

.event-card-list {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.logical-event-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.logical-event-card.selected {
  border-color: var(--teal);
  background: #f2fbfa;
}

.logical-event-card h4,
.logical-event-card p {
  margin: 0;
}

.logical-event-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
}

.logical-event-header.selectable {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.event-select-control {
  display: grid;
  place-items: center;
  width: 1.75rem;
  min-height: 2rem;
  cursor: pointer;
}

.event-select-control input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.event-card-actions {
  display: flex;
  gap: 0.35rem;
}

.event-icon-button {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  background: #e8eef0;
  color: var(--ink);
}

.event-icon-button.danger {
  background: #ffe1df;
  color: #9d2b24;
}

.event-icon-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.event-icon-button:hover {
  background: #dff8f5;
  color: #066d63;
}

.event-icon-button.danger:hover {
  background: var(--coral);
  color: white;
}

.event-toggle-button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1;
}

.event-toggle-button:hover {
  border-color: var(--teal);
  background: #f2fbfa;
  color: #066d63;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.place-qr-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.place-qr-card img {
  width: 7rem;
  height: 7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.place-qr-card strong {
  display: block;
  margin-bottom: 0.2rem;
}

.place-qr-card code {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.place-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.delete-impact-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #edf2f4;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 0.25rem 0.55rem;
}

.pill.good {
  background: #dff8f5;
  color: #066d63;
}

.pill.warn {
  background: #fff4d5;
  color: #805700;
}

.pill.bad {
  background: #ffe1df;
  color: #9d2b24;
}

.event-subtabs {
  display: flex;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  padding: 0.25rem;
  border-radius: 8px;
  background: #edf2f4;
}

.event-subtabs button {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  padding: 0.55rem 0.5rem;
}

.event-subtabs button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(9 32 48 / 12%);
}

.event-search {
  max-width: 560px;
}

.event-result-count,
.selected-place-note {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.event-grouping-panel {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid #afe4df;
  border-radius: 8px;
  background: #f2fbfa;
}

.event-grouping-panel[hidden] {
  display: none;
}

.event-grouping-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
}

.event-grouping-header h3,
.event-grouping-header p {
  margin: 0;
}

.event-grouping-header p {
  color: var(--muted);
  line-height: 1.35;
}

.event-grouping-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
}

.business-calendar {
  display: grid;
  gap: 1rem;
}

.calendar-toolbar,
.calendar-nav,
.calendar-agenda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.calendar-toolbar {
  flex-wrap: wrap;
}

.calendar-title h3,
.calendar-agenda-header h3 {
  margin: 0;
  font-size: 1rem;
}

.calendar-title p,
.calendar-agenda-header p,
.calendar-empty-day {
  color: var(--muted);
  font-size: 0.88rem;
}

.calendar-mode {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 8px;
  background: #edf2f4;
}

.calendar-mode button {
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
}

.calendar-mode button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(9 32 48 / 12%);
}

.calendar-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 0.65rem;
}

.calendar-nav-button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: #e8eef0;
  color: var(--ink);
  font-size: 1.35rem;
}

.calendar-nav-label {
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.calendar-nav-center {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.calendar-nav-center .secondary {
  padding: 0.55rem 0.8rem;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day-blank,
.calendar-day {
  aspect-ratio: 0.9;
  min-height: 2.7rem;
}

button.calendar-day {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.2rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 0.25rem;
}

button.calendar-day.today {
  border-color: var(--teal);
}

button.calendar-day.has-events {
  background: #f2fbfa;
}

button.calendar-day.selected {
  background: var(--teal);
  color: white;
}

.calendar-day-number {
  font-size: 0.9rem;
  font-weight: 800;
}

.calendar-day-count,
.calendar-day-spacer {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.calendar-day-count {
  background: var(--teal);
  color: white;
}

button.calendar-day.selected .calendar-day-count {
  background: white;
  color: var(--deep-teal);
}

.calendar-agenda {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.calendar-week-list {
  display: grid;
  gap: 0.45rem;
}

button.calendar-week-day {
  display: grid;
  grid-template-columns: minmax(4rem, auto) minmax(0, 1fr);
  gap: 0.25rem 0.75rem;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  text-align: left;
}

button.calendar-week-day.today {
  border-color: var(--teal);
}

button.calendar-week-day.selected {
  background: #f2fbfa;
  border-color: var(--teal);
}

.calendar-week-date {
  display: grid;
  gap: 0.15rem;
  grid-row: span 2;
}

.calendar-week-date strong {
  font-size: 0.85rem;
}

.calendar-week-date span,
.calendar-week-summary,
.calendar-week-preview {
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-week-summary {
  color: var(--ink);
  font-weight: 800;
}

.calendar-week-preview:empty {
  display: none;
}

.calendar-agenda-item {
  display: grid;
  gap: 0.35rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.calendar-agenda-item h4 {
  margin: 0;
  font-size: 0.98rem;
}

.calendar-agenda-item p {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  height: var(--app-viewport-height);
  place-items: center;
  align-content: center;
  overflow: auto;
  overscroll-behavior: contain;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) calc(1rem + env(safe-area-inset-left, 0px));
  background: rgb(9 32 48 / 52%);
}

.event-modal {
  display: grid;
  gap: 1rem;
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(var(--app-viewport-height) - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 80px rgb(9 32 48 / 28%);
}

.event-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.event-modal-header h2,
.event-modal-header h3 {
  font-size: 1.25rem;
}

.event-modal-header p {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: #e8eef0;
  color: var(--ink);
}

.event-modal-body,
.modal-field-pair,
.review-stack,
.place-form {
  display: grid;
  gap: 1rem;
}

.repeat-field,
.repeat-end-field,
.address-field,
.tag-field {
  display: grid;
  gap: 0.75rem;
}

.place-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.place-field-label {
  font-weight: 800;
}

.manual-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.manual-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.address-assist[hidden] {
  display: none;
}

.address-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem;
  align-items: stretch;
}

.address-input-row input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.address-menu-button {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.address-menu-button:hover,
.address-menu-button:focus-visible,
.address-menu-button[aria-expanded="true"] {
  background: #f2fbfa;
}

.address-menu-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.address-field {
  position: relative;
  z-index: 4;
}

.address-field:focus-within {
  z-index: 12;
}

.address-assist {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  z-index: 20;
}

.address-suggestion-list {
  display: grid;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 34px rgb(9 32 48 / 16%);
}

.address-suggestion-button {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  padding: 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
  text-align: left;
}

.address-suggestion-button:last-of-type {
  border-bottom: 0;
}

.address-suggestion-button:hover,
.address-suggestion-button:focus-visible {
  background: #f2fbfa;
}

.address-suggestion-button strong {
  font-size: 0.95rem;
}

.address-suggestion-button span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.address-provider-note {
  padding: 0.35rem 0.7rem 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.event-datetime-field {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.datetime-header,
.datetime-nav,
.datetime-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.datetime-header h4,
.datetime-header p,
.datetime-month-label {
  margin: 0;
}

.datetime-header p,
.datetime-month-label {
  color: var(--muted);
}

.datetime-nav {
  justify-content: flex-end;
}

.datetime-nav-button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: #e8eef0;
  color: var(--ink);
}

.datetime-month-label {
  font-weight: 800;
}

.datetime-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}

.datetime-weekday,
.datetime-day-spacer,
.datetime-day-button {
  min-height: 2rem;
}

.datetime-weekday {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.datetime-day-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
}

.datetime-day-button.today {
  border-color: #b6e6e1;
}

.datetime-day-button.selected {
  background: var(--teal);
  color: white;
}

.datetime-time-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.datetime-actions {
  justify-content: flex-end;
}

.tag-toggle-list {
  display: grid;
  gap: 0.55rem;
}

.tag-toggle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.tag-toggle-row input {
  width: auto;
  margin-top: 0.2rem;
  accent-color: var(--teal);
}

.tag-toggle-row span {
  display: grid;
  gap: 0.15rem;
}

.tag-toggle-row small {
  color: var(--muted);
  line-height: 1.35;
}

.event-tag-create-form {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.event-tag-create-form h4,
.event-tag-create-form p {
  margin: 0;
}

.event-tag-create-form p {
  color: var(--muted);
  line-height: 1.4;
}

.field-hint {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.compact-action {
  justify-self: start;
  padding: 0.55rem 0.75rem;
}

.custom-day-list {
  display: grid;
  gap: 0.55rem;
}

.custom-day-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.custom-day-row.selected {
  border-color: #b6e6e1;
  background: #f7fcfb;
}

.custom-day-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  color: var(--ink);
}

.custom-day-toggle input {
  width: auto;
  margin-top: 0.15rem;
  accent-color: var(--teal);
}

.custom-day-toggle span {
  display: grid;
  gap: 0.1rem;
}

.custom-day-toggle small {
  color: var(--muted);
  font-weight: 600;
}

.custom-day-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.event-summary {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border: 1px solid #cfe8e5;
  border-radius: 8px;
  background: #f2fbfa;
}

.event-summary h4 {
  margin: 0;
  color: #066d63;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-summary p {
  color: var(--ink);
  line-height: 1.45;
}

.wizard-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wizard-stepper button {
  border-radius: 999px;
  background: #edf2f4;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.45rem;
  text-align: center;
}

.wizard-stepper button.complete {
  color: #33535d;
}

.wizard-stepper button.active {
  background: #dff8f5;
  color: #066d63;
}

.wizard-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.review-row {
  display: grid;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.review-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.review-row h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.form-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.category-manager {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.category-manager-header {
  display: grid;
  gap: 0.2rem;
}

.category-manager-header p,
.category-card p {
  color: var(--muted);
  line-height: 1.4;
}

.category-card-list {
  display: grid;
  gap: 0.75rem;
}

.category-card,
.category-form {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.category-card h4,
.category-form h4 {
  margin: 0;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.category-tags span {
  border-radius: 999px;
  background: #edf2f4;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.45rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.event-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.mark.small {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.mark::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  right: 8px;
  bottom: 7px;
  border-radius: 999px;
  background: var(--deep-teal);
}

.mark-calendar {
  width: 48px;
  height: 38px;
  border-radius: 8px;
  background: var(--paper);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.small .mark-calendar {
  width: 28px;
  height: 22px;
  border-radius: 5px;
}

.mark-calendar span {
  display: block;
  height: 9px;
  background: var(--teal);
}

.small .mark-calendar span {
  height: 5px;
}

.mark-calendar::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 10px;
  width: 10px;
  height: 18px;
  border-radius: 10px 10px 10px 2px;
  background: var(--coral);
  transform: rotate(45deg);
}

.small .mark-calendar::before {
  left: 11px;
  top: 6px;
  width: 6px;
  height: 11px;
}

.mark-calendar i {
  position: absolute;
  left: 22px;
  bottom: 7px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--gold);
}

.small .mark-calendar i {
  left: 13px;
  bottom: 4px;
  width: 5px;
  height: 5px;
}

.error {
  color: #a32921;
  background: #ffe1df;
  border: 1px solid #ffc5c0;
  border-radius: 8px;
  padding: 0.75rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 880px) {
  .customer-channel-grid,
  .customer-demo-metrics,
  .customer-demo-grid {
    grid-template-columns: 1fr;
  }

  .workspace,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    position: static;
  }

  .topbar .mode-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .logout-door-button {
    justify-self: end;
  }

  .mode-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .landing-panel {
    align-items: start;
    min-height: calc(var(--app-viewport-height) - 4.6rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 4.25rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
    width: min(100%, calc(100vw - 2rem));
  }

  .modal-backdrop {
    align-items: start;
    align-content: start;
    padding-inline: max(0.75rem, env(safe-area-inset-left, 0px)) max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .inline-auth {
    width: 100%;
    padding-inline: 0.85rem;
  }

  .floating-back-button {
    top: 5.35rem;
    left: 1.85rem;
    width: 2.5rem;
    height: 2rem;
  }

  .back-arrow-icon {
    width: 2.25rem;
    height: 1.5rem;
  }

  .back-arrow-main {
    stroke-width: 3;
  }

  .custom-day-times,
  .logical-event-header,
  .logical-event-header.selectable,
  .event-grouping-header,
  .event-grouping-form,
  .place-qr-card {
    grid-template-columns: 1fr;
  }

  .customer-flow-actions,
  .customer-ready-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .event-card-actions {
    justify-content: flex-start;
  }

  .event-datetime-field {
    gap: 0.65rem;
    padding: 0.7rem;
  }

  .datetime-weekday,
  .datetime-day-spacer,
  .datetime-day-button {
    min-height: 1.75rem;
  }

  .datetime-month-grid {
    gap: 0.15rem;
  }

  .datetime-time-controls {
    gap: 0.45rem;
  }

  .place-qr-card img {
    width: 8rem;
    height: 8rem;
  }
}
