:root {
  --ink: #18201d;
  --muted: #62706b;
  --line: #d9e1dd;
  --paper: #f5f7f2;
  --panel: #ffffff;
  --brand: #1f7a55;
  --brand-dark: #14543b;
  --accent: #bd4e3b;
  --action: #ed2e28;
  --action-dark: #c82320;
  --gold: #c78a17;
  --blue: #315f91;
  --shadow: 0 18px 50px rgba(30, 47, 43, 0.12);
}

* {
  box-sizing: border-box;
}

.auth-pending,
body:not(.auth-ready) .protected-space {
  visibility: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  grid-template-columns: 290px 1fr;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  min-height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #eef5f0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  overflow-y: auto;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 33, 31, 0.48);
  z-index: 18;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--brand);
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 76px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
}

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

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

.connection-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: -12px 0 18px;
  padding: 7px 10px;
  text-align: center;
}

.connection-status[hidden] {
  display: none;
}

.connection-status.online {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand);
}

.auth-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7f2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.auth-status.success {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand);
}

.auth-status.error {
  border-color: rgba(217, 79, 48, 0.35);
  background: rgba(217, 79, 48, 0.08);
  color: #a33a28;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.side-nav-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 0 12px;
}

.side-nav-link {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.subscription-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(237, 46, 40, 0.25);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.subscription-summary strong,
.subscription-summary span { display: block; }
.subscription-summary span { color: var(--muted); margin-top: 4px; }
.subscription-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subscription-actions select { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 10px; }

.plans-main { max-width: 1240px; }
.plans-hero { max-width: 760px; margin: 40px auto 32px; text-align: center; }
.plans-hero h1 { margin: 8px 0 12px; font-size: clamp(32px, 5vw, 54px); }
.plans-hero > p:last-child { color: var(--muted); font-size: 18px; line-height: 1.5; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.pricing-card { position: relative; display: flex; flex-direction: column; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.pricing-card.featured-plan { border: 2px solid var(--action); transform: translateY(-8px); }
.popular-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; color: #fff; background: var(--action); font-size: 12px; font-weight: 900; white-space: nowrap; }
.plan-name { color: var(--action); font-weight: 900; text-transform: uppercase; }
.pricing-card h2 { margin: 8px 0; font-size: 34px; }
.pricing-card h2 small { display: block; color: var(--muted); font-size: 13px; }
.pricing-card > p:not(.plan-name) { color: var(--muted); line-height: 1.45; }
.pricing-card ul { flex: 1; padding-left: 20px; line-height: 1.5; }
.pricing-card li { margin: 9px 0; }
.plan-action { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.plans-note { margin: 34px 0; padding: 24px; border-radius: 12px; background: #fff; text-align: center; }

.side-nav-button:hover,
.side-nav-button.active {
  border-color: var(--line);
  background: white;
}

.page-links {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.page-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  padding: 7px 2px;
}

.page-links span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-top: 8px;
  text-transform: uppercase;
}

.page-links a:hover {
  color: var(--brand);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
}

.page {
  padding: 28px;
  min-width: 0;
  grid-column: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 15;
  margin: -28px -28px 22px;
  padding: 24px 28px 18px;
  background: rgba(248, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar > div {
  min-width: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  place-items: center;
  gap: 4px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

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

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: var(--action);
  color: white;
}

.primary-button:hover {
  background: var(--action-dark);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ghost-button {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.menu-actions {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 0;
}

.ad-banner {
  width: 100%;
  aspect-ratio: 1562 / 572;
  min-height: 180px;
  max-height: 360px;
  margin-bottom: 22px;
  border: 1px solid #cfdad4;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.9), rgba(22, 36, 33, 0.76)),
    url("https://images.unsplash.com/photo-1501281668745-f7f57925c3b4?auto=format&fit=crop&w=1562&q=80");
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  align-items: center;
  padding: clamp(18px, 4vw, 46px);
}

.ad-banner div {
  max-width: 580px;
}

.ad-banner span {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-banner strong {
  display: block;
  font-size: clamp(26px, 5vw, 54px);
  line-height: 1;
}

.ad-banner p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.stats article {
  min-width: 128px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.stats strong {
  display: inline;
  font-size: 16px;
  margin-right: 5px;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.manager-space {
  margin-bottom: 28px;
  scroll-margin-top: 120px;
}

.client-space {
  margin: 28px 0;
  scroll-margin-top: 120px;
}

#homeSection,
#clientSpace,
#eventsSection,
#reservationsSection,
#adminSection {
  scroll-margin-top: 120px;
}

.admin-space {
  margin-bottom: 28px;
  scroll-margin-top: 120px;
}

.manager-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.manager-dashboard article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.manager-dashboard strong,
.manager-dashboard span {
  display: block;
}

.manager-dashboard strong {
  font-size: 24px;
}

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

.manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.client-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.client-profile-card,
.client-history-card {
  min-height: 100%;
}

.client-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.client-history {
  display: grid;
  gap: 10px;
}

.client-history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.client-history-item strong,
.client-history-item span {
  display: block;
}

.client-history-item span {
  color: var(--muted);
  font-size: 13px;
}

.client-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.check-field input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
}

.admin-validation-panel {
  margin-top: 14px;
}

.compact-head {
  margin-bottom: 12px;
}

.compact-head h3 {
  margin: 0;
}

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

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

.admin-venue-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-venue-card strong,
.admin-venue-card span {
  display: block;
}

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

.admin-venue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-venue-actions .primary-button,
.admin-venue-actions .ghost-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.manager-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.manager-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.check-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.check-list li + li {
  margin-top: 6px;
}

.visual-preview {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  margin-bottom: 16px;
}

.manager-list {
  min-height: 100%;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.manager-event {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manager-event strong,
.manager-event span {
  display: block;
}

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

.manager-event .ghost-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.manager-event-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-actions .primary-button,
.form-actions .ghost-button {
  flex: 1 1 180px;
}

.clear-button {
  width: 100%;
  margin-top: 8px;
}

.reservation-status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.reservation-card {
  align-items: stretch;
  flex-direction: column;
}

.reservation-main {
  min-width: 0;
}

.reservation-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.reservation-controls .ghost-button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.access-code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.06);
  color: var(--brand);
  font-size: 11px;
  margin-top: 8px;
  padding: 7px;
}

.scan-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 12px 0;
}

.status-payee {
  color: #1f7a55;
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
}

.status-en-attente {
  color: #8a5b18;
  border-color: rgba(216, 165, 52, 0.5);
  background: rgba(216, 165, 52, 0.14);
}

.status-annulee {
  color: #a33a28;
  border-color: rgba(217, 79, 48, 0.4);
  background: rgba(217, 79, 48, 0.1);
}

.status-participation-confirmee,
.status-inscription-confirmee,
.status-accepte {
  color: #1f7a55;
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
}

.status-invitation-en-attente {
  color: #8a5b18;
  border-color: rgba(216, 165, 52, 0.5);
  background: rgba(216, 165, 52, 0.14);
}

.status-refuse {
  color: #a33a28;
  border-color: rgba(217, 79, 48, 0.4);
  background: rgba(217, 79, 48, 0.1);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head span {
  color: var(--muted);
  font-size: 14px;
}

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

#eventsSection .section-head {
  position: sticky;
  top: var(--events-sticky-top, 158px);
  z-index: 6;
  background: rgba(248, 250, 247, 0.96);
  border-bottom: 1px solid rgba(217, 226, 222, 0.82);
  margin: -4px 0 16px;
  padding: 4px 0 12px;
  backdrop-filter: blur(10px);
}

.poster {
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(30, 47, 43, 0.08);
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.poster.active {
  outline: 3px solid rgba(15, 118, 110, 0.25);
}

.poster-art {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  padding: 14px;
  background: linear-gradient(155deg, #203d3a, #1f7a55 55%, #bd4e3b);
  background-position: center;
  background-size: cover;
}

.poster-art-image {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.poster:nth-child(3n) .poster-art {
  background: linear-gradient(155deg, #3b3f46, #8a5b18 55%, #c78a17);
}

.poster:nth-child(3n + 2) .poster-art {
  background: linear-gradient(155deg, #143232, #2b7b56 54%, #e7b84e);
}

.poster-kicker {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.06;
  font-weight: 900;
  word-break: break-word;
}

.poster-caption {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 7px;
  font-size: 11px;
  line-height: 1.18;
  font-weight: 800;
}

.poster-meta {
  padding: 12px;
}

.poster-meta strong,
.poster-meta span {
  display: block;
}

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

.detail-panel {
  align-self: start;
  position: sticky;
  top: var(--events-sticky-top, 158px);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - var(--events-sticky-space, 182px));
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
}

.event-detail-content {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 0;
}

.detail-panel-action {
  flex: 0 0 auto;
  padding: 14px 18px 18px;
  background: white;
  border-top: 1px solid rgba(217, 226, 222, 0.82);
}

.detail-panel .eyebrow {
  color: var(--accent);
}

.detail-panel h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.event-description {
  font-size: 20px;
  line-height: 1.28;
  margin-bottom: 16px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.offer {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-top: 14px;
}

.offer strong {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
}

.offer p {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 0;
}

.places-panel {
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.07);
  padding: 12px;
  margin-top: 12px;
}

.places-panel strong,
.places-panel span,
.places-panel em {
  display: block;
}

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

.places-panel em {
  color: #8a5b18;
  font-style: normal;
  font-weight: 800;
  margin-top: 8px;
}

.places-panel.is-full {
  border-color: rgba(217, 79, 48, 0.35);
  background: rgba(217, 79, 48, 0.08);
}

.menu-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
}

.menu-panel-head,
.menu-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.menu-panel-head {
  align-items: center;
  margin-bottom: 12px;
}

.menu-panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.menu-panel-head span,
.menu-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.menu-item {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.menu-item:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.menu-item strong {
  margin-bottom: 4px;
}

.menu-item-action {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 126px;
}

.menu-item-action b {
  color: var(--brand);
  font-size: 14px;
}

.menu-item-action .ghost-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.pay-button {
  width: 100%;
  min-height: 54px;
  margin-top: 0;
  font-size: 21px;
}

dialog {
  width: min(620px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
}

dialog::backdrop {
  background: rgba(23, 33, 31, 0.55);
}

.account-form {
  padding: 20px;
}

.account-form header,
.account-form footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.account-form header {
  align-items: center;
  margin-bottom: 18px;
}

.account-form h2 {
  margin: 0;
}

.account-form footer {
  justify-content: flex-end;
  margin-top: 18px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reservation-summary,
.reservation-total {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.reservation-summary strong,
.reservation-summary span,
.reservation-total span,
.reservation-total strong {
  display: block;
}

.reservation-summary span,
.reservation-total span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

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

.reservation-total span,
.reservation-total strong {
  margin: 0;
}

.reservation-total strong {
  color: var(--brand);
  font-size: 24px;
}

.ticket-code {
  border: 1px dashed rgba(15, 118, 110, 0.45);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.ticket-code span,
.ticket-code strong {
  display: block;
}

.ticket-code span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ticket-code strong {
  color: var(--brand);
  font-size: 34px;
  margin-top: 6px;
  letter-spacing: 0;
}

.qr-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
}

.qr-card span {
  color: var(--muted);
  font-size: 11px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.qr-matrix {
  width: 132px;
  height: 132px;
  display: grid;
  gap: 2px;
  border: 8px solid white;
  background: white;
  box-shadow: 0 0 0 1px var(--line);
}

.qr-cell {
  background: #eef5f0;
}

.qr-cell.active {
  background: var(--ink);
}

.confirmation-note {
  color: var(--muted);
  margin-bottom: 0;
}

.hidden {
  display: none !important;
}

body.static-site {
  display: block;
  min-height: 100vh;
  background: var(--paper);
}

.static-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.static-header-inner,
.static-main {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.static-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.static-header .brand {
  color: inherit;
  margin-bottom: 0;
  text-decoration: none;
}

.static-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.static-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  padding: 0 10px;
}

.static-nav a.primary-link {
  border-color: transparent;
  background: var(--action);
  color: white;
}

.static-main {
  padding: 26px 0 48px;
}

.static-hero,
.static-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(30, 47, 43, 0.06);
}

.static-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-bottom: 18px;
}

.static-hero h1 {
  margin-bottom: 12px;
  white-space: normal;
}

.static-hero p,
.static-panel p,
.static-panel li {
  color: var(--muted);
  line-height: 1.5;
}

.static-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.static-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  padding: 0 14px;
}

.static-actions .primary-button {
  color: white;
}

.static-actions .ghost-button {
  color: var(--ink);
  background: white;
}

.static-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.static-panel {
  padding: 18px;
}

.static-panel h2,
.static-panel h3 {
  margin-bottom: 10px;
}

.static-panel ul,
.static-panel ol {
  margin: 0;
  padding-left: 18px;
}

.static-visual {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: grid;
  align-content: space-between;
  color: white;
  background: linear-gradient(155deg, #203d3a, #1f7a55 55%, #bd4e3b);
  padding: 18px;
}

.static-visual strong {
  font-size: 28px;
  line-height: 1.05;
}

.static-visual span {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

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

.static-page-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  padding: 12px;
}

.static-page-list span {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured-plan { transform: none; }
  .subscription-summary { align-items: stretch; flex-direction: column; }
  .static-header-inner {
    display: grid;
    gap: 12px;
  }

  .static-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .static-nav a {
    flex: 0 0 auto;
  }

  .static-hero,
  .static-grid,
  .static-grid.two {
    grid-template-columns: 1fr;
  }

  .static-hero {
    padding: 18px;
  }

  .static-hero h1 {
    font-size: 28px;
  }

  body {
    display: block;
  }

  .page {
    grid-column: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    min-height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    z-index: 25;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: grid;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    margin: -28px -28px 18px;
    padding: 18px 28px;
    align-items: start;
  }

  h1 {
    font-size: 20px;
    white-space: normal;
  }

  .field {
    margin-bottom: 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .layout > div {
    min-width: 0;
  }

  .manager-space {
    scroll-margin-top: 94px;
  }

  #homeSection,
  #clientSpace,
  #eventsSection,
  #reservationsSection,
  #adminSection {
    scroll-margin-top: 94px;
  }

  .manager-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .client-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-panel {
    order: -1;
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    z-index: auto;
  }

  #eventsSection .section-head {
    position: static;
    margin: 0 0 14px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .event-detail-content {
    overflow: visible;
    padding: 16px 16px 0;
  }

  .detail-panel-action {
    padding: 12px 16px 16px;
  }

  .detail-panel .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .detail-panel h2 {
    font-size: 24px;
    margin-bottom: 7px;
  }

  .event-description {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .badge-row {
    gap: 6px;
    margin: 7px 0;
  }

  .badge {
    padding: 4px 7px;
    font-size: 10px;
  }

  .offer {
    padding: 10px;
    margin-top: 8px;
  }

  .offer strong {
    font-size: 17px;
    margin-bottom: 3px;
  }

  .offer p {
    display: block;
    font-size: 14px;
    line-height: 1.3;
  }

  .menu-panel {
    padding: 10px;
    margin-top: 10px;
  }

  .menu-panel-head h3 {
    font-size: 16px;
  }

  .menu-item {
    display: grid;
  }

  .menu-item-action {
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
    flex-basis: auto;
  }

  .pay-button {
    min-height: 46px;
    margin-top: 10px;
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  #eventsSection {
    gap: 14px;
  }

  .detail-panel {
    order: -1;
    position: sticky;
    top: var(--events-sticky-top, 101px);
    z-index: 14;
    height: var(--events-mobile-detail-size, 42dvh);
    max-height: var(--events-mobile-detail-size, 42dvh);
    overflow: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(30, 47, 43, 0.08);
  }

  .event-detail-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .detail-panel-action {
    flex: 0 0 auto;
    background: white;
  }

  .pay-button {
    margin-top: 0;
  }

  #eventsSection .section-head {
    position: sticky;
    top: var(--events-mobile-header-top, calc(var(--events-sticky-top, 101px) + 42dvh + 12px));
    z-index: 13;
    display: flex;
    align-items: center;
    min-height: 34px;
    margin: 0;
    padding: 6px 0;
    background: rgba(248, 250, 247, 0.98);
    border-top: 1px solid rgba(217, 226, 222, 0.85);
    border-bottom: 1px solid rgba(217, 226, 222, 0.85);
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 640px) {
  .page,
  .sidebar {
    padding: 16px;
  }

  .sidebar {
    width: min(86vw, 330px);
  }

  .topbar {
    margin: -16px -16px 18px;
    padding: 16px;
    gap: 10px;
  }

  h1 {
    font-size: 13px;
    line-height: 1.08;
    white-space: nowrap;
  }

  #eventsSection .section-head h2 {
    font-size: 13px;
    line-height: 1.1;
  }

  #eventsSection .section-head span {
    font-size: 12px;
  }

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

  .stats {
    display: none;
  }

  .ad-banner {
    min-height: 120px;
  }

  .manager-space {
    margin-bottom: 22px;
  }

  .manager-panel {
    padding: 14px;
  }

  .side-nav {
    margin-bottom: 18px;
  }

  .manager-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .manager-dashboard article {
    padding: 10px;
  }

  .manager-dashboard strong {
    font-size: 18px;
  }

  .manager-dashboard span {
    font-size: 12px;
  }

  .poster-grid {
    display: flex;
    gap: 14px;
    margin: 0 -16px;
    padding: 10px 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .poster {
    flex: 0 0 min(52vw, 180px);
    max-width: 180px;
    scroll-snap-align: start;
  }

  .poster-art {
    padding: 12px;
  }

  .poster-title {
    font-size: 17px;
  }

  .poster-caption {
    font-size: 10px;
  }

  .detail-panel {
    padding: 0;
  }

  .event-detail-content {
    padding: 12px 12px 0;
  }

  .detail-panel-action {
    padding: 10px 12px 12px;
  }

  .detail-panel h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .scan-tool {
    grid-template-columns: 1fr;
  }
}
