@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/ibm-plex-sans-arabic-400.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/ibm-plex-sans-arabic-500.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/ibm-plex-sans-arabic-600.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/ibm-plex-sans-arabic-700.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/poppins-400.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/poppins-500.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/poppins-600.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/poppins-700.ttf") format("truetype");
}

:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-muted: #eaf7f4;
  --ink: #10252e;
  --muted: #627178;
  --line: #dce7e4;
  --green: #149986;
  --green-soft: #eaf7f4;
  --blue: #0b2635;
  --blue-soft: #e8f0f3;
  --gold: #b7822e;
  --gold-soft: #fff4dc;
  --red: #a33d36;
  --red-soft: #fae9e7;
  --shadow: 0 16px 38px rgba(7, 25, 35, 0.08);
  font-family: "Poppins", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  background: #071923;
  color: #f6fbf8;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.brand small {
  margin-top: 4px;
  color: #b8cacb;
  line-height: 1.55;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  border: 0;
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  color: #dfe7e2;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: right;
}

.nav-item span:first-child {
  width: 22px;
  text-align: center;
  color: #4ae0ce;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.tenant-switcher {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  display: grid;
  gap: 8px;
}

.tenant-switcher label {
  color: #b8cacb;
  font-size: 13px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(20, 153, 134, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tenant-switcher select {
  border-color: rgba(255, 255, 255, 0.16);
  background: #0b2635;
  color: #ffffff;
}

.workspace {
  padding: 26px;
  min-width: 0;
}

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

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

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

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

.topbar-actions,
.draft-actions,
.panel-header,
.conversation-top,
.table-actions,
.plan-top,
.panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.secondary-button,
.icon-button,
.segment {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, #149986, #0b7668);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 153, 134, 0.22);
}

.secondary-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.icon-button {
  width: 40px;
  padding: 0;
  background: #071923;
  color: #ffffff;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.ops-control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: #071923;
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ops-control-panel .eyebrow {
  color: #f7c861;
}

.ops-control-panel .meta-line {
  color: #c7d5d3;
}

.ai-switch-card {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

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

.ai-switch-card span {
  margin-top: 4px;
  color: #c7d5d3;
  line-height: 1.5;
}

.toggle-button {
  width: 68px;
  min-width: 68px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.toggle-button span {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle-button.on {
  background: var(--green);
}

.toggle-button.on span {
  transform: translateX(-30px);
}

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

.launch-board {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.launch-score {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.score-ring {
  --score: 0deg;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--green) var(--score), #e4ece9 0);
}

.score-ring strong,
.score-ring span {
  grid-area: 1 / 1;
  text-align: center;
}

.score-ring strong {
  margin-top: -12px;
  font-size: 30px;
}

.score-ring span {
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.launch-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.launch-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.launch-item b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold);
}

.launch-item.done b {
  background: var(--green-soft);
  color: var(--green);
}

.launch-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.metric,
.panel,
.plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  display: grid;
  gap: 10px;
}

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

.metric strong {
  font-size: 28px;
}

.metric small {
  color: var(--green);
  font-weight: 700;
}

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

.two-column,
.analytics-grid,
.publish-layout,
.data-layout,
.pipeline-layout,
.meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-muted);
  color: var(--muted);
}

.status-pill.live {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.premium {
  background: var(--gold-soft);
  color: var(--gold);
}

.lead-list,
.insight-list,
.funnel-list,
.district-bars,
.ops-alerts,
.conversation-list,
.checklist,
.channels,
.data-map,
.policy-list,
.schema-grid,
.event-stream,
.pipeline-steps,
.tool-list,
.job-list,
.guardrail-list,
.endpoint-list,
.tenant-fields {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.lead-row,
.insight-row,
.funnel-row,
.district-row,
.ops-alert,
.conversation-row,
.check-row,
.channel-row,
.data-row,
.policy-list div,
.schema-card,
.event-row,
.pipeline-step,
.tool-row,
.job-row,
.guardrail-row,
.endpoint-row,
.tenant-field-row,
.property-row,
.flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed #bfd0cc;
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state strong {
  color: var(--ink);
}

.funnel-row,
.district-row {
  display: grid;
  gap: 10px;
}

.funnel-row div,
.district-row div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.funnel-row span,
.district-row span {
  color: var(--muted);
  font-weight: 800;
}

.funnel-row i,
.district-row i {
  height: 9px;
  border-radius: 999px;
  background: #e6eeee;
  overflow: hidden;
}

.funnel-row b,
.district-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.ops-alert {
  display: grid;
  gap: 6px;
  line-height: 1.6;
}

.ops-alert.ok {
  background: var(--green-soft);
  border-color: #b7dfcc;
}

.ops-alert.warning {
  background: var(--gold-soft);
  border-color: #ecd292;
}

.ops-alert span {
  color: var(--muted);
}

.permission-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #ecd292;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 800;
}

.lead-row,
.conversation-row,
.property-row,
.data-row {
  display: grid;
  gap: 8px;
}

.row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.flow-step {
  display: grid;
  gap: 10px;
}

.flow-step strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.inbox-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.conversation-row {
  text-align: right;
  border-color: var(--line);
  background: #fbfcfa;
}

.inbox-mode {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.conversation-status-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.conversation-row.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.conversation-panel {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto;
  gap: 14px;
}

.chat-window {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  min-height: 340px;
  max-height: 520px;
}

.message {
  max-width: 72%;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.7;
}

.message.in {
  justify-self: start;
  background: #ffffff;
  border: 1px solid var(--line);
}

.message.out {
  justify-self: end;
  background: var(--green);
  color: #ffffff;
}

.ai-draft {
  display: grid;
  gap: 10px;
}

.ai-draft label,
.publish-picker label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.segmented-control {
  display: inline-flex;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.segment {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
}

.segment.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(20, 25, 22, 0.08);
}

.property-table {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.property-help {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cbece6;
  border-radius: 8px;
  background: var(--green-soft);
}

.property-help strong {
  color: var(--green);
  white-space: nowrap;
}

.property-help span {
  color: var(--muted);
  line-height: 1.6;
}

.property-row {
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(110px, 1fr)) minmax(120px, auto);
  align-items: center;
}

.property-row.header {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.property-row:not(.header) {
  display: grid;
}

.property-row.active {
  border-color: var(--green);
  background: #f0fbf8;
}

.property-detail-panel {
  display: grid;
  gap: 18px;
}

.whatsapp-control-board,
.property-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.whatsapp-role-row {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.whatsapp-role-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.whatsapp-rule-list,
.approved-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.whatsapp-rule-row,
.approved-row {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.whatsapp-rule-row span {
  color: var(--muted);
  line-height: 1.65;
}

.approved-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.property-analytics,
.ai-visibility-card,
.property-platforms {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfc;
}

.property-analytics {
  display: grid;
  gap: 14px;
}

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

.property-stat {
  min-height: 118px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.property-stat span,
.property-stat small {
  color: var(--muted);
  line-height: 1.55;
}

.property-stat strong {
  font-size: 28px;
}

.ai-visibility-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ai-visibility-card .meta-line {
  margin-top: 8px;
  max-width: 520px;
}

.property-platforms {
  display: grid;
  gap: 16px;
}

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

.platform-card {
  display: grid;
  gap: 14px;
  min-height: 196px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.platform-card.locked-feature {
  background: #fffdf8;
}

.platform-card.upcoming {
  background: #f6f8f8;
}

.platform-top,
.platform-stats,
.platform-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.platform-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.locked-caption {
  color: var(--gold);
  font-weight: 800;
}

.publish-picker {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.check-row,
.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-row.done {
  background: var(--green-soft);
  border-color: #b7dfcc;
}

.check-row.missing {
  background: var(--red-soft);
  border-color: #efc5c0;
}

.copy-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
  line-height: 1.9;
  min-height: 170px;
  white-space: pre-wrap;
}

.data-row {
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
}

.data-row strong,
.data-row span,
.data-row small,
.schema-card strong,
.schema-card span,
.tool-row code,
.tool-row span,
.endpoint-row code {
  overflow-wrap: anywhere;
}

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

.schema-card,
.guardrail-row,
.tenant-field-row {
  display: grid;
  gap: 8px;
}

.schema-card strong,
.tool-row code,
.endpoint-row code {
  color: var(--blue);
  direction: ltr;
  text-align: left;
}

.schema-card span,
.guardrail-row span,
.tenant-field-row span,
.tool-row span {
  color: var(--muted);
  line-height: 1.65;
}

.event-row,
.job-row,
.endpoint-row,
.pipeline-step,
.tool-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.event-row {
  grid-template-columns: minmax(180px, .8fr) minmax(0, 1fr) auto;
}

.pipeline-step {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.pipeline-step b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.tool-row {
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1fr);
}

.job-row {
  grid-template-columns: minmax(210px, 1fr) auto auto;
}

.endpoint-row {
  grid-template-columns: 64px minmax(220px, .8fr) minmax(0, 1fr);
}

.method {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

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

.policy-list div {
  display: grid;
  gap: 6px;
}

.policy-list span {
  color: var(--muted);
  line-height: 1.7;
}

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

.plan-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.price {
  font-size: 30px;
  font-weight: 900;
}

.feature-list {
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.feature-list span {
  display: block;
}

.locked {
  color: var(--red);
}

.connect-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid rgba(20, 153, 134, 0.22);
  background:
    linear-gradient(135deg, rgba(20, 153, 134, 0.08), rgba(255, 255, 255, 0.86)),
    var(--surface);
}

.connect-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.connect-copy h2 {
  font-size: 24px;
}

.connect-status-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.connect-status-card strong {
  font-size: 21px;
  direction: ltr;
  text-align: right;
}

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

.connect-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.connect-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.verification-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 600;
}

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  background: var(--ink);
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 25, 35, 0.58);
}

.modal-panel {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(90vh, 980px);
  overflow: auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(7, 25, 35, 0.24);
}

.onboarding-modal {
  z-index: 70;
}

.onboarding-panel {
  width: min(920px, 100%);
  overflow: hidden;
}

.onboarding-header {
  position: relative;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 18px 0;
  background: #ffffff;
}

.onboarding-progress button {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  color: var(--muted);
  padding: 9px;
  display: grid;
  gap: 5px;
  justify-items: center;
}

.onboarding-progress span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef5f4;
  color: var(--green);
  font-weight: 800;
}

.onboarding-progress strong {
  font-size: 12px;
  white-space: nowrap;
}

.onboarding-progress button.active {
  border-color: rgba(20, 153, 134, 0.54);
  background: var(--green-soft);
  color: var(--ink);
}

.onboarding-progress button.done span {
  background: var(--green);
  color: #ffffff;
}

.onboarding-body {
  display: grid;
  gap: 18px;
  padding: 20px 18px;
  background: #ffffff;
}

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

.onboarding-copy h3 {
  font-size: 28px;
  line-height: 1.35;
}

.onboarding-copy p:last-child,
.onboarding-card-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.onboarding-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.onboarding-flow span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-weight: 700;
}

.onboarding-flow b {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 22px;
}

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

.onboarding-card-grid div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: #f8fbfa;
}

.onboarding-actions > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.intake-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 18px;
  background: #f8fbfa;
  border-bottom: 1px solid var(--line);
}

.intake-progress span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.intake-progress span.done {
  background: var(--green-soft);
  border-color: #b7dfcc;
  color: var(--green);
}

.modal-panel form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.form-section h3 {
  font-size: 17px;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field-error input,
.field-error select,
.field-error textarea {
  border-color: var(--red);
  outline: 3px solid rgba(163, 61, 54, 0.12);
}

.form-error {
  min-height: 22px;
  color: var(--red);
  font-weight: 900;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 14px;
  background: #fff;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px;
  }

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

  .tenant-switcher {
    margin-top: 0;
  }

  .metrics-grid,
  .launch-board,
  .flow-grid,
  .plans-grid,
  .schema-grid,
  .meta-grid,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .launch-score {
    grid-template-columns: 1fr;
  }

  .inbox-layout,
  .two-column,
  .publish-layout,
  .data-layout,
  .pipeline-layout,
  .ops-control-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .sidebar {
    gap: 14px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand small {
    font-size: 12px;
  }

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

  .nav-item {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .tenant-switcher {
    padding-top: 12px;
  }

  .workspace {
    padding: 16px;
  }

  .topbar,
  .topbar-actions,
  .panel-header,
  .draft-actions,
  .panel-actions,
  .property-help,
  .modal-header,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .launch-board,
  .launch-score,
  .flow-grid,
  .plans-grid,
  .schema-grid,
  .meta-grid,
  .analytics-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .intake-progress {
    grid-template-columns: 1fr;
  }

  .property-row,
  .property-row.header,
  .data-row,
  .event-row,
  .pipeline-step,
  .tool-row,
  .job-row,
  .endpoint-row {
    grid-template-columns: 1fr;
  }

  .property-row.header {
    display: none;
  }

  .message {
    max-width: 92%;
  }

  .modal {
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

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

/* Nuzul-inspired client experience polish */
:root {
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-muted: #f2f7f6;
  --ink: #17252b;
  --muted: #74828a;
  --line: #e3e9e8;
  --green: #149985;
  --green-soft: #eaf7f4;
  --blue: #082535;
  --blue-soft: #eef4f5;
  --gold: #c59031;
  --gold-soft: #fff5d8;
  --red: #b4453f;
  --red-soft: #fff0ef;
  --shadow: 0 14px 30px rgba(12, 38, 47, 0.06);
  color-scheme: light;
}

body {
  background:
    linear-gradient(180deg, #fbfcfc 0, #f6f8f8 420px),
    var(--bg);
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  border-left: 1px solid var(--line);
  padding: 26px 20px;
  gap: 24px;
  box-shadow: -14px 0 34px rgba(13, 36, 43, 0.04);
}

.brand {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 48px;
  height: 48px;
  box-shadow: 0 10px 20px rgba(20, 153, 134, 0.16);
}

.brand strong {
  font-size: 18px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  gap: 4px;
}

.nav-section {
  display: block;
  margin: 14px 10px 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.nav-item {
  min-height: 46px;
  border: 1px solid transparent;
  color: #73818a;
  padding: 10px 12px;
}

.nav-item span:first-child {
  width: 26px;
  color: #9aa7ad;
  font-size: 18px;
}

.nav-item.active,
.nav-item:hover {
  background: #fffdf8;
  border-color: #f0c86f;
  color: var(--ink);
  box-shadow: 0 9px 18px rgba(197, 144, 49, 0.08);
}

.nav-item.active span:first-child,
.nav-item:hover span:first-child {
  color: var(--gold);
}

.tenant-switcher {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  gap: 9px;
}

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

.tenant-switcher select,
.support-button {
  background: #fbfcfc;
  border-color: var(--line);
  color: var(--ink);
}

.support-button {
  min-height: 42px;
  border: 1px solid #9acdc5;
  border-radius: 8px;
  margin-top: 8px;
  color: #107b6e;
  font-weight: 900;
}

.workspace {
  padding: 28px 30px 46px;
}

.topbar {
  min-height: 76px;
  margin-bottom: 18px;
  padding: 10px 0 20px;
  border-bottom: 1px solid var(--line);
}

.topbar .eyebrow {
  color: var(--gold);
}

h1 {
  font-size: 30px;
  font-weight: 900;
}

h2 {
  font-size: 21px;
  font-weight: 900;
}

.topbar-actions {
  justify-content: flex-end;
}

.site-card {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 250px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.site-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-card strong {
  direction: ltr;
  color: #52636c;
  font-size: 14px;
}

.primary-button,
.secondary-button,
.icon-button,
.segment,
.ghost-button,
.tab-chip {
  border-radius: 8px;
}

.primary-button {
  background: var(--green);
  box-shadow: 0 10px 20px rgba(20, 153, 134, 0.16);
}

.secondary-button,
.ghost-button,
.tab-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost-button {
  min-height: 36px;
  padding: 0 12px;
  color: #8a641d;
  font-weight: 900;
}

.icon-button {
  background: #eef5f4;
  color: var(--green);
}

.notice-banner {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid #f2d88f;
  border-radius: 8px;
  background: var(--gold-soft);
  color: #80601f;
}

.notice-banner > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2c95e;
  color: #ffffff;
  font-weight: 900;
}

.notice-banner strong {
  flex: 1;
  line-height: 1.6;
}

.overview-tabs {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f3;
}

.tab-chip {
  min-height: 38px;
  min-width: 112px;
  font-weight: 900;
  color: var(--muted);
}

.tab-chip.active {
  border-color: #f0c86f;
  color: var(--ink);
  background: #fffdf8;
}

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.welcome-panel .eyebrow {
  color: var(--gold);
}

.welcome-panel .meta-line {
  max-width: 760px;
  margin-top: 8px;
}

.today-summary {
  min-width: 146px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.today-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.today-summary strong {
  font-size: 22px;
}

.ops-control-panel {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  padding: 18px;
  border: 1px solid #cde8e3;
  background: linear-gradient(135deg, #ffffff, #f3fbf9);
  color: var(--ink);
}

.ops-control-panel .eyebrow {
  color: var(--green);
}

.ops-control-panel .meta-line {
  color: var(--muted);
}

.ai-switch-card {
  border-color: #cce7e2;
  background: #ffffff;
}

.ai-switch-card span {
  color: var(--muted);
}

.toggle-button {
  background: #edf4f3;
  border-color: #c9d8d6;
}

.toggle-button.on {
  background: var(--green);
  border-color: var(--green);
}

.metric,
.panel,
.plan-card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 134px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset-block: 16px;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--green);
}

.metric span {
  font-size: 12px;
  font-weight: 900;
}

.metric strong {
  font-size: 30px;
}

.metric small {
  color: #6d7c83;
  line-height: 1.55;
}

.launch-board {
  grid-template-columns: minmax(330px, 0.8fr) minmax(0, 1.2fr);
}

.score-ring {
  width: 122px;
  height: 122px;
  background:
    radial-gradient(circle at center, #fff 0 59%, transparent 60%),
    conic-gradient(var(--green) var(--score), #e6eeee 0);
}

.score-ring strong {
  font-size: 28px;
}

.launch-item,
.lead-row,
.insight-row,
.funnel-row,
.district-row,
.ops-alert,
.conversation-row,
.check-row,
.channel-row,
.data-row,
.policy-list div,
.schema-card,
.event-row,
.pipeline-step,
.tool-row,
.job-row,
.guardrail-row,
.endpoint-row,
.tenant-field-row,
.property-row,
.flow-step {
  background: #fbfcfc;
  border-color: var(--line);
}

.launch-item b,
.flow-step strong,
.pipeline-step b {
  border-radius: 8px;
}

.analytics-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 0.95fr);
}

.status-pill {
  border: 1px solid transparent;
  background: #eef3f3;
  color: #6d7c83;
}

.status-pill.live {
  border-color: #b9ded8;
}

.status-pill.premium {
  border-color: #ead08b;
}

.conversation-row.active {
  border-color: var(--green);
  background: #f0fbf8;
}

.chat-window {
  background: #f3f6f6;
}

.message {
  border-radius: 8px;
}

.property-help {
  border-color: #d7e9e6;
  background: #f4fbf9;
}

.property-row.header {
  color: #819098;
}

.modal-panel {
  border-radius: 8px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: relative;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(13, 36, 43, 0.05);
  }

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

  .nav-section {
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .tenant-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .support-button {
    grid-column: 1 / -1;
  }

  .site-card {
    min-width: 220px;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    padding-bottom: 14px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 44px 1fr 1fr;
  }

  .site-card {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .guide-button {
    grid-column: 2 / -1;
  }

  #addPropertyButton {
    grid-column: 1 / 3;
  }

  .notice-banner,
  .welcome-panel,
  .ops-control-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .notice-banner {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .notice-banner .ghost-button {
    grid-column: 1 / -1;
  }

  .overview-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab-chip {
    min-width: 0;
  }

  .today-summary {
    min-width: 0;
  }

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

  .tenant-switcher {
    grid-template-columns: 1fr;
  }
}

html,
body,
button,
input,
select,
textarea {
  font-family: "Poppins", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: 400;
}

body {
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

h1,
h2,
h3,
.brand strong,
.metric strong,
.price {
  font-weight: 700;
}

.nav-section,
.nav-item,
.primary-button,
.secondary-button,
.ghost-button,
.tab-chip,
.support-button,
.status-pill,
.eyebrow,
.tenant-switcher label,
.form-grid label,
.launch-item b,
.score-ring span {
  font-weight: 600;
}

.meta-line,
.brand small,
.ai-switch-card span,
.property-help span,
.schema-card span,
.guardrail-row span,
.tenant-field-row span,
.tool-row span,
.policy-list span {
  font-weight: 400;
}

@media (max-width: 900px) {
  .whatsapp-control-board,
  .property-detail-grid,
  .platform-grid,
  .connect-panel,
  .launch-board,
  .launch-score {
    grid-template-columns: 1fr;
  }

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

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

  .onboarding-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .approved-row,
  .platform-top,
  .platform-stats,
  .ai-visibility-card,
  .onboarding-actions,
  .connect-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .property-analytics-grid {
    grid-template-columns: 1fr;
  }

  .table-actions,
  .platform-actions,
  .connect-form,
  .connect-actions,
  .onboarding-actions > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .onboarding-progress {
    grid-template-columns: 1fr;
  }

  .onboarding-progress button {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: right;
  }

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

  .onboarding-flow b {
    transform: rotate(-90deg);
  }

  .onboarding-copy h3 {
    font-size: 23px;
  }
}
