:root {
  color-scheme: light;
  --purple: #9e1bb0;
  --purple-deep: #5b0b6b;
  --purple-soft: #f6e8fa;
  --ink: #17131a;
  --muted: #6f6472;
  --paper: #fffafd;
  --panel: #ffffff;
  --line: #eadfed;
  --silver: #a5a5a5;
  --success: #167348;
  --danger: #b22635;
  --warning: #fff5dd;
  --shadow: 0 24px 70px rgba(73, 21, 84, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(158, 27, 176, 0.12), transparent 26rem),
    linear-gradient(20deg, rgba(165, 165, 165, 0.14), transparent 34rem),
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(158, 27, 176, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158, 27, 176, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(158, 27, 176, 0.12);
  background: rgba(255, 250, 253, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(91, 11, 107, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-weight: 900;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

nav a,
.button,
.side-nav button {
  min-height: 2.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

nav a {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 16px 34px rgba(158, 27, 176, 0.24);
}

.button.dark {
  background: var(--ink);
  color: #fff;
}

.button.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--purple-deep);
}

.button.large {
  width: 100%;
  min-height: 3.2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.72fr);
  gap: clamp(1.2rem, 4vw, 3.5rem);
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 5rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.hero-copy h1,
.split-section h2,
.registration-panel h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.split-section p,
.muted,
.empty-copy {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 42rem;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--purple);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 44rem;
  margin-top: 1.5rem;
}

.hero-stats span,
.metric-card,
.panel,
.booking-card,
.process-strip article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero-stats span {
  padding: 1rem;
  color: var(--muted);
  font-weight: 800;
}

.hero-stats strong {
  display: block;
  color: var(--purple-deep);
  font-size: 1.5rem;
  line-height: 1.1;
}

.booking-card,
.panel {
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

.card-title h2,
.panel h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.05;
}

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

.form-grid.detailed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--purple-deep);
  font-size: 0.86rem;
  font-weight: 900;
}

label.wide {
  grid-column: 1 / -1;
}

.consent-row {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--purple-soft);
  line-height: 1.5;
}

.consent-row input {
  flex: 0 0 auto;
  width: 1.2rem;
  min-height: 1.2rem;
  margin-top: 0.1rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 0.85rem;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(158, 27, 176, 0.12);
}

.result-box {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  line-height: 1.5;
}

.result-box strong,
.result-box span {
  display: block;
}

.result-box.success,
.result-box.error {
  display: block;
}

.result-box.success {
  border: 1px solid rgba(22, 115, 72, 0.24);
  background: #eaf8f1;
  color: var(--success);
}

.result-box.error,
.record.warning {
  border: 1px solid rgba(178, 38, 53, 0.22);
  background: #fff0f2;
  color: var(--danger);
}

.process-strip,
.split-section,
.form-page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 2.5rem;
}

.process-strip article {
  padding: 1.2rem;
  box-shadow: none;
}

.process-strip span {
  color: var(--silver);
  font-weight: 900;
}

.process-strip strong {
  display: block;
  margin: 0.4rem 0;
  font-size: 1.1rem;
}

.process-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(18rem, 0.7fr);
  gap: 1.2rem;
  align-items: center;
  padding: 2rem 0 4rem;
}

.split-section h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.reference-image,
.form-reference {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal {
  width: min(980px, calc(100% - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(23, 19, 26, 0.6);
  backdrop-filter: blur(5px);
}

.modal-shell {
  position: relative;
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  margin: 0;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.small-modal {
  width: min(560px, 100%);
}

.icon-button {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--purple-deep);
  font-weight: 900;
  cursor: pointer;
}

.customer-banner {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--purple-soft);
}

.customer-banner strong {
  color: var(--purple-deep);
  font-size: 1.15rem;
}

.toast-zone {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: grid;
  gap: 0.5rem;
}

.toast {
  width: min(24rem, calc(100vw - 2rem));
  padding: 0.95rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.admin-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  min-height: 100vh;
  padding: 1rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 250, 253, 0.94);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.side-nav button {
  width: 100%;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.side-nav button.active {
  background: var(--purple);
  color: #fff;
}

.sidebar-actions {
  align-self: end;
  display: grid;
  gap: 0.6rem;
}

.sidebar-actions a {
  color: var(--purple-deep);
  font-weight: 900;
}

.admin-main {
  padding: clamp(1rem, 3vw, 2rem);
}

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

.admin-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0;
}

.admin-topbar input {
  max-width: 22rem;
}

.admin-toolbar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.admin-toolbar input {
  min-width: min(22rem, 42vw);
}

.metric-grid,
.admin-grid {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.metric-card {
  padding: 1rem;
  box-shadow: none;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 0.3rem 0;
  color: var(--purple-deep);
  font-size: 2rem;
}

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

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.panel-head span {
  color: var(--muted);
  font-weight: 900;
}

.record-list {
  display: grid;
  gap: 0.65rem;
}

.record-list.compact {
  max-height: 42rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.record {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.record span {
  min-width: 0;
}

.record strong,
.record small {
  display: block;
}

.record small {
  margin-top: 0.2rem;
  color: var(--muted);
  line-height: 1.45;
}

.record b {
  color: var(--purple-deep);
  white-space: nowrap;
}

.record-actions {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.record-actions .button {
  width: 100%;
  min-width: 11rem;
}

.status-select {
  min-width: 11rem;
  min-height: 2.65rem;
  color: var(--purple-deep);
  font-weight: 900;
}

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

.detail-card {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-card:last-child {
  grid-column: 1 / -1;
}

.detail-card h3 {
  margin: 0;
  color: var(--purple-deep);
}

.detail-card div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.36fr) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.detail-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.list-editor {
  min-height: 34rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.image-panel {
  overflow: hidden;
  padding: 0;
}

.image-panel img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
}

.image-panel div {
  padding: 1.2rem;
}

.form-page {
  padding: clamp(1rem, 4vw, 2rem) 0 4rem;
}

.registration-panel h1 {
  max-width: 100%;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 900px) {
  .hero,
  .split-section,
  .admin-shell,
  .admin-grid.two {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
  }

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

  .metric-grid,
  .process-strip,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-topbar input {
    max-width: none;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar input {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: stretch;
  }

  nav a {
    flex: 1;
    text-align: center;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: clamp(2.6rem, 16vw, 4.2rem);
  }

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

  .record,
  .booking-record {
    align-items: stretch;
    flex-direction: column;
  }

  .record-actions {
    justify-items: stretch;
  }

  .detail-grid,
  .detail-card div {
    grid-template-columns: 1fr;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }
}
