/* SenCRM theme: dark sidebar, white top bar, light gray canvas, white cards. */

:root {
  --app-bg: #f2f4f7;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #101828;
  --text-secondary: #475467;
  --text-muted: #667085;
  --sidebar-bg: #101828;
  --sidebar-text: #cbd2e0;
  --sidebar-muted: #7d8799;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(255, 255, 255, 0.1);
  --accent: #155eef;
  --accent-soft: #eff4ff;
  --chart-1: #2a78d6;
  --chart-grid: #e4e7ec;
  --sidebar-width: 248px;
  --topbar-height: 60px;
  --radius: 10px;

  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--text-muted);
  --bs-primary: var(--accent);
  --bs-primary-rgb: 21, 94, 239;
  --bs-link-color-rgb: 21, 94, 239;
  --bs-link-hover-color-rgb: 0, 78, 235;
  --bs-border-radius: 8px;
  --bs-card-border-color: var(--border);
}

/* Only the page canvas is gray; Bootstrap components (cards, inputs, menus) stay white. */
body { font-size: 0.9rem; background-color: var(--app-bg); }
.btn-primary {
  --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: #004eeb; --bs-btn-hover-border-color: #004eeb;
  --bs-btn-active-bg: #0040c1; --bs-btn-active-border-color: #0040c1;
  --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent);
}
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--border); --bs-btn-hover-bg: #f9fafb; --bs-btn-hover-border-color: #d0d5dd; }
.btn { font-weight: 500; }
.form-control, .form-select { border-color: #d0d5dd; }
.form-control:focus, .form-select:focus { border-color: #84adff; box-shadow: 0 0 0 3px rgba(21, 94, 239, .12); }
.form-label { font-weight: 500; color: var(--text-secondary); margin-bottom: .3rem; }

/* ---------- App shell ---------- */

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1030;
    visibility: visible !important; transform: none !important;
    background: var(--sidebar-bg) !important;
  }
  .app-main { margin-left: var(--sidebar-width); }
}
.sidebar.offcanvas-lg { --bs-offcanvas-width: var(--sidebar-width); --bs-offcanvas-bg: var(--sidebar-bg); }
.sidebar-brand {
  display: flex; align-items: center; gap: .65rem;
  height: var(--topbar-height); padding: 0 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #fff; text-decoration: none;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2e90fa, #155eef); color: #fff; font-weight: 700;
}
.brand-name { font-weight: 600; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: var(--sidebar-muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { padding: .75rem .65rem; overflow-y: auto; flex: 1; }
.sidebar-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sidebar-muted); padding: 1rem .6rem .35rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .6rem; margin-bottom: 2px; border-radius: 8px;
  color: var(--sidebar-text); text-decoration: none; font-weight: 500;
}
.sidebar-link .bi { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link.active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 #2e90fa; }
.sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .06); }

/* Collapsed sidebar (desktop only): icons, no labels. */
@media (min-width: 992px) {
  .sidebar, .app-main { transition: width .15s ease, margin-left .15s ease; }
  .sidebar-collapsed .sidebar { width: 72px; }
  .sidebar-collapsed .app-main { margin-left: 72px; }
  .sidebar-collapsed .sidebar .label { display: none; }
  .sidebar-collapsed .sidebar-brand { padding: 0; justify-content: center; }
  .sidebar-collapsed .sidebar-link { justify-content: center; padding: .6rem 0; }
  .sidebar-collapsed .sidebar-section { padding: .5rem 0; margin: .5rem .6rem; border-top: 1px solid rgba(255, 255, 255, .08); }
}

.topbar {
  position: sticky; top: 0; z-index: 1020;
  height: var(--topbar-height);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.25rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar-search { position: relative; flex: 1; max-width: 420px; }
.topbar-search .bi { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.topbar-search input { padding-left: 2.2rem; background: #f9fafb; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
}
.icon-btn:hover { background: #f9fafb; color: var(--text); }
/* EN / ID language switch (templates/_lang_switch.html). */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.lang-switch button {
  border: 0; background: transparent; padding: .4rem .55rem; line-height: 1;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; color: var(--text-muted);
}
.lang-switch button + button { border-left: 1px solid var(--border); }
.lang-switch button:hover { background: #f9fafb; color: var(--text); }
.lang-switch button.active { background: var(--accent-soft); color: #004eeb; }

.app-content { padding: 1.5rem; }
@media (max-width: 575.98px) { .app-content { padding: 1rem; } .topbar { padding: 0 .75rem; } }
.page-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.page-title { font-size: 1.4rem; font-weight: 600; margin: 0; }
.page-subtitle { color: var(--text-muted); margin: .15rem 0 0; }
.page-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Cards, tables, badges ---------- */

.card { border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.card-header { background: var(--surface); border-bottom-color: var(--border); padding: .85rem 1.1rem; font-weight: 600; }
.card-header:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.card-title-sm { font-size: .95rem; font-weight: 600; margin: 0; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th {
  font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); background: #f9fafb; border-bottom-color: var(--border); white-space: nowrap;
}
.table > :not(caption) > * > * { padding: .7rem 1rem; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f9fafb; }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 500; background: var(--accent-soft); color: #004eeb; margin: 0 .2rem .2rem 0; text-decoration: none; }
.badge-soft { font-weight: 500; padding: .3em .6em; border-radius: 999px; }
.badge-open { background: var(--accent-soft); color: #004eeb; }
.badge-won { background: #ecfdf3; color: #027a48; }
.badge-lost { background: #f2f4f7; color: #475467; }
.badge-warn { background: #fffaeb; color: #b54708; }
.badge-danger { background: #fef3f2; color: #b42318; }

/* Avatars: initials on a stable color per name. */
.avatar {
  --size: 34px;
  width: var(--size); height: var(--size); flex: 0 0 var(--size);
  border-radius: 50%; display: inline-grid; place-items: center;
  font-size: calc(var(--size) * .38); font-weight: 600;
}
.avatar-sm { --size: 26px; }
.avatar-lg { --size: 64px; }
.avatar-c0 { background: #eff4ff; color: #004eeb; }
.avatar-c1 { background: #fef6ee; color: #b93815; }
.avatar-c2 { background: #ecfdf3; color: #027a48; }
.avatar-c3 { background: #fdf2fa; color: #c11574; }
.avatar-c4 { background: #f4f3ff; color: #5925dc; }
.avatar-c5 { background: #fffaeb; color: #b54708; }
.avatar-c6 { background: #f0f9ff; color: #026aa2; }
.avatar-c7 { background: #fef3f2; color: #b42318; }

/* ---------- Dashboard ---------- */

.stat-tile { padding: 1.1rem 1.2rem; height: 100%; }
.stat-label { display: flex; align-items: center; gap: .5rem; color: var(--text-secondary); font-weight: 500; }
.stat-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 1rem; }
.stat-value { font-size: 1.65rem; font-weight: 600; margin: .6rem 0 .15rem; letter-spacing: -.01em; }
.stat-foot { font-size: .8rem; color: var(--text-muted); }
.delta-up { color: #027a48; font-weight: 600; }
.delta-down { color: #b42318; font-weight: 600; }

/* Horizontal bar chart (pipeline by stage). */
.hbar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr; gap: .75rem; align-items: center; padding: .35rem 0; }
.hbar-label { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { display: flex; align-items: center; gap: .5rem; min-height: 24px; border-radius: 0 4px 4px 0; outline-offset: 2px; }
.hbar-fill { height: 20px; background: var(--chart-1); border-radius: 0 4px 4px 0; min-width: 2px; transition: filter .15s; }
.hbar-track:hover .hbar-fill, .hbar-track:focus-visible .hbar-fill { filter: brightness(1.12); }
.hbar-value { font-size: .8rem; color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Column chart (revenue by month). */
.cols { display: flex; align-items: flex-end; gap: 2px; height: 180px; border-bottom: 1px solid #d0d5dd; padding-top: 1.4rem; }
.col-slot { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline-offset: 2px; border-radius: 4px; }
.col-value { font-size: .72rem; color: var(--text-secondary); margin-bottom: .25rem; white-space: nowrap; }
.col-fill { width: min(24px, 60%); background: var(--chart-1); border-radius: 4px 4px 0 0; min-height: 2px; transition: filter .15s; }
.col-slot:hover .col-fill, .col-slot:focus-visible .col-fill { filter: brightness(1.12); }
.col-labels { display: flex; gap: 2px; margin-top: .4rem; }
.col-labels span { flex: 1; text-align: center; font-size: .75rem; color: var(--text-muted); }
.col-labels span.current { color: var(--text); font-weight: 600; }

.chart-tooltip {
  position: fixed; z-index: 1080; pointer-events: none;
  background: #101828; color: #fff; border-radius: 6px; padding: .4rem .6rem;
  font-size: .78rem; box-shadow: 0 4px 12px rgba(16, 24, 40, .2);
}
.chart-tooltip strong { display: block; font-size: .85rem; }
.chart-tooltip span { color: #cbd2e0; }

.list-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 500; color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: .8rem; color: var(--text-muted); }
.empty-state { padding: 2rem 1rem; text-align: center; color: var(--text-muted); }
.empty-state .bi { font-size: 1.6rem; display: block; margin-bottom: .4rem; color: #98a2b3; }

/* ---------- Pipeline board ---------- */

.board-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.board-stat { color: var(--text-secondary); }
.board-stat strong { color: var(--text); }
.board {
  display: flex; gap: .75rem; overflow-x: auto; padding-bottom: 1rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.board-column {
  /* Six 195px columns fit a 1366px laptop with the menu collapsed. */
  flex: 1 0 195px; scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: #eaecf0; border-radius: var(--radius);
  max-height: calc(100vh - 13rem); min-height: 300px;
}
@media (max-width: 767.98px) { .board-column { flex: 0 0 85%; } }
.board-column-header { padding: .8rem .9rem .6rem; border-top: 3px solid var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.board-column-header.kind-won { border-top-color: #12b76a; }
.board-column-header.kind-lost { border-top-color: #98a2b3; }
.board-column-name { font-weight: 600; }
.board-column-meta { font-size: .78rem; color: var(--text-muted); }
.board-cards { flex: 1; min-height: 4rem; overflow-y: auto; padding: 0 .55rem .55rem; }
.lead-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: .7rem .75rem; margin-bottom: .55rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  cursor: grab; touch-action: manipulation;
}
.lead-card:hover { border-color: #b2ccff; }
.lead-card:active { cursor: grabbing; }
.lead-card.sortable-ghost { opacity: .4; }
.lead-card.sortable-chosen { box-shadow: 0 8px 20px rgba(16, 24, 40, .15); }
.lead-card.is-overdue { box-shadow: inset 3px 0 0 #f04438; }
.lead-card.is-due-today { box-shadow: inset 3px 0 0 #fdb022; }
.lead-card .card-title-link { font-weight: 600; color: var(--text); text-decoration: none; }
.lead-card .card-title-link:hover { color: var(--accent); }
.lead-card-value { font-weight: 600; }
.lead-card-meta { font-size: .78rem; color: var(--text-muted); }

/* ---------- Contact page ---------- */

.profile-head { text-align: center; padding: 1.4rem 1rem 1rem; border-bottom: 1px solid var(--border); }
.quick-actions { display: flex; justify-content: center; gap: .5rem; margin-top: .8rem; }
.detail-list { margin: 0; padding: 1rem 1.1rem; }
.detail-list dt { font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.detail-list dd { margin-bottom: .75rem; overflow-wrap: anywhere; }
.detail-list dd:last-child { margin-bottom: 0; }

.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline > li { position: relative; padding: 0 0 1.1rem 2.6rem; }
.timeline > li::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.timeline > li:last-child::before { display: none; }
.timeline-icon {
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: .9rem;
}
.kind-call { background: #ecfdf3; color: #027a48; }
.kind-email { background: #eff4ff; color: #004eeb; }
.kind-meeting { background: #f4f3ff; color: #5925dc; }
.kind-note { background: #fffaeb; color: #b54708; }
.kind-whatsapp { background: #ecfdf3; color: #128c4b; }

/* ---------- Auth pages ---------- */

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 0%, #1d2939 0, #101828 60%); }
.auth-card { width: 100%; max-width: 400px; }

/* ---------- API documentation ---------- */

.docs-toc { position: sticky; top: calc(var(--topbar-height) + 1rem); display: flex; flex-direction: column; gap: 2px; }
.docs-toc-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .3rem; }
.docs-toc a { color: var(--text-secondary); text-decoration: none; padding: .25rem .6rem; border-radius: 6px; }
.docs-toc a:hover { background: #fff; color: var(--text); }
.docs section { scroll-margin-top: calc(var(--topbar-height) + 1rem); }
.docs h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: .75rem; }
.docs h3 { font-size: .95rem; font-weight: 600; margin: 1.1rem 0 .4rem; }
.docs h4 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 1rem 0 .4rem; }
.docs-ref-title { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 .75rem; }
.code-block { position: relative; margin-bottom: .9rem; }
.code-block pre {
  margin: 0; padding: .75rem 2.75rem .75rem .9rem; border-radius: 8px;
  background: #101828; color: #e4e7ec; font-size: .8rem; white-space: pre-wrap; word-break: break-all;
}
.code-block code { color: inherit; }
.code-copy { position: absolute; top: .4rem; right: .4rem; color: #98a2b3; border: 0; }
.code-copy:hover { color: #fff; }
.docs-op { border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; background: #fff; }
.docs-op > summary { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; cursor: pointer; list-style: none; flex-wrap: wrap; }
.docs-op > summary::-webkit-details-marker { display: none; }
.docs-op > summary::after { content: "\F282"; font-family: bootstrap-icons; margin-left: auto; color: var(--text-muted); transition: transform .15s; }
.docs-op[open] > summary::after { transform: rotate(180deg); }
.docs-op[open] > summary { border-bottom: 1px solid var(--border); }
.docs-op-body { padding: .25rem .9rem .75rem; }
.docs-path { color: var(--text); background: none; font-size: .85rem; }
.docs-op-label { color: var(--text-muted); font-size: .85rem; }
.method { font-size: .7rem; font-weight: 700; padding: .2rem .45rem; border-radius: 5px; min-width: 56px; text-align: center; letter-spacing: .03em; }
.method-get { background: #eff4ff; color: #004eeb; }
.method-post { background: #ecfdf3; color: #027a48; }
.method-patch { background: #fffaeb; color: #b54708; }
.method-delete { background: #fef3f2; color: #b42318; }
.docs-fields { font-size: .84rem; }
.docs-fields > thead th { font-size: .7rem; }
.docs-nested > td { padding: 0 0 .5rem 1.25rem !important; background: #f9fafb; }
.docs-nested .table { margin: 0; }

/* ---------- Invoices ---------- */

.line-row { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; padding: .6rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.line-row .line-product, .line-row .line-desc { grid-column: span 2; }
.line-row .line-total { align-self: center; }
.line-row .line-remove { text-align: right; }
.line-row .line-errors { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .line-row { grid-template-columns: 2fr 2.2fr .8fr 1.3fr 1.2fr auto; }
  .line-row .line-product, .line-row .line-desc { grid-column: auto; }
}
.line-row.line-head { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding-top: 0; }
.totals > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.totals dt { font-weight: 400; color: var(--text-secondary); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .6rem; font-size: 1.05rem; font-weight: 600; }
.totals .grand dt { color: var(--text); font-weight: 600; }
.invoice-title { font-size: 1.5rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.invoice-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .2rem; }
.invoice-logo { max-height: 56px; max-width: 200px; }
.invoice-lines > thead th { background: transparent; border-bottom: 2px solid var(--text); color: var(--text); }
.invoice-lines td { font-variant-numeric: tabular-nums; }

@media print {
  .sidebar, .topbar, .no-print, #messages { display: none !important; }
  .app-main { margin-left: 0 !important; transition: none !important; }
  .app-content { padding: 0; }
  body { background-color: #fff; }
  .invoice-doc { border: 0; box-shadow: none; }
  .col-xl-8 { width: 100%; }
}

/* ---------- Settings ---------- */

.settings-nav .list-group-item { border: 0; border-radius: 8px !important; margin-bottom: 2px; color: var(--text-secondary); background: transparent; }
.settings-nav .list-group-item:hover { background: #fff; color: var(--text); }
.settings-nav .list-group-item.active { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.stage-row { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.1rem; border-bottom: 1px solid var(--border); background: #fff; }
.stage-row:last-child { border-bottom: 0; }
.stage-handle { cursor: grab; color: var(--text-muted); font-size: 1.1rem; }
.stage-row.sortable-ghost { opacity: .4; }

/* ---------- Outreach ---------- */

.outreach-message { white-space: pre-wrap; background: #f0fdf4; border: 1px solid #dcfce7; border-radius: 8px; padding: .5rem .7rem; margin-top: .3rem; color: var(--text); }
.outreach-row.is-done { background: #f9fafb; color: var(--text-muted); }

/* ---------- Bulk actions ---------- */

.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--accent-soft); border-bottom: 1px solid #c7d7fe; }

/* ---------- Handbook ---------- */

.docs-toc a.active { background: #fff; color: var(--accent); font-weight: 600; }
.hb-contents summary { cursor: pointer; font-weight: 600; }
.hb-contents a { padding: .3rem 0; text-decoration: none; }
.hb-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.hb-head h2 { display: flex; align-items: center; gap: .55rem; margin: 0; }
.hb-head h2 .bi { color: var(--accent); }
.hb-head .btn { margin-left: auto; }
.hb-flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .hb-flow { grid-template-columns: repeat(3, 1fr); } }
.hb-flow a {
  display: flex; flex-direction: column; gap: .35rem; padding: .85rem .9rem;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.hb-flow a:hover { border-color: #b2ccff; background: #f9fafb; }
.hb-flow small { color: var(--text-muted); font-size: .8rem; }
.hb-steps { list-style: none; counter-reset: step; padding-left: 0; }
.hb-steps > li { counter-increment: step; position: relative; padding-left: 2.1rem; margin-bottom: .6rem; }
.hb-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -.05rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: #004eeb; font-size: .75rem; font-weight: 600;
}
.hb-value { background: var(--accent-soft); color: #004eeb; border-radius: 5px; padding: .05rem .35rem; font-weight: 500; white-space: nowrap; }
.hb-table { margin-bottom: 1rem; }
.table-responsive:last-child > .hb-table { margin-bottom: 0; }
.hb-table > :not(caption) > * > * { padding: .55rem .75rem; }
.hb-table td:first-child { font-weight: 500; }
.hb-example { background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
/* ---------- Routes ---------- */

.route-number {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .85rem;
}
.route-number.is-start { background: var(--sidebar-bg); }
.route-sketch { display: block; width: 100%; max-width: 340px; margin: 0 auto .5rem; }
.route-sketch polyline { fill: none; stroke: #84adff; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.route-sketch circle { fill: var(--accent); }
.route-sketch text { fill: #fff; font-size: 4.4px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.route-sketch .start rect { fill: var(--sidebar-bg); }

.hb-example-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .3rem; }
