/*
 * CoachCentral base styles. Quiet cool-gray neutrals, a slate navigation
 * column, and the logo's blue and marigold (logo: slate #1F2A37, blue #2383E2, marigold #EFA537); see
 * CoachCentralTheme.cs for the canonical token values. This file harmonizes
 * the Bootstrap CSS (still loaded for form controls and the .btn family)
 * with the MudBlazor theme so the two don't fight each other visually.
 */

:root {
    --cc-bg: #F7F8FA;
    --cc-surface: #FFFFFF;
    --cc-surface-2: #EFF1F4;
    --cc-border: #E4E7EB;
    --cc-border-strong: #CDD2D9;
    --cc-text: #1F2A37;
    --cc-text-muted: #5B6472;
    /* Decorative / disabled only (3.8:1 on white): never for text a
       person has to read. */
    --cc-text-faint: #7B8494;
    /* UI accent: the logo blue's deeper shade, so white button labels and
       blue link text clear WCAG AA (5.1:1). The logo's own #2383E2 is only
       3.9:1 against white; it stays as --cc-brand-blue for marks and fills. */
    --cc-accent: #1A6FC1;
    --cc-accent-hover: #165A9F;
    --cc-accent-soft: #E7F2FC;
    --cc-brand-blue: #2383E2;
    /* Slate: the logo's dark. The coach / staff navigation column wears it
       (see "Slate sidebar" below); text on it uses the two on-slate grays
       (8.8:1 and 5.6:1). */
    --cc-slate: #1F2A37;
    --cc-on-slate-muted: #C3CAD4;
    --cc-on-slate-faint: #97A1AF;
    /* On-brand text color (computed for the default --cc-accent;
       the BrandedSurface wrapper overrides on public surfaces with
       a luminance-correct value for the chosen brand color). */
    --cc-accent-on: #FFFFFF;
    --cc-accent-tint: #E7F2FC;
    /* Default button radius — public surfaces can override via the
       BrandedSurface wrapper based on Tenant.ButtonStyle. */
    --cc-button-radius: 0.5rem;
    /* App-chrome (TopNav) height. Single source of truth: the sticky sidebar
       pins its top offset + height to this, so a header change can't desync
       them (see MainLayout.razor.css / TopNav.razor.css). */
    --cc-topnav-height: 3.75rem;
    /* Brand marigold: the bar at the center of the logo. --cc-marigold is
       for fills only (the dashboard's today marker, "needs you" dots); it is
       2.0:1 on white, so never text. --cc-brand is its deep, text-safe shade
       (5.9:1) for the staff console's accents; --cc-brand-soft its tint. */
    --cc-marigold: #EFA537;
    --cc-brand: #8F5806;
    --cc-brand-soft: #FEF5E4;
    --cc-success: #448361;
    --cc-warning: #C67B5C;
    --cc-error: #B4524A;
    /* Attention: marigold for "needs you now" obligations (money owed,
       required signatures). A different hue from the blue accent (links,
       actions) so "you owe / you must" reads at a glance. --cc-attention is a
       fill (dots, left rules); text on the tint uses --cc-attention-text. */
    --cc-attention: #EFA537;
    --cc-attention-soft: #FDF4E3;
    --cc-attention-border: #F5DDB0;
    --cc-attention-text: #7A4E05;
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--cc-text);
    background-color: var(--cc-bg);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* While a support session is live, the fixed "Support is viewing this page"
   banner occupies the top of the viewport. Push the document down by its
   height (published as --cc-support-banner-h by support-presence.js; 0px
   otherwise) so the banner never covers the app's TopNav. */
body {
    padding-top: var(--cc-support-banner-h, 0px);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--cc-text);
    font-weight: 600;
    letter-spacing: -0.005em;
}

h1 { font-size: 2rem;     line-height: 1.25; }
h2 { font-size: 1.625rem; line-height: 1.3; }
h3 { font-size: 1.35rem;  line-height: 1.35; }
h4 { font-size: 1.175rem; line-height: 1.4; }

a, .btn-link {
    color: var(--cc-accent);
    text-decoration: none;
}

a:hover, .btn-link:hover {
    text-decoration: underline;
}

/* reCAPTCHA v3's floating badge, hidden on every page: it sat over the corner of
   the checkout's Pay button. Google's terms allow that when the page shows their
   notice instead, so every form that runs reCAPTCHA carries <RecaptchaNotice />
   (RecaptchaLoadingGuardTests checks). visibility, not display: the badge stays
   in the page, which cc-recaptcha.js looks for to spot a dead client. */
.grecaptcha-badge { visibility: hidden; }

/* Bootstrap button overrides — soft borders, no harsh
   gradient. We aim for "subtle but tactile." */
.btn {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-primary {
    color: #fff;
    background-color: var(--cc-accent);
    border-color: var(--cc-accent);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--cc-accent-hover, #165A9F);
    border-color: var(--cc-accent-hover, #165A9F);
    color: #fff;
}

.btn-outline-primary {
    color: var(--cc-accent);
    border-color: var(--cc-border-strong);
    background-color: var(--cc-surface);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--cc-accent-soft);
    border-color: var(--cc-accent);
    color: var(--cc-accent);
}

.btn-outline-secondary {
    color: var(--cc-text);
    border-color: var(--cc-border-strong);
    background-color: var(--cc-surface);
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: var(--cc-surface-2);
    border-color: var(--cc-border-strong);
    color: var(--cc-text);
}

.btn-outline-danger {
    color: var(--cc-error);
    border-color: var(--cc-border-strong);
    background-color: var(--cc-surface);
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
    background-color: #FBEEEC;
    border-color: var(--cc-error);
    color: var(--cc-error);
}

.btn-link {
    text-decoration: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.18);
    outline: none;
}

/* Form controls — Notion's input style is flat and quiet, no heavy chrome. */
.form-control, .form-select {
    background-color: var(--cc-surface);
    border-color: var(--cc-border-strong);
    color: var(--cc-text);
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Bootstrap draws the select's chevron as a background image at the right and
   reserves room for it with padding-right: 2.25rem. The shorthand above wipes
   that out, so long option text ran under the chevron. Give the room back. */
.form-select {
    padding-right: 2.25rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--cc-accent);
    background-color: var(--cc-surface);
    color: var(--cc-text);
}

.form-control::placeholder {
    color: var(--cc-text-faint);
}

/* Phones and tablets: 16px fields. The root size is 15px, so every 1rem field
   is 15px, and iOS Safari zooms the whole page in when a field under 16px takes
   focus, then leaves it zoomed. The bare `input`/`select`/`textarea` selectors
   also catch MudBlazor's inputs and pages that style fields themselves; the
   :not() list keeps checkboxes, radios and sliders as they are. */
@media (max-width: 640px), (pointer: coarse) {
    .form-control, .form-select,
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
    select, textarea {
        font-size: 16px;
    }
}

.form-label {
    color: var(--cc-text);
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.form-text {
    color: var(--cc-text-muted);
}

.form-check-input {
    border-color: var(--cc-border-strong);
}

.form-check-input:checked {
    background-color: var(--cc-accent);
    border-color: var(--cc-accent);
}

/* MudBlazor Outlined papers default to a darker rgba border. Soften to our
   token so cards don't feel walled-off from the page. */
.mud-paper-outlined {
    border-color: var(--cc-border) !important;
}

.mud-table thead th {
    color: var(--cc-text-muted);
    font-weight: 500;
    background-color: var(--cc-surface);
    border-bottom: 1px solid var(--cc-border) !important;
}

.mud-table-cell {
    border-bottom-color: var(--cc-border) !important;
}

.mud-table-row:hover {
    background-color: var(--cc-bg) !important;
}

/* MudAlert: tone the backgrounds down so they're informational rather than
   shouty. Material's defaults are saturated; we want Notion-like callouts. */
.mud-alert-filled-success { background-color: #E8F1EC !important; color: var(--cc-success) !important; }
.mud-alert-filled-warning { background-color: #F7EBE3 !important; color: var(--cc-warning) !important; }
.mud-alert-filled-error   { background-color: #F7E5E2 !important; color: var(--cc-error) !important; }
.mud-alert-filled-info    { background-color: var(--cc-accent-soft) !important; color: var(--cc-accent) !important; }

.mud-alert-filled-success .mud-alert-icon,
.mud-alert-filled-warning .mud-alert-icon,
.mud-alert-filled-error .mud-alert-icon,
.mud-alert-filled-info .mud-alert-icon {
    color: inherit !important;
}

.content {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--cc-success);
}

.invalid {
    outline: 1px solid var(--cc-error);
}

.validation-message {
    color: var(--cc-error);
}

.blazor-error-boundary {
    background-color: var(--cc-error);
    color: #fff;
    padding: 1rem 1rem 1rem 3.7rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: var(--cc-border-strong);
}

/* Booking slot button. Plain anchor that looks like a button — used in
   both the public booking flow and the client portal slot picker so the
   two surfaces stay visually consistent. Stacks a small "coach: X" line
   under the primary time when the visitor's TZ differs from the coach's. */
.bk-slot-btn {
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 0.3rem 0.8rem; min-width: 5rem;
    border: 1px solid var(--cc-accent); border-radius: 4px;
    color: var(--cc-accent); background: transparent;
    font-size: 0.9rem; font-weight: 500; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.bk-slot-btn:hover { background: var(--cc-accent-soft); }
.bk-slot-time { font-weight: 600; }
.bk-slot-coach-time {
    font-size: 0.7rem; font-weight: 400;
    opacity: 0.6; margin-top: 0.15rem;
    white-space: nowrap;
}

/* Subtle, warm scrollbars to match the canvas. */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--cc-border); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: var(--cc-border-strong); }

/* Course-authored content (Lesson.ContentHtml + Course.DescriptionHtml).
   Apply `.course-content` to any container that renders the
   sanitizer-cleaned TipTap output — the editor + the client player
   stay visually consistent. See docs/COURSES.md. */
.course-content :where(h2, h3) { margin-top: 1.25rem; }
.course-content img { max-width: 100%; height: auto; }
.course-content hr {
    border: 0; border-top: 2px solid var(--cc-border);
    margin: 1.5rem 0;
}
.course-content mark {
    background-color: #fff3a3;
    padding: 0.05rem 0.1rem;
    border-radius: 2px;
}
/* Task lists — pointer-events: none on the checkbox label so the
   v3 player renders them as static markers. v2 will wire interactive
   completion via a separate rendering path. */
.course-content ul[data-type="taskList"] {
    list-style: none; padding-left: 0;
}
.course-content ul[data-type="taskList"] li {
    display: flex; align-items: flex-start; gap: 0.5rem;
}
.course-content ul[data-type="taskList"] li > label {
    flex-shrink: 0; margin-top: 0.3rem; pointer-events: none;
}
.course-content ul[data-type="taskList"] li > div { flex-grow: 1; }
.course-content ul[data-type="taskList"] li > div > p { margin: 0; }
/* Tables — match the editor styling. */
.course-content table {
    border-collapse: collapse; margin: 0.75rem 0;
    width: 100%; table-layout: fixed;
}
.course-content table td, .course-content table th {
    border: 1px solid var(--cc-border);
    padding: 0.4rem 0.5rem; vertical-align: top;
}
.course-content table th {
    background: var(--cc-bg);
    font-weight: 600;
}

/* Centered narrow card for the anonymous auth pages (login, forgot /
   reset password). These render inside MainLayout (anon visitors on
   subdomains get the thin Sign-in header bar above); the card keeps the
   form at a readable width instead of letting the inputs stretch the
   full viewport. Shared here so all the auth screens match. */
.auth-shell {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
}
.auth-card {
    width: 100%;
    max-width: 24rem;
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.auth-title {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
}
.auth-aux a { color: var(--cc-text-muted); }
.auth-aux a:hover { color: var(--cc-text); }

/* Practice branding carried onto the auth card when the request resolves to a
   tenant host (see AuthShell.razor). Logo/name header + a quiet "Powered by". */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.auth-brand-logo {
    height: 3.5rem;
    width: auto;
    max-width: 72%;
    object-fit: contain;
}
.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--cc-accent);
    color: var(--cc-accent-on, #fff);
    font-weight: 700;
    font-size: 1.6rem;
}
/* ── Slate sidebar (coach + staff chrome) ─────────────────────────────────
   The logo's slate anchors the navigation column, so the palette reads slate +
   blue + marigold rather than blue on white. Coach and staff only: the client
   portal's sidebar stays light because it wears the practice's brand. Desktop
   only; the phone menu keeps its light panel. NavMenu / PlatformNavMenu rules
   are CSS-isolated, hence the extra .page .sidebar specificity here. The logo
   corner in TopNav / PlatformTopNav continues the same column. */
@media (min-width: 641px) {
    .page .sidebar.cc-sidebar-slate {
        background-color: var(--cc-slate);
        border-right-color: var(--cc-slate);
    }
    .page .sidebar.cc-sidebar-slate .nav-item .nav-link { color: var(--cc-on-slate-muted); }
    .page .sidebar.cc-sidebar-slate .nav-item .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.06);
        color: #FFFFFF;
    }
    .page .sidebar.cc-sidebar-slate .nav-item a.active {
        background-color: rgba(255, 255, 255, 0.10);
        color: #FFFFFF;
        box-shadow: none;
    }
    /* The nav glyphs are data-URI SVGs with a baked-in gray fill; recolor them. */
    .page .sidebar.cc-sidebar-slate .bi { filter: brightness(0) invert(0.82); }
    .page .sidebar.cc-sidebar-slate a.active .bi,
    .page .sidebar.cc-sidebar-slate a:hover .bi { filter: brightness(0) invert(1); }
    .page .sidebar.cc-sidebar-slate .nav-subhead { color: var(--cc-on-slate-faint); }
    /* Help center accordion. */
    .page .sidebar.cc-sidebar-slate .help-nav-home,
    .page .sidebar.cc-sidebar-slate .help-nav-cat > ul > li > a { color: var(--cc-on-slate-muted); }
    .page .sidebar.cc-sidebar-slate .help-nav-cat > summary,
    .page .sidebar.cc-sidebar-slate .help-nav-cat > summary:hover { color: var(--cc-on-slate-faint); }
    .page .sidebar.cc-sidebar-slate .help-nav-home:hover,
    .page .sidebar.cc-sidebar-slate .help-nav-cat > ul > li > a:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #FFFFFF;
    }
    .page .sidebar.cc-sidebar-slate .help-nav-home.active,
    .page .sidebar.cc-sidebar-slate .help-nav-cat > ul > li > a.active {
        background: rgba(255, 255, 255, 0.10);
        color: #FFFFFF;
    }
    /* Platform-admin context switch at the foot of the coach sidebar. */
    .page .sidebar.cc-sidebar-slate .nav-context-switch { border-top-color: rgba(255, 255, 255, 0.12); }
    .page .sidebar.cc-sidebar-slate .switcher-link { color: var(--cc-on-slate-muted); }
    .page .sidebar.cc-sidebar-slate .switcher-link:hover {
        background-color: rgba(255, 255, 255, 0.06);
        color: #FFFFFF;
    }
    .page .sidebar.cc-sidebar-slate a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -2px; }
}

/* CoachCentral's own logo on the apex (no-practice) sign-in card. */
.auth-brand-lockup {
    height: 34px;
    width: auto;
    display: block;
}
.auth-brand-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--cc-text);
}
.auth-poweredby {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--cc-text-muted);
}
.auth-poweredby-name { font-weight: 600; }

/* ============================================================================
 * Responsive data patterns — shared mobile primitives for the client portal
 * (and anywhere a wide table has to survive a phone). app.css was previously
 * breakpoint-free; this is the foundation. Two shapes:
 *   .cc-cardlist / .cc-datacard  — a list that IS cards at every width
 *                                  (auto columns on desktop, one-up on phones)
 *   table.cc-rtable              — a real table on desktop that collapses to
 *                                  labeled cards under 640px; cells carry
 *                                  data-label="Column".
 * Both are opt-in (new class names), so existing pages are untouched.
 * ==========================================================================*/

/* ---- Card list ---- */
/* The app's basic card surface. Defined here (not just in the public site.css,
   which the app shell doesn't load) so every in-app `.cc-card` — support threads,
   the help hub, contact panels — reads as a contained card against the page
   ground instead of floating. Padding is left to a paired `pa-*` utility (which
   loads after this and wins); bare `.cc-card` gets a sensible default. */
.cc-card {
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.cc-cardlist {
    display: grid;
    gap: 0.7rem;
    /* min(100%, 20rem) keeps a track from ever exceeding the container, so a
       narrow phone never gets a horizontal scrollbar. */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.cc-datacard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem 0.9rem;
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: 8px;
}
.cc-datacard-title { font-weight: 600; font-size: 1rem; color: var(--cc-text); }
.cc-datacard-meta { color: var(--cc-text-muted); font-size: 0.87rem; }
.cc-datacard-meta strong { color: var(--cc-text); font-weight: 600; }
.cc-datacard-when { font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-datacard-when .sub {
    display: block; font-weight: 400; color: var(--cc-text-muted);
    font-size: 0.82rem; margin-top: 0.1rem;
}
.cc-datacard-statrow {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; flex-wrap: wrap;
}
.cc-datacard-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* Actions grow to comfortable tap targets and wrap rather than cram; a lone
   button (e.g. Book) fills the row. min-width keeps 2–3 from getting tiny. */
.cc-datacard-actions .btn { flex: 1 1 auto; min-width: 6rem; padding: 0.5rem 0.85rem; }
/* A cancel/confirm form styled to sit in the action row like a button. */
.cc-datacard-actions form { display: contents; }

/* ---- Status pill ---- */
.cc-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.82rem; font-weight: 600; white-space: nowrap;
    padding: 0.2rem 0.55rem; border-radius: 999px;
    background: var(--cc-accent-soft); color: #1A6FC1;
}
.cc-pill-muted { background: var(--cc-surface-2); color: var(--cc-text-muted); }
.cc-pill-success { background: #E4F1EA; color: var(--cc-success); }
.cc-pill-warning { background: #F7E9E1; color: var(--cc-warning); }

/* ---- Responsive table: table on desktop, labeled cards under 640px ---- */
@media (max-width: 640px) {
    table.cc-rtable, table.cc-rtable thead, table.cc-rtable tbody,
    table.cc-rtable tr, table.cc-rtable th, table.cc-rtable td { display: block; }
    /* Keep the header row for screen readers but hide it visually. */
    table.cc-rtable thead {
        position: absolute; width: 1px; height: 1px;
        padding: 0; margin: -1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
    table.cc-rtable tr {
        border: 1px solid var(--cc-border); border-radius: 8px;
        margin-bottom: 0.7rem; padding: 0.15rem 0.1rem;
        background: var(--cc-surface);
    }
    table.cc-rtable td {
        display: flex; align-items: baseline; gap: 1rem;
        padding: 0.4rem 0.85rem; border: 0; text-align: right;
        white-space: normal;
    }
    /* Label pulled from the cell's data-label attribute, pinned left; the
       value flows to the right edge. */
    table.cc-rtable td[data-label]::before {
        content: attr(data-label);
        font-weight: 600; color: var(--cc-text-muted);
        text-align: left; margin-right: auto;
    }
    /* Label-less cells (e.g. a lone action button) just right-align. */
    table.cc-rtable td:not([data-label]) { justify-content: flex-end; }
    table.cc-rtable td:empty { display: none; }
}

/* ============================================================================
 * HeroBlock — the composed landing-page hero (background photo or gradient +
 * scrim + live title/badge). CSS lives here rather than inline in the component
 * so a LIST of heroes (e.g. shop cards) doesn't duplicate a <style> per card.
 * Markup: Components/Shared/HeroBlock.razor.
 * ==========================================================================*/
.hb {
    position: relative; overflow: hidden;
    border-radius: 12px; margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: clamp(210px, 32vw, 340px);
    /* Solid brand-tinted band as a base so the hero never looks broken with no
       photo; the photo (when set) paints over it. */
    background-color: var(--cc-accent, #2f5062);
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* Scrim between the photo and the text so words stay legible on a busy image. */
.hb::before { content: ''; position: absolute; inset: 0; pointer-events: none; }
.hb-scrim-dark::before { background: linear-gradient(180deg, rgba(8,15,22,.28) 0%, rgba(8,15,22,.58) 100%); }
.hb-scrim-light::before { background: rgba(255,255,255,.55); }

/* Curated gradient backgrounds — a coach can pick one instead of a photo. */
.hb-bg-dawn   { background-image: linear-gradient(160deg,#f4b183 0%,#e07a5f 34%,#b4526a 66%,#5f4b8b 100%); }
.hb-bg-forest { background-image: linear-gradient(160deg,#3a6b4c 0%,#2f5d43 40%,#24493a 70%,#15302a 100%); }
.hb-bg-ocean  { background-image: linear-gradient(168deg,#3c5f70 0%,#4d818d 34%,#2f5062 60%,#1d3547 100%); }
.hb-bg-sand   { background-image: linear-gradient(160deg,#e6d2ad 0%,#d3ab7c 38%,#b1815a 70%,#856048 100%); }
.hb-bg-slate  { background-image: linear-gradient(160deg,#6b7a8a 0%,#4a5766 42%,#333d49 72%,#1f262e 100%); }
.hb-bg-brand  { background-image: linear-gradient(160deg, var(--cc-accent) 0%, color-mix(in srgb, var(--cc-accent) 55%, #10151b) 100%); }

.hb-inner { position: relative; padding: 2rem 1.4rem; width: 100%; }
.hb-avatar {
    width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
    border: 3px solid rgba(255,255,255,.85); box-shadow: 0 2px 12px rgba(0,0,0,.3);
    margin: 0 auto .8rem; display: block;
}
.hb-subtitle { margin: .6rem auto 0; max-width: 36rem; font-size: 1.02rem; line-height: 1.45; }
.hb-scrim-dark  .hb-eyebrow, .hb-scrim-dark  .hb-title { color: #fff; }
.hb-scrim-light .hb-eyebrow, .hb-scrim-light .hb-title { color: var(--cc-text, #37352F); }
.hb-scrim-dark  .hb-subtitle { color: rgba(255,255,255,.92); }
.hb-scrim-light .hb-subtitle { color: var(--cc-text, #37352F); }
.hb-eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; font-weight: 600; opacity: .9; margin-bottom: .5rem; }
.hb-title {
    font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; margin: 0;
    font-size: clamp(1.7rem, 5vw, 2.9rem); text-shadow: 0 2px 16px rgba(0,0,0,.28);
}
.hb-scrim-light .hb-title { text-shadow: none; }
.hb-badge {
    display: inline-block; margin-top: 1rem; padding: .5rem 1.15rem;
    /* Always a fully-rounded pill so the badge reads as a tag, not a button. */
    border-radius: 999px; background: var(--cc-accent); color: var(--cc-accent-on);
    font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem;
    box-shadow: 0 2px 14px rgba(0,0,0,.22);
}

/* Compact variant for shop/listing card thumbnails: fills a fixed-aspect
   container and scales the title to the CARD width via container queries — the
   card gives the hero its own `container-type: inline-size` ancestor. */
.hb.hb-compact { min-height: 0; height: 100%; margin-bottom: 0; border-radius: 0; }
.hb-compact .hb-inner { padding: .85rem .8rem; }
.hb-compact .hb-eyebrow { font-size: .58rem; margin-bottom: .2rem; }
.hb-compact .hb-title { font-size: clamp(.9rem, 7.5cqi, 1.5rem); }
.hb-compact .hb-subtitle { display: none; }
.hb-compact .hb-avatar { width: 46px; height: 46px; margin-bottom: .4rem; border-width: 2px; }
.hb-compact .hb-badge { margin-top: .45rem; padding: .24rem .65rem; font-size: .6rem; }

/* ── Contact → Appointments tab: appointment rows + collapsible utilities ── */
.cd-appt-rows { display: flex; flex-direction: column; gap: 8px; }
.cd-appt-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border: 1px solid var(--cc-border);
    border-radius: 10px; background: var(--cc-surface);
}
/* Past rows keep the border (from .cd-appt-row) but a white interior — the
   muted chip + status pill carry the "past" cue, no gray fill needed. */
.cd-appt-row-past { background: var(--cc-surface); }
.cd-appt-chip {
    flex: 0 0 auto; width: 50px; text-align: center;
    background: var(--cc-accent-soft); border-radius: 10px; padding: 6px 0; line-height: 1.05;
}
.cd-appt-chip-muted { background: var(--cc-surface-2); }
.cd-appt-chip-mon { display: block; font-size: .64rem; font-weight: 700; color: var(--cc-accent); letter-spacing: .05em; }
.cd-appt-chip-day { display: block; font-size: 1.3rem; font-weight: 700; color: var(--cc-accent); }
.cd-appt-chip-muted .cd-appt-chip-mon, .cd-appt-chip-muted .cd-appt-chip-day { color: var(--cc-text-muted); }
.cd-appt-main { flex: 1 1 auto; min-width: 0; }
.cd-appt-title { font-weight: 500; font-size: .95rem; }
.cd-appt-mode { font-weight: 400; font-size: .85rem; }
.cd-appt-sub { font-size: .82rem; }
.cd-appt-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cd-appt-actions form { display: inline; margin: 0; }
.cd-appt-migrated {
    display: inline-block; margin-left: .4rem; padding: .05rem .4rem;
    font-size: .68rem; border-radius: 4px; background: var(--cc-surface-2);
    color: var(--cc-text-muted); vertical-align: middle;
}
.cd-appt-past { margin-top: .25rem; }
.cd-appt-past > summary { cursor: pointer; padding: 4px 0; }

/* Collapsible migration + notification settings — quiet disclosure rows. */
.cd-disclosure > summary {
    cursor: pointer; list-style: none; display: flex; align-items: center;
    gap: 8px; padding: 8px 10px; font-size: .9rem; color: var(--cc-text); font-weight: 500;
}
.cd-disclosure > summary::-webkit-details-marker { display: none; }
.cd-disclosure > summary::before {
    content: "\203A"; color: var(--cc-text-muted); transition: transform .15s ease;
    font-size: 1.1rem; line-height: 1;
}
.cd-disclosure[open] > summary::before { transform: rotate(90deg); }
.cd-disclosure-note { margin-left: auto; font-size: .78rem; font-weight: 400; color: var(--cc-text-muted); }
.cd-disclosure-body { padding: 4px 12px 12px; }
.cd-disclosure > summary .cd-ico { color: var(--cc-text-muted); width: 1rem; height: 1rem; }

/* Inline line-icons (SVG). Sized in em so they track the text they sit in. */
.cd-ico { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.14em; }

/* Book / Meet-now card headers: accent icon + title on one row. */
.cd-card-head { display: flex; align-items: center; gap: 8px; }
.cd-card-head .cd-ico { width: 1.05rem; height: 1.05rem; color: var(--cc-accent); }
.cd-card-head strong { font-size: 1rem; }

/* "Appointments" title + count subtitle. */
.cd-appt-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
/* Uppercase group label above the Upcoming rows. */
.cd-appt-grouplabel {
    text-transform: uppercase; letter-spacing: .06em;
    font-size: .7rem; font-weight: 600; color: var(--cc-text-muted); margin: 2px 0 6px;
}

/* Mode tag (Virtual / In person) — middot separator + small icon. */
.cd-appt-title .cd-appt-mode { white-space: nowrap; }
.cd-appt-title .cd-appt-mode::before { content: "·"; margin: 0 .35rem; color: var(--cc-text-muted); }
.cd-appt-mode .cd-ico { width: .9em; height: .9em; margin-right: 3px; }

/* Sub-line chunks (time range, "for <member>") each stay on one line and
   wrap as whole units, so a narrow row never splits "10:50" from "AM". */
.cd-appt-sub > span { white-space: nowrap; }
/* "for <member>" on the sub-line — middot separator + person icon. */
.cd-appt-for { white-space: nowrap; }
.cd-appt-for::before { content: "·"; margin: 0 .35rem; color: var(--cc-text-muted); }
.cd-appt-for .cd-ico { width: .9em; height: .9em; margin-right: 3px; }

/* Settings cards (Record a past session, Notification settings): keep the
   Outlined border but force a white interior so every panel on the tab reads
   as one white-card system. Beats MudPaper's own .mud-paper background. */
.mud-paper.cd-settings-card { background: var(--cc-surface); }

/* Row overflow menu — a native <details> popover (SSR-safe, no JS to open). */
.cd-rowmenu { position: relative; }
.cd-rowmenu > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border: 1px solid var(--cc-border-strong); border-radius: 6px;
    background: var(--cc-surface); color: var(--cc-text-muted);
}
.cd-rowmenu > summary::-webkit-details-marker { display: none; }
.cd-rowmenu > summary:hover { background: var(--cc-surface-2); color: var(--cc-text); }
.cd-rowmenu-pop {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 172px;
    background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 4px; display: flex; flex-direction: column;
}
/* display:contents so the <form> wrapping the Cancel button generates no box —
   the button then stretches + left-aligns as a direct flex child, matching the
   <a> items (a block/inline form wrapper offsets the button otherwise). */
.cd-rowmenu-pop form { display: contents; }
.cd-rowmenu-item {
    /* justify-content:flex-start is load-bearing: MudBlazor ships a global
       `button { justify-content:center }` that would otherwise centre the
       icon+label of the (button) Cancel/Refund items while the <a> items sit
       left. Keep it explicit. */
    display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; text-align: left;
    padding: 7px 10px; font-size: .85rem; line-height: 1.2; color: var(--cc-text);
    background: none; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.cd-rowmenu-item:hover { background: var(--cc-surface-2); }
.cd-rowmenu-item .cd-ico { width: 1em; height: 1em; color: var(--cc-text-muted); }
.cd-rowmenu-item-danger { color: var(--cc-error); }
.cd-rowmenu-item-danger .cd-ico { color: var(--cc-error); }

/* Quick Actions — a labeled <details> menu (reuses .cd-rowmenu-pop / -item for
   the popup). The summary is a normal button; hide the default disclosure marker. */
.cd-quickmenu { position: relative; display: inline-block; }
.cd-quickmenu > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: .35rem;
}
.cd-quickmenu > summary::-webkit-details-marker { display: none; }
.cd-quickmenu > summary::marker { content: ""; }

/* Phones: a page header's actions wrap under the title, so the button can sit
   at either edge and a menu pinned to its right edge ran off the left of the
   screen. Open it full-width just under the button instead. With the details
   static, the popup positions against the page (left/right gutters), and
   top:auto keeps it where it falls in the flow, right below the summary. */
@media (max-width: 640px) {
    .cd-quickmenu { position: static; }
    .cd-quickmenu > .cd-rowmenu-pop {
        left: 1rem;
        right: 1rem;
        top: auto;
        min-width: 0;
        margin-top: 4px;
    }
    .cd-quickmenu .cd-rowmenu-item { padding: 12px; font-size: 1rem; }
}

/* ── Contact → Account tab: portal access + sessions/credits + purchases ── */
/* Status pills (login state). Soft fills are light-mode only, matching the
   coach chrome; the coach UI doesn't run in dark mode. */
.cd-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; white-space: nowrap; }
.cd-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cd-pill-ok { background: #E4F0E8; color: var(--cc-success); }
.cd-pill-warn { background: #F6E7DE; color: #9C5C3D; }
.cd-pill-off { background: var(--cc-surface-2); color: var(--cc-text-muted); }
.cd-access-email { font-size: 1rem; margin: .1rem 0 .15rem; }

/* Sessions & credits — balance rows with an emphasized remaining count. The bar
   fills with the *used* proportion (empty = fresh, full = spent). */
.cd-bal-rows { display: flex; flex-direction: column; gap: 8px; }
.cd-bal-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--cc-border); border-radius: 10px; background: var(--cc-surface); }
.cd-bal-main { flex: 1 1 auto; min-width: 0; }
.cd-bal-name { font-weight: 500; font-size: .95rem; }
.cd-bal-for { font-size: .8rem; color: var(--cc-text-muted); display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.cd-bal-for .cd-ico { width: .85em; height: .85em; }
.cd-bal-move { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--cc-accent); text-decoration: none; margin-top: 4px; }
.cd-bal-move:hover { text-decoration: underline; }
.cd-bal-move .cd-ico { width: .85em; height: .85em; }
.cd-bal-count { flex: 0 0 auto; width: 104px; text-align: right; }
.cd-bal-num { line-height: 1.05; }
.cd-bal-num .big { font-size: 1.5rem; font-weight: 700; color: var(--cc-accent); }
.cd-bal-num .lbl { font-size: .76rem; color: var(--cc-text-muted); margin-left: 2px; }
.cd-bal-of { font-size: .72rem; color: var(--cc-text-muted); }
.cd-bal-bar { height: 4px; border-radius: 3px; background: var(--cc-surface-2); margin-top: 6px; overflow: hidden; }
.cd-bal-bar > span { display: block; height: 100%; background: var(--cc-accent); }
.cd-bal-tag { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--cc-text-muted); background: var(--cc-surface-2); padding: .1rem .45rem; border-radius: 5px; }
.cd-bal-count.is-empty .big { color: var(--cc-text-muted); }
.cd-bal-count.is-empty .cd-bal-bar > span { background: var(--cc-border-strong); }

/* Purchase history — compact rows + lifetime-value stat in the header. */
.cd-ph-ltv { font-weight: 600; font-variant-numeric: tabular-nums; }
.cd-ph-rows { display: flex; flex-direction: column; }
.cd-ph-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--cc-border); }
.cd-ph-row:last-child { border-bottom: 0; }
.cd-ph-date { flex: 0 0 auto; width: 92px; font-size: .78rem; color: var(--cc-text-muted); }
.cd-ph-main { flex: 1 1 auto; min-width: 0; font-size: .9rem; }
.cd-ph-amt { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 500; font-size: .9rem; }
.cd-ph-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }

@media (max-width: 600px) {
    .cd-appt-row { flex-wrap: wrap; }
    .cd-appt-actions { width: 100%; justify-content: flex-start; }
    .cd-appt-for { white-space: normal; }
    .cd-ph-date { width: 100%; }
    .cd-ph-row { flex-wrap: wrap; }
}

/* ── Booking picker (ClientBook page + dashboard schedule overlay) ───── */
.cc-book-band {
    background: var(--cc-surface-2);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}
.cc-book-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem 1rem; align-items: end; }
@media (min-width: 640px) {
    .cc-book-grid { grid-template-columns: 1fr 1fr; }
    .cc-book-grid .cc-book-full { grid-column: 1 / -1; }
}
.cc-book-band .form-label { margin-bottom: 0.25rem; font-size: 0.82rem; color: var(--cc-text-muted); }

/* Segmented In person / Virtual */
.cc-seg { display: inline-flex; border: 1px solid var(--cc-border-strong); border-radius: 8px; overflow: hidden; }
.cc-seg-label {
    display: inline-flex; align-items: center; margin: 0;
    padding: 7px 16px; font-size: 0.9rem; cursor: pointer;
    color: var(--cc-text-muted); user-select: none; white-space: nowrap;
}
.cc-seg-label + .cc-seg-label { border-left: 1px solid var(--cc-border-strong); }
.cc-seg-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.cc-seg-label:has(.cc-seg-radio:checked) { background: var(--cc-accent); color: var(--cc-accent-on); }
.cc-seg-label:has(.cc-seg-radio:focus-visible) { outline: 2px solid var(--cc-accent); outline-offset: -2px; }

/* Available-times day cards */
.cc-book-daycard {
    display: flex; gap: 14px; align-items: flex-start;
    border: 1px solid var(--cc-border); border-radius: 8px;
    padding: 10px 12px; margin-bottom: 8px;
}
.cc-book-daycard-today { background: var(--cc-surface-2); }
.cc-book-daycard-empty { align-items: center; }
.cc-book-dayname { width: 108px; flex-shrink: 0; }
.cc-book-dayname-main { font-size: 0.85rem; font-weight: 600; }
.cc-book-dayname-today { font-size: 0.75rem; color: var(--cc-accent); }
.cc-book-daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-book-noslots { font-size: 0.8rem; color: var(--cc-text-muted); }
.cc-book-slot {
    background: var(--cc-surface); border: 1px solid var(--cc-border-strong);
    border-radius: 6px; padding: 6px 11px; font-size: 0.82rem;
    font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap;
}
.cc-book-slot:hover { background: var(--cc-accent-soft); border-color: var(--cc-accent); }

/* Custom time — one line */
.cc-book-customtime {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--cc-surface-2); border-radius: 8px; padding: 10px 12px;
}
.cc-book-ct-label { font-size: 0.85rem; color: var(--cc-text-muted); }
.cc-book-ct-field { display: inline-flex; flex-direction: column; gap: 2px; margin: 0; }
.cc-book-ct-fieldname { font-size: 0.75rem; font-weight: 500; color: var(--cc-text-muted); }
.cc-book-ct-date { width: 170px; }
.cc-book-ct-time { width: 150px; }
.cc-book-ct-tz { font-size: 0.78rem; color: var(--cc-text-faint); }

@media (max-width: 560px) {
    .cc-book-daycard { flex-direction: column; gap: 6px; }
    .cc-book-dayname { width: auto; }
}

/* ── Flatpickr theme ────────────────────────────────────────────────────
   Skins the vendored Flatpickr popup (wwwroot/lib/flatpickr, mounted by
   flatpickr-init.js on [data-cc-flatpickr] inputs) to the app's warm-neutral
   palette + blue accent, so the date/time picker matches the rest of the UI in
   every browser. flatpickr.min.css is linked BEFORE app.css (see App.razor),
   so these token-based rules win. The visible field is a copied .form-control,
   already themed; these rules cover the popup. */
.flatpickr-calendar {
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-button-radius);
    box-shadow: 0 6px 24px rgba(15, 15, 15, 0.12);
    font-family: 'Inter', system-ui, sans-serif;
}
/* the little pointer triangle: :after is the fill, :before the border edge */
.flatpickr-calendar.arrowTop:after { border-bottom-color: var(--cc-surface); }
.flatpickr-calendar.arrowTop:before { border-bottom-color: var(--cc-border); }
.flatpickr-calendar.arrowBottom:after { border-top-color: var(--cc-surface); }
.flatpickr-calendar.arrowBottom:before { border-top-color: var(--cc-border); }

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year { color: var(--cc-text); fill: var(--cc-text); }
.flatpickr-monthDropdown-months .flatpickr-monthDropdown-month { background: var(--cc-surface); }
span.flatpickr-weekday { color: var(--cc-text-muted); font-weight: 600; }

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg { fill: var(--cc-text-muted); }
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg { fill: var(--cc-accent); }

.flatpickr-day { color: var(--cc-text); border-radius: 6px; }
.flatpickr-day:hover,
.flatpickr-day:focus { background: var(--cc-surface-2); border-color: var(--cc-surface-2); }
.flatpickr-day.today { border-color: var(--cc-accent); }
.flatpickr-day.today:hover { background: var(--cc-accent-soft); border-color: var(--cc-accent); color: var(--cc-text); }
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: var(--cc-accent);
    border-color: var(--cc-accent);
    color: var(--cc-accent-on);
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: var(--cc-text-faint); }

/* time picker (hour / minute / AM-PM) — also the whole popup in time-only mode */
.flatpickr-calendar.hasTime .flatpickr-time { border-top: 1px solid var(--cc-border); }
.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-am-pm { color: var(--cc-text); }
.flatpickr-time input:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time .flatpickr-am-pm:focus { background: var(--cc-surface-2); }

/* ── File-preview lightbox (js/support-lightbox.js) ──────────────────────────
   Lives here, NOT injected by the script. Blazor enhanced navigation morphs the
   <head> to the new page's server-rendered head, which STRIPS a script-injected
   <style> — so after an in-app navigation the dialog opened with default styling
   (mispositioned, no backdrop) until a full refresh re-ran the script. A linked
   stylesheet is part of every page's head and survives the morph. The click
   handler is delegated on document, so it already survives; only the CSS didn't. */
.cc-lb{ inset:0; margin:auto; width:min(92vw,1100px); max-width:92vw; max-height:90vh;
  border:none; border-radius:12px; padding:0; overflow:hidden; background:#0b1220;
  box-shadow:0 24px 80px rgba(0,0,0,.5); }
.cc-lb::backdrop{ background:rgba(6,12,20,.72); }
.cc-lb-bar{ display:flex; align-items:center; gap:12px; padding:9px 13px; background:#111a2b;
  color:#e7edf5; font-family:system-ui,-apple-system,sans-serif; font-size:.85rem; }
.cc-lb-name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-lb-act{ margin-left:auto; color:#bfe9e2; text-decoration:none; font-weight:600; font-size:.8rem; }
.cc-lb-act:hover{ text-decoration:underline; }
.cc-lb-x{ background:transparent; border:0; color:#e7edf5; font-size:1.05rem; cursor:pointer;
  line-height:1; padding:2px 4px; }
.cc-lb-media{ display:block; width:100%; }
img.cc-lb-media{ max-height:calc(90vh - 42px); object-fit:contain; background:#0b1220; }
iframe.cc-lb-media{ height:calc(90vh - 42px); border:0; background:#fff; }
video.cc-lb-media{ max-height:calc(90vh - 42px); background:#000; }
audio.cc-lb-media{ width:100%; margin:0; padding:22px; box-sizing:border-box; }
.cc-lb-fallback{ display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:44px 24px; color:#e7edf5; font-family:system-ui,-apple-system,sans-serif; text-align:center; }
.cc-lb-fallback-ic{ font-size:2.6rem; }
.cc-lb-fallback-name{ font-weight:600; font-size:1rem; word-break:break-word; }
.cc-lb-fallback-note{ color:#93a2b1; font-size:.85rem; }
.cc-lb-fallback-dl{ margin-top:6px; background:#0e8c82; color:#fff; text-decoration:none;
  font-weight:600; font-size:.9rem; padding:9px 18px; border-radius:9px; }

/* ── Adopted-signature script fonts (self-hosted, SIL OFL) ───────────────────
   The e-sign "adopt your signature" picker (DocumentSign) renders a signer's
   typed name in one of these. Family names match SignatureStyles AND the fonts
   registered with QuestPDF, so the on-screen signature and the Certificate of
   Completion agree. Files: wwwroot/fonts/signature (browser) + embedded in
   Infrastructure (server). */
@font-face { font-family: 'Great Vibes'; src: url('/fonts/signature/GreatVibes-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Allura';      src: url('/fonts/signature/Allura-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sacramento';  src: url('/fonts/signature/Sacramento-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kalam';       src: url('/fonts/signature/Kalam-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }

/* ============================================================================
 * Client reports — Renewals coming up, Outstanding services, At-risk clients.
 * One row per family (a client on their own is a family of one) with member
 * chips, and a status stripe on each row's first cell. The tables are also
 * .cc-rtable, so on a phone each row folds into a labeled card; every value
 * cell wraps its content in one <span> so the value and its sub-line stay
 * stacked on the card's right side.
 * ==========================================================================*/
.crp-tiles { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.crp-tile {
    flex: 0 1 13rem; min-width: 10rem;
    background: var(--cc-surface); border: 1px solid var(--cc-border);
    border-radius: 8px; padding: 0.7rem 1rem 0.75rem;
}
.crp-tile-strong { border-color: var(--cc-accent); }
.crp-tile-attn { background: var(--cc-attention-soft); border-color: var(--cc-attention-border); }
.crp-tile-label {
    display: flex; align-items: center; gap: 0.45rem;
    font-size: 0.78rem; color: var(--cc-text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.crp-tile-value { font-size: 1.7rem; font-weight: 600; margin-top: 0.1rem; font-variant-numeric: tabular-nums; }
.crp-tile-note { font-size: 0.8rem; color: var(--cc-text-muted); }
.crp-tile-attn .crp-tile-label, .crp-tile-attn .crp-tile-note { color: var(--cc-attention-text); }

.crp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.crp-dot-out { background: var(--cc-error); }
.crp-dot-low { background: var(--cc-attention); }
.crp-dot-exp { background: var(--cc-warning); }

.crp-wrap {
    background: var(--cc-surface); border: 1px solid var(--cc-border);
    border-radius: 8px; overflow-x: auto;
}
table.crp-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0; }
.crp-table th {
    text-align: left; font-weight: 500; font-size: 0.82rem; color: var(--cc-text-muted);
    padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--cc-border); white-space: nowrap;
}
.crp-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--cc-border); vertical-align: top; }
.crp-table tbody tr:last-child td { border-bottom: 0; }
.crp-table th.crp-num, .crp-table td.crp-num { text-align: right; font-variant-numeric: tabular-nums; }
.crp-table tr.crp-group td {
    background: var(--cc-surface-2); padding: 0.4rem 0.75rem;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--cc-text-muted);
}
.crp-group .crp-dot { margin-right: 0.5rem; vertical-align: 1px; }
.crp-group-count { margin-left: 0.4rem; font-weight: 500; color: var(--cc-text-faint); }

/* Status stripe on the row's first cell. */
.crp-table td.crp-who { box-shadow: inset 3px 0 0 transparent; }
.crp-table tr.crp-out td.crp-who { box-shadow: inset 3px 0 0 var(--cc-error); }
.crp-table tr.crp-low td.crp-who,
.crp-table tr.crp-quiet td.crp-who { box-shadow: inset 3px 0 0 var(--cc-attention); }
.crp-table tr.crp-exp td.crp-who { box-shadow: inset 3px 0 0 var(--cc-warning); }

.crp-who > a { color: var(--cc-text); font-weight: 500; text-decoration: none; }
.crp-who > a:hover { text-decoration: underline; }
.crp-sub { display: block; margin-top: 0.1rem; font-size: 0.8rem; color: var(--cc-text-muted); }
.crp-dash { color: var(--cc-text-faint); }
.crp-pkg + .crp-sub + .crp-pkg { display: inline-block; margin-top: 0.35rem; }
.crp-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.crp-chip {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.05rem 0.5rem; border-radius: 999px; white-space: nowrap;
    font-size: 0.75rem; font-weight: 500; text-decoration: none;
    background: var(--cc-surface-2); color: var(--cc-text-muted);
}
a.crp-chip:hover { background: var(--cc-border); color: var(--cc-text); }
.crp-chip b { color: var(--cc-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.crp-chip-warn { background: var(--cc-attention-soft); color: var(--cc-attention-text); }

.crp-left {
    display: inline-block; min-width: 1.75rem; padding: 0.05rem 0.5rem; border-radius: 6px;
    font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
}
.crp-left-out { background: #F7E6E4; color: #8A3730; }
.crp-left-low { background: var(--cc-attention-soft); color: var(--cc-attention-text); }
.crp-left-exp { background: #F8ECE6; color: #84442A; }
.crp-left-has { background: var(--cc-attention-soft); color: var(--cc-attention-text); }

.crp-foot {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem;
    margin-top: 0.6rem; font-size: 0.86rem; color: var(--cc-text-muted);
}
.crp-foot a { font-weight: 500; }

@media (max-width: 640px) {
    .crp-tiles {
        display: grid; gap: 0.5rem;
        grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
    }
    .crp-tile { min-width: 0; padding: 0.55rem 0.7rem 0.6rem; }
    .crp-tile-label { font-size: 0.68rem; letter-spacing: 0.02em; }
    .crp-tile-value { font-size: 1.35rem; }
    .crp-wrap { background: none; border: 0; border-radius: 0; overflow: visible; }
    table.cc-rtable.crp-table tr.crp-group {
        border: 0; background: none; margin: 0.9rem 0 0.4rem; padding: 0;
    }
    table.cc-rtable.crp-table tr.crp-group td {
        background: none; padding: 0; justify-content: flex-start; text-align: left;
    }
    table.cc-rtable.crp-table td.crp-who { display: block; text-align: left; box-shadow: none; padding-top: 0.6rem; }
    table.cc-rtable.crp-table tr.crp-out { box-shadow: inset 3px 0 0 var(--cc-error); }
    table.cc-rtable.crp-table tr.crp-low,
    table.cc-rtable.crp-table tr.crp-quiet { box-shadow: inset 3px 0 0 var(--cc-attention); }
    table.cc-rtable.crp-table tr.crp-exp { box-shadow: inset 3px 0 0 var(--cc-warning); }
    table.cc-rtable.crp-table td.crp-num { text-align: right; }
}

/* ── Media chooser dialog (wwwroot/js/media-picker.mjs) ────────────────
   The visual grid behind every MediaAssetPicker field and the email
   editors' image picker: thumbnails for images, cards for files, search,
   the current choice outlined. Lives on <body>, so its styles live here. */
.cc-mc {
    /* An explicit width drops the UA's dialog centering; re-center (CLAUDE.md). */
    inset: 0; margin: auto;
    width: min(760px, calc(100vw - 2rem));
    max-height: min(80vh, 720px);
    padding: 0;
    border: 1px solid var(--cc-border, #ddd); border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    background: var(--cc-surface, #fff); color: var(--cc-text, #1F2A37);
    overflow: hidden;
}
.cc-mc[open] { display: flex; flex-direction: column; }
.cc-mc::backdrop { background: rgba(15, 23, 42, 0.35); }
.cc-mc-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1rem; border-bottom: 1px solid var(--cc-border, #eee);
}
.cc-mc-head h3 { margin: 0; font-size: 1rem; }
.cc-mc-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; line-height: 1; color: var(--cc-text-muted, #666); padding: 0 0.25rem;
}
.cc-mc-body { padding: 1rem; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.cc-mc-search { margin-bottom: 0.85rem; }
.cc-mc-grid {
    display: grid; gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
}
.cc-mc-tile {
    /* Stretch, not the buttons' usual centering, so a long name is cut at
       the tile's edge instead of spilling into the next tile. */
    display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem; min-width: 0;
    padding: 0.45rem; background: var(--cc-surface, #fff);
    border: 1px solid var(--cc-border, #ddd); border-radius: 8px;
    cursor: pointer; text-align: center; font: inherit; color: inherit;
}
.cc-mc-tile[hidden] { display: none; }
.cc-mc-tile:hover,
.cc-mc-tile:focus-visible {
    border-color: var(--cc-accent, #1A6FC1);
    box-shadow: 0 2px 8px rgba(26, 111, 193, 0.15);
    outline: none;
}
.cc-mc-tile.is-current {
    border-color: var(--cc-accent, #1A6FC1);
    box-shadow: 0 0 0 1px var(--cc-accent, #1A6FC1);
    background: var(--cc-accent-soft, #E7F2FC);
}
.cc-mc-tile img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
    background: var(--cc-surface-2, #EFF1F4); border-radius: 4px;
}
.cc-mc-icon {
    display: flex; align-items: center; justify-content: center;
    width: 100%; aspect-ratio: 4 / 3;
    font-size: 2rem; color: var(--cc-text-muted, #5B6472);
    background: var(--cc-surface-2, #EFF1F4); border-radius: 4px;
}
/* Two lines for the name, so titles that differ only at the end ("Session 1
   worksheet", "Session 2 worksheet") stay tellable apart; the tile's tooltip
   has the rest. */
.cc-mc-name {
    font-size: 0.8rem; line-height: 1.25;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere;
}
.cc-mc-meta {
    font-size: 0.7rem; color: var(--cc-text-muted, #5B6472);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-mc-empty { color: var(--cc-text-muted, #666); margin: 0; }
/* A field that wants a shape (MediaShapes; data-shape on the dialog): its tiles are
   cropped to that shape, as the page will show them; the ones that don't suit wait
   behind "Show all", tagged with why (Tall, Small…). */
.cc-mc-thumb { position: relative; display: block; }
.cc-mc[data-shape] .cc-mc-tile img { aspect-ratio: var(--cc-mc-aspect, 4 / 3); object-fit: cover; }
.cc-mc-tag {
    position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 999px;
    background: rgba(17, 24, 39, 0.82); color: #fff; font-size: 0.7rem; font-weight: 600; line-height: 1.5;
}
.cc-mc-fit { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0 0 0.85rem; }
.cc-mc-fit p { margin: 0; font-size: 0.85rem; color: var(--cc-text-muted, #5B6472); }
.cc-mc-toggle {
    border: 0; background: none; padding: 0; font: inherit; font-size: 0.85rem; font-weight: 500;
    color: var(--cc-accent, #1A6FC1); cursor: pointer;
}
.cc-mc-toggle:hover { text-decoration: underline; }
.cc-mc-toggle:focus-visible { outline: 2px solid var(--cc-accent, #1A6FC1); outline-offset: 2px; border-radius: 3px; }
.cc-mc-rest[hidden] { display: none; }
.cc-mc-why { margin: 1.1rem 0 0.6rem; font-size: 0.82rem; color: var(--cc-text-muted, #5B6472); }
/* The footer's upload: what's happening, then the library and Cancel. */
.cc-mc-status { flex: 1 1 auto; min-width: 0; }
.cc-mc-status.is-error { color: var(--cc-danger, #B42318); }
.cc-mc-library { color: var(--cc-accent, #1A6FC1); text-decoration: none; white-space: nowrap; }
.cc-mc-library:hover { text-decoration: underline; }
/* "Add a link…": a web address and a name above the grid. */
.cc-mc-link {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto; gap: 0.6rem; align-items: end;
    margin: 0 0 1rem; padding: 0.75rem; border: 1px solid var(--cc-border, #E4E7EB); border-radius: 8px;
    background: var(--cc-bg, #F7F8FA);
}
.cc-mc-link[hidden] { display: none; }
.cc-mc-link label { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; font-size: 0.8rem; font-weight: 500; }
.cc-mc-opt { font-weight: 400; color: var(--cc-text-muted, #5B6472); }
.cc-mc-link-btns { display: flex; gap: 0.25rem; }
@media (max-width: 640px) { .cc-mc-link { grid-template-columns: minmax(0, 1fr); } }
.cc-mc-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1rem; border-top: 1px solid var(--cc-border, #eee);
    background: var(--cc-bg, #F7F8FA); font-size: 0.85rem; color: var(--cc-text-muted, #5B6472);
}

/* ── Calendars ──────────────────────────────────────────────────────────
   The month grid (MonthGrid.razor, on the dashboard and the Calendar page),
   the SSR switch both use for Show cancelled, and the Calendar page's day and
   week timeline (CoachCalendar.razor). */

/* SSR toggle switch: a hidden checkbox styled as a switch; it navigates on
   change rather than binding (the pages are SSR). */
.cc-switch { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; user-select: none; }
.cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-switch-track { position: relative; width: 34px; height: 20px; flex: 0 0 auto;
                   border-radius: 999px; background: var(--cc-border); transition: background 0.15s ease; }
.cc-switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
                   border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25);
                   transition: transform 0.15s ease; }
.cc-switch input:checked + .cc-switch-track { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch-track .cc-switch-thumb { transform: translateX(14px); }
.cc-switch input:focus-visible + .cc-switch-track { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.cc-switch-label { font-size: 0.82rem; color: var(--cc-text-muted); white-space: nowrap; }

/* minmax(0, 1fr), not 1fr: a plain 1fr track can't shrink below its
   content, and the no-wrap event chips made some days wide enough to push
   the grid off a phone screen. */
.cc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
          background: var(--cc-border); border: 1px solid var(--cc-border);
          border-radius: 6px; overflow: hidden; }
.cc-cal-head { background: var(--cc-surface-2); padding: 6px 8px; font-weight: 600;
               text-align: center; font-size: 0.8em; color: var(--cc-text-muted);
               text-transform: uppercase; letter-spacing: 0.06em; }
.cc-cal-cell { background: var(--cc-surface); min-height: 96px; padding: 4px 6px; position: relative;
               font-size: 0.85em; color: var(--cc-text); }
.cc-cal-cell.muted { background: var(--cc-bg); color: var(--cc-text-muted); }
.cc-cal-cell.muted .cc-cal-day { font-weight: 400; }
.cc-cal-cell.today { background: var(--cc-brand-soft); }
/* Today's date sits in a marigold pill, the bar at the center of the logo. */
.cc-cal-cell.today .cc-cal-day {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.6rem; height: 1.6rem; padding: 0 0.45rem; box-sizing: border-box;
    border-radius: 999px; background: var(--cc-marigold); color: var(--cc-text);
    font-weight: 700; line-height: 1; }
.cc-cal-day { font-weight: 600; margin-bottom: 4px; position: relative; z-index: 1; }
.cc-cal-event { display: block; padding: 2px 4px; margin-bottom: 2px; position: relative; z-index: 1;
                border-radius: 4px; background: var(--cc-accent-soft);
                color: var(--cc-accent); text-decoration: none; font-size: 0.85em;
                line-height: 1.2; white-space: nowrap; overflow: hidden;
                text-overflow: ellipsis; }
.cc-cal-event:hover { background: #d5e6f9; text-decoration: none; }
.cc-cal-event.cancelled { background: var(--cc-surface-2); color: var(--cc-text-muted);
                          text-decoration: line-through; }
/* Group-program sessions get a distinct purple chip so they stand out
   from 1:1 appointments at a glance. */
.cc-cal-event-group { background: #EDE9FE; color: #5B21B6; }
.cc-cal-event-group:hover { background: #DDD6FE; color: #5B21B6; }
.cc-cal-time-short { display: none; }
/* Whole calendar cell opens the day; events sit above this stretched link. */
.cc-cal-cell-link { position: absolute; inset: 0; z-index: 0; }
.cc-cal-cell:hover { background: var(--cc-surface-2); }

/* Phones: seven ~48px columns. A chip shows only a short start time
   ("9a", "2:30p"), and the chips stop taking taps: a tap anywhere in a day
   opens that day, where every session has its full name and a tap target
   big enough to hit. */
@media (max-width: 640px) {
    .cc-cal-head { padding: 4px 0; font-size: 0.7em; letter-spacing: 0; }
    .cc-cal-cell { min-height: 64px; padding: 3px 2px; }
    .cc-cal-day { margin-bottom: 2px; }
    .cc-cal-event { padding: 2px 1px; text-align: center; font-size: 0.8em; pointer-events: none; }
    .cc-cal-time, .cc-cal-who { display: none; }
    .cc-cal-time-short { display: inline; }
}

/* The Calendar page's toolbar: view switch, prev / today / next, the range,
   and Show cancelled. Wraps on a narrow screen. */
.cc-calbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
.cc-calbar-title { font-size: 1.1rem; font-weight: 600; margin: 0 0.25rem; }
.cc-calbar .cc-switch { margin-left: auto; }
.cc-calnav { display: inline-flex; gap: 0.5rem; }
.cc-viewswitch { display: inline-flex; border: 1px solid var(--cc-border-strong); border-radius: 6px;
                 overflow: hidden; background: var(--cc-surface); }
.cc-viewswitch a { padding: 0.25rem 0.8rem; font-size: 0.875rem; font-weight: 500; line-height: 1.5;
                   color: var(--cc-text-muted); text-decoration: none; }
.cc-viewswitch a + a { border-left: 1px solid var(--cc-border-strong); }
.cc-viewswitch a:hover { background: var(--cc-surface-2); color: var(--cc-text); }
.cc-viewswitch a.on { background: var(--cc-surface-2); color: var(--cc-text); font-weight: 600; }
.cc-calwarn { background: var(--cc-attention-soft); border: 1px solid var(--cc-attention-border);
              color: var(--cc-attention-text); font-size: 0.82rem; padding: 6px 10px; border-radius: 6px;
              margin-bottom: 0.6rem; }
.cc-calday-summary { color: var(--cc-text-muted); font-size: 0.875rem; margin: 0 0 0.6rem; }

/* Day and week: one column per day, a time gutter, and the day's explained
   segments placed by their minutes (the page sets top and height). A week
   keeps its seven columns readable by scrolling sideways on a phone. */
.cc-wk-scroll { overflow-x: auto; }
.cc-wk { min-width: 760px; background: var(--cc-surface); border: 1px solid var(--cc-border);
         border-radius: 8px; overflow: hidden; }
.cc-wk.cc-wk-one { min-width: 0; }
.cc-wk-head, .cc-wk-body { display: grid; grid-template-columns: 56px repeat(var(--cc-wk-days, 7), minmax(0, 1fr)); }
.cc-wk-head { border-bottom: 1px solid var(--cc-border); }
.cc-wk-dh { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; padding: 0.45rem 0.6rem;
            border-left: 1px solid var(--cc-surface-2); color: var(--cc-text); text-decoration: none; }
.cc-wk-dh:hover { background: var(--cc-bg); color: var(--cc-text); }
.cc-wk-dn { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cc-text-muted); }
.cc-wk-dd { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cc-wk-dh.today .cc-wk-dd { display: inline-flex; align-items: center; justify-content: center;
                            min-width: 1.6rem; height: 1.6rem; padding: 0 0.45rem; border-radius: 999px;
                            background: var(--cc-marigold); color: var(--cc-text); font-size: 0.9rem; line-height: 1; }
.cc-wk-dc { margin-left: auto; font-size: 0.75rem; color: var(--cc-text-muted); white-space: nowrap; }
.cc-wk-body { position: relative; }
.cc-wk-gutter { position: relative; }
.cc-wk-hr { position: absolute; right: 8px; transform: translateY(-0.55em); font-size: 0.72rem;
            color: var(--cc-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-wk-col { position: relative; border-left: 1px solid var(--cc-surface-2); background: var(--cc-bg); }
.cc-wk-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--cc-surface-2); pointer-events: none; z-index: 1; }
.cc-wk-seg { position: absolute; left: 0; right: 0; overflow: hidden; font-size: 0.75rem; line-height: 1.25; }
.cc-wk-open, .cc-wk-buffer { background: var(--cc-surface); }
.cc-wk-closed { background: var(--cc-bg); }
.cc-wk-cap { background: #fdecec; color: #a13b3b; padding: 2px 6px; }
.cc-wk-block { left: 3px; right: 3px; border-radius: 5px; padding: 2px 6px; z-index: 2; }
/* Busy on a connected calendar: a light hatch with a grey edge, and its label on a
   solid chip so it reads over the hatch. The label used to sit straight on darker
   stripes in muted grey, which made a busy week hard to read (2026-12-04). */
.cc-wk-busy { background: repeating-linear-gradient(45deg, #F4F5F7, #F4F5F7 6px, #E9ECF0 6px, #E9ECF0 12px);
              border-left: 3px solid #A3ABB6; color: var(--cc-text); }
.cc-wk-busy .cc-wk-t { display: inline-block; max-width: 100%; vertical-align: top; margin-left: -2px; padding: 0 4px;
                       border-radius: 3px; background: rgba(255, 255, 255, 0.92); }
.cc-wk-blocked { background: var(--cc-surface-2); border: 1px dashed var(--cc-border-strong); color: var(--cc-text); }
.cc-wk-event { background: var(--cc-accent-soft); border-left: 3px solid var(--cc-accent); color: var(--cc-text);
               text-decoration: none; z-index: 3; }
.cc-wk-event:hover { background: #d5e6f9; color: var(--cc-text); }
.cc-wk-event.group { background: #EDE9FE; border-left-color: #7C3AED; }
.cc-wk-event.group:hover { background: #DDD6FE; }
.cc-wk-event.inquiry { background: var(--cc-surface); border: 1px dashed #9CC2EA; border-left: 3px solid var(--cc-accent); }
.cc-wk-event:focus-visible, .cc-wk-cancelled:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 1px; }
.cc-wk-cancelled { background: var(--cc-surface); border: 1px solid var(--cc-border); border-left: 3px solid var(--cc-border-strong);
                   color: var(--cc-text-muted); text-decoration: none; z-index: 4; }
.cc-wk-cancelled .cc-wk-t { text-decoration: line-through; }
.cc-wk-cancelled:hover { color: var(--cc-text); }
.cc-wk-t { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-wk-d { display: block; color: var(--cc-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-wk-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--cc-marigold); z-index: 5; pointer-events: none; }
.cc-wk-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px;
                     border-radius: 50%; background: var(--cc-marigold); }
.cc-calkey { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 0.6rem; font-size: 0.78rem; color: var(--cc-text-muted); }
.cc-calkey i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cc-calkey .k-event { background: var(--cc-accent-soft); border-left: 3px solid var(--cc-accent); }
.cc-calkey .k-inquiry { background: var(--cc-surface); border: 1px dashed #9CC2EA; border-left: 3px solid var(--cc-accent); }
.cc-calkey .k-group { background: #EDE9FE; border-left: 3px solid #7C3AED; }
.cc-calkey .k-busy { background: repeating-linear-gradient(45deg, #F4F5F7, #F4F5F7 3px, #DDE1E6 3px, #DDE1E6 6px); border-left: 3px solid #A3ABB6; }
.cc-calkey .k-blocked { background: var(--cc-surface-2); border: 1px dashed var(--cc-border-strong); }
.cc-calkey .k-closed { background: var(--cc-bg); border: 1px solid var(--cc-border); }
@media (prefers-reduced-motion: reduce) {
    .cc-switch-track, .cc-switch-thumb { transition: none; }
}

/* ═══ Business overview (docs/BUSINESS_OVERVIEW_PLAN.md) ═════════════════════
   Dashboard.razor's second body: BusinessOverview.razor (the health strip) and
   BusinessOverviewSchedule.razor (Today, Next 7 days). The layout follows the
   content area (container queries on .bo), not the window. Event colors match the
   Calendar page's key. */
.cc-page-subtitle .bo-date { color: var(--cc-text); font-weight: 600; }
.cc-page-subtitle .bo-date ~ span::before { content: "·"; margin-right: .4rem; color: var(--cc-text-faint); }
.bo { container-type: inline-size; display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.bo-ic { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: inline-block; flex: 0 0 auto; }

/* Practice health: one strip of tiles, hairlines between them at any column count. */
.bo-health-h { display: none; }
.bo-hs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
    background: var(--cc-surface-2); border: 1px solid var(--cc-border); border-radius: 8px; overflow: hidden;
}
/* Seven tiles: the last one takes two cells at two and four a row, so no row
   ends in an empty cell. */
.bo-hs-t:last-child { grid-column: span 2; }
@container (min-width: 700px) { .bo-hs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 1040px) {
    .bo-hs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .bo-hs-t:last-child { grid-column: auto; }
    /* The money starts here: a firmer line before it. */
    .bo-hs-t.sep { box-shadow: inset 1px 0 0 var(--cc-border-strong); }
}
.bo-hs-t {
    display: flex; flex-direction: column; gap: 1px; padding: 10px 14px 11px; min-width: 0;
    background: var(--cc-surface); color: var(--cc-text); text-decoration: none;
}
.bo-hs-t:hover { background: var(--cc-bg); color: var(--cc-text); text-decoration: none; }
.bo-hs-t:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: -2px; }
.bo-hs-l {
    font-size: 11.25px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--cc-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bo-hs-v { font-size: 19.5px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.bo-hs-s { font-size: 12px; color: var(--cc-text-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.bo-hs-s > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.bo-pill {
    display: inline-flex; align-items: center; font-size: 11.25px; font-weight: 600; line-height: 17px; padding: 0 7px;
    color: var(--cc-attention-text); background: var(--cc-attention-soft); border: 1px solid var(--cc-attention-border); border-radius: 999px;
}

/* Cards */
/* The grid: Today, Needs you, the week, and the side column (Clients to watch, New
   sign-ups, Recent activity). One column on a phone; two from 900px with the week and
   the side cards (three abreast) full width; three from 1,500px with the side column
   on the right. DOM order is the reading order, so the tab order follows. */
.bo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.bo-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; min-width: 0; }
@container (min-width: 900px) {
    .bo-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
    .bo-week, .bo-side { grid-column: 1 / -1; }
    .bo-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 1500px) {
    .bo-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3.3fr); }
    .bo-today { grid-column: 1; grid-row: 1; }
    .bo-needs { grid-column: 2; grid-row: 1; }
    .bo-week { grid-column: 1 / 3; grid-row: 2; }
    .bo-side { grid-column: 3; grid-row: 1 / span 2; grid-template-columns: minmax(0, 1fr); }
}
.bo-card { background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: 8px; padding: 15px 18px 16px; min-width: 0; }
.bo-ch { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bo-ch h2 { font-size: 15.75px; font-weight: 600; line-height: 1.35; margin: 0; }
.bo-meta { font-size: 12.75px; color: var(--cc-text-muted); }
.bo-more { margin-left: auto; font-size: 13.1px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.bo-note { font-size: 12.4px; color: var(--cc-text-muted); display: inline-flex; align-items: center; gap: 5px; margin: 8px 0 0; }
.bo-note.ok { color: var(--cc-success); font-weight: 500; margin: 0; white-space: nowrap; }

/* Today: a timeline of sessions, open time and the Now line. */
.bo-tl { list-style: none; margin: 0; padding: 0; }
.bo-row {
    display: grid; grid-template-columns: 70px 16px minmax(0, 1fr) auto; column-gap: 12px; align-items: start;
    padding: 9px 0; border-top: 1px solid var(--cc-surface-2);
}
.bo-tl > li:first-child .bo-row { border-top: 0; }
.bo-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.3; padding-top: 1px; }
.bo-time .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.bo-time .d { font-size: 12px; color: var(--cc-text-muted); }
.bo-rail { position: relative; align-self: stretch; min-height: 28px; }
.bo-rail::before { content: ""; position: absolute; left: 7px; top: -10px; bottom: -10px; width: 2px; background: var(--cc-surface-2); }
.bo-tl > li:first-child .bo-rail::before { top: 6px; }
.bo-tl > li:last-child .bo-rail::before { bottom: auto; height: 16px; }
.bo-dot {
    position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--cc-surface); border: 2px solid var(--cc-border-strong);
}
.bo-dot.now { background: var(--cc-marigold); border-color: var(--cc-marigold); box-shadow: 0 0 0 3px var(--cc-attention-soft); }
.bo-dot.next { border-color: var(--cc-accent); }
.bo-dot.done { background: var(--cc-border-strong); }
.bo-dot.open { border-style: dashed; border-color: var(--cc-text-faint); }
.bo-body { min-width: 0; }
.bo-sum { display: block; list-style: none; }
.bo-sum::-webkit-details-marker { display: none; }
.bo-sum::marker { content: ""; }
summary.bo-sum { cursor: pointer; border-radius: 3px; }
summary.bo-sum:hover .bo-name { color: var(--cc-accent); text-decoration: underline; }
summary.bo-sum:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.bo-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bo-name { font-size: 15px; font-weight: 600; color: var(--cc-text); }
.bo-what { font-size: 13.5px; color: var(--cc-text-muted); }
.bo-state { font-size: 12px; font-weight: 600; color: var(--cc-attention-text); }
.bo-state.blue { color: var(--cc-accent); }
.bo-chips { display: flex; flex-wrap: wrap; gap: 5px 6px; margin-top: 5px; align-items: center; }
.bo-where { display: inline-flex; align-items: center; gap: 4px; font-size: 12.4px; color: var(--cc-text-muted); margin-right: 2px; }
.bo-chip {
    display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 8px;
    border-radius: 999px; background: var(--cc-surface-2); color: var(--cc-text-muted); white-space: nowrap;
}
.bo-chip.new { background: var(--cc-accent-soft); color: var(--cc-accent); }
.bo-chip.warn { background: var(--cc-attention-soft); color: var(--cc-attention-text); }
.bo-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding-top: 1px; }
.bo-act form { margin: 0; }
.bo-row.done .bo-time .t, .bo-row.done .bo-name { color: var(--cc-text-muted); }

/* Before this session (opened from the client's name). */
.bo-prep { margin-top: 9px; background: var(--cc-bg); border: 1px solid var(--cc-border); border-radius: 8px; padding: 10px 12px; }
.bo-prep-h { font-size: 11.25px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cc-text-muted); margin-bottom: 6px; }
.bo-prep-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; margin: 0; }
.bo-prep-g dt { font-size: 12px; font-weight: 400; color: var(--cc-text-muted); margin: 0; }
.bo-prep-g dd { font-size: 13.1px; margin: 0; line-height: 1.4; }
.bo-prep-a { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

/* Open time between sessions. */
.bo-gapbox {
    grid-column: 3 / 5; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap;
    border: 1px dashed var(--cc-border-strong); border-radius: 8px; padding: 6px 10px;
}
.bo-gap-t { font-size: 13.1px; font-weight: 600; }
.bo-gap-room { font-size: 12.4px; color: var(--cc-text-muted); }
.bo-gap-book { margin-left: auto; }
.bo-slot {
    font-size: 12.75px; font-weight: 500; color: var(--cc-accent); background: var(--cc-accent-soft);
    border-radius: 4px; padding: 2px 9px; font-variant-numeric: tabular-nums; text-decoration: none;
}
.bo-slot:hover { background: #d5e6f9; color: var(--cc-accent); text-decoration: none; }
.bo-nowline { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.bo-nowline::after { content: ""; flex: 1 1 auto; height: 2px; background: var(--cc-marigold); border-radius: 2px; }
.bo-nowtag { font-size: 11.25px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cc-attention-text); white-space: nowrap; }
.bo-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px dashed var(--cc-border-strong); border-radius: 8px; background: var(--cc-bg); }
.bo-empty b { font-size: 15px; }
.bo-empty > span { font-size: 13.5px; color: var(--cc-text-muted); }

/* Next 7 days: one column per day, booked share of the open time as a bar. */
.bo-wk { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); gap: 8px; overflow-x: auto; }
.bo-wd { min-width: 0; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--cc-border); border-radius: 8px; padding: 8px 8px 9px; background: var(--cc-surface); }
.bo-wd.today { border-color: var(--cc-marigold); box-shadow: inset 0 3px 0 var(--cc-marigold); }
.bo-wd.off { background: var(--cc-bg); }
.bo-wd-h { display: flex; align-items: baseline; gap: 6px; color: var(--cc-text); text-decoration: none; }
.bo-wd-h:hover { color: var(--cc-accent); text-decoration: none; }
.bo-wd-h .dn { font-size: 11.25px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cc-text-muted); }
.bo-wd-h .n { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bo-wd-h .c { margin-left: auto; font-size: 11.25px; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bo-bar { height: 4px; border-radius: 2px; background: var(--cc-surface-2); overflow: hidden; margin: 2px 0 3px; }
.bo-bar span { display: block; height: 100%; background: var(--cc-brand-blue); border-radius: 2px; }
.bo-ev {
    display: flex; gap: 5px; font-size: 12.4px; line-height: 1.35; padding: 3px 5px; border-radius: 4px;
    color: var(--cc-text); background: var(--cc-accent-soft); border: 1px solid transparent;
    white-space: nowrap; overflow: hidden; text-decoration: none;
}
.bo-ev:hover { background: #d5e6f9; color: var(--cc-text); text-decoration: none; }
.bo-ev .et { color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.bo-ev > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bo-ev.inq { background: var(--cc-surface); border: 1px dashed #9CC2EA; }
.bo-ev.grp { background: #EDE9FE; }
.bo-ev.grp:hover { background: #DDD6FE; }
.bo-wd-off { font-size: 12.4px; color: var(--cc-text-muted); padding: 3px 0; }
.bo-wd-open { font-size: 12px; font-weight: 500; margin-top: auto; padding-top: 3px; }
.bo-wk-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--cc-text-muted); }
.bo-wk-key i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--cc-accent-soft); }
.bo-wk-key i.inq { background: var(--cc-surface); border: 1px dashed #9CC2EA; }
.bo-wk-key i.grp { background: #EDE9FE; }

/* Needs you: groups that fold, rows with a three-dot menu. */
.bo-count {
    display: inline-flex; align-items: center; gap: 5px; align-self: center; font-size: 12px; font-weight: 600; line-height: 19px;
    padding: 0 8px; color: var(--cc-attention-text); background: var(--cc-attention-soft);
    border: 1px solid var(--cc-attention-border); border-radius: 999px; font-variant-numeric: tabular-nums;
}
.bo-mdot { width: 7px; height: 7px; border-radius: 50%; background: var(--cc-attention); display: inline-block; flex: 0 0 auto; }
.bo-qg { border-top: 1px solid var(--cc-surface-2); }
.bo-qg:first-of-type { border-top: 0; }
.bo-qg-h { display: flex; align-items: center; gap: 8px; padding: 9px 0; cursor: pointer; list-style: none; color: var(--cc-text); }
.bo-qg-h::-webkit-details-marker { display: none; }
.bo-qg-h:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; border-radius: 3px; }
.bo-qg-t { font-size: 13.5px; font-weight: 600; }
.bo-qg-n {
    font-size: 12px; font-weight: 600; line-height: 19px; padding: 0 7px; border-radius: 999px;
    color: var(--cc-text-muted); background: var(--cc-surface-2); font-variant-numeric: tabular-nums;
}
.bo-qg-meta { margin-left: auto; font-size: 13.1px; font-weight: 600; color: var(--cc-attention-text); font-variant-numeric: tabular-nums; }
.bo-qg-chev { margin-left: auto; color: var(--cc-text-muted); transform: rotate(-90deg); transition: transform .12s ease; }
.bo-qg-meta + .bo-qg-chev { margin-left: 0; }
.bo-qg[open] > .bo-qg-h .bo-qg-chev { transform: none; }
.bo-qg-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--cc-border-strong); }
.bo-qg-dot.att { background: var(--cc-attention); }
.bo-qr { display: flex; align-items: center; gap: 10px; padding: 6px 0 7px 15px; }
.bo-qr-amt { font-size: 15px; font-weight: 700; min-width: 44px; font-variant-numeric: tabular-nums; }
.bo-qr-b { flex: 1 1 auto; min-width: 0; }
.bo-qr-n { font-size: 13.75px; font-weight: 600; color: var(--cc-text); text-decoration: none; }
a.bo-qr-n:hover { color: var(--cc-accent); text-decoration: underline; }
.bo-qr-w { font-size: 12.4px; line-height: 1.4; color: var(--cc-text-muted); }
.bo-qr-who > summary { cursor: pointer; list-style: none; }
.bo-qr-who > summary::-webkit-details-marker { display: none; }
.bo-qr-who > summary .bo-qr-n { text-decoration: underline dotted var(--cc-border-strong); text-underline-offset: 3px; }
.bo-qr-who ul { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 2px; }
.bo-qr-who li { font-size: 12.75px; }
.bo-qr-who li .bo-qr-n { font-size: 12.75px; font-weight: 500; }
.bo-qmore { padding: 0 0 8px 15px; font-size: 12.75px; color: var(--cc-text-muted); }
/* A row menu's separator, a line that only informs ("Reminded 2 hr ago"), and the
   to-bill row's charge: a confirm that opens in the menu. */
.cd-rowmenu-sep { height: 1px; background: var(--cc-surface-2); margin: 4px 6px; }
.cd-rowmenu-note, .cd-rowmenu-note:hover { color: var(--cc-text-muted); background: none; cursor: default; }
.bo-menu-confirm > summary { list-style: none; }
.bo-menu-confirm > summary::-webkit-details-marker { display: none; }
.bo-menu-confirm-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 10px 8px 32px; font-size: 12.75px; color: var(--cc-text-muted); }

/* Clients to watch, New sign-ups, Recent activity */
.bo-cw, .bo-su, .bo-acts { list-style: none; margin: 0; padding: 0; }
.bo-cw li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--cc-surface-2); }
.bo-cw li:first-child, .bo-su li:first-child, .bo-acts li:first-child { border-top: 0; }
.bo-cw-b { flex: 1 1 auto; min-width: 0; }
.bo-cw-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bo-cw-n { font-size: 13.75px; font-weight: 600; color: var(--cc-text); text-decoration: none; }
.bo-cw-n:hover { color: var(--cc-accent); text-decoration: underline; }
.bo-cw-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--cc-text-muted); }
.bo-cw-st i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--cc-attention); }
.bo-cw-st.out i { background: var(--cc-error); }
.bo-cw-st.exp i { background: var(--cc-warning); }
.bo-cw-d { font-size: 12.4px; line-height: 1.4; color: var(--cc-text-muted); }
.bo-cfoot {
    display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 4px; padding-top: 9px;
    border-top: 1px solid var(--cc-surface-2); font-size: 13.1px; font-weight: 500;
}
.bo-su li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--cc-surface-2); }
.bo-su .n { font-size: 13.75px; font-weight: 600; color: var(--cc-text); text-decoration: none; white-space: nowrap; }
.bo-su a.n:hover { color: var(--cc-accent); text-decoration: underline; }
.bo-su .s { flex: 1 1 auto; min-width: 0; font-size: 12.4px; color: var(--cc-text-muted); }
.bo-su .w { font-size: 12px; color: var(--cc-text-muted); white-space: nowrap; }
.bo-acts li { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; border-top: 1px solid var(--cc-surface-2); }
.bo-act-i {
    width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; background: var(--cc-surface-2); color: var(--cc-text-muted);
}
.bo-act-i.c { background: var(--cc-accent-soft); color: var(--cc-accent); }
.bo-act-i.g { background: #E4F1EA; color: var(--cc-success); }
.bo-act-t { flex: 1 1 auto; min-width: 0; padding-top: 2px; font-size: 13.1px; line-height: 1.45; }
.bo-act-t a { color: var(--cc-text); text-decoration: none; }
.bo-act-t a:hover { color: var(--cc-accent); text-decoration: underline; }
.bo-act-t.mine, .bo-act-t.mine a { color: var(--cc-text-muted); }
.bo-act-w { padding-top: 3px; font-size: 12px; color: var(--cc-text-muted); white-space: nowrap; }
/* "Include yours": a checkbox drawn as a switch. */
.bo-sw { position: relative; display: inline-flex; align-items: center; gap: 7px; margin: 0 0 0 auto; cursor: pointer; font-size: 12.4px; color: var(--cc-text-muted); }
.bo-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bo-sw-track { position: relative; flex: 0 0 auto; width: 30px; height: 18px; border-radius: 999px; background: var(--cc-border-strong); transition: background-color .12s ease; }
.bo-sw-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--cc-surface); transition: left .12s ease; }
.bo-sw input:checked + .bo-sw-track { background: var(--cc-accent); }
.bo-sw input:checked + .bo-sw-track .bo-sw-thumb { left: 14px; }
.bo-sw input:focus-visible + .bo-sw-track { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
/* The follow-up date overlay. */
.bo-fu-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.bo-fu-pick { display: flex; align-items: center; gap: 8px; }
.bo-fu-pick input { max-width: 200px; }
@media (prefers-reduced-motion: reduce) { .bo-qg-chev, .bo-sw-track, .bo-sw-thumb { transition: none; } }

/* Phones: Today first, the week as a list, the money last under its own heading
   (the phone app's order). */
@container (max-width: 600px) {
    .bo-health { order: 2; background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: 10px; padding: 14px; }
    .bo-health-h { display: block; font-size: 16px; font-weight: 600; margin: 0 0 8px; }
    .bo-hs { border: 0; border-radius: 8px; }
    /* Two tiles a row: let the labels wrap rather than cut off. */
    .bo-hs-l, .bo-hs-s { white-space: normal; }
    .bo-card { padding: 14px; border-radius: 10px; }
    .bo-row { grid-template-columns: 58px 16px minmax(0, 1fr); }
    .bo-act { grid-column: 3 / -1; justify-content: flex-start; margin-top: 6px; }
    .bo-gapbox { grid-column: 3 / -1; }
    .bo-gap-book { margin-left: 0; }
    .bo-prep-g { grid-template-columns: minmax(0, 1fr); }
    .bo-wk { grid-template-columns: minmax(0, 1fr); gap: 6px; overflow: visible; }
    .bo-wd.off { flex-direction: row; align-items: baseline; gap: 10px; }
    .bo-wk-key { display: none; }
    .bo-qr { padding-left: 0; }
    .bo-qmore { padding-left: 0; }
    .bo-su li { flex-wrap: wrap; }
}

/* ═══ Accounting home (AccountingOverview.razor; "Accounting home redesign" canvas) ══
   Rides the Business overview's .bo, .bo-hs, .bo-card, .bo-ch and .bo-grid so the two
   pages read as one product; these are only what that page doesn't have. The period,
   the chart's month and the activity filter are links (SSR, no script). */
.ah-seg { display: inline-flex; background: var(--cc-surface-2); border-radius: 8px; padding: 3px; gap: 2px; }
.ah-seg a {
    padding: 4px 11px; border-radius: 6px; font-size: 13.1px; font-weight: 500; line-height: 1.5;
    color: var(--cc-text-muted); text-decoration: none; white-space: nowrap;
}
.ah-seg a:hover { color: var(--cc-text); text-decoration: none; }
.ah-seg a.on { background: var(--cc-surface); color: var(--cc-text); font-weight: 600; box-shadow: 0 1px 2px rgba(31, 42, 55, .08); }
.ah-seg a:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 1px; }
/* The period switch makes this header's actions longer than most: when they don't
   fit beside the title, they drop below it rather than squeeze ("+ Quick / entry").
   CcPageHeader does this only under 640px. */
.cc-page-head:has(.ah-seg) { flex-wrap: wrap; row-gap: .6rem; }
.cc-page-actions:has(.ah-seg) { flex-wrap: wrap; row-gap: .5rem; }
.cc-page-actions:has(.ah-seg) > * { flex: 0 0 auto; white-space: nowrap; }
.cc-page-subtitle .ah-ok { color: var(--cc-success); font-weight: 500; }

/* Six tiles: two, three, then six a row (the overview's strip has seven). */
.ah .bo-hs-t:last-child { grid-column: auto; }
@container (min-width: 700px) { .ah .bo-hs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1040px) { .ah .bo-hs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Two columns from 900px at every width (the overview goes to three at 1,500px). */
@container (min-width: 1500px) { .ah .bo-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.ah-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.ah-up { color: var(--cc-success); font-weight: 600; }
.ah-down { color: var(--cc-error); font-weight: 600; }
.ah-foot {
    display: flex; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--cc-surface-2);
    padding-top: 9px; margin-top: 8px; font-size: 13.1px; font-weight: 500;
}

/* To do: one row per thing waiting, one button, the rest in its menu. */
.ah-todo { list-style: none; margin: 0; padding: 0; }
.ah-todo li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--cc-surface-2); }
.ah-todo li:first-child { border-top: 0; padding-top: 2px; }
.ah-ti {
    width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    background: var(--cc-bg); border: 1px solid var(--cc-border); color: var(--cc-text-muted);
}
.ah-ti.att { background: var(--cc-attention-soft); border-color: var(--cc-attention-border); color: var(--cc-attention-text); }
.ah-tb { flex: 1 1 auto; min-width: 0; }
.ah-tt { font-size: 14px; font-weight: 600; }
.ah-td { font-size: 12.4px; color: var(--cc-text-muted); line-height: 1.4; }
.ah-ta { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.ah-ok-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    background: #EEF7F1; color: var(--cc-success); font-size: 13.5px; font-weight: 500;
}
/* Phones: the words stay beside the icon (a zero basis, so they never wrap under
   it) and the buttons take their own line (flex-basis, not width: CLAUDE.md, Phones). */
@container (max-width: 560px) {
    .ah-todo li { flex-wrap: wrap; }
    .ah-tb { flex: 1 1 0; }
    .ah-ta { flex: 1 0 calc(100% - 42px); margin-left: 42px; }
}

/* Income and expenses by month: bars are links to that month's numbers. */
.ah-chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 8px; }
.ah-axis {
    display: flex; flex-direction: column; justify-content: space-between; height: 194px; margin-top: -7px;
    font-size: 11.25px; line-height: 14px; color: var(--cc-text-muted); text-align: right; font-variant-numeric: tabular-nums;
}
.ah-plot {
    height: 180px; border-bottom: 1px solid var(--cc-border-strong); display: grid;
    grid-template-columns: repeat(var(--ah-cols, 12), minmax(0, 1fr)); align-items: end; gap: 6px;
    background-image: linear-gradient(var(--cc-surface-2) 1px, transparent 1px); background-size: 100% 45px;
}
.ah-mo { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; padding: 0 2px; border-radius: 4px 4px 0 0; }
.ah-mo:hover, .ah-mo.on { background: rgba(26, 111, 193, .07); }
.ah-mo:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 1px; }
.ah-bi, .ah-be { width: 44%; max-width: 18px; border-radius: 3px 3px 0 0; }
.ah-bi { background: var(--cc-brand-blue); }
.ah-be { background: #97A1AF; }
.ah-mo.part .ah-bi { background: repeating-linear-gradient(135deg, var(--cc-brand-blue) 0 4px, #7DB5EE 4px 8px); }
.ah-mo.part .ah-be { background: repeating-linear-gradient(135deg, #97A1AF 0 4px, #C9CFD7 4px 8px); }
.ah-xl {
    grid-column: 2; display: grid; grid-template-columns: repeat(var(--ah-cols, 12), minmax(0, 1fr)); gap: 6px;
    font-size: 11.25px; color: var(--cc-text-muted); text-align: center; margin-top: 4px;
}
.ah-xl .on { color: var(--cc-text); font-weight: 600; }
.ah-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--cc-text-muted); margin: 10px 0 0 52px; }
.ah-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--cc-brand-blue); }
.ah-key i.e { background: #97A1AF; }
.ah-key i.p { background: repeating-linear-gradient(135deg, var(--cc-brand-blue) 0 3px, #7DB5EE 3px 6px); }
.ah-msum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; border: 1px solid var(--cc-surface-2); border-radius: 8px; overflow: hidden; }
.ah-msum > div { padding: 9px 12px; border-left: 1px solid var(--cc-surface-2); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ah-msum > div:first-child { border-left: 0; background: var(--cc-bg); }
.ah-msum .l { font-size: 11.25px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cc-text-muted); }
.ah-msum .v { font-size: 16.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ah-msum .s { font-size: 12px; color: var(--cc-text-muted); }
@container (max-width: 560px) {
    .ah-msum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ah-msum > div:nth-child(3) { border-left: 0; }
    .ah-msum > div:nth-child(n+3) { border-top: 1px solid var(--cc-surface-2); }
    .ah-key { margin-left: 0; }
}

/* Recent activity */
.ah-flt { display: inline-flex; gap: 4px; margin-left: auto; }
.ah-flt a {
    border: 1px solid var(--cc-border); background: var(--cc-surface); border-radius: 999px; padding: 1px 10px;
    font-size: 12.4px; color: var(--cc-text-muted); text-decoration: none;
}
.ah-flt a:hover { color: var(--cc-text); text-decoration: none; }
.ah-flt a.on { background: var(--cc-accent-soft); border-color: #BCD8F3; color: var(--cc-accent); font-weight: 600; }
.ah-lg { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.ah-lg li {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 96px; column-gap: 12px; align-items: baseline;
    padding: 7px 0; border-top: 1px solid var(--cc-surface-2);
}
.ah-lg li:first-child { border-top: 0; }
.ah-lg .d { color: var(--cc-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.75px; }
.ah-lg .w { min-width: 0; }
.ah-lg .w a { font-weight: 600; color: var(--cc-text); }
.ah-lg .w a:hover { color: var(--cc-accent); }
.ah-lg .w > span { display: block; font-size: 12.4px; color: var(--cc-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-lg .c { white-space: nowrap; }
.ah-lg .a { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ah-lg .a.in { color: var(--cc-success); }
.ah-lg .a.mv { color: var(--cc-text-muted); font-weight: 500; }
.ah-chip {
    display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 8px;
    border-radius: 999px; background: var(--cc-surface-2); color: var(--cc-text-muted); white-space: nowrap;
    max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.ah-chip.in { background: var(--cc-accent-soft); color: var(--cc-accent); }
@container (max-width: 560px) {
    .ah-lg li { grid-template-columns: 46px minmax(0, 1fr) auto; }
    .ah-lg .c { display: none; }
}

/* Accounts */
.ah-ac { list-style: none; margin: 0; padding: 0; }
.ah-ac li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px;
    padding: 10px 0; border-top: 1px solid var(--cc-surface-2);
}
.ah-ac li:first-child { border-top: 0; padding-top: 2px; }
.ah-ac .n { font-size: 14px; font-weight: 600; color: var(--cc-text); display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.ah-ac .n:hover { color: var(--cc-accent); text-decoration: none; }
.ah-ac .k { font-size: 11.25px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cc-text-muted); }
.ah-ac .v { font-size: 16.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ah-ac .s { font-size: 12.4px; color: var(--cc-text-muted); }
.ah-ac .r { font-size: 12.4px; text-align: right; white-space: nowrap; color: var(--cc-text-muted); }
.ah-ac .r.ok { color: var(--cc-success); font-weight: 500; }
.ah-ac .r.warn { color: var(--cc-attention-text); font-weight: 600; }
.ah-ac .st { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cc-text-muted); }
.ah-ac .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--cc-success); display: inline-block; }
.ah-ac .st.bad { color: var(--cc-attention-text); font-weight: 600; }
.ah-ac .st.bad i { background: var(--cc-attention); }

/* Where your money goes / Sales by offering */
.ah-bl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ah-bl li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 3px; }
.ah-bl .n { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-bl .v { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.ah-bl .v span { font-weight: 400; color: var(--cc-text-muted); margin-left: 6px; font-size: 12px; }
.ah-bl .t { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--cc-surface-2); overflow: hidden; }
.ah-bl .t span { display: block; height: 100%; border-radius: 3px; background: #97A1AF; }
.ah-bl.inc .t span { background: var(--cc-brand-blue); }

/* An Accounting view-only team member's note (AccountingViewOnlyNote.razor). */
.cc-viewonly-note {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: 8px;
    background: var(--cc-accent-soft); color: var(--cc-text); font-size: 13.5px; line-height: 1.45;
}
.cc-viewonly-note .cd-ico { width: 16px; height: 16px; color: var(--cc-accent); flex: 0 0 auto; margin-top: 2px; }

/* ═══ Receipts inbox (ReceiptsInbox.razor) and Quick entry's receipt banner ═══ */
.ri-drop { margin: 0; }
.ri-drop-label {
    position: relative; display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer;
    padding: 16px 18px; border: 1.5px dashed var(--cc-border); border-radius: 10px;
    background: var(--cc-surface); color: var(--cc-text);
}
.ri-drop-label:hover, .ri-drop-label:focus-within { border-color: var(--cc-brand-blue); background: var(--cc-surface-2); }
.ri-drop-label > .bi { font-size: 1.6rem; color: var(--cc-brand-blue); }
.ri-drop-text { display: flex; flex-direction: column; font-size: 13.5px; }
.ri-drop-text span { color: var(--cc-text-muted); }
/* The input covers the whole box so a dropped file lands on it; it stays focusable. */
.ri-drop-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ri-drop-busy { display: none; margin-left: auto; color: var(--cc-text-muted); font-size: 13px; }
.ri-drop-label.is-busy .ri-drop-busy { display: inline; }
.ri-drop-label.is-busy { pointer-events: none; opacity: .75; }

.ri-setting {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 14px; border: 1px solid var(--cc-border); border-radius: 10px; background: var(--cc-surface);
}
.ri-setting strong { margin-right: 6px; }
.ri-setting > form, .ri-setting > form .btn { flex: none; white-space: nowrap; }
.ri-on, .ri-off { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.ri-on { background: #DCFCE7; color: #166534; }
.ri-off { background: var(--cc-surface-2); color: var(--cc-text-muted); }

.ri-empty { display: flex; flex-direction: column; gap: 4px; padding: 28px; text-align: center; color: var(--cc-text-muted);
    border: 1px solid var(--cc-border); border-radius: 10px; background: var(--cc-surface); }
.ri-empty b { color: var(--cc-text); }

.ri-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; font-size: 13.5px; }
.ri-list { display: flex; flex-direction: column; gap: 10px; }
.ri {
    display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; scroll-margin-top: 96px;
    padding: 12px; border: 1px solid var(--cc-border); border-radius: 10px; background: var(--cc-surface);
}
.ri-thumb {
    width: 72px; height: 88px; border-radius: 6px; overflow: hidden; background: var(--cc-surface-2);
    display: grid; place-items: center; color: var(--cc-text-muted); font-size: 1.8rem; text-decoration: none;
}
.ri-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ri-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ri-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ri-what { min-width: 0; }
.ri-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--cc-text-muted); }
.ri-meta .mono { color: var(--cc-text); font-variant-numeric: tabular-nums; }
.ri-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.ri-edit > summary { font-size: 12.5px; color: #2563eb; cursor: pointer; list-style: none; width: max-content; }
.ri-edit > summary::-webkit-details-marker { display: none; }
.ri-edit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 6px; }
.ri-edit-form label { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--cc-text-muted); }
.ri-edit-form label:first-of-type { flex: 1 1 180px; }
.ri-edit-form label:not(:first-of-type) { flex: 0 1 140px; }

.ri-match { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ri-sugg {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px;
    border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 8px; font-size: 13px;
}
.ri-sugg-k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #1e40af; }
.ri-sugg .mono { font-variant-numeric: tabular-nums; }
.ri-pick { display: flex; gap: 6px; align-items: center; margin: 0; flex: 1 1 320px; max-width: 560px; }
.ri-record { font-size: 13px; }

.qe-receipt { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--cc-border); border-radius: 8px; background: var(--cc-surface); }
.qe-receipt-thumb { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--cc-surface-2); display: grid; place-items: center; color: var(--cc-text-muted); font-size: 1.5rem; }
.qe-receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
    .ri { grid-template-columns: 56px minmax(0, 1fr); }
    .ri-thumb { width: 56px; height: 68px; }
    .ri-setting { flex-direction: column; align-items: flex-start; }
}
