:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #fbfcff;
  --border: #dfe5ef;
  --text: #1d2636;
  --muted: #6b778c;
  --heading: #111827;
  --accent: #ff6b3d;
  --accent-deep: #ec5930;
  --accent-soft: #fff1eb;
  --navy: #22344d;
  --shadow: 0 14px 30px rgba(17, 24, 39, 0.06);
  --widget-shadow: 0 24px 48px rgba(17, 24, 39, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --card-night: linear-gradient(135deg, #ff7e57 0%, #ffb56c 100%);
  --card-sunset: linear-gradient(135deg, #ff8f6a 0%, #ff6464 100%);
  --card-cool: linear-gradient(135deg, #243956 0%, #3e5f86 100%);
  --card-warm: linear-gradient(135deg, #f06b43 0%, #f8bb67 100%);
  --card-bright: linear-gradient(135deg, #ff926a 0%, #ffd266 100%);
  --card-sky: linear-gradient(135deg, #344c6b 0%, #55769a 100%);
  --card-sport: linear-gradient(135deg, #ff7448 0%, #ff9e63 100%);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

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

button,
input,
select,
textarea {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.eyebrow,
.status-label,
.field span,
.toggle,
.feed-table th,
.feed-table td span,
.chip,
.provider-pill,
.date-pill,
.category-pill,
.page-link {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
}

.admin-page {
  min-height: 100vh;
}

.topbar {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup h1,
.hero-card h2,
.panel-head h3,
.provider-head h4,
.widget-header h1,
.event-body h3 {
  margin: 0;
  color: var(--heading);
}

.brand-lockup h1 {
  font-size: 1.9rem;
}

.page-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.page-link {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-weight: 700;
}

.page-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.admin-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 28px 32px;
  display: grid;
  gap: 20px;
}

.hero-card,
.panel,
.status-card,
.widget-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-card,
.panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-card h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.hero-copy,
.provider-head p,
.widget-subtitle,
.event-body p {
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-link,
.primary-button,
.ghost-button,
.widget-refresh {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.primary-link,
.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.ghost-button,
.widget-refresh {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--border);
}

.primary-link:hover,
.primary-button:hover,
.ghost-button:hover,
.widget-refresh:hover,
.page-link:hover {
  transform: translateY(-1px);
}

.full-width {
  width: 100%;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.status-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.status-label {
  color: var(--muted);
}

.status-card strong,
.demo-callout-copy strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
}

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

.control-form,
.provider-stack {
  display: grid;
  gap: 16px;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

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

.field input,
.field select,
.embed-box {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border-radius: var(--radius-md);
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

.field input:focus-visible,
.field select:focus-visible,
.embed-box:focus-visible {
  outline: 2px solid rgba(255, 107, 61, 0.16);
  border-color: rgba(255, 107, 61, 0.36);
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.checkbox-field input,
.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.offer-selector {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.offer-option {
  display: grid;
  grid-template-columns: auto 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.offer-option.is-featured {
  border-color: rgba(255, 107, 61, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 61, 0.12);
}

.offer-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.offer-option-image {
  width: 88px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.offer-option-copy {
  display: grid;
  gap: 5px;
}

.offer-option-copy strong {
  color: var(--heading);
}

.offer-option-copy span {
  color: var(--muted);
}

.split-panels {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.provider-card,
.demo-callout {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  padding: 18px;
}

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

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.demo-callout {
  display: grid;
  gap: 14px;
}

.demo-callout-copy {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.demo-callout-copy:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.feed-table-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.feed-table th,
.feed-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.feed-table th {
  color: var(--muted);
  background: #fbfcff;
}

.feed-table td strong {
  display: block;
  margin-bottom: 6px;
}

.feed-table td span {
  color: var(--muted);
}

.action-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 18px 0;
}

.contract-box {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  color: var(--navy);
  overflow: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.76rem;
  line-height: 1.5;
}

.embed-box {
  min-height: 180px;
  padding: 14px;
  resize: vertical;
}

.activity-log {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.widget-page {
  min-height: 100vh;
  padding: 32px 20px;
  background: linear-gradient(180deg, #f8f9fb 0%, #eef2f7 100%);
}

.widget-demo-page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  gap: 20px;
}

.widget-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.widget-demo-header h1,
.offer-header h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.widget-showcase {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.widget-demo-card {
  display: grid;
  gap: 14px;
}

.widget-shell {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--widget-shadow);
}

.widget-banner {
  height: 8px;
  background: var(--accent);
}

.widget-shell[data-theme="slate"] .widget-banner {
  background: var(--navy);
}

.widget-shell[data-theme="sand"] .widget-banner {
  background: #d59b4f;
}

.widget-header,
.widget-toolbar,
.widget-feedback,
.widget-events {
  padding-left: 20px;
  padding-right: 20px;
}

.widget-header {
  padding-top: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.widget-header h1 {
  font-size: 1.8rem;
}

.widget-subtitle {
  font-size: 0.92rem;
}

.widget-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip,
.provider-pill,
.date-pill,
.category-pill {
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.chip {
  background: #f7f9fc;
  border: 1px solid var(--border);
  color: var(--muted);
}

.widget-feedback {
  margin-top: 16px;
  color: var(--muted);
}

.widget-events {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 20px;
}

.widget-shell[data-layout="grid"] .widget-events {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
}

.widget-shell[data-layout="compact"] .event-card {
  grid-template-columns: minmax(128px, 148px) minmax(0, 1fr);
  align-items: stretch;
}

.event-image-link {
  display: block;
  overflow: hidden;
}

.event-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eef2f7;
}

.event-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

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

.provider-pill {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.date-pill {
  background: #eef3f8;
  color: var(--navy);
}

.category-pill {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

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

.event-foot strong {
  color: var(--heading);
}

.event-foot a {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
}

.event-link-label {
  color: var(--accent-deep);
  font-weight: 700;
}

.widget-shell[data-layout="compact"] .event-image-link {
  height: 100%;
}

.widget-shell[data-layout="compact"] .event-image {
  height: 100%;
  aspect-ratio: auto;
}

.checkout-page {
  min-height: 100vh;
  padding: 32px 20px;
  background: linear-gradient(180deg, #f8f9fb 0%, #eef2f7 100%);
}

.checkout-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.checkout-header {
  display: grid;
  gap: 14px;
}

.checkout-header h1,
.checkout-summary-copy h2 {
  margin: 0;
  color: var(--heading);
}

.checkout-copy {
  margin: 10px 0 0;
  color: var(--muted);
}

.checkout-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.checkout-panel {
  height: 100%;
}

.checkout-summary {
  display: grid;
  gap: 18px;
}

.checkout-art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef2f7;
}

.checkout-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.checkout-summary-copy {
  display: grid;
  gap: 10px;
}

.checkout-summary-copy p {
  margin: 0;
  color: var(--muted);
}

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

.checkout-stats strong,
.checkout-total strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  color: var(--heading);
}

.checkout-total {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  padding: 16px;
}

.checkout-result {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid #c9ead9;
  background: #effaf4;
  padding: 18px;
}

.checkout-result p,
.checkout-result h3 {
  margin: 0;
}

.checkout-result h3 {
  margin-top: 6px;
}

.checkout-result-copy {
  margin-top: 8px;
  color: #3e5d4e;
}

.offer-page {
  min-height: 100vh;
  padding: 32px 20px;
  background: linear-gradient(180deg, #f8f9fb 0%, #eef2f7 100%);
}

.offer-shell {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.offer-header {
  display: grid;
  gap: 14px;
}

.offer-copy,
.offer-description {
  margin: 0;
  color: var(--muted);
}

.offer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.offer-hero-panel {
  display: grid;
  gap: 20px;
}

.offer-art {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #eef2f7;
}

.offer-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.offer-detail-stack {
  display: grid;
  gap: 16px;
}

.offer-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-location-block h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.9rem;
}

.offer-location-block p {
  margin: 8px 0 0;
  color: var(--muted);
}

.offer-summary-card {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  padding: 18px;
}

.offer-summary-card strong,
.offer-highlight strong {
  display: block;
  margin-top: 8px;
  color: var(--heading);
}

.offer-sidebar,
.offer-highlights {
  display: grid;
  gap: 20px;
}

.offer-highlight {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  padding: 16px;
}

@media (max-width: 1080px) {
  .topbar,
  .admin-shell,
  .widget-page,
  .checkout-page,
  .offer-page,
  .widget-demo-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-card,
  .topbar,
  .widget-demo-header,
  .provider-head,
  .panel-head,
  .hero-actions,
  .widget-header,
  .event-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .status-strip,
  .split-panels {
    grid-template-columns: 1fr;
  }

  .widget-showcase,
  .offer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .topbar,
  .admin-shell,
  .widget-page,
  .checkout-page,
  .offer-page,
  .widget-demo-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-card,
  .panel,
  .widget-shell {
    border-radius: 18px;
    padding: 18px;
  }

  .page-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .page-link {
    flex: 1;
    justify-content: center;
  }

  .widget-header,
  .widget-toolbar,
  .widget-feedback,
  .widget-events {
    padding-left: 0;
    padding-right: 0;
  }

  .widget-banner {
    margin: -18px -18px 18px;
  }

  .widget-shell[data-layout="grid"] .widget-events,
  .event-card {
    grid-template-columns: 1fr;
  }

  .offer-option,
  .offer-summary-card {
    grid-template-columns: 1fr;
  }

  .event-image {
    aspect-ratio: 16 / 10;
  }

  .checkout-stats {
    grid-template-columns: 1fr;
  }
}
