/* Academy management (functions_am_ui.php): public pages (link, join, pay, sign, my memberships)
   and the admin pages under updateacademy.php. Tokens from styles/modern.css / dark.css only. */

/* ---------- Public card pages ---------- */
.bc-amp { max-width: 600px; margin: 12px auto 48px; padding: 0 12px; }
.bc-amp--wide { max-width: 880px; }
.bc-amp-card { background: var(--bc-surface); border-radius: var(--bc-r-lg, 22px); box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line); overflow: hidden; }
.bc-amp-card + .bc-amp-card { margin-top: 16px; }
.bc-amp-cover { height: 120px; background: linear-gradient(120deg, #03b2d1, #5b4bd1 55%, #d4744f); background-size: cover; background-position: center; }
.bc-amp-logo { width: 84px; height: 84px; border-radius: 22px; margin: -44px auto 0; background: var(--bc-surface); box-shadow: 0 0 0 4px var(--bc-surface), 0 8px 20px -8px rgba(16, 16, 30, .35); display: grid; place-items: center; overflow: hidden; position: relative; }
.bc-amp-logo img { width: 100%; height: 100%; object-fit: cover; }
.bc-amp-logo b { font-size: 28px; color: var(--bc-ink); letter-spacing: -0.02em; }
.bc-amp-body { padding: 14px 22px 24px; }
.bc-amp-center { text-align: center; }
.bc-amp-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bc-muted); margin: 6px 0 4px; }
.bc-amp h1 { font-size: 25px; line-height: 1.2; margin: 0 0 6px; color: var(--bc-ink); letter-spacing: -0.02em; }
.bc-amp h2 { font-size: 18px; margin: 0 0 10px; color: var(--bc-ink); letter-spacing: -0.01em; }
.bc-amp-place { color: var(--bc-muted); font-size: 14px; margin: 0 0 14px; }
.bc-amp-lead { color: var(--bc-ink-2); font-size: 15px; line-height: 1.55; margin: 0 auto 18px; max-width: 460px; }
.bc-amp-actions { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 0 auto; }
.bc-amp-actions--row { flex-direction: row; flex-wrap: wrap; max-width: none; justify-content: flex-end; }
.bc-amp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.bc-amp .bc-amp-btn--primary, .bc-amp .bc-amp-btn--primary:hover { background: var(--bc-ink); color: var(--bc-surface); }
.bc-amp .bc-amp-btn--soft, .bc-amp .bc-amp-btn--soft:hover { background: var(--bc-surface-2); color: var(--bc-ink); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-amp .bc-amp-btn--quiet, .bc-amp .bc-amp-btn--quiet:hover { background: transparent; color: var(--bc-muted); min-height: 40px; }
.bc-amp-btn[disabled] { opacity: .5; cursor: default; }
.bc-amp-note { margin: 14px auto 0; font-size: 13px; color: var(--bc-muted); line-height: 1.5; max-width: 440px; }
.bc-amp-msg { margin: 0 auto 16px; max-width: 460px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; text-align: left; }
.bc-amp-msg--ok { background: color-mix(in srgb, var(--bc-green, #22c55e) 14%, var(--bc-surface)); color: var(--bc-ink); }
.bc-amp-msg--err { background: color-mix(in srgb, var(--bc-red, #ef4444) 14%, var(--bc-surface)); color: var(--bc-ink); }
.bc-amp-msg--info { background: var(--bc-surface-2); color: var(--bc-ink); }

/* Forms on public pages */
.bc-amp-form { display: grid; gap: 14px; text-align: left; }
.bc-amp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .bc-amp-grid2 { grid-template-columns: 1fr; } }
.bc-amp-field { display: flex; flex-direction: column; gap: 6px; }
.bc-amp-field > span { font-size: 13px; font-weight: 600; color: var(--bc-ink-2); }
.bc-amp-field small { font-size: 12px; color: var(--bc-muted); font-weight: 400; }
.bc-amp-input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bc-line-strong, var(--bc-line)); background: var(--bc-surface); color: var(--bc-ink); font: 500 15px var(--bc-font, inherit); box-sizing: border-box; }
.bc-amp-input:focus { outline: none; box-shadow: var(--bc-ring); border-color: var(--bc-accent); }
textarea.bc-amp-input { min-height: 90px; resize: vertical; }
.bc-amp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--bc-ink-2); line-height: 1.45; }
.bc-amp-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--bc-ink); }
.bc-amp-section { border-top: 1px solid var(--bc-line); padding-top: 16px; margin-top: 4px; }
.bc-amp-section h3 { font-size: 15px; margin: 0 0 10px; color: var(--bc-ink); }

/* Plan cards */
.bc-amp-plans { display: grid; gap: 10px; }
.bc-amp-plan { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--bc-line); background: var(--bc-surface); cursor: pointer; text-align: left; }
.bc-amp-plan:hover { border-color: var(--bc-line-strong, var(--bc-line)); }
.bc-amp-plan input { position: absolute; opacity: 0; pointer-events: none; }
.bc-amp-plan:has(input:checked) { border-color: var(--bc-accent); box-shadow: 0 0 0 1.5px var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 6%, var(--bc-surface)); }
/* A round mark on every choice, filled with a tick on the chosen one, so it is clear what is picked */
.bc-amp-plan::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--bc-line-strong, var(--bc-line)); background: var(--bc-surface); }
.bc-amp-plan:has(input:checked)::before { box-shadow: none; background: var(--bc-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.bc-amp-plan:has(input:focus-visible) { box-shadow: var(--bc-ring); }
.bc-amp-plan-main { flex: 1; min-width: 0; }
.bc-amp-plan-name { display: block; font-weight: 700; font-size: 15px; color: var(--bc-ink); }
.bc-amp-plan-desc { display: block; font-size: 13px; color: var(--bc-muted); margin-top: 2px; line-height: 1.45; }
@media (max-width: 520px) { .bc-amp-plan { flex-direction: column; gap: 6px; } .bc-amp-plan-price { text-align: left; } }
.bc-amp-plan-price { font-weight: 800; font-size: 16px; color: var(--bc-ink); white-space: nowrap; text-align: right; }
.bc-amp-plan-price small { display: block; font-weight: 500; font-size: 12px; color: var(--bc-muted); }

/* Signature pad */
.bc-amp-sigwrap { position: relative; border-radius: 14px; border: 1px dashed var(--bc-line-strong, var(--bc-line)); background: #fff; }
.bc-amp-sig { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; border-radius: 14px; }
.bc-amp-sigclear { position: absolute; top: 6px; right: 8px; font-size: 12px; background: #fff; border: 1px solid #ddd; color: #666; border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.bc-amp-doc { max-height: 320px; overflow: auto; padding: 14px 16px; border-radius: 14px; background: var(--bc-surface-2); font-size: 14px; line-height: 1.6; color: var(--bc-ink-2); text-align: left; white-space: pre-wrap; }

/* Lists on "My memberships" */
.bc-amp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bc-amp-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bc-surface-2); }
.bc-amp-item-main { flex: 1; min-width: 0; }
.bc-amp-item-title { font-weight: 700; color: var(--bc-ink); font-size: 15px; }
.bc-amp-item-meta { color: var(--bc-muted); font-size: 13px; margin-top: 2px; }
.bc-amp-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bc-surface); color: var(--bc-ink-2); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-amp-pill--green { background: color-mix(in srgb, var(--bc-green, #22c55e) 16%, var(--bc-surface)); box-shadow: none; }
.bc-amp-pill--amber { background: color-mix(in srgb, var(--bc-amber, #f59e0b) 18%, var(--bc-surface)); box-shadow: none; }
.bc-amp-pill--red { background: color-mix(in srgb, var(--bc-red, #ef4444) 16%, var(--bc-surface)); box-shadow: none; }
.bc-amp-qr { display: grid; place-items: center; margin: 8px auto 4px; }
.bc-amp-qr img, .bc-amp-qr canvas, .bc-amp-qr svg { width: 220px; height: 220px; border-radius: 16px; background: #fff; padding: 10px; }

/* ---------- Admin pages (inside the updateacademy.php settings shell) ---------- */
.bc-am-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.bc-am-kpi { padding: 14px 16px; border-radius: 16px; background: var(--bc-surface-2); }
.bc-am-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bc-muted); }
.bc-am-kpi-value { font-size: 24px; font-weight: 800; color: var(--bc-ink); letter-spacing: -0.02em; margin-top: 4px; line-height: 1.15; }
.bc-am-kpi-sub { font-size: 12px; color: var(--bc-muted); margin-top: 2px; }
.bc-am-kpi--alert .bc-am-kpi-value { color: var(--bc-red, #dc2626); }
.bc-am-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.bc-am-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--bc-ink-2); background: var(--bc-surface-2); text-decoration: none !important; }
.bc-am-tab span { color: var(--bc-muted); font-weight: 700; }
.bc-am-tab.is-active { background: var(--bc-ink); color: var(--bc-surface) !important; }
.bc-am-tab.is-active span { color: inherit; opacity: .75; }
.bc-am-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.bc-am-toolbar .bc-aa-search { flex: 1; min-width: 200px; }
/* Filters of equal width that never run off a phone screen (QA B7, Looks 10) */
.bc-am-toolbar--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.bc-am-toolbar--grid select { width: 100% !important; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.bc-am-toolbar--grid > .bc-aa-search { grid-column: 1 / -1; min-width: 0; }
.bc-am-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bc-am-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--bc-muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--bc-line); white-space: nowrap; }
.bc-am-table td { padding: 10px; border-bottom: 1px solid var(--bc-line); color: var(--bc-ink); vertical-align: middle; }
.bc-am-table tr:last-child td { border-bottom: 0; }
.bc-am-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-am-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bc-am-muted { color: var(--bc-muted); }
.bc-am-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bc-am-person a, .bc-am-person button { color: var(--bc-ink); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.bc-am-initials { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bc-surface-3, var(--bc-surface-2)); color: var(--bc-ink-2); font-weight: 700; font-size: 13px; flex: none; }
.bc-am-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .bc-am-detail { grid-template-columns: 1fr; } }
.bc-am-dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14px; margin: 0; }
.bc-am-dl dt { color: var(--bc-muted); }
.bc-am-dl dd { margin: 0; color: var(--bc-ink); word-break: break-word; }
.bc-am-steps { display: flex; gap: 6px; margin: 0 0 16px; }
.bc-am-step { flex: 1; height: 4px; border-radius: 4px; background: var(--bc-line); }
.bc-am-step.is-done { background: var(--bc-ink); }
.bc-am-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--bc-surface-2); margin: 0 0 16px; font-size: 14px; color: var(--bc-ink-2); line-height: 1.5; }
.bc-am-banner > i { font-size: 20px; color: var(--bc-ink); }
.bc-am-banner--warn { background: color-mix(in srgb, var(--bc-amber, #f59e0b) 16%, var(--bc-surface)); }
.bc-am-banner--ok { background: color-mix(in srgb, var(--bc-green, #22c55e) 14%, var(--bc-surface)); }
.bc-am-banner .bc-set-btn { margin-left: auto; flex: none; }
/* On a phone a banner's button goes under its text, so the text is not squeezed into a narrow column (Looks 3) */
@media (max-width: 640px) {
	.bc-am-banner:has(> .bc-set-btn) { flex-wrap: wrap; }
	.bc-am-banner:has(> .bc-set-btn) > span { flex: 1 1 calc(100% - 44px); min-width: 0; }
	.bc-am-banner > .bc-set-btn { margin-left: 32px; }
}
.bc-am-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 8px 0 0; }
.bc-am-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; height: 100%; justify-content: flex-end; }
.bc-am-chart-bar { width: 100%; max-width: 36px; border-radius: 6px 6px 2px 2px; background: var(--bc-ink); min-height: 2px; }
.bc-am-chart-lbl { font-size: 11px; color: var(--bc-muted); white-space: nowrap; }
.bc-am-chart-val { font-size: 11px; color: var(--bc-ink-2); font-weight: 600; white-space: nowrap; }
.bc-am-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bc-am-hint { font-size: 13px; color: var(--bc-muted); margin: -4px 0 14px; line-height: 1.5; }
/* Tax on running card memberships (Settings > Receipts, functions_am_tax.php) */
.bc-am-taxrun { margin: 6px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--bc-surface-2, rgba(127,127,127,.08)); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-am-taxrun-list { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13.5px; }
.bc-am-taxrun-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 0; border-bottom: 1px solid var(--bc-line); color: var(--bc-ink); }
.bc-am-taxrun-list li span:last-child { color: var(--bc-muted); font-variant-numeric: tabular-nums; }
.bc-am-taxper { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--bc-muted); }
.bc-am-taxper span { min-width: 38px; }
.bc-am-taxper input { width: auto; min-width: 150px; }
.bc-am-taxtable td.num, .bc-am-taxtable th.num, .bc-am-taxtable td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-am-printcard { display: inline-grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--bc-line); border-radius: 12px; width: 320px; background: #fff; color: #111; }
@media print {
	.bc-am-noprint, .bc-set-nav, .bc-set-top, header, footer, nav { display: none !important; }
	.bc-am-printcard { break-inside: avoid; margin: 6px; }
}

/* Rows with buttons (member page, next steps, leads): the buttons go under the text on phones */
@media (max-width: 640px) {
	.bc-set-main .bc-set-row:has(.bc-aa-rowbtns, .bc-set-btn) { flex-wrap: wrap; }
	.bc-set-main .bc-set-row:has(.bc-aa-rowbtns, .bc-set-btn) .bc-set-row-main { flex: 1 1 calc(100% - 64px); min-width: 0; }
	.bc-set-main .bc-set-row:has(.bc-aa-rowbtns, .bc-set-btn) .bc-set-row-act { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; padding-left: 0; }
	.bc-set-main .bc-set-row-act .bc-aa-rowbtns { justify-content: flex-start !important; }
}
@media (max-width: 520px) {
	.bc-amp-item { flex-wrap: wrap; }
	.bc-amp-item > .bc-amp-actions, .bc-amp-item > form, .bc-amp-item > a.bc-amp-btn { flex: 1 1 100%; justify-content: flex-start; }
}

/* Bulk bar on the member list */
.bc-am-bulkbar { position: sticky; bottom: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bc-surface); box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line); }
.bc-am-bulkbar strong { font-size: 13px; color: var(--bc-ink); margin-right: 4px; }

/* ---------- Overview (updateacademy_am_dashboard.php, functions_am_charts.php) ----------
   --am-c: cyan for magnitude, --am-c2: coral for the second series. Both pairs validated for
   colour blindness against the light and the dark surface. The hero is always dark, like Club TV. */
:root { --am-c: #0891b2; --am-c2: #d4744f; --am-violet: #5b4bd1; }
html[data-theme="dark"] { --am-c: #0ea5c4; --am-c2: #d96c45; --am-violet: #8b7cf0; }
.am-ov { display: grid; gap: 16px; font-variant-numeric: tabular-nums; }
.am-ov h2, .am-ov h3, .am-ov p { margin: 0; }
.am-ov a { text-decoration: none; }

/* Hero */
.am-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 26px; padding: 22px 24px 20px; color: #fff; background: #0c0d1d;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head acts" "main main" "foot foot"; gap: 20px 16px; }
.am-hero::before { content: ""; position: absolute; inset: -40% -10% -10% -10%; z-index: -2; background:
	radial-gradient(40% 55% at 12% 30%, rgba(3, 195, 227, .55), transparent 70%),
	radial-gradient(38% 60% at 55% 10%, rgba(91, 75, 209, .7), transparent 70%),
	radial-gradient(36% 50% at 88% 35%, rgba(224, 131, 90, .5), transparent 70%),
	radial-gradient(30% 45% at 72% 85%, rgba(154, 62, 168, .45), transparent 70%); filter: blur(12px); animation: am-drift 18s ease-in-out infinite alternate; }
.am-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 13, 29, 0) 35%, rgba(12, 13, 29, .6)); }
@keyframes am-drift { from { transform: translate3d(-3%, 0, 0) scale(1); } to { transform: translate3d(3%, 4%, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .am-hero::before { animation: none; } }
.am-hero-glow { display: none; }
.am-hero-head { grid-area: head; display: flex; align-items: center; gap: 14px; min-width: 0; }
.am-hero-logo { width: 52px; height: 52px; border-radius: 16px; overflow: hidden; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.am-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.am-hero-logo b { font-size: 18px; color: #fff; }
.am-hero-hi { font-size: 14px; color: rgba(255, 255, 255, .72); }
.am-hero-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
.am-hero-main { grid-area: main; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.am-hero-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.am-hero-num { font-size: clamp(56px, 9vw, 92px); font-weight: 800; letter-spacing: -0.05em; line-height: .9; color: #fff; text-shadow: 0 8px 40px rgba(3, 195, 227, .35); }
.am-hero-unit { font-size: 20px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.am-hero-count { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.am-hero-incl { margin: 0; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .72); }
.am-hero-delta { align-self: center; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(52, 211, 153, .18); color: #a7f3d0; box-shadow: inset 0 0 0 1px rgba(167, 243, 208, .25); }
.am-hero-delta.is-down { background: rgba(251, 146, 60, .18); color: #fed7aa; box-shadow: inset 0 0 0 1px rgba(254, 215, 170, .25); }
.am-hero-trend { width: min(340px, 100%); color: #7ee7fb; }
.am-hero-trend-lbl { display: block; font-size: 12px; color: rgba(255, 255, 255, .62); margin-bottom: 6px; }
.am-hero-trend .am-sparkwrap { height: 64px; }
.am-hero-foot { grid-area: foot; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.am-hero-note { font-size: 14px; color: rgba(255, 255, 255, .8); }
.am-hero-acts { grid-area: acts; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
	.am-hero { grid-template-columns: 1fr; grid-template-areas: "head" "main" "foot" "acts"; padding: 20px 18px 18px; border-radius: 22px; }
	.am-hero-acts { justify-content: flex-start; }
	.am-hero-acts .am-btn { flex: 1 1 auto; }
}

/* Faces */
.am-faces { display: flex; padding-left: 10px; flex-wrap: wrap; row-gap: 6px; }
/* A face is always its own size and round: a row's "> span { flex: 1 }" must never stretch it */
.am-face { position: relative; flex: none !important; max-width: none; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #2a2b45; color: #fff; font-weight: 700; letter-spacing: -0.01em; }
/* The photo is laid over the circle, out of the grid: a grid item's height:100% counts as auto while the row is
   sized, so a portrait photo grew the row to its own height (60px wide -> 128px tall) and spilled out of the ring */
.am-face > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; object-fit: cover; object-position: center; display: block; }
.am-face--ini { background: linear-gradient(145deg, hsl(var(--am-h, 220) 70% 62%), hsl(calc(var(--am-h, 220) + 40) 65% 45%)); }
.am-faces .am-face { margin-left: -10px; box-shadow: 0 0 0 3px #17182c; transition: transform .2s ease; }
.am-faces .am-face:hover { transform: translateY(-3px); z-index: 2; }
.am-face--more { width: 40px; height: 40px; font-size: 13px; background: rgba(255, 255, 255, .16); }
.am-face--more-phone { display: none !important; }
@media (max-width: 640px) {
	.am-faces { flex-wrap: nowrap; }
	.am-faces > .am-face:not(.am-face--more):nth-child(n+8), .am-faces > .am-face--more-wide { display: none !important; }
	.am-faces > .am-face--more-phone { display: grid !important; }
}
.am-face--belt { overflow: visible; }
.am-face--belt::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--am-ring); pointer-events: none; }

/* Buttons */
.am-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 13px; font-weight: 650; font-size: 14px; white-space: nowrap; border: 0; cursor: pointer; transition: transform .15s ease; }
.am-btn:active { transform: scale(.98); }
.am-ov .am-btn--light, .am-ov .am-btn--light:hover { background: #fff; color: #0c0d1d; }
.am-ov .am-btn--glass, .am-ov .am-btn--glass:hover { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.am-ov .am-btn--ink, .am-ov .am-btn--ink:hover { background: var(--bc-ink); color: var(--bc-surface); }
.am-ov .am-btn--soft, .am-ov .am-btn--soft:hover { background: var(--bc-surface-2); color: var(--bc-ink); }
.am-btn:focus-visible, .am-alert:focus-visible, .am-link:focus-visible { outline: 2px solid var(--am-c); outline-offset: 2px; }

/* Setup */
.am-setup { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 20px; background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-line); }
.am-setup-main { flex: 1; min-width: 0; }
.am-setup h3 { font-size: 16px; color: var(--bc-ink); }
.am-setup p { font-size: 14px; color: var(--bc-muted); margin-top: 2px; }
.am-setup-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; }
.am-setup-steps li { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; background: var(--bc-surface-2); color: var(--bc-muted); }
.am-setup-steps li.is-done { background: color-mix(in srgb, var(--am-c) 16%, var(--bc-surface)); color: var(--am-c); }
@media (max-width: 560px) { .am-setup { flex-wrap: wrap; } .am-setup > .am-btn { flex: 1 1 100%; } }

/* Ring */
.am-ring { position: relative; width: 64px; height: 64px; display: inline-grid; place-items: center; flex: none; }
.am-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.am-ring circle { fill: none; stroke-width: 7; }
.am-ring-track { stroke: var(--bc-surface-2); }
.am-ring-val { stroke: var(--am-violet); stroke-linecap: round; }
.am-ring b { font-size: 17px; font-weight: 800; color: var(--bc-ink); letter-spacing: -0.03em; }
.am-ring b small { font-size: 10px; font-weight: 700; color: var(--bc-muted); margin-left: 1px; }

/* Alerts */
.am-alerts { display: flex; gap: 8px; flex-wrap: wrap; }
.am-alert { display: inline-flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--bc-ink); background: color-mix(in srgb, var(--tone) 10%, var(--bc-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 26%, transparent); flex: 1 1 260px; }
.am-ov .am-alert, .am-ov .am-alert:hover { color: var(--bc-ink); }
.am-alert > i:first-child { color: var(--tone); }
.am-alert-go { margin-left: auto; font-size: 11px; color: var(--bc-muted); }
.am-alert--red { --tone: #dc2626; } .am-alert--amber { --tone: #d97706; } .am-alert--cyan { --tone: var(--am-c); }

/* KPI tiles */
.am-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1181px) { .am-tiles:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .am-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .am-tiles { grid-template-columns: 1fr; } }
.am-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-radius: 20px; background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-line); min-width: 0; }
.am-tile-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.am-tile-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; color: var(--t); background: color-mix(in srgb, var(--t) 14%, var(--bc-surface)); flex: none; }
.am-tile-lbl { font-size: 13px; font-weight: 600; color: var(--bc-ink-2); }
.am-tile-val { font-size: 28px; font-weight: 800; letter-spacing: -0.035em; color: var(--bc-ink); line-height: 1.1; overflow-wrap: anywhere; }
.am-tile-sub { font-size: 12.5px; color: var(--bc-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.am-tile-chart { margin-top: auto; padding-top: 12px; height: 46px; color: var(--am-c); box-sizing: content-box; }
.am-tile-chart--c2 { color: var(--am-c2); }
.am-tile-ringrow { display: flex; gap: 12px; align-items: center; margin-top: 2px; }
.am-tile-ringrow p { font-size: 12.5px; line-height: 1.45; color: var(--bc-muted); }
.am-delta { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--bc-surface-2); color: var(--bc-ink-2); white-space: nowrap; }
.am-delta i { font-size: 9px; }
.am-delta.is-up { background: color-mix(in srgb, #16a34a 14%, var(--bc-surface)); color: #15803d; }
.am-delta.is-down { background: color-mix(in srgb, #dc2626 12%, var(--bc-surface)); color: #b91c1c; }
html[data-theme="dark"] .am-delta.is-up { color: #6ee7b7; }
html[data-theme="dark"] .am-delta.is-down { color: #fca5a5; }
/* A tile that opens the page behind it */
a.am-tile--go { color: inherit; text-decoration: none !important; transition: box-shadow .15s; }
a.am-tile--go:hover { box-shadow: 0 0 0 2px var(--bc-accent, #5b4bd1); }
a.am-tile--go:focus-visible { outline: 2px solid var(--bc-accent, #5b4bd1); outline-offset: 2px; }
/* The member list's numbers (updateacademy_am_members.php): one calm row, 2 x 2 on a phone */
.am-mstats { margin: 0 0 16px; }
@media (min-width: 700px) { .am-mstats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 699px) { .am-mstats, .am-tiles.am-mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }   /* 2 x 2 on a phone (Looks 12) */
.am-mstats .am-tile { padding: 12px 14px 12px; border-radius: 16px; gap: 2px; }
.am-mstats .am-tile-top { margin-bottom: 2px; gap: 8px; }
.am-mstats .am-tile-icon { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.am-mstats .am-tile-val { font-size: 24px; }
@media (max-width: 420px) { .am-mstats .am-tile { padding: 11px 12px; } .am-mstats .am-tile-val { font-size: 22px; } .am-mstats .am-tile-sub { font-size: 12px; } }

/* Sparkline + mini bars */
.am-sparkwrap { position: relative; display: block; width: 100%; height: 100%; }
.am-spark { display: block; width: 100%; height: 100%; overflow: visible; }
.am-spark-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); pointer-events: none; }
.am-hero .am-spark-dot { box-shadow: 0 0 0 4px rgba(126, 231, 251, .25), 0 0 16px 2px rgba(126, 231, 251, .6); }
.am-minibars { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.am-minibar { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.am-minibar i { display: block; width: 100%; border-radius: 4px 4px 1px 1px; background: currentColor; opacity: .38; transition: opacity .15s; }
.am-minibar.is-last i, .am-minibar:hover i { opacity: 1; }

/* Cards */
.am-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.am-grid-anchor { grid-column: 1 / -1; height: 0; margin-bottom: -16px; }
/* Overview: a card alone on the last row takes the whole row (Looks 2) */
.am-grid--dash > .am-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.am-alerts > .am-alert { align-self: stretch; }
/* Insights' numbers fill each row (Looks 1): no empty slots after the last one */
@media (min-width: 700px) { .am-ins-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (max-width: 900px) { .am-grid { grid-template-columns: 1fr; } }
.am-card { padding: 18px 18px 16px; border-radius: 22px; background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-line); min-width: 0; }
.am-card--wide { grid-column: 1 / -1; }
.am-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.am-card-head h3 { font-size: 16px; font-weight: 700; color: var(--bc-ink); letter-spacing: -0.01em; }
.am-card-head p { font-size: 13px; color: var(--bc-muted); margin-top: 2px !important; }
.am-card-figure { text-align: right; }
.am-card-figure b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--bc-ink); }
.am-card-figure span { font-size: 12px; color: var(--bc-muted); }
.am-card-foot { font-size: 12px; color: var(--bc-muted); margin-top: 10px !important; }
.am-link { font-size: 13px; font-weight: 600; color: var(--bc-accent); white-space: nowrap; }
.am-empty { text-align: center; padding: 34px 20px; }
.am-empty > i { font-size: 30px; color: var(--am-c); margin-bottom: 10px; }
.am-empty p { color: var(--bc-muted); font-size: 14px; max-width: 420px; margin: 6px auto 16px !important; }
.am-empty-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Area chart: HTML labels around a stretched SVG plot */
.am-area { margin: 0; position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 220px 24px; }
@media (max-width: 640px) { .am-area { grid-template-rows: 170px 24px; } }
.am-area-y { position: relative; }
.am-area-y span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--bc-muted); white-space: nowrap; }
.am-area-plot { position: relative; min-width: 0; }
.am-area-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.am-area-x { grid-column: 2; position: relative; }
.am-area-x span { position: absolute; top: 8px; transform: translateX(-50%); font-size: 11px; color: var(--bc-muted); white-space: nowrap; }
.am-area-x span:last-child { transform: translateX(-100%); }
.am-area-x span:first-child { transform: none; }
.am-gl { stroke: var(--bc-line); stroke-width: 1; }
html[data-theme="dark"] .am-gl { stroke: rgba(255, 255, 255, .09); }
.am-area-line { fill: none; stroke: var(--am-c); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.am-area-hit { position: absolute; top: 0; bottom: 0; }
.am-cross-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--bc-ink-2); opacity: 0; transition: opacity .12s; pointer-events: none; }
.am-cross-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--am-c); box-shadow: 0 0 0 3px var(--bc-surface), 0 0 0 7px color-mix(in srgb, var(--am-c) 22%, transparent); pointer-events: none; transition: left .12s ease, top .12s ease; }
.am-area-plot.is-hover .am-cross-line { opacity: .4; }

/* Heatmap */
.am-heat { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 3px; align-items: center; }
.am-heat-h { font-size: 10.5px; color: var(--bc-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.am-heat-d { font-size: 11.5px; color: var(--bc-muted); text-align: center; padding-bottom: 2px; }
.am-heat-c { display: block; height: 18px; border-radius: 4px; background: var(--bc-surface-2); }
.am-heat-c[data-l="1"] { background: color-mix(in srgb, var(--am-c) 18%, var(--bc-surface)); }
.am-heat-c[data-l="2"] { background: color-mix(in srgb, var(--am-c) 36%, var(--bc-surface)); }
.am-heat-c[data-l="3"] { background: color-mix(in srgb, var(--am-c) 56%, var(--bc-surface)); }
.am-heat-c[data-l="4"] { background: color-mix(in srgb, var(--am-c) 78%, var(--bc-surface)); }
.am-heat-c[data-l="5"] { background: var(--am-c); }
.am-heat .am-heat-c:hover { box-shadow: 0 0 0 2px var(--bc-ink); }
.am-heat-legend { display: flex; align-items: center; gap: 3px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--bc-muted); }
.am-heat-legend .am-heat-c { width: 12px; height: 12px; }
.am-heat-legend span:first-child { margin-right: 4px; } .am-heat-legend span:last-child { margin-left: 4px; }

/* Belt rack */
.am-belts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.am-belts li { display: grid; grid-template-columns: 46px minmax(70px, 130px) 1fr 34px; gap: 10px; align-items: center; font-size: 13.5px; }
.am-belt { position: relative; height: 14px; border-radius: 4px; background: var(--belt); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), inset 0 -3px 0 rgba(0, 0, 0, .08); }
.am-belt i { position: absolute; right: 7px; top: 0; bottom: 0; width: 12px; background: #17171c; }
html[data-theme="dark"] .am-belt i { box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.am-belts-name { color: var(--bc-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-belts-bar { height: 8px; border-radius: 999px; background: var(--bc-surface-2); overflow: hidden; }
.am-belts-bar i { display: block; height: 100%; border-radius: 999px; background: var(--belt); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.am-belts-n { text-align: right; font-weight: 700; color: var(--bc-ink); }

/* Lists: most on the mats, people, classes */
.am-top, .am-people, .am-classes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.am-top li, .am-people li, .am-classes li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.am-top-pos { width: 18px; text-align: center; font-weight: 800; font-size: 14px; color: var(--bc-muted); flex: none; }
.am-top-main, .am-people-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.am-top-main a, .am-people-main a, .am-people-main b { color: var(--bc-ink); font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-people-main small { font-size: 12.5px; color: var(--bc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-top-bar { height: 6px; border-radius: 999px; background: var(--bc-surface-2); overflow: hidden; }
.am-top-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--am-c), var(--am-violet)); }
.am-top-n { text-align: right; font-weight: 800; font-size: 18px; color: var(--bc-ink); line-height: 1; letter-spacing: -0.02em; }
.am-top-n small { display: block; font-size: 11px; font-weight: 500; color: var(--bc-muted); letter-spacing: 0; margin-top: 3px; }
.am-classes-time { flex: none; min-width: 52px; padding: 0 6px; box-sizing: border-box; white-space: nowrap; /* min-width: "6:30 PM" on a 12-hour clock */ height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--am-c); background: color-mix(in srgb, var(--am-c) 12%, var(--bc-surface)); }

/* Tooltip (scripts/bc-am.js) */
.am-tip { position: fixed; z-index: 9999; pointer-events: none; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(14, 15, 30, .94); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; }
.am-tip.is-on { opacity: 1; }
html[data-theme="dark"] .am-tip { background: #f1f1f5; color: #0b0b10; }

/* Entrance: one orchestrated reveal of the hero number and the lines */
@media (prefers-reduced-motion: no-preference) {
	.am-hero-num { animation: am-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
	/* The wipe clips the line's wrapper, not the svg: the end dot is an HTML span beside the svg, so a clip on the
	   svg alone left the dot sitting at the right edge while the line was still on its way (QA: the hero sparkline).
	   One clip for line, fill and dot means the line reaches the dot, then the dot settles. "backwards", so nothing is
	   clipped once it has run (the hover dot and its ring stay whole). */
	.am-area-plot, .am-hero .am-sparkwrap { animation: am-wipe 1.3s .15s cubic-bezier(.4, 0, .2, 1) backwards; }
	.am-area-plot > .am-cross-dot, .am-hero .am-spark-dot { animation: am-dot-in .3s 1.3s cubic-bezier(.2, .8, .2, 1) backwards; }
}
@keyframes am-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes am-dot-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes am-wipe { from { clip-path: inset(-24px calc(100% + 24px) -24px -24px); } to { clip-path: inset(-24px -24px -24px -24px); } }
html[data-theme="dark"] .am-ov .am-top-main a, html[data-theme="dark"] .am-ov .am-people-main a, html[data-theme="dark"] .am-ov .am-alert { color: var(--bc-ink); }
html[data-theme="dark"] .am-ov .am-link { color: var(--bc-accent); }

/* Management pages: KPI tiles, charts and lists in the overview style */
.bc-am-kpi { background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-line); border-radius: 18px; }
.bc-am-kpi-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--bc-ink-2); }
.bc-am-kpi-value { font-size: 26px; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.bc-am-table th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.bc-am-chart-bar { background: linear-gradient(180deg, var(--am-c), color-mix(in srgb, var(--am-c) 70%, var(--am-violet))); }
.am-sub { font-size: 14px; font-weight: 700; color: var(--bc-ink); margin: 22px 0 10px; }
.am-details { margin-top: 14px; }
.am-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--bc-accent); margin-bottom: 10px; }
.am-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--bc-ink-2); margin-bottom: 10px; }
.am-legend span { display: inline-flex; align-items: center; gap: 6px; }
.am-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.am-flow-cols { display: flex; gap: 6px; height: 200px; }
.am-flow-col { flex: 1; min-width: 0; display: grid; grid-template-rows: 1fr 1fr 20px; cursor: default; }
.am-flow-up, .am-flow-down { display: flex; justify-content: center; }
.am-flow-up { align-items: flex-end; border-bottom: 1px solid var(--bc-line); }
.am-flow-down { align-items: flex-start; }
.am-flow-up i, .am-flow-down i { display: block; width: min(100%, 28px); }
.am-flow-up i { background: var(--am-c); border-radius: 4px 4px 0 0; }
.am-flow-down i { background: var(--am-c2); border-radius: 0 0 4px 4px; margin-top: 2px; }
.am-flow-col:hover i { filter: brightness(1.1); }
.am-flow-lbl { font-size: 11px; color: var(--bc-muted); text-align: center; padding-top: 4px; white-space: nowrap; overflow: hidden; }
.am-share { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.am-share li { display: grid; gap: 6px; }
.am-share-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.am-share-top b { color: var(--bc-ink); font-weight: 650; }
.am-share-top span { color: var(--bc-muted); }
.am-share .am-top-bar { height: 8px; }
.bc-set-main .am-heat, .bc-set-main .am-heat-legend { max-width: 720px; }

/* Member page hero (updateacademy_am_member.php) */
.am-hero--member { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id acts" "stats stats"; margin-bottom: 16px; }
.am-mhero-id { grid-area: id; display: flex; gap: 18px; align-items: center; min-width: 0; }
.am-mhero-id .am-face--belt::after { box-shadow: 0 0 0 3px var(--am-ring); inset: -5px; }
.am-mhero-id .am-face { box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }
.am-mhero-chips { margin-top: 8px; }
.am-mhero-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: #a5f3fc !important; }
.am-mstats { grid-area: stats; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.am-mstat { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.am-mstat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: #fff; line-height: 1.1; }
.am-mstat span { font-size: 12px; color: rgba(255, 255, 255, .7); }
@media (max-width: 640px) { .am-hero--member { grid-template-columns: 1fr; grid-template-areas: "id" "stats" "acts"; } .am-mhero-id { gap: 14px; } }
.am-mtrain { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; align-items: end; margin-bottom: 18px; }
@media (max-width: 760px) { .am-mtrain { grid-template-columns: 1fr; } }
.am-mtrain-cal { overflow-x: auto; }
.am-cal { display: grid; grid-template-columns: 30px repeat(var(--am-weeks), minmax(10px, 1fr)); gap: 3px; min-width: 380px; }
.am-cal-m { font-size: 10.5px; color: var(--bc-muted); white-space: nowrap; overflow: visible; height: 14px; }
.am-cal-d { font-size: 10.5px; color: var(--bc-muted); line-height: 1; }
.am-cal-c { min-height: 0; max-height: 18px; }
.am-cal-c.is-future { background: transparent; }
.am-mtrain-dow .am-tile-chart { color: var(--am-violet); padding-top: 0; }
.am-dow-lbl { display: flex; gap: 3px; margin-top: 4px; }
.am-dow-lbl span { flex: 1; text-align: center; font-size: 10.5px; color: var(--bc-muted); }
.am-hero--member { grid-template-areas: "id" "stats"; grid-template-columns: 1fr; }
.am-mhero-chips .bc-set-chip { background: rgba(255, 255, 255, .14) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2) !important; }

/* Donut (payments by method) */
.am-donut { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.am-donut-ring { position: relative; width: 150px; height: 150px; flex: none; }
.am-donut-ring svg { width: 100%; height: 100%; }
.am-donut-ring circle { fill: none; stroke-width: 13; cursor: default; }
.am-donut-ring circle:hover { stroke-width: 15; }
.am-donut-track { stroke: var(--bc-surface-2); }
.am-donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.am-donut-c b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--bc-ink); line-height: 1; }
.am-donut-c span { font-size: 12px; color: var(--bc-muted); }
.am-donut-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 180px; }
.am-donut-leg li { display: grid; grid-template-columns: 10px 1fr auto 38px; gap: 8px; align-items: center; font-size: 13.5px; }
.am-donut-leg i { width: 10px; height: 10px; border-radius: 3px; }
.am-donut-leg span { color: var(--bc-ink-2); }
.am-donut-leg b { color: var(--bc-ink); font-weight: 700; }
.am-donut-leg small { text-align: right; color: var(--bc-muted); font-size: 12px; }
.am-grid--pay { margin-bottom: 16px; }
.am-grid--pay .am-tile-chart { color: var(--am-c); }

/* Bare public pages (header.php $GLOBALS['bcBare']): signup, pay, sign. The academy is the brand:
   its cover photo fills the stage at the top, the card floats over it, Beltchecker only in the footer. */
body.bc-bare { background: var(--bc-bg, #f4f4f7); }
.bc-bare-content { padding: 0 !important; }
.bc-amp-page { position: relative; min-height: 100vh; min-height: 100dvh; padding: 56px 0 24px; isolation: isolate; }
.bc-amp-stage { position: absolute; inset: 0 0 auto 0; height: 360px; z-index: -1; overflow: hidden; background: #0c0d1d; }
.bc-amp-stage::before { content: ""; position: absolute; inset: -30% -10% 0 -10%; background:
	radial-gradient(40% 60% at 15% 40%, rgba(3, 195, 227, .55), transparent 70%),
	radial-gradient(40% 70% at 55% 10%, rgba(91, 75, 209, .7), transparent 70%),
	radial-gradient(35% 60% at 90% 45%, rgba(224, 131, 90, .5), transparent 70%); filter: blur(14px); animation: am-drift 18s ease-in-out infinite alternate; }
.bc-amp-page.has-cover .bc-amp-stage::before { inset: 0; filter: none; animation: none; background: var(--amp-cover) center var(--amp-cover-y, 50%) / cover no-repeat; transform: scale(1.04); }
.bc-amp-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 13, 29, .25), rgba(12, 13, 29, .55) 60%, var(--bc-bg, #f4f4f7)); }
.bc-amp-page.has-cover .bc-amp-stage::after { background: linear-gradient(180deg, rgba(12, 13, 29, .35), rgba(12, 13, 29, .6) 55%, var(--bc-bg, #f4f4f7)); }
html[data-theme="dark"] .bc-amp-stage::after { background: linear-gradient(180deg, rgba(12, 13, 29, .3), rgba(12, 13, 29, .6) 55%, var(--bc-bg, #0b0b10)); }
@media (prefers-reduced-motion: reduce) { .bc-amp-stage::before { animation: none; } }
.bc-amp-page .bc-amp { margin-top: 0; }
.bc-amp-page .bc-amp-card { box-shadow: 0 30px 80px -30px rgba(12, 13, 29, .55), 0 0 0 1px var(--bc-line); border-radius: 26px; }
.bc-amp-page .bc-amp-cover { height: 64px; background: none; }
.bc-amp-page .bc-amp-logo { margin-top: -52px; width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 0 0 5px var(--bc-surface), 0 16px 36px -14px rgba(12, 13, 29, .6); }
.bc-amp-page .bc-amp-body { padding: 16px 26px 28px; }
.bc-amp-page h1 { font-size: 28px; letter-spacing: -0.03em; }
.bc-amp-page .bc-amp-kicker { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--bc-accent); }
.bc-amp-page .bc-amp-plan { border-radius: 18px; padding: 16px 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.bc-amp-page .bc-amp-plan:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(12, 13, 29, .4); }
.bc-amp-page .bc-amp-plan:has(input:checked) { border-color: var(--bc-accent); box-shadow: 0 0 0 2px var(--bc-accent), 0 14px 30px -18px rgba(91, 75, 209, .6); background: color-mix(in srgb, var(--bc-accent) 5%, var(--bc-surface)); }
.bc-amp-page .bc-amp-plan-price { font-size: 18px; }
.bc-amp-page .bc-amp-btn--primary, .bc-amp-page .bc-amp-btn--primary:hover { background: linear-gradient(115deg, #0891b2, #5b4bd1 55%, #9a3ea8); color: #fff; box-shadow: 0 12px 26px -12px rgba(91, 75, 209, .7); }
.bc-amp-page .bc-amp-input { border-radius: 14px; min-height: 50px; background: var(--bc-surface); }
.bc-amp-page .bc-amp-section { border-top: 0; padding-top: 8px; }
.bc-amp-page .bc-amp-section h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.bc-amp-foot { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 18px 12px 0; font-size: 12.5px; color: var(--bc-muted); }
.bc-amp-foot a { color: var(--bc-muted) !important; text-decoration: none; font-weight: 600; }
.bc-amp-foot a:hover { color: var(--bc-ink) !important; }
@media (max-width: 520px) { .bc-amp-page { padding-top: 34px; } .bc-amp-page .bc-amp-body { padding: 14px 18px 22px; } .bc-amp-stage { height: 280px; } }
.bc-amp-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--bc-surface-2); margin-bottom: 4px; }
.bc-amp-seg label { position: relative; cursor: pointer; }
.bc-amp-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bc-amp-seg span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; font-weight: 650; font-size: 14.5px; color: var(--bc-ink-2); transition: background .15s, box-shadow .15s; }
.bc-amp-seg input:checked + span { background: var(--bc-surface); color: var(--bc-ink); box-shadow: 0 4px 14px -8px rgba(12, 13, 29, .4), 0 0 0 1px var(--bc-line); }
.bc-amp-seg input:focus-visible + span { box-shadow: var(--bc-ring); }
.bc-amp-page .bc-amp-form { gap: 18px; }
.bc-amp-page .bc-amp-input { font-size: 16px !important; }
.bc-amp-page .bc-amp-field > span { font-size: 13.5px; }
html[data-theme="dark"] .bc-amp-page .bc-amp-logo { box-shadow: 0 0 0 5px var(--bc-surface), 0 0 0 6px rgba(255, 255, 255, .1), 0 16px 36px -14px rgba(0, 0, 0, .8); }
.am-hero--member .am-mhero-id form, .am-hero--member .am-mhero-id .bc-am-inline + * { display: inline-flex; margin: 8px 6px 0 0; }
.am-hero--member .bc-set-btn { min-height: 32px !important; padding: 0 12px !important; font-size: 13px !important; background: rgba(255, 255, 255, .1) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22) !important; }
.am-hero--member .am-mhero-link { display: block; }

/* Staff roles: what a role can and cannot do (bcAmRoleCard) */
.bc-am-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 0 0 18px; }
.bc-am-role { border: 1px solid var(--bc-line, rgba(0,0,0,.08)); border-radius: 14px; padding: 14px 16px; }
.bc-am-role-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bc-am-role-head strong { font-size: 15px; }
.bc-am-role-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 18px; }
.bc-am-role-lbl { font-size: 12px; font-weight: 600; color: var(--bc-muted); margin: 0 0 4px; }
.bc-am-role ul { list-style: none; margin: 0 0 6px; padding: 0; }
.bc-am-role li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.45; padding: 2px 0; }
.bc-am-role li i { width: 14px; margin-top: 3px; flex: none; font-size: 12px; }
.bc-am-role-can i { color: var(--bc-green, #1f9d55); }
.bc-am-role-cannot i { color: var(--bc-muted); }

/* Per-person permissions (bcAmPermsPanel) */
.bc-am-perms { width: 100%; margin-top: 8px; }
.bc-am-perms summary { cursor: pointer; font-size: 13px; color: var(--bc-muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.bc-am-perms summary::-webkit-details-marker { display: none; }
.bc-am-perms[open] summary { color: inherit; margin-bottom: 8px; }
.bc-am-perms-tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--bc-amber-soft, rgba(245,158,11,.15)); color: var(--bc-amber, #b45309); }
.bc-am-perms-form { border: 1px solid var(--bc-line, rgba(0,0,0,.08)); border-radius: 12px; padding: 12px 14px; }
.bc-am-perms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 16px; }
.bc-am-perms-grid .bc-amp-check { margin: 0; font-size: 13.5px; }
.bc-am-perms-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* People waiting to be added (functions_am_requests.php) */
.bc-am-requests { border: 1px solid var(--bc-amber-line, rgba(245,158,11,.35)); background: var(--bc-amber-soft, rgba(245,158,11,.07)); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; }
.bc-am-requests h3 { font-size: 15px; margin: 0 0 4px; }
.bc-am-request-act .bc-set-inline { flex-wrap: wrap; gap: 6px; }

/* Team (updateacademy_am_team.php) */
.bc-am-team-roles { margin: 4px 0 16px; }
.bc-am-team-roles summary { cursor: pointer; font-size: 13.5px; color: var(--bc-muted); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.bc-am-team-roles summary::-webkit-details-marker { display: none; }
.bc-am-team-roles[open] summary { margin-bottom: 10px; color: inherit; }
.bc-am-team .bc-set-row-act { flex-wrap: wrap; gap: 6px; align-items: center; }
.bc-am-team-role select { width: auto; min-width: 150px; }
.bc-am-team-page { margin-top: 6px; }

/* Team: the roles in one row above the team card */
.bc-am-roles--row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 8px; }
.bc-am-roles--row .bc-am-role { background: var(--bc-surface, #fff); }
.bc-am-roles--row .bc-am-role-cols { grid-template-columns: minmax(0, 1fr); }
.bc-am-roles-note { margin: 0 0 16px; }
@media (max-width: 1100px) { .bc-am-roles--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bc-am-roles--row { grid-template-columns: minmax(0, 1fr); } }

.bc-am-team-fixed { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 10px; color: var(--bc-muted); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-am-team-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 13px; color: var(--bc-muted); }
.bc-am-team-note i { color: var(--bc-green, #16a34a); }

/* Team: the Permissions button opens the panel, so the panel needs no summary line of its own */
.bc-am-team .bc-am-perms > summary { display: none; }
.bc-am-team .bc-am-perms[open] { margin-top: 10px; }

/* Members' app: the app icon as it looks on a phone */
.ma-icon { display: flex; align-items: center; gap: 14px; }
.ma-icon img { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.18); object-fit: cover; }
.ma-icon b { display: block; font-size: 14px; }
.ma-icon span { display: block; font-size: 12.5px; color: var(--bc-muted); }
/* Language switch on members' pages (bcAmLangSwitch) */
.bc-amp-lang { display: inline-flex; align-items: center; gap: 6px; color: var(--bc-muted); font-size: 12.5px; }
.bc-amp-lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; padding: 4px 2px; cursor: pointer; }
.bc-amp-lang select:focus-visible { outline: 2px solid var(--bc-accent, #4f46e5); outline-offset: 2px; border-radius: 6px; }
.bc-amp-foot--lang { margin-top: 6px; }

/* The drawn belt (fnDrawBelt) on a member's page */
.am-mhero-belt { margin: 4px 0 8px; max-width: 220px; }
.am-belt-drawn { display: block; width: 120px; }

/* The academy's photo of a member (updateacademy_am_member.php): a plus on the face to add it */
.am-photo-add { position: relative; display: inline-grid; flex: none; cursor: pointer; border-radius: 50%; }
.am-photo-add:focus-within { outline: 3px solid #a5f3fc; outline-offset: 4px; }
.am-photo-plus { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #1d1e33; font-size: 13px; box-shadow: 0 0 0 3px var(--am-photo-ring, #2a2b45), 0 4px 10px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.am-photo-add:hover .am-photo-plus { transform: scale(1.1); }
.am-photo-add.is-busy .am-face { opacity: .5; }
.am-photo-add.is-busy .am-photo-plus i { animation: am-photo-spin 1s linear infinite; }
.am-photo-add.is-busy .am-photo-plus i::before { content: "\f110"; }
@keyframes am-photo-spin { to { transform: rotate(360deg); } }
.am-photo-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.am-photo-wrap--row { flex-direction: row; gap: 12px; --am-photo-ring: var(--bc-surface); }
.am-photo-wrap--row .am-photo-cambtn { margin: 0; }
.am-photo-remove { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--bc-ink-3, #8a8aa0); text-decoration: underline; text-underline-offset: 2px; }
.am-mhero-id .am-photo-remove { color: #a5f3fc; }
.am-photo-err { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: #fecaca; }
@media (prefers-reduced-motion: reduce) { .am-photo-add.is-busy .am-photo-plus i { animation: none; } }
.am-photo-cambtn { margin-top: 8px; }
.am-cam { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 16, .82); }
.am-cam-box { width: min(560px, 100%); display: grid; gap: 14px; }
.am-cam video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: #000; box-shadow: 0 0 0 4px rgba(255, 255, 255, .9); }
.am-cam video.is-mirror { transform: scaleX(-1); }
.am-cam-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* "Show QR": the member's card link at the desk (bcAmCardQrButton in functions_am_card.php) */
.bc-am-qrdlg { width: min(380px, calc(100vw - 32px)); padding: 22px 22px 18px; border: 0; border-radius: 20px; background: var(--bc-surface); color: var(--bc-ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: center; }
.bc-am-qrdlg::backdrop { background: rgba(10,10,16,.55); }
.bc-am-qrdlg h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; color: var(--bc-ink); }
.bc-am-qrdlg p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--bc-ink-2); }
.bc-am-qrbox { width: min(260px, 100%); margin: 4px auto 12px; padding: 10px; border-radius: 14px; background: #fff; }
.bc-am-qrbox svg { display: block; width: 100%; height: auto; }
.bc-am-qrdlg .bc-am-qrnote { font-size: 12px; color: var(--bc-muted); }
.bc-am-qrdlg form { margin: 0; }

/* Insights (updateacademy_am_insights.php): period tabs, section headings, columns, class table, cohorts, rings */
.am-ins-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.am-ins-top .bc-am-tabs { margin: 0; }
.am-ins-range { font-size: 13px; color: var(--bc-muted); }
.am-ins-h { margin-top: 12px; }
.am-ins-h h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--bc-ink); }
.am-ins-h p { font-size: 13.5px; color: var(--bc-muted); margin-top: 2px !important; }
.am-ins-none { display: flex; align-items: center; gap: 10px; padding: 18px 14px; border-radius: 14px; background: var(--bc-surface-2); color: var(--bc-muted); font-size: 14px; }
.am-ins-none i { color: var(--am-c); font-size: 16px; }
.am-ins-cols { margin: 0; }
.am-ins-cols-row { display: flex; gap: 8px; height: 190px; align-items: stretch; }
.am-ins-col { flex: 1; min-width: 0; display: grid; grid-template-rows: 18px 1fr auto; gap: 4px; cursor: default; }
.am-ins-col-v { font-size: 12px; font-weight: 700; color: var(--bc-ink-2); text-align: center; }
.am-ins-col-bar { display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--bc-line); }
.am-ins-col-bar i { display: block; width: min(100%, 40px); border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--am-c) 55%, var(--bc-surface)); transition: background .15s; }
.am-ins-col.is-max .am-ins-col-bar i, .am-ins-col:hover .am-ins-col-bar i { background: var(--am-c); }
.am-ins-col-l { font-size: 11px; line-height: 1.25; color: var(--bc-muted); text-align: center; overflow-wrap: anywhere; min-height: 28px; }
.am-ins-table td { vertical-align: middle; }
.am-ins-cname { color: var(--bc-ink); font-weight: 650; }
.am-ins-csub { display: block; font-size: 12px; color: var(--bc-muted); margin-top: 2px; }
.am-ins-when { white-space: nowrap; color: var(--bc-ink-2); }
.am-ins-muted { color: var(--bc-muted); }
.am-ins-table tr.is-quiet td { background: color-mix(in srgb, #d97706 6%, var(--bc-surface)); }
.am-ins-fill { display: inline-block; width: 44px; height: 6px; margin-right: 6px; border-radius: 999px; background: var(--bc-surface-2); overflow: hidden; vertical-align: middle; }
.am-ins-fill i { display: block; height: 100%; border-radius: 999px; background: var(--am-violet); }
.am-ins-spark { width: 110px; min-width: 90px; color: var(--am-c); }
.am-ins-spark .am-sparkwrap { height: 26px; }
.am-ins-person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.am-ins-person b { color: var(--bc-ink); font-weight: 650; }
.am-ins-person .am-belt { width: 40px; flex: none; }
.am-ins-cohorts { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.am-ins-cohorts li { display: grid; grid-template-columns: 76px 1fr 52px 40px; gap: 10px; align-items: center; font-size: 13px; }
.am-ins-cohort-m { color: var(--bc-ink-2); white-space: nowrap; }
.am-ins-cohort-n { text-align: right; font-weight: 700; color: var(--bc-ink); }
.am-ins-cohort-p { text-align: right; color: var(--bc-muted); }
.am-ins-cohorts .am-top-bar { height: 8px; }
.am-ins-rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .am-ins-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.am-ins-ringbox { display: grid; justify-items: center; gap: 4px; text-align: center; }
.am-ins-ringbox > b { font-size: 13px; color: var(--bc-ink); font-weight: 650; }
.am-ins-ringbox small { font-size: 12px; color: var(--bc-muted); }
.am-ins-ring-none { display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 6px var(--bc-surface-2); }
.am-ins-trial { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.am-ins-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 180px; }
.am-ins-facts li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--bc-ink-2); }
.am-ins-facts b { font-size: 20px; font-weight: 800; color: var(--bc-ink); min-width: 32px; letter-spacing: -0.02em; }
html[data-theme="dark"] .am-ins-table tr.is-quiet td { background: color-mix(in srgb, #d97706 12%, var(--bc-surface)); }

/* Pay with IRIS and other ways the academy confirms by hand (functions_am_otherpay.php) */
.bc-amp-otherpay { margin: 14px 0 0; padding: 16px 16px 14px; border-radius: 18px; background: var(--bc-surface-2); box-shadow: inset 0 0 0 1px var(--bc-line); text-align: left; }
.bc-amp-otherpay-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.bc-amp-otherpay-head strong { font-size: 16px; color: var(--bc-ink); }
.bc-amp-otherpay-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; background: var(--bc-ink); color: var(--bc-surface); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.bc-amp-otherpay-amount { margin: 4px 0 10px; font-size: 26px; font-weight: 800; color: var(--bc-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bc-amp-otherpay-list { margin: 0 0 10px; display: grid; gap: 6px; }
.bc-amp-otherpay-list > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bc-surface); }
.bc-amp-otherpay-list dt { font-size: 12.5px; color: var(--bc-muted); font-weight: 600; }
.bc-amp-otherpay-list dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-amp-otherpay-list dd span { flex: 1; min-width: 0; font-weight: 700; color: var(--bc-ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.bc-amp-otherpay-copy { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border-radius: 10px; border: 0; background: var(--bc-surface-2); box-shadow: inset 0 0 0 1px var(--bc-line); color: var(--bc-ink); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bc-amp-otherpay-text { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: var(--bc-ink-2); }
.bc-amp-otherpay-warn { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--bc-ink); background: color-mix(in srgb, var(--bc-amber, #f59e0b) 18%, var(--bc-surface)); }
.bc-amp-otherpay-form .bc-amp-btn { width: 100%; }
@media (max-width: 420px) { .bc-amp-otherpay-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Members pause their own membership (functions_am_pause.php, bcAmPauseSelfBox) */
.bc-amp-pause-box { flex-basis: 100%; margin-top: 2px; }
.bc-amp-pause-box > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding-left: 0; }
.bc-amp-pause-box > summary::-webkit-details-marker { display: none; }
.bc-amp-pause-box[open] > summary { margin-bottom: 8px; color: var(--bc-ink); }
.bc-amp-pause-box form { padding: 14px; border-radius: 14px; background: var(--bc-surface); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-amp-pause-rule { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--bc-ink-2); }
.bc-amp-pause-rule strong { color: var(--bc-ink); }
.bc-amp-pause-note { margin: 2px 0 12px; font-size: 13px; line-height: 1.4; color: var(--bc-muted); text-align: left; }
.bc-amp-pause { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bc-surface); box-shadow: inset 0 0 0 1px var(--bc-line); color: var(--bc-ink); font-size: 14px; }
.bc-amp-pause > i { color: var(--bc-accent); }
.bc-amp-pause > span { flex: 1; min-width: 160px; }
.bc-amp-pause form { margin: 0; }

/* ---------- Charts on the pages themselves (functions_am_pagecharts.php): leads, payments, grading, schedule, products, history ---------- */
.am-pc { margin: 0 0 16px; gap: 12px; }
.am-pc-grid { gap: 12px; align-items: stretch; }
.am-pc-card { padding: 14px 16px 14px; border-radius: 18px; }
.am-pc-card .am-card-head { margin-bottom: 10px; flex-wrap: wrap; }
.am-pc-card .am-card-head h3 { font-size: 15px; }
.am-pc-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.am-pc-go { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--bc-ink); background: var(--bc-surface-2); box-shadow: inset 0 0 0 1px var(--bc-line); }
.am-ov a.am-pc-go, .am-ov a.am-pc-go:hover, a.am-pc-go:hover { color: var(--bc-ink); text-decoration: none; }
.am-pc-go:hover { background: color-mix(in srgb, var(--am-c) 10%, var(--bc-surface-2)); }
.am-pc-go:focus-visible, .am-pc-tabs a:focus-visible, .am-pc-num:focus-visible { outline: 2px solid var(--am-c); outline-offset: 2px; }
.am-pc-go i { font-size: 11.5px; color: var(--bc-muted); }
.am-pc-hint { display: flex; align-items: center; gap: 8px; margin: 0 !important; font-size: 13px; color: var(--bc-muted); }
.am-pc-hint i { color: var(--am-c); }
.am-pc-tabs { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--bc-surface-2); }
.am-pc-tabs a { padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--bc-muted); white-space: nowrap; }
.am-ov .am-pc-tabs a:hover { color: var(--bc-ink); }
.am-ov .am-pc-tabs a.is-on { background: var(--bc-surface); color: var(--bc-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--bc-line); }
/* Funnel */
.am-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.am-funnel li { display: grid; grid-template-columns: minmax(96px, 130px) minmax(0, 1fr) 34px 38px; gap: 10px; align-items: center; font-size: 13px; cursor: default; }
.am-funnel-l { color: var(--bc-ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-funnel-bar { height: 14px; border-radius: 4px; background: var(--bc-surface-2); overflow: hidden; }
.am-funnel-bar i { display: block; height: 100%; border-radius: 4px; background: var(--am-c); }
/* Joined without a trial: under the funnel, set apart, a quieter bar (QA W10) */
.am-funnel li.am-funnel-aside { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--bc-line); }
.am-funnel-aside .am-funnel-l { color: var(--bc-muted); font-weight: 550; }
.am-funnel-aside .am-funnel-bar i { background: var(--am-c2, var(--am-c)); opacity: .7; }
.am-funnel li:last-child .am-funnel-bar i { background: var(--am-c2); }
.am-funnel li:hover .am-funnel-bar i { filter: brightness(1.08); }
.am-funnel-n { text-align: right; font-weight: 800; color: var(--bc-ink); }
.am-funnel-p { text-align: right; font-size: 12px; color: var(--bc-muted); }
.am-pc-src { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--bc-line); }
.am-pc-src h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--bc-ink-2); }
.am-pc-src ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.am-pc-src li { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px; gap: 10px; align-items: baseline; font-size: 13px; }
.am-pc-src li span { color: var(--bc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-pc-src li b { color: var(--bc-ink); }
.am-pc-src li small { color: var(--bc-muted); font-size: 12px; text-align: right; }
/* Columns over time: one or two series, stacked or side by side */
.am-pc-cols { margin: 0; }
.am-pc-cols .am-legend { margin-bottom: 6px; font-size: 12px; }
.am-pc-plot { position: relative; padding-top: 14px; }
.am-pc-ytop { position: absolute; top: 0; left: 0; font-size: 10.5px; color: var(--bc-muted); }
.am-pc-row { display: flex; gap: 4px; height: 130px; border-top: 1px dashed var(--bc-line); }
.am-pc-col { flex: 1; min-width: 0; display: grid; grid-template-rows: 1fr 18px; cursor: default; }
.am-pc-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--bc-line); }
.am-pc-bars > i { display: block; flex: 1; max-width: 18px; border-radius: 4px 4px 0 0; }
.am-pc-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; width: min(100%, 26px); height: 100%; gap: 2px; }
.am-pc-stack i { display: block; width: 100%; border-radius: 2px; }
.am-pc-stack i:last-child { border-radius: 4px 4px 2px 2px; }
.am-pc-col:hover .am-pc-bars i { filter: brightness(1.1); }
.am-pc-col:hover { background: color-mix(in srgb, var(--bc-ink) 4%, transparent); border-radius: 6px 6px 0 0; }
.am-pc-lbl { font-size: 10.5px; color: var(--bc-muted); text-align: center; padding-top: 4px; white-space: nowrap; overflow: visible; }
.am-pc-lbl.is-odd { visibility: hidden; }
.am-pc-cols.is-short .am-pc-row { height: 90px; }
html[data-theme="dark"] .am-ov .am-pc-tabs a { color: var(--bc-muted); }
html[data-theme="dark"] .am-ov .am-pc-tabs a.is-on, html[data-theme="dark"] .am-ov .am-pc-tabs a:hover { color: var(--bc-ink); }
/* Key numbers */
.am-pc-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0 0 12px; }
.am-pc-num { display: grid; gap: 1px; padding: 9px 12px; border-radius: 12px; background: var(--bc-surface-2); color: var(--bc-ink); min-width: 0; }
a.am-pc-num, a.am-pc-num:hover { color: var(--bc-ink); text-decoration: none; }
a.am-pc-num:hover { box-shadow: inset 0 0 0 1px var(--bc-line); }
.am-pc-num-l { font-size: 12px; font-weight: 600; color: var(--bc-ink-2); }
.am-pc-num b { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.am-pc-num small { font-size: 11.5px; color: var(--bc-muted); }
.am-pc-num.is-alert b { color: #b91c1c; }
html[data-theme="dark"] .am-pc-num.is-alert b { color: #fca5a5; }
/* Top products */
.am-pc-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.am-pc-top li { display: grid; gap: 4px; font-size: 13px; }
.am-pc-top-t { display: flex; justify-content: space-between; gap: 8px; }
.am-pc-top-t span { color: var(--bc-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-pc-top-t small { color: var(--bc-muted); white-space: nowrap; font-size: 12.5px; }
.am-pc-top .am-top-bar i { background: var(--am-c); }
/* Schedule: average people per class on each class */
.bc-aa-tt-avg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--bc-ink-2, var(--bc-ink)); }
.bc-aa-tt-avg i { display: inline-block; width: 26px; height: 5px; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; position: relative; }
.bc-aa-tt-avg i b { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--am-c); }
.am-pc-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--bc-surface-2); font-size: 13px; color: var(--bc-ink-2); }
.am-pc-strip b { color: var(--bc-ink); font-variant-numeric: tabular-nums; }
.am-pc-strip .am-pc-go { margin-left: auto; background: var(--bc-surface); }
/* A setting a chart button opens: scroll clear of the bar and light up for a moment */
.bc-am-goto { scroll-margin-top: 90px; border-radius: 14px; }
div.bc-am-goto { display: flow-root; padding: 2px 10px; margin-left: -10px; margin-right: -10px; }
.bc-am-goto:target { animation: am-goto 2.4s ease-out 1; }
@keyframes am-goto { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--am-c) 55%, transparent); background: color-mix(in srgb, var(--am-c) 8%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { .bc-am-goto:target { animation: none; box-shadow: 0 0 0 2px var(--am-c); } }
@media (max-width: 640px) {
	.am-pc-card { padding: 12px 12px 12px; }
	.am-pc-row, .am-pc-cols.is-short .am-pc-row { height: 84px; gap: 3px; }
	.am-pc-card.am-pc-more { display: none; }   /* a phone gets the main card only, the lists stay close */
	.am-funnel li { grid-template-columns: minmax(84px, 112px) minmax(0, 1fr) 30px 34px; gap: 8px; font-size: 12.5px; }
	.am-pc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-pc-num b { font-size: 17px; }
	.am-pc-acts { justify-content: flex-start; }
}
/* Settings: in-page menu (updateacademy_am_settings.php, 20 Nov 2026). A row of chips under the top bar that
   scrolls sideways; on a wide screen a quiet rail to the left of the cards. The lit item follows the scroll. */
.bc-am-setwrap { display: grid; grid-template-columns: minmax(0, 1fr); }
.bc-am-setwrap .bc-am-goto { scroll-margin-top: var(--am-goto-top, 90px); }
.bc-am-setmain { min-width: 0; }
.bc-am-setnav { --am-setnav-row: 1; position: sticky; top: var(--am-settop, 0px); z-index: 15; margin: -6px 0 14px; padding: 8px 0; background: color-mix(in srgb, var(--bc-bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.cl-main .bc-am-setnav { margin-inline: calc(-1 * clamp(16px, 3vw, 36px)); padding-inline: clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--bc-line); }
.bc-am-setnav-title { display: none; }
.bc-am-setnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.bc-am-setnav ul::-webkit-scrollbar { display: none; }
.bc-am-setnav li { flex: none; }
.bc-am-setnav a { display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--bc-ink-2, var(--bc-ink)) !important; text-decoration: none !important; background: var(--bc-surface); box-shadow: inset 0 0 0 1px var(--bc-line); transition: background .15s, color .15s, box-shadow .15s; }
.bc-am-setnav a:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-accent) 45%, var(--bc-line)); }
.bc-am-setnav a.is-active { color: var(--bc-accent) !important; background: color-mix(in srgb, var(--bc-accent) 11%, var(--bc-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-accent) 40%, transparent); }
.bc-am-setnav a:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
@media (max-width: 900px) { .cl-main .bc-am-setnav { margin-inline: -14px; padding-inline: 14px; } }
@media (min-width: 1200px) {
	.bc-am-setwrap { grid-template-columns: 176px minmax(0, 1fr); gap: 28px; align-items: start; }
	.bc-am-setnav, .cl-main .bc-am-setnav { --am-setnav-row: 0; top: calc(var(--am-settop, 72px) + 18px); margin: 2px 0 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
	.bc-am-setnav-title { display: block; margin: 0 0 8px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bc-muted); }
	.bc-am-setnav ul { flex-direction: column; gap: 1px; overflow: visible; border-left: 1px solid var(--bc-line); }
	.bc-am-setnav a { display: flex; height: auto; padding: 7px 12px; margin-left: -1px; border-radius: 0 10px 10px 0; font-size: 14px; font-weight: 550; background: none; box-shadow: none; border-left: 2px solid transparent; color: var(--bc-muted) !important; }
	.bc-am-setnav a:hover { color: var(--bc-ink) !important; background: var(--bc-surface-2); box-shadow: none; }
	.bc-am-setnav a.is-active { color: var(--bc-ink) !important; font-weight: 650; border-left-color: var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 8%, transparent); box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .bc-am-setnav a { transition: none; } }
/* Team: "What each role can do" folded under the list (20 Nov 2026) */
.bc-am-rolesmore { margin: 16px 0 0; border-radius: 14px; background: var(--bc-surface-2); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-am-rolesmore > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 650; color: var(--bc-ink-2, var(--bc-ink)); border-radius: 14px; }
.bc-am-rolesmore > summary::-webkit-details-marker { display: none; }
.bc-am-rolesmore > summary > i:first-child { color: var(--bc-muted); }
.bc-am-rolesmore-chev { margin-left: auto; font-size: 11px; color: var(--bc-muted); transition: transform .18s; }
.bc-am-rolesmore[open] .bc-am-rolesmore-chev { transform: rotate(180deg); }
.bc-am-rolesmore > summary:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.bc-am-rolesmore .bc-am-roles { margin: 0 12px 10px; }
.bc-am-rolesmore > .bc-am-hint { padding: 0 14px 14px; }
.bc-am-rolesmore { scroll-margin-top: 96px; }
/* ---- Round 2b (20 Nov 2026): one home per chart, Insights jump chips, belt groups ---- */
/* Insights: sticky jump chips under the app's top bar (--am-jump-top is set from .cl-top), sideways on a phone */
.am-jump { min-width: 0; position: sticky; top: var(--am-jump-top, 0px); z-index: 14; margin: 0 0 4px; padding: 8px 0; background: color-mix(in srgb, var(--bc-bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.cl-main .am-jump { margin-inline: calc(-1 * clamp(16px, 3vw, 36px)); padding-inline: clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--bc-line); }
@media (max-width: 900px) { .cl-main .am-jump { margin-inline: -14px; padding-inline: 14px; } }
.am-jump-row { min-width: 0; position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.am-jump-row::-webkit-scrollbar { display: none; }
.am-jump-chip { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--bc-ink-2, var(--bc-ink)) !important; text-decoration: none !important; background: var(--bc-surface); box-shadow: inset 0 0 0 1px var(--bc-line); transition: background .15s, color .15s, box-shadow .15s; }
.am-jump-chip:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-accent) 45%, var(--bc-line)); }
.am-jump-chip.is-on { color: var(--bc-accent) !important; background: color-mix(in srgb, var(--bc-accent) 11%, var(--bc-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-accent) 40%, transparent); }
.am-jump-chip:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.am-ins-h[data-am-jump-target] { scroll-margin-top: calc(var(--am-jump-top, 0px) + 66px); }
@media (prefers-reduced-motion: reduce) { .am-jump-chip { transition: none; } }
/* Overview: one small way to Insights and Reports instead of copies of their charts */
.am-morelinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 0 0 18px; }
.am-morelink { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-line); color: inherit !important; text-decoration: none !important; transition: box-shadow .15s; min-width: 0; }
.am-morelink:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc-accent) 45%, var(--bc-line)); }
.am-morelink:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.am-morelink > i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--bc-surface-2); color: var(--bc-muted); }
.am-morelink > span { display: grid; gap: 1px; min-width: 0; }
.am-morelink b { font-size: 14.5px; font-weight: 700; color: var(--bc-accent); }
.am-morelink small { font-size: 13px; color: var(--bc-muted); }
/* Reports: the line that sends training numbers to Insights */
.am-more { display: block; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; background: var(--bc-surface-2); font-size: 14px; color: var(--bc-ink-2, var(--bc-ink)); }
.am-more > i { margin-right: 6px; color: var(--bc-muted); }
.am-more a { white-space: nowrap; }
.am-more a { font-weight: 650; color: var(--bc-accent); }
/* Belt lists in two groups, Kids and Adults (bcAmBeltRack, Requirements, Curriculum) */
.am-beltgroups { display: grid; gap: 14px; }
.am-beltgroup-h { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bc-muted); }
.am-ins-table .am-beltgroup-row th { padding-top: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bc-muted); text-align: left; }
/* ---- end round 2b ---- */

/* Leads and trials as a board on desktop (functions_am_leadboard.php, UI sweep B8). A phone keeps the list (.am-ll). */
.am-lb { display: none; }
.am-ll-head { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 650; color: var(--bc-ink-2, var(--bc-ink)); }
@media (min-width: 1000px) {
  .am-lb { display: block; margin: 8px 0 4px; }
  .am-ll { display: none; }
}
.am-lb-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.am-lb-col { min-width: 0; padding: 10px; border-radius: 16px; background: var(--bc-surface-2); transition: box-shadow .15s, background .15s; }
.am-lb-col.is-over, .am-lb-lost.is-over { box-shadow: inset 0 0 0 2px var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 8%, var(--bc-surface-2)); }
.am-lb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px; }
.am-lb-head h3 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--bc-ink); }
.am-lb-n { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 20px; text-align: center; background: var(--bc-surface); color: var(--bc-ink-2, var(--bc-ink)); box-shadow: inset 0 0 0 1px var(--bc-line); }
.am-lb-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.am-lb-empty { display: none; margin: 0; padding: 14px 8px; border: 1px dashed var(--bc-line-strong, var(--bc-line)); border-radius: 12px; text-align: center; font-size: 12.5px; color: var(--bc-muted); }
.am-lb-cards:empty + .am-lb-empty { display: block; }
.am-lb-card { min-width: 0; padding: 10px 10px 8px; border-radius: 12px; background: var(--bc-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), inset 0 0 0 1px var(--bc-line); cursor: grab; }
/* The card being dragged waits as a dashed outline (no opacity: an opacity under 1 makes the card its own stacking
   layer, which put an open Move to menu at 45 % and under the next card) */
.am-lb-card.is-dragging { background: transparent; box-shadow: inset 0 0 0 2px var(--bc-line-strong, var(--bc-line)); outline: 2px dashed color-mix(in srgb, var(--bc-accent) 45%, transparent); outline-offset: -2px; }
.am-lb-card.is-dragging > * { visibility: hidden; }
.am-lb-card:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--bc-accent) 35%, transparent), inset 0 0 0 1px var(--bc-line); }
.am-lb-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.am-lb-who > :first-child { flex: none; }
.am-lb-name { min-width: 0; font-weight: 650; font-size: 14px; color: var(--bc-ink) !important; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-lb-name:hover { text-decoration: underline !important; }
.am-lb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; font-size: 12.5px; color: var(--bc-muted); }
.am-lb-meta .bc-set-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-lb-when { display: inline-flex; align-items: center; gap: 5px; color: var(--bc-ink-2, var(--bc-ink)); }
.am-lb-when--added { color: var(--bc-muted); }
.am-lb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 6px; }
.am-lb-acts .bc-set-icon { width: 32px; height: 32px; }
.am-lb-convert { display: contents; }
.am-lb-acts .am-lb-join { display: none; }
.am-lb-card[data-stage="attended"] .am-lb-acts .am-lb-join { display: inline-flex; }
.am-lb-card:not([data-stage="new"]):not([data-stage="contacted"]) .am-lb-book { display: none; }
.am-lb-move { position: relative; margin-left: auto; }
.am-lb-move > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--bc-ink-2, var(--bc-ink)); cursor: pointer; user-select: none; }
.am-lb-move > summary::-webkit-details-marker { display: none; }
.am-lb-move > summary:hover, .am-lb-move[open] > summary { background: var(--bc-surface-2); }
.am-lb-move > summary:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 1px; }
.am-lb-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--bc-surface); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--bc-line-strong, var(--bc-line)); display: grid; gap: 2px; }
.am-lb-menu form { display: grid; gap: 2px; }
.am-lb-menu form + form { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--bc-line); }
.am-lb-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; font-size: 13.5px; color: var(--bc-ink); cursor: pointer; }
.am-lb-menu button:hover, .am-lb-menu button:focus-visible { background: var(--bc-surface-2); outline: none; }
.am-lb-card[data-stage="new"] [data-lb-to="new"], .am-lb-card[data-stage="contacted"] [data-lb-to="contacted"], .am-lb-card[data-stage="booked"] [data-lb-to="booked"],
.am-lb-card[data-stage="attended"] [data-lb-to="attended"], .am-lb-card[data-stage="lost"] [data-lb-to="lost"] { display: none; }
.am-lb-foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 12px; }
.am-lb-lost { flex: 1 1 auto; min-width: 0; border-radius: 14px; background: var(--bc-surface-2); }
.am-lb-lost > summary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--bc-muted); cursor: pointer; list-style: none; }
.am-lb-lost > summary::-webkit-details-marker { display: none; }
.am-lb-lost > summary::before { content: "\203A"; display: inline-block; transition: transform .15s; }
.am-lb-lost[open] > summary::before { transform: rotate(90deg); }
.am-lb-lost[open] { padding-bottom: 10px; }
.am-lb-lost .am-lb-cards--wrap { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 0 10px; }
.am-lb-lost .am-lb-empty { margin: 0 10px; }
.am-lb-joined { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: var(--bc-muted) !important; text-decoration: none !important; background: var(--bc-surface-2); }
.am-lb-joined:hover { color: var(--bc-ink) !important; }
/* Leads board, owner 20 Nov 2026: the Move to menu over everything, opaque, the open card raised above the cards
   under it, upwards near the bottom of the window; pointer dragging without text selection */
.am-lb-card { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.am-lb-card.is-menu-open, .am-lb-card:has(> .am-lb-acts > [data-lb-menu][open]) { z-index: 40; }
.am-lb-move[open] { z-index: 2; }
.am-lb-move .am-lb-menu { z-index: 50; isolation: isolate; opacity: 1; background-color: var(--bc-surface, #fff); }
.am-lb-move.is-up .am-lb-menu { top: auto; bottom: calc(100% + 4px); }
.am-lb-ghost { position: fixed; left: 0; top: 0; z-index: 10000; margin: 0; list-style: none; pointer-events: none; cursor: grabbing; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--bc-line-strong, var(--bc-line)); will-change: transform; }
.am-lb-ghost .am-lb-move .am-lb-menu { display: none; }
html.am-lb-dragging, html.am-lb-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.am-lb-lost.is-over > summary { color: var(--bc-ink); }
/* Key numbers and charts above a page's main card, under its tabs (owner, 20 Nov 2026): one block, the same 16 px
   over the card on every page, 12 px between the numbers and the charts */
.am-above { display: grid; gap: 12px; margin: 0 0 16px; min-width: 0; }
.am-above > * { margin: 0 !important; min-width: 0; }
.am-above:empty { display: none; }
/* The member page's hero gives .am-mstats a grid area; in this block it is one full-width row */
.am-above > * { grid-area: auto; grid-column: 1 / -1; }
/* On a phone the numbers go two by two; an odd last one takes the whole row instead of leaving half of it empty */
@media (max-width: 699px) {
  .am-above .bc-am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-above .bc-am-kpis > :last-child:nth-child(odd), .am-above .am-pc-nums > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Budget (updateacademy_am_budget.php, scripts/bc-am-budget.js) ----------
   Profit green and loss orange: --am-pos / --am-neg, readable on the light and the dark surface. The hero is always
   dark, like the overview hero and Club TV. */
:root { --am-pos: #15803d; --am-neg: #c2410c; --am-be: #f5b301; }
html[data-theme="dark"] { --am-pos: #34d399; --am-neg: #fb923c; }
.am-bud { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; font-variant-numeric: tabular-nums; min-width: 0; }
.am-bud > *, .am-bud-hero > *, .am-bud-way, .am-bud-way b { min-width: 0; }
.am-bud > .bc-set-card, .am-bud > .am-pc-nums { margin: 0; }
.am-bud-sum { margin-left: 6px; font-weight: 600; color: var(--bc-muted); font-size: 13px; }
.am-pc-num.is-ok b { color: var(--am-pos); }
.am-pc-num.is-bad b { color: var(--am-neg); }
.am-bud .am-pc-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Hero */
.am-bud-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 18px; padding: 24px 26px 18px; border-radius: 26px; color: #fff;
	background: radial-gradient(120% 140% at 100% 0%, rgba(8, 145, 178, .35), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(91, 75, 209, .35), transparent 60%), #0c0d1d;
	box-shadow: var(--bc-shadow-2); --am-pos: #34d399; --am-neg: #fb923c; }
.am-bud-hero-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.am-bud-hero-main { display: grid; gap: 4px; justify-items: start; }
.am-bud-hero-l { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.am-bud-hero-num { font-size: clamp(30px, 5vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.am-bud-hero-sub { font-size: 14px; color: rgba(255, 255, 255, .72); }
.am-bud-chip { margin-top: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.am-bud-chip.is-ok { color: #0b3d2a; background: var(--am-pos); }
.am-bud-chip.is-bad { color: #431407; background: var(--am-neg); }
.am-bud-chip.is-even { color: #0c0d1d; background: #fff; }
.am-bud-hero-gauge { position: relative; width: 170px; display: grid; justify-items: center; }
.am-bud-hero-gauge svg { width: 170px; height: auto; display: block; }
.am-bud-g-track, .am-bud-g-val { fill: none; stroke-width: 11; stroke-linecap: round; }
.am-bud-g-track { stroke: rgba(255, 255, 255, .14); }
.am-bud-g-val.is-pos { stroke: var(--am-pos); }
.am-bud-g-val.is-neg { stroke: var(--am-neg); }
.am-bud-hero-gauge b { position: absolute; top: 46px; font-size: 28px; font-weight: 800; }
.am-bud-hero-gauge span { margin-top: -2px; font-size: 12px; color: rgba(255, 255, 255, .7); text-align: center; }
.am-bud-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.am-bud-way { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.am-bud-way i { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 15px; }
.am-bud-way.is-todo i { color: #fde68a; background: rgba(245, 179, 1, .16); }
.am-bud-way.is-good i { color: var(--am-pos); background: rgba(52, 211, 153, .16); }
.am-bud-way b { font-size: 15px; font-weight: 700; line-height: 1.25; }
.am-bud-way span { font-size: 12px; color: rgba(255, 255, 255, .66); }
.am-bud-hero-note { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .75); }

/* Members against break-even (in the hero) */
.am-bud-mchart { position: relative; color: rgba(255, 255, 255, .6); }
.am-bud-mchart .am-bud-svg { height: 190px; }
.am-bud-zone.is-pos { fill: rgba(52, 211, 153, .08); }
.am-bud-zone.is-neg { fill: rgba(251, 146, 60, .08); }
.am-bud-today { stroke: rgba(255, 255, 255, .25); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.am-bud-marea { fill: rgba(14, 165, 196, .22); }
.am-bud-mline { fill: none; stroke: #22d3ee; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.am-bud-mline.is-ahead { stroke-dasharray: 6 6; opacity: .9; }
.am-bud-be-line { stroke: var(--am-be); stroke-width: 2.5; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; }
.am-bud-be-tag { position: absolute; right: 0; transform: translateY(-120%); padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 800; color: #2a1d00; background: var(--am-be); pointer-events: none; }
.am-bud-today-tag { position: absolute; top: 0; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #0c0d1d; background: rgba(255, 255, 255, .85); pointer-events: none; }
.am-bud-mchart .am-bud-ylab span { background: transparent; color: rgba(255, 255, 255, .55); }
.am-bud-mchart .am-bud-axis { color: rgba(255, 255, 255, .55); }
.am-bud-mchart .am-bud-plot { position: relative; }

/* What if */
.am-bud-sliders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.am-bud-slider { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: 14px; background: var(--bc-surface-2); margin: 0; }
.am-bud-slider-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; font-size: 13.5px; font-weight: 700; color: var(--bc-ink); }
.am-bud-slider-head i { margin-right: 7px; color: var(--bc-muted); }
.am-bud-slider output { font-weight: 700; color: var(--am-c); white-space: nowrap; }
.am-bud-slider small { font-size: 12px; color: var(--bc-muted); line-height: 1.35; }
.am-bud-slider input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 2px 0; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; }
.am-bud-slider input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--bc-line-strong); }
.am-bud-slider input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--bc-line-strong); }
.am-bud-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; border: 3px solid var(--bc-surface); background: var(--am-c); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.am-bud-slider input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--bc-surface); background: var(--am-c); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.am-bud-slider input[type="range"]:focus-visible { outline: 2px solid var(--am-c); outline-offset: 3px; border-radius: 8px; }
.am-bud-slider.is-off { opacity: .7; }
.am-bud-slider.is-off input { display: none; }

/* Charts */
[data-bud-chart] { position: relative; display: block; min-width: 0; }
.am-bud-plot { margin-left: 64px; min-width: 0; }
.am-bud-svg { display: block; width: 100%; height: 200px; overflow: visible; }
.am-bud-zero { stroke: var(--bc-line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.am-bud-grid { stroke: var(--bc-line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.am-bud-hit { fill: transparent; }
.am-bud-bar.is-pos { fill: var(--am-pos); }
.am-bud-bar.is-neg { fill: var(--am-neg); }
[data-am-tip]:hover .am-bud-bar { opacity: .8; }
[data-am-tip]:hover .am-bud-hit { fill: color-mix(in srgb, var(--bc-ink) 5%, transparent); }
.am-bud-gap.is-pos { fill: color-mix(in srgb, var(--am-pos) 22%, transparent); }
.am-bud-gap.is-neg { fill: color-mix(in srgb, var(--am-neg) 22%, transparent); }
.am-bud-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.am-bud-line.is-rev { stroke: var(--am-c); }
.am-bud-line.is-exp { stroke: var(--am-violet); stroke-dasharray: 6 4; }
.am-bud-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--bc-muted); }
.am-bud-legend span { display: inline-flex; align-items: center; gap: 6px; }
.am-bud-legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.am-bud-legend i.is-rev { background: var(--am-c); }
.am-bud-legend i.is-exp { background: var(--am-violet); }
.am-bud-legend i.is-pos { height: 10px; background: color-mix(in srgb, var(--am-pos) 35%, transparent); }
.am-bud-legend i.is-neg { height: 10px; background: color-mix(in srgb, var(--am-neg) 35%, transparent); }
.am-bud-axis { display: flex; margin-top: 4px; font-size: 11.5px; color: var(--bc-muted); }
.am-bud-axis span { flex: 1 1 0; text-align: center; min-width: 0; overflow: visible; white-space: nowrap; }
.am-bud-axis span.is-off { visibility: hidden; }
.am-bud-ylab { position: absolute; top: -6px; left: 0; width: 58px; display: flex; flex-direction: column; justify-content: space-between; height: 212px; font-size: 11px; color: var(--bc-muted); text-align: right; pointer-events: none; }
.am-bud-mchart .am-bud-ylab { height: 202px; }
.am-bud-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.am-bud .am-sub { margin: 18px 0 8px; }

/* Where the money goes */
.am-bud-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.am-bud-per { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.am-bud-per li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--bc-surface-2); font-size: 13px; color: var(--bc-ink-2); }
.am-bud-per b { color: var(--bc-ink); white-space: nowrap; }
#bcAmBudgetItem .am-bud-day[hidden] { display: none; }

@media (max-width: 900px) {
	.am-bud-sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-bud .am-pc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-bud-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
	.am-bud-hero { padding: 18px 16px 14px; border-radius: 22px; }
	.am-bud-hero-top { grid-template-columns: minmax(0, 1fr); }
	.am-bud-hero-gauge { justify-self: center; }
	.am-bud-ways { grid-template-columns: minmax(0, 1fr); }
	.am-bud-sliders { grid-template-columns: minmax(0, 1fr); }
	.am-bud-svg, .am-bud-mchart .am-bud-svg { height: 160px; }
	.am-bud-ylab { height: 172px; width: 46px; }
	.am-bud-mchart .am-bud-ylab { height: 172px; }
	.am-bud-plot { margin-left: 52px; }
	.am-bud-axis span.is-odd { visibility: hidden; }
}
