/* "Journey" look for the new feature screens (spam protection, Calendly import, payments, WhatsApp,
 * agency): frosted light-grey containers, large-radius white cards nested inside, circular icon buttons
 * and avatars, connected step cards on thin connector lines, a black pill for the active tab / node,
 * light weights and generous whitespace. Scoped to .jx* classes so the existing admin is untouched.
 * The dark theme gets the same shapes on graphite glass. */
:root {
  --jx-shell: linear-gradient(160deg, #f3f4f7 0%, #eceef2 55%, #e7e9ee 100%);
  --jx-shell-line: rgba(255, 255, 255, 0.9);
  --jx-card: #ffffff;
  --jx-card-line: rgba(18, 20, 28, 0.05);
  --jx-ink: #15161a;
  --jx-soft: #74777f;
  --jx-connector: #cfd3db;
  --jx-node: #ffffff;
  --jx-active: #0d0d0f;
  --jx-on-active: #ffffff;
  --jx-shadow: 0 1px 2px rgba(16, 18, 26, 0.04), 0 10px 30px -12px rgba(16, 18, 26, 0.12);
  --jx-radius-shell: 2rem;
  --jx-radius-card: 1.5rem;
}
[data-theme="dark"] {
  --jx-shell: linear-gradient(160deg, rgba(30, 32, 36, 0.72) 0%, rgba(22, 23, 26, 0.72) 100%);
  --jx-shell-line: rgba(255, 255, 255, 0.06);
  --jx-card: #1a1b1e;
  --jx-card-line: rgba(255, 255, 255, 0.06);
  --jx-ink: #f4f5f7;
  --jx-soft: #9aa0aa;
  --jx-connector: #3a3d44;
  --jx-node: #232428;
  --jx-active: #f4f5f7;
  --jx-on-active: #0d0d0f;
  --jx-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 16px 40px -18px rgba(0, 0, 0, 0.6);
}

.jx { position: relative; background: var(--jx-shell); border: 1px solid var(--jx-shell-line); border-radius: var(--jx-radius-shell);
  padding: 1.5rem; color: var(--jx-ink); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.jx > * + * { margin-top: 1rem; }
.jx.jx-tight { padding: 1rem; border-radius: 1.6rem; }
.jx + .jx { margin-top: 1.25rem; }
.jx h1, .jx h2, .jx h3, .jx-title { font-weight: 500; letter-spacing: -0.02em; }
.jx-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.jx .hint, .jx .muted { color: var(--jx-soft); }

.jx-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.jx-head h3 { font-size: 1.05rem; }
.jx-card { background: var(--jx-card); border: 1px solid var(--jx-card-line); border-radius: var(--jx-radius-card); padding: 1.25rem 1.35rem; box-shadow: var(--jx-shadow); }
.jx-card.inset { background: color-mix(in srgb, var(--jx-card) 70%, transparent); box-shadow: none; }
.jx-grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.jx-grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.jx .k { text-transform: none; letter-spacing: 0; margin-bottom: 0.25rem; }
.jx .stat { font-size: 1.9rem; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* Circular icon buttons and avatars */
.jx-icon-btn { width: 2.6rem; height: 2.6rem; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; background: var(--jx-card);
  border: 1px solid var(--jx-card-line); box-shadow: var(--jx-shadow); color: var(--jx-ink); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.jx-icon-btn:hover { transform: translateY(-1px); }
.jx-icon-btn.static { cursor: default; }
.jx-icon-btn.static:hover { transform: none; }
.jx-icon-btn .icon { width: 1.05rem; height: 1.05rem; }
.jx-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.8rem; font-weight: 500;
  background: color-mix(in srgb, var(--jx-brand, #8a8f98) 18%, var(--jx-card)); color: var(--jx-brand, var(--jx-ink)); border: 2px solid var(--jx-card); box-shadow: var(--jx-shadow); }
.jx-avatars { display: inline-flex; }
.jx-avatars .jx-avatar + .jx-avatar { margin-left: -0.55rem; }

/* Pills and tabs */
.jx-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500;
  background: color-mix(in srgb, var(--jx-soft) 14%, transparent); color: var(--jx-ink); white-space: nowrap; }
.jx-pill.ok { background: color-mix(in srgb, #1a7f37 14%, transparent); color: var(--ok); }
.jx-pill.warn { background: color-mix(in srgb, #b7791f 16%, transparent); color: var(--warn); }
.jx-pill.bad { background: color-mix(in srgb, #e0312b 14%, transparent); color: var(--accent-ink); }
.jx-pill.active { background: var(--jx-active); color: var(--jx-on-active); }
.jx-tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; border-radius: 999px; background: color-mix(in srgb, var(--jx-card) 60%, transparent); flex-wrap: wrap; }
.jx-tabs a, .jx-tabs button { border: 0; background: none; font: inherit; font-size: 0.85rem; color: var(--jx-soft); padding: 0.45rem 1rem; border-radius: 999px; text-decoration: none; cursor: pointer; }
.jx-tabs a:hover { color: var(--jx-ink); }
.jx-tabs [aria-current="page"], .jx-tabs .active { background: var(--jx-active); color: var(--jx-on-active); }

/* Connected steps: nodes on a thin line, the active one is a black pill */
.jx-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.75rem; }
.jx-step { position: relative; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1rem; border-radius: 1.1rem; background: var(--jx-card);
  border: 1px solid var(--jx-card-line); box-shadow: var(--jx-shadow); min-width: 0; }
.jx-step + .jx-step::before { content: ''; position: absolute; left: -0.78rem; top: 50%; width: 0.78rem; border-top: 1px solid var(--jx-connector); }
.jx-step + .jx-step::after { content: ''; position: absolute; left: -0.2rem; top: calc(50% - 0.17rem); width: 0.34rem; height: 0.34rem; border-radius: 50%; background: var(--jx-connector); }
.jx-node { width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--jx-connector); background: var(--jx-node); margin-bottom: 0.35rem; }
.jx-node .icon { width: 0.75rem; height: 0.75rem; }
.jx-step.done .jx-node { border-color: transparent; background: color-mix(in srgb, var(--jx-ink) 8%, var(--jx-node)); }
.jx-step-t { font-size: 0.85rem; font-weight: 500; }
.jx-step-s { font-size: 0.75rem; color: var(--jx-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-step.active { background: var(--jx-active); color: var(--jx-on-active); border-color: transparent; }
.jx-step.active .jx-step-s { color: color-mix(in srgb, var(--jx-on-active) 70%, transparent); }
.jx-step.active .jx-node { background: transparent; border-color: color-mix(in srgb, var(--jx-on-active) 50%, transparent); }
@media (max-width: 640px) {
  .jx { padding: 1rem; border-radius: 1.5rem; }
  .jx-flow { grid-auto-flow: row; }
  .jx-step + .jx-step::before { left: 1.6rem; top: -0.78rem; width: 0; height: 0.78rem; border-top: 0; border-left: 1px solid var(--jx-connector); }
  .jx-step + .jx-step::after { left: calc(1.6rem - 0.17rem); top: -0.2rem; }
}

/* Lists of rows inside cards (accounts, messages, links) */
.jx-list { list-style: none; margin: 0; padding: 0; }
.jx-list > li { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0; }
.jx-list > li + li { border-top: 1px solid var(--jx-card-line); }
.jx table th { font-weight: 500; color: var(--jx-soft); }
.price-chip { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--jx-active); color: var(--jx-on-active); font-size: 0.8rem; font-weight: 500; }
.jx-list > li > .grow { flex: 1; min-width: 0; }
.jx-list > li > .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.jx-list .jx-avatar .icon, .jx-list .jx-icon-btn .icon { width: 1rem; height: 1rem; }
.jx-avatar.sm { width: 1.35rem; height: 1.35rem; font-size: 0.6rem; border-width: 1px; box-shadow: none; vertical-align: middle; }
.jx-metrics { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 0.75rem; }
.jx-metrics > div { min-width: 0; }
.jx-metric { font-size: 1.3rem; font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
