:root {
  --jl-accent: #1e3a8a;
  --jl-accent-strong: #1a3180;
  --jl-accent-soft: #e1e8ff;
  --jl-bg: #f6f7fb;
  --jl-card: #ffffff;
  --jl-ink: #0f1f4a;
  --jl-muted: #516089;
  --jl-border: #d8e2ff;
  --jl-header-h: 64px;
}

html, body {
  height: 100%;
}

body.jl-body {
  margin: 0;
  padding: 0;
  --ft-header-h: var(--jl-header-h);
}

body {
  font-family: "Inter", sans-serif;
  background: var(--jl-bg);
  color: var(--jl-ink);
}

body:has(.jl-app) {
  background: var(--jl-bg) !important;
  background-image: none !important;
}

.jl-app {
  min-height: 100vh;
  background: var(--jl-bg) !important;
}

.jl-app,
.jl-shell,
.jl-main,
.jl-rail {
  background-image: none !important;
}

.jl-app * {
  scroll-margin-top: calc(var(--jl-header-h) + 8px);
}

.jl-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1020;
  background: #0f1f4a;
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 31, 74, 0.25);
  height: var(--jl-header-h);
}

.jl-header .jl-title {
  font-family: "Cal Sans", sans-serif;
  font-size: 1rem;
}

.jl-header .jl-subtitle {
  font-size: 0.78rem;
  opacity: 0.65;
}

.jl-shell {
  min-height: calc(100vh - var(--jl-header-h));
  display: grid;
  grid-template-columns: 260px 1fr 72px;
  gap: 0;
  margin-top: var(--jl-header-h);
}

.jl-rail {
  background: #f1f4ff;
  border-right: 1px solid var(--jl-border);
  padding: 12px 12px;
  position: sticky;
  top: var(--jl-header-h);
  height: calc(100vh - var(--jl-header-h));
}

.jl-rail .nav-link {
  color: var(--jl-ink);
  border-radius: 10px;
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  padding: 10px 12px;
}

.jl-rail .nav-link.active,
.jl-rail .nav-link:hover {
  background: var(--jl-accent-soft);
  color: var(--jl-accent);
}

.jl-main {
  padding: 32px 36px 48px;
  background: var(--jl-bg);
}

.jl-main h1,
.jl-main h2 {
  margin-top: 0;
}

.jl-main .py-4 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.jl-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid var(--jl-border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 4px 6px;
  z-index: 1025;
}

.jl-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--jl-muted);
  text-decoration: none;
  background: transparent;
  border: none;
}

.jl-bottom-item.active {
  color: var(--jl-accent);
}

.jl-bottom-item i {
  font-size: 1rem;
}

.jl-bottom-switcher {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(15, 76, 129, 0.08);
}

.jl-bottom-switcher a {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #3f4c73;
  text-decoration: none;
}

.jl-bottom-switcher a.active {
  background: #e6f0f8;
  color: #0f4c81;
  box-shadow: inset 0 0 0 1px rgba(15, 76, 129, 0.2);
}

.jl-card {
  background: var(--jl-card);
  border: 1px solid var(--jl-border);
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(30, 58, 138, 0.08);
}

.jl-btn-primary {
  background: var(--jl-accent);
  border-color: var(--jl-accent);
  color: #fff;
}

.jl-btn-primary:hover {
  background: var(--jl-accent-strong);
  border-color: var(--jl-accent-strong);
  color: #fff;
}

.jl-btn-secondary {
  background: #ffffff;
  border-color: #c8d6ff;
  color: var(--jl-ink);
}

.jl-btn-secondary:hover {
  background: #eef3ff;
  border-color: #bcd0ff;
  color: var(--jl-ink);
}

.jl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #edf2ff;
  color: var(--jl-ink);
}

.jl-chip--success {
  background: #d6f5e7;
  color: #16764b;
}

.jl-chip--warning {
  background: #ffe8b6;
  color: #8a5b00;
}

.jl-chip--neutral {
  background: #e8ecf7;
  color: #3b4563;
}

.jl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jl-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--jl-border);
  text-decoration: none;
  color: var(--jl-ink);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.06);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.jl-list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(30, 58, 138, 0.12);
  border-color: #bcd0ff;
  color: var(--jl-ink);
}

.jl-list-item .jl-meta {
  color: var(--jl-muted);
  font-size: 0.85rem;
}

.jl-list-item .jl-chevron {
  color: #7a8ab4;
}

.jl-kpi-card {
  border: 1px solid var(--jl-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(30, 58, 138, 0.08);
  padding: 14px;
  text-decoration: none;
  color: var(--jl-ink);
  display: block;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.jl-kpi-card:hover {
  transform: translateY(-1px);
  border-color: #bcd0ff;
  box-shadow: 0 12px 26px rgba(30, 58, 138, 0.14);
  color: var(--jl-ink);
}

@media (max-width: 768px) {
  .jl-shell {
    grid-template-columns: 1fr;
  }

  .jl-rail {
    display: none;
  }

  .jl-mode-rail {
    display: none;
  }

  .jl-main {
    padding-bottom: 88px;
  }
}

.jl-mode-rail {
  background: #ffffff;
  border-left: none;
  height: calc(100vh - var(--jl-header-h));
  position: sticky;
  top: var(--jl-header-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 8px;
  width: 72px;
}

.mode-rail-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8aa0c7;
  padding: 6px 4px 2px;
}

.mode-rail-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 0;
  text-decoration: none;
  color: #1f2d2b;
  font-weight: 600;
  width: 72px;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.mode-rail-text {
  font-size: 0.62rem;
  color: #6c7aa6;
  line-height: 1.1;
  text-align: center;
}

.mode-rail-link.active {
  background: #dfe9ff;
}

.mode-rail-link:hover {
  background: #f1f5fb;
  color: #0f4c81;
}

.jl-header-divider {
  height: 28px;
  width: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.jl-header-context,
.jl-header-link {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
}

.jl-header-link {
  text-decoration: none;
  font-weight: 600;
}

.jl-header-link:hover { color: #ffffff; }

.jl-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  margin-bottom: 28px;
  border: 1px solid var(--jl-border);
  border-radius: 14px;
  border-bottom: 4px solid var(--jl-accent);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.08);
}

.jl-page-heading--compact { padding: 24px 30px; }

.jl-page-heading h1 {
  color: var(--jl-ink);
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.08;
  margin: 4px 0 8px;
}

.jl-page-heading p { color: var(--jl-muted); max-width: 740px; margin: 0; }
.jl-heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.jl-eyebrow { display: block; color: #315fa5; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.jl-rail-plan {
  margin: 18px 4px 0;
  padding: 16px;
  border: 1px solid #cbd9f2;
  border-radius: 10px;
  background: #f8faff;
}
.jl-rail-plan strong { display: block; color: var(--jl-ink); margin: 2px 0 8px; }
.jl-rail-plan a { color: #315fa5; font-size: 0.8rem; font-weight: 700; text-decoration: none; }

.jl-form-card {
  padding: 24px;
  border: 1px solid var(--jl-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.07);
}

.jl-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.jl-field--wide { grid-column: 1 / -1; }
.jl-field label { display: block; color: var(--jl-ink); font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; }
.jl-field input,
.jl-field select,
.jl-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--jl-ink);
  border: 1px solid #bfcdea;
  border-radius: 8px;
  background: #fff;
}
.jl-field textarea { min-height: 116px; resize: vertical; }
.jl-field .form-control,
.jl-field .form-select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b7c7e6;
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--jl-ink);
  box-shadow: inset 0 1px 2px rgba(15, 31, 74, 0.04);
}
.jl-field input:focus,
.jl-field select:focus,
.jl-field textarea:focus { outline: 3px solid rgba(30, 58, 138, 0.14); border-color: var(--jl-accent); }
.jl-help { color: var(--jl-muted); font-size: 0.78rem; margin: 5px 0 0; }
.jl-error { color: #ba1a1a; font-size: 0.8rem; margin: 5px 0 0; }
.jl-card--section { border-top: 3px solid #315fa5; }
.jl-card--section > .card-body { padding: 24px !important; }
.jl-card--section > .card-body > h2 { margin: 0 0 18px; }
.jl-source-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; margin: 14px 0 18px; border: 1px solid #cde1f7; border-radius: 8px; background: #f1f7fe; color: #385272; font-size: 0.86rem; }
.jl-source-note i { color: #1d67b2; }
.jl-source-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.jl-source-details > div { padding: 12px; border: 1px solid #d8e6f5; border-radius: 8px; background: #fbfdff; }
.jl-source-details dt { color: var(--jl-muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.jl-source-details dd { margin: 4px 0 0; color: var(--jl-ink); font-weight: 700; font-size: 0.9rem; overflow-wrap: anywhere; }
.jl-form--plan { padding-top: 20px; margin-top: 20px; border-top: 1px solid #dce6f5; }
.jl-next-step { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border: 1px solid #cbd9f2; border-radius: 12px; background: #ffffff; box-shadow: 0 6px 16px rgba(30, 58, 138, 0.08); }
.jl-next-step__icon { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 50%; background: #e1e8ff; color: var(--jl-accent); font-size: 1.3rem; }
.jl-next-step h2 { font-size: 1.05rem; margin: 2px 0 4px; }
.jl-next-step p { color: var(--jl-muted); font-size: 0.87rem; margin: 0; }
.jl-next-step .btn { margin-left: auto; white-space: nowrap; }
.jl-chip--source { background: #e1e8ff; color: var(--jl-accent); }
.jl-empty-state { display: flex; gap: 14px; align-items: center; padding: 22px; color: var(--jl-muted); border: 1px dashed #b9cce8; border-radius: 12px; background: #ffffff; }
.jl-empty-state i { color: var(--jl-accent); font-size: 1.6rem; }
.jl-empty-state strong { display: block; color: var(--jl-ink); margin-bottom: 3px; }

.jl-connection-steps { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--jl-border); border-radius: 12px; background: #fff; }
.jl-connection-steps > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 18px; border-right: 1px solid var(--jl-border); }
.jl-connection-steps > div:last-child { border-right: 0; }
.jl-connection-steps i { grid-row: span 2; color: var(--jl-accent); font-size: 1.35rem; }
.jl-connection-steps strong { color: var(--jl-ink); }
.jl-connection-steps span { color: var(--jl-muted); font-size: 0.82rem; margin-top: 3px; }

.jl-about { max-width: 1200px; margin: 0 auto; }
.jl-public-about { padding: 32px 0 56px; }
/* The public feature page uses the public header and must keep its footer in normal flow. */
body.jl-public-product-page { display: block !important; min-height: 100%; }
body.jl-public-product-page > main { display: block; min-height: 0; overflow: visible; }
body.jl-public-product-page > footer { clear: both; position: static !important; inset: auto !important; margin: 0 !important; transform: none !important; z-index: auto !important; }
.jl-about-hero { margin-bottom: 32px; }
.jl-about-hero h1 { max-width: 760px; }
.jl-about-hero p { max-width: 760px; font-size: 1.02rem; line-height: 1.65; }
.jl-about-card > .card-body { padding: 28px !important; }
.jl-about-card i { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: var(--jl-accent-soft); color: var(--jl-accent); font-size: 1.25rem; }
.jl-about-card h2 { margin: 20px 0 10px; color: var(--jl-ink); font-size: 1.15rem; }
.jl-about-card p { color: var(--jl-muted); line-height: 1.55; margin: 0; }
.jl-about-flow { margin-top: 48px; max-width: 820px; }
.jl-about-flow h2 { margin: 6px 0 24px; font-size: clamp(1.45rem, 2vw, 1.8rem); }
.jl-about-steps { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.jl-about-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border: 1px solid var(--jl-border); border-radius: 12px; background: #ffffff; }
.jl-about-steps li > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--jl-accent-soft); color: var(--jl-accent); font-size: 0.85rem; font-weight: 800; }
.jl-about-steps strong { display: block; color: var(--jl-ink); margin: 2px 0 4px; }
.jl-about-steps p { color: var(--jl-muted); margin: 0; line-height: 1.45; }
.jl-about-privacy { display: flex; gap: 9px; align-items: flex-start; margin: 24px 0 0; color: var(--jl-muted); font-size: 0.9rem; line-height: 1.5; }
.jl-about-privacy i { color: var(--jl-accent); }

@media (max-width: 768px) {
  .jl-mode-rail {
    display: none !important;
  }

  .jl-header-context, .jl-header-divider { display: none; }
  .jl-main { padding: 20px 16px 88px; }
  .jl-public-about { padding: 24px 0 32px; }
  .jl-page-heading, .jl-page-heading--compact { align-items: flex-start; flex-direction: column; padding: 20px; margin-bottom: 20px; }
  .jl-heading-actions { width: 100%; }
  .jl-heading-actions .btn { flex: 1; }
  .jl-form-card, .jl-card--section > .card-body { padding: 18px !important; }
  .jl-form-grid, .jl-connection-steps { grid-template-columns: 1fr; }
  .jl-source-details { grid-template-columns: 1fr; }
  .jl-next-step { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
  .jl-next-step .btn { margin-left: 60px; }
  .jl-connection-steps > div { border-right: 0; border-bottom: 1px solid var(--jl-border); }
  .jl-connection-steps > div:last-child { border-bottom: 0; }
  .jl-about-hero { margin-bottom: 24px; }
  .jl-about-card > .card-body { padding: 22px !important; }
  .jl-about-flow { margin-top: 32px; }
  .jl-about-steps li { padding: 16px; }
}
