/*
 * Brand Battles UI layer (docs/DESIGN_SYSTEM.md): shell and components in the website style.
 * Loaded after Bootstrap and the other style sheets, uses only the variables of bb-tokens.css.
 * Only the look: no rule here hides, moves or renames anything.
 */

/* ============================== Base ============================== */
html { -webkit-text-size-adjust: 100%; background: var(--bb-bg); }

body {
    font-family: var(--bb-font);
    font-size: var(--bb-fs-base);
    font-weight: var(--bb-fw-medium);
    line-height: var(--bb-lh);
    letter-spacing: var(--bb-tracking);
    background: var(--bb-bg);
    color: var(--bb-text);
    -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] body {
    background:
        radial-gradient(circle at 70% 0%, rgba(72, 26, 255, .14), transparent 30%),
        radial-gradient(circle at 15% 40%, rgba(0, 205, 255, .06), transparent 30%),
        linear-gradient(180deg, var(--bb-bg) 0%, var(--bb-bg-2) 100%) fixed;
}

h1:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), h2:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), h3:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), h4:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), h5:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), h6:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h1:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h2:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h3:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h4:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h5:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h6:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-family: var(--bb-font); color: var(--bb-text); letter-spacing: -.02em; }
h1:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h1:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .page-title:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-2xl); font-weight: var(--bb-fw-bold); line-height: 1.15; }
h2:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h2:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-xl); font-weight: var(--bb-fw-bold); line-height: 1.2; }
h3:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h3:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-lg); font-weight: var(--bb-fw-semibold); }
h4:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h4:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .section-title:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-lg); font-weight: var(--bb-fw-semibold); }
h5:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h5:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-md); font-weight: var(--bb-fw-semibold); }
h6:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .h6:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-base); font-weight: var(--bb-fw-semibold); }
.page-subtitle, .section-subtitle { color: var(--bb-muted); font-size: var(--bb-fs-base); font-weight: var(--bb-fw-medium); }
small:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .small:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-sm); }
.text-muted:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .text-secondary:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { color: var(--bb-muted) !important; }
a { color: var(--bb-accent-text); }
a:hover { color: var(--bb-primary-solid); }
hr:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { border-color: var(--bb-border); opacity: 1; }
::selection { background: color-mix(in srgb, var(--bb-accent) 35%, transparent); }

:focus-visible { outline: 2px solid var(--bb-focus); outline-offset: 2px; }
.form-control:focus-visible, .form-select:focus-visible, .btn:focus-visible { outline: 0; }

* { scrollbar-color: var(--bb-border-strong) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bb-border-strong); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }

/* Page area */
/* ONE content area for every page of both panels: starts right after the menu, 24 px (16 px on a phone) at both sides, full width, no centred narrow wrapper */
:root { --bb-pad: 24px; }
@media (max-width: 767.98px) { :root { --bb-pad: 16px; } }
.col-lg-10 > .p-4, .col-md-9 > .p-4, .flex-grow-1.p-4, .bb-content { padding: var(--bb-pad) !important; width: 100%; max-width: none; }
.col-lg-10 > .p-4 > *, .col-md-9 > .p-4 > *, .flex-grow-1.p-4 > * { max-width: none; }
.col-lg-10 > .p-4 .container, .col-lg-10 > .p-4 .container-fluid, .flex-grow-1.p-4 .container, .flex-grow-1.p-4 .container-fluid { max-width: none !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }

/* ============================== Sidebar (always dark navy, as the website) ============================== */
.sidebar-wrapper {
    flex-shrink: 0;   /* a wide page never squeezes the menu (found at 900 px on the Support pages) */
    background: var(--bb-sidebar-bg) !important;
    border-right: 1px solid var(--bb-sidebar-line);
    font-size: var(--bb-fs-base) !important;
    font-weight: var(--bb-fw-medium) !important;
}
.sidebar-wrapper .sidebar-logo { max-width: 190px; }
.sidebar-wrapper .sidebar-nav { padding: 0 var(--bb-sp-3); gap: 2px !important; }
.sidebar-wrapper .nav-link {
    min-height: 42px; padding: 9px 14px !important; gap: 12px !important;
    border-radius: var(--bb-r-md) !important;
    color: var(--bb-sidebar-text) !important;
    font-size: var(--bb-fs-base) !important; font-weight: var(--bb-fw-medium);
    transition: background var(--bb-ease), color var(--bb-ease);
}
.sidebar-wrapper .nav-link:hover { background: var(--bb-sidebar-hover) !important; color: #FFFFFF !important; }
.sidebar-wrapper .nav-link.active {
    background: var(--bb-sidebar-active-bg) !important;
    color: var(--bb-sidebar-active-text) !important;
    font-weight: var(--bb-fw-semibold);
}
.sidebar-wrapper .nav-link.active::before {
    left: -12px !important; top: 8px !important; bottom: 8px !important; width: 4px !important;
    background: var(--bb-gradient) !important; border-radius: 0 4px 4px 0 !important;
}
.sidebar-wrapper .submenu { margin: 2px 0 4px !important; }
.sidebar-wrapper .submenu.show, .sidebar-wrapper .submenu.collapsing { background: transparent !important; }
.sidebar-wrapper .submenu li a {
    padding: 9px 14px 9px 46px !important; border-radius: var(--bb-r-sm); font-size: var(--bb-fs-base) !important;
    color: var(--bb-sidebar-muted) !important; font-weight: var(--bb-fw-medium);
}
.sidebar-wrapper .submenu li a:hover { background: var(--bb-sidebar-hover) !important; color: #FFFFFF !important; }
.sidebar-wrapper .submenu li a.active { color: var(--bb-sidebar-active-text) !important; font-weight: var(--bb-fw-semibold); }
.sidebar-wrapper .badge { font-size: 11px; }
/* no boxes around menu items (a generic .nav-item .nav-link rule draws one) */
.sidebar-wrapper .nav-link, .sidebar-wrapper button.nav-link { border: 0 !important; box-shadow: none !important; }
/* Logout button at the foot of the sidebar */
.sidebar-wrapper .btn-primary-logout { padding: 8px 28px !important; font-size: var(--bb-fs-base); }

/* ============================== Header ============================== */
.topbar, .header-topbar-bg {
    background: var(--bb-header-bg) !important;
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--bb-border) !important;
    min-height: var(--bb-header-h);
    padding: 0 var(--bb-sp-6) !important;
    font-size: var(--bb-fs-base) !important;
    position: sticky; top: 0; z-index: 30;
}
.topbar .py-2 { padding-top: var(--bb-sp-2) !important; padding-bottom: var(--bb-sp-2) !important; }
.topbar h4, .topbar h5, .topbar h3, .topbar .page-title { font-size: var(--bb-fs-xl) !important; font-weight: var(--bb-fw-bold) !important; margin: 0; }
.topbar .text-dark, .topbar .fw-semibold { color: var(--bb-text) !important; }
.topbar #profileDropdown > span { font-size: var(--bb-fs-base) !important; }

/* page title of every page, also the default one without markup */
.topbar .min-w-0 { font-size: var(--bb-fs-xl); font-weight: var(--bb-fw-bold); letter-spacing: -.02em; color: var(--bb-text); }

/* Bootstrap size helpers: the old font was narrower, so the same sizes are one step smaller */
.fs-1 { font-size: 2rem !important; } .fs-2 { font-size: 1.6rem !important; } .fs-3 { font-size: 1.3rem !important; }
.fs-4 { font-size: 1.1rem !important; } .fs-5 { font-size: 1rem !important; } .fs-6 { font-size: .9rem !important; }

/* Breadcrumbs */
.breadcrumb-nav .breadcrumb, .breadcrumb { font-size: var(--bb-fs-sm); margin-bottom: var(--bb-sp-3); }
.breadcrumb-link, .breadcrumb-item a { color: var(--bb-muted); text-decoration: none; }
.breadcrumb-link:hover, .breadcrumb-item a:hover { color: var(--bb-accent-text); }
.breadcrumb-text, .breadcrumb-item.active, .breadcrumb-text-active { color: var(--bb-text); font-weight: var(--bb-fw-semibold); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--bb-subtle); }

/* ============================== Cards and panels ============================== */
.card, .quick-stat-card, .stat-card, .table-card, .card-gray-bg, .cohort-container, .challenges-card, .coupon-card,
.eligibility-section, .winners-section, .campaign-details, .ticket-info-card, .ticket-conversation-card, .task-card, .winner-card {
    border-radius: var(--bb-r-lg);
}
.card { background: var(--bb-card); border: 1px solid var(--bb-border); box-shadow: var(--bb-shadow-sm); color: var(--bb-text); }
.card-header, .card-footer { background: var(--bb-card-2); border-color: var(--bb-border); }
.stat-card, .card-gray-bg, .cohort-container { box-shadow: var(--bb-shadow-sm); border: 1px solid var(--bb-border); }
.card-gray-bg { font-size: var(--bb-fs-lg) !important; font-weight: var(--bb-fw-semibold) !important; }
.card-gray-bg:hover, .cohort-container:hover { box-shadow: var(--bb-shadow); transform: translateY(-2px); }
.quick-stat-card { border: 1px solid var(--bb-border); box-shadow: var(--bb-shadow-sm); border-radius: var(--bb-r-lg) !important; }
.quick-stat-card::before { background: var(--bb-gradient) !important; width: 4px !important; }
.stat-card-title, .stat-info-flex p { font-size: var(--bb-fs-md) !important; font-weight: var(--bb-fw-semibold) !important; color: var(--bb-muted); }
.stat-number, .stat-main-number, .stat-value-text { font-weight: var(--bb-fw-bold) !important; letter-spacing: -.02em; }
.stat-number, .stat-main-number { font-size: var(--bb-fs-3xl) !important; }
.grey-box, .pink-box, .orange-box, .green-box, .stat-icon { border-radius: var(--bb-r-md) !important; }

/* ============================== Buttons ============================== */
.btn:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-family: var(--bb-font); font-weight: var(--bb-fw-semibold); font-size: var(--bb-fs-base); border-radius: var(--bb-r-md); letter-spacing: -.005em; transition: filter var(--bb-ease), box-shadow var(--bb-ease), transform var(--bb-ease), background var(--bb-ease); }
.btn-sm:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { font-size: var(--bb-fs-sm); border-radius: var(--bb-r-sm); }

/* main button = the website's cyan gradient with dark text */
.btn-primary, .btn-primary-custom, .btn-primary-logout, .btn-primary-solid, .btn-logout, .form-submit-btn, .bb-login-btn, .forget-psw-btn, .btn-send-reply, .done-btn, .login-btn, .forgot-psw-otp-btn,
.filter-btn-primary, .btn.btn-primary-custom, .btn[style*="var(--bb-primary-solid)"], button.btn[style*="var(--bb-primary-solid)"] {
    background: var(--bb-btn-bg) !important;
    color: var(--bb-btn-fg) !important;
    border: 0 !important;
    font-weight: var(--bb-fw-bold) !important;
    border-radius: var(--bb-r-md) !important;
    box-shadow: var(--bb-btn-shadow);
}
.btn-primary-custom, .btn-primary-logout { font-size: var(--bb-fs-base) !important; padding: 0 22px !important; }
.btn-primary:hover, .btn-primary-custom:hover, .btn-primary-logout:hover, .btn-primary-solid:hover, .btn-logout:hover, .form-submit-btn:hover,
.bb-login-btn:hover, .forget-psw-btn:hover, .btn-send-reply:hover, .done-btn:hover, .login-btn:hover, .forgot-psw-otp-btn:hover, .filter-btn-primary:hover, .btn[style*="var(--bb-primary-solid)"]:hover {
    background: var(--bb-btn-hover-bg) !important; color: var(--bb-btn-fg) !important; filter: var(--bb-btn-hover-filter); transform: translateY(-1px);
    box-shadow: var(--bb-btn-hover-shadow) !important;
}
.btn-primary:active, .btn-primary-custom:active { transform: none; filter: brightness(.96); }
.btn-primary:disabled, .btn-primary.disabled, button:disabled.btn-primary-custom { filter: grayscale(.5); opacity: .55; box-shadow: none; }
/* icons inside the main button follow its dark text */
.btn-primary i, .btn-primary-custom i, .btn-primary-logout i { color: inherit; }

/* secondary / outline */
.btn-secondary, .btn-outline-secondary, .btn-outline-custom, .btn-outline-primary, .btn-outline-primary-soft, .btn-cancel, .btn-export, .filter-btn, .sort-btn, .pagination-btn {
    background: var(--bb-card) !important; color: var(--bb-text) !important; border: 1px solid var(--bb-border-strong) !important;
    border-radius: var(--bb-r-md) !important; font-weight: var(--bb-fw-semibold);
}
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-outline-custom:hover, .btn-outline-primary:hover, .btn-outline-primary-soft:hover, .btn-cancel:hover,
.btn-export:hover, .filter-btn:hover, .sort-btn:hover, .pagination-btn:hover:not(:disabled) {
    background: var(--bb-accent-soft) !important; color: var(--bb-accent-text) !important; border-color: var(--bb-accent-text) !important;
}
.btn-outline-custom { border-radius: var(--bb-r-md) !important; font-size: var(--bb-fs-base) !important; padding: 8px 18px !important; }
.btn-danger, .btn-outline-danger-soft:hover { background: var(--bb-danger-solid) !important; border-color: var(--bb-danger-solid) !important; color: var(--bb-on-solid) !important; }
.btn-outline-danger, .btn-outline-danger-soft { color: var(--bb-danger-text) !important; border: 1px solid var(--bb-danger-line) !important; background: transparent !important; }
.btn-success, .btn-outline-success-soft:hover { background: var(--bb-success-solid) !important; border-color: var(--bb-success-solid) !important; color: var(--bb-on-solid) !important; }
.btn-outline-success, .btn-outline-success-soft { color: var(--bb-success-text) !important; border: 1px solid var(--bb-success-line) !important; background: transparent !important; }
.btn-warning { background: var(--bb-warning-fill) !important; border-color: var(--bb-warning-fill) !important; color: #171717 !important; }
.btn-link { color: var(--bb-accent-text); font-weight: var(--bb-fw-semibold); }
.icon-btn { border-radius: var(--bb-r-sm); }
.btn-close { filter: none; }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
/* owner, 25 Nov 2026 (bug 4 follow-up): the player Support ticket actions stayed oversized. The main-button block
   above restyles .btn-send-reply's colours but never its size (line ~159 shrinks only .btn-primary-custom/
   .btn-primary-logout), so it kept style.css:618 font-size 22px / padding 6px 30px (≈ 165×76 px). .btn-close-ticket
   (brand.css:1019, inside @media ≤1024: font-size 20px) is in no compact list at all (≈ 158×39 px). Bring both to
   the shared compact button size, like every other action. */
.btn-send-reply, .btn-close-ticket { font-size: var(--bb-fs-base) !important; padding: 8px 18px !important; line-height: var(--bb-lh-tight, 1.3) !important; }

/* ============================== Forms ============================== */
label, .form-label { font-size: var(--bb-fs-sm); font-weight: var(--bb-fw-semibold); color: var(--bb-text); margin-bottom: 6px; }
.form-control, .form-select, .bb-input, .forget-psw-input, .filled-select, .reply-textarea, .pill-input {
    font-family: var(--bb-font); font-size: var(--bb-fs-base); font-weight: var(--bb-fw-medium);
    background-color: var(--bb-card); color: var(--bb-text);
    border: 1px solid var(--bb-border-strong); border-radius: var(--bb-r-md);
    min-height: 40px;
}
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select, [data-bs-theme="dark"] .bb-input { background-color: var(--bb-surface-2); border-color: var(--bb-border-strong); }
.form-control::placeholder, .bb-input::placeholder, textarea::placeholder { color: var(--bb-subtle); opacity: 1; }
.form-control:focus, .form-select:focus, .bb-input:focus, .forget-psw-input:focus, .ts-wrapper.focus .ts-control {
    border-color: var(--bb-accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bb-accent) 28%, transparent); outline: 0;
}
.form-control:disabled, .form-control[readonly]:not(.drp-trigger), .form-select:disabled { background-color: var(--bb-card-2); color: var(--bb-muted); }
/* owner, 20 Nov 2026: Start/End Time (and date) inputs rendered grey / "disabled"-looking because of the native picker — make them white like the other inputs */
input[type="time"], input[type="date"] { color-scheme: light; background-color: var(--bb-card); color: var(--bb-text); }
input[type="time"]::-webkit-calendar-picker-indicator, input[type="date"]::-webkit-calendar-picker-indicator { opacity: 1; cursor: pointer; }
/* owner, 20 Nov 2026: the category filter dropdowns in Master Admin lists (coupons, banners, rewards, seeds, drops) grew to the
   widest category (w-auto) and overflowed the filter row with a round border — constrain them like the brand lists */
select#categoryFilter { max-width: 200px; min-width: 150px; }
/* date pickers are read-only text fields that open a calendar: they look like every other field, only a really disabled field is grey */
.form-control.drp-trigger[readonly] { background-color: var(--bb-card); color: var(--bb-text); cursor: pointer; opacity: 1; }
[data-bs-theme="dark"] .form-control.drp-trigger[readonly] { background-color: var(--bb-surface-2); }
/* owner, 24 Nov 2026: ONE look for every date/time field (the date picker, a native date/time input, and the Drop slot select)
   in BOTH themes — the time field no longer looks greyer than the date field. */
input[type="time"], input[type="date"], select.filled-select[name$="_time"], select.filled-select[id$="Time"] {
    background-color: var(--bb-card) !important; color: var(--bb-text) !important;
}
[data-bs-theme="dark"] input[type="time"], [data-bs-theme="dark"] input[type="date"],
[data-bs-theme="dark"] select.filled-select[name$="_time"], [data-bs-theme="dark"] select.filled-select[id$="Time"] {
    background-color: var(--bb-surface-2) !important;
}
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--bb-danger-solid); }
.invalid-feedback, .text-danger { color: var(--bb-danger-text) !important; }
.form-text { color: var(--bb-muted); }
.form-check-input { border: 1px solid var(--bb-border-strong); background-color: var(--bb-card); }
.form-check-input:checked { background-color: var(--bb-primary-solid); border-color: var(--bb-primary-solid); }
.form-check-input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bb-accent) 28%, transparent); border-color: var(--bb-accent-text); }
.form-switch .form-check-input:not(:checked) { background-color: var(--bb-track); }
.input-group-text { background: var(--bb-card-2); color: var(--bb-muted); border-color: var(--bb-border-strong); border-radius: var(--bb-r-md); }
.upload-box, .upload-zone { border: 1.5px dashed var(--bb-border-strong); border-radius: var(--bb-r-lg); background: var(--bb-card-2); }
.ts-wrapper .ts-control { border-radius: var(--bb-r-md); border-color: var(--bb-border-strong); min-height: 40px; background: var(--bb-card); color: var(--bb-text); }
.ts-dropdown { border-radius: var(--bb-r-md); border-color: var(--bb-border); box-shadow: var(--bb-shadow); background: var(--bb-card); color: var(--bb-text); }

/* ============================== Tables ============================== */
.table { --bs-table-bg: transparent; --bs-table-color: var(--bb-text); --bs-table-border-color: var(--bb-border); --bs-table-hover-bg: var(--bb-card-2); --bs-table-hover-color: var(--bb-text); --bs-table-striped-bg: var(--bb-card-2); font-size: var(--bb-fs-base); }
.table > :not(caption) > * > * { padding: 14px 16px; vertical-align: middle; border-bottom-color: var(--bb-border); background-color: transparent; color: var(--bb-text); }
.table thead th, .table > thead > tr > th {
    background: var(--bb-card-2); color: var(--bb-muted); font-size: 12px; font-weight: var(--bb-fw-semibold);
    text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--bb-border); white-space: nowrap;
}
.table tbody tr:hover > * { background-color: var(--bb-card-2); }
.table a { font-weight: var(--bb-fw-semibold); }
.table-responsive, .table-scroll { border-radius: var(--bb-r-lg); }

/* Pagination */
.pagination { --bs-pagination-border-radius: var(--bb-r-sm); gap: 4px; }
.page-link, .custom-pagination .page-link, .pagination-number {
    border-radius: var(--bb-r-sm) !important; border: 1px solid var(--bb-border-strong) !important; background: var(--bb-card); color: var(--bb-text); font-weight: var(--bb-fw-semibold); min-width: 36px; text-align: center;
}
.page-item.active .page-link, .custom-pagination .page-item.active .page-link, .pagination-number.active {
    background: var(--bb-btn-bg) !important; color: var(--bb-btn-fg) !important; border-color: transparent !important;
}
.page-item.disabled .page-link { color: var(--bb-subtle); background: var(--bb-card-2); }
/* owner, 24 Nov 2026: compact pagination — the Back/Forward (Prev/Next) buttons and their arrows were oversized. Desktop + phone. */
.pagination .page-link { padding: 6px 10px !important; min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.pagination .page-link svg, .pagination .page-link i, .pagination .page-link img { width: 14px !important; height: 14px !important; }
@media (max-width: 575.98px) {
    .pagination { gap: 3px; flex-wrap: wrap; justify-content: center; }
    .pagination .page-link { padding: 4px 8px !important; min-width: 30px; height: 30px; font-size: .85rem; }
    .pagination .page-link svg, .pagination .page-link i, .pagination .page-link img { width: 12px !important; height: 12px !important; }
}

/* ============================== Badges and status ============================== */
.badge { font-family: var(--bb-font); font-size: 12px; font-weight: var(--bb-fw-semibold); letter-spacing: 0; border-radius: var(--bb-r-pill); padding: .35em .8em; }
.badge.bg-success { background-color: var(--bb-success-bg) !important; color: var(--bb-success-text) !important; border: 1px solid var(--bb-success-line); }
.badge.bg-danger { background-color: var(--bb-danger-bg) !important; color: var(--bb-danger-text) !important; border: 1px solid var(--bb-danger-line); }
.badge.bg-warning { background-color: var(--bb-warning-bg) !important; color: var(--bb-warning-text) !important; border: 1px solid var(--bb-warning-line); }
.badge.bg-info, .badge.bg-primary { background-color: var(--bb-accent-soft) !important; color: var(--bb-accent-text) !important; border: 1px solid var(--bb-accent-line); }
.badge.bg-secondary, .badge.bg-light, .badge.bg-dark { background-color: var(--bb-surface-2) !important; color: var(--bb-muted) !important; border: 1px solid var(--bb-border); }
.status-badge, .category-pill, .inline-pill { border-radius: var(--bb-r-pill); font-weight: var(--bb-fw-semibold); }
.status-claimed { color: var(--bb-success-text) !important; background: var(--bb-success-bg) !important; }
.status-unclaimed { color: var(--bb-warning-text) !important; background: var(--bb-warning-bg) !important; }

/* ============================== Modals, dropdowns, tabs ============================== */
.modal-content { background: var(--bb-card); color: var(--bb-text); border: 1px solid var(--bb-border); border-radius: var(--bb-r-xl); box-shadow: var(--bb-shadow-lg); overflow: hidden; }
.modal-header, .modal-footer { border-color: var(--bb-border); }
.modal-title { font-weight: var(--bb-fw-bold); font-size: var(--bb-fs-lg); }
.modal-backdrop { --bs-backdrop-bg: #020a16; --bs-backdrop-opacity: .62; }
.dropdown-menu { background: var(--bb-card); border: 1px solid var(--bb-border); border-radius: var(--bb-r-lg); box-shadow: var(--bb-shadow); padding: 6px; color: var(--bb-text); }
.dropdown-item { border-radius: var(--bb-r-sm); color: var(--bb-text); font-weight: var(--bb-fw-medium); padding: 8px 12px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bb-accent-soft); color: var(--bb-accent-text); }
.dropdown-divider { border-color: var(--bb-border); }
.nav-tabs { border-bottom-color: var(--bb-border); }
.nav-tabs .nav-link { color: var(--bb-muted); font-weight: var(--bb-fw-semibold); border-radius: var(--bb-r-md) var(--bb-r-md) 0 0; }
.nav-tabs .nav-link.active { color: var(--bb-accent-text); background: var(--bb-card); border-color: var(--bb-border) var(--bb-border) var(--bb-card); }
/* a tab under the pointer keeps readable text (brand.css turned it white on a light-blue hover: contrast 1.3, found on the Vetting tab) */
.nav-tabs .nav-item .nav-link:hover:not(.active) { color: var(--bb-accent-text); }
.tooltip { --bs-tooltip-bg: var(--bb-ink); --bs-tooltip-color: #FFFFFF; }
.popover { --bs-popover-bg: var(--bb-card); --bs-popover-border-color: var(--bb-border); --bs-popover-body-color: var(--bb-text); }
.accordion { --bs-accordion-bg: var(--bb-card); --bs-accordion-border-color: var(--bb-border); --bs-accordion-color: var(--bb-text); --bs-accordion-btn-bg: var(--bb-card); --bs-accordion-active-bg: var(--bb-accent-soft); --bs-accordion-active-color: var(--bb-accent-text); }
.list-group { --bs-list-group-bg: var(--bb-card); --bs-list-group-border-color: var(--bb-border); --bs-list-group-color: var(--bb-text); }

/* ============================== Alerts, notifications ============================== */
.alert { border-radius: var(--bb-r-lg); border: 1px solid var(--bb-border); border-left-width: 4px; font-weight: var(--bb-fw-medium); box-shadow: var(--bb-shadow-sm); }
.alert-success { background: var(--bb-success-bg); color: var(--bb-success-text); border-color: var(--bb-success-line); border-left-color: var(--bb-success-text); }
.alert-danger { background: var(--bb-danger-bg); color: var(--bb-danger-text); border-color: var(--bb-danger-line); border-left-color: var(--bb-danger-text); }
.alert-warning { background: var(--bb-warning-bg); color: var(--bb-warning-text); border-color: var(--bb-warning-line); border-left-color: var(--bb-warning-text); }
.alert-info, .alert-primary { background: var(--bb-accent-soft); color: var(--bb-accent-text); border-color: var(--bb-accent-line); border-left-color: var(--bb-accent-text); }
.alert a { color: inherit; font-weight: var(--bb-fw-bold); }
.alert-toast-wrapper .alert { box-shadow: var(--bb-shadow); }
.toast { background: var(--bb-card); color: var(--bb-text); border: 1px solid var(--bb-border); border-radius: var(--bb-r-lg); box-shadow: var(--bb-shadow); }

/* ============================== Progress, bars, charts ============================== */
.progress:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { background: var(--bb-track); border-radius: var(--bb-r-pill); height: 8px; overflow: hidden; }
.progress-bar:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .progress-bar-fill:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .progress-fill:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { background: var(--bb-gradient-wide) !important; border-radius: var(--bb-r-pill); }
.progress-bar-track:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *), .progress-bar-container:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) { background: var(--bb-track) !important; border-radius: var(--bb-r-pill); }
.chart-container, canvas { color: var(--bb-text); }

/* ============================== Live Preview frame (the phone content itself keeps the app look) ============================== */
/* Inside a preview everything is as in the app (and as before the redesign): the old font, size and weight of the page the preview used to inherit, and no new global styles */
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) { font-family: 'Ek Mukta', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.5; color: #212529; letter-spacing: normal; text-transform: none; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) :is(h1, h2, h3, h4, h5, h6) { font-family: inherit; font-weight: 500; line-height: 1.2; letter-spacing: normal; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) h1 { font-size: 2.5rem; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) h2 { font-size: 2rem; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) h3 { font-size: 1.75rem; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) h4 { font-size: 1.5rem; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) h5 { font-size: 1.25rem; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) h6 { font-size: 1rem; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) .text-muted { color: rgba(33, 37, 41, .75) !important; }
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) small { font-size: .875em; }

.live-preview { border: 1px solid var(--bb-border); border-radius: var(--bb-r-xl) !important; background: var(--bb-surface-2) !important; box-shadow: var(--bb-shadow-sm); }
.live-preview > h4 { font-size: var(--bb-fs-lg); font-weight: var(--bb-fw-bold); }

/* ============================== Misc ============================== */
.breadcrumb, .page-header { margin-bottom: var(--bb-sp-4); }
.border, .border-top, .border-bottom, .border-start, .border-end { border-color: var(--bb-border) !important; }
.shadow, .shadow-sm { box-shadow: var(--bb-shadow-sm) !important; }
.rounded-4 { border-radius: var(--bb-r-xl) !important; }
.bg-body, .bg-body-tertiary { background-color: var(--bb-card) !important; }
img[src*="user.png"] { border-radius: 50%; }

/* Login, sign up (light page, same look) */
.bb-login-wrapper { background: var(--bb-bg); }
.bb-login-card { background: var(--bb-card); border: 1px solid var(--bb-border); border-radius: var(--bb-r-xl); box-shadow: var(--bb-shadow); }
.bb-login-title { font-weight: var(--bb-fw-bold); }
.bb-login-subtitle { color: var(--bb-muted); }

/* Printing and reduced motion */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ============================== Icon boxes (one icon set, tinted by the family of the box) ============================== */
.grey-box, .stat-icon-blue { color: var(--bb-accent-text); }
.pink-box, .stat-icon-pink { color: var(--bb-danger-text); }
.orange-box, .stat-icon-orange { color: var(--bb-warning-text); }
.green-box { color: var(--bb-success-text); }
/* Stat tile: ONE component for every stat card of both panels. 60 px tile, 35 px icon, icon exactly in the middle of the tile
   (the tile sits at the bottom right of the card, its centre on the centre of the number row: see .card-gray-bg rules and docs/tools/icon-audit.cjs) */
.grey-box, .pink-box, .orange-box, .green-box { display: flex; align-items: center; justify-content: center; padding: 0; flex: 0 0 auto; }
.grey-box .bb-ic, .pink-box .bb-ic, .orange-box .bb-ic, .green-box .bb-ic { width: 35px; height: 35px; margin: 0; vertical-align: 0; }
@media (min-width: 768px) {
    .grey-box, .pink-box, .orange-box, .green-box { width: 60px; height: 60px; }
}
.stat-icon .bb-ic { width: 100%; height: 100%; }
.sidebar-wrapper .sidebar-icon { width: 20px; height: 20px; }
.bb-input-img.bb-ic { width: 20px; height: 20px; color: var(--bb-muted); }
.btn .bb-ic, .btn i { vertical-align: -.2em; }
[data-bs-theme="dark"] img[src$="user.png"] { filter: invert(1) brightness(1.2); }

/* Bootstrap colour helpers that pick pure black / dark: follow the theme */
.border-black, .border-dark { border-color: var(--bb-border-strong) !important; }
.text-black, .link-dark, a.text-dark { color: var(--bb-text) !important; }
.page-item.disabled .page-link, .custom-pagination .page-item.disabled .page-link { color: var(--bb-subtle) !important; background: var(--bb-card-2) !important; }
.page-link, .custom-pagination .page-link { color: var(--bb-accent-text); }

/* Bootstrap status text helpers use the readable status colours of both themes */
.text-success { color: var(--bb-success-text) !important; }
.text-danger { color: var(--bb-danger-text) !important; }
.text-warning { color: var(--bb-warning-text) !important; }
.text-info { color: var(--bb-accent-text) !important; }
.text-primary { color: var(--bb-accent-text) !important; }
.bg-success-subtle { background-color: var(--bb-success-bg) !important; }
.bg-danger-subtle { background-color: var(--bb-danger-bg) !important; }
.bg-warning-subtle { background-color: var(--bb-warning-bg) !important; }
.bg-info-subtle, .bg-primary-subtle { background-color: var(--bb-accent-soft) !important; }
code, kbd, pre { font-family: var(--bb-font-mono); }
code { color: var(--bb-purple-text); background: var(--bb-surface-2); padding: .1em .4em; border-radius: var(--bb-r-xs); font-size: .9em; }
pre code { background: transparent; padding: 0; }

/* Empty-state and placeholder pictures are SVG (public/brands-images/*.svg): a fixed size like the old 70 px PNGs */
img[src*="brands-images/empty-"]:not([width]), img[src*="brands-images/no-"]:not([width]) { width: 72px; height: 72px; }

/* Gold fills (Under Review highlight, small count bubbles) always carry dark text, in both themes */
[style*="background:var(--bb-warning-fill)"], [style*="background: var(--bb-warning-fill)"], [style*="background-color:var(--bb-warning-fill)"], [style*="background-color: var(--bb-warning-fill)"],
[style*="background:var(--bb-warning-fill)"] *:not(.btn):not(.btn *), [style*="background: var(--bb-warning-fill)"] *:not(.btn):not(.btn *), [style*="background-color:var(--bb-warning-fill)"] *:not(.btn):not(.btn *), [style*="background-color: var(--bb-warning-fill)"] *:not(.btn):not(.btn *),
[style*="background:var(--bb-yellow-bg)"], [style*="background: var(--bb-yellow-bg)"], [style*="background:var(--bb-yellow-bg)"] *, [style*="background: var(--bb-yellow-bg)"] * { color: #171717 !important; }
/* buttons inside a gold block keep their own fill with white text (AA: white on success 5.0, on danger 6.5 / 4.7) */
.btn.text-white[style*="success-solid)"], .btn.text-white[style*="danger-solid)"], .btn.text-white[style*="warning-solid)"], .btn.text-white[style*="purple-solid)"] { color: var(--bb-on-solid) !important; }
/* chosen option of a button group (gender, age ...): accent text on the soft accent fill = 5.1:1 */
.btn-check:checked + .btn { background: var(--bb-accent-soft) !important; color: var(--bb-accent-text) !important; border: 2px solid var(--bb-accent-text) !important; }
.challenges-section .challengue-tabs.nav-link.active, .challenges-section .challengue-tabs.nav-link.active *, .challenges-section .challengue-tabs.nav-link:hover, .challenges-section .challengue-tabs.nav-link:hover * { color: var(--bb-on-solid) !important; }

/* ============================== Sign-in pages (login, sign up, e-mail codes, 2FA): same look in both themes ============================== */
.bb-login-wrapper, .bb-login-title, .bb-login-subtitle, .bb-signup-text, .bb-signup-text a, .success-title, .bb-reset-title, .verify-title, .forgot-psw-otp-title,
.forget-psw-title, .bb-back-link, .forget-psw-back, .bb-stepper-wrapper, .bb-stepper-wrapper .step, .bb-stepper-wrapper .step span, .bb-login-card label { color: var(--bb-text) !important; }
.bb-login-subtitle, .forget-psw-subtitle { color: var(--bb-muted) !important; }
.bb-signup-text a, .bb-back-link:hover, .forget-psw-back:hover { color: var(--bb-accent-text) !important; }
.bb-login-card a:not(.btn) { color: var(--bb-accent-text); }
.bb-login-card { border-color: var(--bb-border); }
.bb-login-logo img { transition: filter var(--bb-ease); }
[data-bs-theme="light"] .bb-login-logo img { filter: brightness(0); opacity: .88; }   /* the old white logo shown black on the light page */
.bb-circle { border-color: var(--bb-border-strong); }
.step.active .bb-circle { background: var(--bb-primary-solid); border-color: var(--bb-primary-solid); color: var(--bb-on-solid); }
.bb-progress-line { background: var(--bb-border-strong); }

/* ============================== Date pickers: flatpickr and the daterangepicker follow the theme ============================== */
.flatpickr-calendar, .daterangepicker { background: var(--bb-card); color: var(--bb-text); border: 1px solid var(--bb-border-strong); border-radius: var(--bb-r-lg); box-shadow: var(--bb-shadow); font-family: var(--bb-font); }
.flatpickr-calendar:before, .flatpickr-calendar:after, .daterangepicker:before, .daterangepicker:after { display: none; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-current-month input.cur-year, .flatpickr-weekdays, span.flatpickr-weekday { background: transparent; color: var(--bb-text); fill: var(--bb-text); }
.flatpickr-current-month .flatpickr-monthDropdown-months option { background: var(--bb-card); color: var(--bb-text); }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color: var(--bb-text); fill: var(--bb-text); }
.flatpickr-months .flatpickr-prev-month svg, .flatpickr-months .flatpickr-next-month svg { fill: var(--bb-text); }
.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--bb-accent-text); }
span.flatpickr-weekday { color: var(--bb-muted); font-weight: var(--bb-fw-semibold); }
.flatpickr-day { color: var(--bb-text); border-radius: var(--bb-r-sm); border-color: transparent; }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: var(--bb-subtle); }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover, .flatpickr-day.notAllowed, .flatpickr-day.notAllowed.prevMonthDay, .flatpickr-day.notAllowed.nextMonthDay { color: var(--bb-subtle); background: transparent; }
.flatpickr-day:hover, .flatpickr-day:focus { background: var(--bb-accent-soft); border-color: var(--bb-accent-line); color: var(--bb-text); }
.flatpickr-day.today { border-color: var(--bb-accent-text); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected:hover { background: var(--bb-primary-solid); border-color: var(--bb-primary-solid); color: var(--bb-on-solid); }
.flatpickr-day.inRange { background: var(--bb-accent-soft); border-color: transparent; box-shadow: -5px 0 0 var(--bb-accent-soft), 5px 0 0 var(--bb-accent-soft); color: var(--bb-text); }
.flatpickr-time input, .flatpickr-time .flatpickr-am-pm { color: var(--bb-text); background: transparent; }
.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time input:focus { background: var(--bb-accent-soft); }
.flatpickr-time .numInputWrapper span.arrowUp:after { border-bottom-color: var(--bb-text); }
.flatpickr-time .numInputWrapper span.arrowDown:after { border-top-color: var(--bb-text); }
.flatpickr-calendar.hasTime .flatpickr-time { border-top-color: var(--bb-border); }
.daterangepicker td.available:hover, .daterangepicker th.available:hover { background: var(--bb-accent-soft); color: var(--bb-text); }
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date { background: transparent; color: var(--bb-subtle); }
.daterangepicker td.in-range { background: var(--bb-accent-soft); color: var(--bb-text); }
.daterangepicker td.active, .daterangepicker td.active:hover { background: var(--bb-primary-solid); color: var(--bb-on-solid); }
.daterangepicker .calendar-table { background: transparent; border-color: transparent; }
.daterangepicker select.monthselect, .daterangepicker select.yearselect, .daterangepicker .calendar-time select { background: var(--bb-surface-2); color: var(--bb-text); border-color: var(--bb-border-strong); }
.daterangepicker .drp-buttons { border-top-color: var(--bb-border); }

/* ============================== Misc readability fixes found by the audit ============================== */
.btn-light, .btn.btn-sm.btn-light { background: var(--bb-surface-2); color: var(--bb-text); border: 1px solid var(--bb-border-strong); }
.btn-light:hover { background: var(--bb-accent-soft); color: var(--bb-accent-text); }
.btn-light i, .btn-light .bb-ic { color: var(--bb-text); }
.form-control.bg-transparent::placeholder { color: var(--bb-subtle); }

/* cyan fills always carry dark ink (white on cyan is 1.8:1), also when a Bootstrap helper sets the text white */
[style*="background:var(--bb-accent)"], [style*="background: var(--bb-accent)"], [style*="background-color:var(--bb-accent)"], [style*="background-color: var(--bb-accent)"] { color: var(--bb-cta-ink) !important; }
/* a form-like container (multi-select box) has the same visible edge as a field */
.form-control:not(.border-0):not([class*="border-start"]):not([class*="border-end"]), .form-select:not(.border-0) { border-color: var(--bb-border-strong) !important; }

/* Disabled controls: no transparency (it lowers contrast), a clear flat look that is still readable (5:1) */
.btn:disabled, .btn.disabled, fieldset:disabled .btn { opacity: 1 !important; background: var(--bb-card-2) !important; color: var(--bb-subtle) !important; border: 1px solid var(--bb-border) !important; box-shadow: none !important; filter: none !important; transform: none !important; }
.btn:disabled i, .btn.disabled i, .btn:disabled .bb-ic { color: var(--bb-subtle) !important; }
/* fields on the gold Under Review block */
[style*="background:var(--bb-warning-fill)"] .form-control, [style*="background: var(--bb-warning-fill)"] .form-control { border-color: #171717 !important; background: #FFFFFF !important; color: #171717 !important; }

.attach-icon-white, .btn-attach-file .bb-ic { background-color: var(--bb-cta-ink) !important; filter: none !important; }
body [style*="background:var(--bb-warning-fill)"] .form-control.form-control, body [style*="background: var(--bb-warning-fill)"] .form-control.form-control { border-color: #171717 !important; background: #FFFFFF !important; color: #171717 !important; }
body [style*="background:var(--bb-warning-fill)"] .form-control::placeholder, body [style*="background: var(--bb-warning-fill)"] .form-control::placeholder { color: #52637C; }
.form-control.bb-on-gold, .form-control.bb-on-gold.form-control { border-color: #171717 !important; background: #FFFFFF !important; color: #171717 !important; }
.form-control.bb-on-gold::placeholder { color: #52637C; }
html body .form-control.bb-on-gold.form-control { border-color: #171717 !important; }
html body .form-control.bb-on-gold.bb-on-gold.bb-on-gold.bb-on-gold { border-color: #171717 !important; }
.btn-outline-light, .btn-outline-light:focus { color: var(--bb-text); background: transparent; border: 1px solid var(--bb-border-strong); }
.btn-outline-light:hover { color: var(--bb-accent-text); background: var(--bb-accent-soft); border-color: var(--bb-accent-text); }

/* ============================== Layout: real sidebar width, gutters, buttons that fit ============================== */
@media (min-width: 768px) {
    .sidebar-wrapper { flex: 0 0 var(--bb-sidebar-w) !important; width: var(--bb-sidebar-w) !important; max-width: var(--bb-sidebar-w) !important; }
    .sidebar-wrapper + .col-lg-10, .sidebar-wrapper ~ [class*="col-lg-10"] { flex: 1 1 0 !important; width: auto !important; max-width: none !important; min-width: 0; }
}
@media (min-width: 768px) and (max-width: 991.98px) { :root { --bb-sidebar-w: 220px; } }
.sidebar-wrapper .sidebar-nav { padding-left: var(--bb-sp-3) !important; padding-right: var(--bb-sp-3) !important; }
.sidebar-wrapper .nav-link { max-width: 100%; box-sizing: border-box; }
.sidebar-wrapper .nav-link.active::before { left: calc(-1 * var(--bb-sp-3)) !important; }
.manage-btn a, .manage-drop-btn a, .manage-weekly-btn a, .manage-weekly-btn button { font-size: 1.05rem !important; white-space: normal !important; padding-right: 44px !important; padding-left: 14px !important; line-height: 1.25; }
.analytics-page .row > [class*="col-"] { min-width: 0; }
.analytics-page .kpi .d-flex { min-width: 0; }
/* T-030: wrap KPI labels BY WORD, not mid-word. overflow-wrap:anywhere was splitting "WAU"->"WA/U" and "Returning Players"->"Retu/rning". */
.analytics-page .kpi .d-flex > :not(.kpi-icon):not(.info-btn) { min-width: 0; overflow-wrap: break-word; word-break: normal; }
.analytics-page .kpi-label { overflow-wrap: break-word; word-break: normal; hyphens: none; }
/* T-030: on a narrow screen (≤575px) the cards are tight — a smaller label that wraps on two lines fits without breaking words. */
@media (max-width: 575.98px) {
    .analytics-page .kpi-label { font-size: var(--bb-fs-sm, 0.82rem); line-height: 1.2; white-space: normal; }
    .analytics-page .kpi { padding: 0.75rem !important; }
}


/* date fields with the calendar icon on the left: room for the icon, icon colour per theme */
.drp-trigger { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352637C' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z' /%3E %3Cpath d='M16 3v4' /%3E %3Cpath d='M8 3v4' /%3E %3Cpath d='M4 11h16' /%3E %3Cpath d='M11 15h1' /%3E %3Cpath d='M12 15v3' /%3E %3C/svg%3E") !important; background-repeat: no-repeat; background-position: 12px center; background-size: 18px; padding-left: 38px !important; }
[data-bs-theme="dark"] .drp-trigger { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B1BED3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' %3E %3Cpath d='M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z' /%3E %3Cpath d='M16 3v4' /%3E %3Cpath d='M8 3v4' /%3E %3Cpath d='M4 11h16' /%3E %3Cpath d='M11 15h1' /%3E %3Cpath d='M12 15v3' /%3E %3C/svg%3E") !important; }

/* the look of Bootstrap's own radius and the old text colour of the page stay inside previews */
:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide), :where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) * { --bs-border-radius: .375rem; --bs-border-radius-sm: .25rem; --bs-border-radius-lg: .5rem; --bs-border-radius-xl: 1rem; }
[data-bs-theme="dark"] :where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) { color: #E8ECF4; }


/* KPI cards of a row: same height and the same inner layout (title on top, number and icon at the bottom), whatever the page set inline */
.row > [class*="col"] > .card-gray-bg.card, .row > [class*="col"] > .card.card-gray-bg { height: 100%; justify-content: space-between !important; }
.card-gray-bg .stat-title { min-height: 1.4em; margin-bottom: var(--bb-sp-3) !important; }
.card-gray-bg .stat-main-number { line-height: 1.1; }

/* menu icons: every item has the icon at the same place (the old markup added a different margin to some icons) */
.sidebar-wrapper .nav-link .sidebar-icon, .sidebar-wrapper .nav-link > i { margin-right: 0 !important; margin-left: 0 !important; }

/* one height and one radius for every button */
.btn:not(.btn-sm):not(.btn-lg):not(.btn-close):not(.bb-action) { min-height: var(--bb-btn-h); }
.btn-sm { min-height: var(--bb-btn-h-sm); }
.btn:not(.btn-sm):not(.btn-lg), .btn-primary-custom, .btn-primary-logout, .btn-outline-custom, .form-submit-btn { border-radius: var(--bb-r-md) !important; }
.btn-sm { border-radius: var(--bb-r-sm) !important; }
.btn-primary-custom, .btn-primary-logout { padding-top: 0 !important; padding-bottom: 0 !important; min-height: var(--bb-btn-h); display: inline-flex; align-items: center; justify-content: center; }

/* Brand Dashboard (Fix3-8): Live Campaigns icons - coloured icon on a round tinted background, as in the original design; the colours are the tokens of the section families */
.bb-kpi-circle { width: 70px; height: 70px; flex: 0 0 auto; }
.bb-kpi-circle .bb-ic { width: 35px; height: 35px; }
.bb-kpi-blue   { background: var(--bb-accent-soft);  color: var(--bb-accent-text); }
.bb-kpi-pink   { background: var(--bb-danger-bg);    color: var(--bb-danger-text); }
.bb-kpi-amber  { background: var(--bb-warning-bg);   color: var(--bb-warning-text); }
.bb-kpi-green  { background: var(--bb-success-bg);   color: var(--bb-success-text); }
.bb-kpi-purple { background: var(--bb-purple-bg);    color: var(--bb-purple-text); }

/* Weekly Grand lists: the actions column is one column wide (brand.css makes .banner-action 10 %, which pushed the last cell under the row) */
@media (min-width: 768px) {
    .banner-action.grand-action { width: 8.33333333% !important; flex: 0 0 auto; }
}

/* (i) hint next to a page title */
.bb-hint { background: transparent; border: 0; padding: 4px; line-height: 1; color: var(--bb-muted); border-radius: 50%; cursor: help; }
.bb-hint:hover, .bb-hint:focus-visible { color: var(--bb-accent-text); }
.bb-hint .bi { width: 20px; height: 20px; }
.popover { --bs-popover-max-width: 320px; font-size: var(--bb-fs-sm, 13px); }

/* "Please fix the following": the summary of form errors at the top of every page with a form */
.bb-form-errors { scroll-margin-top: 84px; display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 18px; border-radius: var(--bb-r-lg); background: var(--bb-danger-bg); border: 1px solid var(--bb-danger-line); color: var(--bb-text); }
.bb-form-errors .bb-ic { color: var(--bb-danger-text); width: 22px; height: 22px; margin-top: 2px; }
.bb-form-errors strong { display: block; color: var(--bb-danger-text); margin-bottom: 4px; }
.bb-form-errors ul { margin: 0; padding-left: 18px; }
.bb-form-errors a { color: var(--bb-text); text-decoration: underline; }
.bb-form-errors.is-flash strong { margin-bottom: 0; }
.form-control.is-invalid, .form-select.is-invalid, .ts-wrapper.is-invalid .ts-control, .is-invalid > .form-control { border-color: var(--bb-danger-solid) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bb-danger-solid) 22%, transparent); }

/* Action icons of a list row (Edit, Pause, View, Delete): one component. Marked by public/js/mobile.js (markActions). */
.bb-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }
.bb-actions form { display: flex; align-items: center; margin: 0; }
.bb-action { width: 32px; height: 32px; padding: 0 !important; margin: 0 !important; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; border: 0; border-radius: 10px; background: transparent; line-height: 1; color: #5F6E86; transition: background var(--bb-ease), color var(--bb-ease); }
.bb-action, .btn.bb-action { min-width: 32px; min-height: 32px; height: 32px; width: 32px; }
.bb-action:hover, .bb-action:focus-visible { background: #EEF3FD; color: #0667DC; }
.bb-action[data-bb-act="delete"]:hover, .bb-action[data-bb-act="delete"]:focus-visible { background: #FDE8EC; color: #E11D48; }
[data-bs-theme="dark"] .bb-action { color: #A9BAD6; }
[data-bs-theme="dark"] .bb-action:hover, [data-bs-theme="dark"] .bb-action:focus-visible { background: rgba(90, 162, 255, .16); color: #8CC0FF; }
[data-bs-theme="dark"] .bb-action[data-bb-act="delete"]:hover { background: rgba(255, 122, 147, .16); color: #FF9DB0; }
.bb-action .bb-ic, .bb-action i { width: 20px; height: 20px; margin: 0; font-size: 20px; vertical-align: 0; color: inherit; }
/* a finger needs 40 px */
@media (max-width: 767.98px) { .bb-action, .btn.bb-action { width: 40px; height: 40px; min-width: 40px; min-height: 40px; flex-basis: 40px; } }

/* The action column holds four icons (4 x 28 + 3 x 4 px) in every list: it is as wide as that, the other columns give way (no overlap with the next column) */
@media (min-width: 1100px) {   /* from 768 to 1099 px the cells of a record wrap into two columns (found at 900 px: Subject and Brand lay on top of each other) */
    .bb-card-row, .banner-list > .row { flex-wrap: nowrap; }
    .bb-card-row > :not(.bb-actions) { flex: 0 1 auto; min-width: 0; }
    .bb-card-row > .bb-actions { flex: 0 0 auto; width: 148px !important; max-width: none; margin-left: 20px; padding-left: 0; padding-right: 8px; }
}

/* Action icons in a table cell: the cell stays a table cell (never display:flex), the icons sit in one line with the same gaps */
td.bb-actions-cell { white-space: nowrap; }
td.bb-actions-cell form { display: inline-flex; vertical-align: middle; margin: 0; }
td.bb-actions-cell .bb-action { vertical-align: middle; margin-right: 4px !important; }


/* Stat cards: the same inner space in every card, whatever padding classes a template gives it (py-xl-2 and px-lg-4 on single cards moved their title and number by 16 px) */
@media (min-width: 768px) {
    .card-gray-bg.card:has(.stat-main-number) { padding: 24px 48px !important; }
}

/* View pages: the four stat cards of a row are as tall as the tallest one; the title stays on top and the number with its icon at the bottom,
   so a title of one line or of two lines never moves the number of the card next to it */
.row > [class*="col"] > .challenges-card:has(.stat-main-number) { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.row > [class*="col"] > .challenges-card:has(.stat-main-number) > h4 { margin-bottom: var(--bb-sp-4, 16px) !important; }
/* the number row of every stat card: number and icon tile on one centre line (some templates centre them, some stretch them) */
.card-gray-bg .d-flex:has(> .stat-main-number), .card-gray-bg .d-flex:has(> div > .stat-main-number), .challenges-card .d-flex:has(> .stat-main-number) { align-items: center !important; }

/* owner, 24 Nov 2026: on a phone the View/Performance KPI cards (challenges-card: Total Impressions, Claim Rate, ...) match the
   compact size of the listing cards (All Coupons). Only mobile — desktop is unchanged. Applies to every View/Performance page
   (Seed, Drop, Weekly Grand, Banner, Quiz, Poll, In-Game, coupon). */
@media (max-width: 575.98px) {
    .challenges-card:has(.stat-main-number) { padding: 16px !important; }
    .challenges-card:has(.stat-main-number) > h4 { font-size: var(--bb-fs-base) !important; margin-bottom: 10px !important; }
    .challenges-card .stat-main-number { font-size: var(--bb-fs-2xl) !important; }
    .challenges-card [class*="-box"]:has(> .bb-ic) { padding: 6px !important; }
    .challenges-card [class*="-box"] > .bb-ic { width: 22px; height: 22px; }
}

/* owner, 24 Nov 2026: on a phone the Challenges "Create Quiz / Create Poll" tab cards are too tall (inline padding 35px 30px +
   big shadow) — make them compact like the other cards. Mobile only; overrides the inline padding. */
@media (max-width: 575.98px) {
    .challengue-tabs.tab-card { padding: 14px 12px !important; box-shadow: 0 1px 4px rgba(16, 24, 40, .08) !important; }
    .challengue-tabs.tab-card .tab-title i { font-size: 1.3rem !important; }
    .challengue-tabs.tab-card .tab-title h5.title { font-size: .8rem !important; }
    .challengue-tabs.tab-card .tab-description { font-size: .78rem; }
}

/* Stat tiles: the blue tile is tinted blue like its family (it was a grey-blue track colour) */
.grey-box { background-color: var(--bb-accent-soft); }

/* a locked (disabled) choice of a window keeps its text readable */
.btn-check:disabled + .btn-outline-secondary, .btn-check[disabled] + .btn-outline-secondary { opacity: .85; color: var(--bb-text); }

/* the edge of a field on the gold Under Review block stays dark (it must win against the general field edge rule above) */
body [style*="background:var(--bb-warning-fill)"] .form-control:not(.border-0):not([class*="border-start"]):not([class*="border-end"]),
body [style*="background: var(--bb-warning-fill)"] .form-control:not(.border-0):not([class*="border-start"]):not([class*="border-end"]) { border-color: #171717 !important; }

/* Visual v4: four action buttons (4 x 32 px + 3 gaps of 4 px) fit their column in every list, also the banner list */
.bb-actions { gap: 4px !important; }
@media (min-width: 768px) { .banner-list > .row > .bb-actions { flex: 0 0 148px !important; width: 148px !important; max-width: 148px !important; padding-left: 0; padding-right: 8px; } }
/* calm grey by default, whatever colour class the template gave the button (text-primary, text-danger ...) */
.bb-action:not(:hover):not(:focus-visible), .bb-action:not(:hover):not(:focus-visible) i, .bb-action:not(:hover):not(:focus-visible) .bb-ic { color: #5F6E86 !important; }
[data-bs-theme="dark"] .bb-action:not(:hover):not(:focus-visible), [data-bs-theme="dark"] .bb-action:not(:hover):not(:focus-visible) i, [data-bs-theme="dark"] .bb-action:not(:hover):not(:focus-visible) .bb-ic { color: #A9BAD6 !important; }
.bb-action:hover i, .bb-action:hover .bb-ic, .bb-action:focus-visible i { color: inherit !important; }

/* ============ Shell on every page (Visual v4): header and sidebar ============ */
/* ---------- Header (every page, Visual v4): theme switch, bell with a dot, profile without an arrow ---------- */
.topbar { background: var(--bb-card) !important; border-bottom: 1px solid var(--bb-border) !important; }
#notifBadge:not(.d-none) { font-size: 0 !important; width: 10px; height: 10px; padding: 0 !important; transform: translate(-60%, 10%) !important; }
#profileDropdown::after { content: ""; display: inline-block; margin-left: 8px; border-top: .32em solid; border-right: .32em solid transparent; border-left: .32em solid transparent; color: var(--bb-muted); vertical-align: middle; }

/* ---------- Sidebar (every page, Visual v4): pill active item, calm Logout, very faint wave at the bottom ---------- */
.sidebar-wrapper { background-color: var(--bb-sidebar-bg) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 248 260' preserveAspectRatio='none'%3E%3Cpath d='M0 140 C 70 120, 120 40, 248 0 L248 260 L0 260 Z' fill='%23ffffff' fill-opacity='.04'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: bottom; background-size: 100% 260px; }
.sidebar-wrapper .nav-link.active { background: linear-gradient(100deg, #0770EC, #0667DC) !important; color: #FFFFFF !important; border-radius: 999px !important; }
.sidebar-wrapper .nav-link.active::before { display: none !important; }
.sidebar-wrapper .nav-link:hover:not(.active) { background: var(--bb-sidebar-hover) !important; }
.sidebar-wrapper .btn-primary-logout { background: #0A1B3D !important; color: #FFFFFF !important; border: 1px solid rgba(255, 255, 255, .28) !important; box-shadow: none !important; }
.sidebar-wrapper .btn-primary-logout:hover { background: var(--bb-sidebar-hover) !important; }

/* a count badge inside the active menu pill stays readable on the blue */
.sidebar-wrapper .nav-link.active .badge { background: #FFFFFF !important; color: #B4122A !important; }

/* In-Game Content list, column Games: game icons and a "+N" chip of the same size (not clickable) */
.bb-game-chip { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bb-surface-2); border: 1px solid var(--bb-border); color: var(--bb-muted); font-weight: 700; font-size: 13px; cursor: default; user-select: none; }

/* Menu entries wrap instead of widening the menu (the submenu of the Support pages made it 3 px wider than its box at 900 px) */
.sidebar-wrapper .nav-item, .sidebar-wrapper .nav-link, .sidebar-wrapper .submenu li, .sidebar-wrapper .submenu li a { min-width: 0; }
.sidebar-wrapper .nav-link, .sidebar-wrapper .submenu li a { overflow-wrap: anywhere; }

/* List rows between 768 and 1099 px: the cells of a record wrap, three to a line, the action icons keep their own width (Coupons of Master Admin overlapped at 900 px) */
@media (min-width: 768px) and (max-width: 1099.98px) {
    .bb-card-row > [class*="col-md-"]:not(.bb-actions):not(#_) { flex: 0 0 auto; width: 33.3333%; max-width: 33.3333%; margin-bottom: 10px; }
    .bb-card-row > .bb-actions:not(#_) { flex: 0 0 auto; width: auto !important; margin-bottom: 10px; }
    .bb-card-row:not(#_) { row-gap: 4px; }
}

/* The "Create ..." button in the header plate of Challenges (Prize Tasks, Quizzes, Polls) below 992 px: on its own line, full width, at least 12 px from the filters (it was pressed against them and pushed to the right at 390 px) */
@media (max-width: 991.98px) {
    .create-btn:not(#_) { width: 100%; margin-top: 12px; }
    .create-btn:not(#_) .btn { width: 100% !important; }
    div:has(> form > .position-relative) > form:not(#_) { flex-wrap: wrap; }
    .col-lg-10.d-flex:has(.create-btn):not(#_) { flex-wrap: wrap; justify-content: flex-start !important; }
}

/* Rating stars (found with the demo screenshots, 21 Oct 2026): the icon set draws every icon as an outline, so a "filled" star looked exactly like an empty one
   and every rating looked the same. Now they differ by colour: filled = warning colour, empty = muted. */
.bi-star-fill { color: var(--bb-warning-solid); }
.bi-star { color: var(--bb-border-strong); }

/* QA 22 Oct 2026: the phone preview of a form never makes the page scroll sideways (a window about 1050 px wide) */
@media (max-width: 1199.98px) {
    .details-logo, .preview-info, .coupon-logo { min-width: 0; overflow-x: hidden; }
    .phone-wrapper, .phone-layer, .bbcp-phone { max-width: 100%; }
    .phone-wrapper img, .phone-layer img, .phone-frame-overlay { max-width: 100%; height: auto; }
}

/* QA 22 Oct 2026, phone width (390 px) */
@media (max-width: 575.98px) {
    /* one line of breadcrumbs, long names cut with "..." */
    .breadcrumb { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
    .breadcrumb-item { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .breadcrumb-item.active { flex: 1 1 auto; }
    /* the red dot sits on the bell */
    #notifBell { margin-right: .75rem !important; }
    /* on a phone the bell shows the number (owner, 30 Oct 2026), not an empty pill: the dot rule of the desktop header is undone here */
    #notifBadge:not(.d-none) { width: auto !important; height: auto !important; font-size: .68rem !important; min-width: 1.25rem; padding: .18rem .35rem !important; line-height: 1; overflow: visible; text-overflow: clip; transform: translate(-65%, -25%) !important; }
    /* room for the title: smaller side gaps and no margins between the header icons (owner, 30 Oct 2026: the play icon sat on the title Dashboard) */
    .topbar.px-4, .topbar { padding-left: 12px !important; padding-right: 12px !important; }
    .topbar > div:last-child > * { margin-left: 0 !important; margin-right: 0 !important; }
    .topbar #notifBell { margin-right: 0 !important; }
    /* a page title wraps by words, never by letters */
    .topbar h4, .topbar .h4, .header-topbar-bg h4 { overflow-wrap: normal !important; word-break: normal !important; hyphens: none !important; }
    .topbar > div:first-child, .header-topbar-bg > div:first-child { word-break: normal !important; overflow-wrap: normal; }
    /* the floating Preview button never covers the last fields of a form: there is room below them (owner, 30 Oct 2026) */
    body:has([data-preview-fab]) .flex-grow-1.p-4, body:has([data-preview-fab]) .main-content { padding-bottom: 96px !important; }
    /* a status badge stays on one line and inside its box */
    .badge, .status-badge, [data-edit-under-review] .badge { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .edit-pending-badge, .d-inline-block[style*="bb-warning-fill"] { white-space: nowrap; max-width: 100%; }
}

/* ONE set of button sizes for the brand panel on a phone (owner, 30 Oct 2026): height 44 px, font 15 px, side padding 16 px, one line.
   The row of Cancel / Save as Draft / Submit is marked by a small script (partials/bb-styles): the buttons are equal in width, the main action is filled,
   the others are outlined; with three buttons the main one is full width below the two others. */
@media (max-width: 575.98px) {
    .bb-act-row { display: flex !important; flex-wrap: wrap; gap: 10px; margin: 16px 0 0 !important; padding: 0 !important; width: 100%; }
    .bb-act-wrap { display: contents !important; }
    /* owner, 23 Nov 2026: no forced 44px/15px on a phone — let the compact wave6cv button sizes apply, like on desktop (keep only the row layout) */
    .bb-act-row .bb-act { flex: 1 1 calc(50% - 5px); min-width: 0; width: auto !important; line-height: 1.2; white-space: nowrap; display: inline-flex !important; align-items: center; justify-content: center; margin: 0 !important; }
    .bb-act-row .bb-act:not(.bb-act-main) { background: transparent !important; border: 1.5px solid var(--bb-accent-line) !important; color: var(--bb-accent-text) !important; }
    .bb-act-row div.w-100 { order: 5; flex-basis: 100%; }
    .bb-act-row.bb-act-three .bb-act-main { flex-basis: 100%; order: 3; }
    /* the header title (also "Section / Page") wraps by words and is never cut */
    .topbar > div:first-child { min-width: 0; flex: 1 1 auto; }
    .topbar .min-w-0 { min-width: 0; overflow: visible; }
    /* one line in the header on a phone, a long name ends with "..." (owner, 31 Oct 2026) */
    .topbar .breadcrumb { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem !important; line-height: 1.2; }
    .topbar .breadcrumb-item, .topbar .breadcrumb-item.active { display: inline !important; white-space: nowrap; }
    .topbar .breadcrumb-item + .breadcrumb-item::before { float: none; display: inline; }
    .topbar .breadcrumb-item h4, .topbar .breadcrumb-item a { display: inline !important; white-space: nowrap; margin: 0 !important; padding: 0 !important; }
    .topbar .breadcrumb-item:not(:last-child) { display: none !important; }   /* only the current page (owner, 31 Oct 2026) */
    .topbar .breadcrumb-item:last-child::before { display: none !important; }
    /* header icons (owner, 30 Oct 2026): tutorial, theme, bell and avatar are the same size, on one line, in the same order on every page; the bell number is a small badge over the corner and does not move the icon */
    .topbar > div:last-child { align-items: center !important; gap: 2px; flex-shrink: 0; }
    .topbar > div:last-child > * { flex-shrink: 0; }
    .topbar .bb-watch-tutorial, .topbar #themeToggle, .topbar #notifBellToggle, .topbar #profileDropdown { width: 38px !important; height: 38px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; line-height: 1; }
    .topbar .bb-watch-tutorial i, .topbar #themeToggle i, .topbar #notifBellToggle i { font-size: 22px; line-height: 1; }
    .topbar #notifBell { display: flex; align-items: center; margin: 0 !important; width: 38px; height: 38px; position: relative; }
    .topbar #notifBadge:not(.d-none) { position: absolute !important; top: 2px !important; right: 0 !important; left: auto !important; transform: none !important; min-width: 16px; width: auto !important; height: 16px !important; padding: 0 4px !important; font-size: 10px !important; line-height: 16px !important; }
    .topbar #profileDropdown::after { display: none; }
    .topbar #profileDropdown > div { width: 36px !important; height: 36px !important; margin: 0 !important; }
    .topbar > div:last-child .dropdown { display: flex; align-items: center; }
    /* the Master Admin header is the same: icons 38 px on one line, the bell number a small badge over the corner (owner, 31 Oct 2026) */
    .header-topbar-bg > div:last-child { align-items: center !important; gap: 2px !important; flex-shrink: 0; }
    .header-topbar-bg > div:last-child > * { flex-shrink: 0; margin-left: 0 !important; margin-right: 0 !important; }
    .header-topbar-bg #themeToggle, .header-topbar-bg #notifBellToggle, .header-topbar-bg #adminProfileDropdown { width: 38px !important; height: 38px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; line-height: 1; }
    .header-topbar-bg #themeToggle i, .header-topbar-bg #notifBellToggle i { font-size: 22px; line-height: 1; }
    .header-topbar-bg #notifBell { display: flex; align-items: center; margin: 0 !important; width: 38px; height: 38px; position: relative; }
    .header-topbar-bg #notifBadge:not(.d-none) { position: absolute !important; top: 2px !important; right: 0 !important; left: auto !important; transform: none !important; min-width: 16px; width: auto !important; height: 16px !important; padding: 0 4px !important; font-size: 10px !important; line-height: 16px !important; }
    .header-topbar-bg #adminProfileDropdown::after { display: none; }
    .header-topbar-bg #adminProfileDropdown > span { display: none; }
    .header-topbar-bg #adminProfileDropdown > img { width: 36px !important; height: 36px !important; margin: 0 !important; }
    .header-topbar-bg > div:last-child .dropdown { display: flex; align-items: center; }
    /* Product Mapping: full-width fields with their labels, the address wraps */
    #productMappingForm .row > [class*="col-"] { flex: 0 0 100%; width: 100%; max-width: 100%; }
    #productMappingForm .form-control, #productMappingForm .form-select { width: 100%; }
    #productMappingForm .bb-outcome-title { padding-bottom: 0; }
    /* Coupon Configuration: no empty bar before "Select Coupon" (the tick of the section is shown on a larger screen only; it follows the chosen coupon) */
    .form-check:has(> .section-toggle) { display: none !important; }
    /* In-Game Content: categories wrap without overlapping, the phone preview is smaller */
    .category.d-flex { gap: 8px !important; }
    .category > label.btn { margin: 0 !important; padding: 8px 14px !important; min-height: 40px; height: auto; white-space: normal; line-height: 1.2; display: inline-flex; align-items: center; }
    .game-preview { zoom: .72; }
    /* every page ends above the browser bar */
    .flex-grow-1.p-4, .main-content { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
    /* cards and fields: less air */
    .card-body, .bb-card { padding: 14px !important; }
}

/* the "Preview" button that takes a phone to the Live Preview of a form (it sits at the very bottom otherwise) */
.bb-preview-fab { position: fixed; right: 16px; bottom: 16px; z-index: 1040; display: none; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); background: var(--bb-primary-solid, #2249F3); color: var(--bb-on-solid, #fff); }
@media (max-width: 991.98px) { .bb-preview-fab.is-active { display: inline-flex; align-items: center; gap: 6px; } }
@media (max-width: 991.98px) { .bb-preview-fab.is-active { position: static; width: 100%; justify-content: center; height: 44px; margin: 0 0 12px; box-shadow: none; border-radius: var(--bb-r-md, 10px); background: transparent; border: 1.5px solid var(--bb-accent-line); color: var(--bb-accent-text); font-size: 15px; } }

/* Star ratings (owner, 23 Oct 2026): ONE component (partials/star-rating): inline SVG, solid fill, no outline. Filled #FFC107; empty grey #D5DAE5 on light, #3A4660 on dark. */
.bb-stars { display: inline-flex; gap: 2px; vertical-align: middle; line-height: 0; }
.bb-star { display: block; stroke: none; }
.bb-star-on { fill: #FFC107; }
.bb-star-off { fill: #D5DAE5; }
[data-bs-theme="dark"] .bb-star-off, [data-theme="dark"] .bb-star-off { fill: #3A4660; }

/* Support header: the button takes the full width under the title on a phone, its own width from tablets (Chrome report 30 Oct 2026) */
@media (min-width: 768px) { .w-md-auto { width: auto !important; } }

/* ====================== Compact buttons (owner-approved 22 Nov 2026) ======================
   One size system for the whole brand cabinet + Master Admin: lg 38 (the Submit-for-Review / Cancel pair), md 34 (default),
   sm 30 (tables), icons 16px. Overrides the old inline 20px / 5px-40px form buttons. Never touches the in-app phone previews.
   Colours and text are unchanged — only size. Revert = delete this block. The :where(...) list is the same preview-exclusion
   set used by the base .btn rules above, so the in-app phone mockups keep their sizes. */
.btn:not(.btn-sm):not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) {
    font-size: 13px !important; padding: 7px 14px !important; line-height: 1.25 !important; border-radius: 8px !important;
}
.btn-sm:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) {
    font-size: 12px !important; padding: 5px 10px !important; border-radius: 7px !important;
}
/* the matched form pair (Send for review + Cancel / Save as Draft) stays one size — lg, overriding the old inline 20px/5px-40px */
.btn.form-submit-btn, .btn.form-close-btn, .form-submit-btn, .form-close-btn {
    font-size: 14px !important; padding: 9px 18px !important; border-radius: 8px !important;
}
/* one icon size everywhere inside cabinet buttons */
.btn:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) > i,
.btn:not(:where(.bbcp-phone, .phone-wrapper, .phone-layer, .quiz-live-preview, .ingame-preview, .seed-preview-content, .bbcp .bg-white, .preview-slide) *) .bb-ic {
    font-size: 16px !important; width: 16px; height: 16px; line-height: 1;
}

/* #1 Time wheel (owner, 24 Nov 2026): an iOS-style scroll "barrel" for every time field, replacing the flat clock.
   Wheel rows are 40px tall — bb-timewheel.js reads that height, keep them in sync. */
input.bb-timewheel::-webkit-calendar-picker-indicator { display: none; }  /* the wheel is the picker; hide the native clock so both do not open */
input.bb-timewheel { cursor: pointer; }
.bbtw-pop { position: absolute; z-index: 1080; width: 224px; padding: 8px; border-radius: 14px;
    background: var(--bb-card); border: 1px solid var(--bb-border, rgba(0,0,0,.12)); box-shadow: 0 12px 34px rgba(0,0,0,.20); }
[data-bs-theme="dark"] .bbtw-pop { background: var(--bb-surface-2); border-color: rgba(255,255,255,.12); }
.bbtw-wheels { position: relative; display: flex; gap: 6px; }
/* owner, 25 Nov 2026: compact barrel — digits the same size as the date field (14px / --bb-fs-base), shorter rows (32px).
   ROW in bb-timewheel.js must stay = 32 to match .bbtw-item height. col = 4×row, pad = (col-row)/2, selbar top = pad, height = row. */
.bbtw-col { flex: 1; height: 128px; overflow-y: scroll; scroll-snap-type: y mandatory;
    -ms-overflow-style: none; scrollbar-width: none; overscroll-behavior: contain; }
.bbtw-col::-webkit-scrollbar { display: none; }
.bbtw-pad { height: 48px; }   /* (128 - 32) / 2 so the first and last value can sit on the centre line */
.bbtw-item { height: 32px; line-height: 32px; text-align: center; scroll-snap-align: center;
    font-size: var(--bb-fs-base); color: var(--bb-muted); font-variant-numeric: tabular-nums; cursor: pointer; user-select: none; }
.bbtw-item.is-sel { color: var(--bb-text); font-weight: 700; }
.bbtw-selbar { position: absolute; left: 2px; right: 2px; top: 48px; height: 32px; pointer-events: none;
    border-radius: 8px; background: var(--bb-card-2, rgba(0,0,0,.04));
    border-top: 1px solid var(--bb-border, rgba(0,0,0,.14)); border-bottom: 1px solid var(--bb-border, rgba(0,0,0,.14)); }
[data-bs-theme="dark"] .bbtw-selbar { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.bbtw-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

/* item 2 (owner, 24 Nov 2026): info "i" next to a stat title; the long caption now lives in its tooltip, so the card is the same size as the others. */
.bb-info-dot { font-size: 14px; color: var(--bb-muted); cursor: help; vertical-align: middle; margin-left: 2px; line-height: 1; }
.bb-info-dot:focus { outline: 2px solid var(--bb-primary-solid); outline-offset: 1px; border-radius: 50%; }

/* item 6 (owner, 24 Nov 2026): on the real list pages the "Showing 1 to 20 of 34 results" line and the numbered pager sat in one
   row and overlapped. Let that wrapper wrap with a gap so Prev/Next never cover the results text. */
.flex-sm-fill.justify-content-sm-between { flex-wrap: wrap; gap: 8px 16px; }

/* item 3 (owner, 24 Nov 2026): the Challenges "Brand Polls / Brand Quizzes" tab cards were ~375px tall with a lot of empty
   space and tiny text. Tighter padding (set inline to 20/24) + a readable, less-muted description + smaller shadow, like the
   Manage blocks. Desktop and phone. */
#challengeTabs .tab-card { box-shadow: 0 4px 14px rgba(10,40,90,.08) !important; }
#challengeTabs .tab-card .tab-title h5.title { font-size: 1.05rem; }
#challengeTabs .tab-card .tab-description span { font-size: .95rem; color: var(--bb-muted); }
/* owner, 24 Nov 2026 (round 2): on a phone Chrome still measured 180px tiles with 14.4px text. Make the frames clearly SHORTER
   (less padding, smaller icon, lighter shadow) and the text BIGGER (1rem). Beats the older .challengue-tabs rule by id specificity. */
@media (max-width: 575.98px) {
    #challengeTabs .tab-card { padding: 12px 14px !important; box-shadow: 0 1px 4px rgba(16,24,40,.08) !important; }
    #challengeTabs .tab-card .tab-title { margin-bottom: 6px !important; }
    #challengeTabs .tab-card .tab-title i { font-size: 1.2rem !important; }
    #challengeTabs .tab-card .tab-title h5.title { font-size: 1rem !important; }
    #challengeTabs .tab-card .tab-description span { font-size: 1rem !important; }
}

/* owner, 25 Nov 2026: the Coupons -> View KPI cards now use the All Coupons LIST card markup directly
   (.card-gray-bg.card, row g-4), so they are one-to-one with the list at every width. The old .bb-kpi-row
   treatment (a separate .challenges-card look in a bb-kpi-row grid) is gone — no page uses bb-kpi-row anymore. */

/* item 4 (owner, 24 Nov 2026): brand Dashboard on a phone — Get started above the statistics, a compact pre-launch plate,
   even Live Campaigns cards, and bigger Refresh / Download buttons. Desktop keeps the current layout. */
.active-card { height: 100%; }   /* even Live Campaigns cards (equal height in their row) */
@media (max-width: 575.98px) {
    .bb-dash-sg { display: flex; flex-direction: column; }
    .bb-dash-sg > .bb-dash-gs { order: -1; margin-bottom: 1rem; }     /* Get started above the numbers on a phone */
    #launchBanner { padding: 8px 12px !important; font-size: .9rem; margin-bottom: 1rem !important; }   /* compact "review pending" plate */
    #launchBanner .bi { font-size: 1rem !important; }
    #kpiRefreshBtn { padding: 8px 16px !important; font-size: .95rem !important; }                      /* bigger Refresh */
    [data-export-box] .btn, [data-export-box] .form-select { padding: 8px 16px !important; font-size: .95rem !important; }  /* bigger Download CSV/PDF + period */
}

/* item 3 (owner, 24 Nov 2026): the barrel makes the time input readOnly, and the generic readonly rule painted it grey
   (var(--bb-card-2)). Keep the time field the SAME white as the other inputs in light theme (surface-2 in dark), like the date. */
input.bb-timewheel[readonly], input.bb-timewheel { background-color: var(--bb-card) !important; color: var(--bb-text); opacity: 1; cursor: pointer; }
[data-bs-theme="dark"] input.bb-timewheel[readonly], [data-bs-theme="dark"] input.bb-timewheel { background-color: var(--bb-surface-2) !important; }

/* item 4 (owner, 25 Nov 2026): the dashboard banner art (<svg class="bb-banner-art">) could be measured wider than the viewport
   at 390px; cap it so it never pushes a horizontal scrollbar. The .bb-banner container already clips (overflow:hidden). */
.bb-banner-art { max-width: 100%; }
