/* =============================================================================
   Grow Theory — Product mockup kit  (prefix: .pm-)
   -----------------------------------------------------------------------------
   A light product surface, rendered in HTML so it stays crisp, responsive and
   free of the sandbox test data in the raw screenshots. Structure and sizing
   follow the real app: 240px sidebar, 52px topbar, 36px controls, 22px badges,
   14px card radius, provider-lane scheduler.

   Everything is scoped under .pm so it can never leak into the marketing page.
   ========================================================================== */

.pm {
  --pm-ink:     #0b0d12;
  --pm-body:    #55575c;
  --pm-muted:   #777b86;
  --pm-faint:   #9a9da5;
  --pm-line:    #e6e8ee;
  --pm-line-2:  #eef0f4;
  --pm-panel:   #f7f8fa;
  --pm-paper:   #ffffff;
  --pm-azure:   #3d62d6;
  --pm-azure-w: #e8eefc;
  --pm-iris:    #7b6cff;
  --pm-iris-w:  #eeecff;
  --pm-ok:      #1f8a5f;
  --pm-ok-w:    #e3f4ec;
  --pm-warn:    #a2650c;
  --pm-warn-w:  #fdf1dc;
  --pm-risk:    #b3365c;
  --pm-risk-w:  #fce8ef;

  font-family: var(--f-body);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--pm-ink);
  container-type: inline-size;
}

.pm * { min-width: 0; }

/* ------------------------------------------------------------- Primitives */
.pm-row   { display: flex; align-items: center; gap: 8px; }
.pm-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-col   { display: flex; flex-direction: column; gap: 8px; }
.pm-grow  { flex: 1; min-width: 0; }
.pm-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pm-eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pm-muted);
}
.pm-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--pm-ink); }
.pm-sub   { font-size: 11px; color: var(--pm-muted); }
.pm-num   { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.pm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--pm-azure-w);
  color: var(--pm-azure);
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pm-badge-azure { background: var(--pm-azure-w); color: var(--pm-azure); }
.pm-badge-ok    { background: var(--pm-ok-w);    color: var(--pm-ok); }
.pm-badge-warn  { background: var(--pm-warn-w);  color: var(--pm-warn); }
.pm-badge-risk  { background: var(--pm-risk-w);  color: var(--pm-risk); }
.pm-badge-iris  { background: var(--pm-iris-w);  color: var(--pm-iris); }
.pm-badge-grey  { background: var(--pm-panel);   color: var(--pm-muted); }

.pm-dot { width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; }

.pm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 11px;
  border-radius: 7px;
  background: var(--pm-azure);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pm-btn-quiet { background: var(--pm-paper); color: var(--pm-body); border: 1px solid var(--pm-line); }
.pm-btn-brand { background: linear-gradient(135deg, #a78bfa, #7e9bff); color: #fff; }

.pm-input {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--pm-line);
  border-radius: 7px;
  background: var(--pm-paper);
  color: var(--pm-faint);
  font-size: 10.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-card {
  background: var(--pm-paper);
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  padding: 12px;
}

.pm-bar { height: 6px; border-radius: 3px; background: var(--pm-line-2); overflow: hidden; }
.pm-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--pm-azure); }

/* ------------------------------------------------------------ App shell -- */
.pm-shell { display: grid; grid-template-columns: 150px 1fr; gap: 0; height: 100%; }
.pm-aside {
  border-right: 1px solid var(--pm-line);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--pm-panel);
}
.pm-navitem {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--pm-body);
}
.pm-navitem.is-on { background: var(--pm-azure); color: #fff; }
.pm-navitem i { width: 5px; height: 5px; border-radius: 999px; background: currentColor; opacity: 0.55; flex-shrink: 0; }
.pm-navitem.is-on i { opacity: 1; }
.pm-main { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }

@container (max-width: 520px) {
  .pm-shell { grid-template-columns: 1fr; }
  .pm-aside { display: none; }
}

/* ------------------------------------------------------------- KPI tiles -- */
.pm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pm-kpi {
  background: var(--pm-paper);
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  padding: 10px;
}
.pm-kpi .pm-eyebrow { margin-bottom: 6px; }
.pm-kpi .pm-num { font-size: 20px; }
.pm-kpi-foot { margin-top: 6px; font-size: 9px; color: var(--pm-faint); }

@container (max-width: 640px) { .pm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- Sparkline */
.pm-spark { width: 100%; height: 26px; display: block; }

/* ------------------------------------------------------------ List rows -- */
.pm-list { display: flex; flex-direction: column; }
.pm-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--pm-line-2);
}
.pm-item:last-child { border-bottom: 0; }
.pm-item-time { font-size: 10.5px; font-weight: 600; color: var(--pm-ink); width: 42px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pm-item-name { font-size: 11.5px; font-weight: 500; color: var(--pm-ink); }
.pm-item-meta { font-size: 10px; color: var(--pm-muted); }

/* --------------------------------------------------------------- Funnel -- */
.pm-funnel { display: grid; gap: 7px; }
.pm-funnel-row { display: grid; grid-template-columns: 62px 1fr 26px; align-items: center; gap: 8px; }
.pm-funnel-row span { font-size: 10px; color: var(--pm-body); }
.pm-funnel-row b { font-size: 10px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- Inbox UI -- */
.pm-thread { display: flex; flex-direction: column; gap: 8px; }
.pm-msg { max-width: 82%; padding: 8px 11px; border-radius: 12px; font-size: 11px; line-height: 1.45; }
.pm-msg-in  { align-self: flex-start; background: var(--pm-panel); color: var(--pm-ink); border-bottom-left-radius: 4px; }
.pm-msg-out { align-self: flex-end;   background: var(--pm-azure);  color: #fff;        border-bottom-right-radius: 4px; }
.pm-msg-stamp { font-size: 9px; color: var(--pm-faint); margin-top: 3px; }
.pm-msg-wrap { display: flex; flex-direction: column; }
.pm-msg-wrap.is-out { align-items: flex-end; }

.pm-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pm-line);
  border-radius: 9px;
  padding: 7px 9px;
  background: var(--pm-paper);
  color: var(--pm-faint);
  font-size: 10.5px;
}

.pm-nudge {
  display: flex;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--pm-warn-w);
  border: 1px solid #f2dcb4;
  font-size: 10.5px;
  color: #6b4a10;
  line-height: 1.45;
}

/* ------------------------------------------------------------- Kanban ---- */
.pm-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pm-colhead { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.pm-colhead span { font-size: 10px; font-weight: 600; color: var(--pm-ink); }
.pm-colhead b { font-size: 9.5px; color: var(--pm-muted); font-weight: 500; }
.pm-lead {
  background: var(--pm-paper);
  border: 1px solid var(--pm-line);
  border-radius: 9px;
  padding: 9px;
  display: grid;
  gap: 6px;
}
.pm-lead + .pm-lead { margin-top: 7px; }
.pm-lead-name { font-size: 11px; font-weight: 600; color: var(--pm-ink); }
.pm-lead-meta { font-size: 9.5px; color: var(--pm-muted); }

@container (max-width: 560px) { .pm-board { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Scheduler -- */
.pm-cal { display: grid; grid-template-columns: 38px repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--pm-line-2); border: 1px solid var(--pm-line); border-radius: 9px; overflow: hidden; }
.pm-cal > * { background: var(--pm-paper); padding: 5px 6px; min-height: 26px; }
.pm-cal-head { font-size: 9.5px; font-weight: 600; color: var(--pm-ink); text-align: center; background: var(--pm-panel); }
.pm-cal-time { font-size: 9px; color: var(--pm-faint); text-align: right; font-variant-numeric: tabular-nums; }
.pm-ev {
  border-radius: 5px;
  padding: 3px 5px;
  font-size: 9px;
  line-height: 1.3;
  font-weight: 500;
  border-left: 2px solid;
}
.pm-ev-azure { background: var(--pm-azure-w); color: #1e3f8f; border-color: var(--pm-azure); }
.pm-ev-ok    { background: var(--pm-ok-w);    color: #14603f; border-color: var(--pm-ok); }
.pm-ev-warn  { background: var(--pm-warn-w);  color: #6b4a10; border-color: #d8a33a; }
.pm-ev-iris  { background: var(--pm-iris-w);  color: #4c3fb0; border-color: var(--pm-iris); }

@container (max-width: 560px) { .pm-cal { grid-template-columns: 34px repeat(2, minmax(0, 1fr)); } .pm-cal-hide { display: none; } }

/* ------------------------------------------------------------- Waitlist -- */
.pm-wl { display: grid; gap: 7px; }
.pm-wl-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--pm-line);
  border-radius: 9px;
  background: var(--pm-paper);
}
.pm-wl-row.is-top { border-color: var(--pm-azure); background: #fbfcff; }
.pm-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 2px solid var(--pm-azure);
  color: var(--pm-azure);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pm-score-dim { border-color: var(--pm-line); color: var(--pm-faint); }

/* ----------------------------------------------------------- Flow table -- */
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table th {
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm-muted);
  padding: 0 6px 6px 0;
  border-bottom: 1px solid var(--pm-line);
}
.pm-table td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--pm-line-2); font-size: 10.5px; color: var(--pm-body); }
.pm-table td:first-child { color: var(--pm-ink); font-weight: 500; }
.pm-table tr:last-child td { border-bottom: 0; }

/* -------------------------------------------------------------- Chart ---- */
.pm-chart { display: flex; align-items: flex-end; gap: 4px; height: 58px; }
.pm-chart > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; }
.pm-chart i { display: block; border-radius: 1px; }

/* -------------------------------------------------------- Template card -- */
.pm-tpl { display: grid; gap: 6px; padding: 9px; border: 1px solid var(--pm-line); border-radius: 9px; background: var(--pm-paper); }
.pm-tpl-body { font-size: 10px; color: var(--pm-muted); line-height: 1.45; }
.pm-tpl-body mark { background: var(--pm-iris-w); color: var(--pm-iris); padding: 0 3px; border-radius: 3px; }

/* --------------------------------------------------------------- Ada ----- */
.pm-ada {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #faf7ff, #f6f8ff);
  border: 1px solid #e7defd;
}
.pm-ada-mark {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #a78bfa, #7e9bff);
  flex-shrink: 0;
}
.pm-ada p { font-size: 10.5px; color: #3b3560; line-height: 1.45; }
.pm-ada b { display: block; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pm-iris); margin-bottom: 3px; }

/* ------------------------------------------------------- Mock layouts --- */
/* Container-query driven, so a mock reflows to its frame, not the viewport. */
.pm-2col { display: grid; grid-template-columns: 1fr; gap: 12px; }
@container (min-width: 620px) { .pm-2col { grid-template-columns: 1.25fr 1fr; } }

.pm-2col-even { display: grid; grid-template-columns: 1fr; gap: 12px; }
@container (min-width: 560px) { .pm-2col-even { grid-template-columns: 1fr 1fr; } }
