:root {
  --green: #25D366;
  --green-dark: #128C7E;
  --dark: #111b21;
  --gray: #667781;
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--dark);
  direction: rtl;
  text-align: right;
}

a { color: inherit; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Nav ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav .logo {
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav .logo span.dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
  background: #fff;
  color: var(--dark);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--green-dark);
  padding: 8px 10px;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.3;
  margin: 0 0 16px;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--gray);
  max-width: 640px;
  margin: 0 auto 28px;
}
.badge {
  display: inline-block;
  background: #e7f9ee;
  color: var(--green-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ===== How it works ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 48px 0;
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-card .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 14px;
}
.step-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.step-card p { margin: 0; color: var(--gray); font-size: 0.92rem; }

/* ===== Cards / forms ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 1.25rem; }
.card h3 { font-size: 1.05rem; }
.hint { color: var(--gray); font-size: 0.85rem; margin-top: -6px; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 16px 0 6px;
}
input[type="text"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 70px; }

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr; }
}

.dynamic-list .item {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
  position: relative;
}
.dynamic-list .item .remove {
  position: absolute;
  left: 10px;
  top: 10px;
  background: none;
  border: none;
  color: #c00;
  cursor: pointer;
  font-size: 0.85rem;
}
.add-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--green-dark);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}

.actions { margin-top: 24px; display: flex; gap: 12px; }

.top-strip {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

footer {
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
  padding: 40px 0;
}

/* ===== Chat widget ===== */
.chat-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #e5ddd5;
}
.chat-header {
  background: var(--green-dark);
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-messages {
  height: 340px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  max-width: 75%;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.bubble.user {
  background: #d9fdd3;
  align-self: flex-end;
  border-bottom-left-radius: 3px;
}
.bubble.bot {
  background: #fff;
  align-self: flex-start;
  border-bottom-right-radius: 3px;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #f0f0f0;
}
.chat-input-row input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 16px;
}
.chat-input-row button {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.status-pill.connected { background: #e7f9ee; color: var(--green-dark); }
.status-pill.disconnected { background: #fdeeee; color: #b3261e; }

.copy-link {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f4f5f7;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  word-break: break-all;
}
