/* page styles group c – analytics, leads, team, developers, billing, settings, admin, help. Tokens only. */

/* ---- shared helpers ---- */
.c-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-top: 16px; }
.c-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.c-kpi5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.c-kpi5 .kpi .value { font-size: 22px; }
@media (max-width: 1100px) { .c-2-1, .c-1-2 { grid-template-columns: minmax(0, 1fr); } .c-kpi5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .c-kpi5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.c-h { font-size: var(--fs-sm); color: var(--text-3); font-weight: 600; margin-bottom: 10px; }
.c-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 8px; }
.c-icon-box { width: 36px; height: 36px; border-radius: var(--radius); background: var(--accent-50); color: var(--accent-text); display: inline-grid; place-items: center; flex: none; }
.c-yes { color: var(--ok); display: inline-flex; } .c-yes svg { width: 18px; height: 18px; }
.c-part { color: var(--warn); font-weight: 700; }
.c-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.c-title-badge { vertical-align: middle; margin-left: 6px; font-size: 12px; letter-spacing: 0; }
.c-title-badge svg { width: 13px; height: 13px; }
.badge svg { width: 13px; height: 13px; }
.c-ok-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); flex: none; }
.c-ico-sm { width: 14px; height: 14px; vertical-align: -2px; color: var(--text-3); }
.c-checks { display: grid; gap: 10px; }
.c-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.c-radio:hover { border-color: var(--border-strong); }
.c-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-50); }
.c-radio input { margin-top: 3px; accent-color: var(--accent); }
.c-radio > span { display: flex; flex-direction: column; gap: 2px; }
.c-hide-sm { display: inline; }
@media (max-width: 700px) { .c-hide-sm { display: none; } }

/* ---- vertical tab layout (settings, admin) ---- */
.c-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.c-vtabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.c-vtabs a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); color: var(--text-2); font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.c-vtabs a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.c-vtabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.c-vtabs a .ico { color: var(--text-3); }
.c-vtabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border-color: var(--border); }
.c-vtabs a.active .ico { color: var(--accent-text); }
.c-count { margin-left: auto; height: 18px; padding: 0 6px; }
@media (max-width: 1279px) {
  .c-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .c-vtabs { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; gap: 6px; }
  .c-vtabs::-webkit-scrollbar { display: none; }
  .c-vtabs a { border-color: var(--border); background: var(--surface); padding: 7px 12px; font-size: var(--fs-sm); }
  .c-vtabs a.active { background: var(--accent-50); border-color: var(--accent-100); box-shadow: none; }
}

/* ---- analytics ---- */
.c-filter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; }
.c-inline { display: flex; align-items: center; gap: 8px; }
.c-inline select { width: auto; min-width: 220px; }
.c-filter .xs svg { width: 14px; height: 14px; vertical-align: -3px; }
.c-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; }
.c-stats > div { padding: 14px 18px; border-left: 1px solid var(--border); }
.c-stats > div:first-child { border-left: 0; }
.c-stat { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 2px 0; }
.c-stat.warn { color: var(--warn); }
@media (max-width: 1100px) { .c-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .c-stats > div { border-left: 0; border-top: 1px solid var(--border); } .c-stats > div:nth-child(-n+3) { border-top: 0; } }
@media (max-width: 700px) { .c-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c-stats > div:nth-child(3) { border-top: 1px solid var(--border); } .c-inline select { min-width: 0; } .c-filter .right { margin-left: 0; } }
.card-head .seg button { padding: 5px 9px; font-size: var(--fs-xs); }
@media (max-width: 700px) { .card-head:has(.seg) { flex-wrap: wrap; } .card-head .seg.right { margin-left: 0; overflow-x: auto; max-width: 100%; } }
.c-funnel { display: flex; flex-direction: column; gap: 16px; }
.c-fbar { height: 26px; background: var(--surface-3); border-radius: var(--radius-sm); margin: 6px 0 4px; overflow: hidden; }
.c-fbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-600)); border-radius: var(--radius-sm); }
.c-fstep:nth-child(2) .c-fbar > span { opacity: .85; } .c-fstep:nth-child(3) .c-fbar > span { opacity: .7; } .c-fstep:nth-child(4) .c-fbar > span { opacity: .55; }
.c-mini { height: 4px; background: var(--surface-3); border-radius: 99px; margin-top: 4px; max-width: 160px; }
.c-mini > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.c-split-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; margin-bottom: 8px; }
.c-split-bar > span:nth-child(1), .c-key.k0 { background: var(--accent); }
.c-split-bar > span:nth-child(2), .c-key.k1 { background: color-mix(in srgb, var(--accent) 50%, var(--surface)); }
.c-split-bar > span:nth-child(3), .c-key.k2 { background: var(--border-strong); }
.c-key { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.c-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); flex: none; }

/* ---- leads inbox ---- */
.c-inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 560px; overflow: hidden; }
.c-inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.c-inbox-filters { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
.c-inbox-filters .seg { display: flex; } .c-inbox-filters .seg button { flex: 1; padding: 6px 4px; }
.c-inbox-items { overflow-y: auto; max-height: 620px; }
.c-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; cursor: pointer; position: relative; }
.c-item:hover { background: var(--surface-2); }
.c-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.c-item.sel { background: var(--accent-50); }
.c-item.sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.c-item.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 2px; }
.c-item .avatar { width: 34px; height: 34px; }
.c-item .small { color: var(--text-2); margin-top: 2px; }
.c-inbox-detail { padding: 20px 24px; min-width: 0; }
.c-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.c-detail-head h2 { font-size: var(--fs-xl); }
.c-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.c-msg { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; white-space: pre-wrap; font-size: var(--fs-md); }
.c-dl { display: grid; grid-template-columns: 22px 1fr; gap: 8px 6px; align-items: start; font-size: var(--fs-sm); }
.c-dl > span:nth-child(odd) { color: var(--text-3); } .c-dl svg { width: 16px; height: 16px; margin-top: 2px; }
.c-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--border-strong); color: var(--text-3); font-size: var(--fs-sm); }
@media (max-width: 900px) { .c-inbox { grid-template-columns: minmax(0, 1fr); } .c-inbox-list { border-right: 0; border-bottom: 1px solid var(--border); } .c-inbox-items { max-height: 340px; } .c-inbox-detail { padding: 16px; scroll-margin-top: 70px; } }

/* ---- team ---- */
.c-matrix td:not(:first-child), .c-matrix th:not(:first-child) { text-align: center; }
.c-store-pick { border-top: 1px solid var(--border); padding-top: 12px; }
.c-checklist { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }

/* ---- developers ---- */
.c-endpoints { margin-top: 16px; }
.c-endpoints code { font-size: 12.5px; }
.c-method { font: 700 10.5px/1 ui-monospace, monospace; padding: 4px 6px; border-radius: 4px; width: 54px; text-align: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.c-method.get { background: var(--info-bg); color: var(--info); } .c-method.post { background: var(--ok-bg); color: var(--ok); }
.c-method.patch { background: var(--warn-bg); color: var(--warn); } .c-method.delete { background: var(--err-bg); color: var(--err); }
pre.codebox { margin: 0; overflow-x: auto; }
.c-secret { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--accent-50); }
.c-secret code { flex: 1; word-break: break-all; font-size: 13px; }

/* ---- billing ---- */
.c-plan-hero { display: flex; flex-direction: column; justify-content: space-between; }
.c-plan-name { font-size: 26px; display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.c-plan-price { text-align: right; font-size: 22px; font-weight: 700; }
.c-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.c-facts > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-facts b { font-size: var(--fs-sm); overflow-wrap: anywhere; }
@media (max-width: 700px) { .c-facts { grid-template-columns: 1fr; } .c-plan-price { text-align: left; margin-left: 0; } }
.c-usage { display: flex; flex-direction: column; gap: 14px; }
.c-usage .row svg { width: 16px; height: 16px; color: var(--text-3); }
.c-usage .meter { margin-top: 6px; }
.c-limits { padding: 8px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text-2); }
.price-card { height: 100%; }
.c-paymethod { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.c-paymethod > svg { width: 28px; height: 28px; color: var(--accent-text); }
.c-offer { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* ---- settings ---- */
.c-tabbody { min-width: 0; }
.c-logo-row { display: flex; gap: 16px; align-items: center; }
.c-logo { width: 72px; height: 72px; border-radius: var(--radius-lg); border: 2px dashed var(--border-strong); display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 22px; color: var(--text-3); overflow: hidden; flex: none; }
.c-logo img { width: 100%; height: 100%; object-fit: contain; }
.c-appearance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
@media (max-width: 1100px) { .c-appearance { grid-template-columns: minmax(0, 1fr); } }
.c-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.c-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; padding: 10px 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; }
.c-sw:hover { border-color: var(--border-strong); }
.c-sw:focus-visible, .c-sw:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.c-sw.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-100); color: var(--text); }
.c-sw .swatch { background: var(--accent); pointer-events: none; }
.c-sw.active .swatch { box-shadow: 0 0 0 2px var(--accent); }
.c-sw input[type=color] { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.c-sw input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .c-sw input[type=color]::-webkit-color-swatch { border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--border-strong); }
/* default preset 'brand' = violet→pink gradient swatch */
.c-sw-brand .swatch { background: linear-gradient(110deg, var(--brand-primary), var(--brand-accent)); }
.c-sw { position: relative; }
.c-sw-def { position: absolute; top: -8px; right: -4px; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--text); color: var(--surface); }
.seg button svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.c-preview { box-shadow: var(--shadow); }
.c-preview .brand-mark { width: 26px; height: 26px; border-radius: 8px; } .c-preview .brand-mark svg { width: 15px; height: 15px; }
.c-preview .tbl { border: 1px solid var(--border); border-radius: var(--radius); border-collapse: separate; overflow: hidden; }
.c-qr { width: 168px; height: 168px; color: var(--text); background: var(--surface); padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); flex: none; }
.c-2fa { display: flex; gap: 20px; align-items: flex-start; }
@media (max-width: 560px) { .c-2fa { flex-direction: column; align-items: center; } }
.c-ol { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.c-key-code { display: inline-block; margin-top: 4px; padding: 4px 8px; background: var(--surface-3); border-radius: var(--radius-sm); letter-spacing: .08em; }
.c-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.c-codes code { padding: 8px; background: var(--surface-3); border-radius: var(--radius-sm); text-align: center; letter-spacing: .05em; }
.c-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.c-danger { border-color: color-mix(in srgb, var(--err) 35%, var(--border)); }
.c-danger .card-head h3 { color: var(--err); }
.c-tabbody .list-row .switch span:empty { display: none; }

/* custom accent: derive the shades theme.css only defines for presets (should move to theme.css) */
[data-mode="dark"][data-accent="custom"] { --accent-50: color-mix(in srgb, var(--accent) 16%, transparent); --accent-100: color-mix(in srgb, var(--accent) 26%, transparent); }

/* ---- admin ---- */
.c-plans-tbl input { width: 110px; height: 32px; }
.c-plans-tbl td { padding: 6px 10px; }
.tbl tr.c-hl td { background: var(--accent-50); }

/* ---- help ---- */
.c-status { height: 30px; padding: 0 12px; font-size: var(--fs-sm); }
.c-help-hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); border: 0; color: var(--accent-contrast); }
.c-help-hero .card-body { padding: 32px; }
.c-help-hero h2 { margin-bottom: 14px; }
.c-help-search { max-width: 560px; }
.c-help-search input { height: 46px; font-size: var(--fs-md); border-color: transparent; }
.c-guide { display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.c-guide:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.c-guide:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.c-faq details { border-bottom: 1px solid var(--border); }
.c-faq details:last-child { border-bottom: 0; }
.c-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-weight: 600; }
.c-faq summary::-webkit-details-marker { display: none; }
.c-faq summary:hover { background: var(--surface-2); }
.c-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.c-faq summary svg { margin-left: auto; color: var(--text-3); transition: transform .15s; }
.c-faq details[open] summary svg { transform: rotate(180deg); }
.c-faq details > div { padding: 0 20px 16px; color: var(--text-2); line-height: 1.6; }
.c-next { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-50); font-size: var(--fs-sm); }
.c-next > svg { color: var(--accent-text); width: 18px; height: 18px; }

/* ---- admin: compact secondary nav (mobile only – desktop uses the sidebar) ---- */
.c-admin-nav { display: none; }
@media (max-width: 960px) {
  .c-admin-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 14px; padding: 2px 16px 6px; }
  .c-admin-nav::-webkit-scrollbar { display: none; }
  .c-admin-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
  .c-admin-nav a:hover { text-decoration: none; color: var(--text); }
  .c-admin-nav a.active { background: var(--accent-50); border-color: var(--accent-100); color: var(--accent-700); }
  [data-mode="dark"] .c-admin-nav a.active { color: var(--text); }
  .c-admin-nav .ico { width: 15px; height: 15px; }
}
.c-plan-split > span.pl-free, .c-key.pl-free { background: var(--border-strong); }
.c-plan-split > span.pl-pro, .c-key.pl-pro { background: var(--accent); }
.c-plan-split > span.pl-business, .c-key.pl-business { background: var(--info); }
.c-plan-split > span.pl-starter, .c-key.pl-starter { background: var(--warn); }
.c-trial { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--info-bg); }
.c-trial[hidden] { display: none; }
.c-add { display: flex; gap: 8px; margin-top: 12px; }
.c-add input { flex: 1; min-width: 0; }

/* ---- shared: value name with colour dot, numeric cells ---- */
.c-valname { display: inline-flex; align-items: center; gap: 8px; }
.c-vdot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--border-strong); }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-breaks { margin-top: 16px; }
.c-breaks, .c-vals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .c-breaks, .c-vals-grid { grid-template-columns: minmax(0, 1fr); } }
.c-breaks .card-head { flex-wrap: wrap; } .c-breaks .card-head .right { margin-left: 0; }
.c-break td { vertical-align: top; }
.c-ico-sm.ico { width: 14px; height: 14px; }
.c-zip { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }

/* ---- settings: Werte & Berichte ---- */
.c-vals-grid { align-items: start; }
.c-vals { display: flex; flex-direction: column; gap: 8px; }
.c-val { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.c-val input[type=color] { width: 36px; height: 36px; flex: none; padding: 2px; }
.c-val input[type=text] { flex: 1 1 140px; min-width: 0; height: 36px; }
.c-val-flags { display: flex; gap: 6px 14px; flex-wrap: wrap; flex-basis: 100%; padding: 2px 0 0 44px; }
.c-val-flags .check { font-size: var(--fs-sm); color: var(--text-2); }
.c-val-new { border-style: dashed; background: var(--surface-2); }
.c-vis th, .c-vis td { text-align: center; }
.c-vis th:first-child, .c-vis td:first-child, .c-vis tbody th { text-align: left; font-weight: 500; }
.c-vis thead th { vertical-align: bottom; white-space: normal; min-width: 92px; }
.c-vis thead th:first-child { min-width: 180px; }
.c-vis thead th > span { display: block; margin-bottom: 4px; }
.c-vis input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.c-colall { white-space: nowrap; height: 26px; padding: 0 8px; font-size: var(--fs-xs); font-weight: 500; }
.c-vis .c-all { background: var(--surface-2); }
.c-vis-sec td { background: var(--surface-3); font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); text-align: left !important; }
.c-vis-sec .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* ---- settings: Eigene Felder ---- */
.c-fields { display: flex; flex-direction: column; gap: 8px; }
.c-field { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.c-field:hover { border-color: var(--border-strong); }
.c-grip { color: var(--text-3); cursor: grab; display: inline-flex; }
.c-field-main { min-width: 0; }
.c-field-act { display: flex; gap: 4px; align-items: center; flex: none; }
.c-flip { transform: rotate(180deg); }
@media (max-width: 700px) { .c-field { flex-wrap: wrap; } .c-field-act { width: 100%; justify-content: flex-end; } }

/* ---- settings: Branding + live preview (preview colours come from the company brand) ---- */
.c-brand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
@media (max-width: 1100px) { .c-brand { grid-template-columns: minmax(0, 1fr); } }
.c-logo-wide { width: 150px; }
.c-color { display: flex; gap: 8px; } .c-color input[type=text] { flex: 1; min-width: 0; font-family: ui-monospace, monospace; }
.c-bp { --rr: 10px; font-family: var(--bf); display: flex; flex-direction: column; gap: 14px; }
.c-bp[data-r="sharp"] { --rr: 3px; } .c-bp[data-r="round"] { --rr: 18px; }
.c-bp-app { display: grid; grid-template-columns: 150px minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); min-height: 170px; }
.c-bp-side { background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.c-bp-logo { display: flex; align-items: center; gap: 6px; padding: 0 6px 10px; font-size: 12px; min-height: 30px; }
.c-bp-logo img { max-height: 26px; max-width: 130px; object-fit: contain; }
.c-bp-nav { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--rr); font-size: 12px; color: var(--text-2); }
.c-bp-nav .ico { width: 14px; height: 14px; }
.c-bp-nav.on { background: color-mix(in srgb, var(--bp) 12%, var(--surface)); color: var(--bp); font-weight: 600; }
.c-bp-main { padding: 14px; }
.c-bp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rr); padding: 12px; font-size: 13px; }
.c-bp-meter { height: 6px; border-radius: 99px; background: var(--surface-3); margin-top: 8px; } .c-bp-meter span { display: block; width: 62%; height: 100%; border-radius: 99px; background: var(--bp); }
.c-bp-btn { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--rr); background: var(--bp); color: #fff; font-size: 12px; font-weight: 600; }
.c-bp-btn.grad { background: linear-gradient(110deg, var(--bp), var(--ba)); }
.c-bp-btn.ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.c-bp-widget { border: 1px solid var(--border); border-radius: var(--rr); overflow: hidden; background: var(--surface); max-width: 340px; }
.c-bp-search { display: flex; gap: 8px; align-items: center; margin: 10px; padding: 0 10px; height: 34px; border: 1px solid var(--border-strong); border-radius: var(--rr); color: var(--text-3); font-size: 12px; }
.c-bp-search .ico { width: 14px; height: 14px; }
.c-bp-map { position: relative; height: 110px; background: repeating-linear-gradient(45deg, var(--surface-3) 0 12px, var(--surface-2) 12px 24px); }
.c-bp-map i { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--bp); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.c-bp-item { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 10px 12px; font-size: 13px; border-left: 3px solid var(--bp); margin: 10px; background: var(--surface-2); border-radius: 0 var(--rr) var(--rr) 0; }
.c-bp-item .xs { color: var(--text-3); flex-basis: 100%; }
.c-bp-link { color: var(--bp); font-weight: 600; font-size: 12px; }
[data-mode="dark"] :is(.c-bp-nav.on, .c-bp-link) { color: color-mix(in srgb, var(--bp) 65%, white); }   /* company colour as text on dark → lighter (like --accent-text) */
@media (max-width: 560px) { .c-bp-app { grid-template-columns: 110px minmax(0, 1fr); } }
/* enquiry detail (split view ~330 px wide at 1024): contact + location one below the other */
@media (max-width: 1279px) { .c-lead-info { grid-template-columns: minmax(0, 1fr); } .c-dl a { overflow-wrap: anywhere; } }
/* analytics 'by status / by category' tables stack until there is room for both */
@media (max-width: 1279px) { .c-breaks { grid-template-columns: minmax(0, 1fr); } }
/* analytics: custom period + period line */
.c-period { margin: -6px 0 12px; display: flex; align-items: center; gap: 6px; } .c-period svg { width: 14px; height: 14px; }


/* ---- billing: five plan cards (pricing 19/49/79 + Starter) ---- */
.c-plan-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* Free · Starter · Pro · Business */
.c-plan-grid .price-card { padding: 18px 16px; }
.c-plan-grid .price-card .price { font-size: 28px; }
.price-card.popular:not(.featured) { border-color: var(--accent); }
.price-card li.soon { color: var(--text-3); }
.price-card li.soon::before { content: "◷ "; color: var(--text-3); }
@media (max-width: 1240px) { .c-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .c-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .c-plan-grid { grid-template-columns: minmax(0, 1fr); } }
.c-plans-tbl input[type=checkbox] { width: 18px; height: 18px; }
/* custom roles (part G): role list, area × action matrix of the role editor, permission overview, read-only areas */
.c-rolelist { display: flex; flex-direction: column; gap: 8px; }
.c-roleitem { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.c-pmatrix th[scope=row] { font-weight: 600; white-space: nowrap; text-align: left; }
/* fixed columns: the matrix fits the dialog (long labels wrap) instead of being cut off on the right */
.c-pmatrix { table-layout: fixed; width: 100%; }
.c-pmatrix thead th:first-child { width: 130px; }
.c-pmatrix td { vertical-align: top; min-width: 0; overflow-wrap: anywhere; }
.c-pmatrix .c-pcheck { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-xs); margin: 2px 0 6px; }
.c-pmatrix .c-pcheck input { accent-color: var(--accent); margin-top: 2px; }
.c-pmatrix .c-pcheck:has(input:disabled) { opacity: .5; }
.c-perm-overview td:first-child { white-space: nowrap; }
.perm-ro { position: relative; }
.perm-ro :is(input, select, textarea, button):disabled { cursor: not-allowed; }
@media (max-width: 640px) {   /* phone: one block per area, its checkboxes side by side */
  .c-pmatrix thead { display: none; }
  .c-pmatrix, .c-pmatrix tbody, .c-pmatrix tr, .c-pmatrix th[scope=row], .c-pmatrix td { display: block; width: auto; min-width: 0; }
  .c-pmatrix tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .c-pmatrix td { border: 0; padding: 0 8px; }
  .c-pmatrix td:empty { display: none; }
  .c-pmatrix th[scope=row] { border: 0; padding: 4px 8px; }
}

/* ===== public map: route inside the map (Pro+) – mode buttons below the route link, panel with distance / time / steps ===== */
.pm-route { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pm-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-mode { display: inline-flex; align-items: center; gap: 5px; height: 34px; min-width: 46px; padding: 0 10px; justify-content: center; border-radius: var(--pm-r-pill, 99px);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 12.5px/1 var(--font); cursor: pointer; }
.pm-mode > span { font-size: 17px; line-height: 1; }
.pm-mode small { font-size: 12px; color: var(--text-2); }
.pm-mode:hover { background: var(--surface-3); }
.pm-mode[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--brand); }
.pm-mode:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 1px; }
.pm-rpanel { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--pm-r-sm); background: var(--surface-2); color: var(--text); }
.pm-rhead { display: flex; align-items: center; gap: 8px; }
.pm-rsum { flex: 1; font-size: 14px; color: var(--text-2); } .pm-rsum b { color: var(--text); font-size: 15.5px; }
.pm-rhead .pm-ibtn { width: 30px; height: 30px; background: transparent; } .pm-rhead .pm-ibtn .ico { width: 15px; height: 15px; }
.pm-rbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-rbtns .pm-btn { flex: 1 1 auto; }
.pm-rsteps { margin: 0; padding: 0 0 0 20px; max-height: 220px; overflow-y: auto; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.pm-route-line { stroke: var(--brand); }
.pm-route-casing { stroke: var(--surface); stroke-opacity: .9; }
/* the route is driven once by a small vehicle (setting routeAnimate) */
.pm-car { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 8px rgb(0 0 0 / .25), 0 0 0 2px var(--brand); font-size: 17px; line-height: 1; transition: opacity .5s, transform .5s; }
.pm-car.done { opacity: 0; transform: scale(.6); }
/* search circle: the radius, or out to the farthest of the nearest locations */
.pm-circle { stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 6; stroke-opacity: .7; fill: var(--brand); fill-opacity: .06; }
.v9 .pm-mode { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, .35); }
.v9 .pm-rpanel { background: rgba(255, 255, 255, .06); }
.pm-solo-pin .pm-rpanel a.pm-btn { color: var(--text); text-decoration: none; }
.pm-card.v-tile .pm-rbtns .pm-btn span { white-space: normal; }
.pm-track:has(.pm-rpanel) { align-items: flex-end; }   /* template 4: only the tile with the route grows, the others keep their height */
.pm-card.v-tile .pm-rsteps { max-height: 130px; }
@media (max-width: 640px) {
  .pm-mode { height: 38px; min-width: 52px; }
  .pm-rsteps { max-height: 160px; }
}

/* ---------- developer help (#/developers/help/…): task picker, numbered steps, screenshots, simplified Postman panels ---------- */
.dh-pick { max-width: 520px; }
.dh-pick select { font-weight: 600; }
.dh-steps { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.dh-steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
.dh-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-100, var(--surface-3)); color: var(--accent); font-weight: 700; }
.dh-steps h3 { font-size: var(--fs-md); margin: 4px 0 6px; }
.dh-body { color: var(--text-2); line-height: 1.6; max-width: 760px; }
.dh-body p { margin: 10px 0 0; }
.dh-body code { font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.dh-shot { margin: 12px 0 0; max-width: 640px; }
.dh-shot img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: block; }
.dh-shot figcaption { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.dh-tbl td { vertical-align: top; }
.dh-pm { margin-top: 12px; max-width: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; font-size: 13px; }
.dh-pm-bar { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); }
.dh-pm-bar code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface-2); padding: 6px 8px; border-radius: 6px; }
.dh-pm-m { font: 700 11px/1 ui-monospace, monospace; padding: 6px 7px; border-radius: 5px; background: var(--surface-3); }
.dh-pm-m.get { color: #0b7a3e; } .dh-pm-m.post { color: #a35a00; } .dh-pm-m.patch { color: #6b3fa0; } .dh-pm-m.delete { color: #b42318; }
.dh-pm-send { background: #0b6bcb; color: #fff; font-weight: 600; padding: 6px 12px; border-radius: 6px; font-size: 12px; }
.dh-pm-tabs { display: flex; gap: 16px; padding: 0 12px; border-bottom: 1px solid var(--border); color: var(--text-3); font-size: 12px; overflow-x: auto; }
.dh-pm-tabs span { padding: 8px 0; white-space: nowrap; } .dh-pm-tabs span.on { color: var(--text); border-bottom: 2px solid #ff6c37; }
.dh-pm-pane { padding: 10px 12px; }
.dh-pm pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.5 ui-monospace, monospace; }
.dh-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; padding: 3px 0; } .dh-kv span { color: var(--text-3); } .dh-kv b { font-weight: 500; overflow-wrap: anywhere; }
.dh-pm-res { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; }
.dh-pm-res b.ok { color: var(--ok); } .dh-pm-res b.err { color: var(--danger, #b42318); }
.dh-pm-out { padding: 10px 12px !important; background: var(--surface-2); }
.dh-pm-cap { font-size: 11px; color: var(--text-3); padding: 6px 12px; border-top: 1px solid var(--border); }
@media (max-width: 700px) { .dh-steps > li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; } .dh-kv { grid-template-columns: 90px minmax(0, 1fr); } }

.c-dl { display: flex; flex-direction: column; gap: 16px; } .c-dl p { margin: 4px 0 8px; line-height: 1.5; }
