:root {
  --ink: #162033;
  --muted: #657084;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --line: #dbe2ec;
  --blue: #2455a6;
  --blue-2: #173764;
  --green: #2f7d58;
  --orange: #df6d2e;
  --red: #b83f49;
  --shadow: 0 16px 38px rgba(30, 45, 75, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.hidden {
  display: none !important;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.landing {
  background: #fff;
  min-height: 100vh;
  padding: 24px;
}

.public-event {
  background: #f7f9fc;
  min-height: 100vh;
}

.event-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 28px;
}

.link-button {
  align-items: center;
  color: inherit;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.event-page {
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(16px, 4vw, 28px);
}

.event-hero {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.event-hero > div,
.event-rsvp-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.event-hero > div {
  padding: 34px;
}

.event-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.event-copy {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 720px;
}

.event-hero img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 100%;
  max-height: 650px;
  object-fit: contain;
  width: 100%;
}

.event-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.event-facts span {
  background: #eaf1fb;
  border: 1px solid #c9d8ee;
  border-radius: 999px;
  color: #223a5f;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 11px;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.event-rsvp-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.confirmation {
  background: #eaf4ef;
  border: 1px solid #bbd8c7;
  border-radius: 8px;
  color: #1f5f40;
  padding: 16px;
}

.confirmation p {
  margin-bottom: 0;
}

.landing-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  max-width: 1120px;
}

.brand.compact {
  color: var(--ink);
}

.brand.compact .brand-mark {
  height: 42px;
  width: 42px;
}

.brand.compact span {
  color: var(--muted);
}

.search-start {
  display: grid;
  justify-items: center;
  margin: 12vh auto 36px;
  max-width: 820px;
  text-align: center;
}

.search-start h1 {
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.02;
  margin-bottom: 18px;
}

.search-start p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  max-width: 680px;
}

.search-box {
  align-items: center;
  border: 1px solid #d5ddea;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(30, 45, 75, 0.1);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 24px;
  max-width: 720px;
  padding: 8px;
  width: 100%;
}

.search-box input {
  border: 0;
  font-size: 18px;
  min-height: 48px;
  outline: 0;
  padding-left: 18px;
}

.wizard {
  margin: 0 auto 60px;
  max-width: 760px;
}

.wizard-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: none;
  gap: 14px;
  padding: 28px;
}

.wizard-step.active {
  display: grid;
}

.wizard-step h2 {
  font-size: 24px;
}

.wizard-step input,
.wizard-step select,
.wizard-step textarea {
  width: 100%;
}

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

.price-note {
  background: #eaf4ef;
  border: 1px solid #bbd8c7;
  border-radius: 8px;
  color: var(--green);
  font-weight: 700;
  margin: 0;
  padding: 12px 14px;
}

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

.choice-grid label {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
}

.choice-grid input {
  min-height: auto;
  width: auto;
}

.form-preview,
.import-box {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.form-preview h3,
.import-box h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.form-preview div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-preview p {
  color: var(--muted);
  margin-bottom: 0;
}

.form-builder {
  display: grid;
  gap: 10px;
}

.builder-row {
  align-items: center;
  background: #fff;
  border: 1px solid #d5ddea;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 0.8fr) auto minmax(150px, 1fr) auto;
  padding: 10px;
}

.builder-row input,
.builder-row select {
  min-height: 38px;
}

.builder-required {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  white-space: nowrap;
}

.builder-required input {
  min-height: auto;
  width: auto;
}

.builder-buttons {
  display: flex;
  gap: 6px;
}

.builder-buttons .ghost {
  min-height: 34px;
  padding: 7px 9px;
}

.builder-buttons .danger {
  color: var(--red);
}

.custom-field-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.builder-actions {
  display: flex;
  justify-content: flex-end;
}

.live-preview {
  background: #fff;
  border: 1px dashed #bac7d8;
  border-radius: 8px;
  padding: 16px;
}

.live-preview h3 {
  font-size: 16px;
  margin: 0 0 12px;
}

.preview-fields {
  display: grid;
  gap: 12px;
}

.preview-fields fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
}

.preview-fields legend {
  color: #33405a;
  font-size: 13px;
  font-weight: 700;
  padding: 0 5px;
}

.preview-fields fieldset label,
.inline-field {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.preview-fields input[type="radio"],
.preview-fields input[type="checkbox"],
.inline-field input {
  min-height: auto;
  width: auto;
}

.friendly-url {
  background: #111b2d;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  overflow-wrap: anywhere;
  padding: 16px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar {
  background: #111b2d;
  color: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
}

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

.brand-mark {
  align-items: center;
  background: var(--orange);
  border-radius: 8px;
  color: #fff;
  display: grid;
  font-weight: 800;
  height: 48px;
  justify-items: center;
  width: 48px;
}

.brand strong,
.brand span,
.plan-card span,
.plan-card strong {
  display: block;
}

.brand span,
.plan-card span {
  color: #aeb8c9;
  font-size: 13px;
  margin-top: 4px;
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #dce5f2;
  padding: 12px 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #1d2d49;
  border-color: #33496e;
  color: #fff;
}

.plan-card {
  background: #192743;
  border: 1px solid #304563;
  border-radius: 8px;
  margin-top: auto;
  padding: 16px;
}

.segmented {
  background: #0c1424;
  border: 1px solid #304563;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  padding: 4px;
}

.segmented button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #cdd7e7;
  padding: 8px;
}

.segmented .selected {
  background: #fff;
  color: #14213a;
}

main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 30px;
}

.eyebrow {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 5px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.top-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary,
.ghost,
.text-button {
  border-radius: 8px;
  min-height: 40px;
  padding: 10px 14px;
}

.primary {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #fff;
  font-weight: 700;
}

.primary:hover {
  background: var(--blue-2);
}

.ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-weight: 700;
}

.view {
  display: none;
  padding: 28px 30px;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metrics article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metrics article {
  padding: 20px;
}

.metrics span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

.metrics strong {
  font-size: 32px;
}

.content-grid,
.booking-panel,
.split-grid {
  display: grid;
  gap: 22px;
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.panel {
  padding: 22px;
}

.panel-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

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

.hint {
  font-size: 13px;
}

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

.item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.item strong,
.item span {
  display: block;
}

.item span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

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

.day-cell {
  aspect-ratio: 1;
  background: #f0f4fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
}

.day-cell strong {
  display: block;
}

.day-cell span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.day-cell.has-event {
  background: #eaf4ef;
  border-color: #bbd8c7;
}

.booking-panel {
  grid-template-columns: 330px minmax(0, 1fr);
}

.booking-visual {
  align-items: center;
  background: linear-gradient(135deg, #173764, #2f7d58);
  border-radius: 8px;
  display: flex;
  min-height: 540px;
  padding: 24px;
}

.month-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  padding: 24px;
  width: 100%;
}

.month-card span,
.month-card small {
  color: var(--muted);
  display: block;
}

.month-card strong {
  color: var(--orange);
  display: block;
  font-size: 82px;
  line-height: 1;
  margin: 14px 0;
}

.form {
  display: grid;
  gap: 14px;
}

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

.span-2 {
  grid-column: span 2;
}

label {
  color: #33405a;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.wide {
  width: 100%;
}

.paid-pill {
  background: #fff2e9;
  border: 1px solid #f1c9ad;
  border-radius: 8px;
  color: #9c4c1c;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 10px;
  white-space: nowrap;
}

.search {
  min-width: min(340px, 100%);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

th {
  color: #35435c;
  font-size: 12px;
  text-transform: uppercase;
}

.tag {
  background: #eef2f7;
  border-radius: 8px;
  color: #33405a;
  display: inline-block;
  font-size: 12px;
  padding: 5px 8px;
}

.tag.business {
  background: #fff2e9;
  color: #9c4c1c;
}

.toast {
  background: #13223a;
  border-radius: 8px;
  bottom: 18px;
  color: #fff;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 20px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .event-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .event-header .link-button {
    width: 100%;
  }

  .event-hero {
    grid-template-columns: 1fr;
  }

  .event-hero > div {
    padding: 24px;
  }

  .event-hero img {
    max-height: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  nav,
  .segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics,
  .content-grid,
  .booking-panel {
    grid-template-columns: 1fr 1fr;
  }

  .booking-panel {
    grid-template-columns: 1fr;
  }

  .booking-visual {
    min-height: 220px;
  }
}

@media (max-width: 680px) {
  body {
    min-width: 320px;
  }

  .public-event {
    background: #fff;
  }

  .event-page {
    gap: 14px;
    padding: 0;
  }

  .event-hero {
    gap: 0;
  }

  .event-hero > div,
  .event-rsvp-card,
  .event-hero img {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    box-shadow: none;
  }

  .event-hero > div,
  .event-rsvp-card {
    padding: 20px 16px;
  }

  .event-hero h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .event-copy {
    font-size: 16px;
    line-height: 1.5;
  }

  .event-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  .event-facts span {
    border-radius: 8px;
    line-height: 1.25;
  }

  .calendar-actions,
  .result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-actions .ghost,
  .calendar-actions .link-button,
  .event-rsvp-card button,
  .landing-top .ghost,
  .search-box .primary {
    width: 100%;
  }

  .event-hero img {
    background: #f7f9fc;
    padding: 12px;
  }

  .event-rsvp-card .form {
    gap: 12px;
  }

  .inline-field {
    align-items: flex-start;
    line-height: 1.4;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .view,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .metrics,
  .content-grid,
  .two-col,
  .field-grid,
  .custom-field-row,
  .builder-row {
    grid-template-columns: 1fr;
  }

  .builder-buttons,
  .builder-actions {
    justify-content: stretch;
  }

  .builder-buttons .ghost,
  .builder-actions .ghost {
    flex: 1;
  }

  .span-2 {
    grid-column: auto;
  }

  .calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .brand.compact {
    min-width: 0;
  }

  .brand.compact > div:last-child {
    min-width: 0;
  }

  .brand.compact strong,
  .brand.compact span {
    overflow-wrap: anywhere;
  }

  .calendar-actions,
  .result-actions,
  .search-box {
    grid-template-columns: 1fr;
  }

  .search-box {
    border-radius: 8px;
    padding: 10px;
  }

  .search-box input {
    padding-left: 8px;
  }
}
