/* 15-settings-help-billing.css — Lead funnel settings, getting started and the help guide, billing
   (plans, banner, invoices, signup), presentation brand colours.
   Part of the CRM stylesheet: the files load in number order (components/app_styles.html) and later
   rules win, exactly as when this was one file. */

/* Lead funnel settings: three groups (first stage, the stages between, the endings); deleting asks where leads go. */
.pipeline-list + .pipeline-list { margin-top: 0; }
.pipeline-list li.is-fixed .drag-handle { cursor: default; }
.stage-color-select { width: 130px; flex: none; }
.stage-delete { position: relative; }
.stage-delete > summary { list-style: none; }
.stage-delete > summary::-webkit-details-marker { display: none; }
.stage-delete-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 8px; width: 240px; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}

/* ---------- Getting started (dashboard) and the guide ---------- */
.onboarding { border-color: var(--accent-soft-2, var(--border)); }
.onboarding-steps { list-style: none; margin: 14px 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.onboarding-steps li { display: flex; gap: 10px; align-items: flex-start; }
.onboarding-steps li.is-done b { text-decoration: line-through; color: var(--muted); }
.onboarding-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.onboarding-steps li.is-done .onboarding-mark { background: var(--accent); color: #fff; border-color: transparent; }
.help-link { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 700; vertical-align: middle; text-decoration: none; }
.help-link:hover { color: var(--accent); border-color: var(--accent); }
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 16px; display: grid; gap: 6px; font-size: 14px; }
.help-toc a { color: var(--muted); text-decoration: none; }
.help-toc a:hover { color: var(--accent); }
.help-body { display: grid; gap: 12px; max-width: 820px; }
.help-body h2 { font-size: 17px; margin: 0 0 8px; }
.help-body p, .help-body li { font-size: 14px; line-height: 1.6; }
.help-body ul, .help-body ol { margin: 6px 0; padding-left: 20px; }
.help-body section { scroll-margin-top: 16px; }
.help-body details { border-top: 1px solid var(--border-soft); padding: 8px 0; }
.help-body summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.help-examples li { font-style: italic; }
@media (max-width: 820px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; grid-template-columns: 1fr 1fr; } }

/* ---------- Billing: plans, the expiry banner, invoices, signup ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.plan-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-price { font-size: 22px; font-weight: 800; margin: 6px 0 8px; }
.plan-price small { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.plan-card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.billing-expired { display: flex; gap: 10px; align-items: center; background: var(--danger-soft); border-color: transparent; color: var(--danger); font-weight: 600; }
.billing-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--tg-safe-bottom, 0px)); z-index: 250;
  display: flex; gap: 10px; align-items: center; max-width: calc(100% - 24px); padding: 10px 16px; border-radius: 999px;
  background: #111827; color: #fff; font-size: 14px; text-decoration: none; box-shadow: var(--shadow);
}
.billing-banner.is-urgent { background: var(--danger); }
.billing-banner b { white-space: nowrap; }
@media (max-width: 820px) { .billing-banner { bottom: calc(76px + var(--tg-safe-bottom, 0px)); border-radius: var(--radius); } }
.invoice-sheet { max-width: 760px; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.invoice-payee { margin: 4px 0; font: inherit; font-size: 14px; white-space: pre-wrap; }
.invoice-total { text-align: right; margin-top: 10px; font-size: 16px; }
@media print {
  .sidebar, .topbar, .tabbar, .no-print, .billing-banner, .offline-strip, .messages { display: none !important; }
  .main, .panel { margin: 0 !important; padding: 0 !important; }
  .invoice-sheet { border: 0; box-shadow: none; max-width: none; }
}
.signup-plans { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.signup-plan { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.signup-plan:has(input:checked) { border-color: var(--accent); background: var(--accent-soft, transparent); }
.signup-plan input[type=radio] { width: 18px; height: 18px; flex: none; margin: 1px 0 0; padding: 0; accent-color: var(--accent); }
/* Presentation brand: three colour pickers and the font, side by side */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 12px; margin-bottom: 12px; }
.brand-grid input[type=color] { height: 42px; padding: 4px; cursor: pointer; }

