/* =========================================================
   Healthdesk product mock — interactive component
   Faithful recreation of the production app, with polish.
   Drops into any section via <div id="product-mock"></div>
   ========================================================= */

/* ---------- Outer frame (browser-chrome style) ---------- */
.pm-frame {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(15, 25, 50, .04),
    0 30px 60px -20px rgba(15, 25, 50, .25),
    0 18px 32px -16px rgba(15, 25, 50, .18);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1f2533;
  isolation: isolate;
}
.pm-frame *{ box-sizing: border-box; }

/* tab strip simulating a browser */
.pm-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f6f7fb, #eef0f6);
  border-bottom: 1px solid #e3e6ee;
}
.pm-dots { display: flex; gap: 6px; }
.pm-dots span { width: 11px; height: 11px; border-radius: 50%; background: #d6d9e3; }
.pm-dots span:nth-child(1) { background: #ff5f57; }
.pm-dots span:nth-child(2) { background: #febc2e; }
.pm-dots span:nth-child(3) { background: #28c840; }
.pm-url {
  flex: 1;
  background: #fff;
  border: 1px solid #e3e6ee;
  border-radius: 8px;
  padding: 5px 10px;
  font: 500 12px/1 'JetBrains Mono', monospace;
  color: #5b6478;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-url .lock { color: #28c840; font-size: 11px; }

/* ---------- App layout ---------- */
.pm-app {
  display: grid;
  grid-template-columns: 232px 1fr;
  grid-template-rows: 64px 1fr;
  height: 760px;
  background: #f3f4f8;
  position: relative;
}

/* ---------- Brand corner (top-left, above sidebar) ---------- */
.pm-brand-corner {
  grid-row: 1;
  grid-column: 1;
  background: #ffffff;
  border-bottom: 1px solid #ebedf3;
  border-right: 1px solid #ebedf3;
  display: flex;
  align-items: center;
  padding: 0 18px;
  z-index: 2;
}
.pm-brand-corner img { max-height: 28px; width: auto; display: block; }
.pm-brand-corner .pm-brand-mark { display: none; }
@media (max-width: 1100px) {
  .pm-brand-corner .pm-brand-full { display: none; }
  .pm-brand-corner .pm-brand-mark { display: block; max-height: 30px; }
}

/* ---------- Top header (right of brand corner) ---------- */
.pm-top {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  background: #ffffff;
  border-bottom: 1px solid #ebedf3;
  height: 64px;
}
.pm-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.pm-search input {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e3e6ee;
  padding: 0 12px 0 36px;
  font: 400 14px/1 'Inter', sans-serif;
  color: #1f2533;
  background: #fafbfd;
  outline: none;
  transition: border .15s, background .15s;
}
.pm-search input:focus { border-color: #b9c2dd; background: #fff; }
.pm-search .pm-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a93a8;
}
.pm-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.pm-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5b6478;
  cursor: pointer;
  transition: background .15s;
}
.pm-icon-btn:hover { background: #f1f3f9; color: #2A2840; }
.pm-icon-btn .pm-dot {
  position: absolute;
  top: 8px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px #fff;
}
.pm-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s;
}
.pm-user:hover { background: #f3f4f8; }
.pm-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #33C4E5, #6657CC);
  color: #fff;
  font: 600 12px/32px 'Inter', sans-serif;
  text-align: center;
  position: relative;
}
.pm-user-avatar::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #6b7280;
  box-shadow: 0 0 0 2px #fff;
}
.pm-user.online .pm-user-avatar::after { background: #22c55e; }
.pm-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.pm-user-name { font: 600 13px/1.2 'Inter'; color: #1f2533; }
.pm-user-status { font: 400 11px/1.2 'Inter'; color: #8a93a8; }

/* ---------- Sidebar ---------- */
.pm-side {
  grid-row: 2;
  grid-column: 1;
  background: #0d1626;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 18px;
  color: #c8cee0;
  position: relative;
}
.pm-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pm-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font: 500 14px/1 'Inter', sans-serif;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
  user-select: none;
}
.pm-nav-item:hover { background: rgba(255,255,255,.06); }
.pm-nav-item .pm-nav-ic {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
}
.pm-nav-item.active {
  background: rgba(5, 193, 255, .12);
  color: #05C1FF;
}
.pm-nav-item.active .pm-nav-ic { color: #05C1FF; }
.pm-icon-mask {
  width: 20px; height: 20px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.pm-nav-item .pm-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font: 700 10px/1 'Inter';
  border-radius: 999px;
  padding: 3px 7px;
  letter-spacing: .02em;
}
.pm-nav-item .pm-hint-pulse {
  margin-left: auto;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #05C1FF;
  position: relative;
  box-shadow: 0 0 0 0 rgba(5,193,255,.6);
  animation: pm-pulse 1.6s ease-out infinite;
}
@keyframes pm-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(5,193,255,.5); }
  70%  { box-shadow: 0 0 0 10px rgba(5,193,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(5,193,255,0); }
}

/* ---------- Content viewport ---------- */
.pm-view {
  grid-column: 2;
  background: #f3f4f8;
  overflow: auto;
  position: relative;
}
.pm-view::-webkit-scrollbar { width: 10px; height: 10px; }
.pm-view::-webkit-scrollbar-thumb { background: #d6d9e3; border-radius: 999px; }
.pm-view::-webkit-scrollbar-track { background: transparent; }

.pm-page { padding: 28px 32px 40px; }
.pm-page-title {
  font: 700 26px/1.2 'Inter', sans-serif;
  color: #2A2840;
  margin: 0 0 22px;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 18px;
}
.pm-page-title .pm-page-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Buttons (in app) ---------- */
.pm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font: 600 13px/1 'Inter', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  background: #fff;
  color: #2A2840;
  transition: background .15s, border .15s, color .15s;
  white-space: nowrap;
}
.pm-btn:hover { background: #f3f4f8; }
.pm-btn-ghost { border-color: #e3e6ee; }
.pm-btn-primary {
  background: #6657CC;
  color: #fff;
  border-color: transparent;
}
.pm-btn-primary:hover { background: #574bb3; }
.pm-btn-sm { height: 32px; padding: 0 10px; font-size: 12px; }
.pm-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e3e6ee;
  font: 500 13px/1 'Inter';
  color: #1f2533;
  cursor: pointer;
}
.pm-select::after {
  content: '⌄';
  margin-left: 6px;
  color: #8a93a8;
  font-size: 14px;
  line-height: 0;
  position: relative;
  top: -3px;
}

/* ---------- Cards & tables ---------- */
.pm-card {
  background: #fff;
  border: 1px solid #ebedf3;
  border-radius: 14px;
  overflow: hidden;
}
.pm-card-pad { padding: 18px 20px; }

.pm-table { width: 100%; border-collapse: collapse; }
.pm-table thead th {
  text-align: left;
  font: 600 12.5px/1 'Inter';
  color: #4d5566;
  padding: 14px 18px;
  background: #f6f7fb;
  border-bottom: 1px solid #ebedf3;
  white-space: nowrap;
}
.pm-table tbody td {
  padding: 16px 18px;
  font: 400 13.5px/1.4 'Inter';
  color: #1f2533;
  border-bottom: 1px solid #f0f2f8;
  vertical-align: middle;
}
.pm-table tbody tr:last-child td { border-bottom: 0; }
.pm-table tbody tr:hover td { background: #fafbfd; }
.pm-table .pm-check {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid #c8cee0;
  display: inline-block;
  vertical-align: middle;
}
.pm-table .pm-pri { font-weight: 600; color: #2A2840; }
.pm-table .pm-muted { color: #8a93a8; font-size: 12.5px; }
.pm-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a93a8;
}
.pm-row-actions svg { cursor: pointer; transition: color .15s; }
.pm-row-actions svg:hover { color: #6657CC; }
.pm-row-actions .danger:hover { color: #ef4444; }

/* anonymous avatar bubbles */
.pm-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #e3e6ee;
  color: #4d5566;
  font: 600 11px/30px 'Inter';
  text-align: center;
  display: inline-block;
  vertical-align: middle;
  text-transform: uppercase;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.pm-av-lg { width: 38px; height: 38px; line-height: 38px; font-size: 13px; }
.pm-av.tone-1 { background: #ddebff; color: #1e4f8c; }
.pm-av.tone-2 { background: #ffe3d6; color: #8c441e; }
.pm-av.tone-3 { background: #d6f3e8; color: #1e6d4a; }
.pm-av.tone-4 { background: #f3dff7; color: #6a2382; }
.pm-av.tone-5 { background: #fff3c7; color: #8a6b0c; }
.pm-av.tone-6 { background: #ddebff; color: #2A2840; }
.pm-av.tone-empty { background: #e3e6ee; color: transparent; }

/* pills / badges */
.pm-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font: 600 11px/1.4 'Inter';
  letter-spacing: .01em;
}
.pm-pill.static { background: #e0f1ff; color: #1c5d8f; }
.pm-pill.dynamic { background: #ece6ff; color: #5a4ba8; }
.pm-pill.green { background: #dcf5e7; color: #1e6d4a; }
.pm-pill.red { background: #fde5e5; color: #a02525; }
.pm-pill.amber { background: #fff0c8; color: #8a5d0c; }

/* toggle */
.pm-toggle {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: #d6d9e3;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.pm-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: left .2s;
}
.pm-toggle.on { background: #6657CC; }
.pm-toggle.on::after { left: 18px; }

/* ===== Hint callout next to Pipelines nav ===== */
.pm-hint {
  position: absolute;
  top: 117px;
  left: 238px;
  background: #0d1626;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px 10px 12px;
  font: 500 12.5px/1.2 'Inter';
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 14px 30px -10px rgba(13, 22, 38, .55);
  z-index: 9;
  cursor: pointer;
  user-select: none;
  animation: pm-hint-in .4s ease both;
  transition: transform .15s;
}
.pm-hint:hover { transform: translateX(2px); }
.pm-hint::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #0d1626;
  border-radius: 2px;
}
.pm-hint .pm-hint-arrow {
  background: #05C1FF;
  color: #0d1626;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.pm-hint button {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  margin-left: 4px;
}
.pm-hint button:hover { color: #fff; }
@keyframes pm-hint-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 880px) {
  .pm-hint { display: none; }
}

/* =========================================================
   DASHBOARD
   ========================================================= */
.pm-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.pm-stat {
  padding: 18px 20px;
}
.pm-stat-label {
  font: 600 11.5px/1 'Inter';
  color: #8a93a8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-stat-info {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #c8cee0;
  color: #fff;
  font: 700 9px/14px 'Inter';
  text-align: center;
}
.pm-stat-value {
  font: 700 28px/1 'Inter';
  color: #2A2840;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.pm-stat-trend { font: 500 12px/1 'Inter'; color: #1e6d4a; }
.pm-stat-trend.down { color: #a02525; }

.pm-dash-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  margin-bottom: 16px;
}
.pm-chart-h {
  padding: 16px 20px 4px;
  font: 600 14px/1 'Inter';
  color: #2A2840;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-chart-h .pm-stat-info { background: #b9c2dd; }
.pm-chart-body { padding: 6px 20px 20px; }

/* simple legend */
.pm-legend { display: flex; gap: 14px; padding: 0 20px 10px; font: 500 12px/1 'Inter'; color: #4d5566; }
.pm-legend .swatch { width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; display: inline-block; vertical-align: middle; }

/* =========================================================
   PIPELINES (Kanban)
   ========================================================= */
.pm-kanban {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  overflow-x: auto;
}
.pm-col {
  flex: 0 0 270px;
  background: transparent;
  display: flex;
  flex-direction: column;
}
.pm-col-h {
  font: 600 13px/1 'Inter';
  color: #2A2840;
  padding: 8px 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-col-h .pm-col-count { color: #8a93a8; font-weight: 500; }
.pm-col-h .pm-col-tools { margin-left: auto; display: inline-flex; gap: 10px; color: #8a93a8; }
.pm-card-lead {
  background: #fff;
  border: 1px solid #ebedf3;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: transform .15s, box-shadow .15s;
}
.pm-card-lead:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -8px rgba(15,25,50,.18);
}
.pm-card-lead .pm-lead-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.pm-lead-name { font: 600 13.5px/1.2 'Inter'; color: #2A2840; }
.pm-lead-created { font: 400 11.5px/1 'Inter'; color: #8a93a8; margin-bottom: 12px; }
.pm-lead-eye { color: #c8cee0; }
.pm-lead-fields {
  background: #fafbfd;
  border: 1px solid #f0f2f8;
  border-radius: 8px;
  padding: 10px 12px;
  font: 400 12px/1.7 'Inter';
  color: #4d5566;
  margin-bottom: 12px;
}
.pm-lead-fields b { color: #1f2533; font-weight: 500; }
.pm-lead-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.pm-lead-action {
  border: 1px solid #ece9ff;
  background: #fff;
  color: #6657CC;
  border-radius: 8px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.pm-lead-action:hover { background: #f6f4ff; }
.pm-lead-action.urgent { color: #ef4444; border-color: #fde5e5; }
.pm-lead-action.hot { background: #22a36b; color: #fff; border-color: transparent; }

/* =========================================================
   INBOX
   ========================================================= */
.pm-inbox {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  height: calc(760px - 64px);
  background: #fff;
}
.pm-conv-list {
  border-right: 1px solid #ebedf3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pm-conv-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 16px 10px;
  align-items: center;
}
.pm-tab {
  font: 500 12.5px/1 'Inter';
  color: #4d5566;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f4f8;
  cursor: pointer;
}
.pm-tab.active { background: #2A2840; color: #fff; }
.pm-tab.muted { background: #fff; color: #8a93a8; border: 1px solid #ebedf3; }
.pm-tab-filter { margin-left: auto; color: #8a93a8; cursor: pointer; }
.pm-conv-scroll { flex: 1; overflow-y: auto; }
.pm-conv {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f2f8;
  cursor: pointer;
  position: relative;
}
.pm-conv:hover { background: #fafbfd; }
.pm-conv.active { background: #eef0fb; }
.pm-conv.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #22a36b;
}
.pm-conv .pm-conv-ch {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}
.pm-conv-ch.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.pm-conv-ch.fb { background: #1877f2; }
.pm-conv-ch.sms { background: #6657CC; }
.pm-conv-ch.email { background: #eb5d3f; }
.pm-conv-ch.web { background: #00A1D6; }
.pm-conv-ch.msg { background: #d946ef; }
.pm-conv-body { flex: 1; min-width: 0; }
.pm-conv-name { font: 600 13px/1.2 'Inter'; color: #2A2840; }
.pm-conv-source { font: 400 11.5px/1.2 'Inter'; color: #8a93a8; margin-top: 1px; }
.pm-conv-preview { font: 400 12px/1.2 'Inter'; color: #8a93a8; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-conv-meta { font: 400 11.5px/1 'Inter'; color: #8a93a8; flex-shrink: 0; }
.pm-conv-unread {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  margin-left: 6px;
}
.pm-conv-fab {
  position: sticky;
  bottom: 16px;
  margin: 0 auto -40px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #f56991;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 22px -6px rgba(245, 105, 145, .45);
  align-self: center;
  font-size: 22px;
  line-height: 1;
}

/* thread */
.pm-thread {
  display: flex;
  flex-direction: column;
  background: #fbfbfe;
  overflow: hidden;
  border-right: 1px solid #ebedf3;
}
.pm-thread-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #ebedf3;
  background: #fff;
}
.pm-thread-h .pm-th-info { flex: 1; }
.pm-thread-h .pm-th-name { font: 600 14px/1.2 'Inter'; color: #2A2840; }
.pm-thread-h .pm-th-sub { font: 400 11.5px/1.2 'Inter'; color: #8a93a8; }
.pm-thread-h .pm-th-actions { display: flex; gap: 6px; }
.pm-th-iconbtn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f3f4f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4d5566;
  cursor: pointer;
}
.pm-th-iconbtn:hover { background: #e3e6ee; }

/* messages */
.pm-msgs { flex: 1; overflow-y: auto; padding: 18px 22px 16px; display: flex; flex-direction: column; gap: 4px; }

/* hairline divider with centered label */
.pm-msg-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 6px;
}
.pm-msg-divider::before,
.pm-msg-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e7e9ef;
}
.pm-msg-divider .lbl {
  font: 500 11px/1 'Inter';
  color: #9aa3b8;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pm-msg-divider .lbl.ai { color: #6657CC; }
.pm-msg-divider .lbl.ai::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6657CC;
}

/* bubbles */
.pm-msg {
  max-width: 78%;
  border-radius: 18px;
  padding: 10px 14px;
  font: 400 13.5px/1.5 'Inter';
  white-space: pre-wrap;
  position: relative;
  margin-top: 2px;
}
.pm-msg.in {
  align-self: flex-start;
  background: #f1f3f9;
  color: #1f2533;
  border-bottom-left-radius: 6px;
}
.pm-msg.out {
  align-self: flex-end;
  background: #6657CC;
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px -8px rgba(102, 87, 204, .55);
}
.pm-msg-time {
  font: 500 11px/1 'Inter';
  color: #9aa3b8;
  margin: 4px 4px 8px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pm-msg-time.out { align-self: flex-end; }
.pm-msg-time .pm-check2 {
  color: #00A1D6;
  font-size: 13px;
  letter-spacing: -3px;
  margin-left: 2px;
}

/* call bubble — same shape as message bubble */
.pm-msg-call {
  max-width: 78%;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
  position: relative;
}
.pm-msg-call.in {
  align-self: flex-start;
  background: #f1f3f9;
  color: #1f2533;
  border-bottom-left-radius: 6px;
}
.pm-msg-call.out {
  align-self: flex-end;
  background: #6657CC;
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px -8px rgba(102, 87, 204, .55);
}
.pm-msg-call.miss {
  align-self: flex-start;
  background: #fef0f0;
  color: #a02525;
  border-bottom-left-radius: 6px;
}
.pm-msg-call .pm-call-ic {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-msg-call.in   .pm-call-ic { background: #dcf5e7; color: #1e6d4a; }
.pm-msg-call.out  .pm-call-ic { background: rgba(255,255,255,.16); color: #fff; }
.pm-msg-call.miss .pm-call-ic { background: #fde5e5; color: #c63030; }
.pm-msg-call .pm-call-body { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pm-msg-call .pm-call-lbl {
  font: 600 13.5px/1.2 'Inter';
}
.pm-msg-call .pm-call-dur {
  font: 500 11.5px/1.2 'Inter';
  opacity: .75;
  margin-top: 2px;
}
.pm-msg-call .pm-call-play {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s, background .12s;
  flex-shrink: 0;
}
.pm-msg-call.in .pm-call-play  { background: #fff; color: #6657CC; box-shadow: 0 2px 8px -2px rgba(15,25,50,.18); }
.pm-msg-call.out .pm-call-play { background: #fff; color: #6657CC; }
.pm-msg-call.miss .pm-call-play { display: none; }
.pm-msg-call .pm-call-play:hover { transform: scale(1.08); }
.pm-composer {
  border-top: 1px solid #ebedf3;
  background: #fff;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-composer .pm-c-input {
  flex: 1;
  border: 1px solid #ebedf3;
  border-radius: 12px;
  padding: 10px 14px;
  font: 400 13.5px/1.4 'Inter';
  color: #4d5566;
  background: #fafbfd;
}
.pm-composer .pm-c-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #6657CC;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* details */
.pm-details { padding: 18px; overflow-y: auto; background: #fff; }
.pm-details-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid #ebedf3;
  margin-bottom: 16px;
}
.pm-details-tab {
  font: 600 12.5px/1 'Inter';
  color: #8a93a8;
  padding: 8px 0 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.pm-details-tab.active { color: #2A2840; border-color: #6657CC; }
.pm-details .pm-d-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5dd4eb, #6657CC);
  color: #fff;
  font: 600 22px/64px 'Inter';
  text-align: center;
  margin-bottom: 12px;
}
.pm-details h4 {
  font: 700 18px/1.2 'Inter';
  color: #2A2840;
  margin: 0 0 16px;
}
.pm-details-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font: 400 13px/1.4 'Inter';
  color: #1f2533;
}
.pm-details-row svg { color: #8a93a8; flex-shrink: 0; }
.pm-details-row.cyan { color: #00A1D6; }
.pm-details-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ebedf3;
}
.pm-details-section h5 {
  font: 600 12px/1 'Inter';
  color: #2A2840;
  margin: 0 0 10px;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
}
.pm-details-section h5 svg { margin-left: auto; color: #8a93a8; cursor: pointer; }
.pm-d-toggles { display: flex; flex-direction: column; gap: 10px; }
.pm-d-toggle-row {
  display: flex; align-items: center; gap: 10px;
  font: 500 13px/1 'Inter'; color: #1f2533;
}
.pm-d-toggle-row .pm-toggle { margin-left: auto; }
.pm-d-total {
  text-align: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ebedf3;
}
.pm-d-total .num { font: 700 42px/1 'Inter'; color: #2A2840; }
.pm-d-total .lbl { font: 500 12px/1 'Inter'; color: #8a93a8; margin-top: 4px; letter-spacing: .02em; }
.pm-d-visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  font: 600 11.5px/1 'Inter';
  color: #2A2840;
  text-align: center;
}

/* =========================================================
   CALLS
   ========================================================= */
.pm-call-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 13px/1 'Inter';
}
.pm-call-type .ic {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-call-type.miss .ic { background: #fde5e5; color: #c63030; }
.pm-call-type.in .ic { background: #dcf5e7; color: #1e6d4a; }
.pm-call-type.miss .lbl { color: #c63030; font-weight: 600; }
.pm-call-type.in .lbl { color: #1e6d4a; font-weight: 600; }
.pm-call-sub { font: 400 11.5px/1.3 'Inter'; color: #8a93a8; margin-top: 2px; }

/* AI summary panel — floating bottom-right of the app, persists across pages */
.pm-ai-summary {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 360px;
  background: #fff;
  border: 1px solid #ebedf3;
  border-radius: 14px;
  padding: 16px 18px 18px;
  box-shadow: 0 30px 60px -20px rgba(15, 25, 50, .35), 0 10px 24px -12px rgba(15, 25, 50, .25);
  z-index: 50;
  display: none;
  animation: pm-ai-in .22s ease both;
}
.pm-ai-summary.visible { display: block; }
@keyframes pm-ai-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)  scale(1); }
}
.pm-ai-summary h6 {
  font: 600 12.5px/1 'Inter';
  color: #2A2840;
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.pm-ai-summary h6 .tag { background:#eee9ff; color:#6657CC; font:600 9.5px/1 'Inter'; padding:3px 7px; border-radius:999px; letter-spacing:.04em; text-transform:uppercase; }
.pm-ai-summary .pm-ai-x { position: absolute; top: 10px; right: 14px; color: #8a93a8; cursor: pointer; font-size: 18px; line-height: 1; }
.pm-ai-summary .pm-ai-x:hover { color: #2A2840; }
.pm-ai-summary p { font: 400 12px/1.5 'Inter'; color: #4d5566; margin: 0 0 12px; }
.pm-ai-summary p b { color: #2A2840; }
.pm-ai-summary .pm-ai-controls {
  display: flex; align-items: center; justify-content: center; gap: 22px; margin: 6px 0 4px;
}
.pm-ai-summary .pm-ai-controls .play {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid #22a36b; color: #22a36b;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; background: #fff;
}
.pm-ai-summary .pm-ai-controls .step { color: #6657CC; cursor: pointer; }
.pm-ai-summary .pm-ai-scrub {
  display: flex; align-items: center; gap: 8px;
  font: 500 10.5px/1 'Inter'; color: #4d5566;
  margin-top: 8px;
}
.pm-ai-summary .pm-ai-bar { flex: 1; height: 3px; border-radius: 999px; background: #ebedf3; position: relative; }
.pm-ai-summary .pm-ai-bar::after {
  content: ''; position: absolute; top: -3px; left: 8%;
  width: 9px; height: 9px; border-radius: 50%; background: #6657CC;
}
.pm-ai-summary .pm-ai-speed { text-align:center; font:500 11px/1 'Inter'; color:#6657CC; margin-top:8px; }

/* =========================================================
   TASKS / SETTINGS / PROFILE / BLASTS — shared form
   ========================================================= */
.pm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.pm-form .pm-fullrow { grid-column: 1 / -1; }
.pm-field-label { font: 500 13px/1 'Inter'; color: #2A2840; margin-bottom: 6px; }
.pm-input, .pm-textarea {
  width: 100%;
  border: 1px solid #e3e6ee;
  border-radius: 10px;
  padding: 11px 14px;
  font: 400 13.5px/1.4 'Inter';
  color: #1f2533;
  background: #fff;
}
.pm-textarea { resize: vertical; min-height: 80px; }
.pm-checkrow { display: flex; align-items: center; gap: 10px; font: 500 13px/1 'Inter'; color: #1f2533; padding: 6px 0; }
.pm-checkrow .pm-check {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid #c8cee0;
  background: #fff;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
}
.pm-checkrow .pm-check.checked { background: #00A1D6; border-color: #00A1D6; }
.pm-checkrow .pm-check.checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: 2px solid #fff;
  border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
/* Standalone .pm-check (used in tables + automations) */
.pm-auto-row .pm-check {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid #c8cee0;
  background: #fff;
}

/* Task detail slide-over — anchored to pm-view */
.pm-task-modal {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 56%;
  background: #fff;
  border-left: 1px solid #ebedf3;
  box-shadow: -20px 0 40px -16px rgba(15,25,50,.15);
  padding: 28px 32px;
  overflow-y: auto;
  z-index: 4;
}
.pm-view { position: relative; }
.pm-task-modal .pm-back {
  font: 500 13px/1 'Inter';
  color: #4d5566;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.pm-task-modal h3 {
  font: 700 20px/1.2 'Inter';
  color: #2A2840;
  margin: 0 0 6px;
}
.pm-task-modal .pm-task-meta {
  font: 500 12.5px/1.4 'Inter';
  color: #8a93a8;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 6px;
}

/* =========================================================
   AUTOMATIONS list
   ========================================================= */
.pm-auto-row {
  display: grid;
  grid-template-columns: 24px 1fr 80px 80px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f2f8;
}
.pm-auto-row:last-child { border-bottom: 0; }
.pm-auto-name { font: 600 14px/1.3 'Inter'; color: #2A2840; }
.pm-auto-desc { font: 400 12.5px/1.4 'Inter'; color: #8a93a8; margin-top: 2px; }
.pm-auto-row .pm-row-actions { justify-content: flex-end; }

/* search/filter row above tables */
.pm-table-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f8;
  background: #fff;
}
.pm-table-tools .pm-search {
  flex: 1;
  max-width: none;
}
.pm-table-tools .pm-search input {
  height: 36px;
  background: #fff;
  border-radius: 8px;
}
.pm-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font: 500 12.5px/1 'Inter';
  color: #4d5566;
  border-top: 1px solid #f0f2f8;
}
.pm-pagination .pages { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.pm-pagination .page {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4d5566;
}
.pm-pagination .page.active { background: #ece6ff; color: #6657CC; font-weight: 600; }
.pm-pagination .page:hover:not(.active) { background: #f3f4f8; }

/* =========================================================
   Tabs underline (Contacts page)
   ========================================================= */
.pm-utabs { display: flex; gap: 32px; border-bottom: 1px solid #ebedf3; padding: 0 18px; }
.pm-utab {
  font: 500 13.5px/1 'Inter';
  color: #8a93a8;
  padding: 14px 0 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.pm-utab.active { color: #6657CC; border-color: #6657CC; font-weight: 600; }
.pm-utab .pm-tab-count { color: #b9c2dd; margin-left: 6px; font-weight: 500; }

/* contact phone links */
.pm-link { color: #00A1D6; cursor: pointer; }
.pm-link:hover { text-decoration: underline; }

/* =========================================================
   BLASTS email composer
   ========================================================= */
.pm-blast-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
}
.pm-blast-preview {
  background: #fff;
  border: 1px solid #ebedf3;
  border-radius: 12px;
  padding: 20px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.pm-blast-preview .pm-blast-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #ebedf3;
  color: #8a93a8;
}
.pm-blast-preview .pm-blast-toolbar .center {
  display: inline-flex; gap: 8px; align-items: center;
}
.pm-blast-preview .pm-blast-toolbar .center .device {
  width: 28px; height: 22px;
  border: 1px solid #c8cee0;
  border-radius: 4px;
  position: relative;
}
.pm-blast-preview .pm-blast-toolbar .center .device.active { border-color: #6657CC; background: #f6f4ff; }
.pm-blast-preview .pm-blast-img {
  width: 240px; height: 160px;
  background: linear-gradient(135deg, #2a2840 0%, #6657CC 100%);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.pm-blast-preview .pm-blast-img::before {
  content: 'CAMPAIGN IMAGE';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 11px/1 'JetBrains Mono', monospace;
  color: rgba(255,255,255,.6);
  letter-spacing: .15em;
}
.pm-blast-preview .pm-blast-headline {
  font: 600 15px/1.4 'Inter';
  color: #2A2840;
  text-align: center;
  max-width: 280px;
}
.pm-blast-blocks {
  background: #fff;
  border: 1px solid #ebedf3;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pm-blast-block {
  border: 1px solid #ebedf3;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: background .15s, border .15s;
}
.pm-blast-block:hover { background: #fafbfd; border-color: #d6d9e3; }
.pm-blast-block .ic { color: #4d5566; margin-bottom: 8px; display: inline-block; }
.pm-blast-block .lbl { font: 500 11.5px/1 'Inter'; color: #4d5566; }
.pm-blast-tabs {
  position: absolute;
  right: 32px;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* not used — kept simple inline tabs instead */

/* =========================================================
   PROFILE
   ========================================================= */
.pm-profile-av-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.pm-profile-av {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #33C4E5, #6657CC);
  color: #fff;
  font: 700 18px/52px 'Inter';
  text-align: center;
}
.pm-profile-av-meta .pm-link { font: 500 12.5px/1 'Inter'; }
.pm-profile-av-meta .lbl { font: 500 11.5px/1 'Inter'; color: #8a93a8; margin-top: 4px; letter-spacing: .03em; text-transform: uppercase; }

/* =========================================================
   LOGOUT screen
   ========================================================= */
.pm-logout {
  display: flex; align-items: center; justify-content: center;
  height: 100%; flex-direction: column; gap: 16px; padding: 60px 20px;
  text-align: center;
}
.pm-logout h3 { font: 700 24px/1.2 'Inter'; color: #2A2840; margin: 0; }
.pm-logout p { font: 400 14px/1.5 'Inter'; color: #4d5566; margin: 0; max-width: 360px; }

/* =========================================================
   Section wrapper (marketing-site host)
   ========================================================= */
.product-mock-section {
  padding: 80px 0 100px;
  background: #fafbfd;
  position: relative;
}
.product-mock-section .container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.product-mock-section .section-head { text-align: center; margin: 0 auto 40px; max-width: 720px; }

/* =========================================================
   Responsive — collapse the mock at small widths
   ========================================================= */
@media (max-width: 1100px) {
  .pm-app { height: 720px; grid-template-columns: 220px 1fr; }
  .pm-inbox { grid-template-columns: 280px 1fr 0; }
  .pm-inbox > .pm-details { display: none; }
  .pm-thread-h .pm-th-actions { gap: 4px; }
  .pm-thread-h .pm-th-iconbtn:nth-child(n+5) { display: none; }
}
@media (max-width: 880px) {
  .pm-frame { border-radius: 14px; }
  .pm-app { grid-template-columns: 0 1fr; height: 640px; }
  .pm-side, .pm-brand-corner { display: none; }
  .pm-app { grid-template-rows: 56px 1fr; }
  .pm-top { padding: 10px 14px; gap: 10px; }
  .pm-top-actions { gap: 2px; }
  .pm-icon-btn { width: 34px; height: 34px; }
  .pm-user-meta { display: none; }
  .pm-page { padding: 18px 16px 24px; }
  .pm-page-title { font-size: 20px; gap: 10px; flex-wrap: wrap; }
  .pm-page-title .pm-page-tools { width: 100%; flex-wrap: wrap; gap: 8px; }
  .pm-dash-grid { grid-template-columns: repeat(2, 1fr); }
  .pm-dash-row { grid-template-columns: 1fr; }
  .pm-inbox { grid-template-columns: 1fr; }
  .pm-conv-list, .pm-details { display: none; }
  .pm-thread-h { gap: 8px; padding: 10px 14px; flex-wrap: wrap; }
  .pm-thread-h .pm-th-info { flex: 1; min-width: 0; }
  .pm-thread-h .pm-th-name, .pm-thread-h .pm-th-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-thread-h .pm-th-actions { flex: 0 0 100%; order: 3; overflow-x: auto; padding: 0; }
  .pm-thread-h .pm-th-iconbtn { display: inline-flex !important; flex-shrink: 0; }
  .pm-msgs { padding: 14px 14px 12px; }
  .pm-msg, .pm-msg-call { max-width: 88%; font-size: 13px; }
  .pm-ai-summary { right: 12px; bottom: 12px; width: calc(100% - 24px); max-width: 360px; }
  .pm-table thead th, .pm-table tbody td { padding: 12px 10px; font-size: 12.5px; }
  .pm-task-modal { width: 100%; }
  .pm-kanban { gap: 10px; }
  .pm-col { flex: 0 0 240px; }
}
@media (max-width: 600px) {
  .pm-app { height: 600px; }
  .pm-top .pm-search { display: none; }
  .pm-page-title { font-size: 18px; }
  .pm-dash-grid { grid-template-columns: 1fr; }
}
