:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dce3ee;
  --primary: #0f8f72;
  --primary-dark: #08705a;
  --blue: #2563eb;
  --soft: #e7f8f1;
  --shadow: 0 18px 46px rgba(24, 36, 56, .11);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.demo-shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 54px;
}

.demo-hero,
.demo-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.demo-hero {
  padding: 18px;
  margin-bottom: 16px;
}

.demo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.demo-nav__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.demo-lang-switcher label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 900;
}

.demo-lang-switcher select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  padding: 0 34px 0 12px;
}

.demo-brand,
.demo-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
}

.demo-nav__cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--primary-dark);
}

.demo-hero__copy {
  max-width: 720px;
  padding: 34px 0 20px;
}

.demo-hero__copy p,
.panel-head p {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.demo-hero__copy h1,
.panel-head h2 {
  margin: 0;
  line-height: 1.08;
}

.demo-hero__copy h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.demo-hero__copy span {
  display: block;
  max-width: 640px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.demo-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.floating-template-cta {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: min(320px, calc(100vw - 36px));
  border: 1px solid rgba(7, 112, 90, .22);
  border-radius: 999px;
  background: #0f8f72;
  box-shadow: 0 16px 38px rgba(15, 143, 114, .28);
  color: #fff;
  padding: 13px 18px;
  text-decoration: none;
  font-weight: 900;
}

.floating-template-cta:focus-visible {
  outline: 3px solid rgba(37, 211, 102, .45);
  outline-offset: 3px;
}

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

.demo-search label {
  color: var(--text);
  font-size: .9rem;
  font-weight: 900;
}

.demo-search__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.demo-search__box input {
  min-width: 0;
  border: 0;
  padding: 13px 15px;
  color: var(--text);
  font: inherit;
  outline: 0;
}

.demo-search__box button {
  border: 0;
  border-left: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
}

.demo-search__results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-search__result {
  border: 1px solid rgba(15, 143, 114, .28);
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 8px 12px;
  font-size: .84rem;
  font-weight: 900;
  cursor: pointer;
}

.demo-search__empty {
  color: var(--muted);
  font-size: .88rem;
}

.business-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.business-picker button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.business-picker button.active {
  border-color: rgba(15, 143, 114, .44);
  background: var(--soft);
  color: var(--primary-dark);
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 16px;
  margin-bottom: 16px;
}

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

.demo-panel {
  min-width: 0;
  padding: 18px;
}

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

.panel-head button {
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #07361e;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

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

.product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.product-card__body {
  padding: 12px;
}

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

.product-card strong {
  line-height: 1.25;
}

.product-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: .86rem;
}

.product-card button {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(15, 143, 114, .35);
  border-radius: 10px;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 9px;
  font-weight: 900;
  cursor: pointer;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-row,
.customer-row,
.analytics-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  padding: 12px;
}

.cart-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.cart-row span,
.customer-row span,
.analytics-row span {
  color: var(--muted);
  font-size: .84rem;
}

.whatsapp-preview {
  margin-top: 14px;
  border-radius: 14px;
  background: #e8f8ee;
  padding: 14px;
}

.whatsapp-preview pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  font: inherit;
  color: #173b2b;
  line-height: 1.45;
}

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

.kpi-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 14px;
}

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

.kpi-card span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}

.kpi-card strong {
  margin-top: 12px;
  font-size: 1.45rem;
}

.analytics-list,
.customers-list {
  display: grid;
  gap: 10px;
}

.analytics-bar {
  height: 8px;
  border-radius: 999px;
  background: #e9eef6;
  overflow: hidden;
}

.analytics-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.customer-row strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.customer-row em {
  color: #b45309;
  font-style: normal;
  font-size: .82rem;
}

@media (max-width: 960px) {
  .demo-grid,
  .ops-grid,
  .business-picker {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .demo-nav {
    align-items: flex-start;
  }

  .demo-nav__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .demo-lang-switcher label {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .demo-shell {
    width: calc(100vw - 18px);
    padding-top: 9px;
    padding-bottom: 118px;
  }

  .demo-hero,
  .demo-panel {
    border-radius: 14px;
    padding: 14px;
  }

  .product-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .panel-head button,
  .demo-nav__cta {
    width: 100%;
    justify-content: center;
  }

  .floating-template-cta {
    right: max(9px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(9px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    min-height: 54px;
    border-radius: 14px;
    font-size: 1rem;
  }
}

/* ── Text containment polish ─────────────────────────────────────────────── */
body,
body * {
  min-width: 0;
}

body :where(h1, h2, h3, h4, h5, h6, p, label, small, strong, span, li, button, a, input, textarea, select, code, pre) {
  overflow-wrap: anywhere;
  word-break: normal;
}

.demo-shell,
.demo-hero,
.demo-panel,
.demo-nav,
.panel-head,
.product-card,
.cart-row,
.customer-row,
.analytics-row,
.kpi-card,
.whatsapp-preview {
  min-width: 0;
  max-width: 100%;
}

.demo-brand,
.demo-nav__cta,
.floating-template-cta,
.demo-search__result,
.business-picker button,
.panel-head button,
.product-card button,
.product-card strong,
.product-card span,
.cart-row,
.customer-row strong,
.customer-row em,
.analytics-row,
.kpi-card span,
.kpi-card strong,
.whatsapp-preview pre {
  white-space: normal;
  overflow-wrap: anywhere;
}

.demo-nav__cta,
.floating-template-cta,
.demo-search__result,
.business-picker button,
.panel-head button,
.product-card button {
  text-align: center;
  line-height: 1.2;
}

.panel-head {
  flex-wrap: wrap;
}

.panel-head > div {
  min-width: 0;
}

.cart-row,
.customer-row strong {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 620px) {
  .demo-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cart-row,
  .customer-row strong {
    grid-template-columns: 1fr;
  }
}
