/* Quickstart guided workflow -- step bar (on each page) and hub (Quickstart popup).
   Self-contained: works on the main app pages (assets/style.css), the Cropper
   (crop/style.css) and the Invoice page, in dark and light themes. */
.jr-bar {
  --jr-accent: var(--accent, #4da3ff);
  --jr-panel: var(--panel, #17212b);
  --jr-alt: var(--panel-alt, #1e2a37);
  --jr-border: var(--border, var(--line, #2a3b4a));
  --jr-text: var(--text, #e6edf3);
  --jr-muted: var(--muted, #93a4b3);
  max-width: 1200px; margin: 12px auto 0; padding: 10px 14px; box-sizing: border-box;
  background: var(--jr-panel); border: 1px solid var(--jr-border); border-left: 4px solid var(--jr-accent);
  border-radius: 10px; color: var(--jr-text); font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.jr-bar *, .jr-bar *::before, .jr-bar *::after { box-sizing: border-box; }
.jr-bar [hidden] { display: none !important; }
.jr-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.jr-label { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.jr-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex: 1 1 auto; flex-wrap: wrap; }
.jr-step a {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px;
  border: 1px solid transparent; color: var(--jr-muted); text-decoration: none; font-size: 0.8rem;
}
.jr-step a:hover { border-color: var(--jr-border); color: var(--jr-text); }
.jr-step.part-start { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--jr-border); }
.jr-num {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%; font-size: 0.75rem; font-weight: 700;
  background: var(--jr-alt); border: 1px solid var(--jr-border); color: var(--jr-muted);
}
.jr-step.done .jr-num, .jr-row.done .jr-num { background: #22c55e; border-color: #22c55e; color: #fff; }
.jr-step.here a { background: var(--jr-alt); border-color: var(--jr-accent); color: var(--jr-text); font-weight: 600; }
.jr-step.here .jr-num { background: var(--jr-accent); border-color: var(--jr-accent); color: #fff; }
.jr-tools { display: inline-flex; gap: 6px; margin-left: auto; }
.jr-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--jr-border); }
.jr-body h2 { margin: 0 0 4px; font-size: 1rem; }
.jr-body p { margin: 0 0 10px; color: var(--jr-text); max-width: 80ch; }
.jr-tick { color: #22c55e; font-size: 0.85rem; font-weight: 600; margin-left: 6px; }
.jr-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.jr-bar a.btn, .jr-bar button.btn-secondary {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  line-height: 1.3; text-decoration: none; cursor: pointer; font-family: inherit;
  background: var(--jr-accent); color: #fff; border: 1px solid var(--jr-accent);
}
.jr-bar a.btn.btn-secondary, .jr-bar button.btn-secondary {
  background: var(--jr-alt); color: var(--jr-text); border: 1px solid var(--jr-border);
}
.jr-bar a.btn:hover, .jr-bar button.btn-secondary:hover { border-color: var(--jr-accent); }
@media (max-width: 760px) {
  .jr-name { display: none; }
  .jr-step.here .jr-name { display: inline; }
  .jr-step a { padding-right: 4px; }
  .jr-step.here a { padding-right: 10px; }
  .jr-label { white-space: normal; }
}

/* Hub (Quickstart popup) */
.jr-hub-head { margin: 0 0 12px; }
.jr-progress { height: 10px; border-radius: 999px; background: var(--panel-alt, #1e2a37); border: 1px solid var(--border, #2a3b4a); overflow: hidden; }
.jr-progress span { display: block; height: 100%; background: #22c55e; border-radius: 999px; transition: width .3s; }
.jr-hub-count { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted, #93a4b3); }
.jr-continue { display: block; text-align: center; margin: 0 0 6px; padding: 12px 16px; font-size: 1rem; }
.jr-alldone { margin: 0 0 6px; padding: 10px 12px; border-radius: 8px; background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); }
.jr-part-title { margin: 18px 0 8px; font-size: 0.95rem; }
.jr-hub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jr-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  background: var(--panel-alt, #1e2a37); border: 1px solid var(--border, #2a3b4a);
}
.jr-row.current { border-color: var(--accent, #4da3ff); box-shadow: 0 0 0 1px var(--accent, #4da3ff) inset; }
.jr-row .jr-num { width: 28px; height: 28px; font-size: 0.85rem; background: var(--panel, #17212b); border: 1px solid var(--border, #2a3b4a); color: var(--muted, #93a4b3); }
.jr-row.done .jr-num { color: #fff; }
.jr-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jr-row-text span { font-size: 0.82rem; color: var(--muted, #93a4b3); }
.jr-row-go { flex: 0 0 auto; display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) {
  .jr-row { flex-wrap: wrap; }
  .jr-row-go { width: 100%; justify-content: flex-start; padding-left: 40px; }
}
@media print { .jr-bar { display: none !important; } }
