/* ============================================
   KIKO - v0 Design System (Tailwind + Inter/Tajawal)
   Style: Enterprise SaaS for Shopify WhatsApp Confirmation
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --background: #f4f6f8;
  --foreground: #101828;
  --card: #ffffff;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e1e4e8;
  --blue: #2563eb;
  --blue-light: #edf4ff;
  --green: #25d366;
  --green-dark: #128c7e;
  --purple: #7c3aed;
  --ink: #101828;
  --danger: #b42318;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Tajawal', 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
}

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

/* ─── Layout & Sidebar (RTL SUPPORT: Sidebar on the RIGHT) ─── */
.onboarding-shell {
  min-height: 100vh;
  direction: rtl;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.onboarding-top {
  height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  z-index: 10;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.onboarding-body {
  display: flex;
  min-height: calc(100vh - 68px);
  position: relative;
}

/* Sidebar ON THE RIGHT SIDE IN RTL */
.onboarding-rail {
  width: 380px;
  background: #f8fafc;
  border-left: 1px solid var(--line);
  border-right: none;
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 0;
  top: 68px;
  bottom: 0;
  height: calc(100vh - 68px);
  overflow-y: auto;
  z-index: 5;
}

.onboarding-rail h1 {
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 12px 0 8px;
  font-weight: 800;
}

.rail-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
}

.rail-copy {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
  margin: 0;
}

/* Main Content ON THE LEFT SIDE IN RTL */
.onboarding-main {
  flex: 1;
  margin-right: 380px;
  margin-left: 0;
  padding: 44px 60px;
  max-width: 900px;
}

.onboarding-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.onboarding-breadcrumb strong { color: var(--ink); }

.setup-content {
  width: 100%;
  max-width: 680px;
  margin: 32px 0 0;
}

.setup-step {
  color: var(--blue);
  font-weight: 800;
  font-size: 11px;
}

.setup-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 10px 0 6px;
}

.setup-header p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
  font-size: 13px;
}

.setup-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 24px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(18, 43, 75, 0.04);
}

.setup-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eff1f4;
}

.setup-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e9fbf0;
  color: var(--green-dark);
}

.setup-card-heading h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 3px;
}

.setup-card-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

/* Stepper Timeline */
.stepper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 36px;
}

.stepper::before {
  content: '';
  position: absolute;
  right: 15px; /* RTL position */
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: #d8dee8;
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 64px;
  padding: 6px 0;
  border: 0;
  background: none;
  text-align: right;
  color: var(--muted-2);
  cursor: pointer;
  width: 100%;
}

.step-dot {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  transition: all 0.2s;
}

.step.completed .step-dot {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.step.current .step-dot {
  border-color: var(--blue);
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.step span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
}

.step strong {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
}

.step small {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.3;
}

.step.current strong { color: var(--blue); }

/* Buttons & Components */
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: none;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 700;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transition: background 0.15s;
}

.primary-button:hover { background: #1d4ed8; }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 700;
  background: #ffffff;
  color: var(--foreground);
  cursor: pointer;
}

.btn-wa-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 8px;
  border: none;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-wa-green:hover { background: #20bd5a; }

.badge {
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success { color: #087443; background: #e9fbf0; border: 1px solid #a7f3d0; }
.badge-danger { color: var(--danger); background: #fff0ef; border: 1px solid #fecaca; }

.setup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rail-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.help-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: #ffffff;
  text-align: center;
}

.help-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  margin: 0 auto 10px;
}

@media (max-width: 1024px) {
  .onboarding-rail { display: none; }
  .onboarding-main { margin-right: 0; padding: 24px; }
}
