.GridLiveStream {
    text-decoration: none !important;
    color: var(--hb-fg) !important;
}

/* ============================================================
   Portal shell (Fluent2) — app bar + Syncfusion Sidebar layout.
   Replaces the retired Stellar-Admin chrome. Colours are driven
   by CSS variables so the light/dark toggle (theme.js sets
   data-theme on <html>) recolours everything in one place.
   ============================================================ */
:root {
    --hb-appbar-h: 56px;
    --hb-accent: #512BD4;
    --hb-fg: #242424;
    --hb-muted: #605e5c;
    --hb-content-bg: #f3f2f1;
    --hb-card-bg: #ffffff;
    --hb-sidebar-bg: #faf9f8;
    --hb-border: #e1dfdd;
    --hb-hover: rgba(0,0,0,.05);
    --hb-active-bg: rgba(81,43,212,.12);
    /* Setting explanation bubbles (.hb-tip) — dark on light, so they read as an overlay
       rather than another panel. */
    --hb-tip-bg: #201f1e;
    --hb-tip-fg: #f3f2f1;
    /* Counts that want attention (the inbox bell), white text on it in both themes. */
    --hb-alert: #c50f1f;
    /* Ink on the white profile circle in the app bar: the deep accent in both themes, because the
       dark theme's lighter accent is too faint on white. */
    --hb-appbar-ink: #512BD4;
    /* On air: the pill on Live now and the dot on the Live header. */
    --hb-onair: #c50f1f;
    --hb-onair-fg: #ffffff;
    /* Text on an accent fill (the New button). */
    --hb-accent-ink: #ffffff;
}

[data-theme="dark"] {
    --hb-accent: #a880ff;
    --hb-fg: #f3f2f1;
    --hb-muted: #a19f9d;
    --hb-content-bg: #201f1e;
    --hb-card-bg: #292827;
    --hb-sidebar-bg: #1b1a19;
    --hb-border: #3b3a39;
    --hb-hover: rgba(255,255,255,.06);
    --hb-active-bg: rgba(168,128,255,.16);
    /* Lifted off the dark page rather than darker still, or the bubble disappears into it. */
    --hb-tip-bg: #4a4948;
    --hb-tip-fg: #ffffff;
    --hb-alert: #d13438;
    /* Lighter red on the dark panel, with dark text on it so it still reads. */
    --hb-onair: #ff8a8a;
    --hb-onair-fg: #1b1a19;
    --hb-accent-ink: #1b1a19;
}

.hb-shell {
    min-height: 100vh;
    background: var(--hb-content-bg);
    color: var(--hb-fg);
}

/* App bar */
.hb-appbar.e-appbar {
    height: var(--hb-appbar-h);
    min-height: var(--hb-appbar-h);
    background: var(--hb-accent);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1200;
    gap: 8px;
    /* Syncfusion ships .e-appbar { overflow: hidden }, which clipped the global search
       dropdown to the 56px bar — all you saw was a sliver of its top edge. Nothing in this
       bar needs clipping (there's no overflow menu), so let the panel hang below it. */
    overflow: visible;
}
/* Equal-width clusters either side of the centred search box. flex-basis:0 with grow:1 means
   both sides get exactly half the space the search doesn't use, wherever the content inside
   them happens to end up — so the box sits on the bar's centre line and stays there whether
   the org switcher is showing or the signed-in name is long. min-width:0 lets a cluster
   shrink rather than shove the search off-centre.
   (Syncfusion sets width:100% on the bar's first div child; flex-basis wins over it.) */
.hb-appbar > .hb-appbar-side {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.hb-appbar > .hb-appbar-right { justify-content: flex-end; }

.hb-appbar .hb-brand { display: inline-flex; align-items: center; }
.hb-appbar .hb-brand img { height: 30px; }
.hb-appbar .hb-icon-btn { font-size: 16px; }

/* The HeartBeat inbox bell (InboxBell.razor): the unread count sits on the bell's top right, in
   white on the on-air red so it reads against the accent bar in both themes. */
.hb-appbar .hb-bell { position: relative; }
.hb-bell-count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--hb-alert);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--hb-accent);
}

/* The profile circle and its menu (AccountMenu.razor). The circle is white on the accent bar in
   both themes; the menu itself is a card (HbMenuButton's .hbm-pop) and takes the theme. */
.hb-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--hb-appbar-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    flex: 0 0 auto;
}
.hb-appbar .hb-acct-btn.e-btn { padding: 4px 6px; min-width: 0; display: inline-flex; align-items: center; }
.hb-appbar .hb-acct-btn .hbm-caret { color: #fff; }
.hb-acct .hbm-pop { color: var(--hb-fg); }
.hb-avatar-lg { width: 40px; height: 40px; font-size: 15px; background: var(--hb-active-bg); color: var(--hb-accent); }
.hb-acct-head { display: flex; align-items: center; gap: 12px; padding: 8px 9px 10px; }
.hb-acct-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hb-acct-who strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-acct-who small { color: var(--hb-muted); font-size: .8rem; }
.hb-acct a.hbm-item, .hb-acct a.hbm-item:hover { color: var(--hb-fg); text-decoration: none; }
.hb-acct-theme .hb-theme-switch { margin-left: auto; display: inline-flex; }
.hb-theme-switch .e-btn { border-radius: 0; }
.hb-theme-switch .e-btn:first-child { border-radius: 4px 0 0 4px; }
.hb-theme-switch .e-btn:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }

/* How much bar width the search box must leave for the two side clusters. Because the box is
   centred it eats from both sides at once, so this is roughly twice the widest cluster — and
   it has to drop in step with the rules below, or capping the box against a stale figure
   squeezes it to nothing. GlobalSearch reads it. The right cluster is three round buttons now
   (help, bell, profile circle), so the left cluster (menu button and logo) is the wider one. */
:root { --hb-search-reserve: 520px; }

@media (max-width: 1023px) {
    :root { --hb-search-reserve: 460px; }
}

/* Phones: nothing is centred any more. The left cluster takes the slack so the search glyph
   sits over on the right with the other bar buttons. Switching organisation is in the profile
   menu, so it stays reachable on the smallest screen. */
@media (max-width: 767px) {
    .hb-appbar.e-appbar { gap: 4px; padding-left: 4px; padding-right: 4px; }
    .hb-appbar > .hb-appbar-left { flex: 1 1 auto; min-width: 0; }
    .hb-appbar > .hb-appbar-right { flex: 0 0 auto; gap: 2px; }
    .hb-appbar .hb-acct-btn .hbm-caret { display: none; }
}

/* Sidebar. The Syncfusion panel is fixed at top:0, so the nav is padded down by the
   app-bar height instead — nothing hides under the (higher z-index) app bar. */
.hb-sidebar.e-sidebar {
    height: 100vh;
    background: var(--hb-sidebar-bg);
    border-right: 1px solid var(--hb-border);
    overflow-y: auto;
}

.hb-nav { padding: calc(var(--hb-appbar-h) + 8px) 0 24px; }
/* Section headers fold their rows away (NavMenu remembers which, per browser). A real button so
   it takes focus and Enter/Space work; the reset below strips the button look back to a label. */
.hb-nav-section {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px 6px;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--hb-muted);
    font-weight: 600;
}
.hb-nav-section:hover { color: var(--hb-fg); }
.hb-nav-section:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: -2px; }
.hb-nav-section-label { flex: 1; }
.hb-nav-section .hb-nav-badge { margin-left: 0; text-transform: none; letter-spacing: 0; }
.hb-nav-chevron { font-size: 9px; width: 10px; text-align: center; }
.hb-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--hb-fg);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.hb-nav-item:hover { background: var(--hb-hover); text-decoration: none; color: var(--hb-fg); }
.hb-nav-item.active {
    background: var(--hb-active-bg);
    border-left-color: var(--hb-accent);
    color: var(--hb-accent);
    font-weight: 600;
}
.hb-nav-item i { width: 18px; text-align: center; }
/* Unread counter (Inbox / Client inbox). Accent-filled pill, pushed to the trailing edge;
   the accent token differs per theme so it stays legible in light and dark. */
.hb-nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--hb-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
}
/* Retired/coming-soon entries (e.g. Go Live until the new livestream service lands) */
.hb-nav-item-disabled { opacity: .45; cursor: not-allowed; }
.hb-nav-item-disabled:hover { background: none; }
/* The row's description, to its right (NavMenu's SfTooltip). Lives on <body>, so the sidebar's own
   scrolling can't clip it; the tip colours match the setting bubbles (.hb-tip) in both themes. */
.e-tooltip-wrap.e-popup.hb-nav-tip {
    background: var(--hb-tip-bg);
    border: 0;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.e-tooltip-wrap.e-popup.hb-nav-tip .e-tip-content {
    color: var(--hb-tip-fg);
    font-size: 13px;
    line-height: 1.45;
    padding: 8px 10px;
}

/* Tabs above the page, for pages that share one menu row (PageTabs.razor). It sits outside the
   content's padding, so it carries its own margin; on a phone it scrolls sideways instead of
   wrapping. The underline is an inset shadow because a negative margin would be clipped by the
   sideways scroll. */
.hb-page-tabs {
    display: flex;
    gap: 4px;
    margin: 16px 24px 0;
    border-bottom: 1px solid var(--hb-border);
    overflow-x: auto;
    scrollbar-width: thin;
}
.hb-page-tab {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 4px 4px 0 0;
    color: var(--hb-fg);
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
}
.hb-page-tab:hover { background: var(--hb-hover); color: var(--hb-fg); text-decoration: none; }
.hb-page-tab:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: -2px; }
.hb-page-tab.active {
    color: var(--hb-accent);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--hb-accent);
}
@media (max-width: 767.98px) {
    .hb-page-tabs { margin: 12px 16px 0; }
}

/* Where the global search sent you. hbSearch.reveal scrolls the target into view and adds this
   for a couple of seconds, so on a long page it's obvious which row was meant — without leaving
   a permanent selection behind. */
.hb-reveal {
    animation: hb-reveal-flash 2.2s ease-out;
    border-radius: 8px;
}

@keyframes hb-reveal-flash {
    0%, 60% { box-shadow: 0 0 0 3px var(--hb-accent); background: var(--hb-active-bg); }
    100% { box-shadow: 0 0 0 3px transparent; background: transparent; }
}

/* Main content — flex column so the footer anchors to the bottom even on short pages */
.hb-main-content {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--hb-appbar-h));
    transition: margin-left .3s ease;
}
.hb-main-content .content-wrapper { flex: 1 0 auto; padding: 24px; }
.hb-footer {
    margin-top: auto;              /* pin to the bottom of the column */
    flex: 0 0 auto;
    padding: 16px 24px;
    border-top: 1px solid var(--hb-border);
    color: var(--hb-muted);
    font-size: .875rem;
}
/* "Help with this page" - the guides for whatever is on screen, between the page and the footer. */
.hb-page-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 16px 24px 0;
    padding: 10px 14px;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    color: var(--hb-muted);
    font-size: .875rem;
}
.hb-page-help-title { font-weight: 600; }
.hb-page-help-link { color: var(--hb-accent); text-decoration: none; }
.hb-page-help-link:hover { text-decoration: underline; }
.hb-footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 24px;
}
.hb-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}
.hb-footer-links a {
    color: var(--hb-muted);
    text-decoration: none;
}
.hb-footer-links a:hover {
    color: var(--hb-accent);
    text-decoration: underline;
}
.hb-footer-version { opacity: .75; }
.hb-env-badge {
    background: #f59e0b;
    color: #1f2937;
    border-radius: 999px;
    padding: 1px 10px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.hb-footer-company {
    margin-top: 6px;
    font-size: .78rem;
    opacity: .7;
}

/* From the tablet breakpoint up, the sidebar is docked and open by default, so the
   content column (content + footer together) is offset by the sidebar width. The offset
   is the DEFAULT and is only removed when the user explicitly collapses the menu — this
   keeps content clear of the menu even if the sidebar's open-state binding hasn't synced.
   Below the breakpoint the sidebar overlays, so no offset. */
@media (min-width: 768px) {
    /* !important beats the inline margin-left that an older Target-based SfSidebar build
       may still set on this element (.e-content-animation). Both states use it so the
       collapse toggle still wins via the more specific selector. */
    .hb-main-content { margin-left: 260px !important; }
    /* Folded, the menu becomes a 64px rail of icons rather than leaving (NavMenu draws both). The
       Syncfusion panel is closed then, which slides it off and hides it; the rail keeps it in place. */
    /* Keyed off the shell, not .hb-sidebar: Syncfusion rewrites the panel's class list when it
       closes and the CssClass does not survive. The panel's own look is repeated here for that reason. */
    .hb-shell.hb-collapsed .hb-main-content { margin-left: 64px !important; }
    .hb-shell.hb-collapsed > .e-sidebar.e-left.e-close {
        transform: none;
        visibility: visible;
        width: 64px !important;
        height: 100vh;
        overflow: visible;
        background: var(--hb-sidebar-bg);
        border-right: 1px solid var(--hb-border);
    }
    .hb-shell.hb-collapsed > .e-sidebar .hb-nav { display: none; }
    .hb-shell:not(.hb-collapsed) .hb-rail { display: none !important; }
}
/* A phone never shows the rail: the menu is a drawer there. (!important: the .hb-rail rule below
   sets display and would win on order.) */
@media (max-width: 767.98px) {
    .hb-rail { display: none !important; }
}

/* ---- The menu's top: New, Next up, Pinned (NavMenu) ------------------------------------------ */
.hb-nav-new { padding: 0 12px 12px; }
.hb-nav-new .hb-new { display: flex; }
.hb-nav-new .hb-new-btn.e-btn { width: 100%; height: 44px; font-size: 15px; font-weight: 600; justify-content: center; }
/* New wears the accent, as the app bar does, rather than Syncfusion's primary blue; in dark the ink is
   dark, because white on the lighter dark accent is too faint. */
.hb-new-btn.e-btn.e-primary,
.hb-rail-new-btn.e-btn.e-primary { background: var(--hb-accent); border-color: var(--hb-accent); color: var(--hb-accent-ink); }
.hb-new-btn.e-btn.e-primary:hover,
.hb-rail-new-btn.e-btn.e-primary:hover { filter: brightness(1.08); background: var(--hb-accent); border-color: var(--hb-accent); color: var(--hb-accent-ink); }
.hb-new-btn.e-btn.e-primary .e-btn-icon,
.hb-rail-new-btn.e-btn.e-primary .e-btn-icon { color: inherit; }
.hb-nav-new .hbm-pop { top: calc(100% + 4px); }

.hb-nextup {
    margin: 0 12px 12px;
    padding: 12px;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    background: var(--hb-card-bg);
}
.hb-nextup-cap {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hb-muted);
}
.hb-nextup-title { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--hb-fg); line-height: 1.3; }
.hb-nextup-when { margin-top: 2px; font-size: 13px; color: var(--hb-muted); }
.hb-nextup-none { margin-top: 4px; font-size: 13px; color: var(--hb-muted); }
.hb-nextup-btns { display: flex; gap: 6px; margin-top: 10px; }
.hb-nextup-btns .e-btn { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; text-decoration: none; }

.hb-nav-pins { margin-top: 4px; }
.hb-nav-cap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hb-muted);
}
.hb-nav-cap .fa-star { font-size: 10px; color: var(--hb-accent); }
.hb-nav-hint { padding: 2px 20px 6px; font-size: 12px; color: var(--hb-muted); line-height: 1.4; }

/* A row and its star. The star shows when the row is pointed at or focused, and always on a pinned row.
   The row keeps room on the right for it, so it never sits on top of a count. */
.hb-nav-row { position: relative; }
.hb-nav-star {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--hb-muted);
    cursor: pointer;
    opacity: 0;
}
.hb-nav-row:hover .hb-nav-star,
.hb-nav-row:focus-within .hb-nav-star,
.hb-nav-row.pinned .hb-nav-star { opacity: 1; }
.hb-nav-row.pinned .hb-nav-star { color: var(--hb-accent); }
.hb-nav-star:hover { background: var(--hb-hover); color: var(--hb-accent); }
.hb-nav-star:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: -2px; opacity: 1; }
.hb-nav-star[disabled] { cursor: default; opacity: 0 !important; }
.hb-nav-row .hb-nav-item { padding-right: 44px; }

/* On air: a red pill on Live now and a red dot on the Live header (and on the rail). */
.hb-onair-pill {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--hb-onair);
    color: var(--hb-onair-fg);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
}
.hb-nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hb-accent); flex: none; }
.hb-onair-dot { background: var(--hb-onair); animation: hb-onair-pulse 2s ease-in-out infinite; }
@keyframes hb-onair-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .hb-onair-dot { animation: none; } }

/* The setup guide's line at the foot of the menu, kept in view at the bottom while the menu scrolls. */
.hb-nav-setup {
    position: sticky;
    bottom: 0;
    display: block;
    width: calc(100% - 24px);
    margin: 16px 12px 0;
    padding: 10px 12px;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    background: var(--hb-card-bg);
    color: var(--hb-fg);
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 -8px 12px -6px var(--hb-sidebar-bg);
}
.hb-nav-setup:hover { border-color: var(--hb-accent); }
.hb-nav-setup:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 2px; }
.hb-nav-setup-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.hb-nav-setup-count { font-weight: 400; color: var(--hb-muted); }
.hb-nav-setup-bar { display: block; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--hb-border); overflow: hidden; }
.hb-nav-setup-bar > span { display: block; height: 100%; background: var(--hb-accent); border-radius: 2px; }

/* ---- The rail: the menu folded to icons (desktop only) ---------------------------------------- */
.hb-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 100vh;
    box-sizing: border-box;
    padding: calc(var(--hb-appbar-h) + 10px) 0 16px;
}
.hb-rail-new { margin-bottom: 8px; }
.hb-rail-new .hb-rail-new-btn.e-btn { width: 44px; height: 44px; min-width: 0; padding: 0; justify-content: center; }
.hb-rail-group { position: relative; }
.hb-rail-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    border-radius: 8px;
    color: var(--hb-fg);
    font-size: 17px;
    text-decoration: none;
}
.hb-rail-item:hover { background: var(--hb-hover); color: var(--hb-fg); text-decoration: none; }
.hb-rail-item.active { background: var(--hb-active-bg); color: var(--hb-accent); }
.hb-rail-item:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: -2px; }
.hb-rail-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hb-accent);
    box-shadow: 0 0 0 2px var(--hb-sidebar-bg);
}
.hb-rail-dot.hb-onair-dot { background: var(--hb-onair); }
/* The section's rows in a card to the right, while the icon is pointed at or has focus. The padding on
   the left bridges the gap, so the pointer can cross to the card without it closing. */
.hb-rail-fly {
    display: none;
    position: absolute;
    top: -6px;
    left: 100%;
    z-index: 1250;
    min-width: 230px;
    padding: 6px;
    margin-left: 8px;
    background: var(--hb-card-bg);
    color: var(--hb-fg);
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .1);
}
.hb-rail-fly::before { content: ""; position: absolute; top: 0; bottom: 0; left: -12px; width: 12px; }
.hb-rail-group:hover .hb-rail-fly,
.hb-rail-group:focus-within .hb-rail-fly { display: block; }
.hb-rail-fly-label { min-width: 0; padding: 8px 12px; top: 2px; font-size: 14px; white-space: nowrap; }
.hb-rail-fly-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hb-muted);
}
.hb-rail-fly-head .hb-onair-pill { text-transform: none; letter-spacing: 0; }
.hb-rail-fly-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border-radius: 6px;
    color: var(--hb-fg);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.hb-rail-fly-item i { width: 18px; text-align: center; color: var(--hb-muted); }
.hb-rail-fly-item:hover { background: var(--hb-hover); color: var(--hb-fg); text-decoration: none; }
.hb-rail-fly-item.active { color: var(--hb-accent); font-weight: 600; }
.hb-rail-fly-item.active i { color: var(--hb-accent); }
.hb-rail-fly-item .hb-nav-badge { margin-left: auto; }
/* The setup guide on the rail: a ring filled as far as the steps done, with "5/8" in it. */
.hb-rail-setup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: conic-gradient(var(--hb-accent) var(--hb-setup, 0%), var(--hb-border) 0);
    cursor: pointer;
}
.hb-rail-setup > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hb-sidebar-bg);
    color: var(--hb-fg);
    font-size: 11px;
    font-weight: 700;
}
.hb-rail-setup:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 2px; }

/* Interim dark-mode readability for the Bootstrap surfaces that remain
   until Phase 2 converts them to Syncfusion controls. */
[data-theme="dark"] body,
[data-theme="dark"] .hb-shell { background: var(--hb-content-bg); color: var(--hb-fg); }
[data-theme="dark"] .card { background: var(--hb-card-bg); color: var(--hb-fg); border-color: var(--hb-border); }
[data-theme="dark"] .table { color: var(--hb-fg); }
[data-theme="dark"] .table > :not(caption) > * > * { border-color: var(--hb-border); }
/* Bootstrap 4 paints a table nested in a table (the per-recipient rows under a Message log row) with a
   white background of its own, which in dark mode is a white slab with near-white text on it. */
[data-theme="dark"] .table .table { background-color: transparent; }[data-theme="dark"] .text-muted { color: var(--hb-muted) !important; }
/* .form-text is Bootstrap's OTHER quiet grey — it reads --bs-secondary-color rather than the
   .text-muted class, so patching one and not the other left every field hint in the page builder
   near-black on a near-black panel. */
[data-theme="dark"] .form-text { color: var(--hb-muted); }
/* .bg-light is a near-white slab in both themes, which in dark mode is a white block carrying the
   shell's near-white text. Anything using it as a "this row is selected" tint has to be tinted with
   the accent instead — a light surface is not a light theme. */
[data-theme="dark"] .bg-light {
    background-color: var(--hb-card-bg) !important;
    color: var(--hb-fg);
}
/* Bootstrap's own border colour is a light grey; on a dark panel it draws the box in a harder line
   than anything else on the screen. */
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end { border-color: var(--hb-border) !important; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: var(--hb-card-bg);
    color: var(--hb-fg);
    border-color: var(--hb-border);
}
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu { background: var(--hb-card-bg); color: var(--hb-fg); }
/* Bootstrap paints list rows white with near-black text, which in dark mode left the
   rota member search results a white slab carrying light-grey (.text-muted) emails. */
[data-theme="dark"] .list-group-item {
    background: var(--hb-card-bg);
    color: var(--hb-fg);
    border-color: var(--hb-border);
}

/* ============================================================
   Identity full-page auth screens (Login/Register/Forgot/Reset).
   These pages still use the old Stellar-Admin auth class names but
   Stellar's CSS is gone, so give them a sensible Fluent2 layout.
   Without this, .content-wrapper collapses to min-content inside a
   flex .row and the text wraps one word per line.
   ============================================================ */
.container-scroller,
.page-body-wrapper { width: 100%; }
.page-body-wrapper > .row { width: 100%; margin: 0; }
.full-page-wrapper {
    flex: 1 1 100%;
    width: 100%;
    min-height: 100vh;
    padding: 24px;
    justify-content: center;
    background: var(--hb-content-bg);
}
.auth-form-light,
.auth-form-dark {
    background: var(--hb-card-bg);
    color: var(--hb-fg);
    border: 1px solid var(--hb-border);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.10);
}
.auth-form-dark h1, .auth-form-dark h2, .auth-form-dark h3,
.auth-form-dark h4, .auth-form-dark p,
.auth-form-dark .text-white { color: var(--hb-fg) !important; }
.auth-link,
.auth-form-dark a,
.auth-form-light a { color: var(--hb-accent); }

/* ============================================================
   Dashboard page chrome — shared header, stat tiles, toolbars,
   masked secret inputs and the tabbed Settings page. Colours all
   come from the --hb-* variables so dark mode just works.
   ============================================================ */
.hb-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.hb-page-head h2 { margin-bottom: 2px; }
.hb-page-head .hb-page-sub { color: var(--hb-muted); margin: 0; }
.hb-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Switch + label grouped in a quiet pill so it reads as one control. */
.hb-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--hb-border);
    border-radius: 999px;
    background: var(--hb-card-bg);
    margin: 0;
    white-space: nowrap;
}

/* KPI stat tiles */
.hb-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
@media (max-width: 900px) { .hb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hb-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hb-card-bg);
    border: 1px solid var(--hb-border);
    border-radius: 10px;
    padding: 14px 16px;
}
.hb-stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--hb-active-bg);
    color: var(--hb-accent);
    font-size: 16px;
    flex: 0 0 auto;
}
.hb-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--hb-muted);
    font-weight: 600;
}
.hb-stat-value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.hb-stat-sub { font-size: 12px; color: var(--hb-muted); line-height: 1.3; }

/* Settings > Messaging > Check keys: one line per finding, icon then platform then what was found. */
.hb-keycheck { list-style: none; padding: 0; margin: 0 0 12px; font-size: 13px; }
.hb-keycheck li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.hb-keycheck li i { flex: 0 0 auto; }

/* Small single-series column charts (Shared/MiniColumnChart). One accent colour — the title says
   what it is, so no legend; columns cap at 24px with a 4px rounded top and a 2px gap; the axis is
   a hairline; only the peak is labelled; every value is in the hover title and the table view. */
.hb-minichart { margin: 0; min-width: 0; }
.hb-minichart-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hb-minichart-empty { font-size: 12px; color: var(--hb-muted); margin: 0; }
.hb-minichart-plot {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    /* Border-box: the top padding is headroom for the peak's label above a full-height column. */
    height: 100px;
    padding-top: 16px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-minichart-col {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}
.hb-minichart-bar {
    position: relative;
    width: 100%;
    max-width: 24px;
    background: var(--hb-accent);
    border-radius: 4px 4px 0 0;
}
.hb-minichart-col:hover .hb-minichart-bar { opacity: .75; }
/* Sits just above its column, in the plot's top padding when the column is full height. */
.hb-minichart-peak {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1;
    color: var(--hb-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.hb-minichart-axis { display: flex; gap: 2px; margin-top: 4px; }
.hb-minichart-axis span {
    flex: 1 1 0;
    min-width: 0;
    font-size: 10px;
    color: var(--hb-muted);
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}
.hb-minichart-table summary { font-size: 11px; color: var(--hb-muted); cursor: pointer; margin-top: 6px; }
.hb-minichart-table table { font-size: 12px; margin: 4px 0 0; }

/* Card section titles + toolbars */
.hb-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.hb-card-title h4 { margin: 0; }
.hb-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--hb-border);
    margin-bottom: 12px;
}
.hb-toolbar .hb-toolbar-label { font-size: 12px; color: var(--hb-muted); margin-right: 2px; }

/* Masked secret input with reveal toggle */
.hb-secret { display: flex; align-items: flex-start; gap: 6px; }
.hb-secret-input { flex: 1 1 auto; min-width: 0; }
.hb-secret-eye { flex: 0 0 auto; padding: 6px 10px !important; }

/* Go Live — where a broadcast is sent on to. A tick and, under it, one line that is a promise
   before going live and a report after, so the row never has to be replaced when the state
   changes. Matches Studio's .hb-destinations, which is the same panel on the other screen. */
.hb-destinations { display: flex; flex-direction: column; gap: .45rem; margin-top: .5rem; }
.hb-destination small { display: block; margin-left: 1.7rem; line-height: 1.3; }

/* ---- Go live while on air (Shared/Live/OnAirBar, OnAirBoard) -----------------------------------
   The same bar and board as Heartisan Studio's (mediabase.css, "Go live while on air"): the two Go
   live pages must look alike. The bar keeps its own reds in both themes — on air reads the same in
   daylight and in a dark booth. White on #8e1616 is 8.9:1, on #4a2323 13:1. */
.hb-air-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1rem;
    margin: 0 0 1rem;
    padding: .7rem 1rem;
    border-radius: 8px;
    background: #8e1616;
    color: #fff;
}
.hb-air-bar.hb-air-bar-rec { background: #4a2323; }
.hb-air-label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; letter-spacing: .08em; }
.hb-air-dot { width: 11px; height: 11px; border-radius: 50%; background: #ff6b6b; animation: hb-air-pulse 2s ease-in-out infinite; }
@keyframes hb-air-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hb-air-dot { animation: none; } }
.hb-air-time { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-air-title { flex: 1 1 12rem; min-width: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-air-on { margin-left: .4rem; opacity: .8; font-size: .9rem; }
.hb-air-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.hb-air-actions .hb-btn-divider { align-self: stretch; width: 1px; min-height: 1.75rem; margin: 0 .35rem; background: rgba(255,255,255,.35); }
.hb-air-bar .e-btn.hb-air-btn { color: #fff !important; border-color: rgba(255,255,255,.55) !important; background: transparent !important; }
.hb-air-bar .e-btn.hb-air-btn:hover:not(:disabled) { background: rgba(255,255,255,.12) !important; }
.e-btn.hb-air-stop {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 1.2rem;
    background: #c62828 !important; border: 2px solid #fff !important; color: #fff !important; font-weight: 600;
}
.e-btn.hb-air-stop:hover:not(:disabled) { background: #b71c1c !important; }
.hb-air-stop-square { width: 11px; height: 11px; border-radius: 2px; background: #fff; }

/* The form while on air and not asked for: hidden, not removed — its pickers are set up by id. */
.hb-air-hidden { display: none !important; }

.hb-air-board { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.hb-air-where { margin: 0; font-size: .85rem; }
.hb-air-media { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; }
.hb-air-picture { flex: 3 1 420px; }
.hb-air-sound { flex: 2 1 300px; }
.hb-air-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.hb-air-tile {
    min-width: 0; display: flex; flex-direction: column; gap: .45rem; padding: .9rem 1rem;
    border: 1px solid var(--hb-border); border-radius: 8px; background: var(--hb-card-bg); color: var(--hb-fg);
}
.hb-air-cap { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hb-muted); }
.hb-air-preview { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 4px; }
.hb-air-preview-empty { display: flex; align-items: center; justify-content: center; color: #a19f9d; font-size: .85rem; }
.hb-air-wave { width: 100%; height: 72px; color: var(--hb-accent); background: rgba(0,0,0,.04); border-radius: 6px; }
[data-theme="dark"] .hb-air-wave { background: rgba(255,255,255,.04); }
.hb-air-level { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; font-size: .85rem; }
.hb-air-level > :first-child { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Mono or stereo, and where it is being sent: one line under the level. */
.hb-air-channels { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; font-size: .85rem; margin-top: .35rem; }
.hb-air-channels .hb-air-channel-pick { max-width: 15rem; }
.hb-air-word { font-size: 1.25rem; font-weight: 600; }
.hb-air-line { font-size: .85rem; line-height: 1.4; }
.hb-air-warn { margin: 0; font-size: .85rem; color: #8a5a00; }
.hb-air-ok-text { color: #107c10; }
.hb-air-warn-text { color: #8a5a00; }
.hb-air-bad-text { color: #a4262c; }
[data-theme="dark"] .hb-air-warn,
[data-theme="dark"] .hb-air-warn-text { color: #e0a458; }
[data-theme="dark"] .hb-air-ok-text { color: #6ee787; }
[data-theme="dark"] .hb-air-bad-text { color: #ff8a80; }
.hb-air-dests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.hb-air-dests li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; }
.hb-air-dest-name { font-weight: 600; }
.hb-air-dest-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hb-muted); flex: 0 0 auto; align-self: center; }
.hb-air-dot-ok { background: #107c10; }
.hb-air-dot-warn { background: #c19c00; }
.hb-air-dot-bad { background: #a4262c; }
[data-theme="dark"] .hb-air-dot-ok { background: #6ee787; }
[data-theme="dark"] .hb-air-dot-warn { background: #e0a458; }
[data-theme="dark"] .hb-air-dot-bad { background: #ff8a80; }

/* ---- the running order beside the on-air board (Shared/Live/OnAirPlan) — as Studio's ---------- */
.hb-air-layout { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.hb-air-layout > .hb-plan { flex: 1 1 260px; max-width: 340px; }
.hb-air-layout > .hb-air-board { flex: 999 1 520px; min-width: 0; }
.hb-plan { display: flex; flex-direction: column; gap: .55rem; padding: .9rem .8rem; border: 1px solid var(--hb-border); border-radius: 8px; background: var(--hb-sidebar-bg); color: var(--hb-fg); }
.hb-plan-head { display: flex; align-items: baseline; gap: .5rem; padding: 0 .3rem; }
.hb-plan-offset { margin-left: auto; font-size: .82rem; }
.hb-plan-title { padding: 0 .3rem; font-weight: 600; }
.hb-plan-source { margin: 0; padding: 0 .3rem; font-size: .8rem; color: var(--hb-muted); }
.hb-plan-warn { margin: 0; padding: .4rem .5rem; border-radius: 4px; font-size: .8rem; color: #8a5a00; background: rgba(224,164,88,.12); }
[data-theme="dark"] .hb-plan-warn { color: #e0a458; }

/* ---- Go live's start screen, "what is this broadcast for?", and Get ready (as HeartBeat Studio) ---- */
.hb-back { display: inline-block; font-size: .85rem; color: var(--hb-muted); text-decoration: none; margin-bottom: .15rem; }
.hb-back:hover { color: var(--hb-fg); }
.hb-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 .5rem; border-radius: 11px; font-size: .72rem; border: 1px solid var(--hb-border); background: var(--hb-hover); color: var(--hb-fg); white-space: nowrap; }
.hb-tag.is-quiet { color: var(--hb-muted); background: transparent; }
.hb-tag.is-ok { color: #107c10; border-color: rgba(16,124,16,.35); }
[data-theme="dark"] .hb-tag.is-ok { color: #6ccb5f; border-color: rgba(108,203,95,.4); }

.hb-start, .hb-choose, .hb-ready { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.hb-start-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hb-start-head h3 { margin: 0; }
.hb-start-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hb-start-hero, .hb-start-list, .hb-choose-list, .hb-choose-fill, .hb-ready-what, .hb-ready-check, .hb-ready-list, .hb-ready-go {
    border: 1px solid var(--hb-border); border-radius: 8px; background: var(--hb-card-bg); padding: 1rem 1.1rem;
}
.hb-start-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; border-left: 3px solid var(--hb-accent); }
.hb-start-hero-text { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.hb-start-hero-text p { margin: 0; }
.hb-start-title { margin: 0; font-size: 1.5rem; font-weight: 600; }
.hb-start-plan { font-size: .9rem; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.hb-start-plan.is-warn { color: #8a5a00; }
[data-theme="dark"] .hb-start-plan.is-warn { color: #e0a458; }
.e-btn.hb-start-ready { min-height: 48px; min-width: 160px; font-size: 1rem; font-weight: 600; }

.hb-start-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.hb-start-way {
    display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; text-align: left;
    padding: .9rem 1rem; min-height: 96px;
    border: 1px solid var(--hb-border); border-radius: 8px; background: var(--hb-card-bg); color: var(--hb-fg);
    font: inherit; cursor: pointer;
}
.hb-start-way:hover { border-color: var(--hb-accent); }
.hb-start-way:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 2px; }
.hb-start-way strong { font-size: 1rem; }
.hb-start-way .text-muted { font-size: .85rem; line-height: 1.4; }

.hb-start-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; }
.hb-start-list-head h4 { margin: 0; }
.hb-start-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hb-start-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--hb-border); }
.hb-start-list li > div:first-child { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.hb-start-list li > div:last-child { display: flex; gap: .4rem; flex-wrap: wrap; }
.hb-start-list li .text-muted { font-size: .85rem; }
.hb-start-unfinished li strong { color: #8a5a00; }
[data-theme="dark"] .hb-start-unfinished li strong { color: #e0a458; }

.hb-choose-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .hb-choose-grid { grid-template-columns: 1fr; } }
.hb-choose-list ul { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.hb-choose-row {
    width: 100%; display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; text-align: left;
    padding: .6rem .75rem; border: 1px solid var(--hb-border); border-radius: 6px;
    background: transparent; color: var(--hb-fg); font: inherit; cursor: pointer;
}
.hb-choose-row:hover { background: var(--hb-hover); }
.hb-choose-row.is-picked { border-color: var(--hb-accent); background: var(--hb-active-bg); }
.hb-choose-row .text-muted { font-size: .85rem; }
.hb-choose-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .15rem; }
.hb-choose-fill h4 { margin: 0 0 .2rem; font-size: 1.15rem; }
.hb-choose-note { margin: .25rem 0 .4rem; font-size: .85rem; }
.hb-choose-cover { width: 100%; max-height: 180px; object-fit: cover; border-radius: 6px; margin: .4rem 0; }
.hb-choose-fields { margin: .5rem 0; display: flex; flex-direction: column; gap: .5rem; }
.hb-choose-fields dt { font-size: .8rem; color: var(--hb-muted); font-weight: 400; display: flex; gap: .4rem; align-items: center; }
.hb-choose-fields dd { margin: 0; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hb-choose-actions { margin-top: .75rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.hb-checks { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.hb-checks li { display: flex; gap: .45rem; align-items: baseline; }
.hb-checks li::before { flex: 0 0 1em; text-align: center; font-weight: 700; }
.hb-checks li.is-ok::before { content: "✓"; color: #107c10; }
.hb-checks li.is-warn::before { content: "!"; color: #8a5a00; }
.hb-checks li.is-bad::before { content: "✕"; color: #a4262c; }
.hb-checks li.is-todo::before { content: "•"; color: var(--hb-muted); }
.hb-checks li.is-bad { color: #a4262c; }
[data-theme="dark"] .hb-checks li.is-ok::before { color: #6ccb5f; }
[data-theme="dark"] .hb-checks li.is-warn::before { color: #e0a458; }
[data-theme="dark"] .hb-checks li.is-bad, [data-theme="dark"] .hb-checks li.is-bad::before { color: #e57373; }

.hb-ready-what p { margin: .2rem 0 0; }
.hb-ready-from { font-size: .85rem; }
/* Get ready: the template beside the title (stage 5) */
.hb-ready-what-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.hb-ready-what-row .form-group { margin-bottom: 0; }
.hb-ready-template { flex: 1 1 220px; max-width: 320px; }
.hb-ready-title { flex: 2 1 280px; }

/* Get ready's event and plan: the event's picture (the broadcast's cover) beside what is chosen, in words,
   with Change right after them opening the pickers in a dialog. As Heartisan Studio's. */
.hb-ready-link { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; margin-top: .75rem; }
.hb-ready-cover { flex: 0 0 auto; width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--hb-border); background: rgba(128, 128, 128, .15); }
.hb-ready-cover.is-empty { display: flex; align-items: center; justify-content: center; color: var(--hb-muted); font-size: 1.5rem; }
.hb-ready-link-text { flex: 1 1 280px; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: flex-start; min-width: 0; }
.hb-ready-link-list { flex: 0 1 auto; margin: 0; display: grid; gap: .5rem; min-width: 0; }
.hb-ready-link-list > div { display: grid; grid-template-columns: 7.5rem auto; gap: .15rem .75rem; }
.hb-ready-link-list dt { font-weight: 400; color: var(--hb-muted); }
.hb-ready-link-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hb-ready-link-list small { display: block; margin-top: .1rem; }
.hb-ready-pick { display: grid; gap: 1rem; }
.hb-ready-pick-event { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; }
.hb-ready-pick-event > .form-group { flex: 1 1 260px; margin: 0; min-width: 0; }
.hb-ready-pick small { display: block; margin-top: .25rem; }
.hb-ready-pick-items { margin: .5rem 0 0; padding-left: 1.4rem; font-size: .9rem; line-height: 1.5; }
@media (max-width: 520px) {
    .hb-ready-cover { width: 100%; }
    .hb-ready-link-list > div { grid-template-columns: 1fr; }
}
/* A row of the event picker: the picture, then the title over when it is. */
.hb-event-item { display: flex; align-items: center; gap: .6rem; padding: 2px 0; }
.hb-event-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex: 0 0 44px; }
.hb-event-thumb-empty { background: rgba(128, 128, 128, .15); }
.hb-event-text { min-width: 0; }
.hb-event-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-event-when { color: var(--hb-muted); font-size: .85em; }

/* ---- Diary and Broadcast templates (stage 5; as HeartBeat Studio's) ----------------------------- */
.hb-diary-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hb-diary-head h3 { margin: 0; }
.hb-diary-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hb-diary-day { margin-bottom: 1.25rem; }
.hb-diary-day h4 { margin: 0 0 .4rem; }
.hb-diary-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hb-border); border-radius: 8px; background: var(--hb-card-bg); }
.hb-diary-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .6rem .8rem; }
.hb-diary-row + .hb-diary-row { border-top: 1px solid var(--hb-border); }
.hb-diary-time { flex: 0 0 3.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-diary-what { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.hb-diary-actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }

.hb-tpl-split { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.hb-tpl-list { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; gap: 2px; }
.hb-tpl-row {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem;
    border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--hb-fg);
    font: inherit; text-align: left; cursor: pointer;
}
.hb-tpl-row:hover { background: var(--hb-hover); }
.hb-tpl-row.selected { background: var(--hb-active-bg); border-color: var(--hb-accent); }
.hb-tpl-row:focus-visible, .hb-tpl-sec:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 1px; }
.hb-tpl-thumb { flex: 0 0 56px; width: 56px; height: 32px; border-radius: 4px; overflow: hidden; background: var(--hb-hover); }
.hb-tpl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-tpl-row-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.hb-tpl-row-title { font-weight: 600; }
.hb-tpl-row-sub { font-size: .8rem; }
.hb-tpl-none { margin: .3rem .7rem; }
.e-btn.hb-tpl-new { margin: .5rem 0 0 .2rem; }
.hb-tpl-also { margin: 1.2rem .7rem .3rem; }
.hb-tpl-unsaved { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.hb-tpl-detail { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: .75rem; }
.hb-tpl-title { margin: 0; font-size: 1.3rem; font-weight: 600; }
.hb-tpl-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; justify-content: space-between; }
.hb-tpl-name { flex: 1 1 260px; max-width: 420px; margin: 0; }
.hb-tpl-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hb-tpl-body { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.hb-tpl-sections { flex: 0 0 190px; display: flex; flex-direction: column; gap: 2px; }
.hb-tpl-sec {
    padding: .5rem .7rem; border: 0; border-radius: 4px; background: transparent; color: var(--hb-fg);
    font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.hb-tpl-sec:hover { background: var(--hb-hover); }
.hb-tpl-sec.selected { background: var(--hb-active-bg); font-weight: 600; }
.hb-tpl-section { flex: 1 1 420px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: .4rem; }
.hb-tpl-section h4 { margin: 0 0 .2rem; font-size: 1.05rem; font-weight: 600; }
.hb-tpl-options { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .5rem; }
.hb-tpl-options small { margin: 0 0 .5rem 1.7rem; }
.hb-tpl-art { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.hb-tpl-art-thumb { width: 112px; height: 63px; object-fit: cover; border-radius: 4px; border: 1px solid var(--hb-border); }
.hb-tpl-foot { margin: .5rem 0 0; font-size: .85rem; }
@media (max-width: 640px) {
    .hb-tpl-list { max-width: none; }
    .hb-tpl-sections { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
}
.hb-ready-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.hb-ready-check { display: flex; flex-direction: column; gap: .6rem; }
.hb-ready-check h4, .hb-ready-list h4 { margin: 0; }
.hb-ready-level { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.hb-ready-db { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.5ch; }
.hb-ready-meter { flex: 1 1 160px; height: 8px; border-radius: 4px; background: var(--hb-hover); overflow: hidden; }
.hb-ready-meter span { display: block; height: 100%; background: #107c10; transition: width .15s linear; }
[data-theme="dark"] .hb-ready-meter span { background: #6ccb5f; }
.hb-ready-go { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.hb-ready-go p { margin: 0; }
.e-btn.hb-ready-btn { min-height: 52px; min-width: 220px; font-size: 1.1rem; font-weight: 600; }

/* ---- Live slides on the on-air board: the room and the app side by side (as HeartBeat Studio) ---- */
.hb-slides { gap: .7rem; }
.hb-slides-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.hb-slides-head .hb-air-warn-text { font-size: .85rem; }
.hb-slides-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; }
.hb-slide-now { margin: 0; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.hb-slide-now figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .8rem; }
/* A slide is projected light on black in the room in either theme, so the faces stay dark. */
.hb-slide-face {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    background: #000;
    border: 1px solid var(--hb-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hb-slide-face img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hb-slide-face.is-text { flex-direction: column; gap: .4rem; padding: .8rem 1rem; color: #f3f2f1; text-align: center; font-size: .95rem; line-height: 1.4; }
.hb-slide-face.is-text span { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.hb-slide-face.is-text small { color: #c8c6c4; }
.hb-slide-face.is-empty { color: #a19f9d; font-size: .85rem; padding: 1rem; text-align: center; }
.hb-slide-flag { margin: 0; font-size: .8rem; color: #8a5a00; }
[data-theme="dark"] .hb-slide-flag { color: #e0a458; }

.hb-slides-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.hb-slides-actions > .e-btn { min-height: 40px; }
.hb-slides-delay { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; font-size: .85rem; }
.hb-slides-delay .e-btn { min-width: 36px; min-height: 36px; padding: 0; }
.hb-slides-delay-value { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.hb-slides-said { margin: 0; font-size: .82rem; }

.hb-slides-deck { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.hb-slides-deck > .text-muted { font-size: .8rem; }
.hb-slides-strip { list-style: none; margin: 0; padding: 0 0 .3rem; display: flex; gap: .5rem; overflow-x: auto; }
.hb-slides-thumb {
    flex: 0 0 auto;
    width: 132px;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
    padding: .35rem;
    border-radius: 4px;
    background: #000;
    border: 1px solid var(--hb-border);
    color: #d2d0ce;
    font-size: .62rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hb-slides-thumb.is-done { opacity: .5; }
.hb-slides-thumb.is-now { border-color: var(--hb-accent); box-shadow: 0 0 0 1px var(--hb-accent); color: #fff; }
.e-btn.hb-plan-start { width: 100%; min-height: 48px; font-size: 1rem; font-weight: 600; }
.hb-plan-step { display: flex; gap: .4rem; }
.e-btn.hb-plan-back { flex: 0 0 44px; min-height: 44px; padding: 0; font-size: 1.2rem; }
.e-btn.hb-plan-next { flex: 1 1 auto; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; text-align: left; }
.hb-plan-next-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-plan-last { align-self: center; font-size: .85rem; }
.hb-plan-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hb-plan-item { width: 100%; display: flex; align-items: flex-start; gap: .55rem; padding: .45rem .5rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--hb-fg); font: inherit; font-size: .88rem; line-height: 1.35; text-align: left; cursor: pointer; }
.hb-plan-item:hover:not(:disabled) { background: var(--hb-hover); }
.hb-plan-item:disabled { cursor: default; color: var(--hb-fg); }
.hb-plan-item:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 1px; }
.hb-plan-item.done { color: var(--hb-muted); }
.hb-plan-item.now { background: var(--hb-active-bg); border-color: var(--hb-accent); }
.hb-plan-time { flex: 0 0 2.8rem; color: var(--hb-muted); font-variant-numeric: tabular-nums; }
.hb-plan-item.now .hb-plan-time { color: var(--hb-fg); }
.hb-plan-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hb-plan-item.now .hb-plan-name { font-weight: 600; }
.hb-plan-meta { font-size: .76rem; color: var(--hb-muted); }
.hb-plan-bell { color: var(--hb-muted); font-size: .78rem; margin-top: .2rem; }
.hb-plan-now { font-size: .68rem; font-weight: 700; letter-spacing: .05em; color: var(--hb-accent); margin-top: .15rem; }
.hb-plan-notes { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .3rem 0; border-top: 1px solid var(--hb-border); font-size: .85rem; line-height: 1.5; }
.hb-plan-notes h4 { margin: .2rem 0 0; }
.hb-plan-scripture { font-weight: 600; }
.hb-plan-richtext p { margin: 0 0 .4rem; }
.hb-plan-richtext img { max-width: 100%; height: auto; }
.e-btn.hb-plan-endbtn { align-self: flex-start; }
.hb-plan-end-confirm { display: flex; flex-direction: column; gap: .4rem; padding: .6rem; border: 1px solid var(--hb-border); border-radius: 6px; background: var(--hb-card-bg); font-size: .85rem; }

/* Settings page — sticky header under the app bar + tabbed sections */
.hb-settings-head {
    position: sticky;
    top: var(--hb-appbar-h);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 6px;
    background: var(--hb-content-bg);
}
.hb-settings-head h2 { margin-bottom: 2px; }
.hb-settings-tabs { background: var(--hb-card-bg); border: 1px solid var(--hb-border); border-radius: 10px; }
.hb-settings-tabs .e-tab-header { padding: 0 10px; }
.hb-tab-body { padding: 18px 20px 24px; max-width: 980px; }
/* The cap above is a reading width, right for the settings-style forms this class was written for
   and wrong for a tab whose body is a wide data grid. The media library's Hosts list carries eight
   columns — avatar, name, initials, media, views, description, in apps and the row actions — and at
   980px they squeeze until the description is unreadable. Opt those tabs out rather than lifting the
   cap for every page that uses it. */
.hb-tab-body.hb-tab-body-wide { max-width: none; }
/* A logo made for a dark ground is previewed on one: light lettering on the page's white would not show. */
.hb-logo-on-dark > img { background: #0b1220; border-radius: 8px; padding: 10px 16px; max-height: 120px; object-fit: contain; }
.hb-sec {
    font-size: 15px;
    font-weight: 600;
    margin: 22px 0 4px;
    padding-top: 16px;
    border-top: 1px solid var(--hb-border);
}
.hb-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.hb-sec-hint { color: var(--hb-muted); font-size: 12.5px; margin-bottom: 10px; }
.hb-capture-windows { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.hb-capture-windows .hb-sec-hint { margin: 0 0 0 6px; }
/* Branding -> Logos -> Store artwork: thumbnails of every graphic, grouped by store. */
.hb-art-preview { margin-top: 12px; }
.hb-art-store { margin-bottom: 16px; }
.hb-art-store h6 { margin: 0 0 6px; font-weight: 600; }
.hb-art-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.hb-art-fig { margin: 0; }
.hb-art-canvas { display: block; height: auto; border: 1px solid var(--hb-border, rgba(128, 128, 128, 0.35)); border-radius: 6px; background: repeating-conic-gradient(#d8d8d8 0% 25%, #f4f4f4 0% 50%) 50% / 12px 12px; }
.hb-art-fig figcaption { font-size: 11.5px; color: var(--hb-muted); margin-top: 3px; max-width: 240px; }
/* App store listing: its tabs' sections, the store screenshots run and the copyable words. */
.hb-store-section h4 { font-size: 17px; font-weight: 600; margin: 4px 0 2px; }
.hb-store-section > p.text-muted { margin-bottom: 14px; }
.hb-shot-group-title { font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
.hb-shot-store { font-size: 12px; color: var(--hb-muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 2px; }
.hb-shot-check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; font-size: 13.5px; cursor: pointer; }
.hb-shot-check input { margin-top: 3px; }
.hb-shot-radios { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 6px; }
.hb-shot-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.hb-shot-progress { flex: 1 1 220px; max-width: 360px; line-height: 0; }
.hb-shot-run { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--hb-border); border-radius: 10px; background: var(--hb-card-bg); }
.hb-shot-run-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.hb-shot-run-head > .e-message { flex: 1 1 100%; margin: 0; }
.hb-shot-download { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.hb-shot-rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.hb-shot-rows li { display: grid; grid-template-columns: 18px minmax(180px, max-content) 1fr; gap: 10px; align-items: baseline; font-size: 13px; }
.hb-shot-rows li i { color: var(--hb-muted); text-align: center; }
.hb-shot-rows li.is-starting i, .hb-shot-rows li.is-shooting i { color: var(--hb-accent); }
.hb-shot-rows li.is-done i { color: #2e7d32; }
.hb-shot-rows li.is-failed i { color: #c62828; }
.hb-shot-rows li.is-waiting, .hb-shot-rows li.is-skipped { color: var(--hb-muted); }
.hb-shot-row-label { font-weight: 600; }
.hb-shot-row-text { color: var(--hb-muted); }
.hb-shot-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.hb-shot-gallery:empty { display: none; }
.hb-shot-thumb { position: relative; display: flex; flex-direction: column; gap: 4px; width: 132px; color: inherit; text-decoration: none; }
.hb-shot-thumb img { width: 100%; height: 150px; object-fit: contain; background: var(--hb-content-bg); border: 1px solid var(--hb-border); border-radius: 6px; }
.hb-shot-thumb span { font-size: 11px; color: var(--hb-muted); line-height: 1.3; }
.hb-shot-thumb em { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: #ffb300; color: #1f1f1f; }
.hb-shot-thumb.is-warn img { border-color: #ffb300; }
.hb-shot-thumb:hover img, .hb-shot-thumb:focus-visible img { border-color: var(--hb-accent); }
.hb-store-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 16px; margin-bottom: 14px; }
.hb-store-text { margin: 0 0 18px; }
.hb-store-text-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.hb-store-text-head label { font-weight: 600; margin: 0; }
.hb-store-text p.text-muted { margin: 0 0 6px; }
.hb-store-text textarea { font-family: inherit; line-height: 1.5; }
.hb-store-text-limits { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--hb-muted); margin-top: 4px; }
.hb-store-text-limits .is-over { color: #c62828; font-weight: 600; }
.hb-whatsnew-since { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hb-whatsnew-since label { font-weight: 600; margin: 0; }
.hb-whatsnew-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.hb-whatsnew-list li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; font-size: 13.5px; border-bottom: 1px solid var(--hb-border); padding-bottom: 6px; }
.hb-whatsnew-list li > .text-muted { flex: none; }
[data-theme="dark"] .hb-shot-rows li.is-done i { color: #81c784; }
[data-theme="dark"] .hb-shot-rows li.is-failed i,
[data-theme="dark"] .hb-store-text-limits .is-over { color: #ef9a9a; }
/* The members' privacy notice as members will read it: always a white page, in either theme. */
.hb-notice-preview { background: #fff; color: #1f1f1f; line-height: 1.6; border: 1px solid #d0d0d0; border-radius: 8px; padding: 16px 20px; margin: 8px 0 20px; max-height: 480px; overflow: auto; }
.hb-notice-preview table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; }
.hb-notice-preview th, .hb-notice-preview td { border: 1px solid #d0d0d0; padding: 8px 10px; vertical-align: top; text-align: left; background: #fff; color: #1f1f1f; }
.hb-notice-preview mark.hb-notice-gap { background: #ffe58f; padding: 0 4px; border-radius: 3px; }

/* Per-setting explanation bubble (Shared/HelpTip.razor). CSS-only: the settings page carries
   ~80 of these, so hover/focus does the work rather than a component apiece.
   The Syncfusion tab clips its content item while animating, which would cut the bubble in
   half — the tab bodies here scroll with the page, so overflow can stay visible. */
.hb-settings-tabs .e-content .e-item { overflow: visible; }
/* Syncfusion cards clip their content too, which would slice a bubble in half. Only the
   cards that actually carry a tip are opened up. */
.e-card:has(.hb-tip) { overflow: visible; }
.hb-tip { position: relative; display: inline-flex; vertical-align: baseline; margin-left: 5px; }
.hb-tip-btn {
    appearance: none;
    width: 15px; height: 15px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--hb-border); border-radius: 50%;
    background: transparent; color: var(--hb-muted);
    font-size: 8.5px; line-height: 1; cursor: help;
}
.hb-tip-btn:hover, .hb-tip-btn:focus-visible { color: var(--hb-fg); border-color: var(--hb-muted); }
.hb-tip-bubble {
    position: absolute; top: calc(100% + 8px); left: -7px; z-index: 400;
    width: max-content;
    border-radius: 7px;
    background: var(--hb-tip-bg); color: var(--hb-tip-fg);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.5;
    text-align: left; text-transform: none; white-space: normal;
    opacity: 0; visibility: hidden; transform: translateY(-3px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s;
    pointer-events: none;
    /* Hidden, it takes no room at all. visibility:hidden alone still counts towards the page's
       scroll width, so on a phone every tip near the right edge made the whole page scroll
       sideways by up to a bubble's width. */
    max-width: 0; max-height: 0; padding: 0; overflow: hidden;
}
.hb-tip-bubble.hb-tip-end { left: auto; right: -7px; }
/* The pointer, and an invisible bridge across the gap so the bubble survives the mouse
   travelling into it. */
.hb-tip-bubble::before {
    content: ""; position: absolute; top: -5px; left: 8px;
    border: 5px solid transparent; border-top: 0; border-bottom-color: var(--hb-tip-bg);
}
.hb-tip-bubble.hb-tip-end::before { left: auto; right: 8px; }
.hb-tip-bubble::after { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.hb-tip:hover .hb-tip-bubble, .hb-tip:focus-within .hb-tip-bubble {
    opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    max-width: min(300px, calc(100vw - 32px)); max-height: none; padding: 9px 11px; overflow: visible;
}
.hb-tip-bubble code { color: inherit; background: rgba(255,255,255,.14); padding: 0 3px; border-radius: 3px; }
.hb-tip-bubble strong { font-weight: 600; }
.hb-tip-bubble a { color: inherit; text-decoration: underline; }
.hb-tip-bubble p { margin: 0 0 6px; }
.hb-tip-bubble p:last-child { margin-bottom: 0; }
/* Router SMS: the registered-routers list and the one-shot install commands. */
.hb-router-table { font-size: 13px; }
.hb-router-table code { font-size: 12px; }
.hb-router-cmds {
    background: var(--hb-surface-2, rgba(127,127,127,.10));
    border: 1px solid var(--hb-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-x: auto;
    margin-bottom: 8px;
}
.hb-key-set {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: #107c10; background: rgba(16,124,16,.12);
    border-radius: 999px; padding: 3px 10px;
}
[data-theme="dark"] .hb-key-set { color: #6ccb5f; background: rgba(108,203,95,.14); }

/* ============================================================
   Follow-ups board — tab strip + task grid. All colours come from
   the theme variables so the dark toggle carries the whole page.
   ============================================================ */
.hb-fu-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.hb-fu-stat {
    display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 600;
    color: var(--hb-muted); background: var(--hb-content-bg);
    border: 1px solid var(--hb-border); border-radius: 999px; padding: 3px 10px;
}
.hb-fu-stat.overdue { color: #a4262c; background: rgba(164,38,44,.12); border-color: rgba(164,38,44,.35); }
[data-theme="dark"] .hb-fu-stat.overdue { color: #f1707b; background: rgba(241,112,123,.14); border-color: rgba(241,112,123,.3); }

.hb-fu-tabs { background: var(--hb-card-bg); border: 1px solid var(--hb-border); border-radius: 10px; }
.hb-fu-tabs .e-tab-header { padding: 0 10px; }
.hb-fu-body { padding: 14px 14px 18px; }
.hb-fu-empty { color: var(--hb-muted); margin: 6px 2px; }

.hb-fu-title { font-weight: 600; color: var(--hb-fg); }
.hb-fu-sub { color: var(--hb-muted); font-size: 12.5px; }

/* People pickers (assignee + contact): avatar, then name over email. Syncfusion sets a
   fixed single-line height on list items, so the row height has to be released here or
   the second line is clipped. */
.e-dropdownbase .e-list-item:has(.hb-pick-row),
.e-ddl.e-popup .e-list-item:has(.hb-pick-row) {
    height: auto;
    line-height: normal;
    padding: 7px 12px;
}

.hb-pick-row { display: flex; align-items: center; gap: 10px; min-width: 0; }

.hb-pick-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--hb-content-bg);
    border: 1px solid var(--hb-border);
}

/* A broadcast's cover in a picker row. Rectangular, unlike .hb-pick-avatar — artwork is 16:9-ish
   and a circular crop of it is unrecognisable, which defeats the point of showing it. */
.hb-pick-thumb {
    flex: 0 0 auto;
    width: 48px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--hb-content-bg);
    border: 1px solid var(--hb-border);
}

/* The artwork fields on the Go live form: thumbnail beside the picker rather than under it, so the
   two picture fields stay compact enough to sit with the rest of "what it is". */
.hb-art-row { display: flex; align-items: flex-start; gap: 12px; }
.hb-art-pick { min-width: 0; flex: 1 1 auto; }

.hb-art-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--hb-content-bg);
    border: 1px solid var(--hb-border);
}

.hb-pick-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--hb-fg);
    text-transform: uppercase;
}

/* min-width:0 lets a long email ellipsize instead of stretching the popup. */
.hb-pick-text { min-width: 0; }
.hb-pick-name { color: var(--hb-fg); font-weight: 600; line-height: 1.25; }
.hb-pick-sub {
    color: var(--hb-muted);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Adding people to a group by hand. Names are staged as chips before anything is written, so a
   whole small group can go in together and a misclick is taken back rather than undone. */
.hb-add-member { margin-bottom: 4px; }

.hb-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.hb-chosen-chip { display: inline-flex; align-items: center; gap: 6px; }

.hb-chosen-x {
    background: none;
    border: 0;
    padding: 0 0 0 2px;
    color: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
}

.hb-chosen-x:hover { opacity: 1; }

.hb-fu-link { color: var(--hb-accent); font-size: 12.5px; text-decoration: none; }
.hb-fu-link:hover { text-decoration: underline; }
.hb-fu-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Rows carry two lines (title + notes, contact + email + phone), so let the grid
   breathe rather than clipping to a single line height. */
.hb-fu-body .e-grid td.e-rowcell { padding-top: 10px; padding-bottom: 10px; vertical-align: top; }

/* Form answers dialog — a label/value list, themed (no Bootstrap table). */
.hb-fu-kv { border-top: 1px solid var(--hb-border); }
.hb-fu-kv-row { display: flex; gap: 14px; padding: 8px 2px; border-bottom: 1px solid var(--hb-border); }
.hb-fu-kv-key { flex: 0 0 200px; font-weight: 600; color: var(--hb-fg); }
.hb-fu-kv-val { flex: 1 1 auto; color: var(--hb-fg); word-break: break-word; }
@media (max-width: 575.98px) {
    .hb-fu-kv-row { flex-direction: column; gap: 2px; }
    .hb-fu-kv-key { flex: 0 0 auto; }
}

/* ============================================================
   Toasts — sit below the sticky app bar (they were getting
   clipped by it), bigger and harder to miss, and slide in from
   off-screen right. Applies to every SfToast in the portal.
   ============================================================ */
.e-toast-container { z-index: 1300 !important; }
.e-toast-container.e-toast-top-right {
    top: calc(var(--hb-appbar-h) + 14px) !important;
    right: 16px !important;
}
.e-toast-container .e-toast {
    min-width: 360px;
    max-width: 440px;
    padding: 16px 18px;
    border-radius: 10px;
    border-left: 4px solid var(--hb-accent);
    background: var(--hb-card-bg) !important;
    color: var(--hb-fg) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.28);
    /* Slide in from beyond the right edge; Syncfusion's own fade
       handles opacity so we only animate transform here. */
    animation: hb-toast-in .38s cubic-bezier(.16,.84,.3,1);
}
@keyframes hb-toast-in {
    from { transform: translateX(calc(100% + 32px)); }
    to   { transform: translateX(0); }
}
.e-toast-container .e-toast .e-toast-icon {
    font-size: 20px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hb-active-bg);
    color: var(--hb-accent) !important;
    margin-right: 12px;
}
.e-toast-container .e-toast .e-toast-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--hb-fg) !important;
}
.e-toast-container .e-toast .e-toast-content {
    font-size: 13.5px !important;
    color: var(--hb-fg) !important;
    opacity: .9;
}
.e-toast-container .e-toast .e-toast-close-icon { color: var(--hb-muted) !important; }

/* ============================================================
   Outline and flat buttons in dark mode.

   Fluent2's dark stylesheet is swapped in by theme.js, but its outline variant
   still resolves to a near-black label with a pale border — which on a dark card
   reads as a faint empty box. It's the style used by every per-row Edit/Delete
   in the grids and by most secondary actions, so ~190 buttons across the portal
   were affected, not just the media grid.

   Repainted from the portal's own palette variables rather than Fluent2's, since
   those are already known-good against --hb-card-bg. Light mode is untouched.
   ============================================================ */
[data-theme="dark"] .e-btn.e-outline,
[data-theme="dark"] .e-css.e-btn.e-outline {
    color: var(--hb-fg);
    border-color: var(--hb-border);
    background: transparent;
}

[data-theme="dark"] .e-btn.e-outline.e-primary,
[data-theme="dark"] .e-css.e-btn.e-outline.e-primary {
    color: var(--hb-accent);
    /* Literal rather than color-mix: an unsupported function silently drops the
       declaration, which would leave Fluent2's pale border in place — the exact
       problem this block exists to fix. Matches --hb-accent (#a880ff) in dark. */
    border-color: rgba(168,128,255,.55);
}

[data-theme="dark"] .e-btn.e-outline:hover,
[data-theme="dark"] .e-btn.e-outline:focus {
    background: var(--hb-hover);
    color: var(--hb-fg);
    border-color: var(--hb-accent);
}

[data-theme="dark"] .e-btn.e-outline.e-primary:hover,
[data-theme="dark"] .e-btn.e-outline.e-primary:focus {
    background: var(--hb-active-bg);
    color: var(--hb-fg);
    border-color: var(--hb-accent);
}

/* Danger keeps the same red the follow-ups board already uses in dark mode, so
   destructive actions stay recognisable without shouting. */
[data-theme="dark"] .e-btn.e-outline.e-danger,
[data-theme="dark"] .e-css.e-btn.e-outline.e-danger {
    color: #f1707b;
    border-color: rgba(241,112,123,.4);
}

[data-theme="dark"] .e-btn.e-outline.e-danger:hover,
[data-theme="dark"] .e-btn.e-outline.e-danger:focus {
    background: rgba(241,112,123,.14);
    color: #ff9aa2;
    border-color: rgba(241,112,123,.65);
}

/* Flat buttons (grid command columns) have no border to carry contrast, so they
   rely entirely on label colour. */
[data-theme="dark"] .e-btn.e-flat:not(.e-primary):not(.e-danger),
[data-theme="dark"] .e-css.e-btn.e-flat:not(.e-primary):not(.e-danger) {
    color: var(--hb-fg);
}

[data-theme="dark"] .e-btn.e-flat:hover,
[data-theme="dark"] .e-btn.e-flat:focus { background: var(--hb-hover); }

[data-theme="dark"] .e-btn.e-flat.e-primary { color: var(--hb-accent); }
[data-theme="dark"] .e-btn.e-flat.e-danger { color: #f1707b; }


/* ---- state chips --------------------------------------------------------------------------
   Published / Draft, brought over from MediaBase, which had it first.

   A word rather than Yes/No: "Yes" answers a question the column header only implies, and reads
   the same shape whichever it is. In a list of several hundred rows the state has to be findable
   by scanning, which is what the colour and the shape are for — the eye finds the one grey chip
   among the green ones long before it reads any of them.

   Deliberately not a Syncfusion badge: this is one small thing, and a chip drawn from the portal's
   own tokens themes itself in both modes without inheriting a component's opinions. */
.hb-pill {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .8em;
    line-height: 1.5;
    white-space: nowrap;
}

/* Green reads as live/available in both themes at this weight; the translucent fill means it sits
   on a white row and a dark one without a second rule for each. */
.hb-pill-on { background: rgba(46, 160, 92, .16); color: #2ea05c; }

/* A draft is not an error and not a warning — it is simply not published yet, so it is quiet
   rather than coloured. */
.hb-pill-off { background: rgba(128, 128, 128, .16); color: var(--hb-muted); }

/* ============================================================
   One setting two people changed at once (LiveConflictsDialog).

   Boxed rather than merely spaced, because several can be listed at once and each one is a
   separate decision: without a box, the buttons of the second read as belonging to the first.
   ============================================================ */
.hb-clash {
    border: 1px solid var(--hb-border);
    border-radius: 6px;
    padding: .75rem;
    margin-bottom: .75rem;
}

.hb-clash-title {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .25rem;
}

/* The row labels carry the weight; the two value columns are equal so neither version reads as
   the recommended one. */
.hb-clash-table th[scope="row"] { width: 34%; color: var(--hb-muted); font-weight: 600; }
.hb-clash-table td { width: 33%; word-break: break-word; }

/* ============================================================
   Two-factor offer (Shared/TwoFactorOfferPrompt) — a dialog on the
   dashboard, a card under the thank-you on FinishPayment. Three
   answers stacked full width so none reads as the small print.
   ============================================================ */
.hb-2fa-offer { text-align: center; color: var(--hb-fg); }
.hb-2fa-offer-inline {
    max-width: 440px;
    margin: 36px auto 0;
    padding: 24px;
    background: var(--hb-card-bg);
    border: 1px solid var(--hb-border);
    border-radius: 10px;
    text-align: center;
}
.hb-2fa-offer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--hb-active-bg);
    color: var(--hb-accent);
    font-size: 22px;
}
.hb-2fa-offer h4 { margin-bottom: 8px; color: var(--hb-fg); }
.hb-2fa-offer p { margin-bottom: 18px; color: var(--hb-muted); }
.hb-2fa-offer-actions { display: flex; flex-direction: column; gap: 8px; }
.hb-2fa-offer-actions .e-btn { width: 100%; }
.hb-2fa-offer-note { margin-top: 12px; font-size: .85rem; color: var(--hb-muted); }
.hb-2fa-offer-dialog.e-dialog { max-width: calc(100vw - 32px); }

/* The 6-digit code box, on sign-in (LoginWith2fa) and setup (EnableAuthenticator). */
.hb-2fa-code {
    font-size: 1.25rem;
    letter-spacing: .2em;
    font-variant-numeric: tabular-nums;
}
.hb-2fa-code::placeholder { letter-spacing: .2em; opacity: .45; }

/* The "Other" box a choice question reveals (FormDocumentView) — sits under the choices with a gap
   of its own, since hb-elements.css is the app's and is not edited here. */
.hb-form .hb-ff-other { margin-top: 8px; }

/* Edit Form page (FormEdit.razor): a follow-up action is a labelled grid, one field per cell with its
   label above it, instead of a wrapping row of float labels that cut each other off. The cells reflow
   from four across to one on a phone by themselves. */
.hb-fe-rule {
    border: 1px solid var(--hb-border); border-radius: 8px;
    padding: 12px 14px 14px; margin-bottom: 12px;
}
.hb-fe-rule-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hb-fe-rule-title { font-size: 12.5px; font-weight: 600; color: var(--hb-muted); }
.hb-fe-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px 14px; align-items: start;
}
.hb-fe-grid + .hb-fe-grid { margin-top: 10px; }
.hb-fe-field > label { display: block; font-size: 12.5px; color: var(--hb-muted); margin-bottom: 4px; }
.hb-fe-fixed { font-size: 13px; padding-top: 6px; }
/* A checkbox with its explanation beside it, not a sentence after it. */
.hb-fe-check { display: flex; align-items: center; margin-bottom: 6px; }

/* Flows list search (Flows.razor): the box takes the room, the status filter keeps its width. */
.hb-fl-search { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 8px; }
.hb-fl-search-text { flex: 1 1 320px; }
.hb-fl-search-status { flex: 0 0 160px; }
.hb-fl-search-count { font-size: 12.5px; padding-bottom: 8px; }

/* A group's header row in the Flows list: a foldable title, with rename and delete at the far end. */
.hb-fl-group-row > td { background: rgba(128, 128, 128, .10); padding-top: 6px; padding-bottom: 6px; }
.hb-fl-group-head { display: flex; align-items: center; justify-content: space-between; }
.hb-fl-group-toggle {
    appearance: none; background: none; border: 0; padding: 2px 0; cursor: pointer;
    display: inline-flex; align-items: center; color: var(--hb-fg); font-weight: 600;
}
.hb-fl-group-toggle > i { width: 16px; font-size: 11px; color: var(--hb-muted); }
.hb-fl-group-toggle > span + span { margin-left: 8px; font-weight: 400; }

/* ---- Docked run-sheet preview (Shared/PlanPreviewPanel.razor) ----------------------------------
   A bottom sheet on a narrow window; on a wide one a column down the right-hand side, and the page
   beside it narrows to make room until the panel is closed. Width alone decides. */
.hb-dock-backdrop { position: fixed; inset: 0; z-index: 1190; background: rgba(0,0,0,.45); }
.hb-dock {
    position: fixed; z-index: 1200; left: 0; right: 0; bottom: 0; max-height: 78vh;
    display: flex; flex-direction: column;
    background: var(--hb-card-bg); color: var(--hb-fg);
    border-top: 1px solid var(--hb-border); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 28px rgba(0,0,0,.35);
}
.hb-dock-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 8px; }
.hb-dock-titles { flex: 1 1 auto; min-width: 0; }
.hb-dock-titles h5 { margin: 0; }
.hb-dock-sub { font-size: .82rem; color: var(--hb-muted); }
.hb-dock-edit { flex: 0 0 auto; text-decoration: none; }
.hb-dock-close { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--hb-fg); cursor: pointer; }
.hb-dock-close:hover { background: var(--hb-hover); }
.hb-dock-body { flex: 1 1 auto; overflow-y: auto; padding: 0 16px 16px; }

@media (min-width: 1100px) {
    :root { --hb-dock-width: min(440px, 34vw); }
    .hb-dock-backdrop { display: none; }
    .hb-dock {
        left: auto; top: var(--hb-appbar-h); max-height: none; width: var(--hb-dock-width);
        border-top: 0; border-left: 1px solid var(--hb-border); border-radius: 0; box-shadow: -6px 0 24px rgba(0,0,0,.18);
    }
    /* The page narrows rather than sliding under the panel. */
    .hb-main-content:has(.hb-dock) { margin-right: var(--hb-dock-width); transition: margin-right .2s ease; }
}

.pv-draft { display: inline-block; margin-bottom: 8px; padding: 1px 8px; border-radius: 999px; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--hb-border); }
.pv-timeline { display: flex; width: 100%; height: 16px; overflow: hidden; border-radius: 5px; background: var(--hb-hover); margin: 4px 0 2px; }
.pv-slice { height: 100%; min-width: 3px; border-right: 1px solid rgba(255,255,255,.5); }
.pv-slice:last-child { border-right: none; }
.pv-ends { display: flex; justify-content: space-between; font-size: .72rem; color: var(--hb-muted); margin-bottom: 6px; }
.pv-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hb-border); }
.pv-item:last-child { border-bottom: none; }
.pv-time { flex: 0 0 48px; color: var(--hb-muted); font-variant-numeric: tabular-nums; }
.pv-dur { text-align: right; }
.pv-stripe { width: 5px; border-radius: 3px; flex: 0 0 5px; align-self: stretch; }
.pv-main { flex: 1 1 auto; min-width: 0; }
.pv-kind { font-size: .7rem; color: var(--hb-muted); text-transform: uppercase; letter-spacing: .04em; }
.pv-meta { color: var(--hb-muted); font-size: .85rem; }
.pv-notes { font-size: .85rem; overflow-wrap: break-word; }
.pv-notes.is-text { white-space: pre-line; }
.pv-notes p { margin: 0 0 .4em; }
.pv-notes img, .pv-notes video, .pv-notes iframe { max-width: 100%; height: auto; }
.pv-notes table, .pv-notes pre { display: block; max-width: 100%; overflow-x: auto; }
/* A Bible passage in a church's run-sheet notes, opening the passage page: the app's look for it
   (part of the sentence, bold with a dotted underline), not a chip. */
a.hb-scripture { color: var(--bs-link-color, #0d6efd); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }
a.hb-scripture:hover, a.hb-scripture:focus { text-decoration-style: solid; }
/* What the full notes editor can make: tables, quotes, rules and ticked lists (also the public plan page). */
:is(.pv-notes, .plan-item-notes) table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; }
:is(.pv-notes, .plan-item-notes) :is(td, th) { border: 1px solid rgba(128,128,128,.4); padding: 3px 6px; }
:is(.pv-notes, .plan-item-notes) blockquote { margin: .3em 0; padding-left: .7em; border-left: 3px solid rgba(128,128,128,.5); }
:is(.pv-notes, .plan-item-notes) hr { margin: .4em 0; opacity: .4; }
:is(.pv-notes, .plan-item-notes) ul.e-rte-checklist { list-style: none; padding-left: .2em; }
.pv-team { margin-top: 6px; padding: 6px 8px; border-left: 3px solid var(--hb-accent); background: var(--hb-active-bg); border-radius: 0 6px 6px 0; }
.pv-team-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--hb-accent); font-weight: 600; }
