/* ═══════════════════════════════════════════════════════
   Onboarding Journey + Profile Meter Styles
   Spec: docs/superpowers/specs/2026-04-11-onboarding-journey-and-profile-meter-design.md
   ═══════════════════════════════════════════════════════ */

/* ─── Journey pitch card ─── */
.journey-card {
  position: relative;
  margin: 12px 0;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-50, #e0f2fe), var(--gray-50, #f9fafb));
  border: 1px solid var(--primary-200, #bae6fd);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.journey-pitch h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.journey-pitch-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.journey-pitch-promise {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  font-style: italic;
}
.journey-start-btn {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.journey-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.journey-dismiss:hover {
  background: var(--gray-100);
}

/* ─── Journey resume chip ─── */
.journey-resume-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 8px 0;
  background: var(--primary-50, #e0f2fe);
  border: 1px solid var(--primary-200, #bae6fd);
  border-radius: 10px;
  font-size: 0.85rem;
}
.journey-resume-label { flex: 1; color: var(--text-secondary); }
.journey-dismiss-chip {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}

/* ─── Journey modals ─── */
.journey-modal {
  padding: 20px;
  border-radius: 14px;
}
.journey-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.journey-modal-body { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 18px; }
.journey-modal-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 10px 0;
}
.journey-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.journey-modal-actions .btn {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ─── PDF iframe ─── */
.journey-pdf-frame {
  width: 100%;
  height: 360px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.journey-pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Profit reveal ─── */
.journey-profit-reveal {
  text-align: center;
  padding: 28px 20px;
}
.journey-profit-icon .material-symbols-rounded {
  font-size: 3rem;
  color: var(--success);
}
.journey-profit-reveal h2 {
  font-size: 1.25rem;
  margin: 8px 0 18px;
}
.journey-profit-math {
  background: var(--gray-50);
  padding: 14px 18px;
  border-radius: 10px;
  text-align: left;
  margin: 0 auto 16px;
  max-width: 320px;
}
.journey-profit-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.journey-profit-row.net {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.journey-profit-row .positive { color: var(--text-primary); }
.journey-profit-row .negative { color: var(--danger); }
.journey-profit-row .net-amount { color: var(--success); font-size: 1.1rem; }
.journey-profit-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 8px 0;
}
.journey-profit-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* ─── Journey pre-fill banner + tooltips (inside quotation wizard) ─── */
.journey-prefilled-banner {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.journey-tooltip {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--gray-50);
  padding: 6px 10px;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  margin-top: 4px;
}

/* ─── Journey expense suggestions (inside finance modal) ─── */
.journey-expense-header {
  background: linear-gradient(135deg, rgba(14,165,233,0.08), rgba(245,158,11,0.05));
  border: 1px solid rgba(14,165,233,0.22);
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.journey-expense-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.journey-expense-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 6px;
  line-height: 1.4;
}
.journey-expense-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}
.journey-expense-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 6px;
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.journey-expense-chips::-webkit-scrollbar {
  height: 4px;
}
.journey-expense-chips::-webkit-scrollbar-track {
  background: transparent;
}
.journey-expense-chips::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.35);
  border-radius: 2px;
}
.journey-expense-chips .chip {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.38);
  color: #b45309;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  scroll-snap-align: start;
}
.journey-expense-chips .chip::before {
  content: '+';
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.55;
  line-height: 1;
}
.journey-expense-chips .chip:hover {
  background: rgba(245,158,11,0.22);
  border-color: rgba(245,158,11,0.6);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(245,158,11,0.2);
}

/* Dark mode overrides for journey-expense-header + chips */
body.dark-mode .journey-expense-header {
  background: linear-gradient(135deg, rgba(14,165,233,0.12), rgba(245,158,11,0.06));
  border-color: rgba(14,165,233,0.32);
}
body.dark-mode .journey-expense-chips .chip {
  background: rgba(245,158,11,0.16);
  border-color: rgba(245,158,11,0.42);
  color: #fcd34d;
}
body.dark-mode .journey-expense-chips .chip:hover {
  background: rgba(245,158,11,0.28);
  border-color: rgba(245,158,11,0.68);
}

/* ─── Journey prefilled banner (quotation wizard) — dark mode ─── */
body.dark-mode .journey-prefilled-banner {
  background: rgba(252,211,77,0.12);
  border-color: rgba(252,211,77,0.35);
  color: #fcd34d;
}
body.dark-mode .journey-tooltip {
  background: rgba(148,163,184,0.12);
  color: #cbd5e1;
  border-left-color: var(--primary);
}
/* Empty-state banners (client + package) use inline styles with low-alpha
   gradients that render correctly in both modes — no dark override needed. */

/* ═══════════════════════════════════════════════════════
   Profile Meter Styles
   Warm amber/primary theming — deliberately softer than the rest of the
   dashboard so "incomplete setup" feels encouraging, not alarming.
   Uses transparent tints that work in both light and dark modes.
   ═══════════════════════════════════════════════════════ */

.meter-card {
  position: relative;
  margin: 10px 0 14px;
  padding: 16px 18px 18px;
  background:
    linear-gradient(135deg, rgba(14,165,233,0.04), rgba(245,158,11,0.03));
  border: 1px solid rgba(14,165,233,0.18);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.meter-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.meter-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.meter-percent {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.meter-bar {
  position: relative;
  height: 8px;
  background: rgba(148,163,184,0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}
.meter-bar-fill {
  height: 100%;
  min-width: 6px;
  background: linear-gradient(90deg, #f59e0b, var(--primary));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.4,1.6,.5,1);
  box-shadow: 0 0 8px rgba(14,165,233,0.35);
}
.meter-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.meter-pending-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 4px 0 8px;
}
.meter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 6px;
  /* Subtle fade on right edge to hint at scrollability */
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.meter-chips::-webkit-scrollbar {
  height: 4px;
}
.meter-chips::-webkit-scrollbar-track {
  background: transparent;
}
.meter-chips::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.35);
  border-radius: 2px;
}
.meter-chip {
  min-height: 34px;
  padding: 6px 14px;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #b45309;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  scroll-snap-align: start;
}
.meter-chip::before {
  content: '+';
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.55;
  line-height: 1;
}
.meter-chip:hover {
  background: rgba(245,158,11,0.18);
  border-color: rgba(245,158,11,0.6);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(245,158,11,0.18);
}
.meter-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.meter-dismiss:hover {
  opacity: 1;
  background: rgba(0,0,0,0.05);
}

/* Dark mode overrides — muted amber text needs lighter shade on dark bg */
body.dark-mode .meter-card {
  background:
    linear-gradient(135deg, rgba(14,165,233,0.08), rgba(245,158,11,0.05));
  border-color: rgba(14,165,233,0.28);
}
body.dark-mode .meter-chip {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.4);
  color: #fcd34d;
}
body.dark-mode .meter-chip:hover {
  background: rgba(245,158,11,0.25);
  border-color: rgba(245,158,11,0.65);
}
body.dark-mode .meter-bar {
  background: rgba(148,163,184,0.15);
}
body.dark-mode .meter-dismiss:hover {
  background: rgba(255,255,255,0.08);
}

.meter-complete {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--success-light, #d1fae5);
  border-color: var(--success, #10b981);
  color: var(--success-dark, #065f46);
  animation: meterFadeOut 5s linear forwards;
  animation-delay: 3s;
}
.meter-check { color: var(--success); font-size: 1.5rem; }
@keyframes meterFadeOut {
  to { opacity: 0; visibility: hidden; }
}

.meter-collapsed-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 4px 0;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   Inventory Onboarding Step
   2x3 category grid + pre-seeded item pills with qty stepper.
   Mobile-first 375px, big touch targets, minimal text.
   ═══════════════════════════════════════════════════════ */

.inv-ob-modal {
  padding: 16px 12px 0;
}
.inv-ob-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
  text-align: center;
}

/* ─── 2x3 Category Grid ─── */
.inv-ob-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.inv-ob-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 80px;
  padding: 12px 6px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.inv-ob-tile-icon {
  font-size: 1.6rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.inv-ob-tile-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.inv-ob-tile:hover {
  border-color: var(--primary-300, #7dd3fc);
  background: var(--primary-50, #e0f2fe);
}
.inv-ob-tile.active {
  border-color: var(--primary);
  background: var(--primary-50, #e0f2fe);
  box-shadow: 0 0 0 2px rgba(14,165,233,0.18);
}
.inv-ob-tile.active .inv-ob-tile-icon {
  color: var(--primary);
}
.inv-ob-tile.active .inv-ob-tile-label {
  color: var(--primary);
  font-weight: 600;
}

/* ─── Item Pills Area ─── */
.inv-ob-pills-area {
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.inv-ob-cat-section {
  margin-bottom: 14px;
}
.inv-ob-cat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.inv-ob-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── Individual pill ─── */
.inv-ob-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.inv-ob-pill.active {
  border-color: var(--primary);
  background: var(--primary-50, #e0f2fe);
}
.inv-ob-pill-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ─── Qty Stepper ─── */
.inv-ob-qty-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
}
.inv-ob-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s ease;
}
.inv-ob-qty-btn:hover {
  background: var(--gray-100);
}
.inv-ob-qty-btn:active {
  background: var(--gray-200);
}
.inv-ob-qty-input {
  width: 28px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

/* ─── Footer (sticky add button + skip) ─── */
.inv-ob-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
}
.inv-ob-add-btn {
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
}
.inv-ob-add-btn:disabled {
  opacity: 0.45;
}
.inv-ob-skip-btn {
  min-height: 44px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  width: 100%;
  text-align: center;
}

/* ─── Dark mode ─── */
body.dark-mode .inv-ob-tile {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .inv-ob-tile:hover {
  background: rgba(14,165,233,0.08);
  border-color: rgba(14,165,233,0.4);
}
body.dark-mode .inv-ob-tile.active {
  background: rgba(14,165,233,0.12);
  border-color: var(--primary);
}
body.dark-mode .inv-ob-pill {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .inv-ob-pill.active {
  background: rgba(14,165,233,0.12);
  border-color: var(--primary);
}
body.dark-mode .inv-ob-qty-btn {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .inv-ob-qty-btn:hover {
  background: rgba(255,255,255,0.06);
}

/* ─── Mobile — 375px base ─── */
@media (max-width: 480px) {
  .journey-pdf-frame { height: 280px; }
  .journey-modal-actions { flex-direction: column; }
  .journey-profit-math { max-width: 100%; }
  .inv-ob-grid { gap: 8px; }
  .inv-ob-tile { min-height: 74px; padding: 10px 4px; }
  .inv-ob-tile-icon { font-size: 1.4rem; }
  .inv-ob-pills-area { max-height: 220px; }
}
